Program: 85332
Project: 85332
Buggy source:
public static Collection<Type> lcas_(Type a,Type b){
  if (TypeResolver.typesEqual(a,b))   return Collections.<Type>singletonList(a);
 else   if (a instanceof BottomType)   return Collections.<Type>singletonList(b);
 else   if (b instanceof BottomType)   return Collections.<Type>singletonList(a);
 else   if (a instanceof IntegerType && b instanceof IntegerType)   return Collections.<Type>singletonList(IntType.v());
 else   if (a instanceof PrimType || b instanceof PrimType)   return Collections.<Type>emptyList();
 else   if (a instanceof NullType)   return Collections.<Type>singletonList(b);
 else   if (b instanceof NullType)   return Collections.<Type>singletonList(a);
 else   if (a instanceof ArrayType && b instanceof ArrayType) {
    Type eta=((ArrayType)a).getElementType(), etb=((ArrayType)b).getElementType();
    Collection<Type> ts;
    if (eta instanceof PrimType || etb instanceof PrimType)     ts=Collections.<Type>emptyList();
 else     ts=lcas_(eta,etb);
    LinkedList<Type> r=new LinkedList<Type>();
    if (ts.isEmpty()) {
      r.add(RefType.v("String_Node_Str"));
      r.add(RefType.v("String_Node_Str"));
      r.add(RefType.v("String_Node_Str"));
    }
 else     for (    Type t : ts)     r.add(t.makeArrayType());
    return r;
  }
 else   if (a instanceof ArrayType || b instanceof ArrayType) {
    Type rt;
    if (a instanceof ArrayType)     rt=b;
 else     rt=a;
    LinkedList<Type> r=new LinkedList<Type>();
    if (!TypeResolver.typesEqual(RefType.v("String_Node_Str"),rt)) {
      if (ancestor_(RefType.v("String_Node_Str"),rt))       r.add(RefType.v("String_Node_Str"));
      if (ancestor_(RefType.v("String_Node_Str"),rt))       r.add(RefType.v("String_Node_Str"));
    }
    if (r.isEmpty())     r.add(RefType.v("String_Node_Str"));
    return r;
  }
 else {
    Collection<AncestryTreeNode> treea=buildAncestryTree((RefType)a), treeb=buildAncestryTree((RefType)b);
    LinkedList<Type> r=new LinkedList<Type>();
    for (    AncestryTreeNode nodea : treea)     for (    AncestryTreeNode nodeb : treeb) {
      RefType t=leastCommonNode(nodea,nodeb);
      boolean least=true;
      for (ListIterator<Type> i=r.listIterator(); i.hasNext(); ) {
        Type t_=i.next();
        if (ancestor_(t,t_)) {
          least=false;
          break;
        }
        if (ancestor_(t_,t))         i.remove();
      }
      if (least)       r.add(t);
    }
    if (r.isEmpty())     r.add(RefType.v("String_Node_Str"));
    return r;
  }
}

Fixed version (ground truth):
public static Collection<Type> lcas_(Type a,Type b){
  if (TypeResolver.typesEqual(a,b))   return Collections.<Type>singletonList(a);
 else   if (a instanceof BottomType)   return Collections.<Type>singletonList(b);
 else   if (b instanceof BottomType)   return Collections.<Type>singletonList(a);
 else   if (a instanceof IntegerType && b instanceof IntegerType)   return Collections.<Type>singletonList(IntType.v());
 else   if (a instanceof IntegerType && b instanceof FloatType)   return Collections.<Type>singletonList(FloatType.v());
 else   if (b instanceof IntegerType && a instanceof FloatType)   return Collections.<Type>singletonList(FloatType.v());
 else   if (a instanceof PrimType || b instanceof PrimType)   return Collections.<Type>emptyList();
 else   if (a instanceof NullType)   return Collections.<Type>singletonList(b);
 else   if (b instanceof NullType)   return Collections.<Type>singletonList(a);
 else   if (a instanceof ArrayType && b instanceof ArrayType) {
    Type eta=((ArrayType)a).getElementType(), etb=((ArrayType)b).getElementType();
    Collection<Type> ts;
    if (eta instanceof PrimType || etb instanceof PrimType)     ts=Collections.<Type>emptyList();
 else     ts=lcas_(eta,etb);
    LinkedList<Type> r=new LinkedList<Type>();
    if (ts.isEmpty()) {
      r.add(RefType.v("String_Node_Str"));
      r.add(RefType.v("String_Node_Str"));
      r.add(RefType.v("String_Node_Str"));
    }
 else     for (    Type t : ts)     r.add(t.makeArrayType());
    return r;
  }
 else   if (a instanceof ArrayType || b instanceof ArrayType) {
    Type rt;
    if (a instanceof ArrayType)     rt=b;
 else     rt=a;
    LinkedList<Type> r=new LinkedList<Type>();
    if (!TypeResolver.typesEqual(RefType.v("String_Node_Str"),rt)) {
      if (ancestor_(RefType.v("String_Node_Str"),rt))       r.add(RefType.v("String_Node_Str"));
      if (ancestor_(RefType.v("String_Node_Str"),rt))       r.add(RefType.v("String_Node_Str"));
    }
    if (r.isEmpty())     r.add(RefType.v("String_Node_Str"));
    return r;
  }
 else {
    Collection<AncestryTreeNode> treea=buildAncestryTree((RefType)a), treeb=buildAncestryTree((RefType)b);
    LinkedList<Type> r=new LinkedList<Type>();
    for (    AncestryTreeNode nodea : treea)     for (    AncestryTreeNode nodeb : treeb) {
      RefType t=leastCommonNode(nodea,nodeb);
      boolean least=true;
      for (ListIterator<Type> i=r.listIterator(); i.hasNext(); ) {
        Type t_=i.next();
        if (ancestor_(t,t_)) {
          least=false;
          break;
        }
        if (ancestor_(t_,t))         i.remove();
      }
      if (least)       r.add(t);
    }
    if (r.isEmpty())     r.add(RefType.v("String_Node_Str"));
    return r;
  }
}