nus-yam/ex-repair huggingface dataset:
Program: 44376
Project: 44376
Buggy source:
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new BlockEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new DeathEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new KillEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new SpawnEventListener(this),this);
  if (deathTpPlusPlugin != null) {
    Bukkit.getPluginManager().registerEvents(new StreakEventListener(this),this);
  }
}

Fixed version (ground truth):
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new BlockEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new DeathEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new KillEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new SpawnEventListener(this),this);
  if (hasDeathTpPlus()) {
    Bukkit.getPluginManager().registerEvents(new StreakEventListener(this),this);
  }
  if (hasHeroes()) {
    Bukkit.getPluginManager().registerEvents(new HeroMasteredListener(this),this);
  }
}
Program: 44377
Project: 44377
Buggy source:
private void initPlugins(){
  deathTpPlusPlugin=(DeathTpPlus)getPlugin("String_Node_Str","String_Node_Str");
  heroesPlugin=(Heroes)getPlugin("String_Node_Str","String_Node_Str");
  worldGuardPlugin=(WorldGuardPlugin)getPlugin("String_Node_Str","String_Node_Str");
  residencePlugin=(Residence)getPlugin("String_Node_Str","String_Node_Str");
  townyPlugin=(Towny)getPlugin("String_Node_Str","String_Node_Str");
  factionsPlugin=getPlugin("String_Node_Str","String_Node_Str");
  mcMMOPlugin=getPlugin("String_Node_Str","String_Node_Str");
  Plugin regiosPlugin=getPlugin("String_Node_Str","String_Node_Str");
  if (regiosPlugin != null) {
    regiosAPI=new RegiosAPI();
  }
  Plugin mobArenaPlugin=getPlugin("String_Node_Str","String_Node_Str");
  if (mobArenaPlugin != null) {
    mobArenaHandler=new MobArenaHandler();
  }
}

Fixed version (ground truth):
private void initPlugins(){
  deathTpPlusPlugin=getPlugin("String_Node_Str","String_Node_Str");
  heroesPlugin=(Heroes)getPlugin("String_Node_Str","String_Node_Str");
  worldGuardPlugin=(WorldGuardPlugin)getPlugin("String_Node_Str","String_Node_Str");
  residencePlugin=(Residence)getPlugin("String_Node_Str","String_Node_Str");
  townyPlugin=(Towny)getPlugin("String_Node_Str","String_Node_Str");
  factionsPlugin=getPlugin("String_Node_Str","String_Node_Str");
  mcMMOPlugin=getPlugin("String_Node_Str","String_Node_Str");
  Plugin regiosPlugin=getPlugin("String_Node_Str","String_Node_Str");
  if (regiosPlugin != null) {
    regiosAPI=new RegiosAPI();
  }
  Plugin mobArenaPlugin=getPlugin("String_Node_Str","String_Node_Str");
  if (mobArenaPlugin != null) {
    mobArenaHandler=new MobArenaHandler();
  }
}
Program: 44378
Project: 44378
Buggy source:
private static ecoReward mergeReward(ecoReward from,ecoReward to){
  ecoReward reward=new ecoReward();
  reward.setRewardName(to.getRewardName());
  reward.setRewardType(to.getRewardType());
  reward.setDrops(!from.getDrops().isEmpty() ? from.getDrops() : to.getDrops());
  reward.setCoinMin(from.getCoinMin() != null ? from.getCoinMin() : to.getCoinMin());
  reward.setCoinMax(from.getCoinMax() != null ? from.getCoinMax() : to.getCoinMax());
  reward.setCoinPercentage(from.getCoinPercentage() != null ? from.getCoinPercentage() : to.getCoinPercentage());
  reward.setExpMin(from.getExpMin() != null ? from.getExpMin() : to.getExpMin());
  reward.setExpMax(from.getExpMax() != null ? from.getExpMax() : to.getExpMax());
  reward.setExpPercentage(from.getExpPercentage() != null ? from.getExpPercentage() : to.getExpPercentage());
  reward.setNoRewardMessage(!from.getNoRewardMessage().equals(to.getNoRewardMessage()) ? from.getNoRewardMessage() : to.getNoRewardMessage());
  reward.setRewardMessage(!from.getRewardMessage().equals(to.getRewardMessage()) ? from.getRewardMessage() : to.getRewardMessage());
  reward.setPenaltyMessage(!from.getPenaltyMessage().equals(to.getPenaltyMessage()) ? from.getPenaltyMessage() : to.getPenaltyMessage());
  return reward;
}

Fixed version (ground truth):
private static ecoReward mergeReward(ecoReward from,ecoReward to){
  ecoReward reward=new ecoReward();
  reward.setRewardName(to.getRewardName());
  reward.setRewardType(to.getRewardType());
  reward.setDrops(!from.getDrops().isEmpty() ? from.getDrops() : to.getDrops());
  reward.setCoinMin(from.getCoinMin() > 0.0 ? from.getCoinMin() : to.getCoinMin());
  reward.setCoinMax(from.getCoinMax() > 0.0 ? from.getCoinMax() : to.getCoinMax());
  reward.setCoinPercentage(from.getCoinPercentage() > 0.0 ? from.getCoinPercentage() : to.getCoinPercentage());
  reward.setExpMin(from.getExpMin() != null ? from.getExpMin() : to.getExpMin());
  reward.setExpMax(from.getExpMax() != null ? from.getExpMax() : to.getExpMax());
  reward.setExpPercentage(from.getExpPercentage() != null ? from.getExpPercentage() : to.getExpPercentage());
  reward.setNoRewardMessage(!from.getNoRewardMessage().equals(to.getNoRewardMessage()) ? from.getNoRewardMessage() : to.getNoRewardMessage());
  reward.setRewardMessage(!from.getRewardMessage().equals(to.getRewardMessage()) ? from.getRewardMessage() : to.getRewardMessage());
  reward.setPenaltyMessage(!from.getPenaltyMessage().equals(to.getPenaltyMessage()) ? from.getPenaltyMessage() : to.getPenaltyMessage());
  return reward;
}
Program: 44380
Project: 44380
Buggy source:
public static ecoMessageManager getMessageManager(Entity entity){
  ecoMessageManager messageManager=messageManagers.get(entity.getWorld().getName());
  if (messageManager == null) {
    messageManager=messageManagers.get(ecoConfigManager.DEFAULT_WORLD);
  }
  return messageManager;
}

Fixed version (ground truth):
public ecoMessageManager getMessageManager(World world){
  ecoMessageManager messageManager=globalMessageManager.get(world.getName());
  if (messageManager == null) {
    messageManager=globalMessageManager.get(ecoConfigManager.DEFAULT_WORLD);
  }
  return messageManager;
}
Program: 44381
Project: 44381
Buggy source:
public static ecoRewardManager getRewardManager(Entity entity){
  ecoRewardManager rewardManager=rewardManagers.get(entity.getWorld().getName());
  if (rewardManager == null) {
    rewardManager=rewardManagers.get(ecoConfigManager.DEFAULT_WORLD);
  }
  return rewardManager;
}

Fixed version (ground truth):
public ecoRewardManager getRewardManager(World world){
  ecoRewardManager rewardManager=globalRewardManager.get(world.getName());
  if (rewardManager == null) {
    rewardManager=globalRewardManager.get(ecoConfigManager.DEFAULT_WORLD);
  }
  return rewardManager;
}
Program: 44382
Project: 44382
Buggy source:
public void onEnable(){
  Locale.setDefault(Locale.US);
  logger.setName(this.getDescription().getName());
  setupVault();
  setupMetrics();
  setupDeathTpPlus();
  setupMobArenaHandler();
  setupHeroes();
  setupMcMMO();
  setupWorldGuard();
  messageManagers=new HashMap<String,ecoMessageManager>();
  rewardManagers=new HashMap<String,ecoRewardManager>();
  configManager=new ecoConfigManager(this);
  registerCommands();
  registerEvents();
  Bukkit.getScheduler().scheduleAsyncRepeatingTask(this,new ecoUpdate(this,DEV_BUKKIT_URL),CHECK_DELAY,CHECK_PERIOD);
  logger.info(getDescription().getVersion() + "String_Node_Str");
}

Fixed version (ground truth):
public void onEnable(){
  Locale.setDefault(Locale.US);
  logger.setName(this.getDescription().getName());
  setupVault();
  setupMetrics();
  setupDeathTpPlus();
  setupMobArenaHandler();
  setupHeroes();
  setupMcMMO();
  setupWorldGuard();
  globalMessageManager=new HashMap<String,ecoMessageManager>();
  globalRewardManager=new HashMap<String,ecoRewardManager>();
  configManager=new ecoConfigManager(this);
  spawnerMobs=new HashSet<Integer>();
  registerCommands();
  registerEvents();
  Bukkit.getScheduler().scheduleAsyncRepeatingTask(this,new ecoUpdate(this,DEV_BUKKIT_URL),CHECK_DELAY,CHECK_PERIOD);
  logger.info(getDescription().getVersion() + "String_Node_Str");
}
Program: 44383
Project: 44383
Buggy source:
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new ecoBlockListener(),this);
  Bukkit.getPluginManager().registerEvents(new ecoEntityListener(),this);
  Bukkit.getPluginManager().registerEvents(new ecoDeathListener(),this);
  if (deathTpPlusPlugin != null) {
    Bukkit.getPluginManager().registerEvents(new ecoStreakListener(),this);
  }
}

Fixed version (ground truth):
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new ecoBlockListener(this),this);
  Bukkit.getPluginManager().registerEvents(new ecoEntityListener(this),this);
  Bukkit.getPluginManager().registerEvents(new ecoDeathListener(this),this);
  if (deathTpPlusPlugin != null) {
    Bukkit.getPluginManager().registerEvents(new ecoStreakListener(this),this);
  }
}
Program: 44384
Project: 44384
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onBlockBreak(BlockBreakEvent event){
  if (event.isCancelled()) {
    return;
  }
  ecoCreature.getRewardManager(event.getPlayer()).registerSpawnerBreak(event.getPlayer(),event.getBlock());
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onBlockBreak(BlockBreakEvent event){
  if (event.isCancelled()) {
    return;
  }
  plugin.getRewardManager(event.getPlayer().getWorld()).registerSpawnerBreak(event.getPlayer(),event.getBlock());
}
Program: 44385
Project: 44385
Buggy source:
public ecoBlockListener(){
}

Fixed version (ground truth):
public ecoBlockListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44386
Project: 44386
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureKilledByPlayer(CreatureKilledByPlayerEvent event){
  ecoCreature.getRewardManager(event.getPlayer()).registerCreatureDeath(event);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureKilledByPlayer(CreatureKilledByPlayerEvent event){
  plugin.getRewardManager(event.getPlayer().getWorld()).registerCreatureDeath(event);
}
Program: 44387
Project: 44387
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerKilledByPlayer(PlayerKilledByPlayerEvent event){
  ecoCreature.getRewardManager(event.getKiller()).registerPVPReward(event);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerKilledByPlayer(PlayerKilledByPlayerEvent event){
  plugin.getRewardManager(event.getKiller().getWorld()).registerPVPReward(event);
}
Program: 44388
Project: 44388
Buggy source:
public ecoDeathListener(){
}

Fixed version (ground truth):
public ecoDeathListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44389
Project: 44389
Buggy source:
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(EntityDeathEvent event){
  Player killer=ecoEntityUtil.getKillerFromDeathEvent(event);
  if (killer == null) {
    if (ecoCreature.getRewardManager(event.getEntity()).noFarm) {
      ecoCreature.getRewardManager(event.getEntity()).handleNoFarm(event);
    }
    return;
  }
  Bukkit.getPluginManager().callEvent(new CreatureKilledByPlayerEvent(event));
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(EntityDeathEvent event){
  if (!(event instanceof PlayerDeathEvent)) {
    Player killer=ecoEntityUtil.getKillerFromDeathEvent(event);
    if (killer != null) {
      Bukkit.getPluginManager().callEvent(new CreatureKilledByPlayerEvent(event));
    }
 else {
      plugin.getRewardManager(event.getEntity().getWorld()).handleNoFarm(event);
    }
  }
}
Program: 44390
Project: 44390
Buggy source:
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerDeath(PlayerDeathEvent event){
  if (ecoEntityUtil.isPVPDeath(event)) {
    Bukkit.getPluginManager().callEvent(new PlayerKilledByPlayerEvent(event));
  }
 else {
    ecoCreature.getRewardManager(event.getEntity()).registerDeathPenalty((Player)event.getEntity());
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onPlayerDeath(PlayerDeathEvent event){
  if (ecoEntityUtil.isPVPDeath(event)) {
    Bukkit.getPluginManager().callEvent(new PlayerKilledByPlayerEvent(event));
  }
 else {
    plugin.getRewardManager(event.getEntity().getWorld()).registerDeathPenalty(event.getEntity());
  }
}
Program: 44391
Project: 44391
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureSpawn(CreatureSpawnEvent event){
  if (event.isCancelled())   return;
  if (event.getSpawnReason() == SpawnReason.SPAWNER)   ecoEntityUtil.setSpawnerMob(event.getEntity());
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureSpawn(CreatureSpawnEvent event){
  if (event.isCancelled()) {
    return;
  }
  if (event.getSpawnReason() == SpawnReason.SPAWNER) {
    plugin.setSpawnerMob(event.getEntity());
  }
}
Program: 44392
Project: 44392
Buggy source:
public ecoEntityListener(){
}

Fixed version (ground truth):
public ecoEntityListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44393
Project: 44393
Buggy source:
public ecoStreakListener(){
}

Fixed version (ground truth):
public ecoStreakListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44394
Project: 44394
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onDeathStreakEvent(DeathStreakEvent event){
  ecoCreature.getRewardManager(event.getPlayer()).registerDeathStreak(event.getPlayer(),event.getDeaths());
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onDeathStreakEvent(DeathStreakEvent event){
  plugin.getRewardManager(event.getPlayer().getWorld()).registerDeathStreak(event.getPlayer(),event.getDeaths());
}
Program: 44395
Project: 44395
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onKillStreakEvent(KillStreakEvent event){
  ecoCreature.getRewardManager(event.getPlayer()).registerKillStreak(event.getPlayer(),event.getKills());
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onKillStreakEvent(KillStreakEvent event){
  plugin.getRewardManager(event.getPlayer().getWorld()).registerKillStreak(event.getPlayer(),event.getKills());
}
Program: 44398
Project: 44398
Buggy source:
@Override public int getValue(){
  return rewardTypeCount.get(RewardType.fromName(getColumnName()));
}

Fixed version (ground truth):
@Override public int getValue(){
  Integer count=rewardTypeCount.get(RewardType.fromName(getColumnName()));
  rewardTypeCount.put(RewardType.fromName(getColumnName()),Integer.valueOf(0));
  return count;
}
Program: 44399
Project: 44399
Buggy source:
public void setupGraphs(){
  Graph graph=createGraph("String_Node_Str");
  for (  RewardType rewardType : RewardType.values()) {
    graph.addPlotter(new Plotter(rewardType.getName()){
      @Override public int getValue(){
        return rewardTypeCount.get(RewardType.fromName(getColumnName()));
      }
    }
);
  }
}

Fixed version (ground truth):
public void setupGraphs(){
  Graph graph=createGraph("String_Node_Str");
  for (  RewardType rewardType : RewardType.values()) {
    graph.addPlotter(new Plotter(rewardType.getName()){
      @Override public int getValue(){
        Integer count=rewardTypeCount.get(RewardType.fromName(getColumnName()));
        rewardTypeCount.put(RewardType.fromName(getColumnName()),Integer.valueOf(0));
        return count;
      }
    }
);
  }
}
Program: 44400
Project: 44400
Buggy source:
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (isIntegerCurrency) {
    amount=(double)Math.round(amount);
  }
  if (ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()) != null) {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (hasPermission(player,"String_Node_Str") && groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
  }
 else   if (warnGroupMultiplierSupport) {
    ecoCreature.getEcoLogger().warning("String_Node_Str");
    warnGroupMultiplierSupport=false;
  }
  if (hasPermission(player,"String_Node_Str") && timeMultiplier.containsKey(ecoEntityUtil.getTimePeriod(player))) {
    timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
  }
  if (hasPermission(player,"String_Node_Str") && envMultiplier.containsKey(player.getWorld().getEnvironment())) {
    envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
  }
  return amount + groupAmount + timeAmount+ envAmount;
}

Fixed version (ground truth):
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()) != null) {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (hasPermission(player,"String_Node_Str") && groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
  }
 else   if (warnGroupMultiplierSupport) {
    ecoCreature.getEcoLogger().warning("String_Node_Str");
    warnGroupMultiplierSupport=false;
  }
  if (hasPermission(player,"String_Node_Str") && timeMultiplier.containsKey(ecoEntityUtil.getTimePeriod(player))) {
    timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
  }
  if (hasPermission(player,"String_Node_Str") && envMultiplier.containsKey(player.getWorld().getEnvironment())) {
    envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
  }
  Double total=amount + groupAmount + timeAmount+ envAmount;
  return isIntegerCurrency ? (double)Math.round(total) : total;
}
Program: 44401
Project: 44401
Buggy source:
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (isIntegerCurrency) {
    amount=(double)Math.round(amount);
  }
  try {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (hasPermission(player,"String_Node_Str") && groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
    if (hasPermission(player,"String_Node_Str") && timeMultiplier.containsKey(ecoEntityUtil.getTimePeriod(player))) {
      timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
    }
    if (hasPermission(player,"String_Node_Str") && envMultiplier.containsKey(player.getWorld().getEnvironment())) {
      envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
    }
  }
 catch (  UnsupportedOperationException exception) {
    if (warnGroupMultiplierSupport) {
      ecoCreature.getEcoLogger().warning("String_Node_Str");
      warnGroupMultiplierSupport=false;
    }
  }
  return amount + groupAmount + timeAmount+ envAmount;
}

Fixed version (ground truth):
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (isIntegerCurrency) {
    amount=(double)Math.round(amount);
  }
  if (ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()) != null) {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (hasPermission(player,"String_Node_Str") && groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
  }
 else   if (warnGroupMultiplierSupport) {
    ecoCreature.getEcoLogger().warning("String_Node_Str");
    warnGroupMultiplierSupport=false;
  }
  if (hasPermission(player,"String_Node_Str") && timeMultiplier.containsKey(ecoEntityUtil.getTimePeriod(player))) {
    timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
  }
  if (hasPermission(player,"String_Node_Str") && envMultiplier.containsKey(player.getWorld().getEnvironment())) {
    envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
  }
  return amount + groupAmount + timeAmount+ envAmount;
}
Program: 44402
Project: 44402
Buggy source:
@Override public void onEntityDeath(EntityDeathEvent event){
  if (event instanceof PlayerDeathEvent) {
    if (ecoEntityUtil.isPVPDeath(event)) {
      plugin.getServer().getPluginManager().callEvent(new PlayerKilledByPlayerEvent(event));
    }
    return;
  }
  Player killer=ecoEntityUtil.getKillerFromDeathEvent(event);
  if (killer == null) {
    if (ecoCreature.getRewardManager(event.getEntity()).noFarm) {
      ecoCreature.getRewardManager(event.getEntity()).handleNoFarm(event);
    }
    return;
  }
  plugin.getServer().getPluginManager().callEvent(new CreatureKilledByPlayerEvent(event));
}

Fixed version (ground truth):
@Override public void onEntityDeath(EntityDeathEvent event){
  if (event instanceof PlayerDeathEvent) {
    if (ecoEntityUtil.isPVPDeath(event)) {
      plugin.getServer().getPluginManager().callEvent(new PlayerKilledByPlayerEvent(event));
    }
 else {
      ecoCreature.getRewardManager(event.getEntity()).registerDeathPenalty((Player)event.getEntity());
    }
    return;
  }
  Player killer=ecoEntityUtil.getKillerFromDeathEvent(event);
  if (killer == null) {
    if (ecoCreature.getRewardManager(event.getEntity()).noFarm) {
      ecoCreature.getRewardManager(event.getEntity()).handleNoFarm(event);
    }
    return;
  }
  plugin.getServer().getPluginManager().callEvent(new CreatureKilledByPlayerEvent(event));
}
Program: 44403
Project: 44403
Buggy source:
public ItemStack computeItemStack(){
  if (Math.round(Math.random() * 100.0D) < percentage) {
    int dropAmount=isFixedDrops ? maxAmount : minAmount + random.nextInt(Math.abs(maxAmount - minAmount + 1));
    if (dropAmount > 0) {
      ItemStack itemStack;
      if (data == 0) {
        itemStack=new ItemStack(item,dropAmount);
      }
 else {
        MaterialData materialData=new MaterialData(item,data);
        itemStack=materialData.toItemStack(dropAmount);
      }
      for (      ecoEnchantment e : enchantments) {
        itemStack.addEnchantment(e.getEnchantment(),e.getLevel());
      }
      if (itemStack.getAmount() > 0) {
        return itemStack;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public ItemStack computeItemStack(){
  if (Math.random() * 100.0D < percentage) {
    int dropAmount=isFixedDrops ? maxAmount : minAmount + random.nextInt(Math.abs(maxAmount - minAmount + 1));
    if (dropAmount > 0) {
      ItemStack itemStack;
      if (data == 0) {
        itemStack=new ItemStack(item,dropAmount);
      }
 else {
        MaterialData materialData=new MaterialData(item,data);
        itemStack=materialData.toItemStack(dropAmount);
      }
      for (      ecoEnchantment e : enchantments) {
        itemStack.addEnchantment(e.getEnchantment(),e.getLevel());
      }
      if (itemStack.getAmount() > 0) {
        return itemStack;
      }
    }
  }
  return null;
}
Program: 44405
Project: 44405
Buggy source:
public ItemStack computeItemStack(){
  if (random.nextDouble() * 100.0D + 1 < percentage) {
    int dropAmount=isFixedDrops ? maxAmount : minAmount + random.nextInt(Math.abs(maxAmount - minAmount + 1));
    if (dropAmount > 0) {
      ItemStack itemStack;
      if (data == 0) {
        itemStack=new ItemStack(item,dropAmount);
      }
 else {
        MaterialData materialData=new MaterialData(item,data);
        itemStack=materialData.toItemStack(dropAmount);
      }
      for (      ecoEnchantment e : enchantments) {
        itemStack.addEnchantment(e.getEnchantment(),e.getLevel());
      }
      if (itemStack.getAmount() > 0) {
        return itemStack;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public ItemStack computeItemStack(){
  if (Math.round(Math.random() * 100.0D) < percentage) {
    int dropAmount=isFixedDrops ? maxAmount : minAmount + random.nextInt(Math.abs(maxAmount - minAmount + 1));
    if (dropAmount > 0) {
      ItemStack itemStack;
      if (data == 0) {
        itemStack=new ItemStack(item,dropAmount);
      }
 else {
        MaterialData materialData=new MaterialData(item,data);
        itemStack=materialData.toItemStack(dropAmount);
      }
      for (      ecoEnchantment e : enchantments) {
        itemStack.addEnchantment(e.getEnchantment(),e.getLevel());
      }
      if (itemStack.getAmount() > 0) {
        return itemStack;
      }
    }
  }
  return null;
}
Program: 44406
Project: 44406
Buggy source:
public static RewardType fromEntity(Entity entity){
  RewardType rewardType=null;
  if (entity instanceof Player) {
    rewardType=RewardType.PLAYER;
  }
 else   if (entity instanceof Wolf) {
    Wolf wolf=(Wolf)entity;
    if (wolf.isAngry()) {
      rewardType=ANGRY_WOLF;
    }
 else {
      rewardType=WOLF;
    }
  }
 else {
    CreatureType creatureType=ecoEntityUtil.getCreatureType(entity);
    if (creatureType != null) {
      rewardType=RewardType.fromName(creatureType.getName());
    }
  }
  return rewardType;
}

Fixed version (ground truth):
public static RewardType fromEntity(Entity entity){
  RewardType rewardType=null;
  if (entity instanceof Creeper) {
    Creeper creeper=(Creeper)entity;
    if (creeper.isPowered()) {
      rewardType=RewardType.POWERED_CREEPER;
    }
 else {
      rewardType=RewardType.CREEPER;
    }
  }
 else   if (entity instanceof Player) {
    rewardType=RewardType.PLAYER;
  }
 else   if (entity instanceof Wolf) {
    Wolf wolf=(Wolf)entity;
    if (wolf.isAngry()) {
      rewardType=ANGRY_WOLF;
    }
 else {
      rewardType=WOLF;
    }
  }
 else {
    CreatureType creatureType=ecoEntityUtil.getCreatureType(entity);
    if (creatureType != null) {
      rewardType=RewardType.fromName(creatureType.getName());
    }
  }
  return rewardType;
}
Program: 44408
Project: 44408
Buggy source:
public void registerDeathStreak(Player player){
  if (hasDTPRewards && plugin.hasEconomy()) {
    ecoCreature.economy.withdrawPlayer(player.getName(),dtpPenaltyAmount);
    ecoCreature.getMessageManager(player).sendMessage(ecoCreature.getMessageManager(player).dtpDeathStreakMessage,player);
  }
}

Fixed version (ground truth):
public void registerDeathStreak(Player player){
  if (hasDTPRewards && plugin.hasEconomy() && dtpPenaltyAmount > 0.0D) {
    ecoCreature.economy.withdrawPlayer(player.getName(),dtpPenaltyAmount);
    ecoCreature.getMessageManager(player).sendMessage(ecoCreature.getMessageManager(player).dtpDeathStreakMessage,player,dtpPenaltyAmount);
  }
}
Program: 44409
Project: 44409
Buggy source:
public void registerKillStreak(Player player){
  if (hasDTPRewards && plugin.hasEconomy()) {
    ecoCreature.economy.depositPlayer(player.getName(),dtpRewardAmount);
    ecoCreature.getMessageManager(player).sendMessage(ecoCreature.getMessageManager(player).dtpKillStreakMessage,player);
  }
}

Fixed version (ground truth):
public void registerKillStreak(Player player){
  if (hasDTPRewards && plugin.hasEconomy() && dtpRewardAmount > 0.0D) {
    ecoCreature.economy.depositPlayer(player.getName(),dtpRewardAmount);
    ecoCreature.getMessageManager(player).sendMessage(ecoCreature.getMessageManager(player).dtpKillStreakMessage,player,dtpRewardAmount);
  }
}
Program: 44410
Project: 44410
Buggy source:
public void load() throws IOException {
  Configuration defaultConfig;
  File defaultConfigFile=new File(ecoCreature.dataFolder,DEFAULT_CONFIG_FILE);
  File oldConfigFile=new File(ecoCreature.dataFolder,OLD_CONFIG_FILE);
  if (defaultConfigFile.exists()) {
    defaultConfig=new Configuration(defaultConfigFile);
  }
 else   if (oldConfigFile.exists()) {
    defaultConfig=new Configuration(oldConfigFile);
  }
 else {
    defaultConfig=getConfig(defaultConfigFile);
  }
  defaultConfig.load();
  loadConfig(DEFAULT_WORLD,defaultConfig);
  for (  World world : plugin.getServer().getWorlds()) {
    ecoCreature.messageManagers.put(world.getName(),ecoCreature.messageManagers.get(DEFAULT_WORLD).clone());
    ecoCreature.rewardManagers.put(world.getName(),ecoCreature.rewardManagers.get(DEFAULT_WORLD).clone());
    File worldConfigFile=new File(ecoCreature.dataWorldsFolder,world.getName() + "String_Node_Str");
    Configuration worldConfig=getConfig(worldConfigFile);
    worldConfig.load();
    loadConfig(world.getName(),worldConfig);
  }
}

Fixed version (ground truth):
public void load() throws IOException {
  Configuration defaultConfig;
  File defaultConfigFile=new File(ecoCreature.dataFolder,DEFAULT_CONFIG_FILE);
  File oldConfigFile=new File(ecoCreature.dataFolder,OLD_CONFIG_FILE);
  if (defaultConfigFile.exists()) {
    defaultConfig=new Configuration(defaultConfigFile);
  }
 else   if (oldConfigFile.exists()) {
    defaultConfig=new Configuration(oldConfigFile);
  }
 else {
    defaultConfig=getConfig(defaultConfigFile);
  }
  defaultConfig.load();
  log.info("String_Node_Str");
  ecoMessageManager defaultMessageManager=loadMessageConfig(defaultConfig);
  ecoRewardManager defaultRewardManager=loadRewardConfig(defaultConfig);
  ecoCreature.messageManagers.put(DEFAULT_WORLD,defaultMessageManager);
  ecoCreature.rewardManagers.put(DEFAULT_WORLD,defaultRewardManager);
  for (  World world : plugin.getServer().getWorlds()) {
    File worldConfigFile=new File(ecoCreature.dataWorldsFolder,world.getName() + "String_Node_Str");
    Configuration worldConfig;
    if (worldConfigFile.exists()) {
      worldConfig=getConfig(worldConfigFile);
      worldConfig.load();
      log.info("String_Node_Str" + world.getName() + "String_Node_Str");
      ecoCreature.messageManagers.put(world.getName(),loadMessageConfig(worldConfig));
      ecoCreature.rewardManagers.put(world.getName(),loadRewardConfig(worldConfig));
    }
 else {
      ecoCreature.messageManagers.put(world.getName(),defaultMessageManager);
      ecoCreature.rewardManagers.put(world.getName(),defaultRewardManager);
    }
  }
}
Program: 44411
Project: 44411
Buggy source:
private Configuration getConfig(File configFile) throws IOException {
  if (!configFile.exists()) {
    InputStream inputStream=ecoCreature.class.getResourceAsStream(DEFAULT_CONFIG_FILE);
    FileOutputStream outputStream=new FileOutputStream(configFile);
    byte[] buffer=new byte[8192];
    int length=0;
    while ((length=inputStream.read(buffer)) > 0)     outputStream.write(buffer,0,length);
    inputStream.close();
    outputStream.close();
    log.info("String_Node_Str" + DEFAULT_CONFIG_FILE);
  }
  return new Configuration(new File(configFile.getPath()));
}

Fixed version (ground truth):
private Configuration getConfig(File configFile) throws IOException {
  if (!configFile.exists()) {
    InputStream inputStream=ecoCreature.class.getResourceAsStream("String_Node_Str" + DEFAULT_CONFIG_FILE);
    FileOutputStream outputStream=new FileOutputStream(configFile);
    byte[] buffer=new byte[8192];
    int length=0;
    while ((length=inputStream.read(buffer)) > 0)     outputStream.write(buffer,0,length);
    inputStream.close();
    outputStream.close();
    log.info("String_Node_Str" + DEFAULT_CONFIG_FILE);
  }
  return new Configuration(new File(configFile.getPath()));
}
Program: 44412
Project: 44412
Buggy source:
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (isIntegerCurrency) {
    amount=(double)Math.round(amount);
  }
  try {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
    timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
    envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
  }
 catch (  Exception exception) {
    if (warnGroupMultiplierSupport) {
      log.warning("String_Node_Str");
      warnGroupMultiplierSupport=false;
    }
  }
  log.debug("String_Node_Str" + amount);
  log.debug("String_Node_Str" + groupAmount);
  log.debug("String_Node_Str" + timeAmount);
  log.debug("String_Node_Str" + envAmount);
  return amount + groupAmount + timeAmount+ envAmount;
}

Fixed version (ground truth):
private Double computeReward(Player player,ecoReward reward){
  Double amount=reward.getRewardAmount();
  Double groupAmount=0D;
  Double timeAmount=0D;
  Double envAmount=0D;
  if (isIntegerCurrency) {
    amount=(double)Math.round(amount);
  }
  try {
    String group=ecoCreature.permission.getPrimaryGroup(player.getWorld().getName(),player.getName()).toLowerCase();
    if (groupMultiplier.containsKey(group)) {
      groupAmount=amount * groupMultiplier.get(group) - amount;
    }
    if (timeMultiplier.containsKey(ecoEntityUtil.getTimePeriod(player))) {
      timeAmount=amount * timeMultiplier.get(ecoEntityUtil.getTimePeriod(player)) - amount;
    }
    if (envMultiplier.containsKey(player.getWorld().getEnvironment())) {
      envAmount=amount * envMultiplier.get(player.getWorld().getEnvironment()) - amount;
    }
  }
 catch (  Exception exception) {
    if (warnGroupMultiplierSupport) {
      log.warning("String_Node_Str");
      warnGroupMultiplierSupport=false;
    }
  }
  log.debug("String_Node_Str" + amount);
  log.debug("String_Node_Str" + groupAmount);
  log.debug("String_Node_Str" + timeAmount);
  log.debug("String_Node_Str" + envAmount);
  return amount + groupAmount + timeAmount+ envAmount;
}
Program: 44413
Project: 44413
Buggy source:
public ecoRewardManager(ecoCreature plugin){
  this.plugin=plugin;
  log=this.plugin.getLogger();
}

Fixed version (ground truth):
public ecoRewardManager(ecoCreature plugin){
  this.plugin=plugin;
  log=this.plugin.getLogger();
  groupMultiplier=new HashMap<String,Double>();
  timeMultiplier=new HashMap<TimePeriod,Double>();
  envMultiplier=new HashMap<Environment,Double>();
  rewards=new HashMap<CreatureType,ecoReward>();
}
Program: 44416
Project: 44416
Buggy source:
public void registerCreatureDeath(Player player,LivingEntity tamedCreature,LivingEntity killedCreature){
  if (player == null || killedCreature == null) {
    return;
  }
  if (!hasIgnoreCase(player,"String_Node_Str")) {
    return;
  }
  if (killedCreature instanceof Tameable) {
    if (((Tameable)killedCreature).isTamed() && ((Tameable)killedCreature).getOwner() instanceof Player) {
      Player owner=(Player)((Tameable)killedCreature).getOwner();
      if (owner.getName().equals(player.getName())) {
        return;
      }
    }
  }
  ecoReward reward=rewards.get(ecoEntityUtil.getCreatureType(killedCreature));
  String weaponName=tamedCreature != null ? ecoEntityUtil.getCreatureType(tamedCreature).getName() : Material.getMaterial(player.getItemInHand().getTypeId()).name();
  if (reward == null) {
    log.info("String_Node_Str" + killedCreature.getClass().getSimpleName());
    return;
  }
  registerReward(player,reward,weaponName);
}

Fixed version (ground truth):
public void registerCreatureDeath(Player player,LivingEntity tamedCreature,LivingEntity killedCreature){
  if (player == null || killedCreature == null) {
    return;
  }
  if (!hasIgnoreCase(player,"String_Node_Str" + ecoEntityUtil.getCreatureType(killedCreature).getName())) {
    return;
  }
  if (killedCreature instanceof Tameable) {
    if (((Tameable)killedCreature).isTamed() && ((Tameable)killedCreature).getOwner() instanceof Player) {
      Player owner=(Player)((Tameable)killedCreature).getOwner();
      if (owner.getName().equals(player.getName())) {
        return;
      }
    }
  }
  ecoReward reward=rewards.get(ecoEntityUtil.getCreatureType(killedCreature));
  String weaponName=tamedCreature != null ? ecoEntityUtil.getCreatureType(tamedCreature).getName() : Material.getMaterial(player.getItemInHand().getTypeId()).name();
  if (reward == null) {
    log.info("String_Node_Str" + killedCreature.getClass().getSimpleName());
    return;
  }
  registerReward(player,reward,weaponName);
}
Program: 44419
Project: 44419
Buggy source:
public boolean isEnabled(){
  return isEnabled;
}

Fixed version (ground truth):
public Boolean isEnabled(){
  return isEnabled;
}
Program: 44420
Project: 44420
Buggy source:
public void registerCreatureReward(Player player,CreatureType tamedCreature,CreatureType killedCreature){
  if (player == null) {
    return;
  }
  if (killedCreature == null) {
    return;
  }
  ecoReward reward=rewards.get(killedCreature);
  String weaponName=tamedCreature != null ? tamedCreature.getName() : Material.getMaterial(player.getItemInHand().getTypeId()).name();
  double amount=computeAmount(reward);
  if (isIntegerCurrency) {
    amount=Math.round(amount);
  }
  if (groupMultiplier.containsKey(ecoCreature.permissionsHandler.getGroup(player.getWorld().getName(),player.getName()))) {
    amount*=((Double)groupMultiplier.get(ecoCreature.permissionsHandler.getGroup(player.getWorld().getName(),player.getName()))).doubleValue();
  }
  if (amount > 0.0D) {
    plugin.method.getAccount(player.getName()).add(amount);
    if (ecoRewardManager.shouldOutputMessages) {
      player.sendMessage(reward.getRewardMessage().replaceAll("String_Node_Str",plugin.method.format(amount).replaceAll("String_Node_Str","String_Node_Str")).replaceAll("String_Node_Str",toCamelCase(weaponName)).replaceAll("String_Node_Str",reward.getRewardName()));
    }
  }
 else   if (amount < 0.0D) {
    plugin.method.getAccount(player.getName()).add(amount);
    if (ecoRewardManager.shouldOutputMessages) {
      player.sendMessage(reward.getPenaltyMessage().replaceAll("String_Node_Str",plugin.method.format(amount).replaceAll("String_Node_Str","String_Node_Str")).replaceAll("String_Node_Str",toCamelCase(weaponName)).replaceAll("String_Node_Str",reward.getRewardName()));
    }
  }
 else {
    if ((ecoRewardManager.shouldOutputMessages) && (ecoRewardManager.shouldOutputNoRewardMessage)) {
      player.sendMessage(reward.getNoRewardMessage().replaceAll("String_Node_Str",reward.getRewardName()).replaceAll("String_Node_Str",toCamelCase(weaponName)));
    }
  }
}

Fixed version (ground truth):
public void registerCreatureReward(Player player,CreatureType tamedCreature,CreatureType killedCreature){
  if (player == null || killedCreature == null) {
    return;
  }
  if (!ecoCreature.permissionsHandler.has(player,"String_Node_Str" + killedCreature.getName())) {
    return;
  }
  ecoReward reward=rewards.get(killedCreature);
  String weaponName=tamedCreature != null ? tamedCreature.getName() : Material.getMaterial(player.getItemInHand().getTypeId()).name();
  registerReward(player,reward,weaponName);
}
Program: 44421
Project: 44421
Buggy source:
public void registerSpawnerReward(Player player,Block block){
  if (player == null) {
    return;
  }
  if (block == null || !block.getType().equals(Material.MOB_SPAWNER)) {
    return;
  }
  if (ecoCreature.permissionsHandler.has(player,"String_Node_Str")) {
    for (    ItemStack itemStack : spawnerReward.computeDrops()) {
      block.getWorld().dropItemNaturally(block.getLocation(),itemStack);
    }
  }
}

Fixed version (ground truth):
public void registerSpawnerReward(Player player,Block block){
  if (player == null || block == null) {
    return;
  }
  if (!block.getType().equals(Material.MOB_SPAWNER)) {
    return;
  }
  if (ecoCreature.permissionsHandler.has(player,"String_Node_Str")) {
    registerReward(player,spawnerReward,Material.getMaterial(player.getItemInHand().getTypeId()).name());
    for (    ItemStack itemStack : spawnerReward.computeDrops()) {
      block.getWorld().dropItemNaturally(block.getLocation(),itemStack);
    }
  }
}
Program: 44422
Project: 44422
Buggy source:
private static String toCamelCase(String rawItemName){
  String[] rawItemNameParts=rawItemName.split("String_Node_Str");
  String itemName="String_Node_Str";
  for (  String itemNamePart : rawItemNameParts) {
    itemName=itemName + "String_Node_Str" + toProperCase(itemNamePart);
  }
  if (itemName.trim().equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  if (itemName.trim().equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return itemName.trim();
}

Fixed version (ground truth):
private static String toCamelCase(String rawItemName){
  String[] rawItemNameParts=rawItemName.split("String_Node_Str");
  String itemName="String_Node_Str";
  for (  String itemNamePart : rawItemNameParts) {
    itemName=itemName + "String_Node_Str" + toProperCase(itemNamePart);
  }
  if (itemName.trim().equals("String_Node_Str")) {
    itemName="String_Node_Str";
  }
  if (itemName.trim().equals("String_Node_Str")) {
    itemName="String_Node_Str";
  }
  return itemName.trim();
}
Program: 44423
Project: 44423
Buggy source:
public void registerDeathPenalty(Player player){
  if (player == null) {
    return;
  }
  if (!hasDeathPenalty) {
    return;
  }
  double amount=isPercentPenalty ? plugin.method.getAccount(player.getName()).balance() * (penaltyAmount / 100.0D) : penaltyAmount;
  plugin.method.getAccount(player.getName()).subtract(amount);
  if (ecoRewardManager.shouldOutputMessages) {
    player.sendMessage(deathPenaltyMessage.replaceAll("String_Node_Str",plugin.method.format(amount).replaceAll("String_Node_Str","String_Node_Str")));
  }
}

Fixed version (ground truth):
public void registerDeathPenalty(Player player){
  if (player == null || !hasDeathPenalty) {
    return;
  }
  Double amount=isPercentPenalty ? plugin.method.getAccount(player.getName()).balance() * (penaltyAmount / 100.0D) : penaltyAmount;
  plugin.method.getAccount(player.getName()).subtract(amount);
  if (ecoRewardManager.shouldOutputMessages) {
    player.sendMessage(deathPenaltyMessage.replaceAll("String_Node_Str",plugin.method.format(amount).replaceAll("String_Node_Str","String_Node_Str")));
  }
}
Program: 44425
Project: 44425
Buggy source:
public void onBlockBreak(BlockBreakEvent paramBlockBreakEvent){
  Player localPlayer=paramBlockBreakEvent.getPlayer();
  Block localBlock=paramBlockBreakEvent.getBlock();
  if ((localBlock.getType().equals(Material.MOB_SPAWNER)) && (localPlayer != null) && (ecoCreature.Permissions.has(localPlayer,"String_Node_Str"))) {
    ecoCreature.getRewardHandler().CashRegistry(localPlayer,14,Material.getMaterial(localPlayer.getItemInHand().getTypeId()).name());
    for (int i=0; i < ecoConstants.CD[14].length; i++) {
      double d=Math.floor(Math.random() * 100.0D);
      Random localRandom=new Random();
      if (d >= ecoConstants.CD[14][i][2])       continue;
      int j=(int)ecoConstants.CD[14][i][1];
      int k=0;
      if (ecoConstants.FD)       k=j;
 else       k=localRandom.nextInt(j) + 1;
      ItemStack localItemStack=new ItemStack((int)ecoConstants.CD[14][i][0],k,0);
      if (localItemStack == null)       continue;
      if (localItemStack.getAmount() == 0)       localPlayer.sendMessage("String_Node_Str");
 else       localBlock.getWorld().dropItemNaturally(localBlock.getLocation(),localItemStack);
    }
  }
}

Fixed version (ground truth):
public void onBlockBreak(BlockBreakEvent paramBlockBreakEvent){
  Player localPlayer=paramBlockBreakEvent.getPlayer();
  Block localBlock=paramBlockBreakEvent.getBlock();
  if ((localBlock.getType().equals(Material.MOB_SPAWNER)) && (localPlayer != null) && (ecoCreature.Permissions.has(localPlayer,"String_Node_Str"))) {
    ecoCreature.getRewardHandler().CashRegistry(localPlayer,14,Material.getMaterial(localPlayer.getItemInHand().getTypeId()).name());
    for (int i=0; i < ecoConstants.CD[14].length; i++) {
      double d=Math.floor(Math.random() * 100.0D);
      Random localRandom=new Random();
      if (d >= ecoConstants.CD[14][i][2])       continue;
      int j=(int)ecoConstants.CD[14][i][1];
      int k=0;
      if (ecoConstants.FD)       k=j;
 else       k=localRandom.nextInt(j) + 1;
      ItemStack localItemStack=new ItemStack((int)ecoConstants.CD[14][i][0],k,(short)0);
      if (localItemStack == null)       continue;
      if (localItemStack.getAmount() == 0)       localPlayer.sendMessage("String_Node_Str");
 else       localBlock.getWorld().dropItemNaturally(localBlock.getLocation(),localItemStack);
    }
  }
}
Program: 44426
Project: 44426
Buggy source:
public void extractSettings(String paramString){
  File localFile=new File(getDataFolder(),paramString);
  if (!localFile.exists()) {
    InputStream localInputStream=getClass().getResourceAsStream("String_Node_Str" + paramString);
    if (localInputStream != null) {
      FileOutputStream localFileOutputStream=null;
      try {
        localFileOutputStream=new FileOutputStream(localFile);
        byte[] arrayOfByte=new byte[8192];
        int i=0;
        while ((i=localInputStream.read(arrayOfByte)) > 0)         localFileOutputStream.write(arrayOfByte,0,i);
        System.out.println("String_Node_Str" + paramString);
      }
 catch (      Exception localException5) {
        localException3.printStackTrace();
        try {
          if (localInputStream != null)           localInputStream.close();
        }
 catch (        Exception localException6) {
        }
        try {
          if (localFileOutputStream != null)           localFileOutputStream.close();
        }
 catch (        Exception localException7) {
        }
      }
 finally {
        try {
          if (localInputStream != null)           localInputStream.close();
        }
 catch (        Exception localException8) {
        }
        try {
          if (localFileOutputStream != null)           localFileOutputStream.close();
        }
 catch (        Exception localException9) {
        }
      }
    }
  }
}

Fixed version (ground truth):
public void extractSettings(String paramString){
  File localFile=new File(getDataFolder(),paramString);
  if (!localFile.exists()) {
    InputStream localInputStream=getClass().getResourceAsStream("String_Node_Str" + paramString);
    if (localInputStream != null) {
      FileOutputStream localFileOutputStream=null;
      try {
        localFileOutputStream=new FileOutputStream(localFile);
        byte[] arrayOfByte=new byte[8192];
        int i=0;
        while ((i=localInputStream.read(arrayOfByte)) > 0)         localFileOutputStream.write(arrayOfByte,0,i);
        System.out.println("String_Node_Str" + paramString);
      }
 catch (      Exception localException5) {
        localException5.printStackTrace();
        try {
          if (localInputStream != null)           localInputStream.close();
        }
 catch (        Exception localException6) {
        }
        try {
          if (localFileOutputStream != null)           localFileOutputStream.close();
        }
 catch (        Exception localException7) {
        }
      }
 finally {
        try {
          if (localInputStream != null)           localInputStream.close();
        }
 catch (        Exception localException8) {
        }
        try {
          if (localFileOutputStream != null)           localFileOutputStream.close();
        }
 catch (        Exception localException9) {
        }
      }
    }
  }
}
Program: 44427
Project: 44427
Buggy source:
public synchronized String allocate(AbstractBuild owner,String id,BuildListener buildListener) throws InterruptedException, IOException {
  PrintStream logger=buildListener.getLogger();
  while (ids.get(id) != null) {
    logger.println("String_Node_Str" + id + "String_Node_Str"+ ids.get(id).toString());
    wait();
  }
  ids.put(id,owner);
  return id;
}

Fixed version (ground truth):
public synchronized String allocate(AbstractBuild owner,String id,BuildListener buildListener) throws InterruptedException, IOException {
  PrintStream logger=buildListener.getLogger();
  while (ids.get(id) != null) {
    logger.println("String_Node_Str" + id + "String_Node_Str"+ ids.get(id).toString());
    wait(10000);
  }
  ids.put(id,owner);
  return id;
}