[Demonstration 1]

[Buggy Method]
protected void prepareStatistics() {
    // Load statistics
    PACStatistics statistics = PACUtils.getStatisticsFile(this, domain.getClass());
    // 1. Process the statistics
    // Building the PDF (  cost -> prob. that optimal is less than or equal to cost)
    SortedMap<Double, Double> costToCDF = computeCDF(statistics);
    // Dump statistics (for DEBUG)
    dumpCDFToFile(DomainExperimentData.get(domain.getClass(), RunType.TRAIN).outputPath + this.getClass().getSimpleName() + "-statistics.csv", costToCDF);
    // Compute threshold
    threshold = this.computeThreshold(epsilon, delta, costToCDF);
    logger.info("Threshold is set to " + this.threshold);
}

[Buggy Hunk]
logger.info("Threshold is set to " + this.threshold);

[Patch]
logger.info("Threshold for epsilon="+epsilon+" and delta="+delta+" is set to " + this.threshold);

[Demonstration 2]

[Buggy Method]
private void spawnEntity(Genders gender) {
    World world = this.location.getExtent();
    Vector3i spawnPosition = this.getPreparedPosition();
    Entity entity = world.createEntity(this.entityType, spawnPosition);
    Cause cause = Cause.source(EntitySpawnCause.builder().entity(entity).type(SpawnTypes.BREEDING).build()).build();
    if (!gender.equals(Genders.RANDOM)) {
        ((EntityGendered) entity).setGender(gender);
    }
    ((EntityBurrowed) entity).setBurrow(this.burrowId, this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
    world.spawnEntity(entity, cause);
}

[Buggy Hunk]
.entity(entity).type(SpawnTypes.BREEDING).build()).build();

[Patch]
.entity(entity).type(SpawnTypes.PLUGIN).build()).build();

[Demonstration 3]

[Buggy Method]
@Test
public void testSetJFrame_withNullJFrame() {
    builder.setJFrame(null);
    Assert.assertEquals(null, builder.getFrame());
}

[Buggy Hunk]
builder.setJFrame(null);

[Patch]
builder.setFrame(null);