[Demonstration 1]

[Buggy Method]
public StudentMap getStudentsByUnit(final String uc) {
    StudentMap sm = um.get(uc);
    if (sm != null) {
        return sm;
    }
    sm = new StudentMap();
    IStudent is;
    StudentUnitRecordList ur = StudentUnitRecordManager.instance().getRecordsByUnit(uc);
    for (IStudentUnitRecord studentUnitRecord : ur) {
        is = createStudentProxy(new Integer(studentUnitRecord.getStudentID()));
        sm.put(is.getID(), is);
    }
    um.put(uc, sm);
    return sm;
}

[Buggy Hunk]
is = createStudentProxy(new Integer(studentUnitRecord.getStudentID()));

[Patch]
is = createStudentProxy(Integer.valueOf(studentUnitRecord.getStudentID()));

[Demonstration 2]

[Buggy Method]
@Override
public Map<String, AjaxFormResult> getCodeTypeByTypes(String[] types, String locale) {
    List<CodeType> codes = dao.findByCodeType(types, locale);
    Map<String, AjaxFormResult> m = new LinkedHashMap<String, AjaxFormResult>();
    for (CodeType c : codes) {
        String type = c.getCodeType();
        AjaxFormResult sm = m.get(type);
        if (sm == null) {
            sm = new AjaxFormResult();
        }
        sm.set(c.getCodeValue(), c.getCodeDesc());
        m.put(type, sm);
    }
    return m;
}

[Buggy Hunk]
sm = new AjaxFormResult();

[Patch]
sm = new AjaxFormResult(true);

[Demonstration 3]

[Buggy Method]
private synchronized void sendAckLessMessage(String message) {
    printWriter.println(message);
    printWriter.flush();
}

[Buggy Hunk]
private synchronized void sendAckLessMessage(String message)

[Patch]
private void sendAckLessMessage(String message)