Program: 88794
Project: 88794
Buggy source:
protected void internalTransform(String phaseName,Map options){
  if (Options.v().verbose())   G.v().out.println("String_Node_Str");
  boolean enableNullPointerCheckInsertion=PhaseOptions.getBoolean(options,"String_Node_Str");
  boolean enableRedundantCastInsertion=PhaseOptions.getBoolean(options,"String_Node_Str");
  String modifierOptions=PhaseOptions.getString(options,"String_Node_Str");
  float expansionFactor=PhaseOptions.getFloat(options,"String_Node_Str");
  int maxContainerSize=PhaseOptions.getInt(options,"String_Node_Str");
  int maxInlineeSize=PhaseOptions.getInt(options,"String_Node_Str");
  HashMap instanceToStaticMap=new HashMap();
  CallGraph cg=Scene.v().getCallGraph();
  Hierarchy hierarchy=Scene.v().getActiveHierarchy();
  ArrayList sitesToInline=new ArrayList();
  computeAverageMethodSizeAndSaveOriginalSizes();
{
    TopologicalOrderer orderer=new TopologicalOrderer(cg);
    orderer.go();
    List order=orderer.order();
    ListIterator it=order.listIterator(order.size());
    while (it.hasPrevious()) {
      SootMethod container=(SootMethod)it.previous();
      if (methodToOriginalSize.get(container) == null)       continue;
      if (!container.isConcrete())       continue;
      if (!cg.targetsOf(container).hasNext())       continue;
      JimpleBody b=(JimpleBody)container.retrieveActiveBody();
      List unitList=new ArrayList();
      unitList.addAll(b.getUnits());
      Iterator unitIt=unitList.iterator();
      while (unitIt.hasNext()) {
        Stmt s=(Stmt)unitIt.next();
        if (!s.containsInvokeExpr())         continue;
        Iterator targets=new Targets(cg.targetsOf(s));
        if (!targets.hasNext())         continue;
        SootMethod target=(SootMethod)targets.next();
        if (targets.hasNext())         continue;
        if (!target.getDeclaringClass().isApplicationClass() || !target.isConcrete())         continue;
        if (!InlinerSafetyManager.ensureInlinability(target,s,container,modifierOptions))         continue;
        List l=new ArrayList();
        l.add(target);
        l.add(s);
        l.add(container);
        sitesToInline.add(l);
      }
    }
  }
{
    Iterator sitesIt=sitesToInline.iterator();
    while (sitesIt.hasNext()) {
      List l=(List)sitesIt.next();
      SootMethod inlinee=(SootMethod)l.get(0);
      int inlineeSize=((JimpleBody)(inlinee.retrieveActiveBody())).getUnits().size();
      Stmt invokeStmt=(Stmt)l.get(1);
      SootMethod container=(SootMethod)l.get(2);
      int containerSize=((JimpleBody)(container.retrieveActiveBody())).getUnits().size();
      if (inlineeSize + containerSize > maxContainerSize)       continue;
      if (inlineeSize > maxInlineeSize)       continue;
      if (inlineeSize + containerSize > expansionFactor * ((Integer)methodToOriginalSize.get(container)).intValue())       continue;
      if (InlinerSafetyManager.ensureInlinability(inlinee,invokeStmt,container,modifierOptions)) {
        SiteInliner.inlineSite(inlinee,invokeStmt,container,options);
      }
    }
  }
}

Fixed version (ground truth):
protected void internalTransform(String phaseName,Map options){
  Filter explicitInvokesFilter=new Filter(new ExplicitEdgesPred());
  if (Options.v().verbose())   G.v().out.println("String_Node_Str");
  boolean enableNullPointerCheckInsertion=PhaseOptions.getBoolean(options,"String_Node_Str");
  boolean enableRedundantCastInsertion=PhaseOptions.getBoolean(options,"String_Node_Str");
  String modifierOptions=PhaseOptions.getString(options,"String_Node_Str");
  float expansionFactor=PhaseOptions.getFloat(options,"String_Node_Str");
  int maxContainerSize=PhaseOptions.getInt(options,"String_Node_Str");
  int maxInlineeSize=PhaseOptions.getInt(options,"String_Node_Str");
  HashMap instanceToStaticMap=new HashMap();
  CallGraph cg=Scene.v().getCallGraph();
  Hierarchy hierarchy=Scene.v().getActiveHierarchy();
  ArrayList sitesToInline=new ArrayList();
  computeAverageMethodSizeAndSaveOriginalSizes();
{
    TopologicalOrderer orderer=new TopologicalOrderer(cg);
    orderer.go();
    List order=orderer.order();
    ListIterator it=order.listIterator(order.size());
    while (it.hasPrevious()) {
      SootMethod container=(SootMethod)it.previous();
      if (methodToOriginalSize.get(container) == null)       continue;
      if (!container.isConcrete())       continue;
      if (!explicitInvokesFilter.wrap(cg.targetsOf(container)).hasNext())       continue;
      JimpleBody b=(JimpleBody)container.retrieveActiveBody();
      List unitList=new ArrayList();
      unitList.addAll(b.getUnits());
      Iterator unitIt=unitList.iterator();
      while (unitIt.hasNext()) {
        Stmt s=(Stmt)unitIt.next();
        if (!s.containsInvokeExpr())         continue;
        Iterator targets=new Targets(explicitInvokesFilter.wrap(cg.targetsOf(s)));
        if (!targets.hasNext())         continue;
        SootMethod target=(SootMethod)targets.next();
        if (targets.hasNext())         continue;
        if (!target.getDeclaringClass().isApplicationClass() || !target.isConcrete())         continue;
        if (!InlinerSafetyManager.ensureInlinability(target,s,container,modifierOptions))         continue;
        List l=new ArrayList();
        l.add(target);
        l.add(s);
        l.add(container);
        sitesToInline.add(l);
      }
    }
  }
{
    Iterator sitesIt=sitesToInline.iterator();
    while (sitesIt.hasNext()) {
      List l=(List)sitesIt.next();
      SootMethod inlinee=(SootMethod)l.get(0);
      int inlineeSize=((JimpleBody)(inlinee.retrieveActiveBody())).getUnits().size();
      Stmt invokeStmt=(Stmt)l.get(1);
      SootMethod container=(SootMethod)l.get(2);
      int containerSize=((JimpleBody)(container.retrieveActiveBody())).getUnits().size();
      if (inlineeSize + containerSize > maxContainerSize)       continue;
      if (inlineeSize > maxInlineeSize)       continue;
      if (inlineeSize + containerSize > expansionFactor * ((Integer)methodToOriginalSize.get(container)).intValue())       continue;
      if (InlinerSafetyManager.ensureInlinability(inlinee,invokeStmt,container,modifierOptions)) {
        SiteInliner.inlineSite(inlinee,invokeStmt,container,options);
      }
    }
  }
}