[Demonstration 1]

[Buggy Method]
@JsonIgnore
public KeygroupID getKeygroup() {
    if (dataIdentifier == null) {
        return null;
    }
    return dataIdentifier.getKeygroup();
}

[Buggy Hunk]
return dataIdentifier.getKeygroup();

[Patch]
return dataIdentifier.getKeygroupID();

[Demonstration 2]

[Buggy Method]
public void compute() {
    computedData = new ArrayList<String[]>();
    computedColumns = new ArrayList<String>();
    int tonnesWtIdx = -1;
    for (int j = 0; j < columns.length; j++) {
        if (columns[j].equalsIgnoreCase(requiredFieldMap.get("tonnes_wt"))) {
            tonnesWtIdx = j;
            break;
        }
    }
    List<Expression> expressions = Expressions.getAll();
    for (Expression expr : expressions) {
        computedColumns.add(expr.getName());
        String[] dataArr = new String[data.size()];
        float value = 0;
        boolean isComplex = expr.isValueType();
        boolean isGrade = expr.isGrade();
        //List<Filter> filters= expr.getFilters();
        String conditionExpr = expr.getCondition();
        for (int i = 0; i < dataArr.length; i++) {
            String[] rowValues = data.get(i);
            boolean conditionsMet = true;
            try {
                if (conditionExpr != null) {
                    conditionsMet = GnosExpressionParser.evaluate(conditionExpr, rowValues, expr.getConditionColumns());
                    System.out.println("conditionsMet :" + conditionsMet);
                }
                /*					for (Filter filter: filters){
						String conditionValue = filter.getValue();
						String valueToCheck = rowValues[filter.getColumnId()];

						switch(filter.getOpType()){
							case 0: if(!(valueToCheck.equalsIgnoreCase(conditionValue))){
										conditionsMet = false;
									}
									break;
							case 1: if(valueToCheck.equalsIgnoreCase(conditionValue)){
										conditionsMet = false;
									}
									break;
							case 2: if(!(conditionValue.toLowerCase().contains(valueToCheck.toLowerCase()))){
										conditionsMet = false;
									}
									break;
							case 3: if(!(Float.parseFloat(valueToCheck) > Float.parseFloat(conditionValue))){
										conditionsMet = false;
									}
									break;							
							case 4: if(!(Float.parseFloat(valueToCheck) < Float.parseFloat(conditionValue))){
										conditionsMet = false;
									}
									break;
						}
					}*/
                if (conditionsMet) {
                    if (isComplex) {
                        Operation operation = expr.getOperation();
                        float leftOperand = Float.parseFloat(rowValues[operation.getOperand_left()]);
                        float rightOperand = Float.parseFloat(rowValues[operation.getOperand_right()]);
                        switch(operation.getOperator()) {
                            case 0:
                                value = leftOperand + rightOperand;
                                break;
                            case 1:
                                value = leftOperand - rightOperand;
                                break;
                            case 2:
                                value = leftOperand * rightOperand;
                                break;
                            case 3:
                                value = leftOperand / rightOperand;
                                break;
                        }
                    } else {
                        value = Float.parseFloat(rowValues[expr.getValue()]);
                    }
                    if (!isGrade) {
                        value = (value / Float.parseFloat(rowValues[tonnesWtIdx]));
                    }
                } else {
                    value = 0;
                }
            } catch (Exception e) {
                value = 0;
                e.printStackTrace();
            }
            dataArr[i] = String.valueOf(value);
        }
        computedData.add(dataArr);
    }
}

[Buggy Hunk]
String conditionExpr = expr.getCondition();

[Patch]
String conditionExpr = expr.getUpdatedCondition();

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    manager.registerCommands(new TestingCommands());
    while (true) {
        System.out.print("> ");
        String text = scanner.nextLine();
        Bundle bundle = new Bundle();
        bundle.add("POINT", new Point(5, 5));
        try {
            manager.trigger(bundle, text);
        } catch (IntelliCommandNotFound e) {
            System.err.println("Command not found");
        }
    }
}

[Buggy Hunk]
bundle.add("POINT", new Point(5, 5));

[Patch]
bundle.add("POINT", new Point());