[Demonstration 1]

[Buggy Method]
public void ReferenceToggleCheckboxtoggled() {
    if (ReferenceToggleCheckBox.isSelected()) {
        if (ReferenceTypeChoiceBox.getSelectionModel().getSelectedIndex() == -1) {
            switch(Preferences.getSessionOptions().getReferencetype()) {
                case html:
                    ReferenceTypeChoiceBox.getSelectionModel().select(0);
                    break;
                case txt:
                    ReferenceTypeChoiceBox.getSelectionModel().select(1);
                    break;
                default:
                    ReferenceTypeChoiceBox.getSelectionModel().select(0);
                    break;
            }
        }
        referencetypechanged();
    } else {
        loadreference();
    }
}

[Buggy Hunk]
} else {loadreference();}

[Patch]
} else {ReferenceContentPane.setContent(null);}

[Demonstration 2]

[Buggy Method]
public ExpressionNode constructExpressionNodes(Expression expression) {
    LinkedList<ExpressionUnit> list = expression.getUnits();
    if (list.size() == 0)
        return null;
    ExpressionNode head = new ExpressionNode(list.get(0));
    ExpressionNode curr = head;
    for (int i = 1; i < list.size(); i++) curr = new ExpressionNode(list.get(i), curr, null);
    return head;
}

[Buggy Hunk]
public ExpressionNode constructExpressionNodes (Expression expression) {

[Patch]
public static ExpressionNode constructExpressionNodes (Expression expression) {

[Demonstration 3]

[Buggy Method]
@Override
public Void visitConstantDeclarationStatement(ThoriumParser.ConstantDeclarationStatementContext ctx) {
    createSymbol(ctx.UCIdentifier().getText(), ctx.expression());
    return null;
}

[Buggy Hunk]
createSymbol(ctx.UCIdentifier().getText(), ctx.expression());

[Patch]
createSymbolInCurrentScope(ctx.UCIdentifier().getText(), ctx.expression());