Program: 88716
Project: 88716
Buggy source:
/** 
 * creates the Jimple for an anon class - in the AST there is no class  decl for anon classes - the revelant fields and methods are  created 
 */
private void createAnonClassDecl(polyglot.types.Type type,String outerName,polyglot.ast.New next){
  soot.SootClass typeClass=soot.Scene.v().getSootClass(type.toString());
  if (typeClass.isInterface()) {
    sootClass.addInterface(typeClass);
    sootClass.setSuperclass(soot.Scene.v().getSootClass("String_Node_Str"));
  }
 else {
    sootClass.setSuperclass(typeClass);
  }
  soot.SootField field=new soot.SootField("String_Node_Str",soot.Scene.v().getSootClass(outerName).getType(),soot.Modifier.FINAL | soot.Modifier.PRIVATE);
  sootClass.addField(field);
  ArrayList finalLocalsFields=new ArrayList();
  if (finalsMap != null) {
    if (finalsMap.containsKey(next)) {
      ArrayList finalLocals=(ArrayList)finalsMap.get(next);
      Iterator fIt=finalLocals.iterator();
      while (fIt.hasNext()) {
        polyglot.types.LocalInstance li=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt.next()).object();
        soot.SootField sf=new soot.SootField("String_Node_Str" + li.name(),Util.getSootType(li.type()),soot.Modifier.FINAL | soot.Modifier.PRIVATE);
        finalLocalsFields.add(sf);
        sootClass.addField(sf);
      }
    }
  }
  ArrayList params=new ArrayList();
  params.add(soot.Scene.v().getSootClass(outerName).getType());
  if (finalsMap != null) {
    if (finalsMap.containsKey(next)) {
      ArrayList finalLocals=(ArrayList)finalsMap.get(next);
      Iterator fIt=finalLocals.iterator();
      while (fIt.hasNext()) {
        params.add(Util.getSootType(((polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt.next()).object()).type()));
      }
    }
  }
  if (typeClass.isInterface()) {
    soot.SootMethod method=new soot.SootMethod("String_Node_Str",params,soot.VoidType.v());
    AnonClassInitMethodSource src=new AnonClassInitMethodSource();
    src.outerClassType(soot.Scene.v().getSootClass(outerName).getType());
    method.setSource(src);
    sootClass.addMethod(method);
  }
 else {
    ArrayList allParams=new ArrayList();
    allParams.add(soot.Scene.v().getSootClass(outerName).getType());
    Iterator aIt=next.arguments().iterator();
    while (aIt.hasNext()) {
      polyglot.types.Type pType=((polyglot.ast.Expr)aIt.next()).type();
      allParams.add(Util.getSootType(pType));
    }
    if (finalsMap != null) {
      if (finalsMap.containsKey(next)) {
        ArrayList finalLocals=(ArrayList)finalsMap.get(next);
        Iterator fIt=finalLocals.iterator();
        while (fIt.hasNext()) {
          allParams.add(Util.getSootType(((polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt.next()).object()).type()));
        }
      }
    }
    soot.SootMethod method=new soot.SootMethod("String_Node_Str",allParams,soot.VoidType.v());
    AnonClassInitMethodSource src=new AnonClassInitMethodSource();
    src.outerClassType(soot.Scene.v().getSootClass(outerName).getType());
    src.setFieldList(finalLocalsFields);
    method.setSource(src);
    sootClass.addMethod(method);
  }
}

Fixed version (ground truth):
/** 
 * creates the Jimple for an anon class - in the AST there is no class  decl for anon classes - the revelant fields and methods are  created 
 */
private void createAnonClassDecl(polyglot.types.Type type,String outerName,polyglot.ast.New next){
  soot.SootClass typeClass=soot.Scene.v().getSootClass(type.toString());
  if (typeClass.isInterface()) {
    sootClass.addInterface(typeClass);
    sootClass.setSuperclass(soot.Scene.v().getSootClass("String_Node_Str"));
  }
 else {
    sootClass.setSuperclass(typeClass);
  }
  ArrayList finalLocalsFields=new ArrayList();
  ArrayList params=new ArrayList();
  ArrayList allParams=new ArrayList();
  if (finalsMap != null) {
    if (finalsMap.containsKey(next)) {
      AnonLocalClassInfo info=(AnonLocalClassInfo)finalsMap.get(next);
      if (!info.inStaticMethod()) {
        soot.SootField field=new soot.SootField("String_Node_Str",soot.Scene.v().getSootClass(outerName).getType(),soot.Modifier.FINAL | soot.Modifier.PRIVATE);
        sootClass.addField(field);
      }
      Iterator fIt=info.finalFields().iterator();
      while (fIt.hasNext()) {
        polyglot.types.LocalInstance li=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt.next()).object();
        soot.SootField sf=new soot.SootField("String_Node_Str" + li.name(),Util.getSootType(li.type()),soot.Modifier.FINAL | soot.Modifier.PRIVATE);
        finalLocalsFields.add(sf);
        sootClass.addField(sf);
      }
      if (!info.inStaticMethod()) {
        params.add(soot.Scene.v().getSootClass(outerName).getType());
      }
      ArrayList finalLocals=info.finalFields();
      Iterator fIt2=finalLocals.iterator();
      while (fIt2.hasNext()) {
        params.add(Util.getSootType(((polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt2.next()).object()).type()));
      }
    }
  }
  if (typeClass.isInterface()) {
    soot.SootMethod method=new soot.SootMethod("String_Node_Str",params,soot.VoidType.v());
    AnonClassInitMethodSource src=new AnonClassInitMethodSource();
    src.outerClassType(soot.Scene.v().getSootClass(outerName).getType());
    method.setSource(src);
    sootClass.addMethod(method);
  }
 else {
    if (finalsMap != null) {
      if (finalsMap.containsKey(next)) {
        AnonLocalClassInfo info=(AnonLocalClassInfo)finalsMap.get(next);
        if (!info.inStaticMethod()) {
          allParams.add(soot.Scene.v().getSootClass(outerName).getType());
        }
        Iterator aIt=next.arguments().iterator();
        while (aIt.hasNext()) {
          polyglot.types.Type pType=((polyglot.ast.Expr)aIt.next()).type();
          allParams.add(Util.getSootType(pType));
        }
        ArrayList finalLocals=info.finalFields();
        Iterator fIt=finalLocals.iterator();
        while (fIt.hasNext()) {
          allParams.add(Util.getSootType(((polyglot.types.LocalInstance)((polyglot.util.IdentityKey)fIt.next()).object()).type()));
        }
      }
    }
    soot.SootMethod method=new soot.SootMethod("String_Node_Str",allParams,soot.VoidType.v());
    AnonClassInitMethodSource src=new AnonClassInitMethodSource();
    src.outerClassType(soot.Scene.v().getSootClass(outerName).getType());
    src.setFieldList(finalLocalsFields);
    if (finalsMap != null) {
      if (finalsMap.containsKey(next)) {
        AnonLocalClassInfo info=(AnonLocalClassInfo)finalsMap.get(next);
        src.inStaticMethod(info.inStaticMethod());
      }
    }
    method.setSource(src);
    sootClass.addMethod(method);
  }
}