[Demonstration 1]

[Buggy Method]
@SuppressWarnings("unchecked")
public List<Negociacao> carrega(InputStream inputStream) {
    XStream stream = new XStream(new DomDriver());
    stream_.alias("negociacao", Negociacao.class);
    return (List<Negociacao>) stream.fromXML(inputStream);
}

[Buggy Hunk]
stream_.alias("negociacao", Negociacao.class);

[Patch]
stream.alias("negociacao", Negociacao.class);

[Demonstration 2]

[Buggy Method]
@Override
protected void init(ExpressionExecutor[] expressionExecutors, ExecutionPlanContext executionPlanContext) {
    this.executionPlanContext = executionPlanContext;
    this.expiredEventChunk = new ComplexEventChunk<StreamEvent>(false);
    maxByMinByExecutor = new MaxByMinByExecutor();
    // this.events=new ArrayList<StreamEvent>();
    if (minByMaxByExecutorType == "MIN") {
        maxByMinByExecutor.setMinByMaxByExecutorType(minByMaxByExecutorType);
    } else {
        maxByMinByExecutor.setMinByMaxByExecutorType(minByMaxByExecutorType);
    }
    if (attributeExpressionExecutors.length != 2) {
        throw new ExecutionPlanValidationException("Invalid no of arguments passed to minbymaxby:maxByLength() or minbymaxby:maxByLength() window, " + "required 2, but found " + attributeExpressionExecutors.length);
    }
    Attribute.Type attributeType = attributeExpressionExecutors[0].getReturnType();
    if (!((attributeType == Attribute.Type.DOUBLE) || (attributeType == Attribute.Type.INT) || (attributeType == Attribute.Type.STRING) || (attributeType == Attribute.Type.FLOAT) || (attributeType == Attribute.Type.LONG))) {
        throw new ExecutionPlanValidationException("Invalid parameter type found for the first argument of minbymaxby:maxByLength() or minbymaxby:maxByLength() window, " + "required " + Attribute.Type.INT + " or " + Attribute.Type.LONG + " or " + Attribute.Type.FLOAT + " or " + Attribute.Type.DOUBLE + "or" + Attribute.Type.STRING + ", but found " + attributeType.toString());
    }
    attributeType = attributeExpressionExecutors[1].getReturnType();
    if (!((attributeType == Attribute.Type.LONG) || (attributeType == Attribute.Type.INT))) {
        throw new ExecutionPlanValidationException("Invalid parameter type found for the second argument of minbymaxby:maxByLength() or minbymaxby:maxByLength() window, " + "required " + Attribute.Type.INT + " or " + Attribute.Type.LONG + ", but found " + attributeType.toString());
    }
    if (attributeExpressionExecutors.length == 2) {
        minBymaxByExecutorAttribute = attributeExpressionExecutors[0];
        length = (Integer) (((ConstantExpressionExecutor) attributeExpressionExecutors[1]).getValue());
    }
}

[Buggy Hunk]
this.expiredEventChunk = new ComplexEventChunk<StreamEvent>(false);

[Patch]
this.internalWindowChunk = new ComplexEventChunk<StreamEvent>(false);

[Demonstration 3]

[Buggy Method]
public static void addNode(String workflowName, String type, String name) {
    AbstractWorkflow1 aw = abstractWorkflows.get(workflowName);
    aw.addNode(type, name);
}

[Buggy Hunk]
public static void addNode(String workflowName, String type, String name) {

[Patch]
public static void addNode(String workflowName, String type, String name) throws Exception {