[Demonstration 1]

[Buggy Method]
public Parameter read(Optional<String> propertyName, Map<String, Object> properties) throws SwaggerException {
    String name = (String) properties.get("name");
    String in = (String) properties.get("in");
    String description = (String) properties.get("description");
    Map<String, Object> schemaProperties = readInnerMap(propertyName, properties, "schema", false);
    if (schemaProperties == null) {
        schemaProperties = properties;
    }
    SchemaReader schemaReader = new SchemaReader();
    Schema schema = schemaReader.read(propertyName, schemaProperties);
    Boolean required = (Boolean) properties.get("required");
    if (required == null) {
        required = false;
    }
    return new Parameter(name, in, description, schema, required);
}

[Buggy Hunk]
Schema schema = schemaReader.read(propertyName, schemaProperties);

[Patch]
Schema schema = schemaReader.read(propertyName, Optional.empty(), schemaProperties);

[Demonstration 2]

[Buggy Method]
public Map<String, Class<?>> compileAll() throws Exception {
    Collection<SourceCode> compilationUnits = clazzCode.values();
    CompiledCode[] code;
    code = new CompiledCode[compilationUnits.size()];
    Iterator<SourceCode> iter = compilationUnits.iterator();
    for (int i = 0; i < code.length; i++) {
        code[i] = new CompiledCode(iter.next().getClassName());
    }
    ExtendedStandardJavaFileManager fileManager = new ExtendedStandardJavaFileManager(javac.getStandardFileManager(null, null, null), classLoader, code);
    JavaCompiler.CompilationTask task = javac.getTask(null, fileManager, null, null, null, compilationUnits);
    boolean result = task.call();
    if (!result)
        throw new RuntimeException("Unknown error during compilation.");
    Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
    for (String className : clazzCode.keySet()) {
        classes.put(className, classLoader.loadClass(className));
    }
    return classes;
}

[Buggy Hunk]
javac.getStandardFileManager(null, null, null), classLoader, code);

[Patch]
javac.getStandardFileManager(null, null, null), classLoader);

[Demonstration 3]

[Buggy Method]
@Override
public int getValue(BotThread thread) {
    return getVar(thread).read();
}

[Buggy Hunk]
return getVar(thread).read();

[Patch]
return getVar(thread).read(thread);