[Demonstration 1]

[Buggy Method]
private Plan findPlanIntoMap(PlansMap plansMap, int i) {
    Set keySet = plansMap.getPlansMap().keySet();
    Iterator iterator = keySet.iterator();
    Plan value = new Plan();
    for (int j = 0; j < i; j++) {
        if (iterator.hasNext()) {
            Object key = iterator.next();
            value = plansMap.getPlansMap().get(key);
        }
    }
    return value;
}

[Buggy Hunk]
for (int j=0; j < i; j++)

[Patch]
for (int j=0; j <= i; j++)

[Demonstration 2]

[Buggy Method]
public void paintComponent(Graphics g) {
    char[][] arr = c.getArr();
    for (int row = 0; row < numRows; row++) {
        for (int col = 0; col < numCols; col++) {
            char test = arr[row][col];
            pic[row][col] = getValueOf(test);
        }
    }
    for (int i = 0; i < numRows; i++) {
        for (int j = 0; j < numCols; j++) {
            int x = j * dim;
            int y = i * dim;
            if (pic[i][j] == UNWALKABLE || pic[i][j] == DIAMOND) {
                g.drawImage(GROUND, x, y, this.getWidth() / numRows, this.getHeight() / numCols, null);
                g.drawImage(pic[i][j], x, y, this.getWidth() / numRows, this.getHeight() / numCols, null);
            } else {
                g.drawImage(pic[i][j], x, y, this.getWidth() / numRows, this.getHeight() / numCols, null);
            }
        }
    }
}

[Buggy Hunk]
if(pic[i][j] == UNWALKABLE || pic[i][j] == DIAMOND){

[Patch]
if(pic[i][j] != GROUND){

[Demonstration 3]

[Buggy Method]
public boolean isOpen(int i, int j) {
    return grid[normalizeIndex(i, j)] == 1 && !quickUnionContainer.connected(0, quNormalizeIndex(i, j));
}

[Buggy Hunk]
return grid[normalizeIndex(i, j)] == 1 && !quickUnionContainer.connected(0, quNormalizeIndex(i, j));

[Patch]
return grid[normalizeIndex(i, j)] == 1;