[Demonstration 1]

[Buggy Method]
@Override
public Execution clone() {
    try {
        Execution execution = (Execution) super.clone();
        execution.setRefID(id());
        execution.setID(generateID());
        execution.setDKd(false);
        return execution;
    } catch (CloneNotSupportedException e) {
        LOG.error("Error: ", e);
        return null;
    }
}

[Buggy Hunk]
execution.setID(generateID());

[Patch]
execution.setId(generateID());

[Demonstration 2]

[Buggy Method]
public static long getTimeSlot() {
    Calendar now = Calendar.getInstance();
    long slot = (now.get(Calendar.HOUR_OF_DAY) * 12) + Math.round((double) now.get(Calendar.MINUTE) / 5.0);
    return slot;
}

[Buggy Hunk]
Math.round((double)now.get(Calendar.MINUTE) / 5.0);

[Patch]
now.get(Calendar.MINUTE) / 5;

[Demonstration 3]

[Buggy Method]
public static final Execution getExecution(Map<String, Object> map) {
    Execution execution = null;
    if (map != null && map.size() > 0) {
        Object o = map.get(TestLinkResponseParams.ID.toString());
        if (o != null) {
            Integer id = Integer.parseInt(o.toString());
            if (id > 0) {
                execution = new Execution();
                execution.setId(id);
                execution.setBuildId(getInteger(map, TestLinkResponseParams.BUILD_ID.toString()));
                execution.setTesterId(getInteger(map, TestLinkResponseParams.TESTER_ID.toString()));
                String statusText = getString(map, TestLinkResponseParams.STATUS.toString());
                ExecutionStatus status = ExecutionStatus.getExecutionStatus(statusText.charAt(0));
                execution.setStatus(status);
                execution.setTestPlanId(getInteger(map, TestLinkResponseParams.TEST_PLAN_ID.toString()));
                execution.setTestCaseVersionId(getInteger(map, TestLinkResponseParams.TEST_CASE_VERSION_ID.toString()));
                execution.setTestCaseVersionNumber(getInteger(map, TestLinkResponseParams.TEST_CASE_VERSION_NUMBER.toString()));
                Integer executionTypeText = getInteger(map, TestLinkResponseParams.EXECUTION_TYPE.toString());
                ExecutionType executionType = ExecutionType.getExecutionType(executionTypeText);
                execution.setExecutionType(executionType);
                execution.setNotes(getString(map, TestLinkResponseParams.NOTES.toString()));
                String timestamp = getString(map, TestLinkResponseParams.EXECUTION_TS.toString());
                if (StringUtils.isNotBlank(timestamp)) {
                    DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    try {
                        Date executionTimeStamp = df.parse(timestamp);
                        execution.setExecutionTimeStamp(executionTimeStamp);
                    } catch (ParseException e) {
                        LOG.log(Level.WARNING, "Failed to parse execution_ts: " + e.getMessage(), e);
                    }
                }
            }
        }
    }
    return execution;
}

[Buggy Hunk]
public static final Execution getExecution(Map<String, Object> map) {

[Patch]
public static Execution getExecution(Map<String, Object> map) {