[Demonstration 1]

[Buggy Method]
public HashMap<String, Integer> checkRow(ArrayList<String> datas) {
    HashMap<String, Integer> result = null;
    int first = 0, second = 0, third = 0;
    for (String data : datas) {
        if (Integer.parseInt(data.substring(1)) != 0) {
            if (Integer.parseInt(data.substring(1)) % 3 == 1) {
                first += 1;
            } else if (Integer.parseInt(data.substring(1)) % 3 == 2) {
                second += 1;
            } else {
                third += 1;
            }
        }
    }
    result.put("First", first);
    result.put("Second", second);
    result.put("Third", third);
    return result;
}

[Buggy Hunk]
HashMap<String, Integer> result = null;

[Patch]
HashMap<String, Integer> result = new HashMap<String, Integer>();

[Demonstration 2]

[Buggy Method]
public static ArrayList<ProductModel> select() {
    ArrayList al = new ArrayList();
    try {
        Class.forName("com.mysql.jdbc.Driver");
    } catch (Exception e) {
        System.out.println(e);
    }
    Connection con = null;
    Statement st = null;
    try {
        con = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_db", "root", "ananda");
    } catch (Exception e) {
        System.out.println(e);
    }
    String sql = "select * from product";
    try {
        st = con.createStatement();
        ResultSet rs = st.executeQuery(sql);
        while (rs.next()) {
            al.add(new ProductModel(rs.getInt("product_id"), rs.getString("product_name"), rs.getInt("product_price")));
        }
    } catch (Exception e) {
        System.out.println(e);
    }
    return al;
}

[Buggy Hunk]
al.add(new ProductModel(rs.getInt("product_id"),rs.getString("product_name"),rs.getInt("product_price")));

[Patch]
al.add(new ProductModel(rs.getInt("product_id"),rs.getString("product_name"),rs.getInt("product_price"),rs.getString("product_tag")));

[Demonstration 3]

[Buggy Method]
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(taskId);
    dest.writeString(name);
    dest.writeInt(groupId);
    dest.writeString(description);
    dest.writeString(status);
    dest.writeString(location);
    dest.writeInt(creatorId);
    dest.writeLong(startTime.getTime());
    dest.writeLong(endTime.getTime());
    dest.writeByteArray(img);
}

[Buggy Hunk]
public void writeToParcel(Parcel dest, int flags) {

[Patch]
public void writeToParcel(Parcel dest, int i) {