nus-yam/ex-repair huggingface dataset:
Program: 85234
Project: 85234
Buggy source:
private Map<String,DexBackedDexFile> init(File dexSourceFile) throws IOException {
  int api=Scene.v().getAndroidAPIVersion();
  boolean multiple_dex=Options.v().process_multiple_dex();
  MultiDexContainer<? extends DexBackedDexFile> dexContainer=DexFileFactory.loadDexContainer(dexSourceFile,Opcodes.forApi(api));
  int dexFileCount=dexContainer.getDexEntryNames().size();
  if (dexFileCount < 1)   throw new RuntimeException(String.format("String_Node_Str",dexSourceFile));
  Map<String,DexBackedDexFile> dexMap=new HashMap<>(dexFileCount);
  ListIterator<String> entryNames=dexContainer.getDexEntryNames().listIterator(dexFileCount);
  while (entryNames.hasPrevious()) {
    String entryName=entryNames.previous();
    DexBackedDexFile entry=dexContainer.getEntry(entryName);
    G.v().out.println(String.format("String_Node_Str",entryName,entry.getClasses().size(),dexSourceFile.getName()));
    if (multiple_dex)     dexMap.put(entryName,entry);
 else     if (dexMap.isEmpty() && (entryName.equals("String_Node_Str") || !entryNames.hasPrevious())) {
      dexMap=Collections.singletonMap(entryName,entry);
      G.v().out.println("String_Node_Str" + entryName + "String_Node_Str");
    }
  }
  return Collections.unmodifiableMap(dexMap);
}

Fixed version (ground truth):
private Map<String,DexBackedDexFile> init(File dexSourceFile) throws IOException {
  int api=Scene.v().getAndroidAPIVersion();
  boolean multiple_dex=Options.v().process_multiple_dex();
  MultiDexContainer<? extends DexBackedDexFile> dexContainer=DexFileFactory.loadDexContainer(dexSourceFile,Opcodes.forApi(api));
  List<String> dexEntryNameList=dexContainer.getDexEntryNames();
  int dexFileCount=dexEntryNameList.size();
  if (dexFileCount < 1)   throw new RuntimeException(String.format("String_Node_Str",dexSourceFile));
  Map<String,DexBackedDexFile> dexMap=new HashMap<>(dexFileCount);
  ListIterator<String> entryNameIterator=dexEntryNameList.listIterator(dexFileCount);
  while (entryNameIterator.hasPrevious()) {
    String entryName=entryNameIterator.previous();
    DexBackedDexFile entry=dexContainer.getEntry(entryName);
    G.v().out.println(String.format("String_Node_Str",entryName,entry.getClasses().size(),dexSourceFile.getName()));
    if (multiple_dex)     dexMap.put(entryName,entry);
 else     if (dexMap.isEmpty() && (entryName.equals("String_Node_Str") || !entryNameIterator.hasPrevious())) {
      dexMap=Collections.singletonMap(entryName,entry);
      G.v().out.println("String_Node_Str" + entryName + "String_Node_Str");
    }
  }
  return Collections.unmodifiableMap(dexMap);
}
Program: 85235
Project: 85235
Buggy source:
/** 
 * @param dexSourceFile Path to a jar, apk, dex, odex, etc. file
 * @return List of dex files derived from source file
 */
public Map<String,DexBackedDexFile> getDexNameToFileMapping(File dexSourceFile){
  String key=dexSourceFile.getAbsolutePath();
  Map<String,DexBackedDexFile> dexFiles=dexMap.get(key);
  if (dexFiles == null) {
    try {
      dexFiles=init(dexSourceFile);
      dexMap.put(key,dexFiles);
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str",e);
    }
  }
  return dexFiles;
}

Fixed version (ground truth):
/** 
 * @param dexSourceFile Path to a jar, apk, dex, odex, etc. file
 * @return List of dex files derived from source file
 */
public Map<String,DexBackedDexFile> getDexNameToFileMapping(File dexSourceFile) throws IOException {
  String key=dexSourceFile.getCanonicalPath();
  Map<String,DexBackedDexFile> dexFiles=dexMap.get(key);
  if (dexFiles == null) {
    try {
      dexFiles=init(dexSourceFile);
      dexMap.put(key,dexFiles);
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str",e);
    }
  }
  return dexFiles;
}
Program: 85236
Project: 85236
Buggy source:
public DexBackedDexFile getDexInFile(File dexSourceFile,String fileName){
  DexBackedDexFile dexFile=getDexNameToFileMapping(dexSourceFile).get(fileName);
  if (dexFile == null)   throw new CompilationDeathException("String_Node_Str" + fileName + "String_Node_Str"+ dexSourceFile);
  return dexFile;
}

Fixed version (ground truth):
public DexBackedDexFile getDexInFile(File dexSourceFile,String fileName) throws IOException {
  DexBackedDexFile dexFile=getDexNameToFileMapping(dexSourceFile).get(fileName);
  if (dexFile == null)   throw new CompilationDeathException("String_Node_Str" + fileName + "String_Node_Str"+ dexSourceFile);
  return dexFile;
}
Program: 85237
Project: 85237
Buggy source:
/** 
 * Construct a DexlibWrapper from a dex file and stores its classes referenced by their name. No further process is done here.
 */
public DexlibWrapper(File dexSource){
  this.dexFiles=DexFileProvider.v().getDexFiles(dexSource);
}

Fixed version (ground truth):
/** 
 * Construct a DexlibWrapper from a dex file and stores its classes referenced by their name. No further process is done here.
 */
public DexlibWrapper(File dexSource){
  try {
    this.dexFiles=DexFileProvider.v().getDexFiles(dexSource);
  }
 catch (  IOException e) {
    throw new CompilationDeathException("String_Node_Str",e);
  }
}
Program: 85238
Project: 85238
Buggy source:
public Dependencies makeSootClass(SootClass sc,String className){
  if (Util.isByteCodeClassName(className)) {
    className=Util.dottedClassName(className);
  }
  try {
    for (    String dexEntry : dexContainer.getDexEntryNames()) {
      DexFile dexFile=dexContainer.getEntry(dexEntry);
      ClassDef defItem=classesToDefItems.get(className);
      return dexLoader.makeSootClass(sc,defItem,dexFile);
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  throw new RuntimeException("String_Node_Str" + className);
}

Fixed version (ground truth):
public Dependencies makeSootClass(SootClass sc,String className){
  if (Util.isByteCodeClassName(className)) {
    className=Util.dottedClassName(className);
  }
  try {
    for (    String dexEntry : dexContainer.getDexEntryNames()) {
      DexFile dexFile=dexContainer.getEntry(dexEntry);
      ClassDef defItem=classesToDefItems.get(className);
      if (dexFile.getClasses().contains(defItem))       return dexLoader.makeSootClass(sc,defItem,dexFile);
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  throw new RuntimeException("String_Node_Str" + className);
}
Program: 85241
Project: 85241
Buggy source:
/** 
 * Reserves low registers in case we later find an instruction that has short operands. We can then move the real operands into the reserved low ones and use those instead.
 * @param insns
 * @param insnsStmtMap
 * @param parameterInstructionsList 
 */
private void reserveRegisters(List<Insn> insns,Map<Insn,Stmt> insnsStmtMap,List<LocalRegisterAssignmentInformation> parameterInstructionsList){
  int reservedRegs=0;
  while (true) {
    int regsNeeded=getRegsNeeded(reservedRegs,insns,insnsStmtMap);
    int regsToReserve=regsNeeded - reservedRegs;
    if (regsToReserve <= 0) {
      break;
    }
    regAlloc.increaseRegCount(regsToReserve);
    for (    Insn insn : insns) {
      shiftRegs(insn,regsToReserve);
    }
    for (    LocalRegisterAssignmentInformation info : parameterInstructionsList) {
      Register r=info.getRegister();
      r.setNumber(r.getNumber() + regsToReserve);
    }
    reservedRegs+=regsToReserve;
  }
}

Fixed version (ground truth):
/** 
 * Reserves low registers in case we later find an instruction that has short operands. We can then move the real operands into the reserved low ones and use those instead.
 * @param insns
 * @param insnsStmtMap
 * @param parameterInstructionsList
 */
private void reserveRegisters(List<Insn> insns,Map<Insn,Stmt> insnsStmtMap,List<LocalRegisterAssignmentInformation> parameterInstructionsList){
  int reservedRegs=0;
  while (true) {
    int regsNeeded=getRegsNeeded(reservedRegs,insns,insnsStmtMap);
    int regsToReserve=regsNeeded - reservedRegs;
    if (regsToReserve <= 0) {
      break;
    }
    regAlloc.increaseRegCount(regsToReserve);
    for (    Insn insn : insns) {
      shiftRegs(insn,regsToReserve);
    }
    for (    LocalRegisterAssignmentInformation info : parameterInstructionsList) {
      Register r=info.getRegister();
      r.setNumber(r.getNumber() + regsToReserve);
    }
    reservedRegs+=regsToReserve;
  }
}
Program: 85242
Project: 85242
Buggy source:
public List<Insn> finishRegs(List<Insn> insns,Map<Insn,Stmt> insnsStmtMap,Map<Insn,LocalRegisterAssignmentInformation> instructionRegisterMap,List<LocalRegisterAssignmentInformation> parameterInstructionsList){
  renumParamRegsToHigh(insns,parameterInstructionsList);
  reserveRegisters(insns,insnsStmtMap,parameterInstructionsList);
  InstructionIterator insnIter=new InstructionIterator(insns,insnsStmtMap,instructionRegisterMap);
  while (insnIter.hasNext()) {
    Insn oldInsn=insnIter.next();
    if (oldInsn.toString().equals("String_Node_Str"))     System.out.println("String_Node_Str");
    if (oldInsn.hasIncompatibleRegs()) {
      Insn fittingInsn=findFittingInsn(oldInsn);
      if (fittingInsn != null) {
        insnIter.set(fittingInsn,oldInsn);
      }
 else {
        fixIncompatRegs(oldInsn,insnIter);
      }
    }
  }
  return insns;
}

Fixed version (ground truth):
public List<Insn> finishRegs(List<Insn> insns,Map<Insn,Stmt> insnsStmtMap,Map<Insn,LocalRegisterAssignmentInformation> instructionRegisterMap,List<LocalRegisterAssignmentInformation> parameterInstructionsList){
  renumParamRegsToHigh(insns,parameterInstructionsList);
  reserveRegisters(insns,insnsStmtMap,parameterInstructionsList);
  InstructionIterator insnIter=new InstructionIterator(insns,insnsStmtMap,instructionRegisterMap);
  while (insnIter.hasNext()) {
    Insn oldInsn=insnIter.next();
    if (oldInsn.hasIncompatibleRegs()) {
      Insn fittingInsn=findFittingInsn(oldInsn);
      if (fittingInsn != null) {
        insnIter.set(fittingInsn,oldInsn);
      }
 else {
        fixIncompatRegs(oldInsn,insnIter);
      }
    }
  }
  return insns;
}
Program: 85243
Project: 85243
Buggy source:
/** 
 * Compares the generated test output with Soot's output for the tested class line by line
 * @throws FileNotFoundException if either the file for comparison could not be created or the soot output could not be opened
 */
@Test public void compareOutput() throws FileNotFoundException {
  File compareFile=new File("String_Node_Str" + getTargetClass() + "String_Node_Str");
  PrintWriter ow=new PrintWriter(compareFile);
  ow.print(comparisonOutput);
  ow.flush();
  ow.close();
  File targetFile=new File("String_Node_Str" + getTargetClass() + "String_Node_Str");
  Scanner sootOutput=new Scanner(targetFile);
  Scanner compareOutput=new Scanner(comparisonOutput);
  try {
    System.out.println(String.format("String_Node_Str",compareFile.getAbsolutePath(),targetFile.getAbsolutePath()));
    int line=1;
    while (compareOutput.hasNextLine()) {
      assertTrue(String.format("String_Node_Str",getTargetClass(),line),sootOutput.hasNextLine());
      String compare=compareOutput.nextLine();
      String output=sootOutput.nextLine();
      assertTrue(String.format("String_Node_Str",compare.trim(),output.trim(),line,getTargetClass()),compare.equals(output));
      ++line;
    }
    assertFalse(String.format("String_Node_Str",getTargetClass()),sootOutput.hasNextLine());
    System.out.println("String_Node_Str");
  }
  finally {
    sootOutput.close();
    compareOutput.close();
  }
}

Fixed version (ground truth):
/** 
 * Compares the generated test output with Soot's output for the tested class line by line
 * @throws FileNotFoundException if either the file for comparison could not be created or the soot output could not be opened
 */
@Test public void compareOutput() throws FileNotFoundException {
  File compareFile=new File("String_Node_Str" + getTargetClass() + "String_Node_Str");
  PrintWriter ow=new PrintWriter(compareFile);
  ow.print(comparisonOutput);
  ow.flush();
  ow.close();
  File targetFile=new File("String_Node_Str" + getTargetClass() + "String_Node_Str");
  assertTrue(String.format("String_Node_Str",targetFile.getAbsolutePath()),targetFile.exists());
  Scanner sootOutput=new Scanner(targetFile);
  Scanner compareOutput=new Scanner(comparisonOutput);
  try {
    System.out.println(String.format("String_Node_Str",compareFile.getAbsolutePath(),targetFile.getAbsolutePath()));
    int line=1;
    while (compareOutput.hasNextLine()) {
      assertTrue(String.format("String_Node_Str",getTargetClass(),line),sootOutput.hasNextLine());
      String compare=compareOutput.nextLine();
      String output=sootOutput.nextLine();
      assertTrue(String.format("String_Node_Str",compare.trim(),output.trim(),line,getTargetClass()),compare.equals(output));
      ++line;
    }
    assertFalse(String.format("String_Node_Str",getTargetClass()),sootOutput.hasNextLine());
    System.out.println("String_Node_Str");
  }
  finally {
    sootOutput.close();
    compareOutput.close();
  }
}
Program: 85245
Project: 85245
Buggy source:
public static String getDexClassName(String dottedClassName){
  if (dottedClassName == null || dottedClassName.isEmpty())   throw new RuntimeException("String_Node_Str");
  String slashedName=dottedClassName.replace('.','/');
  if (slashedName.startsWith("String_Node_Str") && slashedName.endsWith("String_Node_Str"))   return slashedName;
  return "String_Node_Str" + slashedName + "String_Node_Str";
}

Fixed version (ground truth):
public static String getDexClassName(String dottedClassName){
  if (dottedClassName == null || dottedClassName.isEmpty())   throw new RuntimeException("String_Node_Str");
  if (isPrimitiveTypeOrArray(dottedClassName))   return dottedClassName;
 else {
    String slashedName=dottedClassName.replace('.','/');
    if (slashedName.startsWith("String_Node_Str") && slashedName.endsWith("String_Node_Str"))     return slashedName;
    return "String_Node_Str" + slashedName + "String_Node_Str";
  }
}
Program: 85246
Project: 85246
Buggy source:
/** 
 * Runs Soot with the arguments needed for running one test
 */
protected void runSoot(){
  G.reset();
  String rtJar=System.getProperty("String_Node_Str") + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str";
  Main.main(new String[]{"String_Node_Str",getClassPathFolder() + File.pathSeparator + rtJar,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",getRequiredJavaVersion(),getTargetClass()});
}

Fixed version (ground truth):
/** 
 * Runs Soot with the arguments needed for running one test
 */
protected void runSoot(){
  G.reset();
  String rtJar=System.getProperty("String_Node_Str") + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str";
  String classpath=getClassPathFolder() + File.pathSeparator + rtJar;
  System.out.println("String_Node_Str" + classpath);
  Main.main(new String[]{"String_Node_Str",classpath,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",getRequiredJavaVersion(),getTargetClass()});
}
Program: 85248
Project: 85248
Buggy source:
@Override public boolean containsEdge(N from,N to,L label){
  DGEdge<N> edge=new DGEdge<N>(from,to);
  if (edgeToLabels.get(edge) != null && edgeToLabels.get(edge).contains(label)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean containsEdge(N from,N to,L label){
  List<L> labels=edgeToLabels.get(new DGEdge<>(from,to));
  return labels != null && labels.contains(label);
}
Program: 85249
Project: 85249
Buggy source:
@Override public void removeAllEdges(L label){
  if (!containsAnyEdge(label)) {
    return;
  }
  List<DGEdge<N>> edges=labelToEdges.get(label);
  if (edges == null) {
    throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
  }
  for (  DGEdge<N> edge : edges) {
    removeEdge(edge.from(),edge.to(),label);
  }
}

Fixed version (ground truth):
@Override public void removeAllEdges(L label){
  if (!containsAnyEdge(label)) {
    return;
  }
  List<DGEdge<N>> edges=labelToEdges.get(label);
  if (edges == null) {
    throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
  }
  for (  DGEdge<N> edge : getCopy(edges)) {
    removeEdge(edge.from(),edge.to(),label);
  }
}
Program: 85250
Project: 85250
Buggy source:
@Override public boolean containsAnyEdge(L label){
  if (labelToEdges.get(label) != null && labelToEdges.get(label).isEmpty()) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean containsAnyEdge(L label){
  List<DGEdge<N>> edges=labelToEdges.get(label);
  return edges != null && !edges.isEmpty();
}
Program: 85251
Project: 85251
Buggy source:
public void type(Type t){
  handleIndent();
  String s=t == null ? "String_Node_Str" : t.toString();
  if (t instanceof RefType)   s=Scene.v().quotedNameOf(s);
  output.append(s);
}

Fixed version (ground truth):
public void type(Type t){
  handleIndent();
  String s=t == null ? "String_Node_Str" : t.toQuotedString();
  output.append(s);
}
Program: 85252
Project: 85252
Buggy source:
/** 
 * Returns the RefType with the given className. Returns null if no type with the given name can be found.
 */
public RefType getRefTypeUnsafe(String className){
  RefType refType=nameToClass.get(unescapeName(className));
  return refType;
}

Fixed version (ground truth):
/** 
 * Returns the RefType with the given className. Returns null if no type with the given name can be found.
 */
public RefType getRefTypeUnsafe(String className){
  RefType refType=nameToClass.get(className);
  return refType;
}
Program: 85253
Project: 85253
Buggy source:
private String getOriginalStyleDeclaration(){
  String qualifiers=Modifier.toString(modifiers) + "String_Node_Str" + type.toString();
  qualifiers=qualifiers.trim();
  if (qualifiers.equals("String_Node_Str"))   return Scene.v().quotedNameOf(name);
 else   return qualifiers + "String_Node_Str" + Scene.v().quotedNameOf(name)+ "String_Node_Str";
}

Fixed version (ground truth):
private String getOriginalStyleDeclaration(){
  String qualifiers=Modifier.toString(modifiers) + "String_Node_Str" + type.toQuotedString();
  qualifiers=qualifiers.trim();
  if (qualifiers.equals("String_Node_Str"))   return Scene.v().quotedNameOf(name);
 else   return qualifiers + "String_Node_Str" + Scene.v().quotedNameOf(name)+ "String_Node_Str";
}
Program: 85254
Project: 85254
Buggy source:
public static String getSignature(SootClass cl,String name,Type type){
  StringBuffer buffer=new StringBuffer();
  buffer.append("String_Node_Str" + Scene.v().quotedNameOf(cl.getName()) + "String_Node_Str");
  buffer.append(type + "String_Node_Str" + Scene.v().quotedNameOf(name)+ "String_Node_Str");
  return buffer.toString().intern();
}

Fixed version (ground truth):
public static String getSignature(SootClass cl,String name,Type type){
  StringBuffer buffer=new StringBuffer();
  buffer.append("String_Node_Str" + Scene.v().quotedNameOf(cl.getName()) + "String_Node_Str");
  buffer.append(type.toQuotedString() + "String_Node_Str" + Scene.v().quotedNameOf(name)+ "String_Node_Str");
  return buffer.toString().intern();
}
Program: 85255
Project: 85255
Buggy source:
/** 
 * Returns the declaration of this method, as used at the top of textual body representations  (before the {}'s containing the code for representation.)
 */
public String getDeclaration(){
  StringBuffer buffer=new StringBuffer();
  StringTokenizer st=new StringTokenizer(Modifier.toString(this.getModifiers()));
  if (st.hasMoreTokens())   buffer.append(st.nextToken());
  while (st.hasMoreTokens())   buffer.append("String_Node_Str" + st.nextToken());
  if (buffer.length() != 0)   buffer.append("String_Node_Str");
  buffer.append(this.getReturnType() + "String_Node_Str");
  buffer.append(Scene.v().quotedNameOf(this.getName()));
  buffer.append("String_Node_Str");
  Iterator<Type> typeIt=this.getParameterTypes().iterator();
  while (typeIt.hasNext()) {
    Type t=(Type)typeIt.next();
    buffer.append(t);
    if (typeIt.hasNext())     buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  if (exceptions != null) {
    Iterator<SootClass> exceptionIt=this.getExceptions().iterator();
    if (exceptionIt.hasNext()) {
      buffer.append("String_Node_Str" + exceptionIt.next().getName());
      while (exceptionIt.hasNext()) {
        buffer.append("String_Node_Str" + exceptionIt.next().getName());
      }
    }
  }
  return buffer.toString().intern();
}

Fixed version (ground truth):
/** 
 * Returns the declaration of this method, as used at the top of textual body representations  (before the {}'s containing the code for representation.)
 */
public String getDeclaration(){
  StringBuffer buffer=new StringBuffer();
  StringTokenizer st=new StringTokenizer(Modifier.toString(this.getModifiers()));
  if (st.hasMoreTokens())   buffer.append(st.nextToken());
  while (st.hasMoreTokens())   buffer.append("String_Node_Str" + st.nextToken());
  if (buffer.length() != 0)   buffer.append("String_Node_Str");
  buffer.append(this.getReturnType().toQuotedString() + "String_Node_Str");
  buffer.append(Scene.v().quotedNameOf(this.getName()));
  buffer.append("String_Node_Str");
  Iterator<Type> typeIt=this.getParameterTypes().iterator();
  while (typeIt.hasNext()) {
    Type t=(Type)typeIt.next();
    buffer.append(t.toQuotedString());
    if (typeIt.hasNext())     buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  if (exceptions != null) {
    Iterator<SootClass> exceptionIt=this.getExceptions().iterator();
    if (exceptionIt.hasNext()) {
      buffer.append("String_Node_Str" + Scene.v().quotedNameOf(exceptionIt.next().getName()));
      while (exceptionIt.hasNext()) {
        buffer.append("String_Node_Str" + Scene.v().quotedNameOf(exceptionIt.next().getName()));
      }
    }
  }
  return buffer.toString().intern();
}
Program: 85256
Project: 85256
Buggy source:
private static String getSubSignatureImpl(String name,List<Type> params,Type returnType){
  StringBuilder buffer=new StringBuilder();
  buffer.append(returnType.getEscapedName());
  buffer.append("String_Node_Str");
  buffer.append(Scene.v().quotedNameOf(name));
  buffer.append("String_Node_Str");
  for (int i=0; i < params.size(); i++) {
    buffer.append(params.get(i).getEscapedName());
    if (i < params.size() - 1)     buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  return buffer.toString().intern();
}

Fixed version (ground truth):
private static String getSubSignatureImpl(String name,List<Type> params,Type returnType){
  StringBuilder buffer=new StringBuilder();
  buffer.append(returnType.toQuotedString());
  buffer.append("String_Node_Str");
  buffer.append(Scene.v().quotedNameOf(name));
  buffer.append("String_Node_Str");
  for (int i=0; i < params.size(); i++) {
    buffer.append(params.get(i).toQuotedString());
    if (i < params.size() - 1)     buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  return buffer.toString().intern();
}
Program: 85257
Project: 85257
Buggy source:
/** 
 * Returns a (possibly not yet resolved) SootClass to be used in references to a class. If/when the class is resolved, it will be resolved into this SootClass.
 */
public SootClass makeClassRef(String className){
  className=Scene.v().unescapeName(className);
  if (Scene.v().containsClass(className))   return Scene.v().getSootClass(className);
  SootClass newClass;
  newClass=new SootClass(className);
  newClass.setResolvingLevel(SootClass.DANGLING);
  Scene.v().addClass(newClass);
  return newClass;
}

Fixed version (ground truth):
/** 
 * Returns a (possibly not yet resolved) SootClass to be used in references to a class. If/when the class is resolved, it will be resolved into this SootClass.
 */
public SootClass makeClassRef(String className){
  if (Scene.v().containsClass(className))   return Scene.v().getSootClass(className);
  SootClass newClass;
  newClass=new SootClass(className);
  newClass.setResolvingLevel(SootClass.DANGLING);
  Scene.v().addClass(newClass);
  return newClass;
}
Program: 85258
Project: 85258
Buggy source:
public void caseAFile(AFile node){
  inAFile(node);
{
    Object temp[]=node.getModifier().toArray();
    for (    Object element : temp) {
      ((PModifier)element).apply(this);
    }
  }
  if (node.getFileType() != null) {
    node.getFileType().apply(this);
  }
  if (node.getClassName() != null) {
    node.getClassName().apply(this);
  }
  String className=(String)mProductions.removeLast();
  if (!className.equals(Scene.v().quotedNameOf(mSootClass.getName())))   throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ mSootClass.getName());
  if (node.getExtendsClause() != null) {
    node.getExtendsClause().apply(this);
  }
  if (node.getImplementsClause() != null) {
    node.getImplementsClause().apply(this);
  }
  if (node.getFileBody() != null) {
    node.getFileBody().apply(this);
  }
  outAFile(node);
}

Fixed version (ground truth):
public void caseAFile(AFile node){
  inAFile(node);
{
    Object temp[]=node.getModifier().toArray();
    for (    Object element : temp) {
      ((PModifier)element).apply(this);
    }
  }
  if (node.getFileType() != null) {
    node.getFileType().apply(this);
  }
  if (node.getClassName() != null) {
    node.getClassName().apply(this);
  }
  String className=(String)mProductions.removeLast();
  if (!className.equals(mSootClass.getName()))   throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ mSootClass.getName());
  if (node.getExtendsClause() != null) {
    node.getExtendsClause().apply(this);
  }
  if (node.getImplementsClause() != null) {
    node.getImplementsClause().apply(this);
  }
  if (node.getFileBody() != null) {
    node.getFileBody().apply(this);
  }
  outAFile(node);
}
Program: 85259
Project: 85259
Buggy source:
public void outAFullIdentClassName(AFullIdentClassName node){
  String tokenString=node.getFullIdentifier().getText();
  tokenString=StringTools.getUnEscapedStringOf(tokenString);
  mRefTypes.add(tokenString);
}

Fixed version (ground truth):
public void outAFullIdentClassName(AFullIdentClassName node){
  String tokenString=node.getFullIdentifier().getText();
  tokenString=Scene.v().unescapeName(tokenString);
  tokenString=StringTools.getUnEscapedStringOf(tokenString);
  mRefTypes.add(tokenString);
}
Program: 85260
Project: 85260
Buggy source:
public void outAFullIdentNonvoidType(AFullIdentNonvoidType node){
  String tokenString=node.getFullIdentifier().getText();
  tokenString=StringTools.getUnEscapedStringOf(tokenString);
  mRefTypes.add(tokenString);
}

Fixed version (ground truth):
public void outAFullIdentNonvoidType(AFullIdentNonvoidType node){
  String tokenString=node.getFullIdentifier().getText();
  tokenString=Scene.v().unescapeName(tokenString);
  tokenString=StringTools.getUnEscapedStringOf(tokenString);
  mRefTypes.add(tokenString);
}
Program: 85261
Project: 85261
Buggy source:
public void caseAFile(AFile node){
  inAFile(node);
{
    Object temp[]=node.getModifier().toArray();
    for (    Object element : temp) {
      ((PModifier)element).apply(this);
    }
  }
  if (node.getFileType() != null) {
    node.getFileType().apply(this);
  }
  if (node.getClassName() != null) {
    node.getClassName().apply(this);
  }
  String className=(String)mProductions.removeLast();
  className=Scene.v().unescapeName(className);
  if (mSootClass == null) {
    mSootClass=new SootClass(className);
    mSootClass.setResolvingLevel(SootClass.SIGNATURES);
  }
 else {
    if (!className.equals(mSootClass.getName()))     throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ mSootClass.getName());
  }
  if (node.getExtendsClause() != null) {
    node.getExtendsClause().apply(this);
  }
  if (node.getImplementsClause() != null) {
    node.getImplementsClause().apply(this);
  }
  if (node.getFileBody() != null) {
    node.getFileBody().apply(this);
  }
  outAFile(node);
}

Fixed version (ground truth):
public void caseAFile(AFile node){
  inAFile(node);
{
    Object temp[]=node.getModifier().toArray();
    for (    Object element : temp) {
      ((PModifier)element).apply(this);
    }
  }
  if (node.getFileType() != null) {
    node.getFileType().apply(this);
  }
  if (node.getClassName() != null) {
    node.getClassName().apply(this);
  }
  String className=(String)mProductions.removeLast();
  if (mSootClass == null) {
    mSootClass=new SootClass(className);
    mSootClass.setResolvingLevel(SootClass.SIGNATURES);
  }
 else {
    if (!className.equals(mSootClass.getName()))     throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ mSootClass.getName());
  }
  if (node.getExtendsClause() != null) {
    node.getExtendsClause().apply(this);
  }
  if (node.getImplementsClause() != null) {
    node.getImplementsClause().apply(this);
  }
  if (node.getFileBody() != null) {
    node.getFileBody().apply(this);
  }
  outAFile(node);
}
Program: 85262
Project: 85262
Buggy source:
public void defaultCase(Node node){
  if (node instanceof TQuotedName || node instanceof TFullIdentifier || node instanceof TIdentifier|| node instanceof TStringConstant|| node instanceof TIntegerConstant|| node instanceof TFloatConstant|| node instanceof TAtIdentifier) {
    if (debug)     G.v().out.println("String_Node_Str" + ((Token)node).getText());
    String tokenString=((Token)node).getText();
    if (node instanceof TStringConstant || node instanceof TQuotedName) {
      tokenString=tokenString.substring(1,tokenString.length() - 1);
    }
    if (node instanceof TIdentifier || node instanceof TFullIdentifier || node instanceof TQuotedName|| node instanceof TStringConstant) {
      try {
        tokenString=StringTools.getUnEscapedStringOf(tokenString);
      }
 catch (      RuntimeException e) {
        G.v().out.println("String_Node_Str" + tokenString);
      }
    }
    mProductions.addLast(tokenString);
  }
}

Fixed version (ground truth):
public void defaultCase(Node node){
  if (node instanceof TQuotedName || node instanceof TFullIdentifier || node instanceof TIdentifier|| node instanceof TStringConstant|| node instanceof TIntegerConstant|| node instanceof TFloatConstant|| node instanceof TAtIdentifier) {
    if (debug)     G.v().out.println("String_Node_Str" + ((Token)node).getText());
    String tokenString=((Token)node).getText();
    if (node instanceof TStringConstant || node instanceof TQuotedName) {
      tokenString=tokenString.substring(1,tokenString.length() - 1);
    }
 else     if (node instanceof TFullIdentifier) {
      tokenString=Scene.v().unescapeName(tokenString);
    }
    if (node instanceof TIdentifier || node instanceof TFullIdentifier || node instanceof TQuotedName|| node instanceof TStringConstant) {
      try {
        tokenString=StringTools.getUnEscapedStringOf(tokenString);
      }
 catch (      RuntimeException e) {
        G.v().out.println("String_Node_Str" + tokenString);
      }
    }
    mProductions.addLast(tokenString);
  }
}
Program: 85267
Project: 85267
Buggy source:
/** 
 * Seems that representation of Annotation type in Soot is not  consistent with the normal type representation. Normal type representation would be a.b.c.ClassName Java bytecode representation is La/b/c/ClassName; Soot Annotation type representation (and Jasmin's) is a/b/c/ClassName. This method transforms the Java bytecode representation into the Soot annotation type representation. Ljava/lang/Class<Ljava/lang/Enum<*>;>; becomes java/lang/Class<java/lang/Enum<*>>
 * @param type
 * @param pos
 * @return
 */
public static String toSootICAT(String type){
  String r="String_Node_Str";
  String[] split1=type.split("String_Node_Str");
  for (  String s : split1) {
    if (s.startsWith("String_Node_Str"))     s=s.replaceFirst("String_Node_Str","String_Node_Str");
    if (s.startsWith("String_Node_Str"))     s=s.replaceFirst("String_Node_Str","String_Node_Str");
    r+=s;
  }
  return r;
}

Fixed version (ground truth):
/** 
 * Seems that representation of Annotation type in Soot is not  consistent with the normal type representation. Normal type representation would be a.b.c.ClassName Java bytecode representation is La/b/c/ClassName; Soot Annotation type representation (and Jasmin's) is a/b/c/ClassName. This method transforms the Java bytecode representation into the Soot annotation type representation. Ljava/lang/Class<Ljava/lang/Enum<*>;>; becomes java/lang/Class<java/lang/Enum<*>>
 * @param type
 * @param pos
 * @return
 */
public static String toSootICAT(String type){
  type=type.replace("String_Node_Str","String_Node_Str");
  String r="String_Node_Str";
  String[] split1=type.split("String_Node_Str");
  for (  String s : split1) {
    if (s.startsWith("String_Node_Str"))     s=s.replaceFirst("String_Node_Str","String_Node_Str");
    if (s.startsWith("String_Node_Str"))     s=s.replaceFirst("String_Node_Str","String_Node_Str");
    r+=s;
  }
  return r;
}
Program: 85268
Project: 85268
Buggy source:
/** 
 * Uses methodSource to retrieve the method body in question; does not set it to be the active body.
 * @param phaseName       Phase name for body loading. 
 */
private Body getBodyFromMethodSource(String phaseName){
  if (ms == null)   throw new RuntimeException("String_Node_Str" + this.getSignature());
  return ms.getBody(this,phaseName);
}

Fixed version (ground truth):
/** 
 * Uses methodSource to retrieve the method body in question; does not set it to be the active body.
 * @param phaseName       Phase name for body loading. 
 */
private Body getBodyFromMethodSource(String phaseName){
  MethodSource ms=this.ms;
  if (this.activeBody == null) {
    if (ms == null)     throw new RuntimeException("String_Node_Str" + this.getSignature());
    return ms.getBody(this,phaseName);
  }
 else   return this.activeBody;
}
Program: 85272
Project: 85272
Buggy source:
@Override public void caseXorExpr(XorExpr xe){
  Value firstOperand=xe.getOp1();
  Value secondOperand=xe.getOp2();
  constantV.setOrigStmt(origStmt);
  if (secondOperand.equals(IntConstant.v(-1))) {
    Register sourceReg=regAlloc.asImmediate(firstOperand,constantV);
    stmtV.addInsn(new Insn12x(Opcode.NOT_INT,destinationReg,sourceReg),origStmt);
  }
 else   if (secondOperand.equals(LongConstant.v(-1))) {
    Register sourceReg=regAlloc.asImmediate(firstOperand,constantV);
    stmtV.addInsn(new Insn12x(Opcode.NOT_LONG,destinationReg,sourceReg),origStmt);
  }
 else {
    buildCalculatingBinaryInsn("String_Node_Str",firstOperand,secondOperand,xe);
  }
}

Fixed version (ground truth):
@Override public void caseXorExpr(XorExpr xe){
  Value firstOperand=xe.getOp1();
  Value secondOperand=xe.getOp2();
  constantV.setOrigStmt(origStmt);
  if (secondOperand.equals(IntConstant.v(-1)) || secondOperand.equals(LongConstant.v(-1))) {
    PrimitiveType destRegType=PrimitiveType.getByName(destinationReg.getType().toString());
    Register orgDestReg=destinationReg;
    if (isBiggerThan(PrimitiveType.getByName(secondOperand.getType().toString()),destRegType)) {
      destinationReg=regAlloc.asTmpReg(IntType.v());
    }
    if (secondOperand.equals(IntConstant.v(-1))) {
      Register sourceReg=regAlloc.asImmediate(firstOperand,constantV);
      stmtV.addInsn(new Insn12x(Opcode.NOT_INT,destinationReg,sourceReg),origStmt);
    }
 else     if (secondOperand.equals(LongConstant.v(-1))) {
      Register sourceReg=regAlloc.asImmediate(firstOperand,constantV);
      stmtV.addInsn(new Insn12x(Opcode.NOT_LONG,destinationReg,sourceReg),origStmt);
    }
    if (orgDestReg != destinationReg) {
      Register tempReg=destinationReg.clone();
      destinationReg=orgDestReg.clone();
      castPrimitive(tempReg,secondOperand,destinationReg.getType());
    }
  }
 else {
    buildCalculatingBinaryInsn("String_Node_Str",firstOperand,secondOperand,xe);
  }
}
Program: 85273
Project: 85273
Buggy source:
public NumberedString findOrAdd(String s){
  NumberedString numStr=new NumberedString(s);
  NumberedString ret=stringToNumbered.putIfAbsent(s,numStr);
  if (ret == null) {
    add(numStr);
    return numStr;
  }
  return ret;
}

Fixed version (ground truth):
public synchronized NumberedString findOrAdd(String s){
  NumberedString numStr=new NumberedString(s);
  NumberedString ret=stringToNumbered.putIfAbsent(s,numStr);
  if (ret == null) {
    add(numStr);
    return numStr;
  }
  return ret;
}
Program: 85275
Project: 85275
Buggy source:
private void castPrimitive(Register sourceReg,Value source,Type castSootType){
  PrimitiveType castType=PrimitiveType.getByName(castSootType.toString());
  if (castType == PrimitiveType.INT && source.getType() instanceof NullType)   source=IntConstant.v(0);
  PrimitiveType sourceType=PrimitiveType.getByName(source.getType().toString());
  if (castType == PrimitiveType.BOOLEAN) {
    castType=PrimitiveType.INT;
    sourceType=PrimitiveType.INT;
  }
  if (shouldCastFromInt(sourceType,castType)) {
    sourceType=PrimitiveType.INT;
    Opcode opc=getCastOpc(sourceType,castType);
    stmtV.addInsn(new Insn12x(opc,destinationReg,sourceReg),origStmt);
  }
 else   if (isMoveCompatible(sourceType,castType)) {
    if (destinationReg.getNumber() != sourceReg.getNumber()) {
      stmtV.addInsn(StmtVisitor.buildMoveInsn(destinationReg,sourceReg),origStmt);
    }
  }
 else   if (needsCastThroughInt(sourceType,castType)) {
    Opcode castToIntOpc=getCastOpc(sourceType,PrimitiveType.INT);
    Opcode castFromIntOpc=getCastOpc(PrimitiveType.INT,castType);
    Register tmp=regAlloc.asTmpReg(IntType.v());
    stmtV.addInsn(new Insn12x(castToIntOpc,tmp,sourceReg),origStmt);
    stmtV.addInsn(new Insn12x(castFromIntOpc,destinationReg,tmp.clone()),origStmt);
  }
 else {
    Opcode opc=getCastOpc(sourceType,castType);
    stmtV.addInsn(new Insn12x(opc,destinationReg,sourceReg),origStmt);
  }
}

Fixed version (ground truth):
private void castPrimitive(Register sourceReg,Value source,Type castSootType){
  PrimitiveType castType=PrimitiveType.getByName(castSootType.toString());
  if (castType == PrimitiveType.INT && source.getType() instanceof NullType)   source=IntConstant.v(0);
  Type srcType=source.getType();
  if (srcType instanceof RefType)   throw new RuntimeException("String_Node_Str" + srcType + "String_Node_Str");
  PrimitiveType sourceType=PrimitiveType.getByName(srcType.toString());
  if (castType == PrimitiveType.BOOLEAN) {
    castType=PrimitiveType.INT;
    sourceType=PrimitiveType.INT;
  }
  if (shouldCastFromInt(sourceType,castType)) {
    sourceType=PrimitiveType.INT;
    Opcode opc=getCastOpc(sourceType,castType);
    stmtV.addInsn(new Insn12x(opc,destinationReg,sourceReg),origStmt);
  }
 else   if (isMoveCompatible(sourceType,castType)) {
    if (destinationReg.getNumber() != sourceReg.getNumber()) {
      stmtV.addInsn(StmtVisitor.buildMoveInsn(destinationReg,sourceReg),origStmt);
    }
  }
 else   if (needsCastThroughInt(sourceType,castType)) {
    Opcode castToIntOpc=getCastOpc(sourceType,PrimitiveType.INT);
    Opcode castFromIntOpc=getCastOpc(PrimitiveType.INT,castType);
    Register tmp=regAlloc.asTmpReg(IntType.v());
    stmtV.addInsn(new Insn12x(castToIntOpc,tmp,sourceReg),origStmt);
    stmtV.addInsn(new Insn12x(castFromIntOpc,destinationReg,tmp.clone()),origStmt);
  }
 else {
    Opcode opc=getCastOpc(sourceType,castType);
    stmtV.addInsn(new Insn12x(opc,destinationReg,sourceReg),origStmt);
  }
}
Program: 85277
Project: 85277
Buggy source:
/** 
 * Load the set of classes that soot needs, including those specified on the command-line. This is the standard way of initialising the list of classes soot should use.
 */
public void loadNecessaryClasses(){
  loadBasicClasses();
  for (  String name : Options.v().classes()) {
    loadNecessaryClass(name);
  }
  loadDynamicClasses();
  if (Options.v().oaat()) {
    if (Options.v().process_dir().isEmpty()) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    for (    final String path : Options.v().process_dir()) {
      for (      String cl : SourceLocator.v().getClassesUnder(path)) {
        SootClass theClass=loadClassAndSupport(cl);
        theClass.setApplicationClass();
      }
    }
  }
  prepareClasses();
  setDoneResolving();
}

Fixed version (ground truth):
/** 
 * Load the set of classes that soot needs, including those specified on the command-line. This is the standard way of initialising the list of classes soot should use.
 */
public void loadNecessaryClasses(){
  loadBasicClasses();
  for (  String name : Options.v().classes()) {
    loadNecessaryClass(name);
  }
  loadDynamicClasses();
  if (Options.v().oaat()) {
    if (Options.v().process_dir().isEmpty()) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    for (    final String path : Options.v().process_dir()) {
      for (      String cl : SourceLocator.v().getClassesUnder(path)) {
        SootClass theClass=loadClassAndSupport(cl);
        if (!theClass.isPhantom)         theClass.setApplicationClass();
      }
    }
  }
  prepareClasses();
  setDoneResolving();
}
Program: 85278
Project: 85278
Buggy source:
private static Collection<AncestryTreeNode> buildAncestryTree(RefType root){
  LinkedList<AncestryTreeNode> leafs=new LinkedList<AncestryTreeNode>();
  leafs.add(new AncestryTreeNode(null,root));
  LinkedList<AncestryTreeNode> r=new LinkedList<AncestryTreeNode>();
  while (!leafs.isEmpty()) {
    AncestryTreeNode node=leafs.remove();
    if (TypeResolver.typesEqual(node.type,RefType.v("String_Node_Str")))     r.add(node);
 else {
      SootClass sc=node.type.getSootClass();
      for (Iterator<SootClass> i=sc.getInterfaces().iterator(); i.hasNext(); )       leafs.add(new AncestryTreeNode(node,(i.next()).getType()));
      if ((!sc.isInterface() || sc.getInterfaceCount() == 0) && !sc.isPhantom())       leafs.add(new AncestryTreeNode(node,sc.getSuperclass().getType()));
    }
  }
  return r;
}

Fixed version (ground truth):
private static Collection<AncestryTreeNode> buildAncestryTree(RefType root){
  if (root.getSootClass().isPhantom())   return Collections.emptyList();
  LinkedList<AncestryTreeNode> leafs=new LinkedList<AncestryTreeNode>();
  leafs.add(new AncestryTreeNode(null,root));
  LinkedList<AncestryTreeNode> r=new LinkedList<AncestryTreeNode>();
  final RefType objectType=RefType.v("String_Node_Str");
  while (!leafs.isEmpty()) {
    AncestryTreeNode node=leafs.remove();
    if (TypeResolver.typesEqual(node.type,objectType))     r.add(node);
 else {
      SootClass sc=node.type.getSootClass();
      for (      SootClass i : sc.getInterfaces())       leafs.add(new AncestryTreeNode(node,(i).getType()));
      if ((!sc.isInterface() || sc.getInterfaceCount() == 0) && !sc.isPhantom())       leafs.add(new AncestryTreeNode(node,sc.getSuperclass().getType()));
    }
  }
  return r;
}
Program: 85280
Project: 85280
Buggy source:
private String getOuterClassNameFromTag(InnerClassTag icTag){
  String outerClass;
  if (icTag.getOuterClass() == null) {
    outerClass=icTag.getInnerClass().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  }
 else {
    outerClass=icTag.getOuterClass().replaceAll("String_Node_Str","String_Node_Str");
  }
  return outerClass;
}

Fixed version (ground truth):
private String getOuterClassNameFromTag(InnerClassTag icTag){
  String outerClass;
  if (icTag.getOuterClass() == null) {
    String inner=icTag.getInnerClass().replaceAll("String_Node_Str","String_Node_Str");
    if (inner.contains("String_Node_Str")) {
      outerClass=inner.substring(0,inner.indexOf("String_Node_Str"));
    }
 else     if (inner.contains("String_Node_Str")) {
      outerClass=inner.substring(0,inner.lastIndexOf('$'));
    }
 else {
      throw new RuntimeException("String_Node_Str" + inner + "String_Node_Str");
    }
  }
 else {
    outerClass=icTag.getOuterClass().replaceAll("String_Node_Str","String_Node_Str");
  }
  return outerClass;
}
Program: 85281
Project: 85281
Buggy source:
public Dependencies resolve(SootClass sc){
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className);
  InputStream classFile=null;
  try {
    classFile=foundFile.inputStream();
    soot.jimple.parser.JimpleAST jimpAST=new soot.jimple.parser.JimpleAST(classFile);
    jimpAST.getSkeleton(sc);
    JimpleMethodSource mtdSrc=new JimpleMethodSource(jimpAST);
    Iterator<SootMethod> mtdIt=sc.methodIterator();
    while (mtdIt.hasNext()) {
      SootMethod sm=mtdIt.next();
      sm.setSource(mtdSrc);
    }
    Dependencies deps=new Dependencies();
    for (    String t : jimpAST.getCstPool()) {
      deps.typesToSignature.add(RefType.v(t));
    }
    return deps;
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
catch (  ParserException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
catch (  LexerException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
 finally {
    try {
      if (classFile != null) {
        classFile.close();
        classFile=null;
      }
    }
 catch (    IOException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
 finally {
      close();
    }
  }
}

Fixed version (ground truth):
public Dependencies resolve(SootClass sc){
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className);
  InputStream classFile=null;
  try {
    classFile=foundFile.inputStream();
    soot.jimple.parser.JimpleAST jimpAST=new soot.jimple.parser.JimpleAST(classFile);
    jimpAST.getSkeleton(sc);
    JimpleMethodSource mtdSrc=new JimpleMethodSource(jimpAST);
    Iterator<SootMethod> mtdIt=sc.methodIterator();
    while (mtdIt.hasNext()) {
      SootMethod sm=mtdIt.next();
      sm.setSource(mtdSrc);
    }
    String outerClassName=null;
    String className=sc.getName();
    if (!sc.hasOuterClass() && className.contains("String_Node_Str")) {
      if (className.contains("String_Node_Str")) {
        outerClassName=className.substring(0,className.indexOf("String_Node_Str"));
      }
 else {
        outerClassName=className.substring(0,className.lastIndexOf('$'));
      }
      sc.setOuterClass(SootResolver.v().makeClassRef(outerClassName));
    }
    Dependencies deps=new Dependencies();
    for (    String t : jimpAST.getCstPool()) {
      deps.typesToSignature.add(RefType.v(t));
    }
    if (outerClassName != null)     deps.typesToSignature.add(RefType.v(outerClassName));
    return deps;
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
catch (  ParserException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
catch (  LexerException e) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str",e);
  }
 finally {
    try {
      if (classFile != null) {
        classFile.close();
        classFile=null;
      }
    }
 catch (    IOException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
 finally {
      close();
    }
  }
}