[Demonstration 1]

[Buggy Method]
public AppiumServiceBuilder appiumServerForAndroid(String deviceID, String methodName) throws Exception {
    System.out.println("**************************************************************************\n");
    System.out.println("Starting Appium Server to handle Android Device::" + deviceID + "\n");
    System.out.println("**************************************************************************\n");
    int port = ap.getPort();
    int chromePort = ap.getPort();
    int bootstrapPort = ap.getPort();
    int selendroidPort = ap.getPort();
    AppiumServiceBuilder builder = new AppiumServiceBuilder()./*.withAppiumJS(new File(prop.getProperty("APPIUM_JS_PATH")))*/
    withArgument(GeneralServerFlag.LOG_LEVEL, "info").withLogFile(new File(System.getProperty("user.dir") + "/target/appiumlogs/" + deviceID.replaceAll("\\W", "_") + "__" + methodName + ".txt")).withArgument(AndroidServerFlag.CHROME_DRIVER_PORT, Integer.toString(chromePort)).withArgument(AndroidServerFlag.BOOTSTRAP_PORT_NUMBER, Integer.toString(bootstrapPort)).withIPAddress("127.0.0.1").withArgument(GeneralServerFlag.SESSION_OVERRIDE).withArgument(AndroidServerFlag.SUPPRESS_ADB_KILL_SERVER).withArgument(AndroidServerFlag.SELENDROID_PORT, Integer.toString(selendroidPort)).usingPort(port);
    /* and so on */
    ;
    appiumDriverLocalService = builder.build();
    appiumDriverLocalService.start();
    return builder;
}

[Buggy Hunk]
new AppiumServiceBuilder()/*.withAppiumJS(new File(prop.getProperty("APPIUM_JS_PATH")))*/

[Patch]
new AppiumServiceBuilder().withAppiumJS(new File(prop.getProperty("APPIUM_JS_PATH")))

[Demonstration 2]

[Buggy Method]
@Override
public void run() {
    /*
			 * If the game is over there is no need to play.
			 */
    if (board.isGameOver() == true) {
        return;
    }
    /*
			 * Valid turn check.
			 */
    if (board.getTurn() % 2 != 1) {
        return;
    }
    /*
			 * Generate move.
			 */
    int[] move = bot.move(board.getCells(), Cell.Type.instanceOf(board.getTurn() % 2));
    /*
			 * Play move.
			 */
    boolean result = board.click(move[0], move[1]);
    if (result == true) {
        if (board.hasWinner() == true) {
            board.setGameOver();
        }
        board.next();
    }
    updateViews();
}

[Buggy Hunk]
int move[] = bot.move(board.getCells(), Cell.Type.instanceOf(board.getTurn() % 2));

[Patch]
int move[] = bot.move(board.getCells(), Cell.Type.play(board.getTurn()));

[Demonstration 3]

[Buggy Method]
@Override
protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests().antMatchers("/series/match").permitAll().anyRequest().authenticated().and().csrf().disable();
}

[Buggy Hunk]
.anyRequest().authenticated().and().csrf().disable();

[Patch]
.anyRequest().authenticated().and().httpBasic().and().csrf().disable();