[Demonstration 1]

[Buggy Method]
public void repeat(View view) {
    /*get button*/
    ImageButton bt = (ImageButton) findViewById(R.id.loop_song);
    ;
    /*Check if is repeating or not*/
    if (isRepeating) {
        bt.setImageResource(R.mipmap.repeat_not_active);
    } else {
        bt.setImageResource(R.mipmap.repeat_active);
    }
    isRepeating = !isRepeating;
}

[Buggy Hunk]
ImageButton bt = (ImageButton) findViewById(R.id.loop_song);;

[Patch]
ImageButton bt = (ImageButton) findViewById(R.id.loop_song);

[Demonstration 2]

[Buggy Method]
private static Retrofit getRetrofitBuilder() {
    if (retrofit == null) {
        retrofit = new Retrofit.Builder().baseUrl(BugUtil.getUrl(Api.BASE_URL)).client(getClient()).addConverterFactory(GsonConverterFactory.create()).build();
    }
    return retrofit;
}

[Buggy Hunk]
.baseUrl(BugUtil.getUrl(Api.BASE_URL))

[Patch]
.baseUrl(BugUtil.getUrl(Api.BASE_URL_NEW))

[Demonstration 3]

[Buggy Method]
@Override
public Algorithm call() throws Exception {
    int populationSize = (int) properties.getDouble("populationSize", 600);
    int maxEvaluations = (int) properties.getDouble("maxEvaluations", 10000);
    Population referencePopulation = PopulationIO.readObjectives(new File(savePath + File.separator + "ref.obj"));
    Instrumenter instrumenter = new Instrumenter().withFrequency(5).withReferenceSet(new NondominatedPopulation(referencePopulation)).attachHypervolumeJmetalCollector(new Solution(new double[] { 2.0, 2.0 })).attachElapsedTimeCollector();
    InstrumentedAlgorithm instAlgorithm = instrumenter.instrument(alg);
    // run the executor using the listener to collect results
    System.out.println("Starting " + alg.getClass().getSimpleName() + " on " + alg.getProblem().getName() + " with pop size: " + populationSize);
    alg.step();
    long startTime = System.currentTimeMillis();
    HashMap<BitSet, Solution> allSolutions = new HashMap();
    Population initPop = ((AbstractEvolutionaryAlgorithm) alg).getPopulation();
    for (int i = 0; i < initPop.size(); i++) {
        allSolutions.put(((InstrumentAssignmentArchitecture) initPop.get(i)).getBitString(), initPop.get(i));
    }
    while (!instAlgorithm.isTerminated() && (instAlgorithm.getNumberOfEvaluations() < maxEvaluations)) {
        if (instAlgorithm.getNumberOfEvaluations() % 500 == 0) {
            System.out.println("NFE: " + instAlgorithm.getNumberOfEvaluations());
            System.out.print("Popsize: " + ((AbstractEvolutionaryAlgorithm) alg).getPopulation().size());
            System.out.println("  Archivesize: " + ((AbstractEvolutionaryAlgorithm) alg).getArchive().size());
        }
        instAlgorithm.step();
    }
    Population allpop = new Population();
    Iterator<BitSet> iter = allSolutions.keySet().iterator();
    while (iter.hasNext()) {
        allpop.add(allSolutions.get(iter.next()));
    }
    alg.terminate();
    long finishTime = System.currentTimeMillis();
    System.out.println("Done with optimization. Execution time: " + ((finishTime - startTime) / 1000) + "s");
    String filename = savePath + File.separator + alg.getClass().getSimpleName() + "_" + name;
    ResultIO.saveSearchMetrics(instAlgorithm, filename);
    ResultIO.savePopulation(((AbstractEvolutionaryAlgorithm) alg).getPopulation(), filename);
    ResultIO.saveObjectives(instAlgorithm.getResult(), filename);
    if (alg instanceof IAOS) {
        IAOS algAOS = (IAOS) alg;
        if (properties.getBoolean("saveQuality", false)) {
            IOQualityHistory ioqh = new IOQualityHistory();
            ioqh.saveHistory(algAOS.getQualityHistory(), savePath + File.separator + name + ".credit", ",");
        }
        if (properties.getBoolean("saveCredits", false)) {
            IOCreditHistory ioch = new IOCreditHistory();
            ioch.saveHistory(algAOS.getCreditHistory(), savePath + File.separator + name + ".credit", ",");
        }
        if (properties.getBoolean("saveSelection", false)) {
            IOSelectionHistory iosh = new IOSelectionHistory();
            iosh.saveHistory(algAOS.getSelectionHistory(), savePath + File.separator + name + ".hist", ",");
        }
    }
    return alg;
}

[Buggy Hunk]
public Algorithm call() throws Exception {

[Patch]
public Algorithm call() throws IOException  {