[Demonstration 1]

[Buggy Method]
public static ArrayList<Object> getObjects(int userId) {
    String query = "SELECT * FROM object WHERE userId = ?";
    ArrayList<Object> result = new ArrayList<Object>();
    try {
        PreparedStatement ps = con.prepareStatement(query);
        ps.setString(1, "" + userId);
        ResultSet rs = ps.executeQuery();
        while (rs.next()) {
            Object temp = new Object(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getString(4));
            result.add(temp);
        }
    } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return result;
}

[Buggy Hunk]
Object temp = new Object(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getString(4));

[Patch]
object temp = new object(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getString(4));

[Demonstration 2]

[Buggy Method]
@Override
public Answer mapRow(ResultSet rs, int rowNum) throws SQLException {
    Answer answer = new Answer();
    answer.setId(answerId.getValue(rs));
    answer.setId(questionId.getValue(rs));
    answer.setUserId(userId.getValue(rs));
    answer.setImageIds(imageIds.getValue(rs));
    answer.setContent(content.getValue(rs));
    answer.setCommonState(CommonState.valueByIndex(state.getValue(rs)));
    answer.setCreateAtMs(createAtMs.getValue(rs));
    answer.setUpdateAtMs(updateAtMs.getValue(rs));
    answer.setProperties(extInfo.getValue(rs));
    return answer;
}

[Buggy Hunk]
answer.setId(questionId.getValue(rs));

[Patch]
answer.setQuestionId(questionId.getValue(rs));

[Demonstration 3]

[Buggy Method]
private static String buildNshEntryKey(final Long nsp, final Short nsi) {
    return new String("nsh_entry_" + nsp.toString() + "_" + nsi.toString());
}

[Buggy Hunk]
return new String("nsh_entry_" + nsp.toString() + "_" + nsi.toString());

[Patch]
return "nsh_entry_" + nsp + "_" + nsi;