nus-yam/ex-repair huggingface dataset:
Program: 58391
Project: 58391
Buggy source:
@Override public String setFrequency(String _,int freq,String name){
  if (_ != dummy) {
    PacketHandler.sendToServer(new Packet(hostedChannel,freq,name));
  }
  return super.setFrequency(hostedChannel,freq,name);
}

Fixed version (ground truth):
@Override public String setFrequency(String string,int freq,String name){
  if (string != dummy) {
    PacketHandler.sendToServer(new Packet(hostedChannel,freq,name));
  }
  return super.setFrequency(hostedChannel,freq,name);
}
Program: 58392
Project: 58392
Buggy source:
public static void createClientRegistry(){
  clientChannels=new ClientEnderChannelRegistry(){
    @Override public String setFrequency(    String _,    int freq,    String name){
      if (_ != dummy) {
        PacketHandler.sendToServer(new Packet(hostedChannel,freq,name));
      }
      return super.setFrequency(hostedChannel,freq,name);
    }
    @Override public String removeFrequency(    String _,    int freq){
      if (_ != dummy) {
        PacketHandler.sendToServer(new Packet(hostedChannel,freq));
      }
      return super.removeFrequency(hostedChannel,freq);
    }
  }
;
}

Fixed version (ground truth):
public static void createClientRegistry(){
  clientChannels=new ClientEnderChannelRegistry(){
    @Override public String setFrequency(    String string,    int freq,    String name){
      if (string != dummy) {
        PacketHandler.sendToServer(new Packet(hostedChannel,freq,name));
      }
      return super.setFrequency(hostedChannel,freq,name);
    }
    @Override public String removeFrequency(    String string,    int freq){
      if (string != dummy) {
        PacketHandler.sendToServer(new Packet(hostedChannel,freq));
      }
      return super.removeFrequency(hostedChannel,freq);
    }
  }
;
}
Program: 58396
Project: 58396
Buggy source:
@EventHandler public void serverStarted(FMLServerStartedEvent event){
  RegistryEnderAttuned.serverStarted(event);
}

Fixed version (ground truth):
@EventHandler public void serverStarted(FMLServerAboutToStartEvent event){
  RegistryEnderAttuned.serverStart(event);
}
Program: 58397
Project: 58397
Buggy source:
@Override public boolean canDismantle(EntityPlayer player,World world,int x,int y,int z){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof ISecurable) {
    return ((ISecurable)tile).canPlayerAccess(player.getCommandSenderName());
  }
 else   if (tile instanceof TileCoFHBase) {
    return ((TileCoFHBase)tile).canPlayerDismantle(player);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean canDismantle(EntityPlayer player,World world,int x,int y,int z){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof ISecurable) {
    return ((ISecurable)tile).canPlayerAccess(player);
  }
 else   if (tile instanceof TileCoFHBase) {
    return ((TileCoFHBase)tile).canPlayerDismantle(player);
  }
  return true;
}
Program: 58398
Project: 58398
Buggy source:
@Override public float getPlayerRelativeBlockHardness(EntityPlayer player,World world,int x,int y,int z){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof ISecurable && !((ISecurable)tile).canPlayerAccess(player.getCommandSenderName())) {
    return -1;
  }
  return ForgeHooks.blockStrength(this,player,world,x,y,z);
}

Fixed version (ground truth):
@Override public float getPlayerRelativeBlockHardness(EntityPlayer player,World world,int x,int y,int z){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof ISecurable && !((ISecurable)tile).canPlayerAccess(player)) {
    return -1;
  }
  return ForgeHooks.blockStrength(this,player,world,x,y,z);
}
Program: 58399
Project: 58399
Buggy source:
public boolean canPlayerAccess(String name){
  if (!(this instanceof ISecurable)) {
    return true;
  }
  AccessMode access=((ISecurable)this).getAccess();
  if (access.isPublic() || (CoFHProps.enableOpSecureAccess && CoreUtils.isOp(name))) {
    return true;
  }
  GameProfile profile=((ISecurable)this).getOwner();
  UUID ownerID=profile.getId();
  if (ownerID.variant() == 0) {
    return true;
  }
  UUID otherID=UUID.fromString(PreYggdrasilConverter.func_152719_a(name));
  if (ownerID.equals(otherID)) {
    return true;
  }
  return access.isRestricted() && SocialRegistry.playerHasAccess(name,profile);
}

Fixed version (ground truth):
public boolean canPlayerAccess(EntityPlayer player){
  if (!(this instanceof ISecurable)) {
    return true;
  }
  AccessMode access=((ISecurable)this).getAccess();
  String name=player.getCommandSenderName();
  if (access.isPublic() || (CoFHProps.enableOpSecureAccess && CoreUtils.isOp(name))) {
    return true;
  }
  GameProfile profile=((ISecurable)this).getOwner();
  UUID ownerID=profile.getId();
  if (ownerID.variant() == 0) {
    return true;
  }
  UUID otherID=player.getGameProfile().getId();
  if (ownerID.equals(otherID)) {
    return true;
  }
  return access.isRestricted() && SocialRegistry.playerHasAccess(name,profile);
}
Program: 58402
Project: 58402
Buggy source:
private static byte[] alterHooksCore(String name,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  MethodNode m=null;
  for (  MethodNode n : cn.methods) {
    if ("String_Node_Str".equals(n.name)) {
      m=n;
      break;
    }
  }
  for (int i=0, e=m.instructions.size(); i < e; ++i) {
    AbstractInsnNode n=m.instructions.get(i);
    if (n.getOpcode() == INVOKEVIRTUAL) {
      MethodInsnNode mn=(MethodInsnNode)n;
      if (names[0].equals(mn.name)) {
        mn.name="String_Node_Str";
      }
    }
  }
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
  cn.accept(cw);
  bytes=cw.toByteArray();
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterHooksCore(String name,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str"};
  }
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  MethodNode m=null;
  for (  MethodNode n : cn.methods) {
    if ("String_Node_Str".equals(n.name)) {
      m=n;
      break;
    }
  }
  for (int i=0, e=m.instructions.size(); i < e; ++i) {
    AbstractInsnNode n=m.instructions.get(i);
    if (n.getOpcode() == INVOKEVIRTUAL) {
      MethodInsnNode mn=(MethodInsnNode)n;
      if (names[0].equals(mn.name)) {
        mn.name="String_Node_Str";
      }
    }
  }
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
  cn.accept(cw);
  bytes=cw.toByteArray();
  return bytes;
}
Program: 58404
Project: 58404
Buggy source:
private static byte[] alterChunk(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    boolean updated=false;
    for (    MethodNode m : cn.methods) {
      String mName=m.name;
      if (names[0].equals(mName) && "String_Node_Str".equals(m.desc)) {
        updated=true;
        for (int i=0, e=m.instructions.size(); i < e; ++i) {
          AbstractInsnNode n=m.instructions.get(i);
          if (n.getOpcode() == RETURN) {
            m.instructions.insertBefore(n,new VarInsnNode(ALOAD,0));
            m.instructions.insertBefore(n,new InsnNode(ICONST_0));
            m.instructions.insertBefore(n,new FieldInsnNode(PUTFIELD,name,names[1],"String_Node_Str"));
            break;
          }
        }
      }
    }
    if (!updated) {
      break l;
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterChunk(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
  name=transformedName.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    boolean updated=false;
    for (    MethodNode m : cn.methods) {
      String mName=m.name;
      if (names[0].equals(mName) && "String_Node_Str".equals(m.desc)) {
        updated=true;
        for (int i=0, e=m.instructions.size(); i < e; ++i) {
          AbstractInsnNode n=m.instructions.get(i);
          if (n.getOpcode() == RETURN) {
            m.instructions.insertBefore(n,new VarInsnNode(ALOAD,0));
            m.instructions.insertBefore(n,new InsnNode(ICONST_0));
            m.instructions.insertBefore(n,new FieldInsnNode(PUTFIELD,name,names[1],"String_Node_Str"));
            break;
          }
        }
      }
    }
    if (!updated) {
      break l;
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58407
Project: 58407
Buggy source:
private static byte[] alterEntity(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String mOwner="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    for (int i=0, e=m.instructions.size(); i < e; ++i) {
      AbstractInsnNode n=m.instructions.get(i);
      if (n.getOpcode() == INVOKEVIRTUAL) {
        MethodInsnNode mn=(MethodInsnNode)n;
        if (mOwner.equals(mn.owner) && names[1].equals(mn.name)) {
          mn.setOpcode(INVOKESTATIC);
          mn.owner="String_Node_Str";
          mn.desc="String_Node_Str";
          mn.name="String_Node_Str";
        }
      }
    }
    m=new MethodNode(ACC_PUBLIC,"String_Node_Str","String_Node_Str",null,null);
    cn.methods.add(m);
    m.instructions.insert(new InsnNode(IRETURN));
    m.instructions.insert(new MethodInsnNode(INVOKEVIRTUAL,name,names[2],"String_Node_Str",false));
    m.instructions.insert(new VarInsnNode(ALOAD,0));
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterEntity(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  name=transformedName.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String mOwner="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    for (int i=0, e=m.instructions.size(); i < e; ++i) {
      AbstractInsnNode n=m.instructions.get(i);
      if (n.getOpcode() == INVOKEVIRTUAL) {
        MethodInsnNode mn=(MethodInsnNode)n;
        if (mOwner.equals(mn.owner) && names[1].equals(mn.name)) {
          mn.setOpcode(INVOKESTATIC);
          mn.owner="String_Node_Str";
          mn.desc="String_Node_Str";
          mn.name="String_Node_Str";
        }
      }
    }
    m=new MethodNode(ACC_PUBLIC,"String_Node_Str","String_Node_Str",null,null);
    cn.methods.add(m);
    m.instructions.insert(new InsnNode(IRETURN));
    m.instructions.insert(new MethodInsnNode(INVOKEVIRTUAL,name,names[2],"String_Node_Str",false));
    m.instructions.insert(new VarInsnNode(ALOAD,0));
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58408
Project: 58408
Buggy source:
private static byte[] alterEntityItem(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    m.localVariables=null;
    m.instructions.clear();
    m.instructions.add(new VarInsnNode(ALOAD,0));
    m.instructions.add(new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false));
    m.instructions.add(new InsnNode(RETURN));
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterEntityItem(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    m.localVariables=null;
    m.instructions.clear();
    m.instructions.add(new VarInsnNode(ALOAD,0));
    m.instructions.add(new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false));
    m.instructions.add(new InsnNode(RETURN));
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58409
Project: 58409
Buggy source:
private static byte[] alterTileEntity(String name,String transformedName,byte[] bytes,ClassReader cr){
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,0);
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
  cn.accept(cw);
  cw.newMethod(name,"String_Node_Str","String_Node_Str",true);
  MethodVisitor mv=cw.visitMethod(ACC_PUBLIC | ACC_SYNTHETIC,"String_Node_Str","String_Node_Str",null,null);
  mv.visitCode();
  mv.visitInsn(RETURN);
  mv.visitMaxs(0,1);
  mv.visitEnd();
  cw.visitEnd();
  cw.newMethod(name,"String_Node_Str","String_Node_Str",true);
  mv=cw.visitMethod(ACC_PUBLIC | ACC_SYNTHETIC,"String_Node_Str","String_Node_Str",null,null);
  mv.visitCode();
  mv.visitInsn(RETURN);
  mv.visitMaxs(0,1);
  mv.visitEnd();
  cw.visitEnd();
  return cw.toByteArray();
}

Fixed version (ground truth):
private static byte[] alterTileEntity(String name,String transformedName,byte[] bytes,ClassReader cr){
  name=transformedName.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,0);
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
  cn.accept(cw);
  cw.newMethod(name,"String_Node_Str","String_Node_Str",true);
  MethodVisitor mv=cw.visitMethod(ACC_PUBLIC | ACC_SYNTHETIC,"String_Node_Str","String_Node_Str",null,null);
  mv.visitCode();
  mv.visitInsn(RETURN);
  mv.visitMaxs(0,1);
  mv.visitEnd();
  cw.visitEnd();
  cw.newMethod(name,"String_Node_Str","String_Node_Str",true);
  mv=cw.visitMethod(ACC_PUBLIC | ACC_SYNTHETIC,"String_Node_Str","String_Node_Str",null,null);
  mv.visitCode();
  mv.visitInsn(RETURN);
  mv.visitMaxs(0,1);
  mv.visitEnd();
  cw.visitEnd();
  return cw.toByteArray();
}
Program: 58410
Project: 58410
Buggy source:
private static byte[] alterMinecraft(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String mOwner="String_Node_Str";
  l: {
    boolean updated=false;
    mc:     for (    MethodNode m : cn.methods) {
      String mName=m.name;
      if (names[0].equals(mName) && "String_Node_Str".equals(m.desc)) {
        updated=true;
        for (int i=0, e=m.instructions.size(); i < e; ++i) {
          AbstractInsnNode n=m.instructions.get(i);
          if (n.getOpcode() == INVOKEVIRTUAL) {
            MethodInsnNode mn=(MethodInsnNode)n;
            if (mOwner.equals(mn.owner) && names[1].equals(mn.name) && "String_Node_Str".equals(mn.desc)) {
              m.instructions.set(mn,new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false));
              break mc;
            }
          }
        }
      }
    }
    if (!updated) {
      break l;
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterMinecraft(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str"};
  }
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String mOwner="String_Node_Str";
  l: {
    boolean updated=false;
    mc:     for (    MethodNode m : cn.methods) {
      String mName=m.name;
      if (names[0].equals(mName) && "String_Node_Str".equals(m.desc)) {
        updated=true;
        for (int i=0, e=m.instructions.size(); i < e; ++i) {
          AbstractInsnNode n=m.instructions.get(i);
          if (n.getOpcode() == INVOKEVIRTUAL) {
            MethodInsnNode mn=(MethodInsnNode)n;
            if (mOwner.equals(mn.owner) && names[1].equals(mn.name) && "String_Node_Str".equals(mn.desc)) {
              m.instructions.set(mn,new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false));
              break mc;
            }
          }
        }
      }
    }
    if (!updated) {
      break l;
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58412
Project: 58412
Buggy source:
private static byte[] alterBlockPane(String name,String transformedName,byte[] bytes,ClassReader cr){
  String names="String_Node_Str";
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  final String sig="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names.equals(n.name) && sig.equals(n.desc)) {
        m=n;
        break;
      }
    }
    if (m == null) {
      break l;
    }
    m.instructions.clear();
    m.instructions.add(new VarInsnNode(ALOAD,1));
    m.instructions.add(new VarInsnNode(ILOAD,2));
    m.instructions.add(new VarInsnNode(ILOAD,3));
    m.instructions.add(new VarInsnNode(ILOAD,4));
    m.instructions.add(new VarInsnNode(ALOAD,5));
    m.instructions.add(new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str",sig,false));
    m.instructions.add(new InsnNode(IRETURN));
    m.localVariables=null;
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] alterBlockPane(String name,String transformedName,byte[] bytes,ClassReader cr){
  String names="String_Node_Str";
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  final String sig="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names.equals(n.name) && sig.equals(n.desc)) {
        m=n;
        break;
      }
    }
    if (m == null) {
      break l;
    }
    m.instructions.clear();
    m.instructions.add(new VarInsnNode(ALOAD,1));
    m.instructions.add(new VarInsnNode(ILOAD,2));
    m.instructions.add(new VarInsnNode(ILOAD,3));
    m.instructions.add(new VarInsnNode(ILOAD,4));
    m.instructions.add(new VarInsnNode(ALOAD,5));
    m.instructions.add(new MethodInsnNode(INVOKESTATIC,"String_Node_Str","String_Node_Str",sig,false));
    m.instructions.add(new InsnNode(IRETURN));
    m.localVariables=null;
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58413
Project: 58413
Buggy source:
private static byte[] alterBlock(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    for (AbstractInsnNode n=m.instructions.getFirst(); n != null; n=n.getNext()) {
      if (n.getOpcode() == NEW) {
        AbstractInsnNode p=n.getPrevious().getPrevious();
        if (p.getOpcode() != BIPUSH)         continue;
        TypeInsnNode node=((TypeInsnNode)n);
switch (((IntInsnNode)p).operand) {
case 8:
          node.desc="String_Node_Str";
        break;
case 9:
      node.desc="String_Node_Str";
    break;
default :
  node=null;
}
if (node != null) ((MethodInsnNode)n.getNext().getNext().getNext()).owner=node.desc;
}
}
ClassWriter cw=new ClassWriter(0);
cn.accept(cw);
bytes=cw.toByteArray();
}
return bytes;
}

Fixed version (ground truth):
private static byte[] alterBlock(String name,String transformedName,byte[] bytes,ClassReader cr){
  String[] names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
 else {
    names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  }
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names[0].equals(n.name)) {
        m=n;
        break;
      }
    }
    if (m == null)     break l;
    for (AbstractInsnNode n=m.instructions.getFirst(); n != null; n=n.getNext()) {
      if (n.getOpcode() == NEW) {
        AbstractInsnNode p=n.getPrevious().getPrevious();
        if (p.getOpcode() != BIPUSH)         continue;
        TypeInsnNode node=((TypeInsnNode)n);
switch (((IntInsnNode)p).operand) {
case 8:
          node.desc="String_Node_Str";
        break;
case 9:
      node.desc="String_Node_Str";
    break;
default :
  node=null;
}
if (node != null) ((MethodInsnNode)n.getNext().getNext().getNext()).owner=node.desc;
}
}
ClassWriter cw=new ClassWriter(0);
cn.accept(cw);
bytes=cw.toByteArray();
}
return bytes;
}
Program: 58414
Project: 58414
Buggy source:
private static byte[] fixWorldGenLag(String name,String transformedName,byte[] bytes,ClassReader cr){
  String names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names="String_Node_Str";
  }
 else {
    names="String_Node_Str";
  }
  name=name.replace('.','/');
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String sig="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names.equals(n.name) && sig.equals(n.desc)) {
        m=n;
        break;
      }
    }
    if (m == null) {
      break l;
    }
    q:     for (int i=0, e=m.instructions.size(); i < e; ++i) {
      AbstractInsnNode n=m.instructions.get(i);
      if (n.getOpcode() == GETSTATIC) {
        if ("String_Node_Str".equals(((FieldInsnNode)n).owner)) {
          for (; n != null; n=n.getNext()) {
            if (n.getOpcode() != IF_ICMPNE)             continue;
            ((JumpInsnNode)n).setOpcode(IF_ICMPLT);
            break q;
          }
        }
      }
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}

Fixed version (ground truth):
private static byte[] fixWorldGenLag(String name,String transformedName,byte[] bytes,ClassReader cr){
  String names;
  if (LoadingPlugin.runtimeDeobfEnabled) {
    names="String_Node_Str";
  }
 else {
    names="String_Node_Str";
  }
  ClassNode cn=new ClassNode(ASM5);
  cr.accept(cn,ClassReader.EXPAND_FRAMES);
  String sig="String_Node_Str";
  l: {
    MethodNode m=null;
    for (    MethodNode n : cn.methods) {
      if (names.equals(n.name) && sig.equals(n.desc)) {
        m=n;
        break;
      }
    }
    if (m == null) {
      break l;
    }
    q:     for (int i=0, e=m.instructions.size(); i < e; ++i) {
      AbstractInsnNode n=m.instructions.get(i);
      if (n.getOpcode() == GETSTATIC) {
        if ("String_Node_Str".equals(((FieldInsnNode)n).owner)) {
          for (; n != null; n=n.getNext()) {
            if (n.getOpcode() != IF_ICMPNE)             continue;
            ((JumpInsnNode)n).setOpcode(IF_ICMPLT);
            break q;
          }
        }
      }
    }
    ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_MAXS);
    cn.accept(cw);
    bytes=cw.toByteArray();
  }
  return bytes;
}
Program: 58415
Project: 58415
Buggy source:
static boolean implement(ClassNode cn){
  if (cn.visibleAnnotations == null) {
    return false;
  }
  boolean interfaces=false;
  for (  AnnotationNode n : cn.visibleAnnotations) {
    AnnotationInfo node=parseAnnotation(n,implementableDesc);
    if (node != null && side == node.side) {
      String[] value=node.values;
      for (int j=0, l=value.length; j < l; ++j) {
        String clazz=value[j].trim();
        String cz=clazz.replace('.','/');
        if (!cn.interfaces.contains(cz)) {
          try {
            if (!workingPath.contains(clazz)) {
              Class.forName(clazz,false,ASMCore.class.getClassLoader());
            }
            cn.interfaces.add(cz);
            interfaces=true;
          }
 catch (          Throwable $) {
          }
        }
      }
    }
  }
  return interfaces;
}

Fixed version (ground truth):
static boolean implement(ClassNode cn){
  if (cn.visibleAnnotations == null) {
    return false;
  }
  boolean interfaces=false;
  for (  AnnotationNode n : cn.visibleAnnotations) {
    AnnotationInfo node=parseAnnotation(n,implementableDesc);
    if (node != null && (node.side == "String_Node_Str" || side == node.side)) {
      String[] value=node.values;
      for (int j=0, l=value.length; j < l; ++j) {
        String clazz=value[j].trim();
        String cz=clazz.replace('.','/');
        if (!cn.interfaces.contains(cz)) {
          try {
            if (!workingPath.contains(clazz)) {
              Class.forName(clazz,false,ASMCore.class.getClassLoader());
            }
            cn.interfaces.add(cz);
            interfaces=true;
          }
 catch (          Throwable $) {
          }
        }
      }
    }
  }
  return interfaces;
}
Program: 58416
Project: 58416
Buggy source:
public static final void renderItemOnBlockSide(TileEntity tile,ItemStack stack,int side,double x,double y,double z){
  if (stack == null) {
    return;
  }
  GL11.glPushMatrix();
switch (side) {
case 0:
    break;
case 1:
  break;
case 2:
GL11.glTranslated(x + 0.75,y + 0.875,z - RenderHelper.RENDER_OFFSET);
break;
case 3:
GL11.glTranslated(x + 0.25,y + 0.875,z + 1 + RenderHelper.RENDER_OFFSET);
GL11.glRotated(180,0,1,0);
break;
case 4:
GL11.glTranslated(x - RenderHelper.RENDER_OFFSET,y + 0.875,z + 0.25);
GL11.glRotated(90,0,1,0);
break;
case 5:
GL11.glTranslated(x + 1 + RenderHelper.RENDER_OFFSET,y + 0.875,z + 0.75);
GL11.glRotated(-90,0,1,0);
break;
default :
}
GL11.glScaled(0.03125,0.03125,-RenderHelper.RENDER_OFFSET);
GL11.glRotated(180,0,0,1);
setupLight(tile,side);
RenderHelper.enableGUIStandardItemLighting();
if (!ForgeHooksClient.renderInventoryItem(renderBlocks,RenderHelper.engine(),stack,true,0.0F,0.0F,0.0F)) {
renderItem.renderItemIntoGUI(Minecraft.getMinecraft().fontRenderer,RenderHelper.engine(),stack,0,0);
}
GL11.glPopMatrix();
net.minecraft.client.renderer.RenderHelper.enableStandardItemLighting();
}

Fixed version (ground truth):
public static final void renderItemOnBlockSide(TileEntity tile,ItemStack stack,int side,double x,double y,double z){
  if (stack == null) {
    return;
  }
  GL11.glPushMatrix();
switch (side) {
case 0:
    break;
case 1:
  break;
case 2:
GL11.glTranslated(x + 0.75,y + 0.875,z - RenderHelper.RENDER_OFFSET);
break;
case 3:
GL11.glTranslated(x + 0.25,y + 0.875,z + 1 + RenderHelper.RENDER_OFFSET);
GL11.glRotated(180,0,1,0);
break;
case 4:
GL11.glTranslated(x - RenderHelper.RENDER_OFFSET,y + 0.875,z + 0.25);
GL11.glRotated(90,0,1,0);
break;
case 5:
GL11.glTranslated(x + 1 + RenderHelper.RENDER_OFFSET,y + 0.875,z + 0.75);
GL11.glRotated(-90,0,1,0);
break;
default :
}
GL11.glScaled(0.03125,0.03125,-RenderHelper.RENDER_OFFSET);
GL11.glRotated(180,0,0,1);
setupLight(tile,side);
RenderHelper.enableGUIStandardItemLighting();
if (!ForgeHooksClient.renderInventoryItem(renderBlocks,RenderHelper.engine(),stack,true,0.0F,0.0F,0.0F)) {
renderItem.renderItemIntoGUI(Minecraft.getMinecraft().fontRenderer,RenderHelper.engine(),stack,0,0);
}
GL11.glAlphaFunc(GL11.GL_GREATER,0.1F);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA,GL11.GL_ONE,GL11.GL_ZERO);
GL11.glPopMatrix();
net.minecraft.client.renderer.RenderHelper.enableStandardItemLighting();
}
Program: 58417
Project: 58417
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void loadLanguageFile(String lang,InputStream stream) throws Throwable {
  InputStreamReader is=new InputStreamReader(stream,"String_Node_Str");
  Properties langPack=new Properties();
  langPack.load(is);
  HashMap<String,String> parsedLangFile=new HashMap<String,String>();
  parsedLangFile.putAll((Map)langPack);
  LanguageRegistry.instance().injectLanguage(lang.intern(),parsedLangFile);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void loadLanguageFile(String lang,Properties langPack){
  HashMap<String,String> parsedLangFile=new HashMap<String,String>();
  parsedLangFile.putAll((Map)langPack);
  LanguageRegistry.instance().injectLanguage(lang.intern(),parsedLangFile);
}
Program: 58418
Project: 58418
Buggy source:
@SuppressWarnings("String_Node_Str") protected void loadLang(){
  if (FMLLaunchHandler.side() == Side.CLIENT) {
    try {
      loadClientLang();
      return;
    }
 catch (    Throwable t) {
      _log.error(AbstractLogger.CATCHING_MARKER,"String_Node_Str",t);
    }
  }
  String path="String_Node_Str" + getAssetDir() + "String_Node_Str";
  InputStream is=null;
  String lang="String_Node_Str";
  try {
    is=Loader.getResource(path + lang + "String_Node_Str",null).openStream();
    loadLanguageFile(lang,is);
  }
 catch (  Throwable t) {
    _log.catching(Level.INFO,t);
  }
 finally {
    try {
      is.close();
    }
 catch (    IOException t) {
      _log.catching(Level.INFO,t);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void loadLang(){
  if (FMLLaunchHandler.side() == Side.CLIENT) {
    try {
      loadClientLang();
      return;
    }
 catch (    Throwable t) {
      _log.error(AbstractLogger.CATCHING_MARKER,"String_Node_Str",t);
    }
  }
  String path="String_Node_Str" + getAssetDir() + "String_Node_Str";
  InputStream is=null;
  String lang="String_Node_Str";
  try {
    is=Loader.getResource(path + lang + "String_Node_Str",null).openStream();
    Properties langPack=new Properties();
    loadLanguageFile(langPack,is);
    loadLanguageFile(lang,langPack);
  }
 catch (  Throwable t) {
    _log.catching(Level.INFO,t);
  }
 finally {
    try {
      is.close();
    }
 catch (    IOException t) {
      _log.catching(Level.INFO,t);
    }
  }
}
Program: 58419
Project: 58419
Buggy source:
@Override public void onResourceManagerReload(IResourceManager manager){
  String l=null;
  try {
    l=Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode();
  }
 catch (  Throwable t) {
    _log.catching(Level.WARN,t);
  }
  for (  String lang : Arrays.asList("String_Node_Str",l)) {
    if (lang != null) {
      try {
        List<IResource> files=manager.getAllResources(new ResourceLocation(_path + lang + "String_Node_Str"));
        for (        IResource file : files) {
          if (file.getInputStream() == null) {
            _log.warn("String_Node_Str" + lang + "String_Node_Str");
            continue;
          }
          try {
            loadLanguageFile(lang,file.getInputStream());
          }
 catch (          Throwable t) {
            _log.warn(AbstractLogger.CATCHING_MARKER,"String_Node_Str" + lang + "String_Node_Str",t);
          }
        }
      }
 catch (      Throwable t) {
        _log.info(AbstractLogger.CATCHING_MARKER,"String_Node_Str" + lang + "String_Node_Str",t);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onResourceManagerReload(IResourceManager manager){
  String l=null;
  try {
    l=Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode();
  }
 catch (  Throwable t) {
    _log.catching(Level.WARN,t);
  }
  for (  String lang : Arrays.asList("String_Node_Str",l)) {
    if (lang != null) {
      Properties langPack=new Properties();
      try {
        List<IResource> files=manager.getAllResources(new ResourceLocation(_path + lang + "String_Node_Str"));
        for (        IResource file : files) {
          if (file.getInputStream() == null) {
            _log.warn("String_Node_Str" + lang + "String_Node_Str");
            continue;
          }
          try {
            loadLanguageFile(langPack,file.getInputStream());
          }
 catch (          Throwable t) {
            _log.warn(AbstractLogger.CATCHING_MARKER,"String_Node_Str" + lang + "String_Node_Str",t);
          }
        }
      }
 catch (      Throwable t) {
        _log.info(AbstractLogger.CATCHING_MARKER,"String_Node_Str" + lang + "String_Node_Str",t);
      }
      loadLanguageFile(lang,langPack);
    }
  }
  Minecraft.getMinecraft().getLanguageManager().onResourceManagerReload(manager);
}
Program: 58421
Project: 58421
Buggy source:
@EventHandler public void serverStarting(FMLServerStartingEvent event){
  RegistryEnderAttuned.linkConf=new Configuration(new File(DimensionManager.getCurrentSaveRootDirectory(),"String_Node_Str"));
  RegistryEnderAttuned.linkConf.load();
  OreDictionaryArbiter.initialize();
  CommandHandler.initCommands(event);
  server=event.getServer();
}

Fixed version (ground truth):
@EventHandler public void serverStarting(FMLServerStartingEvent event){
  RegistryEnderAttuned.linkConf=new Configuration(new File(DimensionManager.getCurrentSaveRootDirectory(),"String_Node_Str"));
  RegistryEnderAttuned.linkConf.load();
  OreDictionaryArbiter.initialize();
  CommandHandler.initCommands(event);
  server=event.getServer();
  for (  IBakeable i : oven) {
    i.bake();
  }
}
Program: 58422
Project: 58422
Buggy source:
public BlockFluidInteractive(String modName,Fluid fluid,Material material,String name){
  super(modName,fluid,material,name);
}

Fixed version (ground truth):
public BlockFluidInteractive(String modName,Fluid fluid,Material material,String name){
  super(modName,fluid,material,name);
  CoFHCore.registerBakeable(this);
}
Program: 58423
Project: 58423
Buggy source:
public static void refreshMap(){
  Map<ItemWrapper,IItemRenderer> tempMap=new THashMap(itemRenders.size());
  for (  Entry<ItemWrapper,IItemRenderer> entry : itemRenders.entrySet()) {
    ItemWrapper tempItem=new ItemWrapper(entry.getKey().item,entry.getKey().metadata);
    tempMap.put(tempItem,entry.getValue());
  }
  itemRenders.clear();
  itemRenders=tempMap;
}

Fixed version (ground truth):
public static void refreshMap(){
  Map<ItemWrapper,IItemRenderer> tempMap=new THashMap<ItemWrapper,IItemRenderer>(itemRenders.size());
  for (  Entry<ItemWrapper,IItemRenderer> entry : itemRenders.entrySet()) {
    ItemWrapper tempItem=new ItemWrapper(entry.getKey().item,entry.getKey().metadata);
    tempMap.put(tempItem,entry.getValue());
  }
  itemRenders.clear();
  itemRenders=tempMap;
}
Program: 58424
Project: 58424
Buggy source:
public static void copyFileUsingChannel(File source,File dest) throws IOException {
  FileChannel sourceChannel=null;
  FileChannel destChannel=null;
  try {
    sourceChannel=new FileInputStream(source).getChannel();
    destChannel=new FileOutputStream(dest).getChannel();
    destChannel.transferFrom(sourceChannel,0,sourceChannel.size());
  }
  finally {
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void copyFileUsingChannel(File source,File dest) throws IOException {
  FileChannel sourceChannel=null;
  FileChannel destChannel=null;
  try {
    sourceChannel=new FileInputStream(source).getChannel();
    destChannel=new FileOutputStream(dest).getChannel();
    destChannel.transferFrom(sourceChannel,0,sourceChannel.size());
  }
  finally {
  }
}
Program: 58425
Project: 58425
Buggy source:
public static void copyFileUsingStream(String source,String dest) throws IOException {
  InputStream is=null;
  OutputStream os=null;
  try {
    is=Loader.getResource(source,null).openStream();
    os=new FileOutputStream(new File(dest));
    byte[] buffer=new byte[1024];
    int length;
    while ((length=is.read(buffer)) > 0) {
      os.write(buffer,0,length);
    }
  }
  finally {
    if (is != null) {
      is.close();
    }
    if (os != null) {
      os.close();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void copyFileUsingStream(String source,String dest) throws IOException {
  InputStream is=null;
  OutputStream os=null;
  try {
    is=Loader.getResource(source,null).openStream();
    os=new FileOutputStream(new File(dest));
    byte[] buffer=new byte[1024];
    int length;
    while ((length=is.read(buffer)) > 0) {
      os.write(buffer,0,length);
    }
  }
  finally {
    if (is != null) {
      is.close();
    }
    if (os != null) {
      os.close();
    }
  }
}
Program: 58426
Project: 58426
Buggy source:
public static String encode(String string){
  String encoded="String_Node_Str";
  byte[] stringArray;
  try {
    stringArray=string.getBytes("String_Node_Str");
  }
 catch (  Exception ignored) {
    stringArray=string.getBytes();
  }
  int paddingCount=(3 - stringArray.length % 3) % 3;
  stringArray=zeroPad(stringArray.length + paddingCount,stringArray);
  for (int i=0; i < stringArray.length; i+=3) {
    int j=((stringArray[i] & 0xFF) << 16) + ((stringArray[i + 1] & 0xFF) << 8) + (stringArray[i + 2] & 0xFF);
    encoded=encoded + "String_Node_Str".charAt(j >> 18 & 0x3F) + "String_Node_Str".charAt(j >> 12 & 0x3F)+ "String_Node_Str".charAt(j >> 6 & 0x3F)+ "String_Node_Str".charAt(j & 0x3F);
  }
  return splitLines(encoded.substring(0,encoded.length() - paddingCount) + "String_Node_Str".substring(0,paddingCount));
}

Fixed version (ground truth):
public static String encode(String string){
  String encoded="String_Node_Str";
  byte[] stringArray;
  try {
    stringArray=string.getBytes("String_Node_Str");
  }
 catch (  Exception ignored) {
    stringArray=string.getBytes();
  }
  int paddingCount=(3 - stringArray.length % 3) % 3;
  stringArray=zeroPad(stringArray.length + paddingCount,stringArray);
  for (int i=0; i < stringArray.length; i+=3) {
    int j=((stringArray[i] & 0xFF) << 16) + ((stringArray[i + 1] & 0xFF) << 8) + (stringArray[i + 2] & 0xFF);
    encoded=encoded + base64code.charAt(j >> 18 & 0x3F) + base64code.charAt(j >> 12 & 0x3F)+ base64code.charAt(j >> 6 & 0x3F)+ base64code.charAt(j & 0x3F);
  }
  return splitLines(encoded.substring(0,encoded.length() - paddingCount) + "String_Node_Str".substring(0,paddingCount));
}
Program: 58427
Project: 58427
Buggy source:
public static String splitLines(String string){
  String lines="String_Node_Str";
  for (int i=0; i < string.length(); i+=76) {
    lines=lines + string.substring(i,Math.min(string.length(),i + 76));
    lines=lines + "String_Node_Str";
  }
  return lines;
}

Fixed version (ground truth):
public static String splitLines(String string){
  String lines="String_Node_Str";
  for (int i=0; i < string.length(); i+=splitLinesAt) {
    lines=lines + string.substring(i,Math.min(string.length(),i + splitLinesAt));
    lines=lines + "String_Node_Str";
  }
  return lines;
}
Program: 58429
Project: 58429
Buggy source:
public void tickItemInUse(ItemStack updateItem){
  if (updateItem != null && ItemHelper.itemsEqualWithMetadata(previousItem,itemInUse)) {
    itemInUse.getItem().onUsingTick(itemInUse,this,itemInUseCount);
    if (itemInUseCount <= 25 && itemInUseCount % 4 == 0) {
      updateItemUse(updateItem,5);
    }
    if (--itemInUseCount == 0 && !worldObj.isRemote) {
      onItemUseFinish();
    }
  }
 else {
    clearItemInUse();
  }
}

Fixed version (ground truth):
public void tickItemInUse(ItemStack updateItem){
  if (updateItem != null && ItemHelper.itemsEqualWithMetadata(previousItem,itemInUse)) {
    itemInUseCount=ForgeEventFactory.onItemUseTick(this,itemInUse,itemInUseCount);
    if (itemInUseCount <= 0) {
      onItemUseFinish();
    }
 else {
      itemInUse.getItem().onUsingTick(itemInUse,this,itemInUseCount);
      if (itemInUseCount <= 25 && itemInUseCount % 4 == 0) {
        updateItemUse(updateItem,5);
      }
      if (--itemInUseCount == 0 && !worldObj.isRemote) {
        onItemUseFinish();
      }
    }
  }
 else {
    clearItemInUse();
  }
}
Program: 58430
Project: 58430
Buggy source:
@Override public void onUpdate(){
  ItemStack itemstack=previousItem;
  ItemStack itemstack1=getHeldItem();
  if (!ItemStack.areItemStacksEqual(itemstack1,itemstack)) {
    if (itemstack != null) {
      getAttributeMap().removeAttributeModifiers(itemstack.getAttributeModifiers());
    }
    if (itemstack1 != null) {
      getAttributeMap().applyAttributeModifiers(itemstack1.getAttributeModifiers());
    }
    myName="String_Node_Str" + (itemstack1 != null ? "String_Node_Str" + itemstack1.getDisplayName() : "String_Node_Str");
  }
  previousItem=itemstack1 == null ? null : itemstack1.copy();
  theItemInWorldManager.updateBlockRemoving();
  if (itemInUse != null) {
    tickItemInUse(itemstack);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(){
  ItemStack itemstack=previousItem;
  ItemStack itemstack1=getHeldItem();
  if (!ItemStack.areItemStacksEqual(itemstack1,itemstack)) {
    if (itemstack != null) {
      getAttributeMap().removeAttributeModifiers(itemstack.getAttributeModifiers());
    }
    if (itemstack1 != null) {
      getAttributeMap().applyAttributeModifiers(itemstack1.getAttributeModifiers());
    }
    myName="String_Node_Str" + (itemstack1 != null ? "String_Node_Str" + itemstack1.getDisplayName() : "String_Node_Str");
  }
  previousItem=itemstack1 == null ? null : itemstack1.copy();
  theItemInWorldManager.updateBlockRemoving();
  if (itemInUse != null) {
  }
}
Program: 58434
Project: 58434
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  CoFHProps.configDir=event.getModConfigurationDirectory();
  UpdateManager.registerUpdater(new UpdateManager(this,releaseURL,CoFHProps.DOWNLOAD_URL));
  configCore.setConfiguration(new Configuration(new File(CoFHProps.configDir,"String_Node_Str")));
  configClient.setConfiguration(new Configuration(new File(CoFHProps.configDir,"String_Node_Str")));
  MinecraftForge.EVENT_BUS.register(proxy);
  moduleCore();
  moduleLoot();
  FeatureParser.initialize();
  WorldHandler.initialize();
  FMLEventHandler.initialize();
  BucketHandler.initialize();
  PacketHandler.instance.initialize();
  RecipeSorter.register("String_Node_Str",RecipeAugmentable.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  RecipeSorter.register("String_Node_Str",RecipeSecure.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  RecipeSorter.register("String_Node_Str",RecipeUpgrade.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  registerOreDictionaryEntries();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  CoFHProps.configDir=event.getModConfigurationDirectory();
  UpdateManager.registerUpdater(new UpdateManager(this,releaseURL,CoFHProps.DOWNLOAD_URL));
  configCore.setConfiguration(new Configuration(new File(CoFHProps.configDir,"String_Node_Str")));
  configClient.setConfiguration(new Configuration(new File(CoFHProps.configDir,"String_Node_Str")));
  MinecraftForge.EVENT_BUS.register(proxy);
  proxy.preinit();
  moduleCore();
  moduleLoot();
  FeatureParser.initialize();
  WorldHandler.initialize();
  FMLEventHandler.initialize();
  BucketHandler.initialize();
  PacketHandler.instance.initialize();
  RecipeSorter.register("String_Node_Str",RecipeAugmentable.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  RecipeSorter.register("String_Node_Str",RecipeSecure.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  RecipeSorter.register("String_Node_Str",RecipeUpgrade.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  registerOreDictionaryEntries();
}
Program: 58436
Project: 58436
Buggy source:
public static void postItemRender(){
  CCRenderState.useNormals=false;
  OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA,GL11.GL_ONE,GL11.GL_ZERO);
  GL11.glDisable(GL11.GL_ALPHA_TEST);
}

Fixed version (ground truth):
public static void postItemRender(){
  CCRenderState.useNormals=false;
  OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA,GL11.GL_ONE,GL11.GL_ZERO);
}
Program: 58437
Project: 58437
Buggy source:
@Override protected List<WeightedRandomBlock> generateDefaultMaterial(){
  return Arrays.asList(new WeightedRandomBlock(new ItemStack(Blocks.stone,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.dirt,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.grass,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.sand,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.gravel,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.snow,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.air,1,-1)),new WeightedRandomBlock(new ItemStack(Blocks.water,1,-1)));
}

Fixed version (ground truth):
@Override protected List<WeightedRandomBlock> generateDefaultMaterial(){
  return Arrays.asList(new WeightedRandomBlock(Blocks.stone,-1),new WeightedRandomBlock(Blocks.dirt,-1),new WeightedRandomBlock(Blocks.grass,-1),new WeightedRandomBlock(Blocks.sand,-1),new WeightedRandomBlock(Blocks.gravel,-1),new WeightedRandomBlock(Blocks.snow,-1),new WeightedRandomBlock(Blocks.air,-1),new WeightedRandomBlock(Blocks.water,-1));
}