[Demonstration 1]

[Buggy Method]
@Override
public void visit(Return irReturn) {
    if (irReturn.getValue() instanceof IndirectRegister) {
        PhysicalRegister register = PhysicalRegister.getBy16BITName("RAX", irReturn.getValue().getNumberSize());
        node.prepend(new Move(register, irReturn.getValue()));
        localRenameMap.put(irReturn.getValue(), register);
    }
}

[Buggy Hunk]
if (irReturn.getValue() instanceof IndirectRegister) {

[Patch]
if (irReturn.getValue() != null) {

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    // java 7 Automatic resource management
    try (GenericXmlApplicationContext appCtx = new GenericXmlApplicationContext()) {
        appCtx.getEnvironment().setActiveProfiles(Profiles.ACTIVE_DB, Profiles.DB_IMPLEMENTATION);
        appCtx.load("spring/spring-app.xml", "spring/spring-db.xml", "spring/spring-mvc.xml");
        appCtx.refresh();
        System.out.println(Arrays.toString(appCtx.getBeanDefinitionNames()));
        AdminRestController adminUserController = appCtx.getBean(AdminRestController.class);
        System.out.println(adminUserController.get(UserTestData.USER_ID));
        System.out.println(adminUserController.create(new User(1, "userName", "email", "password", Role.ROLE_ADMIN)));
        System.out.println();
        AbstractUserMealController mealController = appCtx.getBean(UserMealRestController.class);
        List<UserMealWithExceed> filteredMealsWithExceeded = mealController.getBetween(LocalDate.of(2015, Month.MAY, 30), LocalTime.of(7, 0), LocalDate.of(2015, Month.MAY, 31), LocalTime.of(11, 0));
        filteredMealsWithExceeded.forEach(System.out::println);
    }
}

[Buggy Hunk]
System.out.println(adminUserController.create(new User(1, "userName", "email", "password", Role.ROLE_ADMIN)));

[Patch]
System.out.println(adminUserController.create(new User(1, "userName", "email", "password", 1000,Role.ROLE_ADMIN)));

[Demonstration 3]

[Buggy Method]
public static void setCalcValue(String value) {
    //Here we see what the largest number of digits before the decimal is
    //and the largest number of digits after the decimal place is
    //Combine these two values together to get the total length we want out result to be
    if (value.length() > 1) {
        value = value.substring(0, roundingLengthBeforeDecimal + roundingLengthAfterDecimal);
    }
    calcText.setText(value);
}

[Buggy Hunk]
if(value.length() > 1){

[Patch]
if(value.length() >  roundingLengthBeforeDecimal + roundingLengthAfterDecimal){