[Demonstration 1]

[Buggy Method]
@Override
public boolean update(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key, @Nonnull @NotEmpty final String value, @Nullable @Positive final Long expiration) throws IOException {
    IMap<String, StorageRecord> backingMap = hazelcastInstance.getMap(context);
    final Lock lock = hazelcastInstance.getLock(context + ":" + key);
    lock.lock();
    try {
        if (!backingMap.containsKey(key)) {
            return false;
        }
        MutableStorageRecord record = (MutableStorageRecord) backingMap.get(key);
        record.setValue(value);
        record.incrementVersion();
        record.setExpiration(getSystemExpiration(expiration));
        backingMap.put(key, record, getSystemExpiration(record.getExpiration()), TimeUnit.MILLISECONDS);
        return true;
    } finally {
        lock.unlock();
    }
}

[Buggy Hunk]
record.setExpiration(getSystemExpiration(expiration));

[Patch]
record.setExpiration(expiration);

[Demonstration 2]

[Buggy Method]
@Override
public void onSensorDataChanged(HeartRateData data) {
    System.out.println("HeartRate = " + data.hearRate);
}

[Buggy Hunk]
System.out.println("HeartRate = " + data.hearRate);

[Patch]
System.out.println("HeartRate = " + data.heartRate);

[Demonstration 3]

[Buggy Method]
public void run() {
    // output header
    this.outputHeader();
    // initialize sets
    Set<PrintConstraint> removeSet = new HashSet<>();
    Set<PrintConstraint> processedSet = new HashSet<>();
    Set<PrintConstraint> ends = new HashSet<>();
    Set<PrintConstraint> roots = new HashSet<>();
    int maxId = 0;
    // populate root and end sets
    for (PrintConstraint constraint : graph.vertexSet()) {
        // if no in paths, node is a root node
        if (graph.inDegreeOf(constraint) == 0) {
            roots.add(constraint);
        }
        // if no out paths, node is an end node
        if (graph.outDegreeOf(constraint) == 0) {
            ends.add(constraint);
        }
        // update max id if necessary
        if (constraint.getId() > maxId) {
            maxId = constraint.getId();
        }
    }
    // set max id in parser
    this.parser.setMaxGraphId(maxId);
    // create priority queue structure for topological iteration
    Queue<PrintConstraint> queue = new PriorityQueue<>(new PrintConstraintComparator());
    // create topological iterator for graph
    TopologicalOrderIterator<PrintConstraint, SymbolicEdge> iterator = new TopologicalOrderIterator<>(this.graph, queue);
    // while processing constraints in topological order
    while (iterator.hasNext()) {
        // get constraint
        PrintConstraint constraint = iterator.next();
        // initialize constraint source map
        Map<String, Integer> sourceMap = new HashMap<>();
        // for each incoming edge of the constraint
        for (SymbolicEdge edge : graph.incomingEdgesOf(constraint)) {
            // get the source constraint
            PrintConstraint source = (PrintConstraint) edge.getASource();
            // add the edge type and source id to the source map
            sourceMap.put(edge.getType(), source.getId());
        }
        // set the constraint source map
        constraint.setSourceMap(sourceMap);
        // if constraint is an end node
        if (ends.contains(constraint)) {
            // add end
            boolean isBoolFunc = parser.addEnd(constraint);
            if (isBoolFunc) {
                this.calculateStats(constraint);
            }
        } else if (roots.contains(constraint)) {
            // add root
            parser.addRoot(constraint);
        } else {
            // add operation
            parser.addOperation(constraint);
        }
    }
    // shut down solver
    solver.shutDown();
}

[Buggy Hunk]
new PriorityQueue<>(new PrintConstraintComparator());

[Patch]
new PriorityQueue<>(0, new PrintConstraintComparator());