[Demonstration 1]

[Buggy Method]
public void loadMaps() {
    if (!mapsFile.exists()) {
        getLogger().info("file maps.yml NOT found, trying create!");
        mapsFile.getParentFile().mkdir();
        try {
            if (mapsFile.createNewFile()) {
                getLogger().info("maps.yml created successfully!");
            } else {
                getLogger().info("maps.yml NOT created!");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    mapsData = YamlConfiguration.loadConfiguration(mapsFile);
    for (String s : mapsData.getKeys(false)) {
        List<Float> spawnL = mapsData.getFloatList(s + ".spawn");
        float[] spawnF = new float[5];
        for (int i = 0; i < spawnF.length; i++) {
            spawnF[i] = spawnL.get(i);
        }
        String world = mapsData.getString(s + ".world");
        maps.add(new GravityMap(spawnF, world, s));
    }
}

[Buggy Hunk]
maps.add(new GravityMap(spawnF, world, s));

[Patch]
maps.add(new GravityMap(spawnF, Bukkit.getWorld(world), s));

[Demonstration 2]

[Buggy Method]
public CompilationUnitChange addCopyrightsHeader(final CompilationUnit compilationUnit) {
    final ICompilationUnit unit = (ICompilationUnit) compilationUnit.getJavaElement();
    change = new CompilationUnitChange(ADD_COPYRIGHT, unit);
    rewriter = ASTRewrite.create(compilationUnit.getAST());
    final ListRewrite listRewrite = rewriter.getListRewrite(compilationUnit.getPackage(), PackageDeclaration.ANNOTATIONS_PROPERTY);
    final Comment placeHolder = (Comment) rewriter.createStringPlaceholder(getCopyrightText(), ASTNode.BLOCK_COMMENT);
    listRewrite.insertFirst(placeHolder, null);
    rewriteCompilationUnit(unit, getNewUnitSource(unit, null));
    return change;
}

[Buggy Hunk]
final Comment placeHolder = (Comment) rewriter.createStringPlaceholder(getCopyrightText(),

[Patch]
final Comment placeHolder = (Comment) rewriter.createStringPlaceholder(getCopyrightText() + NEW_LINE_SEPARATOR,

[Demonstration 3]

[Buggy Method]
@Override
public boolean performOk() {
    boolean process = false;
    // offer to rebuild the workspace if the compiler preferences were modified
    if (this.compilerPreferencesModified) {
        IProject recompiledProject = null;
        if (this.isPropertyPage()) {
            recompiledProject = this.getElement().getAdapter(IProject.class);
        }
        if (Builders.promptRecompile(this.getShell(), recompiledProject)) {
            process = super.performOk();
        }
        this.compilerPreferencesModified = false;
    } else {
        process = super.performOk();
    }
    return process;
}

[Buggy Hunk]
recompiledProject = this.getElement().getAdapter(IProject.class);

[Patch]
recompiledProject = (IProject) this.getElement().getAdapter(IProject.class);