[Demonstration 1]

[Buggy Method]
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
    //Log.d(TAG, "signInWithEmail:onComplete:" + task.isSuccessful());
    // If sign in fails, display a message to the user. If sign in succeeds
    // the auth state listener will be notified and logic to handle the
    // signed in user can be handled in the listener.
    if (!task.isSuccessful()) {
        //Log.w(TAG, "signInWithEmail", task.getException());
        Toast.makeText(LoginScreen.this, "Authentication failed.", Toast.LENGTH_SHORT).show();
    } else {
        Intent intent = new Intent(LoginScreen.this, MainActivity.class);
        startActivity(intent);
    }
    // ...
}

[Buggy Hunk]
Intent intent = new Intent(LoginScreen.this, MainActivity.class);

[Patch]
Intent intent = new Intent(LoginScreen.this, Goals.class);

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    LOG.info("Starting Application");
    String filePath = "/home/vishnu/projects/ml-sample/ml-sample/src/main/resources/dataSource/arduino.stackexchange.com/Posts.xml";
    LoadFile.processFile(filePath, dataSource);
    LOG.info(" posts for arduino " + dataSource.getPostsForTag("arduino").size());
    RestExpress server = null;
    try {
        server = initializeServer(args);
        LOG.info("Awaiting Server Shutdown .......");
        server.awaitShutdown();
        LOG.info("Server Is Shutting Down .......");
    } catch (IOException e) {
        LOG.info(e.getMessage());
    }
}

[Buggy Hunk]
LoadFile.processFile(filePath,dataSource);

[Patch]
LoadFile.processPostsFile(filePath, dataSource);

[Demonstration 3]

[Buggy Method]
@Override
public HealthCheck.Result check() {
    switch(runState) {
        case RUNNING:
            return HealthCheck.Result.healthy(runState.toString());
        default:
            return HealthCheck.Result.unhealthy(runState.toString());
    }
}

[Buggy Hunk]
return HealthCheck.Result.healthy(runState.toString());

[Patch]
return HealthCheck.Result.healthy(produceHealthCheckSummary());