nus-yam/ex-repair huggingface dataset:
Program: 62128
Project: 62128
Buggy source:
public int deobfuscateName(Map<Integer,String> stringUsageTypes,Set<Integer> stringUsages,HashMap<String,String> namesMap,int strIndex,boolean firstUppercase,RenameType renameType){
  if (strIndex <= 0) {
    return strIndex;
  }
  String s=constants.constant_string[strIndex];
  boolean isValid=true;
  if (isReserved(s)) {
    isValid=false;
  }
  if (isValid) {
    for (int i=0; i < s.length(); i++) {
      if (s.charAt(i) > 127) {
        isValid=false;
        break;
      }
    }
  }
  if (isValid) {
    Pattern pat=Pattern.compile("String_Node_Str" + Pattern.quote(validFirstCharacters) + "String_Node_Str"+ "String_Node_Str"+ Pattern.quote(validFirstCharacters + validNextCharacters)+ "String_Node_Str");
    if (!pat.matcher(s).matches()) {
      isValid=false;
    }
  }
  if (!isValid) {
    String newname;
    if (namesMap.containsKey(s)) {
      newname=namesMap.get(s);
    }
 else {
      newname=fooString(constants.constant_string[strIndex],firstUppercase,DEFAULT_FOO_SIZE,stringUsageTypes.get(strIndex),renameType);
    }
    if (stringUsages.contains(strIndex)) {
      strIndex=constants.addString(s);
    }
    constants.constant_string[strIndex]=newname;
    if (!namesMap.containsKey(s)) {
      namesMap.put(s,constants.constant_string[strIndex]);
    }
  }
  return strIndex;
}

Fixed version (ground truth):
public int deobfuscateName(Map<Integer,String> stringUsageTypes,Set<Integer> stringUsages,Set<Integer> namespaceUsages,HashMap<String,String> namesMap,int strIndex,boolean firstUppercase,RenameType renameType){
  if (strIndex <= 0) {
    return strIndex;
  }
  String s=constants.constant_string[strIndex];
  boolean isValid=true;
  if (isReserved(s)) {
    isValid=false;
  }
  if (isValid) {
    for (int i=0; i < s.length(); i++) {
      if (s.charAt(i) > 127) {
        isValid=false;
        break;
      }
    }
  }
  if (isValid) {
    Pattern pat=Pattern.compile("String_Node_Str" + Pattern.quote(validFirstCharacters) + "String_Node_Str"+ "String_Node_Str"+ Pattern.quote(validFirstCharacters + validNextCharacters)+ "String_Node_Str");
    if (!pat.matcher(s).matches()) {
      isValid=false;
    }
  }
  if (!isValid) {
    String newname;
    if (namesMap.containsKey(s)) {
      newname=namesMap.get(s);
    }
 else {
      newname=fooString(constants.constant_string[strIndex],firstUppercase,DEFAULT_FOO_SIZE,stringUsageTypes.get(strIndex),renameType);
    }
    if (stringUsages.contains(strIndex) || namespaceUsages.contains(strIndex)) {
      strIndex=constants.addString(s);
    }
    constants.constant_string[strIndex]=newname;
    if (!namesMap.containsKey(s)) {
      namesMap.put(s,constants.constant_string[strIndex]);
    }
  }
  return strIndex;
}
Program: 62129
Project: 62129
Buggy source:
public int deobfuscateNameSpace(Map<Integer,String> stringUsageTypes,Set<Integer> stringUsages,HashMap<String,String> namesMap,int strIndex,RenameType renameType){
  if (strIndex <= 0) {
    return strIndex;
  }
  String s=constants.constant_string[strIndex];
  boolean isValid=isValidNSPart(s);
  if (!isValid) {
    String newName;
    if (namesMap.containsKey(s)) {
      newName=constants.constant_string[strIndex]=namesMap.get(s);
    }
 else {
      String parts[]=null;
      if (s.contains("String_Node_Str")) {
        parts=s.split("String_Node_Str");
      }
 else {
        parts=new String[]{s};
      }
      String ret="String_Node_Str";
      for (int p=0; p < parts.length; p++) {
        if (p > 0) {
          ret+="String_Node_Str";
        }
        if (!isValidNSPart(parts[p])) {
          ret+=fooString(constants.constant_string[strIndex],false,DEFAULT_FOO_SIZE,"String_Node_Str",renameType);
        }
 else {
          ret+=parts[p];
        }
      }
      newName=ret;
      namesMap.put(s,newName);
    }
    if (stringUsages.contains(strIndex)) {
      strIndex=constants.addString(newName);
    }
 else {
      constants.constant_string[strIndex]=newName;
    }
  }
  return strIndex;
}

Fixed version (ground truth):
public int deobfuscateNameSpace(Map<Integer,String> stringUsageTypes,Set<Integer> stringUsages,HashMap<String,String> namesMap,int strIndex,RenameType renameType){
  if (strIndex <= 0) {
    return strIndex;
  }
  String s=constants.constant_string[strIndex];
  if (builtInNs(s) != null) {
    return strIndex;
  }
  boolean isValid=isValidNSPart(s);
  if (!isValid) {
    String newName;
    if (namesMap.containsKey(s)) {
      newName=constants.constant_string[strIndex]=namesMap.get(s);
    }
 else {
      String parts[]=null;
      if (s.contains("String_Node_Str")) {
        parts=s.split("String_Node_Str");
      }
 else {
        parts=new String[]{s};
      }
      String ret="String_Node_Str";
      for (int p=0; p < parts.length; p++) {
        if (p > 0) {
          ret+="String_Node_Str";
        }
        if (!isValidNSPart(parts[p])) {
          ret+=fooString(constants.constant_string[strIndex],false,DEFAULT_FOO_SIZE,"String_Node_Str",renameType);
        }
 else {
          ret+=parts[p];
        }
      }
      newName=ret;
      namesMap.put(s,newName);
    }
    if (stringUsages.contains(strIndex)) {
      strIndex=constants.addString(newName);
    }
 else {
      constants.constant_string[strIndex]=newName;
    }
  }
  return strIndex;
}
Program: 62130
Project: 62130
Buggy source:
public void renameMultiname(int multinameIndex,String newname){
  if (multinameIndex <= 0 || multinameIndex >= constants.constant_multiname.length) {
    throw new IllegalArgumentException("String_Node_Str" + multinameIndex + "String_Node_Str");
  }
  Set<Integer> stringUsages=getStringUsages();
  int strIndex=constants.constant_multiname[multinameIndex].name_index;
  if (stringUsages.contains(strIndex)) {
    strIndex=constants.forceGetStringId(newname);
    constants.constant_multiname[multinameIndex].name_index=strIndex;
  }
 else {
    constants.constant_string[strIndex]=newname;
  }
}

Fixed version (ground truth):
public void renameMultiname(int multinameIndex,String newname){
  if (multinameIndex <= 0 || multinameIndex >= constants.constant_multiname.length) {
    throw new IllegalArgumentException("String_Node_Str" + multinameIndex + "String_Node_Str");
  }
  Set<Integer> stringUsages=getStringUsages();
  Set<Integer> namespaceUsages=getNsStringUsages();
  int strIndex=constants.constant_multiname[multinameIndex].name_index;
  if (stringUsages.contains(strIndex) || namespaceUsages.contains(strIndex)) {
    strIndex=constants.forceGetStringId(newname);
    constants.constant_multiname[multinameIndex].name_index=strIndex;
  }
 else {
    constants.constant_string[strIndex]=newname;
  }
}
Program: 62132
Project: 62132
Buggy source:
public void init(){
  heads=makeGraph(code,new ArrayList<GraphPart>(),alternateEntries);
  int time=1;
  List<GraphPart> ordered=new ArrayList<>();
  List<GraphPart> visited=new ArrayList<>();
  for (  GraphPart head : heads) {
    time=head.setTime(time,ordered,visited);
    fixGraph(head);
    makeMulti(head,new ArrayList<GraphPart>());
  }
}

Fixed version (ground truth):
public void init(){
  if (heads != null) {
    return;
  }
  heads=makeGraph(code,new ArrayList<GraphPart>(),alternateEntries);
  int time=1;
  List<GraphPart> ordered=new ArrayList<>();
  List<GraphPart> visited=new ArrayList<>();
  for (  GraphPart head : heads) {
    time=head.setTime(time,ordered,visited);
    fixGraph(head);
    makeMulti(head,new ArrayList<GraphPart>());
  }
}
Program: 62133
Project: 62133
Buggy source:
@Override public String toString(){
  if (end < start) {
    return "String_Node_Str" + (start + 1) + "String_Node_Str"+ (end + 1);
  }
  return "String_Node_Str" + (start + 1) + "String_Node_Str"+ (end + 1)+ (instanceCount > 1 ? "String_Node_Str" + instanceCount + "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ path;
}

Fixed version (ground truth):
@Override public String toString(){
  if (end < start) {
    return "String_Node_Str" + (start + 1) + "String_Node_Str"+ (end + 1);
  }
  return "String_Node_Str" + (start + 1) + "String_Node_Str"+ (end + 1)+ (instanceCount > 1 ? "String_Node_Str" + instanceCount + "String_Node_Str" : "String_Node_Str");
}
Program: 62134
Project: 62134
Buggy source:
public GraphPanel(Graph graph){
  size=getPartPositions(head=graph.heads.get(0),SPACE_VERTICAL + SPACE_VERTICAL + BLOCK_HEIGHT / 2,getPartWidth(graph.heads.get(0),new HashSet<GraphPart>()) * (BLOCK_WIDTH + SPACE_HORIZONTAL) / 2 - SPACE_HORIZONTAL,partPos,true);
  backLinksLeft=1;
  backLinksRight=1;
  for (  GraphPart part : partPos.keySet()) {
    Point p=partPos.get(part);
    for (    GraphPart n : part.nextParts) {
      Point npos=partPos.get(n);
      if (npos.y < p.y) {
        if (p.x > size.x / 2) {
          backLinksRight++;
        }
 else {
          backLinksLeft++;
        }
      }
    }
  }
  size.x+=2 * SPACE_BACKLINKS + backLinksLeft * SPACE_BACKLINKS + backLinksRight * SPACE_BACKLINKS;
  setPreferredSize(new Dimension(size.x,size.y));
}

Fixed version (ground truth):
public GraphPanel(Graph graph){
  graph.init();
  size=getPartPositions(head=graph.heads.get(0),SPACE_VERTICAL + SPACE_VERTICAL + BLOCK_HEIGHT / 2,getPartWidth(graph.heads.get(0),new HashSet<GraphPart>()) * (BLOCK_WIDTH + SPACE_HORIZONTAL) / 2 - SPACE_HORIZONTAL,partPos,true);
  backLinksLeft=1;
  backLinksRight=1;
  for (  GraphPart part : partPos.keySet()) {
    Point p=partPos.get(part);
    for (    GraphPart n : part.nextParts) {
      Point npos=partPos.get(n);
      if (npos.y < p.y) {
        if (p.x > size.x / 2) {
          backLinksRight++;
        }
 else {
          backLinksLeft++;
        }
      }
    }
  }
  size.x+=2 * SPACE_BACKLINKS + backLinksLeft * SPACE_BACKLINKS + backLinksRight * SPACE_BACKLINKS;
  setPreferredSize(new Dimension(size.x,size.y));
}
Program: 62135
Project: 62135
Buggy source:
private void drawArrow(Graphics g,int x1,int y1,int x2,int y2){
  Polygon arrowHead=new Polygon();
  arrowHead.addPoint(0,0);
  arrowHead.addPoint(-3,-8);
  arrowHead.addPoint(3,-8);
  Line2D.Double line=new Line2D.Double(x1,y1,x2,y2);
  AffineTransform tx=new AffineTransform();
  tx.setToIdentity();
  double angle=Math.atan2(line.y2 - line.y1,line.x2 - line.x1);
  tx.translate(line.x2,line.y2);
  tx.rotate((angle - Math.PI / 2d));
  Graphics2D g2d=(Graphics2D)g;
  g2d.draw(line);
  Graphics2D g2=(Graphics2D)g2d.create();
  g2.setTransform(tx);
  g2.fill(arrowHead);
  g2.dispose();
}

Fixed version (ground truth):
private void drawArrow(Graphics g,int x1,int y1,int x2,int y2){
  Polygon arrowHead=new Polygon();
  arrowHead.addPoint(0,0);
  arrowHead.addPoint(-3,-8);
  arrowHead.addPoint(3,-8);
  Line2D.Double line=new Line2D.Double(x1,y1,x2,y2);
  AffineTransform tx=new AffineTransform();
  tx.setToIdentity();
  double angle=Math.atan2(line.y2 - line.y1,line.x2 - line.x1);
  tx.translate(line.x2,line.y2);
  tx.rotate((angle - Math.PI / 2d));
  Graphics2D g2d=(Graphics2D)g;
  AffineTransform oldTransform=g2d.getTransform();
  g2d.draw(line);
  tx.preConcatenate(oldTransform);
  g2d.setTransform(tx);
  g2d.fill(arrowHead);
  g2d.setTransform(oldTransform);
}
Program: 62137
Project: 62137
Buggy source:
protected GraphPart makeMultiPart(GraphPart part){
  List<GraphPart> parts=new ArrayList<>();
  do {
    parts.add(part);
    if (part.nextParts.size() == 1 && part.nextParts.get(0).refs.size() == 1) {
      part=part.nextParts.get(0);
    }
 else {
      part=null;
    }
  }
 while (part != null);
  if (parts.size() > 1) {
    return new GraphPartMulti(parts);
  }
 else {
    return parts.get(0);
  }
}

Fixed version (ground truth):
protected GraphPart makeMultiPart(GraphPart part){
  List<GraphPart> parts=new ArrayList<>();
  do {
    parts.add(part);
    if (part.nextParts.size() == 1 && part.nextParts.get(0).refs.size() == 1) {
      part=part.nextParts.get(0);
    }
 else {
      part=null;
    }
  }
 while (part != null);
  if (parts.size() > 1) {
    GraphPartMulti ret=new GraphPartMulti(parts);
    ret.refs.addAll(parts.get(0).refs);
    ret.nextParts.addAll(parts.get(parts.size() - 1).nextParts);
    return ret;
  }
 else {
    return parts.get(0);
  }
}
Program: 62138
Project: 62138
Buggy source:
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @throws IOException
 */
public DefineText2Tag(byte data[],int version,long pos) throws IOException {
  super(33,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterID=sis.readUI16();
  textBounds=sis.readRECT();
  textMatrix=sis.readMatrix();
  glyphBits=sis.readUI8();
  advanceBits=sis.readUI8();
  textRecords=new ArrayList<>();
  TEXTRECORD tr;
  while ((tr=sis.readTEXTRECORD(true,glyphBits,advanceBits)) != null) {
    textRecords.add(tr);
  }
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public DefineText2Tag(byte data[],int version,long pos) throws IOException {
  super(33,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterID=sis.readUI16();
  textBounds=sis.readRECT();
  textMatrix=sis.readMatrix();
  glyphBits=sis.readUI8();
  advanceBits=sis.readUI8();
  textRecords=new ArrayList<>();
  TEXTRECORD tr;
  while ((tr=sis.readTEXTRECORD(true,glyphBits,advanceBits)) != null) {
    textRecords.add(tr);
  }
}
Program: 62140
Project: 62140
Buggy source:
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @throws IOException
 */
public DefineTextTag(byte data[],int version,long pos) throws IOException {
  super(11,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterID=sis.readUI16();
  textBounds=sis.readRECT();
  textMatrix=sis.readMatrix();
  glyphBits=sis.readUI8();
  advanceBits=sis.readUI8();
  textRecords=new ArrayList<>();
  TEXTRECORD tr;
  while ((tr=sis.readTEXTRECORD(false,glyphBits,advanceBits)) != null) {
    textRecords.add(tr);
  }
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public DefineTextTag(byte data[],int version,long pos) throws IOException {
  super(11,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterID=sis.readUI16();
  textBounds=sis.readRECT();
  textMatrix=sis.readMatrix();
  glyphBits=sis.readUI8();
  advanceBits=sis.readUI8();
  textRecords=new ArrayList<>();
  TEXTRECORD tr;
  while ((tr=sis.readTEXTRECORD(false,glyphBits,advanceBits)) != null) {
    textRecords.add(tr);
  }
}
Program: 62142
Project: 62142
Buggy source:
private String fooString(String orig,boolean firstUppercase,int rndSize){
  boolean exists;
  String ret;
  loopfoo:   do {
    exists=false;
    int len=3 + rnd.nextInt(rndSize - 3);
    ret="String_Node_Str";
    for (int i=0; i < len; i++) {
      String c="String_Node_Str";
      if ((i % 2) == 0) {
        c="String_Node_Str" + fooCharacters.charAt(rnd.nextInt(fooCharacters.length()));
      }
 else {
        c="String_Node_Str" + fooJoinCharacters.charAt(rnd.nextInt(fooJoinCharacters.length()));
      }
      if (i == 0 && firstUppercase) {
        c=c.toUpperCase(Locale.ENGLISH);
      }
      ret+=c;
    }
    if (allVariableNamesStr.contains(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue loopfoo;
    }
    if (isReserved(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue;
    }
    if (deobfuscated.containsValue(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue;
    }
  }
 while (exists);
  deobfuscated.put(orig,ret);
  return ret;
}

Fixed version (ground truth):
private String fooString(String orig,boolean firstUppercase,int rndSize){
  boolean exists;
  String ret;
  loopfoo:   do {
    exists=false;
    int len=3 + rnd.nextInt(rndSize - 3);
    ret="String_Node_Str";
    for (int i=0; i < len; i++) {
      String c="String_Node_Str";
      if ((i % 2) == 0) {
        c="String_Node_Str" + fooCharacters.charAt(rnd.nextInt(fooCharacters.length()));
      }
 else {
        c="String_Node_Str" + fooJoinCharacters.charAt(rnd.nextInt(fooJoinCharacters.length()));
      }
      if (i == 0 && firstUppercase) {
        c=c.toUpperCase(Locale.ENGLISH);
      }
      ret+=c;
    }
    if (allVariableNamesStr.contains(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue loopfoo;
    }
    if (isReserved(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue;
    }
    if (deobfuscated.containsValue(ret)) {
      exists=true;
      rndSize=rndSize + 1;
      continue;
    }
  }
 while (exists);
  return ret;
}
Program: 62143
Project: 62143
Buggy source:
public String deobfuscateName(HashMap<String,String> namesMap,String s,boolean firstUppercase,String usageType,RenameType renameType,Map<String,String> selected){
  boolean isValid=true;
  if (selected != null) {
    if (selected.containsKey(s)) {
      return selected.get(s);
    }
  }
  if (isReserved(s)) {
    isValid=false;
  }
  if (isValid) {
    for (int i=0; i < s.length(); i++) {
      if (s.charAt(i) > 127) {
        isValid=false;
        break;
      }
    }
  }
  if (isValid) {
    Pattern pat=Pattern.compile("String_Node_Str" + Pattern.quote(validFirstCharacters) + "String_Node_Str"+ "String_Node_Str"+ Pattern.quote(validFirstCharacters + validNextCharacters)+ "String_Node_Str");
    if (!pat.matcher(s).matches()) {
      isValid=false;
    }
  }
  if (!isValid) {
    if (namesMap.containsKey(s)) {
      return namesMap.get(s);
    }
 else {
      Integer cnt=typeCounts.get(usageType);
      if (cnt == null) {
        cnt=0;
      }
      String ret=null;
      if (renameType == RenameType.TYPENUMBER) {
        boolean found;
        do {
          found=false;
          cnt++;
          ret=usageType + "String_Node_Str" + cnt;
          found=allVariableNamesStr.contains(ret);
        }
 while (found);
        typeCounts.put(usageType,cnt);
      }
 else       if (renameType == RenameType.RANDOMWORD) {
        ret=fooString(s,firstUppercase,DEFAULT_FOO_SIZE);
      }
      return ret;
    }
  }
  return null;
}

Fixed version (ground truth):
public String deobfuscateName(String s,boolean firstUppercase,String usageType,RenameType renameType,Map<String,String> selected){
  boolean isValid=true;
  if (usageType == null) {
    usageType="String_Node_Str";
  }
  if (selected != null) {
    if (selected.containsKey(s)) {
      return selected.get(s);
    }
  }
  if (isReserved(s)) {
    isValid=false;
  }
  if (isValid) {
    for (int i=0; i < s.length(); i++) {
      if (s.charAt(i) > 127) {
        isValid=false;
        break;
      }
    }
  }
  if (isValid) {
    Pattern pat=Pattern.compile("String_Node_Str" + Pattern.quote(validFirstCharacters) + "String_Node_Str"+ "String_Node_Str"+ Pattern.quote(validFirstCharacters + validNextCharacters)+ "String_Node_Str");
    if (!pat.matcher(s).matches()) {
      isValid=false;
    }
  }
  if (!isValid) {
    if (deobfuscated.containsKey(s)) {
      return deobfuscated.get(s);
    }
 else {
      Integer cnt=typeCounts.get(usageType);
      if (cnt == null) {
        cnt=0;
      }
      String ret=null;
      if (renameType == RenameType.TYPENUMBER) {
        boolean found;
        do {
          found=false;
          cnt++;
          ret=usageType + "String_Node_Str" + cnt;
          found=allVariableNamesStr.contains(ret);
        }
 while (found);
        typeCounts.put(usageType,cnt);
      }
 else       if (renameType == RenameType.RANDOMWORD) {
        ret=fooString(s,firstUppercase,DEFAULT_FOO_SIZE);
      }
      deobfuscated.put(s,ret);
      return ret;
    }
  }
  return null;
}
Program: 62145
Project: 62145
Buggy source:
/** 
 * Compress SWF file
 * @param fis Input stream
 * @param fos Output stream
 */
public static boolean fws2cws(InputStream fis,OutputStream fos){
  try {
    byte swfHead[]=new byte[8];
    fis.read(swfHead);
    if (swfHead[0] != 'F') {
      fis.close();
      return false;
    }
    swfHead[0]='C';
    fos.write(swfHead);
    fos=new DeflaterOutputStream(fos);
    int i;
    while ((i=fis.read()) != -1) {
      fos.write(i);
    }
    fis.close();
    fos.close();
  }
 catch (  FileNotFoundException ex) {
    return false;
  }
catch (  IOException ex) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compress SWF file
 * @param fis Input stream
 * @param fos Output stream
 * @return True on success 
 */
public static boolean fws2cws(InputStream fis,OutputStream fos){
  try {
    byte swfHead[]=new byte[8];
    fis.read(swfHead);
    if (swfHead[0] != 'F') {
      fis.close();
      return false;
    }
    swfHead[0]='C';
    fos.write(swfHead);
    fos=new DeflaterOutputStream(fos);
    int i;
    while ((i=fis.read()) != -1) {
      fos.write(i);
    }
    fis.close();
    fos.close();
  }
 catch (  FileNotFoundException ex) {
    return false;
  }
catch (  IOException ex) {
    return false;
  }
  return true;
}
Program: 62147
Project: 62147
Buggy source:
@Override public int hashCode(){
  int hash=7;
  hash=71 * hash + Objects.hashCode(this.value);
  hash=71 * hash + Objects.hashCode(this.constants);
  hash=71 * hash + pos;
  return hash;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int hash=7;
  hash=71 * hash + Objects.hashCode(this.value);
  hash=71 * hash + System.identityHashCode(this.constants);
  hash=71 * hash + pos;
  return hash;
}
Program: 62148
Project: 62148
Buggy source:
public static Object deepCopy(Object o){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    try (ObjectOutputStream oos=new ObjectOutputStream(baos)){
      oos.writeObject(o);
      oos.flush();
    }
     Object copy;
    try (ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))){
      copy=ois.readObject();
    }
     return copy;
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
public static Object deepCopy(Object o){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    try (ObjectOutputStream oos=new ObjectOutputStream(baos)){
      oos.writeObject(o);
      oos.flush();
    }
     Object copy;
    try (ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))){
      copy=ois.readObject();
    }
     return copy;
  }
 catch (  Exception ex) {
    return null;
  }
}
Program: 62152
Project: 62152
Buggy source:
public static boolean isAssociated(){
  if (!Advapi32Util.registryKeyExists(WinReg.HKEY_CLASSES_ROOT,"String_Node_Str")) {
    return false;
  }
  String clsName=Advapi32Util.registryGetStringValue(WinReg.HKEY_CLASSES_ROOT,"String_Node_Str","String_Node_Str");
  if (clsName == null) {
    return false;
  }
  return Advapi32Util.registryKeyExists(WinReg.HKEY_CLASSES_ROOT,clsName + "String_Node_Str");
}

Fixed version (ground truth):
public static boolean isAssociated(){
  if (!Platform.isWindows()) {
    return false;
  }
  if (!Advapi32Util.registryKeyExists(WinReg.HKEY_CLASSES_ROOT,"String_Node_Str")) {
    return false;
  }
  String clsName=Advapi32Util.registryGetStringValue(WinReg.HKEY_CLASSES_ROOT,"String_Node_Str","String_Node_Str");
  if (clsName == null) {
    return false;
  }
  return Advapi32Util.registryKeyExists(WinReg.HKEY_CLASSES_ROOT,clsName + "String_Node_Str");
}
Program: 62155
Project: 62155
Buggy source:
@Override public String getText(List<Tag> tags){
  String ret=getFormattedText(tags);
  if (html) {
    ret=stripTags(ret);
    ret=entitiesReplace(ret);
  }
  return ret;
}

Fixed version (ground truth):
@Override public String getText(List<Tag> tags){
  String ret="String_Node_Str";
  if (hasText) {
    ret=initialText;
  }
  if (html) {
    ret=stripTags(ret);
    ret=entitiesReplace(ret);
  }
  return ret;
}
Program: 62156
Project: 62156
Buggy source:
private String stripTags(String inp){
  boolean intag=false;
  String outp="String_Node_Str";
  for (int i=0; i < inp.length(); ++i) {
    if (!intag && inp.charAt(i) == '<') {
      intag=true;
      continue;
    }
    if (intag && inp.charAt(i) == '>') {
      intag=false;
      continue;
    }
    if (!intag) {
      outp=outp + inp.charAt(i);
    }
  }
  return outp;
}

Fixed version (ground truth):
private String stripTags(String inp){
  boolean intag=false;
  String outp="String_Node_Str";
  inp=inp.replaceAll("String_Node_Str","String_Node_Str");
  for (int i=0; i < inp.length(); ++i) {
    if (!intag && inp.charAt(i) == '<') {
      intag=true;
      continue;
    }
    if (intag && inp.charAt(i) == '>') {
      intag=false;
      continue;
    }
    if (!intag) {
      outp=outp + inp.charAt(i);
    }
  }
  return outp;
}
Program: 62157
Project: 62157
Buggy source:
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @param pos 
 * @throws IOException
 */
public DefineMorphShapeTag(byte data[],int version,long pos) throws IOException {
  super(46,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterId=sis.readUI16();
  startBounds=sis.readRECT();
  endBounds=sis.readRECT();
  long offset=sis.readUI32();
  morphFillStyles=sis.readMORPHFILLSTYLEARRAY();
  morphLineStyles=sis.readMORPHLINESTYLEARRAY(1);
  startEdges=sis.readSHAPE(1);
  endEdges=sis.readSHAPE(1);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param data Data bytes
 * @param version SWF version
 * @param pos
 * @throws IOException
 */
public DefineMorphShapeTag(byte data[],int version,long pos) throws IOException {
  super(46,"String_Node_Str",data,pos);
  SWFInputStream sis=new SWFInputStream(new ByteArrayInputStream(data),version);
  characterId=sis.readUI16();
  startBounds=sis.readRECT();
  endBounds=sis.readRECT();
  long offset=sis.readUI32();
  morphFillStyles=sis.readMORPHFILLSTYLEARRAY();
  morphLineStyles=sis.readMORPHLINESTYLEARRAY(1);
  startEdges=sis.readSHAPE(1);
  endEdges=sis.readSHAPE(1);
}
Program: 62158
Project: 62158
Buggy source:
@Override public String getText(List<Tag> tags){
  FontTag fnt=null;
  String ret="String_Node_Str";
  for (  TEXTRECORD rec : textRecords) {
    if (rec.styleFlagsHasFont) {
      for (      Tag t : tags) {
        if (t instanceof FontTag) {
          if (((FontTag)t).getFontId() == rec.fontId) {
            fnt=((FontTag)t);
            break;
          }
        }
      }
    }
    if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
      if (!rec.equals("String_Node_Str")) {
        ret+="String_Node_Str";
      }
    }
    ret+=rec.getText(tags,fnt);
  }
  return ret;
}

Fixed version (ground truth):
@Override public String getText(List<Tag> tags){
  FontTag fnt=null;
  String ret="String_Node_Str";
  for (  TEXTRECORD rec : textRecords) {
    if (rec.styleFlagsHasFont) {
      for (      Tag t : tags) {
        if (t instanceof FontTag) {
          if (((FontTag)t).getFontId() == rec.fontId) {
            fnt=((FontTag)t);
            break;
          }
        }
      }
    }
    if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
      if (!ret.equals("String_Node_Str")) {
        ret+="String_Node_Str";
      }
    }
    ret+=rec.getText(tags,fnt);
  }
  return ret;
}
Program: 62159
Project: 62159
Buggy source:
@Override public String getText(List<Tag> tags){
  FontTag fnt=null;
  String ret="String_Node_Str";
  for (  TEXTRECORD rec : textRecords) {
    if (rec.styleFlagsHasFont) {
      for (      Tag t : tags) {
        if (t instanceof FontTag) {
          if (((FontTag)t).getFontId() == rec.fontId) {
            fnt=((FontTag)t);
            break;
          }
        }
      }
    }
    if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
      if (!rec.equals("String_Node_Str")) {
        ret+="String_Node_Str";
      }
    }
    ret+=rec.getText(tags,fnt);
  }
  return ret;
}

Fixed version (ground truth):
@Override public String getText(List<Tag> tags){
  FontTag fnt=null;
  String ret="String_Node_Str";
  for (  TEXTRECORD rec : textRecords) {
    if (rec.styleFlagsHasFont) {
      for (      Tag t : tags) {
        if (t instanceof FontTag) {
          if (((FontTag)t).getFontId() == rec.fontId) {
            fnt=((FontTag)t);
            break;
          }
        }
      }
    }
    if (rec.styleFlagsHasXOffset || rec.styleFlagsHasYOffset) {
      if (!ret.equals("String_Node_Str")) {
        ret+="String_Node_Str";
      }
    }
    ret+=rec.getText(tags,fnt);
  }
  return ret;
}
Program: 62164
Project: 62164
Buggy source:
public void export(String directory,List<ABCContainerTag> abcList,boolean pcode,boolean paralel) throws IOException {
  String scriptName=getPathScriptName();
  String packageName=getPathPackage();
  File outDir=new File(directory + File.separatorChar + makeDirPath(packageName));
  if (!outDir.exists()) {
    outDir.mkdirs();
  }
  String fileName=outDir.toString() + File.separator + Helper.makeFileName(scriptName)+ "String_Node_Str";
  try (FileOutputStream fos=new FileOutputStream(fileName)){
    for (    int t : traitIndices) {
      Multiname name=abc.script_info[scriptIndex].traits.traits[t].getName(abc);
      Namespace ns=name.getNamespace(abc.constants);
      if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) {
        fos.write(abc.script_info[scriptIndex].traits.traits[t].convertPackaged("String_Node_Str",abcList,abc,false,pcode,scriptIndex,-1,false,new ArrayList<String>(),paralel).getBytes());
      }
 else {
        fos.write(abc.script_info[scriptIndex].traits.traits[t].convert("String_Node_Str",abcList,abc,false,pcode,scriptIndex,-1,false,new ArrayList<String>(),paralel).getBytes());
      }
    }
  }
 }

Fixed version (ground truth):
public void export(String directory,List<ABCContainerTag> abcList,boolean pcode,boolean paralel) throws IOException {
  String scriptName=getPathScriptName();
  String packageName=getPathPackage();
  File outDir=new File(directory + File.separatorChar + makeDirPath(packageName));
  if (!outDir.exists()) {
    outDir.mkdirs();
  }
  String fileName=outDir.toString() + File.separator + Helper.makeFileName(scriptName)+ "String_Node_Str";
  try (FileOutputStream fos=new FileOutputStream(fileName)){
    for (    int t : traitIndices) {
      Multiname name=abc.script_info[scriptIndex].traits.traits[t].getName(abc);
      Namespace ns=name.getNamespace(abc.constants);
      if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) {
        fos.write(abc.script_info[scriptIndex].traits.traits[t].convertPackaged("String_Node_Str",abcList,abc,false,pcode,scriptIndex,-1,false,new ArrayList<String>(),paralel).getBytes("String_Node_Str"));
      }
 else {
        fos.write(abc.script_info[scriptIndex].traits.traits[t].convert("String_Node_Str",abcList,abc,false,pcode,scriptIndex,-1,false,new ArrayList<String>(),paralel).getBytes("String_Node_Str"));
      }
    }
  }
 }
Program: 62165
Project: 62165
Buggy source:
public static List<Action> removeNops(long address,List<Action> actions,int version,long swfPos){
  List<Action> ret=actions;
  if (true) {
  }
  String s=null;
  try {
    s=Highlighting.stripHilights(Action.actionsToString(new ArrayList<DisassemblyListener>(),address,ret,null,version,false,swfPos));
    ret=ASMParser.parse(address,swfPos,true,new ByteArrayInputStream(s.getBytes()),SWF.DEFAULT_VERSION);
  }
 catch (  Exception ex) {
    Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return ret;
}

Fixed version (ground truth):
public static List<Action> removeNops(long address,List<Action> actions,int version,long swfPos){
  List<Action> ret=actions;
  if (true) {
  }
  String s=null;
  try {
    s=Highlighting.stripHilights(Action.actionsToString(new ArrayList<DisassemblyListener>(),address,ret,null,version,false,swfPos));
    ret=ASMParser.parse(address,swfPos,true,new StringReader(s),SWF.DEFAULT_VERSION);
  }
 catch (  Exception ex) {
    Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE,"String_Node_Str",ex);
  }
  return ret;
}
Program: 62167
Project: 62167
Buggy source:
public static List<Action> parse(long address,long containerSWFOffset,boolean ignoreNops,InputStream is,int version) throws IOException, ParseException {
  FlasmLexer lexer=new FlasmLexer(is);
  List<Label> labels=new ArrayList<>();
  List<Action> ret=parse(containerSWFOffset,ignoreNops,labels,address,lexer,new ArrayList<String>(),version);
  List<Action> links=Action.getActionsAllIfsOrJumps(ret);
  for (  Action link : links) {
    boolean found=false;
    String identifier=null;
    if (link instanceof ActionJump) {
      identifier=((ActionJump)link).identifier;
      for (      Label label : labels) {
        if (((ActionJump)link).identifier.equals(label.name)) {
          ((ActionJump)link).setJumpOffset((int)(label.address - (((ActionJump)link).getAddress() + ((ActionJump)link).getBytes(version).length)));
          found=true;
          break;
        }
      }
    }
    if (link instanceof ActionIf) {
      identifier=((ActionIf)link).identifier;
      for (      Label label : labels) {
        if (((ActionIf)link).identifier.equals(label.name)) {
          ((ActionIf)link).setJumpOffset((int)(label.address - (((ActionIf)link).getAddress() + ((ActionIf)link).getBytes(version).length)));
          found=true;
          break;
        }
      }
    }
    if ((link instanceof ActionJump) || (link instanceof ActionIf)) {
      if (!found) {
        Logger.getLogger(ASMParser.class.getName()).log(Level.SEVERE,"String_Node_Str" + identifier + "String_Node_Str"+ Helper.formatAddress(link.getAddress()));
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public static List<Action> parse(long address,long containerSWFOffset,boolean ignoreNops,Reader is,int version) throws IOException, ParseException {
  FlasmLexer lexer=new FlasmLexer(is);
  List<Label> labels=new ArrayList<>();
  List<Action> ret=parse(containerSWFOffset,ignoreNops,labels,address,lexer,new ArrayList<String>(),version);
  List<Action> links=Action.getActionsAllIfsOrJumps(ret);
  for (  Action link : links) {
    boolean found=false;
    String identifier=null;
    if (link instanceof ActionJump) {
      identifier=((ActionJump)link).identifier;
      for (      Label label : labels) {
        if (((ActionJump)link).identifier.equals(label.name)) {
          ((ActionJump)link).setJumpOffset((int)(label.address - (((ActionJump)link).getAddress() + ((ActionJump)link).getBytes(version).length)));
          found=true;
          break;
        }
      }
    }
    if (link instanceof ActionIf) {
      identifier=((ActionIf)link).identifier;
      for (      Label label : labels) {
        if (((ActionIf)link).identifier.equals(label.name)) {
          ((ActionIf)link).setJumpOffset((int)(label.address - (((ActionIf)link).getAddress() + ((ActionIf)link).getBytes(version).length)));
          found=true;
          break;
        }
      }
    }
    if ((link instanceof ActionJump) || (link instanceof ActionIf)) {
      if (!found) {
        Logger.getLogger(ASMParser.class.getName()).log(Level.SEVERE,"String_Node_Str" + identifier + "String_Node_Str"+ Helper.formatAddress(link.getAddress()));
      }
    }
  }
  return ret;
}
Program: 62171
Project: 62171
Buggy source:
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(fontID);
    sos.writeUI8(fontName.getBytes().length);
    sos.write(fontName.getBytes());
    sos.writeUB(2,0);
    sos.writeUB(1,fontFlagsSmallText ? 1 : 0);
    sos.writeUB(1,fontFlagsShiftJIS ? 1 : 0);
    sos.writeUB(1,fontFlagsANSI ? 1 : 0);
    sos.writeUB(1,fontFlagsItalic ? 1 : 0);
    sos.writeUB(1,fontFlagsBold ? 1 : 0);
    sos.writeUB(1,fontFlagsWideCodes ? 1 : 0);
    sos.writeLANGCODE(languageCode);
    for (    int c : codeTable) {
      sos.writeUI16(c);
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}

Fixed version (ground truth):
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(fontID);
    sos.writeUI8(fontName.getBytes("String_Node_Str").length);
    sos.write(fontName.getBytes("String_Node_Str"));
    sos.writeUB(2,0);
    sos.writeUB(1,fontFlagsSmallText ? 1 : 0);
    sos.writeUB(1,fontFlagsShiftJIS ? 1 : 0);
    sos.writeUB(1,fontFlagsANSI ? 1 : 0);
    sos.writeUB(1,fontFlagsItalic ? 1 : 0);
    sos.writeUB(1,fontFlagsBold ? 1 : 0);
    sos.writeUB(1,fontFlagsWideCodes ? 1 : 0);
    sos.writeLANGCODE(languageCode);
    for (    int c : codeTable) {
      sos.writeUI16(c);
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}
Program: 62172
Project: 62172
Buggy source:
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(fontId);
    sos.writeUI8(fontName.getBytes().length);
    sos.write(fontName.getBytes());
    sos.writeUB(2,0);
    sos.writeUB(1,fontFlagsSmallText ? 1 : 0);
    sos.writeUB(1,fontFlagsShiftJIS ? 1 : 0);
    sos.writeUB(1,fontFlagsANSI ? 1 : 0);
    sos.writeUB(1,fontFlagsItalic ? 1 : 0);
    sos.writeUB(1,fontFlagsBold ? 1 : 0);
    sos.writeUB(1,fontFlagsWideCodes ? 1 : 0);
    for (    int code : codeTable) {
      if (fontFlagsWideCodes) {
        sos.writeUI16(code);
      }
 else {
        sos.writeUI8(code);
      }
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}

Fixed version (ground truth):
/** 
 * Gets data bytes
 * @param version SWF version
 * @return Bytes of data
 */
@Override public byte[] getData(int version){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  OutputStream os=baos;
  SWFOutputStream sos=new SWFOutputStream(os,version);
  try {
    sos.writeUI16(fontId);
    sos.writeUI8(fontName.getBytes("String_Node_Str").length);
    sos.write(fontName.getBytes("String_Node_Str"));
    sos.writeUB(2,0);
    sos.writeUB(1,fontFlagsSmallText ? 1 : 0);
    sos.writeUB(1,fontFlagsShiftJIS ? 1 : 0);
    sos.writeUB(1,fontFlagsANSI ? 1 : 0);
    sos.writeUB(1,fontFlagsItalic ? 1 : 0);
    sos.writeUB(1,fontFlagsBold ? 1 : 0);
    sos.writeUB(1,fontFlagsWideCodes ? 1 : 0);
    for (    int code : codeTable) {
      if (fontFlagsWideCodes) {
        sos.writeUI16(code);
      }
 else {
        sos.writeUI8(code);
      }
    }
  }
 catch (  IOException e) {
  }
  return baos.toByteArray();
}
Program: 62177
Project: 62177
Buggy source:
private void fixGraph(GraphPart part){
  while (fixGraphOnce(part,new ArrayList<GraphPart>(),false)) {
  }
}

Fixed version (ground truth):
private void fixGraph(GraphPart part){
  try {
    while (fixGraphOnce(part,new ArrayList<GraphPart>(),false)) {
    }
  }
 catch (  Exception|Error ex) {
  }
}
Program: 62178
Project: 62178
Buggy source:
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  decompiledTextArea.setScript(found.get(foundPos),list);
  hilightScript(found.get(foundPos));
  decompiledTextArea.setCaretPosition(0);
  java.util.Timer t=new java.util.Timer();
  t.schedule(new TimerTask(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledTextArea);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledTextArea,searchIgnoreCase,searchRegexp);
    }
  }
,1000);
}

Fixed version (ground truth):
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  decompiledTextArea.setScript(found.get(foundPos),list);
  hilightScript(found.get(foundPos));
  decompiledTextArea.setCaretPosition(0);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledTextArea);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledTextArea,searchIgnoreCase,searchRegexp);
    }
  }
);
}
Program: 62179
Project: 62179
Buggy source:
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  setSource(found.get(foundPos),true);
  TagTreeModel ttm=(TagTreeModel)Main.mainFrame.tagTree.getModel();
  TreePath tp=ttm.getTagPath(found.get(foundPos));
  Main.mainFrame.tagTree.setSelectionPath(tp);
  Main.mainFrame.tagTree.scrollPathToVisible(tp);
  decompiledEditor.setCaretPosition(0);
  java.util.Timer t=new java.util.Timer();
  t.schedule(new TimerTask(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledEditor);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledEditor,searchIgnoreCase,searchRegexp);
    }
  }
,1000);
}

Fixed version (ground truth):
public void updateSearchPos(){
  searchPos.setText((foundPos + 1) + "String_Node_Str" + found.size());
  setSource(found.get(foundPos),true);
  TagTreeModel ttm=(TagTreeModel)Main.mainFrame.tagTree.getModel();
  TreePath tp=ttm.getTagPath(found.get(foundPos));
  Main.mainFrame.tagTree.setSelectionPath(tp);
  Main.mainFrame.tagTree.scrollPathToVisible(tp);
  decompiledEditor.setCaretPosition(0);
  java.util.Timer t=new java.util.Timer();
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      DocumentSearchData dsd=DocumentSearchData.getFromEditor(decompiledEditor);
      dsd.setPattern(searchFor,searchRegexp,searchIgnoreCase);
      dsd.showQuickFindDialogEx(decompiledEditor,searchIgnoreCase,searchRegexp);
    }
  }
);
}
Program: 62181
Project: 62181
Buggy source:
public List<GraphTargetItem> translate(List<Object> localData){
  try {
    List<GraphPart> allParts=new ArrayList<>();
    for (    GraphPart head : heads) {
      populateParts(head,allParts);
    }
    Stack<GraphTargetItem> stack=new Stack<>();
    List<Loop> loops=new ArrayList<>();
    loops=getLoopsFromCFG();
    getPrecontinues(null,heads.get(0),loops,null);
    List<GraphTargetItem> ret=printGraph(new ArrayList<GraphPart>(),localData,stack,allParts,null,heads.get(0),null,loops);
    processIfs(ret);
    finalProcessStack(stack,ret);
    finalProcessAll(ret,0);
    return ret;
  }
 catch (  StackOverflowError soe) {
    List<GraphTargetItem> ret=new ArrayList<>();
    ret.add(new CommentTreeItem(null,"String_Node_Str"));
    Logger.getLogger(Graph.class.getName()).log(Level.SEVERE,"String_Node_Str",soe);
    return ret;
  }
}

Fixed version (ground truth):
public List<GraphTargetItem> translate(List<Object> localData){
  try {
    List<GraphPart> allParts=new ArrayList<>();
    for (    GraphPart head : heads) {
      populateParts(head,allParts);
    }
    Stack<GraphTargetItem> stack=new Stack<>();
    List<Loop> loops=new ArrayList<>();
    loops=getLoopsFromCFG();
    getPrecontinues(null,heads.get(0),loops,null);
    List<GraphTargetItem> ret=printGraph(new ArrayList<GraphPart>(),localData,stack,allParts,null,heads.get(0),null,loops);
    processIfs(ret);
    finalProcessStack(stack,ret);
    finalProcessAll(ret,0);
    return ret;
  }
 catch (  StackOverflowError soe) {
    List<GraphTargetItem> ret=new ArrayList<>();
    ret.add(new CommentItem("String_Node_Str"));
    Logger.getLogger(Graph.class.getName()).log(Level.SEVERE,"String_Node_Str",soe);
    return ret;
  }
}
Program: 62186
Project: 62186
Buggy source:
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int regIndex=ins.operands[0];
  output.add(new DecLocalTreeItem(ins,regIndex));
  if (localRegs.containsKey(regIndex)) {
    localRegs.put(regIndex,new NotCompileTimeTreeItem(ins,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1)))));
  }
 else {
    localRegs.put(regIndex,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1))));
  }
}

Fixed version (ground truth):
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int regIndex=ins.operands[0];
  output.add(new DecLocalTreeItem(ins,regIndex));
  if (localRegs.containsKey(regIndex)) {
    localRegs.put(regIndex,new NotCompileTimeTreeItem(ins,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1)))));
  }
 else {
    localRegs.put(regIndex,new SubtractTreeItem(ins,new IntegerValueTreeItem(ins,new Long(0)),new IntegerValueTreeItem(ins,new Long(1))));
  }
}
Program: 62187
Project: 62187
Buggy source:
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int regIndex=ins.operands[0];
  output.add(new DecLocalTreeItem(ins,regIndex));
  if (localRegs.containsKey(regIndex)) {
    localRegs.put(regIndex,new NotCompileTimeTreeItem(ins,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1)))));
  }
 else {
    localRegs.put(regIndex,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1))));
  }
}

Fixed version (ground truth):
@Override public void translate(boolean isStatic,int scriptIndex,int classIndex,java.util.HashMap<Integer,GraphTargetItem> localRegs,Stack<GraphTargetItem> stack,java.util.Stack<GraphTargetItem> scopeStack,ConstantPool constants,AVM2Instruction ins,MethodInfo[] method_info,List<GraphTargetItem> output,com.jpexs.decompiler.flash.abc.types.MethodBody body,com.jpexs.decompiler.flash.abc.ABC abc,HashMap<Integer,String> localRegNames,List<String> fullyQualifiedNames){
  int regIndex=ins.operands[0];
  output.add(new DecLocalTreeItem(ins,regIndex));
  if (localRegs.containsKey(regIndex)) {
    localRegs.put(regIndex,new NotCompileTimeTreeItem(ins,new SubtractTreeItem(ins,localRegs.get(regIndex),new IntegerValueTreeItem(ins,new Long(1)))));
  }
 else {
    localRegs.put(regIndex,new SubtractTreeItem(ins,new IntegerValueTreeItem(ins,new Long(0)),new IntegerValueTreeItem(ins,new Long(1))));
  }
}