[Demonstration 1]

[Buggy Method]
@Override
public void handleDelivery(String arg0, Envelope arg1, BasicProperties arg2, byte[] arg3) throws IOException {
    System.out.println("Delivery: " + arg0 + "; " + arg1 + "; " + new String(arg3, Charset.forName("UTF-8")));
    try {
        ChairMessage msg = mapper.readValue(arg3, ChairMessage.class);
        System.out.println(msg.toString());
        System.out.println(System.currentTimeMillis() - msg.getTimestamp());
        if (!msg.getValues().isEmpty()) {
            dbConnector.write(msg);
        } else {
        }
        channel.basicAck(arg1.getDeliveryTag(), false);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
ChairMessage msg = mapper.readValue(arg3, ChairMessage.class);

[Patch]
ChairMessage msg = ChairMessage.parseJson(arg3);

[Demonstration 2]

[Buggy Method]
protected boolean compareString() {
    final String valStr = this.fileValue.toString();
    switch(this.getComparisonType()) {
        case COMPARISON_EQUAL:
            valStr.equals(this.regelValue);
        case COMPARISON_GREATER_EQUAL:
            return false;
        case COMPARISON_LESS_EQUAL:
            return false;
        case COMPARISON_REGEX:
            Pattern p = Pattern.compile(regelValue.toString());
            final Matcher matcher = p.matcher(valStr);
            return matcher.matches();
        case COMPARISON_UNEQUAL:
            return !valStr.equals(this.regelValue);
        case EMPTY:
            return false;
        default:
            break;
    }
    return false;
}

[Buggy Hunk]
valStr.equals(this.regelValue);

[Patch]
return valStr.equals(this.regelValue);

[Demonstration 3]

[Buggy Method]
public SWAPartial getResult() {
    if (getRootPair() == null) {
        return null;
    }
    return this.aggregate(this.getRootPair());
}

[Buggy Hunk]
return this.aggregate(this.getRootPair());

[Patch]
return aggregate(getRootPair());