[Demonstration 1]

[Buggy Method]
@Override
public GitChangeSetList parse(Run build, RepositoryBrowser<?> browser, File changelogFile) throws IOException, SAXException {
    Set<GitChangeSet> r = new LinkedHashSet<GitChangeSet>();
    // Parse the log file into GitChangeSet items - each one is a commit
    LineIterator lineIterator = null;
    try {
        lineIterator = FileUtils.lineIterator(changelogFile);
        return new GitChangeSetList(build, browser, parse(lineIterator));
    } finally {
        LineIterator.closeQuietly(lineIterator);
    }
}

[Buggy Hunk]
lineIterator = FileUtils.lineIterator(changelogFile);

[Patch]
lineIterator = FileUtils.lineIterator(changelogFile,"UTF-8");

[Demonstration 2]

[Buggy Method]
public void send(Packet packet) {
    try {
        socket.getOutputStream().write(packet.getBinary());
    } catch (IOException e) {
        if (packet instanceof PacketPing) {
            logger.log(Level.FINEST, "Could not send packet!", e);
        } else {
            logger.log(Level.WARNING, "Could not send packet!", e);
        }
    }
}

[Buggy Hunk]
logger.log(Level.WARNING, "Could not send packet!", e);

[Patch]
logger.log(Level.FINE, "Could not send packet!", e);

[Demonstration 3]

[Buggy Method]
public static ContentData resourceData(URL url) {
    String protocol = url.getProtocol();
    if ("file".equals(protocol)) {
        try {
            File file = new File(url.toURI());
            if (!file.isDirectory()) {
                return new FileContentData(file, file.length(), new Date((file.lastModified() / 1000) * 1000));
            }
        } catch (URISyntaxException e) {
            throw new UnreachableException(e);
        }
    } else if ("jar".equals(protocol)) {
        try {
            JarURLConnection connection = (JarURLConnection) url.openConnection();
            if (connection != null && isJarDirectory(connection)) {
                return new StreamContentData(connection.getInputStream(), connectionContentLength(connection), connectionLastModified(connection));
            }
        } catch (IOException e) {
            throw new FalteringEnvironmentException(e);
        }
    }
    return null;
}

[Buggy Hunk]
if (connection != null && isJarDirectory(connection)) {

[Patch]
if (connection != null && !isJarDirectory(connection)) {