[Demonstration 1]

[Buggy Method]
@Override
public void serialize(TypeToken<?> type, PunishmentLength obj, ConfigurationNode value) throws ObjectMappingException {
    // Handle simple cases - since these return "longs"
    if (obj.duration.toDays() > 0) {
        value.setValue(obj.duration.toDays() + "d");
    } else if (obj.duration.toHours() > 0) {
        value.setValue(obj.duration.toDays() + "h");
    } else if (obj.duration.toMinutes() > 0) {
        value.setValue(obj.duration.toMinutes() + "m");
    } else {
        value.setValue("0d");
    }
}

[Buggy Hunk]
value.setValue(obj.duration.toDays() + "h");

[Patch]
value.setValue(obj.duration.toHours() + "h");

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    Serializator<CodingBatTaskContainer> serializator = new AppDataStandartJavaSerializator<>();
    InitDataProcessor dataProcessor = new InitDataProcessor(serializator);
    CodingBatTaskContainer codingBatTaskContainer = dataProcessor.getContainer();
    SimpleTaskService simpleTaskService = new SimpleTaskServiceImpl(new SimpleTaskDaoImpl(codingBatTaskContainer));
    try {
        List<CodingBatTask> taskList = simpleTaskService.getAll();
        taskList.stream().forEach(System.out::print);
        // java 8, streams, lambda -> (reference to method)
    } catch (AppException e) {
        e.printStackTrace();
    }
    try {
        System.out.println(simpleTaskService.getTask("1"));
    } catch (AppException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
taskList.stream().forEach(System.out::print);

[Patch]
taskList.stream().forEach(System.out::println);