Program: 138924
Project: 138924
Buggy source:
public int compare(Viewer viewer,Object o1,Object o2){
  if (o1 instanceof Object[] && o1 instanceof Object[]) {
    Object[] objs1=(Object[])o1;
    Object obj1=objs1[Math.abs(arrayIndex) - 1];
    Object[] objs2=(Object[])o2;
    Object obj2=objs2[Math.abs(arrayIndex) - 1];
    if (obj1 == null && obj2 != null) {
      if (arrayIndex > 0) {
        return -1;
      }
 else {
        return 1;
      }
    }
 else     if (obj1 != null && obj2 == null) {
      if (arrayIndex > 0) {
        return 1;
      }
 else {
        return -1;
      }
    }
 else     if (obj1 == null && obj2 == null) {
      return 0;
    }
    if (obj1 instanceof String) {
      if (arrayIndex > 0) {
        return ((String)obj1).compareTo((String)obj2);
      }
 else {
        return ((String)obj2).compareTo((String)obj1);
      }
    }
 else     if (obj1 instanceof Long) {
      if (arrayIndex > 0) {
        return ((Long)obj1).compareTo((Long)obj2);
      }
 else {
        return ((Long)obj2).compareTo((Long)obj1);
      }
    }
 else     if (obj1 instanceof Date) {
      if (arrayIndex > 0) {
        return ((Date)obj1).compareTo((Date)obj2);
      }
 else {
        return ((Date)obj2).compareTo((Date)obj1);
      }
    }
 else     if (obj1 instanceof Comparable) {
      return ((Comparable)obj1).compareTo((Comparable)obj2);
    }
 else {
      if (arrayIndex > 0) {
        return obj1.toString().compareTo(obj2.toString());
      }
 else {
        return obj2.toString().compareTo(obj1.toString());
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
public int compare(Viewer viewer,Object o1,Object o2){
  if (o1 instanceof Object[] && o1 instanceof Object[]) {
    Object[] objs1=(Object[])o1;
    Object obj1=objs1[Math.abs(arrayIndex) - 1];
    Object[] objs2=(Object[])o2;
    Object obj2=objs2[Math.abs(arrayIndex) - 1];
    if (obj1 == null && obj2 != null) {
      if (arrayIndex > 0) {
        return -1;
      }
 else {
        return 1;
      }
    }
 else     if (obj1 != null && obj2 == null) {
      if (arrayIndex > 0) {
        return 1;
      }
 else {
        return -1;
      }
    }
 else     if (obj1 == null && obj2 == null) {
      return 0;
    }
    if (obj1 instanceof String) {
      if (arrayIndex > 0) {
        return ((String)obj1).compareTo((String)obj2);
      }
 else {
        return ((String)obj2).compareTo((String)obj1);
      }
    }
 else     if (obj1 instanceof Long) {
      if (arrayIndex > 0) {
        return ((Long)obj1).compareTo((Long)obj2);
      }
 else {
        return ((Long)obj2).compareTo((Long)obj1);
      }
    }
 else     if (obj1 instanceof Date) {
      if (arrayIndex > 0) {
        return ((Date)obj1).compareTo((Date)obj2);
      }
 else {
        return ((Date)obj2).compareTo((Date)obj1);
      }
    }
 else     if (obj1 instanceof Comparable) {
      if (arrayIndex > 0) {
        return ((Comparable)obj1).compareTo((Comparable)obj2);
      }
 else {
        return ((Comparable)obj2).compareTo((Comparable)obj1);
      }
    }
 else {
      if (arrayIndex > 0) {
        return obj1.toString().compareTo(obj2.toString());
      }
 else {
        return obj2.toString().compareTo(obj1.toString());
      }
    }
  }
  return 0;
}