[Demonstration 1]

[Buggy Method]
public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    int count = selection.size();
    int deleted = 1;
    monitor.beginTask("deleting #" + deleted + " of " + count + " markers.", count);
    for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
        IMarker marker = (IMarker) iter.next();
        try {
            marker.delete();
            monitor.worked(1);
            deleted++;
            monitor.setTaskName("deleting #" + deleted + " of " + count + " markers.");
        } catch (CoreException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    monitor.done();
}

[Buggy Hunk]
public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {

[Patch]
public void execute(IProgressMonitor monitor) {

[Demonstration 2]

[Buggy Method]
public void setPages(String strPages) throws PageException {
    if (StringUtil.isEmpty(strPages))
        return;
    if (pages == null)
        pages = new HashSet();
    PDFUtil.parsePageDefinition(pages, strPages);
}

[Buggy Hunk]
pages=new HashSet();

[Patch]
pages=new HashSet<Integer>();

[Demonstration 3]

[Buggy Method]
private static List<String> writeFiles(State state, boolean isLibrary, String baseDirectory, Set<String> directoriesToSkip, Map<String, String> decodedFiles) throws JVMIOException {
    List<String> filesWritten = new ArrayList<>(decodedFiles.size());
    for (Entry<String, String> decodedFile : decodedFiles.entrySet()) {
        String filePath = decodedFile.getKey();
        if (isExcluded(filePath, directoriesToSkip)) {
            continue;
        }
        filePath = filePath.replaceAll("/", File.separator);
        String nameOfFileToWrite;
        if (isLibrary) {
            nameOfFileToWrite = state.filterLibraryName(filePath);
        } else {
            if (baseDirectory != null) {
                filePath = baseDirectory + File.separator + filePath;
            }
            nameOfFileToWrite = state.filterFileName(filePath);
        }
        File fileToWrite = new File(nameOfFileToWrite);
        if (fileToWrite.getParentFile() != null) {
            //noinspection ResultOfMethodCallIgnored
            fileToWrite.getParentFile().mkdirs();
        }
        try (FileOutputStream outputStream = new FileOutputStream(fileToWrite);
            OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream);
            BufferedWriter writer = new BufferedWriter(outputStreamWriter)) {
            writer.write(decodedFile.getValue());
        } catch (IOException e) {
            throw new JVMIOException("Could not write files.", e);
        }
        filesWritten.add(nameOfFileToWrite);
    }
    return filesWritten;
}

[Buggy Hunk]
filePath = filePath.replaceAll("/", File.separator);

[Patch]
filePath = filePath.replace("/", File.separator);