[Demonstration 1]

[Buggy Method]
private DiagramDescription getDiagramDescriptionFromFile() throws PartInitException {
    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(diagramDescriptionFile), PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(diagramDescriptionFile.getName()).getId());
    final Group group = getGroup();
    for (Viewpoint viewpoint : group.getOwnedViewpoints()) {
        for (RepresentationDescription representation : viewpoint.getOwnedRepresentations()) {
            if (diagramDescriptionName.equals(representation.getName())) {
                return (DiagramDescription) representation;
            }
        }
    }
    return null;
}

[Buggy Hunk]
if (diagramDescriptionName.equals(representation.getName())) {

[Patch]
if (diagramName.equals(representation.getName())) {

[Demonstration 2]

[Buggy Method]
public void updateFixedPrincipalAmount(final MathContext mc, final int periodNumber, final Money outstandingAmount) {
    final Integer numberOfPrincipalPaymentPeriods = calculateNumberOfRemainingPrincipalPaymentPeriods(this.actualNumberOfRepayments, this.getRecurringMoratoriumOnPrincipalPeriods(), this.getPrincipalGrace(), periodNumber - 1);
    Money principal = outstandingAmount.dividedBy(numberOfPrincipalPaymentPeriods - periodNumber + 1, mc.getRoundingMode());
    this.fixedPrincipalAmount = principal.getAmount();
}

[Buggy Hunk]
Money principal = outstandingAmount.dividedBy(numberOfPrincipalPaymentPeriods - periodNumber + 1, mc.getRoundingMode());

[Patch]
Money principal = outstandingAmount.dividedBy(numberOfPrincipalPaymentPeriods, mc.getRoundingMode());

[Demonstration 3]

[Buggy Method]
private ArrayList<ArrayList> splitInfo(String string) {
    //Adds an end operator on the end
    string += '\\';
    StringBuilder temp = new StringBuilder("");
    //Creates ArrayLists - See parseAnswer for uses
    ArrayList<ArrayList> superArray = new ArrayList<>();
    ArrayList<Character> operatorArray = new ArrayList<>();
    ArrayList<Float> numberArray = new ArrayList<>();
    //When it detects an operator, it compiles everything read before into a number with parseNumber,
    //and adds this number and the operator to ArrayLists
    for (char character : string.toCharArray()) {
        if (isOperator(character)) {
            numberArray.add(parseNumber(temp.toString()));
            temp = new StringBuilder("");
            operatorArray.add(character);
            if (character == '\\') {
                break;
            }
        } else {
            temp.append(character);
        }
    }
    //SuperArray avoids too many Global Variables
    superArray.add(0, numberArray);
    superArray.add(1, operatorArray);
    return superArray;
}

[Buggy Hunk]
ArrayList<Float> numberArray = new ArrayList<>();

[Patch]
ArrayList<Double> numberArray = new ArrayList<>();