[Demonstration 1]

[Buggy Method]
@Override
public int getValueCardinality() {
    return matched.size();
}

[Buggy Hunk]
return matched.size();

[Patch]
return selector.getValueCardinality();

[Demonstration 2]

[Buggy Method]
private Stream<Path> getMatchingPaths(String argument) {
    final Path workingDirectory = executionContext.getWorkingDirectory().asPath().toAbsolutePath();
    try {
        if (argument.isEmpty()) {
            return Files.list(workingDirectory).map(p -> p.subpath(workingDirectory.getNameCount(), p.getNameCount()));
        } else {
            final Path path = Paths.get(argument);
            final Path absolutePath = getResolved(argument);
            final Stream<Path> stream;
            if (Files.exists(absolutePath)) {
                if (Files.isDirectory(absolutePath)) {
                    if (argument.endsWith(FILE_SEPARATOR)) {
                        stream = Files.list(absolutePath);
                    } else {
                        stream = Stream.of(absolutePath);
                    }
                } else {
                    stream = Stream.empty();
                }
            } else {
                stream = Files.list(absolutePath.getParent()).filter(p -> p.getFileName().toString().startsWith(absolutePath.getFileName().toString()));
            }
            if (path.isAbsolute() || absolutePath.getNameCount() == 0) {
                return stream;
            } else if (isDriveAbsolute(path)) {
                final Path driveRoot = Paths.get(FILE_SEPARATOR);
                return stream.map(p -> driveRoot.resolve(p.subpath(0, p.getNameCount())));
            } else {
                return stream.map(p -> p.subpath(workingDirectory.getNameCount(), p.getNameCount()));
            }
        }
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}

[Buggy Hunk]
stream = Stream.of(absolutePath);

[Patch]
stream = Files.list(absolutePath.getParent()).filter(p -> p.getFileName().toString().startsWith(absolutePath.getFileName().toString()));

[Demonstration 3]

[Buggy Method]
public static Rule forEachSite(final SiteRule siteRule) {
    return new Rule() {

        @Override
        boolean addToReport(Report report, Mesh mesh) {
            boolean matched = false;
            for (int site = 0; site < mesh.getSites().size(); site++) {
                Rule rule = siteRule.site(site);
                matched = matched || rule.addToReport(report, mesh);
            }
            return matched;
        }
    };
}

[Buggy Hunk]
matched = matched || rule.addToReport(report, mesh);

[Patch]
matched = rule.addToReport(report, mesh) || matched;