nus-yam/ex-repair huggingface dataset:
Program: 44272
Project: 44272
Buggy source:
@Override public ItemStack nextItemStack(int lootLevel){
  ItemStack itemStack=super.nextItemStack(lootLevel);
  if (!Material.AIR.equals(itemStack.getType()) && itemStack.getItemMeta() != null) {
    ItemMeta itemMeta=itemStack.getItemMeta();
    itemMeta.setDisplayName(displayName);
    itemMeta.setLore(lore);
    itemStack.setItemMeta(itemMeta);
  }
  return itemStack;
}

Fixed version (ground truth):
@Override public ItemStack nextItemStack(int lootLevel){
  ItemStack itemStack=super.nextItemStack(lootLevel);
  if (!Material.AIR.equals(itemStack.getType()) && itemStack.getItemMeta() != null) {
    ItemMeta itemMeta=itemStack.getItemMeta();
    itemMeta.setDisplayName(displayName);
    List<String> lore=new ArrayList<>();
    lore.addAll(this.lore);
    lore.addAll(itemMeta.getLore());
    itemMeta.setLore(lore);
    itemStack.setItemMeta(itemMeta);
  }
  return itemStack;
}
Program: 44273
Project: 44273
Buggy source:
@Override public void deliver(Player player){
  if (!DependencyUtils.hasEconomy() || player == null) {
    return;
  }
  double amount=calculateAmount();
  if (Math.abs(amount) > 0.0) {
    for (    UUID memberId : createParty(player.getUniqueId())) {
      registerAmount(memberId,amount);
      Message message=memberId.equals(player.getName()) ? getMessage() : getPartyMessage(amount);
      addParameter(MessageToken.PLAYER,Bukkit.getOfflinePlayer(memberId).getName()).addParameter(MessageToken.AMOUNT,DependencyUtils.getEconomy().format(Math.abs(amount)));
      MessageHandler handler=new MessageHandler(message,getParameters());
      handler.send(memberId);
    }
  }
}

Fixed version (ground truth):
@Override public void deliver(Player player){
  if (!DependencyUtils.hasEconomy() || player == null) {
    return;
  }
  double amount=calculateAmount();
  if (Math.abs(amount) > 0.0) {
    for (    UUID memberId : createParty(player.getUniqueId())) {
      registerAmount(memberId,amount);
      Message message=memberId.equals(player.getUniqueId()) ? getMessage() : getPartyMessage(amount);
      addParameter(MessageToken.PLAYER,Bukkit.getOfflinePlayer(memberId).getName()).addParameter(MessageToken.AMOUNT,DependencyUtils.getEconomy().format(Math.abs(amount)));
      MessageHandler handler=new MessageHandler(message,getParameters());
      handler.send(memberId);
    }
  }
}
Program: 44274
Project: 44274
Buggy source:
public AssembledDrop(Location location){
  this.location=location;
  worldName=location.getWorld().getName();
  gain=IDENTITY;
  party=Collections.emptyList();
  integerCurrency=false;
  name="String_Node_Str";
  coin=ZERO;
  itemDrops=new ArrayList<>();
  entityDrops=new ArrayList<>();
  jockeyDrops=new ArrayList<>();
  message=DefaultMessage.NO_MESSAGE;
  parameters=new HashMap<>();
}

Fixed version (ground truth):
public AssembledDrop(Location location){
  this.location=location;
  worldName=location.getWorld().getName();
  gain=IDENTITY;
  party=Collections.emptyList();
  integerCurrency=false;
  name="String_Node_Str";
  coin=ZERO;
  itemDrops=new ArrayList<>();
  customEntityDrops=new ArrayList<>();
  entityDrops=new ArrayList<>();
  jockeyDrops=new ArrayList<>();
  message=DefaultMessage.NO_MESSAGE;
  parameters=new HashMap<>();
}
Program: 44275
Project: 44275
Buggy source:
private void dropItems(Player player,AssembledDrop drop){
  if (player != null) {
    drop.addParameter(MessageToken.PLAYER,player.getName());
  }
  for (  ItemStack stack : drop.getItemDrops()) {
    ItemMeta itemMeta=stack.getItemMeta();
    if (itemMeta != null) {
      if (itemMeta.hasDisplayName()) {
        String displayName=getAssembledMessage(itemMeta.getDisplayName(),drop);
        itemMeta.setDisplayName(displayName);
      }
      if (itemMeta.hasLore()) {
        List<String> lore=new ArrayList<>();
        for (        String loreLine : itemMeta.getLore()) {
          lore.add(getAssembledMessage(loreLine,drop));
        }
        itemMeta.setLore(lore);
      }
      stack.setItemMeta(itemMeta);
    }
    if (drop.isAddToInventory() && player != null) {
      Map<Integer,ItemStack> leftOver=player.getInventory().addItem(stack);
      for (      Map.Entry<Integer,ItemStack> entry : leftOver.entrySet()) {
        drop.getWorld().dropItemNaturally(drop.getLocation(),entry.getValue());
      }
    }
 else {
      drop.getWorld().dropItemNaturally(drop.getLocation(),stack);
    }
  }
}

Fixed version (ground truth):
private void dropItems(Player player,AssembledDrop drop){
  if (player != null) {
    drop.addParameter(MessageToken.PLAYER,player.getName());
  }
  for (  ItemStack stack : drop.getItemDrops()) {
    if (Material.AIR.equals(stack.getType())) {
      continue;
    }
    ItemMeta itemMeta=stack.getItemMeta();
    if (itemMeta.hasDisplayName()) {
      String displayName=getAssembledMessage(itemMeta.getDisplayName(),drop);
      itemMeta.setDisplayName(displayName);
    }
    if (itemMeta.hasLore()) {
      List<String> lore=new ArrayList<>();
      for (      String loreLine : itemMeta.getLore()) {
        lore.add(getAssembledMessage(loreLine,drop));
      }
      itemMeta.setLore(lore);
    }
    stack.setItemMeta(itemMeta);
    if (drop.isAddToInventory() && player != null) {
      Map<Integer,ItemStack> leftOver=player.getInventory().addItem(stack);
      for (      Map.Entry<Integer,ItemStack> entry : leftOver.entrySet()) {
        drop.getWorld().dropItemNaturally(drop.getLocation(),entry.getValue());
      }
    }
 else {
      drop.getWorld().dropItemNaturally(drop.getLocation(),stack);
    }
  }
}
Program: 44276
Project: 44276
Buggy source:
@Around("String_Node_Str") public double applyBonusMultiplierAspect(ProceedingJoinPoint pjp) throws Throwable {
  double percentage=(double)pjp.proceed();
  LoggerUtil.getInstance().debug("String_Node_Str" + bonus.getMultiplier() + "String_Node_Str"+ percentage);
  return percentage * bonus.getMultiplier();
}

Fixed version (ground truth):
@Around("String_Node_Str") public double applyBonusMultiplierAspect(ProceedingJoinPoint pjp) throws Throwable {
  double percentage=(double)pjp.proceed();
  if (bonus.isValid()) {
    LoggerUtil.getInstance().debug("String_Node_Str" + bonus.getMultiplier() + "String_Node_Str"+ percentage);
    percentage*=bonus.getMultiplier();
  }
  return percentage;
}
Program: 44277
Project: 44277
Buggy source:
@Around("String_Node_Str") public double applyBonusMultiplierAspect(ProceedingJoinPoint pjp) throws Throwable {
  double percentage=(double)pjp.proceed();
  LoggerUtil.getInstance().debug("String_Node_Str" + bonus.getMultiplier() + "String_Node_Str"+ percentage);
  return percentage * bonus.getMultiplier();
}

Fixed version (ground truth):
@Around("String_Node_Str") public double applyBonusMultiplierAspect(ProceedingJoinPoint pjp) throws Throwable {
  double percentage=(double)pjp.proceed();
  if (bonus.isValid()) {
    LoggerUtil.getInstance().debug("String_Node_Str" + bonus.getMultiplier() + "String_Node_Str"+ percentage);
    percentage*=bonus.getMultiplier();
  }
  return percentage;
}
Program: 44278
Project: 44278
Buggy source:
private static Collection<AbstractDropSource> createCustomEntitySources(String section,ConfigurationSection config){
  Collection<AbstractDropSource> sources=new ArrayList<>();
switch (CustomEntityDropType.fromName(parseTypeName(section))) {
case ANGRY_WOLF:
case PLAYER:
case POWERED_CREEPER:
case WITHER_SKELETON:
case ZOMBIE_VILLAGER:
    sources.add(new EntityDropSource(section,config));
  break;
default :
throw new IllegalArgumentException("String_Node_Str" + section);
}
return sources;
}

Fixed version (ground truth):
private static Collection<AbstractDropSource> createCustomEntitySources(String section,ConfigurationSection config){
  Collection<AbstractDropSource> sources=new ArrayList<>();
switch (CustomEntityDropType.fromName(parseTypeName(section))) {
case ANGRY_WOLF:
case PLAYER:
case POWERED_CREEPER:
case WITHER_SKELETON:
case ZOMBIE_BABY:
case ZOMBIE_VILLAGER:
    sources.add(new EntityDropSource(section,config));
  break;
default :
throw new IllegalArgumentException("String_Node_Str" + section);
}
return sources;
}
Program: 44279
Project: 44279
Buggy source:
private Collection<AbstractDropSource> getDropSources(T type){
  Collection<AbstractDropSource> source=Collections.emptyList();
  if (hasDropSource(type)) {
    source=sources.get(type);
  }
  LoggerUtil.getInstance().debugTrue("String_Node_Str" + type,source.isEmpty());
  return source;
}

Fixed version (ground truth):
private Collection<AbstractDropSource> getDropSources(T type){
  Collection<AbstractDropSource> source=Collections.emptyList();
  if (hasDropSource(type)) {
    source=sources.get(type);
  }
  if (type != null) {
    LoggerUtil.getInstance().debugTrue("String_Node_Str" + type,source.isEmpty());
  }
  return source;
}
Program: 44280
Project: 44280
Buggy source:
public void loadConfig(String file) throws IOException, InvalidConfigurationException {
  worldConfigMap.put(DEFAULT_CONFIG_FILE,loadDropConfig(new DropConfig(plugin),getConfig(new File(plugin.getDataFolder(),file))));
}

Fixed version (ground truth):
public void loadConfig(String file,String world) throws IOException, InvalidConfigurationException {
  worldConfigMap.put(world,loadDropConfig(new DropConfig(plugin),getConfig(new File(plugin.getDataFolder(),file))));
}
Program: 44281
Project: 44281
Buggy source:
public ReloadCommand(ecoCreature plugin){
  super("String_Node_Str");
  this.plugin=plugin;
  setDescription("String_Node_Str");
  setUsage("String_Node_Str");
  setArgumentRange(0,1);
  setIdentifiers("String_Node_Str");
  setPermission("String_Node_Str");
}

Fixed version (ground truth):
public ReloadCommand(ecoCreature plugin){
  super("String_Node_Str");
  this.plugin=plugin;
  setDescription("String_Node_Str");
  setUsage("String_Node_Str");
  setArgumentRange(0,2);
  setIdentifiers("String_Node_Str");
  setPermission("String_Node_Str");
}
Program: 44282
Project: 44282
Buggy source:
@Override public boolean execute(CommandSender sender,String identifier,String[] args){
  if (args == null || args.length == 0) {
    plugin.reloadConfig();
    sender.sendMessage("String_Node_Str");
  }
 else {
    try {
      plugin.loadConfig(args[0]);
    }
 catch (    Exception e) {
      sender.sendMessage("String_Node_Str");
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(CommandSender sender,String identifier,String[] args){
  if (args != null) {
    try {
switch (args.length) {
case 0:
        plugin.reloadConfig();
      sender.sendMessage("String_Node_Str");
    break;
case 1:
  if (sender instanceof Player) {
    Player player=(Player)sender;
    plugin.loadConfig(args[0],player.getWorld().getName());
  }
 else {
    sender.sendMessage("String_Node_Str");
  }
break;
case 2:
plugin.loadConfig(args[0],args[1]);
break;
}
}
 catch (Exception e) {
sender.sendMessage("String_Node_Str");
}
}
return true;
}
Program: 44283
Project: 44283
Buggy source:
public void loadConfig(String file) throws IOException, InvalidConfigurationException {
  dropConfigLoader.loadConfig(file);
  dropEventFactory=new DropEventFactory(dropConfigLoader);
  restartUpdateTask();
}

Fixed version (ground truth):
public void loadConfig(String file,String world) throws IOException, InvalidConfigurationException {
  dropConfigLoader.loadConfig(file,world);
  dropEventFactory=new DropEventFactory(dropConfigLoader);
  restartUpdateTask();
}
Program: 44284
Project: 44284
Buggy source:
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new DropEventListener(metrics),this);
  Bukkit.getPluginManager().registerEvents(new SpawnEventListener(dropConfigLoader),this);
  Bukkit.getPluginManager().registerEvents(new BlockEventListener(dropEventFactory),this);
  Bukkit.getPluginManager().registerEvents(new PlayerDeathEventListener(dropEventFactory),this);
  Bukkit.getPluginManager().registerEvents(new EntityDeathEventListener(dropEventFactory),this);
  if (DependencyUtils.hasDeathTpPlus()) {
    Bukkit.getPluginManager().registerEvents(new StreakEventListener(dropEventFactory),this);
  }
  if (DependencyUtils.hasHeroes()) {
    Bukkit.getPluginManager().registerEvents(new HeroesEventListener(dropEventFactory),this);
  }
  if (DependencyUtils.hasMcMMO()) {
    Bukkit.getPluginManager().registerEvents(new McMMOEventListener(dropEventFactory),this);
  }
}

Fixed version (ground truth):
private void registerEvents(){
  Bukkit.getPluginManager().registerEvents(new DropEventListener(metrics),this);
  Bukkit.getPluginManager().registerEvents(new SpawnEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new BlockEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new PlayerDeathEventListener(this),this);
  Bukkit.getPluginManager().registerEvents(new EntityDeathEventListener(this),this);
  if (DependencyUtils.hasDeathTpPlus()) {
    Bukkit.getPluginManager().registerEvents(new StreakEventListener(this),this);
  }
  if (DependencyUtils.hasHeroes()) {
    Bukkit.getPluginManager().registerEvents(new HeroesEventListener(this),this);
  }
  if (DependencyUtils.hasMcMMO()) {
    Bukkit.getPluginManager().registerEvents(new McMMOEventListener(this),this);
  }
}
Program: 44285
Project: 44285
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onBlockBreak(BlockBreakEvent event){
  if (event.isCancelled()) {
    return;
  }
  for (  DropEvent dropEvent : factory.createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onBlockBreak(BlockBreakEvent event){
  if (event.isCancelled()) {
    return;
  }
  for (  DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44286
Project: 44286
Buggy source:
public BlockEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public BlockEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44287
Project: 44287
Buggy source:
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(EntityDeathEvent event){
  if (event instanceof PlayerDeathEvent) {
    return;
  }
  Collection<DropEvent> events=Collections.emptyList();
  if (EventUtils.isEntityKilledEvent(event)) {
    events=factory.createEvents(EntityKilledEvent.createEvent(event));
  }
 else   if (EventUtils.isEntityFarmed(event) || EventUtils.isEntityFireFarmed(event)) {
    events=factory.createEvents(EntityFarmedEvent.createEvent(event));
  }
  for (  DropEvent dropEvent : events) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(EntityDeathEvent event){
  if (event instanceof PlayerDeathEvent) {
    return;
  }
  Collection<DropEvent> events=Collections.emptyList();
  if (EventUtils.isEntityKilledEvent(event)) {
    events=plugin.getDropEventFactory().createEvents(EntityKilledEvent.createEvent(event));
  }
 else   if (EventUtils.isEntityFarmed(event) || EventUtils.isEntityFireFarmed(event)) {
    events=plugin.getDropEventFactory().createEvents(EntityFarmedEvent.createEvent(event));
  }
  for (  DropEvent dropEvent : events) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44288
Project: 44288
Buggy source:
public EntityDeathEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public EntityDeathEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44289
Project: 44289
Buggy source:
public HeroesEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public HeroesEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44290
Project: 44290
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onHeroChangeLevel(HeroChangeLevelEvent event){
  for (  DropEvent dropEvent : factory.createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onHeroChangeLevel(HeroChangeLevelEvent event){
  for (  DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44291
Project: 44291
Buggy source:
public McMMOEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public McMMOEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44292
Project: 44292
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onMcMMOPlayerLevelUp(McMMOPlayerLevelUpEvent event){
  for (  DropEvent dropEvent : factory.createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onMcMMOPlayerLevelUp(McMMOPlayerLevelUpEvent event){
  for (  DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44293
Project: 44293
Buggy source:
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(PlayerDeathEvent event){
  Collection<DropEvent> events=Collections.emptySet();
  if (EventUtils.isPVPDeath(event)) {
    events=factory.createEvents(PlayerKilledEvent.createEvent(event));
  }
 else   if (EventUtils.isNotSuicide(event)) {
    events=factory.createEvents(event);
  }
  for (  DropEvent dropEvent : events) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onEntityDeath(PlayerDeathEvent event){
  Collection<DropEvent> events=Collections.emptySet();
  if (EventUtils.isPVPDeath(event)) {
    events=plugin.getDropEventFactory().createEvents(PlayerKilledEvent.createEvent(event));
  }
 else   if (EventUtils.isNotSuicide(event)) {
    events=plugin.getDropEventFactory().createEvents(event);
  }
  for (  DropEvent dropEvent : events) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44294
Project: 44294
Buggy source:
public PlayerDeathEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public PlayerDeathEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44295
Project: 44295
Buggy source:
public SpawnEventListener(DropConfigLoader dropConfigLoader){
  this.dropConfigLoader=dropConfigLoader;
}

Fixed version (ground truth):
public SpawnEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44296
Project: 44296
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureSpawn(CreatureSpawnEvent event){
  if (!event.isCancelled() && event.getSpawnReason() == SpawnReason.SPAWNER) {
    dropConfigLoader.getDropConfig(event.getEntity().getWorld()).tagSpawnerMob(event);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onCreatureSpawn(CreatureSpawnEvent event){
  if (!event.isCancelled() && event.getSpawnReason() == SpawnReason.SPAWNER) {
    plugin.getDropConfigLoader().getDropConfig(event.getEntity().getWorld()).tagSpawnerMob(event);
  }
}
Program: 44297
Project: 44297
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onDeathStreakEvent(DeathStreakEvent event){
  for (  DropEvent dropEvent : factory.createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onDeathStreakEvent(DeathStreakEvent event){
  for (  DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44298
Project: 44298
Buggy source:
public StreakEventListener(DropEventFactory factory){
  this.factory=factory;
}

Fixed version (ground truth):
public StreakEventListener(ecoCreature plugin){
  this.plugin=plugin;
}
Program: 44299
Project: 44299
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onKillStreakEvent(KillStreakEvent event){
  for (  DropEvent dropEvent : factory.createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onKillStreakEvent(KillStreakEvent event){
  for (  DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {
    Bukkit.getPluginManager().callEvent(dropEvent);
  }
}
Program: 44300
Project: 44300
Buggy source:
public CronGain(Map<String,Double> multipliers,String permission){
  super(multipliers,"String_Node_Str");
}

Fixed version (ground truth):
public CronGain(Map<String,Double> multipliers){
  super(multipliers,"String_Node_Str");
}
Program: 44301
Project: 44301
Buggy source:
public static Collection<PlayerGain> parseConfig(ConfigurationSection config){
  Collection<PlayerGain> gain=Collections.emptyList();
  if (config != null) {
    gain=new ArrayList<PlayerGain>();
    gain.add(new GroupGain(parseMultipliers(config)));
  }
  return gain;
}

Fixed version (ground truth):
public static Collection<PlayerGain> parseConfig(ConfigurationSection config){
  Collection<PlayerGain> gain=Collections.emptyList();
  if (config != null) {
    gain=new ArrayList<PlayerGain>();
    gain.add(new CronGain(parseMultipliers(config)));
  }
  return gain;
}
Program: 44302
Project: 44302
Buggy source:
public DeathPenaltySource(ConfigurationSection config){
  if (config == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setName(CustomRewardType.DEATH_PENALTY.toString());
  percentPenalty=config.getBoolean("String_Node_Str",true);
  penaltyAmount=config.getDouble("String_Node_Str",0.05D);
  setCoinPenaltyMessage(new DefaultMessage(config.getString("String_Node_Str",DEATH_PENALTY_MESSAGE)));
}

Fixed version (ground truth):
public DeathPenaltySource(String section,ConfigurationSection config){
  if (config == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setName(CustomRewardType.DEATH_PENALTY.toString());
  percentPenalty=config.getBoolean("String_Node_Str",true);
  penaltyAmount=config.getDouble("String_Node_Str",0.05D);
  setCoinPenaltyMessage(new DefaultMessage(config.getString("String_Node_Str",DEATH_PENALTY_MESSAGE)));
}
Program: 44303
Project: 44303
Buggy source:
public PluginConfig(ecoCreature plugin){
  this.plugin=plugin;
  dataWorldsFolder=new File(plugin.getDataFolder(),"String_Node_Str");
  initialized=dataWorldsFolder.mkdirs() && initConfig();
}

Fixed version (ground truth):
public PluginConfig(ecoCreature plugin){
  this.plugin=plugin;
  dataWorldsFolder=new File(plugin.getDataFolder(),"String_Node_Str");
  initialized=(dataWorldsFolder.exists() || dataWorldsFolder.mkdirs()) && initConfig();
}
Program: 44304
Project: 44304
Buggy source:
private Collection<AbstractRewardSource> getRewardSource(T type){
  Collection<AbstractRewardSource> source=Collections.emptySet();
  if (hasRewardSource(type)) {
    source=sources.get(type);
  }
  LoggerUtil.getInstance().debugTrue("String_Node_Str" + type,source.isEmpty());
  return Collections.emptySet();
}

Fixed version (ground truth):
private Collection<AbstractRewardSource> getRewardSource(T type){
  Collection<AbstractRewardSource> source=Collections.emptySet();
  if (hasRewardSource(type)) {
    source=sources.get(type);
  }
  LoggerUtil.getInstance().debugTrue("String_Node_Str" + type,source.isEmpty());
  return source;
}
Program: 44305
Project: 44305
Buggy source:
public Collection<EntityType> getOutcome(){
  Collection<EntityType> types=new ArrayList<EntityType>();
  for (int i=0; i < nextAmount(); i++) {
    types.add(type);
  }
  return types;
}

Fixed version (ground truth):
public Collection<EntityType> getOutcome(){
  Collection<EntityType> types=new ArrayList<EntityType>();
  int amount=nextAmount();
  for (int i=0; i < amount; i++) {
    types.add(type);
  }
  return types;
}
Program: 44306
Project: 44306
Buggy source:
public AbstractRule(){
  clearDrops=false;
  message=DefaultMessage.NO_MESSAGE;
}

Fixed version (ground truth):
public AbstractRule(){
  clearDrops=false;
  clearExpOrbs=false;
  message=DefaultMessage.NO_MESSAGE;
}
Program: 44307
Project: 44307
Buggy source:
public Collection<Reward> createRewards(Event event){
  Collection<Reward> rewards=new HashSet<Reward>();
  for (int i=0; i < nextAmount(); i++) {
    rewards.add(createReward(event));
  }
  return rewards;
}

Fixed version (ground truth):
public Collection<Reward> createRewards(Event event){
  Collection<Reward> rewards=new HashSet<Reward>();
  int amount=nextAmount();
  for (int i=0; i < amount; i++) {
    rewards.add(createReward(event));
  }
  return rewards;
}
Program: 44308
Project: 44308
Buggy source:
private Reward createWinnerReward(PlayerKilledEvent event){
  WorldSettings settings=getSettings(event.getEntity().getWorld());
  Reward reward=settings.createReward(event);
  reward.addParameter(MessageToken.CREATURE,event.getVictim().getName());
  if (reward.getEntityDrops().contains(EntityType.EXPERIENCE_ORB)) {
    event.setDroppedExp(0);
  }
  addPlayerSkullToEvent(reward,event);
  addBooksToEvent(reward,event);
  return reward;
}

Fixed version (ground truth):
private Reward createWinnerReward(PlayerKilledEvent event){
  WorldSettings settings=getSettings(event.getEntity().getWorld());
  Reward reward=settings.createReward(event);
  reward.addParameter(MessageToken.CREATURE,event.getVictim().getName());
  if (reward.getEntityDrops().contains(EntityType.EXPERIENCE_ORB)) {
    event.setDroppedExp(0);
  }
  addBooksToEvent(reward,event);
  return reward;
}
Program: 44309
Project: 44309
Buggy source:
public FactionsGain(Map<Rel,Double> multipliers){
  super(multipliers,"String_Node_Str");
}

Fixed version (ground truth):
public FactionsGain(Map<String,Double> multipliers){
  super(multipliers,"String_Node_Str");
}
Program: 44310
Project: 44310
Buggy source:
public static Set<PlayerGain> parseConfig(ConfigurationSection config){
  Set<PlayerGain> gain=Collections.emptySet();
  if (config != null && DependencyUtils.hasFactions()) {
    Map<Rel,Double> multipliers=new HashMap<Rel,Double>();
    for (    String relation : config.getKeys(false)) {
      try {
        multipliers.put(Rel.valueOf(relation),Double.valueOf(config.getConfigurationSection(relation).getDouble(AMOUNT_KEY,NO_GAIN)));
      }
 catch (      IllegalArgumentException e) {
        LoggerUtil.getInstance().warning("String_Node_Str" + relation);
      }
    }
    gain=new HashSet<PlayerGain>();
    gain.add(new FactionsGain(multipliers));
  }
  return gain;
}

Fixed version (ground truth):
public static Set<PlayerGain> parseConfig(ConfigurationSection config){
  Set<PlayerGain> gain=Collections.emptySet();
  if (config != null && DependencyUtils.hasFactions()) {
    Map<String,Double> multipliers=new HashMap<String,Double>();
    for (    String relation : config.getKeys(false)) {
      try {
        multipliers.put(relation,Double.valueOf(config.getConfigurationSection(relation).getDouble(AMOUNT_KEY,NO_GAIN)));
      }
 catch (      IllegalArgumentException e) {
        LoggerUtil.getInstance().warning("String_Node_Str" + relation);
      }
    }
    gain=new HashSet<PlayerGain>();
    gain.add(new FactionsGain(multipliers));
  }
  return gain;
}
Program: 44311
Project: 44311
Buggy source:
@Override public double getGain(Player player){
  UPlayer uPlayer=UPlayer.get(player);
  Faction faction=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
  Rel rel=RelationUtil.getRelationOfThatToMe(faction,uPlayer);
  return uPlayer != null && getMultipliers().containsKey(rel) ? getMultipliers().get(rel) : NO_GAIN;
}

Fixed version (ground truth):
@Override public double getGain(Player player){
  UPlayer uPlayer=UPlayer.get(player);
  Faction faction=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
  Rel rel=RelationUtil.getRelationOfThatToMe(faction,uPlayer);
  return uPlayer != null && getMultipliers().containsKey(rel.toString()) ? getMultipliers().get(rel.toString()) : NO_GAIN;
}
Program: 44313
Project: 44313
Buggy source:
public FactionsGain(Map<String,Double> multipliers){
  super(multipliers,"String_Node_Str");
}

Fixed version (ground truth):
public FactionsGain(Map<Rel,Double> multipliers){
  super(multipliers,"String_Node_Str");
}
Program: 44314
Project: 44314
Buggy source:
public static Set<PlayerGain> parseConfig(ConfigurationSection config){
  Set<PlayerGain> gain=Collections.emptySet();
  if (config != null && DependencyUtils.hasFactions()) {
    Map<String,Double> multipliers=new HashMap<String,Double>();
    for (    String relation : config.getKeys(false)) {
      try {
        multipliers.put(relation,Double.valueOf(config.getConfigurationSection(relation).getDouble(AMOUNT_KEY,NO_GAIN)));
      }
 catch (      IllegalArgumentException e) {
        LoggerUtil.getInstance().warning("String_Node_Str" + relation);
      }
    }
    gain=new HashSet<PlayerGain>();
    gain.add(new FactionsGain(multipliers));
  }
  return gain;
}

Fixed version (ground truth):
public static Set<PlayerGain> parseConfig(ConfigurationSection config){
  Set<PlayerGain> gain=Collections.emptySet();
  if (config != null && DependencyUtils.hasFactions()) {
    Map<Rel,Double> multipliers=new HashMap<Rel,Double>();
    for (    String relation : config.getKeys(false)) {
      try {
        multipliers.put(Rel.valueOf(relation),Double.valueOf(config.getConfigurationSection(relation).getDouble(AMOUNT_KEY,NO_GAIN)));
      }
 catch (      IllegalArgumentException e) {
        LoggerUtil.getInstance().warning("String_Node_Str" + relation);
      }
    }
    gain=new HashSet<PlayerGain>();
    gain.add(new FactionsGain(multipliers));
  }
  return gain;
}
Program: 44315
Project: 44315
Buggy source:
@Override public double getGain(Player player){
  UPlayer uPlayer=UPlayer.get(player);
  Faction faction=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
  Rel rel=RelationUtil.getRelationOfThatToMe(faction,uPlayer);
  return uPlayer != null && getMultipliers().containsKey(rel.toString()) ? getMultipliers().get(rel.toString()) : NO_GAIN;
}

Fixed version (ground truth):
@Override public double getGain(Player player){
  UPlayer uPlayer=UPlayer.get(player);
  Faction faction=BoardColls.get().getFactionAt(PS.valueOf(player.getLocation()));
  Rel rel=RelationUtil.getRelationOfThatToMe(faction,uPlayer);
  return uPlayer != null && getMultipliers().containsKey(rel) ? getMultipliers().get(rel) : NO_GAIN;
}
Program: 44316
Project: 44316
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    BattleArenaRule rule=new BattleArenaRule();
    rule.setBattleArenaRewards(system.getBoolean("String_Node_Str"));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(BattleArenaRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    BattleArenaRule rule=new BattleArenaRule();
    rule.setBattleArenaRewards(system.getBoolean("String_Node_Str"));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(BattleArenaRule.class,rule);
  }
  return rules;
}
Program: 44317
Project: 44317
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    CreativeModeRule rule=new CreativeModeRule();
    rule.setCreativeModeRewards(system.getBoolean("String_Node_Str",false));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(CreativeModeRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    CreativeModeRule rule=new CreativeModeRule();
    rule.setCreativeModeRewards(system.getBoolean("String_Node_Str",false));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(CreativeModeRule.class,rule);
  }
  return rules;
}
Program: 44318
Project: 44318
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  List<String> classNames=system.getStringList("String_Node_Str");
  HeroesRule rule=new HeroesRule();
  rule.setClassNames(classNames);
  Map<Class<? extends AbstractRule>,Rule> rules=new HashMap<Class<? extends AbstractRule>,Rule>();
  rules.put(HeroesRule.class,rule);
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    List<String> classNames=system.getStringList("String_Node_Str");
    HeroesRule rule=new HeroesRule();
    rule.setClassNames(classNames);
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(HeroesRule.class,rule);
  }
  return rules;
}
Program: 44319
Project: 44319
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    MobArenaRule rule=new MobArenaRule();
    rule.setMobArenaRewards(system.getBoolean("String_Node_Str"));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(MobArenaRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    MobArenaRule rule=new MobArenaRule();
    rule.setMobArenaRewards(system.getBoolean("String_Node_Str"));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(MobArenaRule.class,rule);
  }
  return rules;
}
Program: 44320
Project: 44320
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(MurderedPetRule.class,new MurderedPetRule());
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  rules=new HashMap<Class<? extends AbstractRule>,Rule>();
  rules.put(MurderedPetRule.class,new MurderedPetRule());
  return rules;
}
Program: 44321
Project: 44321
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    ProjectileRule rule=new ProjectileRule();
    rule.setBowRewards(system.getBoolean("String_Node_Str",true));
    rule.setMessage(new DefaultMessage(system.getString("String_Node_Str",NO_BOW_REWARD_MESSAGE)));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(ProjectileRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    ProjectileRule rule=new ProjectileRule();
    rule.setBowRewards(system.getBoolean("String_Node_Str",true));
    rule.setMessage(new DefaultMessage(system.getString("String_Node_Str",NO_BOW_REWARD_MESSAGE)));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(ProjectileRule.class,rule);
  }
  return rules;
}
Program: 44322
Project: 44322
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  SimpleClansRule rule=new SimpleClansRule();
  rule.setClearNonRivalDrops(system.getBoolean("String_Node_Str",false));
  Map<Class<? extends AbstractRule>,Rule> rules=new HashMap<Class<? extends AbstractRule>,Rule>();
  rules.put(SimpleClansRule.class,rule);
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    SimpleClansRule rule=new SimpleClansRule();
    rule.setClearNonRivalDrops(system.getBoolean("String_Node_Str",false));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(SimpleClansRule.class,rule);
  }
  return rules;
}
Program: 44323
Project: 44323
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    SpawnerDistanceRule rule=new SpawnerDistanceRule();
    rule.setCanCampSpawner(system.getBoolean("String_Node_Str",false));
    rule.setClearDrops(system.getBoolean("String_Node_Str",true));
    rule.setClearExpOrbs(system.getBoolean("String_Node_Str",true));
    rule.setCampByDistance(system.getBoolean("String_Node_Str",true));
    rule.setCampRadius(system.getInt("String_Node_Str",CAMP_RADIUS));
    rule.setMessage(new DefaultMessage(system.getString("String_Node_Str",NO_CAMP_MESSAGE)));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(SpawnerDistanceRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    SpawnerDistanceRule rule=new SpawnerDistanceRule();
    rule.setCanCampSpawner(system.getBoolean("String_Node_Str",false));
    rule.setClearDrops(system.getBoolean("String_Node_Str",true));
    rule.setClearExpOrbs(system.getBoolean("String_Node_Str",true));
    rule.setCampByDistance(system.getBoolean("String_Node_Str",true));
    rule.setCampRadius(system.getInt("String_Node_Str",CAMP_RADIUS));
    rule.setMessage(getNoCampMessage(system));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(SpawnerDistanceRule.class,rule);
  }
  return rules;
}
Program: 44324
Project: 44324
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null) {
    SpawnerMobRule rule=new SpawnerMobRule();
    rule.setCanCampSpawner(system.getBoolean("String_Node_Str",false));
    rule.setClearDrops(system.getBoolean("String_Node_Str",true));
    rule.setClearExpOrbs(system.getBoolean("String_Node_Str",true));
    rule.setCampByEntity(system.getBoolean("String_Node_Str",false));
    rule.setMessage(getNoCampMessage(system));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(SpawnerMobRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    SpawnerMobRule rule=new SpawnerMobRule();
    rule.setCanCampSpawner(system.getBoolean("String_Node_Str",false));
    rule.setClearDrops(system.getBoolean("String_Node_Str",true));
    rule.setClearExpOrbs(system.getBoolean("String_Node_Str",true));
    rule.setCampByEntity(system.getBoolean("String_Node_Str",false));
    rule.setMessage(getNoCampMessage(system));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(SpawnerMobRule.class,rule);
  }
  return rules;
}
Program: 44325
Project: 44325
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection config){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (config != null) {
    TamedCreatureRule rule=new TamedCreatureRule();
    rule.setWolverineMode(config.getBoolean("String_Node_Str",true));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(TamedCreatureRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    TamedCreatureRule rule=new TamedCreatureRule();
    rule.setWolverineMode(system.getBoolean("String_Node_Str",true));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(TamedCreatureRule.class,rule);
  }
  return rules;
}
Program: 44326
Project: 44326
Buggy source:
public TownyRule(){
  setClearExpOrbs(false);
}

Fixed version (ground truth):
public TownyRule(){
  townMap=new HashMap<String,Boolean>();
  setClearExpOrbs(true);
}
Program: 44327
Project: 44327
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection gain){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  ConfigurationSection townyConfig=gain.getConfigurationSection("String_Node_Str");
  if (townyConfig != null) {
    boolean defaultClearExpOrbs=gain.getBoolean("String_Node_Str",false);
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    for (    String townName : townyConfig.getKeys(false)) {
      if ("String_Node_Str".equals(townName)) {
        continue;
      }
      ConfigurationSection townConfig=townyConfig.getConfigurationSection(townName);
      if (townConfig != null) {
        TownyRule rule=new TownyRule();
        rule.setTownName(townName);
        rule.setClearExpOrbs(townConfig.getBoolean("String_Node_Str",defaultClearExpOrbs));
        rules.put(TownyRule.class,rule);
      }
    }
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection gain){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  ConfigurationSection townyConfig=gain.getConfigurationSection("String_Node_Str");
  if (townyConfig != null) {
    TownyRule rule=new TownyRule();
    for (    String townName : townyConfig.getKeys(false)) {
      ConfigurationSection townConfig=townyConfig.getConfigurationSection(townName);
      if (townConfig != null) {
        rule.addTown(townName,townConfig.getBoolean("String_Node_Str",false));
      }
    }
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(TownyRule.class,rule);
  }
  return rules;
}
Program: 44328
Project: 44328
Buggy source:
@Override protected boolean isBroken(EntityKilledEvent event){
  return DependencyUtils.hasTowny() && townName.equals(TownyUniverse.getTownName(event.getKiller().getLocation())) && isClearExpOrbs();
}

Fixed version (ground truth):
@Override protected boolean isBroken(EntityKilledEvent event){
  boolean inTown=false;
  if (DependencyUtils.hasTowny()) {
    String townName=TownyUniverse.getTownName(event.getKiller().getLocation());
    if (townMap.containsKey(townName)) {
      inTown=townMap.get(townName);
    }
 else     if (townName != null && townMap.containsKey(IN_TOWN)) {
      inTown=townMap.get(IN_TOWN);
    }
  }
  return inTown && isClearExpOrbs();
}
Program: 44329
Project: 44329
Buggy source:
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection config){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (config != null) {
    UnderSeaLevelRule rule=new UnderSeaLevelRule();
    rule.setHuntUnderSeaLevel(config.getBoolean("String_Node_Str",true));
    rule.setMessage(new DefaultMessage(config.getString("String_Node_Str",NO_UNDER_SEA_LEVEL_MESSAGE)));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(UnderSeaLevelRule.class,rule);
  }
  return rules;
}

Fixed version (ground truth):
public static Map<Class<? extends AbstractRule>,Rule> parseConfig(ConfigurationSection system){
  Map<Class<? extends AbstractRule>,Rule> rules=Collections.emptyMap();
  if (system != null && system.getConfigurationSection("String_Node_Str") != null) {
    UnderSeaLevelRule rule=new UnderSeaLevelRule();
    rule.setHuntUnderSeaLevel(system.getBoolean("String_Node_Str",true));
    rule.setMessage(new DefaultMessage(system.getString("String_Node_Str",NO_UNDER_SEA_LEVEL_MESSAGE)));
    rules=new HashMap<Class<? extends AbstractRule>,Rule>();
    rules.put(UnderSeaLevelRule.class,rule);
  }
  return rules;
}
Program: 44330
Project: 44330
Buggy source:
private static List<EntityDrop> parseDrops(List<String> dropsList){
  List<EntityDrop> drops=Collections.emptyList();
  for (  String dropString : dropsList) {
    EntityDrop drop=createEntityDrop(dropString);
    if (drop != null) {
      drops=new ArrayList<EntityDrop>();
      drops.add(drop);
    }
  }
  return drops;
}

Fixed version (ground truth):
private static List<EntityDrop> parseDrops(List<String> dropsList){
  List<EntityDrop> drops=new ArrayList<EntityDrop>();
  for (  String dropString : dropsList) {
    EntityDrop drop=createEntityDrop(dropString);
    if (drop != null) {
      drops.add(drop);
    }
  }
  return drops;
}
Program: 44331
Project: 44331
Buggy source:
public static List<EntityDrop> parseConfig(ConfigurationSection config){
  List<EntityDrop> drops=Collections.emptyList();
  if (config != null && config.getList("String_Node_Str") != null) {
    for (    Object obj : config.getList("String_Node_Str")) {
      if (obj instanceof LinkedHashMap) {
        ConfigurationSection memoryConfig=createMemoryConfig(obj);
        String passengerString=memoryConfig.getString("String_Node_Str");
        String vehicleString=memoryConfig.getString("String_Node_Str");
        JockeyDrop drop=createJockeyDrop(passengerString,vehicleString);
        if (drop != null) {
          drops=new ArrayList<EntityDrop>();
          drops.add(drop);
        }
      }
    }
  }
  return drops;
}

Fixed version (ground truth):
public static List<EntityDrop> parseConfig(ConfigurationSection config){
  List<EntityDrop> drops=new ArrayList<EntityDrop>();
  if (config != null && config.getList("String_Node_Str") != null) {
    for (    Object obj : config.getList("String_Node_Str")) {
      if (obj instanceof LinkedHashMap) {
        ConfigurationSection memoryConfig=createMemoryConfig(obj);
        String passengerString=memoryConfig.getString("String_Node_Str");
        String vehicleString=memoryConfig.getString("String_Node_Str");
        JockeyDrop drop=createJockeyDrop(passengerString,vehicleString);
        if (drop != null) {
          drops.add(drop);
        }
      }
    }
  }
  return drops;
}