[Demonstration 1]

[Buggy Method]
public static void main(String[] args) {
    // name of source files
    File[] files1 = new File[] { new File("src/JavaCompilerAST.java") };
    // access compile object
    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    // reading source files as java object (not ast's)
    StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
    Iterable<? extends JavaFileObject> sources = /* check fileManager.list(...) */
    fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files1));
    compiler.getTask(null, fileManager, null, null, null, sources).call();
    // Create the compilation task
    JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, null, null, null, sources);
    // invoke processor (to do whatever with ASTs).  for this case, only print method name
    Iterable<Processor> processors = Arrays.asList(new CodeAnalyzerProcessor());
    task.setProcessors(processors);
    ;
    task.call();
}

[Buggy Hunk]
Iterable<Processor> processors = Arrays.asList(new CodeAnalyzerProcessor());

[Patch]
Iterable<? extends Processor> processors = Arrays.asList(new CodeAnalyzerProcessor());

[Demonstration 2]

[Buggy Method]
public Integer getPracticeImageId() {
    return practiceImageId;
}

[Buggy Hunk]
return practiceImageId;

[Patch]
return DrawableMapper.getDrawableId(DrawableMapper.TypeOfImage.values()[practiceImageId]);

[Demonstration 3]

[Buggy Method]
public static void loadProperties() throws IOException {
    Properties prop = new Properties();
    prop.load(ClassLoader.getSystemResourceAsStream(OterStatics.PROPERTY_FILE));
    System.setProperty(OterStatics.PROPERTY_ANDROID_HOME, prop.getProperty(OterStatics.PROPERTY_ANDROID_HOME));
}

[Buggy Hunk]
prop.load(ClassLoader.getSystemResourceAsStream(OterStatics.PROPERTY_FILE));

[Patch]
prop.load(new FileInputStream(OterStatics.getConfigFileName()));