Program: 152786
Project: 152786
Buggy source:
/** 
 * Performs a property check.
 * @param instance the instance on which the properties will be accessed.
 * @param type the class under test.
 * @param field the field to test.
 * @param the property to test.
 * @throws Exception thrown if any of the tests fail.
 */
private void testField(Object instance,Class<?> type,Field field,final String property) throws Exception {
  Method setter=this.getSetter(type,property,field.getType(),false);
  Method getter=this.getGetter(type,property,field.getType(),false);
  if (setter != null && getter != null) {
    Object value=this.getInstance(field.getType());
    setter.invoke(instance,value);
    TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,getter.invoke(instance));
  }
 else {
    if (setter != null) {
      Object value=this.getInstance(field.getType());
      setter.invoke(instance,value);
      field.setAccessible(true);
      TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,field.get(instance));
    }
    if (getter != null) {
      Object value=this.getInstance(field.getType());
      field.setAccessible(true);
      field.set(instance,value);
      TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,getter.invoke(instance));
    }
  }
}

Fixed version (ground truth):
/** 
 * Performs a property check.
 * @param instance the instance on which the properties will be accessed.
 * @param type the class under test.
 * @param field the field to test.
 * @param the property to test.
 * @throws Exception thrown if any of the tests fail.
 */
private void testField(Object instance,Class<?> type,Field field,final String property) throws Exception {
  Method setter=this.getSetter(type,property,field.getType(),false);
  Method getter=this.getGetter(type,property,field.getType(),false);
  if (setter != null && getter != null) {
    Object value=this.getInstance(field.getType());
    setter.invoke(instance,value);
    TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,getter.invoke(instance));
    if (!field.getType().isPrimitive()) {
      setter.invoke(instance,field.getType().cast(null));
      TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",null,getter.invoke(instance));
    }
  }
 else {
    if (setter != null) {
      Object value=this.getInstance(field.getType());
      field.setAccessible(true);
      setter.invoke(instance,value);
      TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,field.get(instance));
      if (!field.getType().isPrimitive()) {
        setter.invoke(instance,field.getType().cast(null));
        TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",null,field.get(instance));
      }
    }
    if (getter != null) {
      Object value=this.getInstance(field.getType());
      field.setAccessible(true);
      field.set(instance,value);
      TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",value,getter.invoke(instance));
      if (!field.getType().isPrimitive()) {
        field.set(instance,null);
        TestCase.assertEquals("String_Node_Str" + field.getName() + "String_Node_Str",null,getter.invoke(instance));
      }
    }
  }
}