nus-yam/ex-repair huggingface dataset:
Program: 135102
Project: 135102
Buggy source:
public static void registerAddon(IWailaRegistrar register){
  AddonVanillaEntities dataProvider=new AddonVanillaEntities();
  register.registerBodyProvider(dataProvider,EntityHorse.class);
  register.registerNBTProvider(dataProvider,EntityHorse.class);
  register.registerBodyProvider(dataProvider,EntityVillager.class);
  register.registerBodyProvider(dataProvider,EntityVillager.class);
}

Fixed version (ground truth):
public static void registerAddon(IWailaRegistrar register){
  AddonVanillaEntities dataProvider=new AddonVanillaEntities();
  register.registerBodyProvider(dataProvider,EntityHorse.class);
  register.registerNBTProvider(dataProvider,EntityHorse.class);
  register.registerBodyProvider(dataProvider,EntityVillager.class);
  register.registerNBTProvider(dataProvider,EntityVillager.class);
}
Program: 135103
Project: 135103
Buggy source:
@SubscribeEvent public void onTooltip(ItemTooltipEvent event){
  boolean isShifting=Minecraft.getMinecraft().gameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak);
  if (event.entityPlayer.worldObj.isRemote) {
    if (event.itemStack.getItem() instanceof ItemEnchantedBook) {
      if (isShifting) {
        Enchantment[] enchArr=Utilities.getEnchantmentsFromStack(event.itemStack,true);
        Enchantment ench=enchArr.length > 0 ? enchArr[0] : null;
        if (ench != null && !blacklist.contains(ench))         Utilities.wrapStringToList(StatCollector.translateToLocal("String_Node_Str" + ench.getName()),45,false,event.toolTip);
      }
 else       event.toolTip.add(StatCollector.translateToLocal("String_Node_Str"));
    }
 else     if (event.itemStack.getItem() instanceof ItemArmor) {
      ItemArmor armor=(ItemArmor)event.itemStack.getItem();
      event.toolTip.add(StatCollector.translateToLocal("String_Node_Str") + "String_Node_Str" + armor.damageReduceAmount);
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onTooltip(ItemTooltipEvent event){
  if (event.entityPlayer != null && event.entityPlayer.worldObj != null) {
    boolean isShifting=Minecraft.getMinecraft().gameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak);
    if (event.entityPlayer.worldObj.isRemote) {
      if (event.itemStack.getItem() instanceof ItemEnchantedBook) {
        if (isShifting) {
          Enchantment[] enchArr=Utilities.getEnchantmentsFromStack(event.itemStack,true);
          Enchantment ench=enchArr.length > 0 ? enchArr[0] : null;
          if (ench != null && !blacklist.contains(ench))           Utilities.wrapStringToList(StatCollector.translateToLocal("String_Node_Str" + ench.getName()),45,false,event.toolTip);
        }
 else         event.toolTip.add(StatCollector.translateToLocal("String_Node_Str"));
      }
 else       if (event.itemStack.getItem() instanceof ItemArmor) {
        ItemArmor armor=(ItemArmor)event.itemStack.getItem();
        event.toolTip.add(StatCollector.translateToLocal("String_Node_Str") + "String_Node_Str" + armor.damageReduceAmount);
      }
    }
  }
}
Program: 135105
Project: 135105
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  new ForgeEventHandler();
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
  proxy.registerSidedPlugins();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
  proxy.registerSidedPlugins();
}
Program: 135106
Project: 135106
Buggy source:
@SubscribeEvent public void onItemTooltip(ItemTooltipEvent event){
  for (  Module module : Module.getModules())   module.onTooltipDisplayed(event.itemStack,event.entityPlayer,event.toolTip,event.showAdvancedItemTooltips);
}

Fixed version (ground truth):
@SubscribeEvent public void onItemTooltip(ItemTooltipEvent event){
  for (  Module module : Module.getModules())   module.onTooltipDisplayed(event.itemStack.copy(),event.entityPlayer,event.toolTip,event.showAdvancedItemTooltips);
}
Program: 135107
Project: 135107
Buggy source:
@Override public void onTooltipDisplayed(ItemStack stack,EntityPlayer player,List<String> toolTip,boolean advanced){
  if (player.worldObj.isRemote) {
    if (stack.getItem() instanceof ItemEnchantedBook) {
      if (Minecraft.getMinecraft().gameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak)) {
        Enchantment ench=Utilities.getEnchantmentsFromStack(stack,true)[0];
        if (!blacklist.contains(ench))         Utilities.wrapStringToList(StatCollector.translateToLocal("String_Node_Str" + ench.getName()),45,false,toolTip);
      }
 else       toolTip.add(StatCollector.translateToLocal("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
@Override public void onTooltipDisplayed(ItemStack stack,EntityPlayer player,List<String> toolTip,boolean advanced){
  if (player.worldObj.isRemote) {
    if (stack.getItem() instanceof ItemEnchantedBook) {
      if (Minecraft.getMinecraft().gameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak)) {
        Enchantment ench=Utilities.getEnchantmentsFromStack(stack,true)[0];
        if (ench != null && !blacklist.contains(ench))         Utilities.wrapStringToList(StatCollector.translateToLocal("String_Node_Str" + ench.getName()),45,false,toolTip);
      }
 else       toolTip.add(StatCollector.translateToLocal("String_Node_Str"));
    }
  }
}
Program: 135108
Project: 135108
Buggy source:
/** 
 * The client side alternative to .registerSidedEvents(), this method should only be called from the client side. The purpose of this method is to register events that are unique to the client.
 */
@Override public void registerSidedEvents(){
  new WailaBlockHandler();
  new WailaEntityHandler();
}

Fixed version (ground truth):
/** 
 * The client side alternative to .registerSidedEvents(), this method should only be called from the client side. The purpose of this method is to register events that are unique to the client.
 */
@Override public void registerSidedEvents(){
  new ForgeEventHandler();
  new WailaBlockHandler();
  new WailaEntityHandler();
}
Program: 135109
Project: 135109
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
  proxy.registerSidedPlugins();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  new ForgeEventHandler();
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
  proxy.registerSidedPlugins();
}
Program: 135110
Project: 135110
Buggy source:
@SubscribeEvent @SideOnly(Side.CLIENT) public void onItemTooltip(ItemTooltipEvent event){
  for (  Module module : Module.getModules())   module.onTooltipDisplayed(event.itemStack,event.entityPlayer,event.toolTip,event.showAdvancedItemTooltips);
}

Fixed version (ground truth):
@SubscribeEvent public void onItemTooltip(ItemTooltipEvent event){
  for (  Module module : Module.getModules())   module.onTooltipDisplayed(event.itemStack,event.entityPlayer,event.toolTip,event.showAdvancedItemTooltips);
}
Program: 135111
Project: 135111
Buggy source:
/** 
 * The client side alternative to .registerSidedEvents(), this method should only be called from the client side. The purpose of this method is to register events that are unique to the client.
 */
@Override public void registerSidedEvents(){
  new ForgeEventHandler();
  new WailaBlockHandler();
  new WailaEntityHandler();
}

Fixed version (ground truth):
/** 
 * The client side alternative to .registerSidedEvents(), this method should only be called from the client side. The purpose of this method is to register events that are unique to the client.
 */
@Override public void registerSidedEvents(){
  new WailaBlockHandler();
  new WailaEntityHandler();
}
Program: 135112
Project: 135112
Buggy source:
/** 
 * This is a method that when called will print out all the entries stored by the tryTranslateKey method.
 * @param fileName: This param allows for the location of the file to be changed. By default this should be logs/missingStrings.txt
 * @return : The file being generated.
 */
static File print(String fileName){
  ArrayList<String> lines=TranslationHooks.lines;
  BufferedWriter writer=null;
  try {
    File logFile=new File(fileName + "String_Node_Str" + Reference.DATE.format(new Date()).toString()+ "String_Node_Str");
    writer=new BufferedWriter(new FileWriter(logFile));
    for (int i=0; i < lines.size(); i++) {
      writer.write(lines.get(i));
      writer.newLine();
    }
    return logFile;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    try {
      writer.close();
    }
 catch (    Exception e) {
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * This is a method that when called will print out all the entries stored by the tryTranslateKey method.
 * @param fileName: This param allows for the location of the file to be changed. Bydefault this should be logs/missingStrings.txt
 * @return : The file being generated.
 */
static File print(String fileName){
  ArrayList<String> lines=TranslationHooks.lines;
  BufferedWriter writer=null;
  try {
    File logFile=new File(fileName + "String_Node_Str" + Reference.DATE.format(new Date()).toString()+ "String_Node_Str");
    writer=new BufferedWriter(new FileWriter(logFile));
    for (int i=0; i < lines.size(); i++) {
      writer.write(lines.get(i));
      writer.newLine();
    }
    return logFile;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    try {
      writer.close();
    }
 catch (    Exception e) {
    }
  }
  return null;
}
Program: 135113
Project: 135113
Buggy source:
/** 
 * Registers and enchantment with the blacklist. If an enchantment is on the blacklist its enchantment book will not receive additional information on the tooltip.
 * @param id: ID of the enchantment being added. Can't wait to change this to strings in 1.8
 * @param modid: The id of the mod. Used in case something goes wrong.
 */
public static void registerEnchantToBlacklist(int id,String modid){
  Enchantment ench=Enchantment.enchantmentsList[id];
  if (ench != null)   ModuleEnchantmentBooks.blacklist.add(ench);
 else   Reference.LOG.info(modid + "String_Node_Str" + id+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Registers and enchantment with the blacklist. If an enchantment is on the blacklist its enchantment book will not receive additional information on the tooltip.
 * @param id: ID of the enchantment being added. Can't wait to change this to strings in1.8
 * @param modid: The id of the mod. Used in case something goes wrong.
 */
public static void registerEnchantToBlacklist(int id,String modid){
  Enchantment ench=Enchantment.enchantmentsList[id];
  if (ench != null)   ModuleEnchantmentBooks.blacklist.add(ench);
 else   Reference.LOG.info(modid + "String_Node_Str" + id+ "String_Node_Str");
}
Program: 135114
Project: 135114
Buggy source:
/** 
 * This method is called when waila prints the end of a block tooltip. This is used by waila to print the name of the mod that owns the block.
 * @param stack: An instance of an ItemStack that contains data about the block being looked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneous information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockTail(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints the end of a block tooltip. This is used by waila to print the name of the mod that owns the block.
 * @param stack: An instance of an ItemStack that contains data about the block beinglooked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneousinformation.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockTail(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}
Program: 135115
Project: 135115
Buggy source:
/** 
 * This method is called when waila prints a block name. This is used to manipulate the display name of the block. This is the upper most section of the tool tip.
 * @param stack: An instance of an ItemStack that contains data about the block being looked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneous information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockName(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints a block name. This is used to manipulate the display name of the block. This is the upper most section of the tool tip.
 * @param stack: An instance of an ItemStack that contains data about the block beinglooked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneousinformation.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockName(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}
Program: 135116
Project: 135116
Buggy source:
/** 
 * This method is called when waila prints the name of an entity into an entity tooltip. This is used by waila to display the block name. This is the upper most part of the tooltip.
 * @param entity: An instance of the entity that is currently being looked at by the player.
 * @param tooltip: An list of all the current text being displayed in the top part of the tooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityName(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints the name of an entity into an entity tooltip. This is used by waila to display the block name. This is the upper most part of the tooltip.
 * @param entity: An instance of the entity that is currently being looked at by theplayer.
 * @param tooltip: An list of all the current text being displayed in the top part of thetooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityName(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}
Program: 135117
Project: 135117
Buggy source:
/** 
 * This method is called when waila prints the description of a block. This can be used to add information about a block. This makes up the middle section of the tool tip.
 * @param stack: An instance of an ItemStack that contains data about the block being looked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneous information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockDescription(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints the description of a block. This can be used to add information about a block. This makes up the middle section of the tool tip.
 * @param stack: An instance of an ItemStack that contains data about the block beinglooked at.
 * @param tooltip: A list of all the current text being displayed about the block.
 * @param access: An accessor that can be used to pull a bunch of miscellaneousinformation.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaBlockDescription(ItemStack stack,List<String> tooltip,IWailaDataAccessor access,IWailaConfigHandler config){
}
Program: 135118
Project: 135118
Buggy source:
/** 
 * This method is called when Waila displays information on an Entity. This can be used to override the Entity being shown.
 * @param entity: The Entity that is being displayed. This can be overridden to display a custom Entity.
 * @param accessor: An instance of IWailaEntityAccessor containing many goodies for you to use.
 * @param config: Access to the Waila Configuration.
 */
public void onEntityOverride(Entity entity,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when Waila displays information on an Entity. This can be used to override the Entity being shown.
 * @param entity: The Entity that is being displayed. This can be overridden to display acustom Entity.
 * @param accessor: An instance of IWailaEntityAccessor containing many goodies for you touse.
 * @param config: Access to the Waila Configuration.
 */
public void onEntityOverride(Entity entity,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}
Program: 135119
Project: 135119
Buggy source:
/** 
 * This method is called when waila prints the body of an entity tooltip. This is the middle section of the tooltip.
 * @param entity: An instance of the entity that is currently being looked at by the player.
 * @param tooltip: An list of all the current text being displayed in the middle part of the tooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityDescription(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints the body of an entity tooltip. This is the middle section of the tooltip.
 * @param entity: An instance of the entity that is currently being looked at by theplayer.
 * @param tooltip: An list of all the current text being displayed in the middle part ofthe tooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityDescription(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}
Program: 135120
Project: 135120
Buggy source:
/** 
 * This method is called when waila prints the end section of a tooltip. This is used by waila to add the name of the mob that the entity is registered to.
 * @param entity: An instance of the entity that is currently being looked at by the player.
 * @param tooltip: An list of all the current text being displayed in the bottom part of the tooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityTail(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when waila prints the end section of a tooltip. This is used by waila to add the name of the mob that the entity is registered to.
 * @param entity: An instance of the entity that is currently being looked at by theplayer.
 * @param tooltip: An list of all the current text being displayed in the bottom part ofthe tooltip.
 * @param accessor: An accessor that can be used to pull information.
 * @param config: Access to the Waila Configuration.
 */
public void onWailaEntityTail(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor,IWailaConfigHandler config){
}
Program: 135121
Project: 135121
Buggy source:
/** 
 * This method is called when Waila displays information on a block. This can be used to override the block used to generate a waila tooltip with another ItemStack.
 * @param stack: The ItemStack being displayed. This can be overridden to display a custom stack.
 * @param accessor: An instance of IWailaDataAccessor containing many goodies for you to use.
 * @param config: Access to the Waila Configuration.
 */
public ItemStack onBlockOverride(ItemStack stack,IWailaDataAccessor accessor,IWailaConfigHandler config){
  return stack;
}

Fixed version (ground truth):
/** 
 * This method is called when Waila displays information on a block. This can be used to override the block used to generate a waila tooltip with another ItemStack.
 * @param stack: The ItemStack being displayed. This can be overridden to display a customstack.
 * @param accessor: An instance of IWailaDataAccessor containing many goodies for you touse.
 * @param config: Access to the Waila Configuration.
 */
public ItemStack onBlockOverride(ItemStack stack,IWailaDataAccessor accessor,IWailaConfigHandler config){
  return stack;
}
Program: 135122
Project: 135122
Buggy source:
@Override public void onWailaRegistrar(IWailaRegistrar register){
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.registerSyncedNBTKey("String_Node_Str",BlockFurnace.class);
}

Fixed version (ground truth):
@Override public void onWailaRegistrar(IWailaRegistrar register){
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.registerSyncedNBTKey("String_Node_Str",BlockFurnace.class);
  ItemStack stack=new ItemStack(Item.getItemFromBlock(Blocks.sandstone_stairs));
}
Program: 135123
Project: 135123
Buggy source:
public ModulePixelmon(Boolean enabled){
  super(enabled);
  try {
    classEntityPixelmon=Class.forName("String_Node_Str");
    classTileEntityApricornTree=Class.forName("String_Node_Str");
    enumNature=Class.forName("String_Node_Str");
    enumGrowth=Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public ModulePixelmon(Boolean enabled){
  super(enabled);
  if (enabled) {
    try {
      classEntityPixelmon=Class.forName("String_Node_Str");
      classTileEntityApricornTree=Class.forName("String_Node_Str");
      enumNature=Class.forName("String_Node_Str");
      enumGrowth=Class.forName("String_Node_Str");
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
}
Program: 135124
Project: 135124
Buggy source:
public ModulePixelmon(Boolean Enabled){
  super(true);
  try {
    classEntityPixelmon=Class.forName("String_Node_Str");
    classTileEntityApricornTree=Class.forName("String_Node_Str");
    enumNature=Class.forName("String_Node_Str");
    enumGrowth=Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public ModulePixelmon(Boolean enabled){
  super(enabled);
  try {
    classEntityPixelmon=Class.forName("String_Node_Str");
    classTileEntityApricornTree=Class.forName("String_Node_Str");
    enumNature=Class.forName("String_Node_Str");
    enumGrowth=Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
}
Program: 135125
Project: 135125
Buggy source:
@Override public ItemStack getWailaStack(IWailaDataAccessor accessor,IWailaConfigHandler config){
  ItemStack stack=accessor.getStack();
  for (  Module module : Module.getModules())   module.onBlockOverride(stack,accessor,config);
  return (stack != null) ? stack : null;
}

Fixed version (ground truth):
@Override public ItemStack getWailaStack(IWailaDataAccessor accessor,IWailaConfigHandler config){
  ItemStack stack=null;
  for (  Module module : Module.getModules())   stack=module.onBlockOverride(stack,accessor,config);
  return (stack != null) ? stack : null;
}
Program: 135126
Project: 135126
Buggy source:
/** 
 * This method is called when Waila displays information on a block. This can be used to override the block used to generate a waila tooltip with another ItemStack.
 * @param stack: The ItemStack being displayed. This can be overridden to display a custom stack.
 * @param accessor: An instance of IWailaDataAccessor containing many goodies for you to use.
 * @param config: Access to the Waila Configuration.
 */
public void onBlockOverride(ItemStack stack,IWailaDataAccessor accessor,IWailaConfigHandler config){
}

Fixed version (ground truth):
/** 
 * This method is called when Waila displays information on a block. This can be used to override the block used to generate a waila tooltip with another ItemStack.
 * @param stack: The ItemStack being displayed. This can be overridden to display a custom stack.
 * @param accessor: An instance of IWailaDataAccessor containing many goodies for you to use.
 * @param config: Access to the Waila Configuration.
 */
public ItemStack onBlockOverride(ItemStack stack,IWailaDataAccessor accessor,IWailaConfigHandler config){
  return stack;
}
Program: 135127
Project: 135127
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  new Config(event.getSuggestedConfigurationFile());
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  setModMeta(event.getModMetadata());
  new Config(event.getSuggestedConfigurationFile());
  proxy.registerSidedEvents();
  proxy.registerSidedModules();
  proxy.registerSidedPlugins();
}
Program: 135128
Project: 135128
Buggy source:
public static void callbackRegister(IWailaRegistrar register){
  WailaBlockHandler instance=new WailaBlockHandler();
  register.registerHeadProvider(instance,Block.class);
  register.registerBodyProvider(instance,Block.class);
  register.registerTailProvider(instance,Block.class);
}

Fixed version (ground truth):
public static void callbackRegister(IWailaRegistrar register){
  WailaBlockHandler instance=new WailaBlockHandler();
  register.registerHeadProvider(instance,Block.class);
  register.registerBodyProvider(instance,Block.class);
  register.registerTailProvider(instance,Block.class);
  register.registerStackProvider(instance,Block.class);
}
Program: 135129
Project: 135129
Buggy source:
public static void onWailaRegistrar(IWailaRegistrar register){
  WailaEntityHandler instance=new WailaEntityHandler();
  register.registerHeadProvider(instance,Entity.class);
  register.registerBodyProvider(instance,Entity.class);
  register.registerTailProvider(instance,Entity.class);
  for (  Module module : Module.getModules())   module.onWailaRegistrar(register);
}

Fixed version (ground truth):
public static void onWailaRegistrar(IWailaRegistrar register){
  WailaEntityHandler instance=new WailaEntityHandler();
  register.registerHeadProvider(instance,Entity.class);
  register.registerBodyProvider(instance,Entity.class);
  register.registerTailProvider(instance,Entity.class);
  register.registerOverrideEntityProvider(instance,Entity.class);
  for (  Module module : Module.getModules())   module.onWailaRegistrar(register);
}
Program: 135130
Project: 135130
Buggy source:
@Override public void onWailaEntityDescription(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor){
  if (entity instanceof EntityLiving) {
    String ench=StatCollector.translateToLocal("String_Node_Str") + "String_Node_Str";
    EntityLiving living=(EntityLiving)entity;
    for (int i=0; i < 5; i++) {
      ItemStack stack=living.getEquipmentInSlot(i);
      if (stack != null) {
        tooltip.add(StatCollector.translateToLocal("String_Node_Str" + itemTypes[i]) + "String_Node_Str" + stack.getDisplayName());
        Enchantment[] enchantments=Utilities.getEnchantmentsFromStack(stack,false);
        if (accessor.getPlayer().isSneaking()) {
          for (int x=0; x < enchantments.length; x++) {
            String name=StatCollector.translateToLocal(enchantments[x].getName());
            if (!ench.contains(name))             ench=ench + name + "String_Node_Str";
          }
        }
      }
    }
    if (accessor.getPlayer().isSneaking()) {
      if (ench.equals("String_Node_Str"))       tooltip.add(StatCollector.translateToLocal("String_Node_Str"));
 else {
        ench=ench.substring(0,ench.length() - 2);
        Utilities.wrapStringToList(ench,50,false,tooltip);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onWailaEntityDescription(Entity entity,List<String> tooltip,IWailaEntityAccessor accessor){
  if (entity instanceof EntityLiving) {
    String ench=StatCollector.translateToLocal("String_Node_Str") + "String_Node_Str";
    EntityLiving living=(EntityLiving)entity;
    for (int i=0; i < 5; i++) {
      ItemStack stack=living.getEquipmentInSlot(i);
      if (stack != null) {
        tooltip.add(StatCollector.translateToLocal("String_Node_Str" + itemTypes[i]) + "String_Node_Str" + stack.getDisplayName());
        Enchantment[] enchantments=Utilities.getEnchantmentsFromStack(stack,false);
        if (accessor.getPlayer().isSneaking()) {
          for (int x=0; x < enchantments.length; x++) {
            String name=StatCollector.translateToLocal(enchantments[x].getName());
            if (!ench.contains(name))             ench=ench + name + "String_Node_Str";
          }
        }
      }
    }
    if (accessor.getPlayer().isSneaking()) {
      if (!ench.equals("String_Node_Str")) {
        ench=ench.substring(0,ench.length() - 2);
      }
    }
  }
}
Program: 135131
Project: 135131
Buggy source:
@Override public void onWailaRegistrar(IWailaRegistrar register){
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.registerSyncedNBTKey("String_Node_Str",TileEntityFurnace.class);
}

Fixed version (ground truth):
@Override public void onWailaRegistrar(IWailaRegistrar register){
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.addConfig("String_Node_Str","String_Node_Str");
  register.registerSyncedNBTKey("String_Node_Str",BlockFurnace.class);
}
Program: 135132
Project: 135132
Buggy source:
public static void callbackRegister(IWailaRegistrar register){
  WailaBlockHandler instance=new WailaBlockHandler();
  register.registerBodyProvider(instance,Block.class);
}

Fixed version (ground truth):
public static void callbackRegister(IWailaRegistrar register){
  WailaBlockHandler instance=new WailaBlockHandler();
  register.registerHeadProvider(instance,Block.class);
  register.registerBodyProvider(instance,Block.class);
  register.registerTailProvider(instance,Block.class);
}
Program: 135133
Project: 135133
Buggy source:
public static void onWailaRegistrar(IWailaRegistrar register){
  WailaEntityHandler instance=new WailaEntityHandler();
  register.registerBodyProvider(instance,Entity.class);
  for (  Module module : Module.getModules())   module.onWailaRegistrar(register);
}

Fixed version (ground truth):
public static void onWailaRegistrar(IWailaRegistrar register){
  WailaEntityHandler instance=new WailaEntityHandler();
  register.registerHeadProvider(instance,Entity.class);
  register.registerBodyProvider(instance,Entity.class);
  register.registerTailProvider(instance,Entity.class);
  for (  Module module : Module.getModules())   module.onWailaRegistrar(register);
}
Program: 135134
Project: 135134
Buggy source:
public CpuData getCpuInfo(){
  final CpuData result=new CpuData(getTotalCpuUsage());
  for (int i=0; i < mCpuInfoList.size(); i++) {
    final CpuInfo info=mCpuInfoList.get(i);
    result.addCpuUtil(info.getUsage());
  }
  return result;
}

Fixed version (ground truth):
public CpuData getCpuInfo(){
  final CpuData result=new CpuData(getTotalCpuUsage());
  if (mCpuInfoList != null) {
    for (int i=0; i < mCpuInfoList.size(); i++) {
      final CpuInfo info=mCpuInfoList.get(i);
      result.addCpuUtil(info.getUsage());
    }
  }
  return result;
}
Program: 135135
Project: 135135
Buggy source:
public int getBackgroundColor(){
  final int v=mPrefs.getInt(mResources.getString(R.string.pref_key_bg_opacity),0);
  final int level=0;
  final int retVal;
  if (v > 0) {
    final int a=(int)((float)v / 100f * 255);
    retVal=Color.argb(a,level,level,level);
  }
 else {
    retVal=0;
  }
  return retVal;
}

Fixed version (ground truth):
public int getBackgroundColor(){
  final int v=mPrefs.getInt(mResources.getString(R.string.pref_key_bg_opacity),mResources.getInteger(R.integer.background_opacity_default));
  final int level=0;
  final int retVal;
  if (v > 0) {
    final int a=(int)((float)v / 100f * 255);
    retVal=Color.argb(a,level,level,level);
  }
 else {
    retVal=0;
  }
  return retVal;
}
Program: 135138
Project: 135138
Buggy source:
@Before public void setup(){
  factory=new MessagePackFactory();
  objectMapper=new ObjectMapper(factory);
  out=new ByteArrayOutputStream();
  in=new ByteArrayInputStream(new byte[4096]);
  normalPojo=new NormalPojo();
  normalPojo.setS("String_Node_Str");
  normalPojo.i=Integer.MAX_VALUE;
  normalPojo.l=Long.MIN_VALUE;
  normalPojo.f=Float.MIN_VALUE;
  normalPojo.d=Double.MAX_VALUE;
  normalPojo.b=new byte[]{0x01,0x02,(byte)0xFE,(byte)0xFF};
  normalPojo.bi=BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE);
  normalPojo.suit=Suit.HEART;
}

Fixed version (ground truth):
@Before public void setup(){
  factory=new MessagePackFactory();
  objectMapper=new ObjectMapper(factory);
  out=new ByteArrayOutputStream();
  in=new ByteArrayInputStream(new byte[4096]);
  normalPojo=new NormalPojo();
  normalPojo.setS("String_Node_Str");
  normalPojo.i=Integer.MAX_VALUE;
  normalPojo.l=Long.MIN_VALUE;
  normalPojo.f=Float.MIN_VALUE;
  normalPojo.d=Double.MAX_VALUE;
  normalPojo.b=new byte[]{0x01,0x02,(byte)0xFE,(byte)0xFF};
  normalPojo.bi=BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE);
  normalPojo.suit=Suit.HEART;
  nestedListPojo=new NestedListPojo();
  nestedListPojo.s="String_Node_Str";
  nestedListPojo.strs=Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  tinyPojo=new TinyPojo();
  tinyPojo.t="String_Node_Str";
  nestedListComplexPojo=new NestedListComplexPojo();
  nestedListComplexPojo.s="String_Node_Str";
  nestedListComplexPojo.foos=new ArrayList<TinyPojo>();
  nestedListComplexPojo.foos.add(tinyPojo);
}
Program: 135139
Project: 135139
Buggy source:
@Override public ObjectCodec getCodec(){
  System.out.println("String_Node_Str");
  return codec;
}

Fixed version (ground truth):
@Override public ObjectCodec getCodec(){
  return codec;
}
Program: 135140
Project: 135140
Buggy source:
@Override protected boolean loadMore() throws IOException {
  System.out.println("String_Node_Str");
  return false;
}

Fixed version (ground truth):
@Override protected boolean loadMore() throws IOException {
  return false;
}
Program: 135141
Project: 135141
Buggy source:
@Override public void setCodec(ObjectCodec c){
  System.out.println("String_Node_Str");
  codec=c;
}

Fixed version (ground truth):
@Override public void setCodec(ObjectCodec c){
  codec=c;
}
Program: 135142
Project: 135142
Buggy source:
@Override public char[] getTextCharacters() throws IOException, JsonParseException {
  System.out.println("String_Node_Str");
  return new char[0];
}

Fixed version (ground truth):
@Override public char[] getTextCharacters() throws IOException, JsonParseException {
  return new char[0];
}
Program: 135143
Project: 135143
Buggy source:
@Override public int getTextLength() throws IOException, JsonParseException {
  System.out.println("String_Node_Str");
  return 0;
}

Fixed version (ground truth):
@Override public int getTextLength() throws IOException, JsonParseException {
  return 0;
}
Program: 135144
Project: 135144
Buggy source:
@Override protected void _closeInput() throws IOException {
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void _closeInput() throws IOException {
}
Program: 135145
Project: 135145
Buggy source:
@Override public int getTextOffset() throws IOException, JsonParseException {
  System.out.println("String_Node_Str");
  return 0;
}

Fixed version (ground truth):
@Override public int getTextOffset() throws IOException, JsonParseException {
  return 0;
}
Program: 135147
Project: 135147
Buggy source:
@Override public byte[] getBinaryValue(Base64Variant b64variant) throws IOException, JsonParseException {
  System.out.println("String_Node_Str");
  return new byte[0];
}

Fixed version (ground truth):
@Override public byte[] getBinaryValue(Base64Variant b64variant) throws IOException, JsonParseException {
  return new byte[0];
}
Program: 135148
Project: 135148
Buggy source:
@Override protected void _finishString() throws IOException, JsonParseException {
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void _finishString() throws IOException, JsonParseException {
}
Program: 135150
Project: 135150
Buggy source:
@Test public void testParserShouldReadArray() throws IOException {
  MessagePacker packer=new MessagePacker(out);
  packer.packArrayHeader(6);
  packer.packString("String_Node_Str");
  packer.packInt(Integer.MAX_VALUE);
  packer.packLong(Long.MIN_VALUE);
  packer.packFloat(Float.MAX_VALUE);
  packer.packDouble(Double.MIN_VALUE);
  BigInteger bi=new BigInteger(Long.toString(Long.MAX_VALUE));
  bi=bi.add(BigInteger.ONE);
  packer.packBigInteger(bi);
  packer.flush();
  byte[] bytes=out.toByteArray();
  TypeReference<List<Object>> typeReference=new TypeReference<List<Object>>(){
  }
;
  List<Object> array=objectMapper.readValue(bytes,typeReference);
  assertEquals(6,array.size());
  int i=0;
  assertEquals("String_Node_Str",array.get(i++));
  assertEquals((long)Integer.MAX_VALUE,array.get(i++));
  assertEquals(Long.MIN_VALUE,array.get(i++));
  assertEquals(Float.MAX_VALUE,(Double)array.get(i++),0.001f);
  assertEquals(Double.MIN_VALUE,(Double)array.get(i++),0.001f);
  assertEquals(bi,array.get(i++));
}

Fixed version (ground truth):
@Test public void testParserShouldReadArray() throws IOException {
  MessagePacker packer=new MessagePacker(out);
  packer.packArrayHeader(8);
  packer.packArrayHeader(3);
{
    packer.packLong(Long.MAX_VALUE);
    packer.packNil();
    packer.packString("String_Node_Str");
  }
  packer.packString("String_Node_Str");
  packer.packInt(Integer.MAX_VALUE);
  packer.packLong(Long.MIN_VALUE);
  packer.packFloat(Float.MAX_VALUE);
  packer.packDouble(Double.MIN_VALUE);
  BigInteger bi=new BigInteger(Long.toString(Long.MAX_VALUE));
  bi=bi.add(BigInteger.ONE);
  packer.packBigInteger(bi);
  packer.packMapHeader(2);
{
    packer.packString("String_Node_Str");
    packer.packString("String_Node_Str");
    packer.packString("String_Node_Str");
    packer.packInt(42);
  }
  packer.flush();
  byte[] bytes=out.toByteArray();
  TypeReference<List<Object>> typeReference=new TypeReference<List<Object>>(){
  }
;
  List<Object> array=objectMapper.readValue(bytes,typeReference);
  assertEquals(8,array.size());
  int i=0;
  List<Object> childArray=(List<Object>)array.get(i++);
{
    int j=0;
    assertEquals(Long.MAX_VALUE,childArray.get(j++));
    assertEquals(null,childArray.get(j++));
    assertEquals("String_Node_Str",childArray.get(j++));
  }
  assertEquals("String_Node_Str",array.get(i++));
  assertEquals((long)Integer.MAX_VALUE,array.get(i++));
  assertEquals(Long.MIN_VALUE,array.get(i++));
  assertEquals(Float.MAX_VALUE,(Double)array.get(i++),0.001f);
  assertEquals(Double.MIN_VALUE,(Double)array.get(i++),0.001f);
  assertEquals(bi,array.get(i++));
  Map<String,Object> childMap=(Map<String,Object>)array.get(i++);
{
    assertEquals(2,childMap.keySet().size());
    for (    Map.Entry<String,Object> entry : childMap.entrySet()) {
      String k=entry.getKey();
      Object v=entry.getValue();
      if (k.equals("String_Node_Str")) {
        assertEquals("String_Node_Str",v);
      }
 else       if (k.equals("String_Node_Str")) {
        assertEquals((long)42,v);
      }
    }
  }
}
Program: 135153
Project: 135153
Buggy source:
private String promptUserForNewWatchListPanelName(){
  TextInputDialog dialog=new TextInputDialog(DEFAULT_WATCH_LIST_PANEL_NAME);
  dialog.setTitle(WATCH_LIST_PANEL_NAME_PROMPT_TITLE);
  dialog.setHeaderText(WATCH_LIST_PANEL_NAME_PROMPT_HEADER);
  Optional<String> result=dialog.showAndWait();
  return result.orElse(DEFAULT_WATCH_LIST_PANEL_NAME);
}

Fixed version (ground truth):
private Optional<String> promptUserForNewWatchListPanelName(){
  TextInputDialog dialog=new TextInputDialog(DEFAULT_WATCH_LIST_PANEL_NAME);
  dialog.setTitle(WATCH_LIST_PANEL_NAME_PROMPT_TITLE);
  dialog.setHeaderText(WATCH_LIST_PANEL_NAME_PROMPT_HEADER);
  Optional<String> result=dialog.showAndWait();
  return result;
}
Program: 135154
Project: 135154
Buggy source:
/** 
 * Selects the next milestone in the list of best matching milestones
 */
public void selectNextBestMatchingMilestone(){
  Optional<Integer> curSelectedIndex=getSelectedIndex(bestMatchingMilestones);
  if (canIncreaseIndex(curSelectedIndex,bestMatchingMilestones))   return;
  selectMilestoneAtIndex(bestMatchingMilestones,curSelectedIndex.get() + 1);
}

Fixed version (ground truth):
/** 
 * Selects the next milestone in the list of best matching milestones
 */
public void selectNextBestMatchingMilestone(){
  Optional<Integer> curSelectedIndex=getSelectedIndex(bestMatchingMilestones);
  if (!canIncreaseIndex(curSelectedIndex,bestMatchingMilestones))   return;
  selectMilestoneAtIndex(bestMatchingMilestones,curSelectedIndex.get() + 1);
}
Program: 135155
Project: 135155
Buggy source:
/** 
 * Should be called to restore selection after making changes to the item list of this list view. Must be called after saveSelection is.
 * @throws IllegalStateException if called before saveSelection is
 */
public void restoreSelection(){
  if (!lastSelectedItem.isPresent()) {
    if (!saveSelectionCalled) {
      throw new IllegalStateException("String_Node_Str");
    }
 else {
      saveSelectionCalled=false;
      return;
    }
  }
  saveSelectionCalled=false;
  int index=-1;
  int i=0;
  for (  T item : getItems()) {
    if (areItemsEqual(item,lastSelectedItem.get())) {
      index=i;
      break;
    }
    i++;
  }
  boolean itemFound=index > -1;
  if (itemFound) {
    getSelectionModel().clearAndSelect(index);
    selectedIndex=Optional.of(index);
  }
 else {
    if (getItems().size() == 0) {
      selectedIndex=Optional.empty();
    }
 else {
      int lastIndex=getItems().size() - 1;
      int nextIndex=Math.min(selectedIndex.get(),lastIndex);
      getSelectionModel().clearAndSelect(nextIndex);
      selectedIndex=Optional.of(nextIndex);
      triggerItemSelected(nextIndex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Should be called to restore selection after making changes to the item list of this list view. Must be called after saveSelection is.
 * @throws IllegalStateException if called before saveSelection is
 */
public void restoreSelection(){
  if (!lastSelectedItem.isPresent()) {
    if (!saveSelectionCalled) {
      throw new IllegalStateException("String_Node_Str");
    }
 else {
      saveSelectionCalled=false;
      return;
    }
  }
  saveSelectionCalled=false;
  int index=-1;
  int i=0;
  for (  T item : getItems()) {
    if (areItemsEqual(item,lastSelectedItem.get())) {
      index=i;
      break;
    }
    i++;
  }
  boolean itemFound=index > -1;
  if (itemFound) {
    getSelectionModel().clearAndSelect(index);
    selectedIndex=Optional.of(index);
  }
 else {
    if (getItems().isEmpty()) {
      selectedIndex=Optional.empty();
    }
 else     if (selectedIndex.isPresent()) {
      int lastIndex=getItems().size() - 1;
      int nextIndex=Math.min(selectedIndex.get(),lastIndex);
      getSelectionModel().clearAndSelect(nextIndex);
      selectedIndex=Optional.of(nextIndex);
      triggerItemSelected(nextIndex);
    }
  }
}
Program: 135156
Project: 135156
Buggy source:
private boolean authorSatisfies(IModel model,TurboIssue issue){
  if (!content.isPresent())   return false;
  TurboUser author=model.getAuthorOfIssue(issue).get();
  String content=this.content.get().toLowerCase();
  String login=author.getLoginName() == null ? "String_Node_Str" : author.getLoginName().toLowerCase();
  String name=author.getRealName() == null ? "String_Node_Str" : author.getRealName().toLowerCase();
  return login.contains(content) || name.contains(content);
}

Fixed version (ground truth):
private boolean authorSatisfies(IModel model,TurboIssue issue){
  if (!content.isPresent())   return false;
  Optional<TurboUser> author=model.getAuthorOfIssue(issue);
  String content=this.content.get().toLowerCase();
  String login=issue.getCreator();
  String name="String_Node_Str";
  if (author.isPresent()) {
    name=author.get().getRealName() == null ? "String_Node_Str" : author.get().getRealName();
  }
  return login.contains(content) || name.contains(content);
}
Program: 135157
Project: 135157
Buggy source:
@Test public void satisfiesInvolves_validInput(){
  TurboUser user=new TurboUser(REPO,"String_Node_Str","String_Node_Str");
  TurboIssue issue=new TurboIssue(REPO,1,"String_Node_Str");
  issue.setAssignee(user);
  IModel model=TestUtils.modelWith(issue,user);
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  issue=new TurboIssue(REPO,1,"String_Node_Str","String_Node_Str",null,false);
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertFalse(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertFalse(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
}

Fixed version (ground truth):
@Test public void satisfiesInvolves_validInput(){
  TurboUser user=new TurboUser(REPO,"String_Node_Str","String_Node_Str");
  TurboIssue issue=new TurboIssue(REPO,1,"String_Node_Str","String_Node_Str",LocalDateTime.now(),true);
  issue.setAssignee(user);
  IModel model=TestUtils.modelWith(issue,user);
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  issue=new TurboIssue(REPO,1,"String_Node_Str","String_Node_Str",null,false);
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertTrue(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
  assertFalse(Qualifier.process(model,Parser.parse("String_Node_Str"),issue));
}