[Demonstration 1]

[Buggy Method]
public void readLibraryConfig(String classpathResourcePath) throws IOException {
    URL url = ClassMapper.class.getClassLoader().getResource(classpathResourcePath);
    logger.info("LOADING " + url.toURI());
    InputStream is = url.openStream();
    if (is == null) {
        throw new IOException("library config not found: " + classpathResourcePath);
    }
    try {
        Properties p = new Properties();
        p.load(is);
        for (Map.Entry<Object, Object> entry : p.entrySet()) {
            String libraryIdStr = entry.getKey().toString();
            LibraryId libraryId;
            try {
                libraryId = new ShortLibraryId(Short.parseShort(libraryIdStr));
            } catch (NumberFormatException e) {
                libraryId = new LongLibraryId(libraryIdStr);
            }
            String className = entry.getValue().toString();
            try {
                Class<?> clazz = Class.forName(className);
                if (Library.class.isAssignableFrom(clazz)) {
                    Library library = clazz.asSubclass(Library.class).newInstance();
                    registerLibrary(libraryId, library.getClasses());
                } else {
                    throw new InvalidConfigException("Invalid ktserializer class isn't a library: " + clazz.getName());
                }
            } catch (ClassNotFoundException e) {
                throw new InvalidConfigException("Unable to find class: " + className + ": " + e.getMessage(), e);
            } catch (InstantiationException e) {
                throw new InvalidConfigException("Unable to instantiate class: " + className + ": " + e.getMessage(), e);
            } catch (IllegalAccessException e) {
                throw new InvalidConfigException("Unable to instantiate class: " + className + ": " + e.getMessage(), e);
            }
        }
    } finally {
        IOUtils.close(is);
    }
}

[Buggy Hunk]
logger.info("LOADING " + url.toURI());

[Patch]
logger.info("LOADING " + url);

[Demonstration 2]

[Buggy Method]
private String getAuth() {
    long NOW = System.currentTimeMillis();
    if (time < NOW) {
        auth = Utils.getJson(String.format("http://auth.smoothstreams.tv/hash_api.php?username=%s&password=%s&site=%s", username, password, service)).getAsJsonPrimitive("hash").getAsString();
        time = NOW + 14100000;
    }
    return auth;
}

[Buggy Hunk]
username, password, service)).getAsJsonPrimitive("hash").getAsString();

[Patch]
Utils.encoder(username), Utils.encoder(password), service)).getAsJsonPrimitive("hash").getAsString();

[Demonstration 3]

[Buggy Method]
@Override
public boolean removeTickets(Ticket ticket) {
    WebTarget webTarget = getClient().target(getBaseTargetUrl()).path("booking").path("delete");
    Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);
    Response response = invocationBuilder.post(Entity.entity(ticket, MediaType.APPLICATION_JSON));
    if (response.getStatus() == 400) {
        return false;
    }
    return true;
}

[Buggy Hunk]
if( response.getStatus() == 400 ) {

[Patch]
if( response.getStatus() != 200 ) {