Program: 34435
Project: 34435
Buggy source:
/** 
 * generate construct method for this component, this construct method should take one Intent as their parameter. the best way is to use a place holder parameter to avoid exist construct method and  use exist construct to build the new <init> method.
 * @param compSootClass
 * @param intentSootField
 * @return
 */
public SootMethod generateInitMethod(SootClass compSootClass,SootField intentSootField){
  String name="String_Node_Str";
  List<Type> parameters=new ArrayList<Type>();
  parameters.add(INTENT_TYPE);
  Type returnType=VoidType.v();
  int modifiers=Modifier.PUBLIC;
  SootMethod newConstructor=new SootMethod(name,parameters,returnType,modifiers);
  compSootClass.addMethod(newConstructor);
{
    Body b=Jimple.v().newBody(newConstructor);
    newConstructor.setActiveBody(b);
    LocalGenerator lg=new LocalGenerator(b);
    Local thisLocal=lg.generateLocal(compSootClass.getType());
    Unit thisU=Jimple.v().newIdentityStmt(thisLocal,Jimple.v().newThisRef(compSootClass.getType()));
    Local intentParameterLocal=lg.generateLocal(INTENT_TYPE);
    Unit intentParameterU=Jimple.v().newIdentityStmt(intentParameterLocal,Jimple.v().newParameterRef(INTENT_TYPE,0));
    Unit superU=(Unit)Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(thisLocal,compSootClass.getMethod(name,new ArrayList<Type>(),VoidType.v()).makeRef()));
    Unit storeIntentU=Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(intentSootField.makeRef()),intentParameterLocal);
    b.getUnits().add(thisU);
    b.getUnits().add(intentParameterU);
    b.getUnits().add(superU);
    b.getUnits().add(storeIntentU);
    b.getUnits().add(Jimple.v().newReturnVoidStmt());
  }
  return newConstructor;
}

Fixed version (ground truth):
/** 
 * generate construct method for this component, this construct method should take one Intent as their parameter. the best way is to use a place holder parameter to avoid exist construct method and  use exist construct to build the new <init> method.
 * @param compSootClass
 * @param intentSootField
 * @return
 */
public SootMethod generateInitMethod(SootClass compSootClass,SootField intentSootField){
  String name="String_Node_Str";
  List<Type> parameters=new ArrayList<Type>();
  parameters.add(INTENT_TYPE);
  Type returnType=VoidType.v();
  int modifiers=Modifier.PUBLIC;
  SootMethod newConstructor=new SootMethod(name,parameters,returnType,modifiers);
  compSootClass.addMethod(newConstructor);
{
    Body b=Jimple.v().newBody(newConstructor);
    newConstructor.setActiveBody(b);
    LocalGenerator lg=new LocalGenerator(b);
    Local thisLocal=lg.generateLocal(compSootClass.getType());
    Unit thisU=Jimple.v().newIdentityStmt(thisLocal,Jimple.v().newThisRef(compSootClass.getType()));
    Local intentParameterLocal=lg.generateLocal(INTENT_TYPE);
    Unit intentParameterU=Jimple.v().newIdentityStmt(intentParameterLocal,Jimple.v().newParameterRef(INTENT_TYPE,0));
    boolean noDefaultConstructMethod=false;
    Unit superU=null;
    try {
      superU=(Unit)Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(thisLocal,compSootClass.getMethod(name,new ArrayList<Type>(),VoidType.v()).makeRef()));
    }
 catch (    Exception ex) {
      noDefaultConstructMethod=true;
    }
    if (noDefaultConstructMethod) {
      List<SootMethod> sootMethods=compSootClass.getMethods();
      for (      SootMethod sm : sootMethods) {
        if (sm.getName().equals("String_Node_Str")) {
          if (sm.getParameterCount() == 1 && sm.getParameterType(0).equals(INTENT_TYPE)) {
            continue;
          }
          List<Value> args=new ArrayList<Value>();
          for (int i=0; i < sm.getParameterCount(); i++) {
            args.add(NullConstant.v());
          }
          superU=(Unit)Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(thisLocal,sm.makeRef(),args));
          break;
        }
      }
    }
    Unit storeIntentU=Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(intentSootField.makeRef()),intentParameterLocal);
    b.getUnits().add(thisU);
    b.getUnits().add(intentParameterU);
    b.getUnits().add(superU);
    b.getUnits().add(storeIntentU);
    b.getUnits().add(Jimple.v().newReturnVoidStmt());
  }
  return newConstructor;
}