[Demonstration 1]

[Buggy Method]
public void notifyGrid() {
    grid.notifyGrid(fileDir.getFileSize(), true);
    resetFiles();
    grid.notifyDataSetChanged();
}

[Buggy Hunk]
grid.notifyGrid(fileDir.getFileSize(), true);

[Patch]
grid.notifyGrid(fileDir, true);

[Demonstration 2]

[Buggy Method]
public int[] getBottomRightCoord() {
    /*
		for(int r = 3; r >= 0; r--){
			for(int c = 3; c >= 0; c--){
				if(blocks[r][c]!=null){
					blocks[r][c]
				}
			}
		}
		*/
    if (gridLeftRow > gridRightRow) {
        return new int[] { this.gridLeftRow, this.gridLeftCol };
    } else
        return new int[] { this.gridRightRow, this.gridRightCol };
}

[Buggy Hunk]
return new int[]{this.gridLeftRow, this.gridLeftCol};

[Patch]
return new int[]{this.gridLeftRow, this.gridRightCol};

[Demonstration 3]

[Buggy Method]
public void launchSmallGrid() {
    anchorC.setDisable(true);
    anchorA.setDisable(false);
    initializeSmallGrid();
    grid = new SimGUI(3, 3);
    grid.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            Platform.runLater(new Runnable() {

                @Override
                public void run() {
                    guiTerminate();
                }
            });
        }
    });
    updateCells();
    setBestPosition();
    largeGrid = false;
}

[Buggy Hunk]
grid = new SimGUI(3, 3);

[Patch]
grid = new SimGUI(3, 3, this);