[Demonstration 1]

[Buggy Method]
public void submitSecF(View v) {
    Toast.makeText(this, "Processing Section F", Toast.LENGTH_SHORT).show();
    if (formValidation()) {
        SaveDraft();
        if (UpdateDB()) {
            Toast.makeText(this, "Starting Section G", Toast.LENGTH_SHORT).show();
            Intent secG = new Intent(this, SectionAActivity.class);
            startActivity(secG);
        } else {
            Toast.makeText(this, "Failed to Update Database!", Toast.LENGTH_SHORT).show();
        }
    }
}

[Buggy Hunk]
Intent secG = new Intent(this, SectionAActivity.class);

[Patch]
Intent secG = new Intent(this, SectionGActivity.class);

[Demonstration 2]

[Buggy Method]
public void processedTargetFile(File source) throws Exception {
    String newDestinationPath = source.getAbsolutePath();
    String replacDir = GlobalConfig.projectGroup.replaceAll("\\.", Matcher.quoteReplacement(Matcher.quoteReplacement(File.separator)));
    newDestinationPath = newDestinationPath.replaceAll("com" + Matcher.quoteReplacement(File.separator) + "ly" + Matcher.quoteReplacement(File.separator) + "gproject" + Matcher.quoteReplacement(File.separator) + "example", replacDir + Matcher.quoteReplacement(File.separator) + GlobalConfig.projectName);
    newDestinationPath = newDestinationPath.replaceAll(sourceDir.getAbsolutePath(), targetDir.getAbsolutePath());
    newDestinationPath = newDestinationPath.replaceAll(Matcher.quoteReplacement(File.separator) + "example", Matcher.quoteReplacement(File.separator) + GlobalConfig.projectName);
    newDestinationPath = additionProcessDestinationPath(sourceDir, targetDir, source, newDestinationPath);
    if (!source.getAbsolutePath().endsWith(".vmtemp")) {
        FileUtils.copyFile(source, new File(newDestinationPath));
    } else {
        // 删除vm后最为默认文件名
        String newName = StringUtils.removeEndIgnoreCase(newDestinationPath, ".vmtemp");
        processBeGeneratedFileName(source, newName);
    }
    //        FileUtils.forceDeleteOnExit(new File(destination.getAbsolutePath()));
}

[Buggy Hunk]
newDestinationPath = newDestinationPath.replaceAll(sourceDir.getAbsolutePath(), targetDir.getAbsolutePath());

[Patch]
newDestinationPath = newDestinationPath.replaceAll( Matcher.quoteReplacement(sourceDir.getAbsolutePath()), Matcher.quoteReplacement(targetDir.getAbsolutePath()));

[Demonstration 3]

[Buggy Method]
public void recordUncompressedFiles(ExtFile apkFile, Collection<String> uncompressedFilesOrExts) throws AndrolibException {
    try {
        Directory unk = apkFile.getDirectory();
        Set<String> files = unk.getFiles(true);
        String ext;
        for (String file : files) {
            if (isAPKFileNames(file) && !NO_COMPRESS_PATTERN.matcher(file).find()) {
                if (unk.getCompressionLevel(file) == 0) {
                    if (StringUtils.countMatches(file, ".") > 1) {
                        ext = file;
                    } else {
                        ext = FilenameUtils.getExtension(file);
                        if (ext.isEmpty()) {
                            ext = file;
                        }
                    }
                    if (!uncompressedFilesOrExts.contains(ext)) {
                        uncompressedFilesOrExts.add(ext);
                    }
                }
            }
        }
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}

[Buggy Hunk]
if (isAPKFileNames(file) && !NO_COMPRESS_PATTERN.matcher(file).find()) {

[Patch]
if (isAPKFileNames(file) && NO_COMPRESS_PATTERN.matcher(file).find()) {