nus-yam/ex-repair huggingface dataset:
Program: 89008
Project: 89008
Buggy source:
private void handleBlockReward(BlockBreakEvent event,Configuration config,ItemTree tree,String description){
  Player player=event.getPlayer();
  Block block=event.getBlock();
  ItemQuery retrieveKey=ItemQuery.fromAny(block);
  if (config == null) {
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName(),block);
  }
 else {
    Action action=getBlockBonusAction(config.getSimpleBlockReward(),retrieveKey,block);
    RewardProvider rewards=config.getRewardProvider();
    ChannelProvider channels=config.getChannelProvider();
    if (action == null || action.hasNothing(channels))     return;
    Collection<NamedParameter> params=config.getParameterProviders().getParameters(action,block);
    List<ResourceHolder> generated=action.generateRewards(params,rewards,random);
    if (!action.canRewardPlayer(rewards,player,generated)) {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str" + description + "String_Node_Str",player.getName(),block.getType());
      if (!Permissions.hasUntouchable(player))       event.setCancelled(true);
      return;
    }
    event.setExpToDrop(0);
    Collection<ResourceHolder> result=action.rewardPlayer(rewards,player,generated,block.getLocation());
    config.getMessageQueue().enqueue(player,action,channels.getFormatter(player,result));
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str" + description + "String_Node_Str",player.getName(),StringUtils.join(result,"String_Node_Str"),block.getType());
  }
}

Fixed version (ground truth):
private void handleBlockReward(BlockBreakEvent event,Configuration config,ItemTree tree,String description){
  Player player=event.getPlayer();
  Block block=event.getBlock();
  ItemQuery retrieveKey=ItemQuery.fromAny(block);
  if (config == null) {
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName(),block);
  }
 else {
    Action action=getBlockBonusAction(tree,retrieveKey,block);
    RewardProvider rewards=config.getRewardProvider();
    ChannelProvider channels=config.getChannelProvider();
    if (action == null || action.hasNothing(channels))     return;
    Collection<NamedParameter> params=config.getParameterProviders().getParameters(action,block);
    List<ResourceHolder> generated=action.generateRewards(params,rewards,random);
    if (!action.canRewardPlayer(rewards,player,generated)) {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str" + description + "String_Node_Str",player.getName(),block.getType());
      if (!Permissions.hasUntouchable(player))       event.setCancelled(true);
      return;
    }
    event.setExpToDrop(0);
    Collection<ResourceHolder> result=action.rewardPlayer(rewards,player,generated,block.getLocation());
    config.getMessageQueue().enqueue(player,action,channels.getFormatter(player,result));
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str" + description + "String_Node_Str",player.getName(),StringUtils.join(result,"String_Node_Str"),block.getType());
  }
}
Program: 89009
Project: 89009
Buggy source:
public RewardProvider(RewardProvider reference,Configuration configuration){
  super(reference.getDefaultName());
  this.nameLookup=reference.nameLookup;
  this.enumLookup=reference.enumLookup;
  this.configuration=configuration;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public RewardProvider(RewardProvider reference,Configuration configuration){
  super(reference);
  this.enumLookup=(HashMap<RewardTypes,RewardService>)reference.enumLookup.clone();
  this.configuration=configuration;
}
Program: 89010
Project: 89010
Buggy source:
/** 
 * Retrieves a list of action rewards that applies when a player performs a given action to the item or block specified by the query. <p> The query must be a ItemQuery for every trigger except brewing, where it also can be a PotionQuery. <p> Also note that this list contains every possible reward that matches the given parameters. In reality, only the  first item will be awarded.
 * @param player - player performing the given action, or NULL if the default configuration file should be used.
 * @param trigger - action the player performs. 
 * @param query - query representing the item or block that was the target of the action.
 * @return A list of possible rewards. Only the first item will be chosen when rewards are actually awarded.
 * @throws ParsingException If the stored preset option associated with this player is malformed.
 */
public List<Action> getPlayerReward(Player player,Integer trigger,Query query) throws ParsingException {
  Configuration config=getPresets().getConfiguration(player);
  Integer brewing=getActionTypes().getType(ActionTypes.BREWING);
  ItemTree current=config.getActionReward(trigger);
  if (trigger == brewing && query instanceof PotionQuery) {
    return config.getComplexBrewingReward().getAllRanked((PotionQuery)query);
  }
 else {
    if (current == null) {
      throw new IllegalArgumentException(String.format("String_Node_Str",trigger));
    }
    return current.getAllRanked((ItemQuery)query);
  }
}

Fixed version (ground truth):
/** 
 * Retrieves a list of action rewards that applies when a player performs a given action to the item or block specified by the query. <p> The query must be a ItemQuery for every trigger except brewing, where it also can be a PotionQuery. <p> Also note that this list contains every possible reward that matches the given parameters. In reality, only the  first item will be awarded.
 * @param player - player performing the given action, or NULL if the default configuration file should be used.
 * @param trigger - action the player performs. 
 * @param query - query representing the item or block that was the target of the action.
 * @return A list of possible rewards. Only the first item will be chosen when rewards are actually awarded.
 * @throws ParsingException If the stored preset option associated with this player is malformed.
 */
public List<Action> getPlayerReward(Player player,Integer trigger,Query query) throws ParsingException {
  Configuration config=getPresets().getConfiguration(player);
  Integer brewing=getActionTypes().getType(ActionTypes.BREWING);
  ItemTree current=config.getActionReward(trigger);
  if (Objects.equal(trigger,brewing) && query instanceof PotionQuery) {
    return config.getComplexBrewingReward().getAllRanked((PotionQuery)query);
  }
 else {
    if (current == null) {
      throw new IllegalArgumentException(String.format("String_Node_Str",trigger));
    }
    return current.getAllRanked((ItemQuery)query);
  }
}
Program: 89011
Project: 89011
Buggy source:
private void loadPresets(ConfigurationSection section,ConfigurationLoader loader){
  for (  String key : section.getKeys(false)) {
    try {
      PresetQuery query=presetParser.parse(key);
      Configuration data=loadPreset(section.getConfigurationSection(key),loader);
      data.setPreset(query.hasPresetNames());
      if (data != null)       presets.put(query,data);
    }
 catch (    ParsingException ex) {
      if (logger != null)       logger.printWarning(this,"String_Node_Str",ex.getMessage());
    }
  }
}

Fixed version (ground truth):
private void loadPresets(ConfigurationSection section,ConfigurationLoader loader){
  for (  String key : section.getKeys(false)) {
    try {
      PresetQuery query=presetParser.parse(key);
      Configuration data=loadPreset(section.getConfigurationSection(key),loader);
      if (data != null) {
        data.setPreset(query.hasPresetNames());
        presets.put(query,data);
      }
    }
 catch (    ParsingException ex) {
      if (logger != null)       logger.printWarning(this,"String_Node_Str",ex.getMessage());
    }
  }
}
Program: 89012
Project: 89012
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (command != null && command.getName().equalsIgnoreCase(COMMAND_RELOAD) || command.getName().equalsIgnoreCase(COMMAND_ABBREVIATED))   return handleMainCommand(sender,args);
 else   return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (command != null && (command.getName().equalsIgnoreCase(COMMAND_RELOAD) || command.getName().equalsIgnoreCase(COMMAND_ABBREVIATED)))   return handleMainCommand(sender,args);
 else   return false;
}
Program: 89013
Project: 89013
Buggy source:
private boolean handleMainCommand(CommandSender sender,String[] args){
  if (!Permissions.hasAdmin(sender)) {
    plugin.respond(sender,ChatColor.RED + "String_Node_Str");
    return true;
  }
  String sub=CommandUtilities.getSafe(args,0);
  if (sub.equalsIgnoreCase(SUB_COMMAND_TOGGLE_DEBUG)) {
    plugin.toggleDebug();
    plugin.respond(sender,ChatColor.BLUE + "String_Node_Str" + (plugin.isDebugEnabled() ? "String_Node_Str" : "String_Node_Str"));
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_WARNINGS)) {
    if (sender != null && plugin.getInformer().hasWarnings())     plugin.getInformer().displayWarnings(sender,true);
 else     sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_ITEM)) {
    handleQueryItem(sender,args,1);
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_MOB)) {
    handleQueryMob(sender,args,1);
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_RELOAD) || sub.length() == 0) {
    try {
      plugin.loadDefaults(true);
      plugin.respond(sender,ChatColor.BLUE + "String_Node_Str");
    }
 catch (    IOException e) {
      plugin.respond(sender,ChatColor.RED + "String_Node_Str" + e.getMessage());
    }
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_UPDATE)) {
    plugin.getAutoUpdate().updatePlugin(sender);
    return true;
  }
 else {
    plugin.respond(sender,ChatColor.RED + "String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
private boolean handleMainCommand(CommandSender sender,String[] args){
  if (!Permissions.hasAdmin(sender)) {
    plugin.respond(sender,ChatColor.RED + "String_Node_Str");
    return true;
  }
  String sub=CommandUtilities.getSafe(args,0);
  if (sub.equalsIgnoreCase(SUB_COMMAND_TOGGLE_DEBUG)) {
    plugin.toggleDebug();
    plugin.respond(sender,ChatColor.BLUE + "String_Node_Str" + (plugin.isDebugEnabled() ? "String_Node_Str" : "String_Node_Str"));
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_WARNINGS)) {
    if (sender != null) {
      if (plugin.getInformer().hasWarnings())       plugin.getInformer().displayWarnings(sender,true);
 else       sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_ITEM)) {
    handleQueryItem(sender,args,1);
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_MOB)) {
    handleQueryMob(sender,args,1);
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_RELOAD) || sub.length() == 0) {
    try {
      plugin.loadDefaults(true);
      plugin.respond(sender,ChatColor.BLUE + "String_Node_Str");
    }
 catch (    IOException e) {
      plugin.respond(sender,ChatColor.RED + "String_Node_Str" + e.getMessage());
    }
    return true;
  }
 else   if (sub.equalsIgnoreCase(SUB_COMMAND_UPDATE)) {
    plugin.getAutoUpdate().updatePlugin(sender);
    return true;
  }
 else {
    plugin.respond(sender,ChatColor.RED + "String_Node_Str");
    return false;
  }
}
Program: 89014
Project: 89014
Buggy source:
@Override public Boolean hasPlayerHistory(Location blockLocation) throws HistoryException {
  int blockID=blockLocation.getBlock().getTypeId();
synchronized (lock) {
    if (searching) {
      try {
        lock.wait();
      }
 catch (      InterruptedException e) {
        throw new HistoryException("String_Node_Str",e);
      }
    }
    SearchParser searchParser=new SearchParser();
    searchParser.loc=blockLocation.toVector();
    searchParser.actions=Arrays.asList(DataType.BLOCK_PLACE,DataType.BLOCK_FORM);
    searchParser.radius=0;
    searchParser.worlds=new String[]{blockLocation.getWorld().getName()};
    searching=true;
    HawkEyeAPI.performSearch(new HawkeyeCallback(debugger,this),searchParser,SearchDir.DESC);
    if (searching) {
      try {
        lock.wait();
      }
 catch (      InterruptedException e) {
        throw new HistoryException("String_Node_Str",e);
      }
    }
  }
  if (searchResult instanceof BlockChangeEntry) {
    BlockChangeEntry changeData=(BlockChangeEntry)searchResult;
    int to=getToField(changeData);
    debugger.printDebug(this,"String_Node_Str",to);
    return to == blockID;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public Boolean hasPlayerHistory(Location blockLocation) throws HistoryException {
  int blockID=blockLocation.getBlock().getTypeId();
synchronized (lock) {
    while (searching) {
      try {
        lock.wait();
      }
 catch (      InterruptedException e) {
        throw new HistoryException("String_Node_Str",e);
      }
    }
    SearchParser searchParser=new SearchParser();
    searchParser.loc=blockLocation.toVector();
    searchParser.actions=Arrays.asList(DataType.BLOCK_PLACE,DataType.BLOCK_FORM);
    searchParser.radius=0;
    searchParser.worlds=new String[]{blockLocation.getWorld().getName()};
    searching=true;
    HawkEyeAPI.performSearch(new HawkeyeCallback(debugger,this),searchParser,SearchDir.DESC);
    while (searching) {
      try {
        lock.wait();
      }
 catch (      InterruptedException e) {
        throw new HistoryException("String_Node_Str",e);
      }
    }
  }
  if (searchResult instanceof BlockChangeEntry) {
    BlockChangeEntry changeData=(BlockChangeEntry)searchResult;
    int to=getToField(changeData);
    debugger.printDebug(this,"String_Node_Str",to);
    return to == blockID;
  }
 else {
    return null;
  }
}
Program: 89016
Project: 89016
Buggy source:
public ExperienceInformerListener(Debugger debugger,Server server){
  this.server=server;
}

Fixed version (ground truth):
public ExperienceInformerListener(Debugger debugger,Server server){
  this.debugger=debugger;
  this.server=server;
}
Program: 89017
Project: 89017
Buggy source:
private void handleEnchantItemEvent(PlayerExpChangeEvent event){
  Player player=event.getPlayer();
  Configuration config=getConfiguration(player);
  ExperienceManager manager=new ExperienceManager(player);
  LevelingRate rate=config.getLevelingRate();
  if (rate == null) {
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str");
    return;
  }
  Integer desiredLevelUp=rate.get(player.getLevel());
  Integer defaultLevelUp=manager.getXpNeededToLevelUp(player.getLevel());
  if (desiredLevelUp != null && desiredLevelUp != defaultLevelUp) {
    double factor=(double)defaultLevelUp / (double)desiredLevelUp;
    double exact=event.getAmount() * factor;
    int oldXP=event.getAmount();
    int newXP=(int)exact;
    event.setAmount(newXP);
    if (exact > newXP) {
      manager.changeExp(exact - newXP);
    }
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",oldXP,exact,factor);
  }
}

Fixed version (ground truth):
private void handleEnchantItemEvent(PlayerExpChangeEvent event){
  Player player=event.getPlayer();
  Configuration config=getConfiguration(player);
  ExperienceManager manager=new ExperienceManager(player);
  LevelingRate rate=config.getLevelingRate();
  if (rate == null) {
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str");
    return;
  }
  Integer desiredLevelUp=rate.get(player.getLevel());
  Integer defaultLevelUp=manager.getXpNeededToLevelUp(player.getLevel());
  if (!Objects.equal(desiredLevelUp,defaultLevelUp)) {
    double factor=(double)defaultLevelUp / (double)desiredLevelUp;
    double exact=event.getAmount() * factor;
    int oldXP=event.getAmount();
    int newXP=(int)exact;
    event.setAmount(newXP);
    if (exact > newXP) {
      manager.changeExp(exact - newXP);
    }
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",oldXP,exact,factor);
  }
}
Program: 89018
Project: 89018
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDeathEvent(EntityDeathEvent event){
  LivingEntity entity=event.getEntity();
  Player killer=entity.getKiller();
  Collection<ResourceHolder> result=null;
  try {
    if (entity != null) {
      result=handleEntityDeath(event,entity,killer);
    }
    if (event instanceof PlayerDeathEvent) {
      handlePlayerDeath((PlayerDeathEvent)event,(Player)entity,result);
    }
  }
 catch (  Exception e) {
    report.reportError(debugger,this,e,event);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDeathEvent(EntityDeathEvent event){
  LivingEntity entity=event.getEntity();
  Collection<ResourceHolder> result=null;
  try {
    if (entity != null) {
      Player killer=entity.getKiller();
      result=handleEntityDeath(event,entity,killer);
    }
    if (event instanceof PlayerDeathEvent) {
      handlePlayerDeath((PlayerDeathEvent)event,(Player)entity,result);
    }
  }
 catch (  Exception e) {
    report.reportError(debugger,this,e,event);
  }
}
Program: 89019
Project: 89019
Buggy source:
public RewardEconomy(Economy economy,Debugger debugger,ItemRewardListener listener){
  if (economy == null)   throw new IllegalArgumentException("String_Node_Str");
  if (listener == null)   throw new NullArgumentException("String_Node_Str");
  this.listener=listener;
  this.economy=economy;
}

Fixed version (ground truth):
public RewardEconomy(Economy economy,Debugger debugger,ItemRewardListener listener){
  if (economy == null)   throw new IllegalArgumentException("String_Node_Str");
  if (listener == null)   throw new NullArgumentException("String_Node_Str");
  this.debugger=debugger;
  this.listener=listener;
  this.economy=economy;
}
Program: 89021
Project: 89021
Buggy source:
private VariableFunction parse(ConfigurationSection input,String key,VariableFunction defaultValue,boolean throwException) throws Exception {
  String start=key + "String_Node_Str";
  String end=key + "String_Node_Str";
  Object root=input.get(key);
  SampleRange result=null;
  if (root instanceof Double) {
    result=new SampleRange((Double)root);
  }
 else   if (root instanceof Integer) {
    result=new SampleRange((Integer)root);
  }
 else   if (root instanceof List) {
    @SuppressWarnings("String_Node_Str") List attempt=(List)root;
    try {
      if (attempt != null && attempt.size() == 2)       result=new SampleRange(tryParse(attempt.get(0)),tryParse(attempt.get(1)));
 else       if (attempt != null && attempt.size() == 1)       result=new SampleRange(tryParse(attempt.get(0)));
 else       if (!throwException)       return defaultValue;
 else       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      if (throwException)       throw e;
 else       return defaultValue;
    }
  }
 else   if (root instanceof String) {
    try {
      return textParser.parse((String)root,defaultValue);
    }
 catch (    Exception e) {
      if (throwException)       throw e;
 else       return defaultValue;
    }
  }
 else {
    if (input.contains(start) && input.contains(end)) {
      result=new SampleRange(input.getDouble(start),input.getDouble(end));
    }
 else {
      return defaultValue;
    }
  }
  return VariableFunction.fromRange(result);
}

Fixed version (ground truth):
private VariableFunction parse(ConfigurationSection input,String key,VariableFunction defaultValue,boolean throwException) throws Exception {
  String start=key + "String_Node_Str";
  String end=key + "String_Node_Str";
  Object root=input.get(key);
  SampleRange result=null;
  if (root instanceof Double) {
    result=new SampleRange((Double)root);
  }
 else   if (root instanceof Integer) {
    result=new SampleRange((Integer)root);
  }
 else   if (root instanceof List) {
    @SuppressWarnings("String_Node_Str") List attempt=(List)root;
    try {
      if (attempt != null && attempt.size() == 2)       result=new SampleRange(tryParse(attempt.get(0)),tryParse(attempt.get(1)));
 else       if (attempt != null && attempt.size() == 1)       result=new SampleRange(tryParse(attempt.get(0)));
 else       if (!throwException)       return defaultValue;
 else       throw new ParsingException("String_Node_Str");
    }
 catch (    Exception e) {
      if (throwException)       throw e;
 else       return defaultValue;
    }
  }
 else   if (root instanceof String) {
    try {
      return textParser.parse((String)root);
    }
 catch (    Exception e) {
      if (throwException)       throw e;
 else       return defaultValue;
    }
  }
 else {
    if (input.contains(start) && input.contains(end)) {
      result=new SampleRange(input.getDouble(start),input.getDouble(end));
    }
 else {
      return defaultValue;
    }
  }
  return VariableFunction.fromRange(result);
}
Program: 89022
Project: 89022
Buggy source:
@Override public PlayerTree parse(ConfigurationSection input,String sectionName) throws ParsingException {
  PlayerTree playerDeathDrop=new PlayerTree(multiplier);
  ActionParser parser=actionParser.createView(NAMED_PARAMETERS);
  if (input == null)   throw new NullArgumentException("String_Node_Str");
  if (sectionName != null) {
    input=input.getConfigurationSection(sectionName);
    if (input == null)     return playerDeathDrop;
  }
  for (  String key : input.getKeys(false)) {
    try {
      Action value=parser.parse(input,key);
      PlayerQuery query=playerParser.parse(key);
      if (value != null)       playerDeathDrop.put(query,value);
 else       throw new ParsingException("String_Node_Str");
    }
 catch (    ParsingException e) {
      if (isCollectExceptions()) {
        debugger.printWarning(this,"String_Node_Str",key,e.toString());
      }
 else {
        throw e;
      }
    }
  }
  return playerDeathDrop;
}

Fixed version (ground truth):
@Override public PlayerTree parse(ConfigurationSection input,String sectionName) throws ParsingException {
  PlayerTree playerDeathDrop=new PlayerTree(multiplier);
  ActionParser parser=actionParser.createView(NAMED_PARAMETERS);
  if (input == null)   throw new NullArgumentException("String_Node_Str");
  if (sectionName != null) {
    input=input.getConfigurationSection(sectionName);
    if (input == null)     return playerDeathDrop;
  }
  for (  String key : input.getKeys(false)) {
    try {
      Action value=parser.parse(input,key);
      PlayerQuery query=playerParser.parse(key);
      if (value != null)       playerDeathDrop.put(query,value);
 else       throw new ParsingException("String_Node_Str");
    }
 catch (    ParsingException e) {
      if (isCollectExceptions()) {
        e.printStackTrace();
        debugger.printWarning(this,"String_Node_Str",key,e.getMessage());
      }
 else {
        throw e;
      }
    }
  }
  return playerDeathDrop;
}
Program: 89023
Project: 89023
Buggy source:
public Configuration(Debugger debugger,RewardProvider provider,ChannelProvider channels){
  this.logger=debugger;
  this.rewardProvider=provider;
  this.channelProvider=channels;
  this.actionParser=new ActionParser(provider);
}

Fixed version (ground truth):
public Configuration(Debugger debugger,RewardProvider provider,ChannelProvider channels){
  this.logger=debugger;
  this.rewardProvider=provider;
  this.channelProvider=channels;
  this.actionParser=new ActionParser(provider);
  this.playerParser=new PlayerParser();
}
Program: 89025
Project: 89025
Buggy source:
private void handlePlayerDeath(PlayerDeathEvent event,Player player,Collection<ResourceHolder> dropped){
  if (Permissions.hasKeepExp(player)) {
    event.setKeepLevel(true);
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName());
  }
 else {
    int total=0;
    for (    ResourceHolder holder : dropped) {
      if (holder instanceof ExperienceHolder) {
        ExperienceHolder exp=(ExperienceHolder)holder;
        total+=exp.getAmount();
      }
    }
    subtractExperience(event,player,total);
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName(),total);
  }
}

Fixed version (ground truth):
private void handlePlayerDeath(PlayerDeathEvent event,Player player,Collection<ResourceHolder> dropped){
  event.setDroppedExp(0);
  if (Permissions.hasKeepExp(player)) {
    event.setKeepLevel(true);
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName());
  }
 else {
    int total=0;
    for (    ResourceHolder holder : dropped) {
      if (holder instanceof ExperienceHolder) {
        ExperienceHolder exp=(ExperienceHolder)holder;
        total+=exp.getAmount();
      }
    }
    subtractExperience(event,player,total);
    if (hasDebugger())     debugger.printDebug(this,"String_Node_Str",player.getName(),total);
  }
}
Program: 89027
Project: 89027
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDeathEvent(EntityDeathEvent event){
  LivingEntity entity=event.getEntity();
  Player killer=entity.getKiller();
  Collection<ResourceHolder> result=null;
  try {
    if (entity != null && isMob(entity)) {
      result=handleEntityDeath(event,entity,killer);
    }
    if (event instanceof PlayerDeathEvent) {
      handlePlayerDeath((PlayerDeathEvent)event,(Player)entity,result);
    }
  }
 catch (  Exception e) {
    report.reportError(debugger,this,e,event);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDeathEvent(EntityDeathEvent event){
  LivingEntity entity=event.getEntity();
  Player killer=entity.getKiller();
  Collection<ResourceHolder> result=null;
  try {
    if (entity != null) {
      result=handleEntityDeath(event,entity,killer);
    }
    if (event instanceof PlayerDeathEvent) {
      handlePlayerDeath((PlayerDeathEvent)event,(Player)entity,result);
    }
  }
 catch (  Exception e) {
    report.reportError(debugger,this,e,event);
  }
}
Program: 89028
Project: 89028
Buggy source:
private Action getAction(Configuration config,LivingEntity entity,Player killer){
  if (entity instanceof Player) {
    Player entityPlayer=(Player)entity;
    PlayerQuery query=PlayerQuery.fromExact(entityPlayer.getName(),playerGroups.getPlayerGroups(entityPlayer),entityPlayer.getLastDamageCause().getCause(),killer != null);
    if (config != null) {
      return config.getPlayerDeathDrop().get(query);
    }
 else {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str",entityPlayer.getName(),query);
      return null;
    }
  }
 else {
    Integer id=entity.getEntityId();
    MobQuery query=MobQuery.fromExact(entity,spawnReasonLookup.get(id),killer != null);
    if (config != null) {
      return config.getExperienceDrop().get(query);
    }
 else {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str",id,query);
      return null;
    }
  }
}

Fixed version (ground truth):
private Action getAction(Configuration config,LivingEntity entity,Player killer){
  if (entity instanceof Player) {
    Player entityPlayer=(Player)entity;
    PlayerQuery query=PlayerQuery.fromExact(entityPlayer,playerGroups.getPlayerGroups(entityPlayer),killer != null);
    if (config != null) {
      return config.getPlayerDeathDrop().get(query);
    }
 else {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str",entityPlayer.getName(),query);
      return null;
    }
  }
 else {
    Integer id=entity.getEntityId();
    MobQuery query=MobQuery.fromExact(entity,spawnReasonLookup.get(id),killer != null);
    if (config != null) {
      return config.getExperienceDrop().get(query);
    }
 else {
      if (hasDebugger())       debugger.printDebug(this,"String_Node_Str",id,query);
      return null;
    }
  }
}
Program: 89029
Project: 89029
Buggy source:
@Override public boolean match(Query other){
  if (other instanceof PlayerQuery) {
    PlayerQuery query=(PlayerQuery)other;
    return QueryMatching.matchParameter(names,query.names) && QueryMatching.matchParameter(groups,query.groups) && QueryMatching.matchParameter(deathCause,query.deathCause);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean match(Query other){
  if (other instanceof PlayerQuery) {
    PlayerQuery query=(PlayerQuery)other;
    return QueryMatching.matchParameter(names,query.names) && QueryMatching.matchParameter(groups,query.groups) && QueryMatching.matchParameter(deathCause,query.deathCause)&& QueryMatching.matchParameter(murder,query.murder);
  }
  return false;
}
Program: 89030
Project: 89030
Buggy source:
@Test public void testExample() throws ParsingException {
  Debugger debugger=new MockDebugger();
  RewardProvider provider=new RewardProvider();
  provider.register(new RewardExperience());
  Configuration test=ConfigurationTest.createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str",debugger,provider);
  PlayerTree tree=test.getPlayerDeathDrop();
  PlayerQuery aadnkQuery=PlayerQuery.fromExact("String_Node_Str","String_Node_Str");
  PlayerQuery vipQuery=PlayerQuery.fromExact("String_Node_Str","String_Node_Str");
  Action aadnkAction=new Action();
  aadnkAction.addReward("String_Node_Str",new ExperienceFactory(10));
  aadnkAction.setId(0);
  Action vipAction=new Action();
  vipAction.addReward("String_Node_Str",new ExperienceFactory(500));
  vipAction.setId(1);
  assertEquals(aadnkAction,tree.get(aadnkQuery));
  assertEquals(vipAction,tree.get(vipQuery));
}

Fixed version (ground truth):
@Test public void testExample() throws ParsingException {
  Debugger debugger=new MockDebugger();
  RewardProvider provider=new RewardProvider();
  provider.register(new RewardExperience());
  Configuration test=ConfigurationTest.createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str",debugger,provider);
  PlayerTree tree=test.getPlayerDeathDrop();
  PlayerQuery aadnkQuery=PlayerQuery.fromExact("String_Node_Str",new String[]{"String_Node_Str"},DamageCause.ENTITY_ATTACK,true);
  PlayerQuery vipQuery=PlayerQuery.fromExact("String_Node_Str","String_Node_Str");
  Action aadnkAction=new Action();
  aadnkAction.addReward("String_Node_Str",new ExperienceFactory(10));
  aadnkAction.setId(0);
  Action vipAction=new Action();
  vipAction.addReward("String_Node_Str",new ExperienceFactory(500));
  vipAction.setId(1);
  assertEquals(aadnkAction,tree.get(aadnkQuery));
  assertEquals(vipAction,tree.get(vipQuery));
}
Program: 89032
Project: 89032
Buggy source:
private void setExp(double base,double amt){
  int xp=(int)(base + amt);
  if (xp < 0)   xp=0;
  Player player=getPlayer();
  int curLvl=player.getLevel();
  int newLvl=getLevelForExp(xp);
  if (curLvl != newLvl) {
    player.setLevel(newLvl);
    player.setTotalExperience(player.getTotalExperience() + xpRequiredForNextLevel[curLvl]);
  }
  double pct=(base - getXpForLevel(newLvl) + amt) / (double)(xpRequiredForNextLevel[newLvl]);
  player.setExp((float)pct);
}

Fixed version (ground truth):
private void setExp(double base,double amt){
  int xp=(int)(base + amt);
  if (xp < 0)   xp=0;
  Player player=getPlayer();
  int curLvl=player.getLevel();
  int newLvl=getLevelForExp(xp);
  if (curLvl != newLvl) {
    player.setLevel(newLvl);
  }
  if (xp > base) {
    player.setTotalExperience(player.getTotalExperience() + xp - (int)base);
  }
  double pct=(base - getXpForLevel(newLvl) + amt) / (double)(xpRequiredForNextLevel[newLvl]);
  player.setExp((float)pct);
}
Program: 89033
Project: 89033
Buggy source:
public RewardEconomy(Economy economy,Debugger debugger,ItemRewardListener listener){
  if (economy == null)   throw new IllegalArgumentException("String_Node_Str");
  if (debugger == null)   throw new NullArgumentException("String_Node_Str");
  if (listener == null)   throw new NullArgumentException("String_Node_Str");
  this.listener=listener;
  this.economy=economy;
}

Fixed version (ground truth):
public RewardEconomy(Economy economy,Debugger debugger,ItemRewardListener listener){
  if (economy == null)   throw new IllegalArgumentException("String_Node_Str");
  if (listener == null)   throw new NullArgumentException("String_Node_Str");
  this.listener=listener;
  this.economy=economy;
}
Program: 89034
Project: 89034
Buggy source:
private static int getExpToLevel(final int level){
  return 17 + Math.max(3 * (level - 16),0);
}

Fixed version (ground truth):
private static int getExpToLevel(final int level){
  return 17 + Math.max(3 * (level - 15),0);
}
Program: 89035
Project: 89035
Buggy source:
private SyncMessageDelayer(String p,String[] msgs){
  this.p=p;
  this.msgs=msgs;
}

Fixed version (ground truth):
private SyncMessageDelayer(String player,String prefix,List<String> list){
  this.player=player;
  this.prefix=prefix;
  this.msgs=list;
}
Program: 89037
Project: 89037
Buggy source:
public PotionQuery(ItemQuery query){
  if (!query.match(Material.POTION))   throw new IllegalArgumentException("String_Node_Str");
  if (!query.hasDurability())   throw new IllegalArgumentException("String_Node_Str");
  List<Potion> potions=new ArrayList<Potion>();
  for (  Integer durability : query.getDurability()) {
    potions.add(Potion.fromDamage(durability));
  }
  loadFromPotions(potions);
}

Fixed version (ground truth):
public PotionQuery(ItemQuery query){
  if (!query.match(Material.POTION))   throw new IllegalArgumentException("String_Node_Str");
  if (!query.hasDurability())   throw new IllegalArgumentException("String_Node_Str");
  reset();
  for (  Integer durability : query.getDurability()) {
    if (durability == 0) {
      type.add(PotionType.WATER);
    }
 else {
      addPotion(Potion.fromDamage(durability));
    }
  }
}
Program: 89039
Project: 89039
Buggy source:
/** 
 * Reloads (if reload is TRUE) configurations. There's no need to call this after adding reward providers.
 * @param reload - if TRUE; reload configuration.
 * @throws IOException An I/O error occurred.
 */
public void loadDefaults(boolean reload) throws IOException {
  if (reload || presets == null) {
    informer.clearMessages();
    configLoader.clearCache();
    globalSettings=new GlobalSettings(this);
    globalSettings.loadFromConfig(loadConfig("String_Node_Str","String_Node_Str"));
    YamlConfiguration presetList=loadConfig("String_Node_Str","String_Node_Str");
    loadConfig("String_Node_Str","String_Node_Str");
    presets=new Presets(presetList,this,chat,configLoader);
    setPresets(presets);
    if (chat == null && presets.usesPresetParameters()) {
      printWarning(this,"String_Node_Str");
    }
 else {
      checkIllegalPresets();
    }
  }
}

Fixed version (ground truth):
/** 
 * Reloads (if reload is TRUE) configurations. There's no need to call this after adding reward providers.
 * @param reload - if TRUE; reload configuration.
 * @throws IOException An I/O error occurred.
 */
public void loadDefaults(boolean reload) throws IOException {
  if (reload || presets == null) {
    informer.clearMessages();
    configLoader.clearCache();
    globalSettings=new GlobalSettings(this);
    globalSettings.loadFromConfig(loadConfig("String_Node_Str","String_Node_Str"));
    Permissions.setGlobalSettings(globalSettings);
    YamlConfiguration presetList=loadConfig("String_Node_Str","String_Node_Str");
    loadConfig("String_Node_Str","String_Node_Str");
    presets=new Presets(presetList,this,chat,configLoader);
    setPresets(presets);
    if (chat == null && presets.usesPresetParameters()) {
      printWarning(this,"String_Node_Str");
    }
 else {
      checkIllegalPresets();
    }
  }
}
Program: 89040
Project: 89040
Buggy source:
public static boolean hasRewardCrafting(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_CRAFTING);
}

Fixed version (ground truth):
public static boolean hasRewardCrafting(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_CRAFTING);
}
Program: 89041
Project: 89041
Buggy source:
public static boolean hasKeepExp(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(KEEP_EXP);
}

Fixed version (ground truth):
public static boolean hasKeepExp(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(KEEP_EXP);
}
Program: 89042
Project: 89042
Buggy source:
public static boolean hasRewardBrewing(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_BREWING);
}

Fixed version (ground truth):
public static boolean hasRewardBrewing(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_BREWING);
}
Program: 89043
Project: 89043
Buggy source:
public static boolean hasRewardFishing(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_FISHING);
}

Fixed version (ground truth):
public static boolean hasRewardFishing(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_FISHING);
}
Program: 89044
Project: 89044
Buggy source:
public static boolean hasRewardBlock(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_BLOCK);
}

Fixed version (ground truth):
public static boolean hasRewardBlock(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_BLOCK);
}
Program: 89045
Project: 89045
Buggy source:
public static boolean hasMaxEnchant(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(MAX_ENCHANT);
}

Fixed version (ground truth):
public static boolean hasMaxEnchant(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(MAX_ENCHANT);
}
Program: 89046
Project: 89046
Buggy source:
public static boolean hasRewardSmelting(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_SMELTING);
}

Fixed version (ground truth):
public static boolean hasRewardSmelting(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_SMELTING);
}
Program: 89047
Project: 89047
Buggy source:
public static boolean hasRewardPlacing(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_PLACING);
}

Fixed version (ground truth):
public static boolean hasRewardPlacing(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_PLACING);
}
Program: 89048
Project: 89048
Buggy source:
public static boolean hasUntouchable(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(UNOUCHABLE);
}

Fixed version (ground truth):
public static boolean hasUntouchable(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(UNOUCHABLE);
}
Program: 89049
Project: 89049
Buggy source:
public static boolean hasRewardBonus(Player player){
  return !globakSettings.isUsePermissions() || player.hasPermission(REWARDS_BONUS);
}

Fixed version (ground truth):
public static boolean hasRewardBonus(Player player){
  return !globalSettings.isUsePermissions() || player.hasPermission(REWARDS_BONUS);
}
Program: 89050
Project: 89050
Buggy source:
@Override public MobMatcher parse(String text) throws ParsingException {
  if (Utility.isNullOrIgnoreable(text))   throw new ParsingException("String_Node_Str");
  Category possibleCategory=MobMatcher.Category.fromName(text);
  EntityType type=EntityType.fromName(text);
  if (possibleCategory == null) {
    if (type == null) {
      throw ParsingException.fromFormat("String_Node_Str",text);
    }
 else     if (type != null) {
      if (!type.isAlive())       throw ParsingException.fromFormat("String_Node_Str",text);
    }
  }
 else {
    if (possibleCategory == Category.SPECIFIC)     throw ParsingException.fromFormat("String_Node_Str");
  }
  if (possibleCategory != null)   return new MobMatcher(possibleCategory);
 else   return new MobMatcher(type);
}

Fixed version (ground truth):
@Override public MobMatcher parse(String text) throws ParsingException {
  if (Utility.isNullOrIgnoreable(text))   throw new ParsingException("String_Node_Str");
  Category possibleCategory=MobMatcher.Category.fromName(text);
  Integer mobID=tryParse(text);
  String enumName=Utility.getEnumName(text);
  EntityType type=EntityType.valueOf(enumName);
  if (type == null && possibleCategory == null) {
    if (mobID != null) {
      type=EntityType.fromId(mobID);
      if (type == null)       throw ParsingException.fromFormat("String_Node_Str",mobID);
    }
 else {
      type=EntityType.fromName(text);
    }
  }
  if (possibleCategory == null) {
    if (type == null) {
      throw ParsingException.fromFormat("String_Node_Str",text);
    }
 else     if (type != null) {
      if (!type.isAlive())       throw ParsingException.fromFormat("String_Node_Str",text);
    }
  }
 else {
    if (possibleCategory == Category.SPECIFIC)     throw ParsingException.fromFormat("String_Node_Str");
  }
  if (possibleCategory != null)   return new MobMatcher(possibleCategory);
 else   return new MobMatcher(type);
}
Program: 89051
Project: 89051
Buggy source:
@Test public void testMerging(){
  Debugger debugger=new MockDebugger();
  RewardProvider provider=new RewardProvider();
  provider.register(new MockRewardable(RewardTypes.EXPERIENCE));
  provider.register(new MockRewardable(RewardTypes.VIRTUAL));
  provider.register(new MockRewardable(RewardTypes.ECONOMY));
  provider.setDefaultReward(RewardTypes.EXPERIENCE);
  String def="String_Node_Str";
  ActionParser.setCurrentID(0);
  Configuration first=createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",debugger,provider);
  Configuration second=createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str",debugger,provider);
  Configuration result=Configuration.fromMultiple(Lists.newArrayList(first,second),debugger);
  MobQuery queryBlace=MobQuery.fromAny(EntityType.BLAZE,DamageCause.ENTITY_ATTACK);
  MobQuery queryZombie=MobQuery.fromAny(EntityType.ZOMBIE,DamageCause.ENTITY_ATTACK);
  Action blaceAction=new Action();
  blaceAction.addReward(def,new Range(5));
  blaceAction.addReward("String_Node_Str",new Range(1));
  blaceAction.setMessage(new Message("String_Node_Str","String_Node_Str","String_Node_Str"));
  Action zombieAction=new Action(def,new Range(0));
  zombieAction.setId(1);
  assertEquals(blaceAction,result.getExperienceDrop().get(queryBlace));
  assertEquals(zombieAction,result.getExperienceDrop().get(queryZombie));
}

Fixed version (ground truth):
@Test public void testMerging(){
  Debugger debugger=new MockDebugger();
  RewardProvider provider=new RewardProvider();
  provider.register(new MockRewardable(RewardTypes.EXPERIENCE));
  provider.register(new MockRewardable(RewardTypes.VIRTUAL));
  provider.register(new MockRewardable(RewardTypes.ECONOMY));
  provider.setDefaultReward(RewardTypes.EXPERIENCE);
  String def="String_Node_Str";
  ActionParser.setCurrentID(0);
  Configuration first=createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",debugger,provider);
  Configuration second=createConfig("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",debugger,provider);
  Configuration result=Configuration.fromMultiple(Lists.newArrayList(first,second),debugger);
  MobQuery queryBlace=MobQuery.fromAny(EntityType.BLAZE,DamageCause.ENTITY_ATTACK);
  MobQuery queryZombie=MobQuery.fromAny(EntityType.ZOMBIE,DamageCause.ENTITY_ATTACK);
  Action blaceAction=new Action();
  blaceAction.addReward(def,new Range(5));
  blaceAction.addReward("String_Node_Str",new Range(1));
  blaceAction.setMessage(new Message("String_Node_Str","String_Node_Str","String_Node_Str"));
  Action zombieAction=new Action(def,new Range(0));
  zombieAction.setId(1);
  assertEquals(blaceAction,result.getExperienceDrop().get(queryBlace));
  assertEquals(zombieAction,result.getExperienceDrop().get(queryZombie));
}
Program: 89053
Project: 89053
Buggy source:
private void loadItemActions(ConfigurationSection config){
  if (config == null)   return;
  for (  String key : config.getKeys(false)) {
    try {
      Query item=itemParser.parse(key);
      ConfigurationSection itemSection=config.getConfigurationSection(key);
      Types queryType=item.getQueryType();
      for (      String action : itemSection.getKeys(false)) {
        Integer type=actionTypes.getType(action);
        if (type == null) {
          if (action.equalsIgnoreCase("String_Node_Str") || action.equalsIgnoreCase("String_Node_Str")) {
            logger.printWarning(this,"String_Node_Str");
          }
 else {
            logger.printWarning(this,"String_Node_Str",action,key);
          }
          break;
        }
switch (queryType) {
case Items:
          loadActionOnItem(itemSection,action,item,getActionReward(type),queryType);
case Potions:
        loadActionOnItem(itemSection,action,item,getComplexReward(type),queryType);
    }
  }
}
 catch (ParsingException ex) {
  logger.printWarning(this,"String_Node_Str",key,ex.getMessage());
}
}
}

Fixed version (ground truth):
private void loadItemActions(ConfigurationSection config){
  if (config == null)   return;
  for (  String key : config.getKeys(false)) {
    try {
      Query item=itemParser.parse(key);
      ConfigurationSection itemSection=config.getConfigurationSection(key);
      Types queryType=item.getQueryType();
      for (      String action : itemSection.getKeys(false)) {
        Integer type=actionTypes.getType(action);
        if (type == null) {
          if (action.equalsIgnoreCase("String_Node_Str") || action.equalsIgnoreCase("String_Node_Str")) {
            logger.printWarning(this,"String_Node_Str");
          }
 else {
            logger.printWarning(this,"String_Node_Str",action,key);
          }
          break;
        }
switch (queryType) {
case Items:
          loadActionOnItem(itemSection,action,item,getActionReward(type),queryType);
        break;
case Potions:
      loadActionOnItem(itemSection,action,item,getComplexReward(type),queryType);
    break;
}
}
}
 catch (ParsingException ex) {
logger.printWarning(this,"String_Node_Str",key,ex.getMessage());
}
}
}
Program: 89054
Project: 89054
Buggy source:
public static boolean hasMaxEnchant(Player player){
  return player.hasPermission(permissionMaxEnchant);
}

Fixed version (ground truth):
public static boolean hasMaxEnchant(Player player){
  return player.hasPermission(MAX_ENCHANT);
}
Program: 89055
Project: 89055
Buggy source:
public static boolean hasRewardSmelting(Player player){
  return player.hasPermission(permissionRewardSmelting);
}

Fixed version (ground truth):
public static boolean hasRewardSmelting(Player player){
  return player.hasPermission(REWARDS_SMELTING);
}
Program: 89056
Project: 89056
Buggy source:
public static boolean hasRewardPlacing(Player player){
  return player.hasPermission(permissionRewardPlacing);
}

Fixed version (ground truth):
public static boolean hasRewardPlacing(Player player){
  return player.hasPermission(REWARDS_PLACING);
}
Program: 89057
Project: 89057
Buggy source:
public static boolean hasRewardCrafting(Player player){
  return player.hasPermission(permissionRewardCrafting);
}

Fixed version (ground truth):
public static boolean hasRewardCrafting(Player player){
  return player.hasPermission(REWARDS_CRAFTING);
}
Program: 89058
Project: 89058
Buggy source:
public static boolean hasKeepExp(Player player){
  return player.hasPermission(permissionKeepExp);
}

Fixed version (ground truth):
public static boolean hasKeepExp(Player player){
  return player.hasPermission(KEEP_EXP);
}
Program: 89059
Project: 89059
Buggy source:
public static boolean hasRewardBrewing(Player player){
  return player.hasPermission(permissionRewardBrewing);
}

Fixed version (ground truth):
public static boolean hasRewardBrewing(Player player){
  return player.hasPermission(REWARDS_BREWING);
}
Program: 89060
Project: 89060
Buggy source:
public static boolean hasUntouchable(Player player){
  return player.hasPermission(permissionUntouchable);
}

Fixed version (ground truth):
public static boolean hasUntouchable(Player player){
  return player.hasPermission(UNOUCHABLE);
}
Program: 89061
Project: 89061
Buggy source:
public static boolean hasRewardFishing(Player player){
  return player.hasPermission(permissionRewardFishing);
}

Fixed version (ground truth):
public static boolean hasRewardFishing(Player player){
  return player.hasPermission(REWARDS_FISHING);
}
Program: 89062
Project: 89062
Buggy source:
public static boolean hasRewardBonus(Player player){
  return player.hasPermission(permissionRewardBonus);
}

Fixed version (ground truth):
public static boolean hasRewardBonus(Player player){
  return player.hasPermission(REWARDS_BONUS);
}