[Demonstration 1]

[Buggy Method]
public static ImageIcon loadImageIconFromClass(String string) {
    try {
        return new ImageIcon(ImageIO.read(ActionHandler.class.getResource(string)));
    } catch (IOException e2) {
        e2.printStackTrace();
    } catch (IllegalArgumentException e2) {
        e2.printStackTrace();
    }
    return null;
}

[Buggy Hunk]
} catch (IllegalArgumentException e2) {

[Patch]
} catch (java.lang.IllegalArgumentException e2) {

[Demonstration 2]

[Buggy Method]
public List<Recipe> searchRecipe(String name) {
    // List of search results to be returned
    List<Recipe> searchResults = null;
    // Iterates through recipeList entries one by one
    for (Map.Entry<String, Recipe> recipe : this.recipeList.entrySet()) {
        // If the key contains or is equal to the "name" being searched
        // Add it to the list of search results
        if (recipe.getKey().contains(name) | recipe.getKey().equals(name)) {
            searchResults.add(recipe.getValue());
        }
    }
    //TODO - Idk if the if statement below is necessary, because we could just say
    // in main that if searchResults returns empty then display a message to the
    // user to say that there were no matches.
    // In case of no matches, this adds a recipe with title "No matches found."
    // so that it can be displayed to the user
    if (searchResults.isEmpty()) {
        Recipe nameNotFound = null;
        nameNotFound.name = "No matches found.";
        searchResults.add(nameNotFound);
    }
    // Returns list of recipes containing the search name
    return searchResults;
}

[Buggy Hunk]
List<Recipe> searchResults = null;

[Patch]
List<Recipe> searchResults = new ArrayList<Recipe>();

[Demonstration 3]

[Buggy Method]
public void getPersonalInformation() {
    ParseObject user = new ParseObject("User");
    user.put("nombre", input_datos_personales_nombre.getText().toString());
    user.put("edad", Integer.parseInt(input_datos_personales_edad.getText().toString()));
    user.put("peso", Double.parseDouble(input_datos_personales_peso.getText().toString()));
    user.put("talla", Double.parseDouble(input_datos_personales_talla.getText().toString()));
    Log.d("Object", user.toString());
    user.pinInBackground();
}

[Buggy Hunk]
ParseObject user = new ParseObject("User");

[Patch]
user = new ParseObject("User");