Program: 82974
Project: 82974
Buggy source:
/** 
 * Builds a   {@link SerializableTypeOracle} for a give{@link com.google.gwt.user.client.rpc.RemoteService} interface.
 * @param propertyOracle property oracle used for initializing properties
 * @param remoteService {@link com.google.gwt.user.client.rpc.RemoteService RemoteService}interface to build the oracle for
 * @return a {@link SerializableTypeOracle} for the specified{@link com.google.gwt.user.client.rpc.RemoteService RemoteService}interface
 * @throws UnableToCompleteException if the the remote service is consideredinvalid due to serialization problem or a missing or ill formed remote service asynchronous interface
 */
public SerializableTypeOracle build(PropertyOracle propertyOracle,JClassType remoteService) throws UnableToCompleteException {
  try {
    JClassType stringType=typeOracle.getType(String.class.getName());
    if (!checkTypeInstantiable(rootLogger,stringType,false)) {
      throw new UnableToCompleteException();
    }
    JClassType icseType=typeOracle.getType(IncompatibleRemoteServiceException.class.getName());
    if (!checkTypeInstantiable(rootLogger,icseType,false)) {
      throw new UnableToCompleteException();
    }
  }
 catch (  NotFoundException e) {
    rootLogger.log(TreeLogger.ERROR,null,e);
    throw new UnableToCompleteException();
  }
  TreeLogger logger=rootLogger.branch(TreeLogger.DEBUG,"String_Node_Str" + remoteService.getParameterizedQualifiedSourceName() + "String_Node_Str",null);
  alreadyCheckedObject=false;
  validateRemoteService(logger,remoteService);
  List<TypeInfoComputed> typeInfoComputed=new ArrayList<TypeInfoComputed>(typeToTypeInfoComputed.values());
  for (  TypeInfoComputed tic : typeInfoComputed) {
    if (tic.isInstantiable()) {
      JArrayType arrayType=tic.getType().isArray();
      if (arrayType != null) {
        JType leafType=arrayType.getLeafType();
        int rank=arrayType.getRank();
        JClassType classType=leafType.isClassOrInterface();
        if (classType != null) {
          List<JClassType> instantiableSubTypes=new ArrayList<JClassType>();
          JClassType[] subTypes=classType.getSubtypes();
          for (int i=0; i < subTypes.length; ++i) {
            if (getTypeInfoComputed(subTypes[i]).isInstantiable()) {
              instantiableSubTypes.add(subTypes[i]);
            }
          }
          List<JClassType> covariantTypes=getAllTypesBetweenRootTypeAndLeaves(classType,instantiableSubTypes);
          for (int i=0, c=covariantTypes.size(); i < c; ++i) {
            JArrayType covariantArray=getArrayType(typeOracle,rank,covariantTypes.get(i));
            getTypeInfoComputed(covariantArray).setInstantiable(true);
          }
        }
      }
    }
  }
  Set<JClassType> possiblyInstantiatedTypes=new HashSet<JClassType>();
  List<JClassType> serializableTypesList=new ArrayList<JClassType>();
  for (  TypeInfoComputed tic : typeToTypeInfoComputed.values()) {
    JClassType type=tic.getType();
    if (type.isTypeParameter() != null || type.isWildcard() != null) {
      continue;
    }
    if (type.isParameterized() != null) {
      type=type.isParameterized().getRawType();
    }
    if (tic.isInstantiable()) {
      possiblyInstantiatedTypes.add(type);
    }
    if (tic.isFieldSerializable()) {
      serializableTypesList.add(type);
    }
  }
  JClassType[] serializableTypes=new JClassType[serializableTypesList.size()];
  serializableTypesList.toArray(serializableTypes);
  Arrays.sort(serializableTypes,new Comparator<JType>(){
    public int compare(    JType o1,    JType o2){
      String n1=o1.getQualifiedSourceName();
      String n2=o2.getQualifiedSourceName();
      return n1.compareTo(n2);
    }
  }
);
  logSerializableTypes(logger,serializableTypes);
  return new SerializableTypeOracleImpl(typeOracle,serializableTypes,possiblyInstantiatedTypes);
}

Fixed version (ground truth):
/** 
 * Builds a   {@link SerializableTypeOracle} for a give{@link com.google.gwt.user.client.rpc.RemoteService} interface.
 * @param propertyOracle property oracle used for initializing properties
 * @param remoteService {@link com.google.gwt.user.client.rpc.RemoteService RemoteService}interface to build the oracle for
 * @return a {@link SerializableTypeOracle} for the specified{@link com.google.gwt.user.client.rpc.RemoteService RemoteService}interface
 * @throws UnableToCompleteException if the the remote service is consideredinvalid due to serialization problem or a missing or ill formed remote service asynchronous interface
 */
public SerializableTypeOracle build(PropertyOracle propertyOracle,JClassType remoteService) throws UnableToCompleteException {
  try {
    JClassType stringType=typeOracle.getType(String.class.getName());
    if (!checkTypeInstantiable(rootLogger,stringType,false)) {
      throw new UnableToCompleteException();
    }
    JClassType icseType=typeOracle.getType(IncompatibleRemoteServiceException.class.getName());
    if (!checkTypeInstantiable(rootLogger,icseType,false)) {
      throw new UnableToCompleteException();
    }
  }
 catch (  NotFoundException e) {
    rootLogger.log(TreeLogger.ERROR,null,e);
    throw new UnableToCompleteException();
  }
  TreeLogger logger=rootLogger.branch(TreeLogger.DEBUG,"String_Node_Str" + remoteService.getParameterizedQualifiedSourceName() + "String_Node_Str",null);
  alreadyCheckedObject=false;
  validateRemoteService(logger,remoteService);
  List<TypeInfoComputed> typeInfoComputed=new ArrayList<TypeInfoComputed>(typeToTypeInfoComputed.values());
  for (  TypeInfoComputed tic : typeInfoComputed) {
    if (tic.isInstantiable()) {
      JArrayType arrayType=tic.getType().isArray();
      if (arrayType != null) {
        JType leafType=arrayType.getLeafType();
        int rank=arrayType.getRank();
        JClassType classType=leafType.isClassOrInterface();
        if (classType != null) {
          List<JClassType> instantiableSubTypes=new ArrayList<JClassType>();
          JClassType[] subTypes=classType.getSubtypes();
          for (int i=0; i < subTypes.length; ++i) {
            if (getTypeInfoComputed(subTypes[i]).isInstantiable()) {
              instantiableSubTypes.add(subTypes[i]);
            }
          }
          List<JClassType> covariantTypes=getAllTypesBetweenRootTypeAndLeaves(classType,instantiableSubTypes);
          for (int i=0, c=covariantTypes.size(); i < c; ++i) {
            JArrayType covariantArray=getArrayType(typeOracle,rank,covariantTypes.get(i));
            getTypeInfoComputed(covariantArray).setInstantiable(true);
          }
        }
      }
    }
  }
  Set<JClassType> possiblyInstantiatedTypes=new TreeSet<JClassType>(JCLASS_TYPE_COMPARATOR);
  Set<JClassType> fieldSerializableTypes=new TreeSet<JClassType>(JCLASS_TYPE_COMPARATOR);
  for (  TypeInfoComputed tic : typeToTypeInfoComputed.values()) {
    JClassType type=tic.getType();
    if (type.isTypeParameter() != null || type.isWildcard() != null) {
      continue;
    }
    if (type.isParameterized() != null) {
      type=type.isParameterized().getRawType();
    }
 else     if (type.isGenericType() != null) {
      type=type.isGenericType().getRawType();
    }
    if (tic.isInstantiable()) {
      possiblyInstantiatedTypes.add(type);
    }
    if (tic.isFieldSerializable()) {
      fieldSerializableTypes.add(type);
    }
  }
  logSerializableTypes(logger,fieldSerializableTypes);
  return new SerializableTypeOracleImpl(typeOracle,fieldSerializableTypes,possiblyInstantiatedTypes);
}