[Demonstration 1]

[Buggy Method]
public static Collection<Annotation> getAnnotations(PropertyReference propertyReference) {
    PropertyReference finalReference = Beans.getFinalProperty(propertyReference);
    Field field = findField(finalReference);
    Method getter = findReadMethod(finalReference);
    Set<Annotation> annotations = new HashSet<Annotation>();
    annotations.addAll(Arrays.asList(getAnnotations(field)));
    annotations.addAll(Arrays.asList(getAnnotations(getter)));
    return annotations;
}

[Buggy Hunk]
Set<Annotation> annotations = new HashSet<Annotation>();

[Patch]
Set<Annotation> annotations = new HashSet<>();

[Demonstration 2]

[Buggy Method]
@Override
public Direction getNextMove(Snake yourSnake, GameState gameState) {
    this.startTime = System.currentTimeMillis();
    gameTurns++;
    this.self = yourSnake;
    this.state = gameState;
    this.growthFrequency = state.getMetadata().getGrowthFrequency();
    this.maximumThinkingTime = gameState.getMetadata().getMaximumThinkingTime();
    this.fruitQueue = rankFruits(gameState.getFruits());
    this.boardArea = getBoardArea();
    System.out.println(fruitQueue.size());
    Deque<Direction> path = getPath(self.getHeadPosition());
    System.out.println(path.size());
    Iterator<Direction> iter = path.iterator();
    while (iter.hasNext()) System.out.print(iter.next() + " ");
    if (path.isEmpty())
        return self.getCurrentDirection();
    System.out.println("Turning to " + path.peek() + " from " + yourSnake.getHeadPosition() + "\n");
    return path.pop();
}

[Buggy Hunk]
Deque<Direction> path = getPath(self.getHeadPosition());

[Patch]
Deque<Direction> path = getPath(self.getHeadPosition(), self.getCurrentDirection());

[Demonstration 3]

[Buggy Method]
public void setMaxLength(int maxLength) {
    this.maxLength = maxLength;
}

[Buggy Hunk]
public void setMaxLength(int maxLength) {

[Patch]
void setMaxLength(int max) {