[Demonstration 1]

[Buggy Method]
@Override
public void execute(String SQL) {
    try {
        stat.execute(SQL);
    } catch (Exception e) {
        DbUtils.rollback(conn);
        throw new RuntimeException(SQL, e);
    }
}

[Buggy Hunk]
try {

[Patch]
try (Statement stat = conn.createStatement()) {

[Demonstration 2]

[Buggy Method]
@Override
public void run() {
    for (Brewery brew : breweries) {
        if (!images.containsKey(brew.getBreweryImgUrl())) {
            images.put(brew.getBreweryImgUrl(), new Image(brew.getBreweryImgUrl()));
        }
    }
}

[Buggy Hunk]
if (!images.containsKey(brew.getBreweryImgUrl())) {

[Patch]
if (brew.getBreweryImgUrl() != null && !images.containsKey(brew.getBreweryImgUrl())) {

[Demonstration 3]

[Buggy Method]
private void saveProperties() {
    if (null != properties) {
        // TODO: Make the stream a final constant
        try (FileOutputStream out = new FileOutputStream(jiveUserName + ".properties")) {
            properties.store(out, jiveUserName + " properties");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    } else {
        System.out.println("Properties not loaded");
    }
}

[Buggy Hunk]
try (FileOutputStream out = new FileOutputStream(jiveUserName + ".properties")) {

[Patch]
try (FileOutputStream out = new FileOutputStream(propertyFile)) {