Program: 19221
Project: 19221
Buggy source:
@Override public int compare(T o1,T o2){
  try {
    for (int n=0; n < properties.length; n++) {
      boolean ascending=true;
      String property=properties[n];
      if (property.startsWith("String_Node_Str")) {
        ascending=false;
        property=property.substring(1);
      }
      Class type=BeanUtil.getPropertyType(o1,property);
      Method getter1=BeanUtil.findGetter(o1.getClass(),property);
      if (getter1 == null) {
        throw new IllegalStateException(String.format("String_Node_Str",property,o1.getClass().getName()));
      }
      Method getter2=BeanUtil.findGetter(o2.getClass(),property);
      if (getter2 == null) {
        throw new IllegalStateException(String.format("String_Node_Str",property,o2.getClass().getName()));
      }
      Object val1=getter1.invoke(o1);
      Object val2=getter2.invoke(o2);
      int result=0;
switch (nullHandling) {
case AreLess:
        if (val1 == null && val2 == null) {
          continue;
        }
 else         if (val1 == null && val2 != null) {
          return ascending ? -1 : 1;
        }
 else         if (val1 != null && val2 == null) {
          return ascending ? 1 : -1;
        }
      break;
case AreMore:
    if (val1 == null && val2 == null) {
      continue;
    }
 else     if (val1 == null && val2 != null) {
      return ascending ? 1 : -1;
    }
 else     if (val1 != null && val2 == null) {
      return ascending ? -1 : 1;
    }
  break;
}
Comparator comparator=getComparator(property,type);
if (comparator != null) {
result=comparator.compare(val1,val2);
}
 else if (Comparable.class.isAssignableFrom(type)) {
if (val1 != null) {
  result=((Comparable)val1).compareTo(val2);
}
 else if (val2 != null) {
  result=((Comparable)val2).compareTo(val1);
}
 else {
  result=0;
}
}
 else {
throw new IllegalStateException("String_Node_Str" + type.getName() + "String_Node_Str");
}
if (result < 0 || result > 0) {
return ascending ? result : -result;
}
}
return 0;
}
 catch (Exception e) {
throw new IllegalStateException("String_Node_Str",e);
}
}

Fixed version (ground truth):
public int compare(T o1,T o2){
  try {
    for (int n=0; n < properties.length; n++) {
      boolean ascending=true;
      String property=properties[n];
      if (property.startsWith("String_Node_Str")) {
        ascending=false;
        property=property.substring(1);
      }
      Class type=BeanUtil.getPropertyType(o1,property);
      Method getter1=BeanUtil.findGetter(o1.getClass(),property);
      if (getter1 == null) {
        throw new IllegalStateException(String.format("String_Node_Str",property,o1.getClass().getName()));
      }
      Method getter2=BeanUtil.findGetter(o2.getClass(),property);
      if (getter2 == null) {
        throw new IllegalStateException(String.format("String_Node_Str",property,o2.getClass().getName()));
      }
      Object val1=getter1.invoke(o1);
      Object val2=getter2.invoke(o2);
      int result=0;
switch (nullHandling) {
case AreLess:
        if (val1 == null && val2 == null) {
          continue;
        }
 else         if (val1 == null && val2 != null) {
          return ascending ? -1 : 1;
        }
 else         if (val1 != null && val2 == null) {
          return ascending ? 1 : -1;
        }
      break;
case AreMore:
    if (val1 == null && val2 == null) {
      continue;
    }
 else     if (val1 == null && val2 != null) {
      return ascending ? 1 : -1;
    }
 else     if (val1 != null && val2 == null) {
      return ascending ? -1 : 1;
    }
  break;
}
Comparator comparator=getComparator(property,type);
if (comparator != null) {
result=comparator.compare(val1,val2);
}
 else if (Comparable.class.isAssignableFrom(type)) {
if (val1 != null) {
  result=((Comparable)val1).compareTo(val2);
}
 else if (val2 != null) {
  result=((Comparable)val2).compareTo(val1);
}
 else {
  result=0;
}
}
 else {
throw new IllegalStateException("String_Node_Str" + type.getName() + "String_Node_Str");
}
if (result < 0 || result > 0) {
return ascending ? result : -result;
}
}
return 0;
}
 catch (Exception e) {
throw new IllegalStateException("String_Node_Str",e);
}
}