Program: 33984
Project: 33984
Buggy source:
/** 
 * Method initGsonBuilder.
 * @param builder Builder
 * @return GsonBuilder 
 */
private static GsonBuilder initGsonBuilder(Builder builder,Schema schema,ASObjectAdapter base){
  return new GsonBuilder().registerTypeHierarchyAdapter(TypeValue.class,new TypeValueAdapter(schema)).registerTypeHierarchyAdapter(LinkValue.class,new LinkValueAdapter(schema)).registerTypeHierarchyAdapter(NLV.class,NLV).registerTypeHierarchyAdapter(Iterable.class,ITERABLE).registerTypeHierarchyAdapter(ActionsValue.class,ACTIONS).registerTypeHierarchyAdapter(Optional.class,OPTIONAL).registerTypeHierarchyAdapter(Range.class,RANGE).registerTypeHierarchyAdapter(Table.class,TABLE).registerTypeHierarchyAdapter(LazilyParsedNumber.class,NUMBER).registerTypeHierarchyAdapter(LazilyParsedNumberComparable.class,NUMBER).registerTypeHierarchyAdapter(ASObject.class,base).registerTypeHierarchyAdapter(Collection.class,base).registerTypeHierarchyAdapter(Activity.class,base).registerTypeHierarchyAdapter(ReadableDuration.class,DURATION).registerTypeHierarchyAdapter(ReadablePeriod.class,PERIOD).registerTypeHierarchyAdapter(ReadableInterval.class,INTERVAL).registerTypeAdapter(Activity.Status.class,forEnum(Activity.Status.class,Activity.Status.OTHER)).registerTypeAdapter(Date.class,DATE).registerTypeAdapter(DateTime.class,DATETIME).registerTypeAdapter(MediaType.class,MIMETYPE).registerTypeHierarchyAdapter(Multimap.class,MULTIMAP);
}

Fixed version (ground truth):
/** 
 * Method initGsonBuilder.
 * @param builder Builder
 * @return GsonBuilder 
 */
private static GsonBuilder initGsonBuilder(Builder builder,Schema schema,ASObjectAdapter base,Iterable<AdapterEntry<?>> adapters){
  GsonBuilder gson=new GsonBuilder().registerTypeHierarchyAdapter(TypeValue.class,new TypeValueAdapter(schema)).registerTypeHierarchyAdapter(LinkValue.class,new LinkValueAdapter(schema)).registerTypeHierarchyAdapter(Iterable.class,ITERABLE);
  for (  AdapterEntry<?> entry : adapters) {
    if (entry.hier)     gson.registerTypeHierarchyAdapter(entry.type,entry.adapter != null ? entry.adapter : base);
 else     gson.registerTypeAdapter(entry.type,entry.adapter != null ? entry.adapter : base);
  }
  return gson.registerTypeHierarchyAdapter(NLV.class,NLV).registerTypeHierarchyAdapter(ActionsValue.class,ACTIONS).registerTypeHierarchyAdapter(Optional.class,OPTIONAL).registerTypeHierarchyAdapter(Range.class,RANGE).registerTypeHierarchyAdapter(Table.class,TABLE).registerTypeHierarchyAdapter(LazilyParsedNumber.class,NUMBER).registerTypeHierarchyAdapter(LazilyParsedNumberComparable.class,NUMBER).registerTypeHierarchyAdapter(ASObject.class,base).registerTypeHierarchyAdapter(Collection.class,base).registerTypeHierarchyAdapter(Activity.class,base).registerTypeHierarchyAdapter(ReadableDuration.class,DURATION).registerTypeHierarchyAdapter(ReadablePeriod.class,PERIOD).registerTypeHierarchyAdapter(ReadableInterval.class,INTERVAL).registerTypeAdapter(Activity.Status.class,forEnum(Activity.Status.class,Activity.Status.OTHER)).registerTypeAdapter(Date.class,DATE).registerTypeAdapter(DateTime.class,DATETIME).registerTypeAdapter(MediaType.class,MIMETYPE).registerTypeHierarchyAdapter(Multimap.class,MULTIMAP);
}