nus-yam/ex-repair huggingface dataset:
Program: 38252
Project: 38252
Buggy source:
/** 
 * Add flows from the special primitive functions to the corresponding global variables.
 * @param flowgraph the flow graph under construction
 */
private void addPrimitives(FlowGraph flowgraph){
  VertexFactory factory=flowgraph.getVertexFactory();
  for (  String pf : primitiveFunctions) {
    TypeReference typeref=TypeReference.findOrCreate(JavaScriptTypes.jsLoader,"String_Node_Str" + pf);
    IClass klass=cha.lookupClass(typeref);
    flowgraph.addEdge(factory.makeFuncVertex(klass),factory.makePropVertex(pf));
  }
}

Fixed version (ground truth):
/** 
 * Add flows from the special primitive functions to the corresponding global variables.
 * @param flowgraph the flow graph under construction
 */
private void addPrimitives(FlowGraph flowgraph){
  VertexFactory factory=flowgraph.getVertexFactory();
  for (  String pf : primitiveFunctions) {
    TypeReference typeref=TypeReference.findOrCreate(JavaScriptTypes.jsLoader,"String_Node_Str" + pf);
    IClass klass=cha.lookupClass(typeref);
    String prop=pf.endsWith("String_Node_Str") ? pf.substring(0,pf.length() - 6) : pf;
    flowgraph.addEdge(factory.makeFuncVertex(klass),factory.makePropVertex(prop));
  }
}
Program: 38253
Project: 38253
Buggy source:
@Override public int getLastCol(){
  return e.getSource().getRowColumnVector(e.getEnd()).getColumn();
}

Fixed version (ground truth):
@Override public int getLastCol(){
  return -1;
}
Program: 38254
Project: 38254
Buggy source:
private Position getPosition(final Segment e){
  return new AbstractSourcePosition(){
    @Override public int getFirstLine(){
      return e.getSource().getRowColumnVector(e.getBegin()).getRow();
    }
    @Override public int getLastLine(){
      return e.getSource().getRowColumnVector(e.getEnd()).getRow();
    }
    @Override public int getFirstCol(){
      return e.getSource().getRowColumnVector(e.getBegin()).getColumn();
    }
    @Override public int getLastCol(){
      return e.getSource().getRowColumnVector(e.getEnd()).getColumn();
    }
    @Override public int getFirstOffset(){
      return e.getBegin();
    }
    @Override public int getLastOffset(){
      return e.getEnd();
    }
    @Override public URL getURL(){
      try {
        return new URL("String_Node_Str" + sourceFile);
      }
 catch (      MalformedURLException e) {
        return null;
      }
    }
    @Override public InputStream getInputStream() throws IOException {
      return new FileInputStream(sourceFile);
    }
  }
;
}

Fixed version (ground truth):
private Position getPosition(final Segment e){
  return new AbstractSourcePosition(){
    @Override public int getFirstLine(){
      return e.getSource().getRowColumnVector(e.getBegin()).getRow();
    }
    @Override public int getLastLine(){
      return e.getSource().getRowColumnVector(e.getEnd()).getRow();
    }
    @Override public int getFirstCol(){
      return -1;
    }
    @Override public int getLastCol(){
      return -1;
    }
    @Override public int getFirstOffset(){
      return e.getBegin();
    }
    @Override public int getLastOffset(){
      return e.getEnd();
    }
    @Override public URL getURL(){
      try {
        return new URL("String_Node_Str" + sourceFile);
      }
 catch (      MalformedURLException e) {
        return null;
      }
    }
    @Override public Reader getReader() throws IOException {
      return new FileReader(sourceFile);
    }
  }
;
}
Program: 38255
Project: 38255
Buggy source:
public Pair<Integer,String> getBodyText(){
  Segment content=innerElement.getContent();
  Integer lineNum=innerElement.getSource().getRow(content.getBegin());
  String body=content.toString();
  return Pair.make(lineNum,body);
}

Fixed version (ground truth):
public Pair<Integer,String> getBodyText(){
  Segment content=innerElement.getContent();
  Integer lineNum=innerElement.getSource().getRow(content.getBegin());
  String body=content.toString().replace(content.getSource().getNewLine(),"String_Node_Str");
  return Pair.make(lineNum,body);
}
Program: 38256
Project: 38256
Buggy source:
@Override public int getFirstCol(){
  return e.getSource().getRowColumnVector(e.getBegin()).getColumn();
}

Fixed version (ground truth):
@Override public int getFirstCol(){
  return -1;
}
Program: 38259
Project: 38259
Buggy source:
@Override public int getLastCol(){
  return e.getSource().getRowColumnVector(e.getEnd()).getColumn();
}

Fixed version (ground truth):
@Override public int getLastCol(){
  return -1;
}
Program: 38260
Project: 38260
Buggy source:
private Position getPosition(final Segment e){
  return new AbstractSourcePosition(){
    @Override public int getFirstLine(){
      return e.getSource().getRowColumnVector(e.getBegin()).getRow();
    }
    @Override public int getLastLine(){
      return e.getSource().getRowColumnVector(e.getEnd()).getRow();
    }
    @Override public int getFirstCol(){
      return e.getSource().getRowColumnVector(e.getBegin()).getColumn();
    }
    @Override public int getLastCol(){
      return e.getSource().getRowColumnVector(e.getEnd()).getColumn();
    }
    @Override public int getFirstOffset(){
      return e.getBegin();
    }
    @Override public int getLastOffset(){
      return e.getEnd();
    }
    @Override public URL getURL(){
      try {
        return new URL("String_Node_Str" + sourceFile);
      }
 catch (      MalformedURLException e) {
        return null;
      }
    }
    @Override public InputStream getInputStream() throws IOException {
      return new FileInputStream(sourceFile);
    }
  }
;
}

Fixed version (ground truth):
private Position getPosition(final Segment e){
  return new AbstractSourcePosition(){
    @Override public int getFirstLine(){
      return e.getSource().getRowColumnVector(e.getBegin()).getRow();
    }
    @Override public int getLastLine(){
      return e.getSource().getRowColumnVector(e.getEnd()).getRow();
    }
    @Override public int getFirstCol(){
      return -1;
    }
    @Override public int getLastCol(){
      return -1;
    }
    @Override public int getFirstOffset(){
      return e.getBegin();
    }
    @Override public int getLastOffset(){
      return e.getEnd();
    }
    @Override public URL getURL(){
      try {
        return new URL("String_Node_Str" + sourceFile);
      }
 catch (      MalformedURLException e) {
        return null;
      }
    }
    @Override public Reader getReader() throws IOException {
      return new FileReader(sourceFile);
    }
  }
;
}
Program: 38261
Project: 38261
Buggy source:
public Pair<Integer,String> getBodyText(){
  Segment content=innerElement.getContent();
  Integer lineNum=innerElement.getSource().getRow(content.getBegin());
  String body=content.toString();
  return Pair.make(lineNum,body);
}

Fixed version (ground truth):
public Pair<Integer,String> getBodyText(){
  Segment content=innerElement.getContent();
  Integer lineNum=innerElement.getSource().getRow(content.getBegin());
  String body=content.toString().replace(content.getSource().getNewLine(),"String_Node_Str");
  return Pair.make(lineNum,body);
}
Program: 38262
Project: 38262
Buggy source:
@Override public int getFirstCol(){
  return e.getSource().getRowColumnVector(e.getBegin()).getColumn();
}

Fixed version (ground truth):
@Override public int getFirstCol(){
  return -1;
}
Program: 38265
Project: 38265
Buggy source:
/** 
 * Add flows from the special primitive functions to the corresponding global variables.
 * @param flowgraph the flow graph under construction
 */
private void addPrimitives(FlowGraph flowgraph){
  VertexFactory factory=flowgraph.getVertexFactory();
  for (  String pf : primitiveFunctions) {
    TypeReference typeref=TypeReference.findOrCreate(JavaScriptTypes.jsLoader,"String_Node_Str" + pf);
    IClass klass=cha.lookupClass(typeref);
    flowgraph.addEdge(factory.makeFuncVertex(klass),factory.makePropVertex(pf));
  }
}

Fixed version (ground truth):
/** 
 * Add flows from the special primitive functions to the corresponding global variables.
 * @param flowgraph the flow graph under construction
 */
private void addPrimitives(FlowGraph flowgraph){
  VertexFactory factory=flowgraph.getVertexFactory();
  for (  String pf : primitiveFunctions) {
    TypeReference typeref=TypeReference.findOrCreate(JavaScriptTypes.jsLoader,"String_Node_Str" + pf);
    IClass klass=cha.lookupClass(typeref);
    String prop=pf.endsWith("String_Node_Str") ? pf.substring(0,pf.length() - 6) : pf;
    flowgraph.addEdge(factory.makeFuncVertex(klass),factory.makePropVertex(prop));
  }
}
Program: 38266
Project: 38266
Buggy source:
public final Set<TypeReference> getUnresolvedClasses(){
  return unresolved;
}

Fixed version (ground truth):
@Override public final Set<TypeReference> getUnresolvedClasses(){
  return unresolved;
}
Program: 38267
Project: 38267
Buggy source:
/** 
 * Find a class in this class hierarchy.
 * @return the {@link IClass} for a if found; null if can't find the class.
 * @throws IllegalArgumentException if A is null
 */
@Override public IClass lookupClass(TypeReference a){
  if (a == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ClassLoaderReference loader=a.getClassLoader();
  ClassLoaderReference parent=loader.getParent();
  if (parent != null) {
    TypeReference p=TypeReference.findOrCreate(parent,a.getName());
    IClass c=lookupClass(p);
    if (c != null) {
      return c;
    }
  }
  if (a.isArrayType()) {
    TypeReference elt=a.getInnermostElementType();
    if (elt.isPrimitiveType()) {
      return getRootClass().getClassLoader().lookupClass(a.getName());
    }
 else {
      IClass c=lookupClass(elt);
      if (c == null) {
        unresolved.add(elt);
        return null;
      }
 else {
        return c.getClassLoader().lookupClass(a.getName());
      }
    }
  }
 else {
    Node n=map.get(a);
    if (n != null) {
      return n.klass;
    }
 else {
      unresolved.add(a);
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Find a class in this class hierarchy.
 * @return the {@link IClass} for a if found; null if can't find the class.
 * @throws IllegalArgumentException if A is null
 */
@Override public IClass lookupClass(TypeReference a){
  if (a == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final IClass cls=lookupClassRecursive(a);
  if (cls == null) {
    unresolved.add(a);
  }
  return cls;
}
Program: 38269
Project: 38269
Buggy source:
/** 
 * set up the methodMap mapping
 */
protected void computeMethodMapIfNeeded() throws InvalidClassFileException {
  if (methodMap == null) {
synchronized (this) {
      if (methodMap == null) {
        IMethod[] methods=computeDeclaredMethods();
        if (methods.length > 5) {
          methodMap=HashMapFactory.make(methods.length);
        }
 else {
          methodMap=new SmallMap<Selector,IMethod>();
        }
        for (int i=0; i < methods.length; i++) {
          IMethod m=methods[i];
          methodMap.put(m.getReference().getSelector(),m);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * set up the methodMap mapping
 */
protected void computeMethodMapIfNeeded() throws InvalidClassFileException {
  if (methodMap == null) {
synchronized (this) {
      if (methodMap == null) {
        IMethod[] methods=computeDeclaredMethods();
        final Map<Selector,IMethod> tmpMethodMap;
        if (methods.length > 5) {
          tmpMethodMap=HashMapFactory.make(methods.length);
        }
 else {
          tmpMethodMap=new SmallMap<Selector,IMethod>();
        }
        for (int i=0; i < methods.length; i++) {
          IMethod m=methods[i];
          tmpMethodMap.put(m.getReference().getSelector(),m);
        }
        methodMap=tmpMethodMap;
      }
    }
  }
}
Program: 38270
Project: 38270
Buggy source:
public void unary1(){
}

Fixed version (ground truth):
@Override public void unary1(){
}
Program: 38271
Project: 38271
Buggy source:
public void unary2(){
  unary1();
}

Fixed version (ground truth):
@Override public void unary2(){
  unary1();
}
Program: 38272
Project: 38272
Buggy source:
public void binary(Whatever arg){
  this.unary1();
  arg.unary2();
}

Fixed version (ground truth):
@Override public void binary(Whatever arg){
  this.unary1();
  arg.unary2();
}
Program: 38273
Project: 38273
Buggy source:
public static void main(String[] args){
  Whatever x=new This();
  Whatever y=new That();
  Whatever z=choice() ? x : y;
  if (z instanceof This)   x.binary(z);
 else   y.binary(z);
}

Fixed version (ground truth):
public static void main(String[] args){
  Whatever x=new This();
  Whatever y=new That();
  Whatever z=choice() ? x : y;
  if (z instanceof This)   x.binary(z);
 else   y.binary(z);
  localCast();
}
Program: 38274
Project: 38274
Buggy source:
private void checkCallAssertions(CallGraph cg,int desiredNumberOfTargets,int desiredNumberOfCalls){
}

Fixed version (ground truth):
private void checkCallAssertions(CallGraph cg,int desiredNumberOfTargets,int desiredNumberOfCalls,int numLocalCastCallees){
}
Program: 38275
Project: 38275
Buggy source:
@Test public void testNoPiNodes() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  checkCallAssertions(doGraph(false),2,2);
}

Fixed version (ground truth):
@Test public void testNoPiNodes() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  checkCallAssertions(doGraph(false),2,2,2);
}
Program: 38276
Project: 38276
Buggy source:
@Test public void testPiNodes() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  checkCallAssertions(doGraph(true),1,2);
}

Fixed version (ground truth):
@Test public void testPiNodes() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  checkCallAssertions(doGraph(true),1,2,1);
}
Program: 38277
Project: 38277
Buggy source:
public void defineFunction(CAstEntity n,IClass owner,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] catchTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  ((JavaClass)owner).addMethod(n,owner,cfg,symtab,hasCatchBlock,catchTypes,hasMonitorOp,lexicalInfo,debugInfo);
}

Fixed version (ground truth):
public void defineFunction(CAstEntity n,IClass owner,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  ((JavaClass)owner).addMethod(n,owner,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo);
}
Program: 38278
Project: 38278
Buggy source:
public ConcreteJavaMethod(CAstEntity methodEntity,IClass owner,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] catchTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  super(methodEntity,owner,cfg,symtab,hasCatchBlock,catchTypes,hasMonitorOp,lexicalInfo,debugInfo);
}

Fixed version (ground truth):
public ConcreteJavaMethod(CAstEntity methodEntity,IClass owner,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  super(methodEntity,owner,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo);
}
Program: 38279
Project: 38279
Buggy source:
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
}

Fixed version (ground truth):
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
}
Program: 38280
Project: 38280
Buggy source:
@Override protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (N == codeBodyEntity) {
    specializedCode=myloader.makeCodeBodyCode(cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo,method.getDeclaringClass());
  }
 else {
    super.defineFunction(N,definingContext,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
  }
}

Fixed version (ground truth):
@Override protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (N == codeBodyEntity) {
    specializedCode=myloader.makeCodeBodyCode(cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo,method.getDeclaringClass());
  }
 else {
    super.defineFunction(N,definingContext,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
  }
}
Program: 38282
Project: 38282
Buggy source:
@Override protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  String fnName="String_Node_Str" + composeEntityName(definingContext,N);
  names.add(fnName);
  super.defineFunction(N,definingContext,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}

Fixed version (ground truth):
@Override protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  String fnName="String_Node_Str" + composeEntityName(definingContext,N);
  names.add(fnName);
  super.defineFunction(N,definingContext,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}
Program: 38284
Project: 38284
Buggy source:
public JavaScriptMethodObject makeCodeBodyCode(AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo,IClass C){
  return new JavaScriptMethodObject(C,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo);
}

Fixed version (ground truth):
public JavaScriptMethodObject makeCodeBodyCode(AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo,IClass C){
  return new JavaScriptMethodObject(C,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo);
}
Program: 38285
Project: 38285
Buggy source:
public IMethod defineCodeBodyCode(String clsName,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
}

Fixed version (ground truth):
public IMethod defineCodeBodyCode(String clsName,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
}
Program: 38286
Project: 38286
Buggy source:
JavaScriptMethodObject(IClass cls,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  super(cls,functionQualifiers,cfg,symtab,AstMethodReference.fnReference(cls.getReference()),hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo,null);
  symtab.getNullConstant();
}

Fixed version (ground truth):
JavaScriptMethodObject(IClass cls,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo){
  super(cls,functionQualifiers,cfg,symtab,AstMethodReference.fnReference(cls.getReference()),hasCatchBlock,caughtTypes,hasMonitorOp,lexicalInfo,debugInfo,null);
  symtab.getNullConstant();
}
Program: 38287
Project: 38287
Buggy source:
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (DEBUG)   System.err.println(("String_Node_Str" + N));
  String fnName=composeEntityName(definingContext,N);
  if (DEBUG)   System.err.println(cfg);
  ((JavaScriptLoader)loader).defineCodeBodyCode("String_Node_Str" + fnName,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}

Fixed version (ground truth):
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (DEBUG)   System.err.println(("String_Node_Str" + N));
  String fnName=composeEntityName(definingContext,N);
  if (DEBUG)   System.err.println(cfg);
  ((JavaScriptLoader)loader).defineCodeBodyCode("String_Node_Str" + fnName,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}
Program: 38288
Project: 38288
Buggy source:
private void setupCatchTypes(SSACFG cfg,TypeReference[][] catchTypes){
  for (int i=0; i < catchTypes.length; i++) {
    if (catchTypes[i] != null) {
      ExceptionHandlerBasicBlock bb=(ExceptionHandlerBasicBlock)cfg.getNode(i);
      for (int j=0; j < catchTypes[i].length; j++) {
        bb.addCaughtExceptionType(catchTypes[i][j]);
      }
    }
  }
}

Fixed version (ground truth):
private void setupCatchTypes(SSACFG cfg,Map<IBasicBlock,TypeReference[]> map){
  for (  Map.Entry<IBasicBlock,TypeReference[]> e : map.entrySet()) {
    if (e.getKey().getNumber() != -1) {
      ExceptionHandlerBasicBlock bb=(ExceptionHandlerBasicBlock)cfg.getNode(e.getKey().getNumber());
      for (int j=0; j < e.getValue().length; j++) {
        bb.addCaughtExceptionType(e.getValue()[j]);
      }
    }
  }
}
Program: 38290
Project: 38290
Buggy source:
/** 
 * fully define a function. invoked after all the code of the function has been processed
 */
protected abstract void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo);

Fixed version (ground truth):
/** 
 * fully define a function. invoked after all the code of the function has been processed
 */
protected abstract void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,Map<IBasicBlock,TypeReference[]> catchTypes,boolean hasMonitorOp,AstLexicalInformation lexicalInfo,DebuggingInformation debugInfo);
Program: 38291
Project: 38291
Buggy source:
public TypeReference[][] getCatchTypes(){
  return null;
}

Fixed version (ground truth):
public Map<IBasicBlock,TypeReference[]> getCatchTypes(){
  return null;
}
Program: 38292
Project: 38292
Buggy source:
public void closeFunctionEntity(final CAstEntity n,WalkContext parentContext,WalkContext functionContext){
  functionContext.cfg().makeExitBlock(functionContext.cfg().newBlock(true));
  SymbolTable symtab=((AbstractScope)functionContext.currentScope()).getUnderlyingSymtab();
  TypeReference[][] catchTypes=functionContext.getCatchTypes();
  AstCFG cfg=new AstCFG(n,functionContext.cfg(),symtab);
  Position[] line=functionContext.cfg().getLinePositionMap();
  boolean katch=functionContext.cfg().hasCatchBlock();
  boolean monitor=functionContext.cfg().hasMonitorOp();
  String[] nms=makeNameMap(n,functionContext.entityScopes());
  patchLexicalAccesses(cfg.getInstructions(),functionContext.getAccesses(n));
  AstLexicalInformation LI=new AstLexicalInformation(functionContext.getEntityName(n),(AbstractScope)functionContext.currentScope(),cfg.getInstructions(),functionContext.exposeNameSet(n,false),functionContext.exposeNameSet(n,true),functionContext.getAccesses(n));
  DebuggingInformation DBG=new AstDebuggingInformation(n.getPosition(),line,nms);
  defineFunction(n,parentContext,cfg,symtab,katch,catchTypes,monitor,LI,DBG);
}

Fixed version (ground truth):
public void closeFunctionEntity(final CAstEntity n,WalkContext parentContext,WalkContext functionContext){
  functionContext.cfg().makeExitBlock(functionContext.cfg().newBlock(true));
  SymbolTable symtab=((AbstractScope)functionContext.currentScope()).getUnderlyingSymtab();
  Map<IBasicBlock,TypeReference[]> catchTypes=functionContext.getCatchTypes();
  AstCFG cfg=new AstCFG(n,functionContext.cfg(),symtab);
  Position[] line=functionContext.cfg().getLinePositionMap();
  boolean katch=functionContext.cfg().hasCatchBlock();
  boolean monitor=functionContext.cfg().hasMonitorOp();
  String[] nms=makeNameMap(n,functionContext.entityScopes());
  patchLexicalAccesses(cfg.getInstructions(),functionContext.getAccesses(n));
  AstLexicalInformation LI=new AstLexicalInformation(functionContext.getEntityName(n),(AbstractScope)functionContext.currentScope(),cfg.getInstructions(),functionContext.exposeNameSet(n,false),functionContext.exposeNameSet(n,true),functionContext.getAccesses(n));
  DebuggingInformation DBG=new AstDebuggingInformation(n.getPosition(),line,nms);
  defineFunction(n,parentContext,cfg,symtab,katch,catchTypes,monitor,LI,DBG);
}
Program: 38293
Project: 38293
Buggy source:
@TestAnnotation(doSomething="String_Node_Str",count=1,date="String_Node_Str") public void mymethod(){
}

Fixed version (ground truth):
@TestAnnotation(doSomething="String_Node_Str",count=1,date="String_Node_Str",stuff={}) public int mymethod(){
  @AnotherTestAnnotation("String_Node_Str") int i=0;
  return i;
}
Program: 38294
Project: 38294
Buggy source:
@TestAnnotation(doSomething="String_Node_Str",count=0,date="String_Node_Str") public static void main(String[] args){
  (new Annotations()).mymethod();
}

Fixed version (ground truth):
@TestAnnotation(doSomething="String_Node_Str",count=0,date="String_Node_Str",stuff={1,2,3,4,5}) public static void main(String[] args){
  (new Annotations()).mymethod();
}
Program: 38295
Project: 38295
Buggy source:
public void check(CallGraph cg){
  classes:   for (  ClassAnnotation ca : classAnnotations) {
    IClass cls=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ca.className));
    IClass at=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ca.annotationTypeName));
    for (    Annotation a : cls.getAnnotations()) {
      if (a.getType().equals(at.getReference())) {
        continue classes;
      }
    }
    Assert.assertFalse("String_Node_Str" + at + "String_Node_Str"+ cls,false);
  }
  for (  MethodAnnotation ma : methodAnnotations) {
    IClass at=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ma.annotationTypeName));
    annot:     for (    CGNode n : cg) {
      if (n.getMethod().getSignature().equals(ma.methodSig)) {
        for (        Annotation a : n.getMethod().getAnnotations()) {
          if (a.getType().equals(at.getReference())) {
            continue annot;
          }
        }
        Assert.assertFalse("String_Node_Str" + at,false);
      }
    }
  }
}

Fixed version (ground truth):
public void check(CallGraph cg){
  classes:   for (  ClassAnnotation ca : classAnnotations) {
    IClass cls=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ca.className));
    IClass at=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ca.annotationTypeName));
    for (    Annotation a : cls.getAnnotations()) {
      if (a.getType().equals(at.getReference())) {
        continue classes;
      }
    }
    Assert.assertFalse("String_Node_Str" + at + "String_Node_Str"+ cls,false);
  }
  annot:   for (  MethodAnnotation ma : methodAnnotations) {
    IClass at=cg.getClassHierarchy().lookupClass(TypeReference.findOrCreate(ClassLoaderReference.Application,ma.annotationTypeName));
    for (    CGNode n : cg) {
      if (n.getMethod().getSignature().equals(ma.methodSig)) {
        for (        Annotation a : n.getMethod().getAnnotations()) {
          if (a.getType().equals(at.getReference())) {
            continue annot;
          }
        }
        Assert.assertFalse("String_Node_Str" + at,false);
      }
    }
  }
}
Program: 38296
Project: 38296
Buggy source:
protected CAstEntity parseJS(CAstImpl ast,SourceModule module) throws IOException {
  RhinoToAstTranslator translator=new RhinoToAstTranslator(ast,module,module.getName(),false);
  CAstEntity entity=translator.translateToCAst();
  return entity;
}

Fixed version (ground truth):
protected CAstEntity parseJS(CAstImpl ast,SourceModule module) throws IOException {
}
Program: 38297
Project: 38297
Buggy source:
protected CAstEntity parseJS(CAstImpl ast,SourceModule module) throws IOException {
  RhinoToAstTranslator translator=new RhinoToAstTranslator(ast,module,module.getName(),false);
  CAstEntity entity=translator.translateToCAst();
  return entity;
}

Fixed version (ground truth):
protected CAstEntity parseJS(CAstImpl ast,SourceModule module) throws IOException {
}
Program: 38298
Project: 38298
Buggy source:
public static void main(String args[]) throws ClassHierarchyException, IllegalArgumentException, IOException, CancelException {
  if (args.length != 1) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  boolean domless=false;
  URL url=new URL(args[0]);
  JSCallGraphBuilderUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory());
  JavaScriptLoader.addBootstrapFile(WebUtil.preamble);
  SourceModule[] sources=getSources(domless,url);
  JSCFABuilder builder=makeCGBuilder(new WebPageLoaderFactory(translatorFactory),sources,CGBuilderType.ZERO_ONE_CFA,AstIRFactory.makeDefaultFactory());
  builder.setBaseURL(url);
  CallGraph cg=builder.makeCallGraph(builder.getOptions());
  PointerAnalysis pa=builder.getPointerAnalysis();
  new JsViewer(cg,pa);
}

Fixed version (ground truth):
public static void main(String args[]) throws ClassHierarchyException, IllegalArgumentException, IOException, CancelException, Error {
  if (args.length != 1) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  boolean domless=false;
  URL url=new URL(args[0]);
  JSCallGraphBuilderUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory());
  JavaScriptLoader.addBootstrapFile(WebUtil.preamble);
  SourceModule[] sources=getSources(domless,url);
  JSCFABuilder builder=makeCGBuilder(new WebPageLoaderFactory(translatorFactory),sources,CGBuilderType.ZERO_ONE_CFA,AstIRFactory.makeDefaultFactory());
  builder.setBaseURL(url);
  CallGraph cg=builder.makeCallGraph(builder.getOptions());
  PointerAnalysis pa=builder.getPointerAnalysis();
  new JsViewer(cg,pa);
}
Program: 38299
Project: 38299
Buggy source:
private static SourceModule[] getSources(boolean domless,URL url) throws IOException {
  JSSourceExtractor sourceExtractor;
  if (domless) {
    sourceExtractor=new DomLessSourceExtractor();
  }
 else {
    sourceExtractor=new DefaultSourceExtractor();
  }
  Set<MappedSourceModule> sourcesMap=sourceExtractor.extractSources(url,new JerichoHtmlParser(),new IdentityUrlResolver());
  SourceModule[] sources=new SourceFileModule[sourcesMap.size()];
  int i=0;
  for (  SourceModule m : sourcesMap) {
    sources[i++]=m;
  }
  return sources;
}

Fixed version (ground truth):
private static SourceModule[] getSources(boolean domless,URL url) throws IOException, Error {
  JSSourceExtractor sourceExtractor;
  if (domless) {
    sourceExtractor=new DomLessSourceExtractor();
  }
 else {
    sourceExtractor=new DefaultSourceExtractor();
  }
  Set<MappedSourceModule> sourcesMap=sourceExtractor.extractSources(url,new JerichoHtmlParser(),new IdentityUrlResolver());
  SourceModule[] sources=new SourceFileModule[sourcesMap.size()];
  int i=0;
  for (  SourceModule m : sourcesMap) {
    sources[i++]=m;
  }
  return sources;
}
Program: 38300
Project: 38300
Buggy source:
public void copyState(BitVectorVariable other){
  if (other == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (V == null) {
    if (other.V == null) {
      return;
    }
 else {
      V=new MutableSharedBitVectorIntSet(other.V);
      return;
    }
  }
  if (other.V != null) {
    V.copySet(other.V);
  }
}

Fixed version (ground truth):
public void copyState(BitVectorVariable other){
  if (other == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (V == null) {
    if (other.V == null) {
      return;
    }
 else {
      V=new MutableSharedBitVectorIntSet(other.V);
      return;
    }
  }
  if (other.V != null) {
    V.copySet(other.V);
  }
 else {
    V=null;
  }
}
Program: 38301
Project: 38301
Buggy source:
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href= "http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458" >bug report</a>). For now, fails with an assertion if the url is malformed.
 * @param url
 * @return the path name for the url
 * @throws IllegalArgumentException if url is null
 */
public String filePathFromURL(URL url){
  if (url == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  URI uri=new File(url.getPath()).toURI();
  String filePath=uri.getPath();
  return filePath;
}

Fixed version (ground truth):
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href= "http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458" >bug report</a>). For now, fails with an assertion if the url is malformed.
 * @param url
 * @return the path name for the url
 * @throws IllegalArgumentException if url is null
 */
public String filePathFromURL(URL url){
  if (url == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  URI uri=new File(url.getPath()).toURI();
  try {
    return URLDecoder.decode(uri.getPath(),"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    Assertions.UNREACHABLE();
    return null;
  }
}
Program: 38302
Project: 38302
Buggy source:
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href= "http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458" >bug report</a>). For now, fails with an assertion if the url is malformed.
 * @param url
 * @return the path name for the url
 * @throws IllegalArgumentException if url is null
 */
public String filePathFromURL(URL url){
  if (url == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  URI uri=new File(url.getPath()).toURI();
  try {
    return URLDecoder.decode(uri.getPath(),"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    Assertions.UNREACHABLE();
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href= "http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458" >bug report</a>). For now, fails with an assertion if the url is malformed.
 * @param url
 * @return the path name for the url
 * @throws IllegalArgumentException if url is null
 */
public String filePathFromURL(URL url){
  if (url == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    URI uri=new File(URLDecoder.decode(url.getPath(),"String_Node_Str")).toURI();
    return uri.getPath();
  }
 catch (  UnsupportedEncodingException e) {
    Assertions.UNREACHABLE();
    return null;
  }
}
Program: 38303
Project: 38303
Buggy source:
@Override public byte evaluate(final BitVectorVariable lhs,final BitVectorVariable[] rhs){
  IntSet intersect=lhs.getValue();
  if (intersect == null || intersect.isEmpty()) {
    return NOT_CHANGED_AND_FIXED;
  }
  for (  final BitVectorVariable bv : rhs) {
    final IntSet vlhs=bv.getValue();
    intersect=intersect.intersection(vlhs);
  }
  if (intersect.sameValue(lhs.getValue())) {
    return NOT_CHANGED;
  }
 else {
    final BitVectorVariable bvv=new BitVectorVariable();
    intersect.foreach(new IntSetAction(){
      @Override public void act(      final int x){
        bvv.set(x);
      }
    }
);
    lhs.copyState(bvv);
    return CHANGED;
  }
}

Fixed version (ground truth):
@Override public byte evaluate(final BitVectorVariable lhs,final BitVectorVariable[] rhs){
  IntSet intersect=lhs.getValue();
  if (intersect == null || intersect.isEmpty()) {
    intersect=rhs[0].getValue();
  }
  for (  final BitVectorVariable bv : rhs) {
    final IntSet vlhs=bv.getValue();
    intersect=intersect.intersection(vlhs);
  }
  if (lhs.getValue() != null && intersect.sameValue(lhs.getValue())) {
    return NOT_CHANGED;
  }
 else {
    final BitVectorVariable bvv=new BitVectorVariable();
    intersect.foreach(new IntSetAction(){
      @Override public void act(      final int x){
        bvv.set(x);
      }
    }
);
    lhs.copyState(bvv);
    return CHANGED;
  }
}
Program: 38304
Project: 38304
Buggy source:
private int passActualPropertyValsAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    final int constVN=curValNum++;
    S.addConstant(constVN,new ConstantValue(i - 1));
    int propertyReadResult=curValNum++;
    S.addStatement(insts.PropertyRead(propertyReadResult,4,constVN));
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}

Fixed version (ground truth):
private int passActualPropertyValsAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    final int constVN=curValNum++;
    S.addConstant(constVN,new ConstantValue(i - 1));
    int propertyReadResult=curValNum++;
    S.addStatement(insts.PropertyRead(propertyReadResult,4,constVN));
    S.getNextProgramCounter();
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}
Program: 38305
Project: 38305
Buggy source:
@Override public void run(){
  try {
    boolean repeat=true;
    while (repeat) {
      try {
        Thread.sleep(SLEEP_MS);
      }
 catch (      InterruptedException e1) {
      }
      drain();
      try {
        p.exitValue();
        repeat=false;
        drain();
        if (logger != null) {
          logger.fine("String_Node_Str" + p.exitValue());
        }
      }
 catch (      IllegalThreadStateException e) {
        repeat=true;
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    boolean repeat=true;
    while (repeat) {
      try {
        Thread.sleep(SLEEP_MS);
      }
 catch (      InterruptedException e1) {
      }
      drain();
      try {
        p.exitValue();
        repeat=false;
        blockingDrain();
        if (logger != null) {
          logger.fine("String_Node_Str" + p.exitValue());
        }
      }
 catch (      IllegalThreadStateException e) {
        repeat=true;
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 38306
Project: 38306
Buggy source:
abstract void drain() throws IOException ;

Fixed version (ground truth):
/** 
 * Drain data from the stream, but don't block.
 */
abstract void drain() throws IOException ;
Program: 38307
Project: 38307
Buggy source:
protected Drainer captureStdErr(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getErrorStream(),BUFFER_SIZE);
  final ByteArrayOutputStream b=new ByteArrayOutputStream(BUFFER_SIZE);
  Drainer result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndCatch(out,b);
    }
  }
;
  result.setCapture(b);
  result.start();
  return result;
}

Fixed version (ground truth):
protected Drainer captureStdErr(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getErrorStream(),BUFFER_SIZE);
  final ByteArrayOutputStream b=new ByteArrayOutputStream(BUFFER_SIZE);
  Drainer result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndCatch(out,b);
    }
    @Override void blockingDrain() throws IOException {
      blockingDrainAndCatch(out,b);
    }
  }
;
  result.setCapture(b);
  result.start();
  return result;
}
Program: 38308
Project: 38308
Buggy source:
private void drainAndCatch(BufferedInputStream s,ByteArrayOutputStream b) throws IOException {
  try {
    while (s.available() > 0) {
      byte[] data=new byte[s.available()];
      int nRead=s.read(data);
      b.write(data,0,nRead);
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
/** 
 * Drain some data from the input stream, and append said data to b.  Do not block.
 */
private void drainAndCatch(BufferedInputStream s,ByteArrayOutputStream b) throws IOException {
  try {
    while (s.available() > 0) {
      byte[] data=new byte[s.available()];
      int nRead=s.read(data);
      b.write(data,0,nRead);
    }
  }
 catch (  IOException e) {
  }
}
Program: 38309
Project: 38309
Buggy source:
protected Thread drainStdErr(Process p){
  final BufferedInputStream err=new BufferedInputStream(p.getErrorStream(),BUFFER_SIZE);
  Thread result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndPrint(err,System.err);
    }
  }
;
  result.start();
  return result;
}

Fixed version (ground truth):
protected Thread drainStdErr(Process p){
  final BufferedInputStream err=new BufferedInputStream(p.getErrorStream(),BUFFER_SIZE);
  Thread result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndPrint(err,System.err);
    }
    @Override void blockingDrain() throws IOException {
      blockingDrainAndPrint(err,System.err);
    }
  }
;
  result.start();
  return result;
}
Program: 38310
Project: 38310
Buggy source:
protected Thread drainStdOut(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getInputStream(),BUFFER_SIZE);
  Thread result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndPrint(out,System.out);
    }
  }
;
  result.start();
  return result;
}

Fixed version (ground truth):
protected Thread drainStdOut(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getInputStream(),BUFFER_SIZE);
  Thread result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndPrint(out,System.out);
    }
    @Override void blockingDrain() throws IOException {
      blockingDrainAndPrint(out,System.out);
    }
  }
;
  result.start();
  return result;
}
Program: 38311
Project: 38311
Buggy source:
protected Drainer captureStdOut(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getInputStream(),BUFFER_SIZE);
  final ByteArrayOutputStream b=new ByteArrayOutputStream(BUFFER_SIZE);
  Drainer result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndCatch(out,b);
    }
  }
;
  result.setCapture(b);
  result.start();
  return result;
}

Fixed version (ground truth):
protected Drainer captureStdOut(Process p){
  final BufferedInputStream out=new BufferedInputStream(p.getInputStream(),BUFFER_SIZE);
  final ByteArrayOutputStream b=new ByteArrayOutputStream(BUFFER_SIZE);
  Drainer result=new Drainer(p){
    @Override void drain() throws IOException {
      drainAndCatch(out,b);
    }
    @Override void blockingDrain() throws IOException {
      blockingDrainAndCatch(out,b);
    }
  }
;
  result.setCapture(b);
  result.start();
  return result;
}
Program: 38312
Project: 38312
Buggy source:
private void drainAndPrint(BufferedInputStream s,PrintStream p) throws IOException {
  try {
    while (s.available() > 0) {
      byte[] data=new byte[s.available()];
      s.read(data);
      p.print(new String(data));
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
/** 
 * Drain some data from the input stream, and print said data to p.  Do not block.
 */
private void drainAndPrint(BufferedInputStream s,PrintStream p) throws IOException {
  try {
    while (s.available() > 0) {
      byte[] data=new byte[s.available()];
      s.read(data);
      p.print(new String(data));
    }
  }
 catch (  IOException e) {
  }
}
Program: 38313
Project: 38313
Buggy source:
/** 
 * Process an element indicating a new allocation site.
 * @param atts
 */
private void processAllocation(Attributes atts){
  Language lang=scope.getLanguage(governingLoader.getLanguage());
  SSAInstructionFactory insts=lang.instructionFactory();
  String classString=atts.getValue(A_CLASS);
  final TypeReference type=TypeReference.findOrCreate(governingLoader,TypeName.string2TypeName(classString));
  String defVar=atts.getValue(A_DEF);
  if (symbolTable.keySet().contains(defVar)) {
    Assertions.UNREACHABLE("String_Node_Str" + defVar + "String_Node_Str"+ governingMethod);
  }
  if (defVar == null) {
    defVar="String_Node_Str" + nextLocal;
  }
  int defNum=nextLocal;
  symbolTable.put(defVar,new Integer(nextLocal++));
  NewSiteReference ref=NewSiteReference.make(governingMethod.getNextProgramCounter(),type);
  SSANewInstruction a=null;
  if (type.isArrayType()) {
    String size=atts.getValue(A_SIZE);
    Assertions.productionAssertion(size != null);
    Integer sNumber=symbolTable.get(size);
    Assertions.productionAssertion(sNumber != null);
    Assertions.productionAssertion(type.getDerivedMask() == ArrayMask || type.getDerivedMask() == ((ArrayMask << 2) | PrimitiveMask));
    a=insts.NewInstruction(defNum,ref,new int[]{sNumber.intValue()});
  }
 else {
    a=insts.NewInstruction(defNum,ref);
  }
  governingMethod.addStatement(a);
}

Fixed version (ground truth):
/** 
 * Process an element indicating a new allocation site.
 * @param atts
 */
private void processAllocation(Attributes atts){
  Language lang=scope.getLanguage(governingLoader.getLanguage());
  SSAInstructionFactory insts=lang.instructionFactory();
  String classString=atts.getValue(A_CLASS);
  final TypeReference type=TypeReference.findOrCreate(governingLoader,TypeName.string2TypeName(classString));
  String defVar=atts.getValue(A_DEF);
  if (symbolTable.keySet().contains(defVar)) {
    Assertions.UNREACHABLE("String_Node_Str" + defVar + "String_Node_Str"+ governingMethod);
  }
  if (defVar == null) {
    defVar="String_Node_Str" + nextLocal;
  }
  int defNum=nextLocal;
  symbolTable.put(defVar,new Integer(nextLocal++));
  NewSiteReference ref=NewSiteReference.make(governingMethod.getNextProgramCounter(),type);
  SSANewInstruction a=null;
  if (type.isArrayType()) {
    String size=atts.getValue(A_SIZE);
    Assertions.productionAssertion(size != null);
    Integer sNumber=symbolTable.get(size);
    Assertions.productionAssertion(sNumber != null);
    Assertions.productionAssertion(type.getDerivedMask() == ArrayMask || type.getDerivedMask() == ((ArrayMask << ElementBits) | PrimitiveMask));
    a=insts.NewInstruction(defNum,ref,new int[]{sNumber.intValue()});
  }
 else {
    a=insts.NewInstruction(defNum,ref);
  }
  governingMethod.addStatement(a);
}