nus-yam/ex-repair huggingface dataset:
Program: 43919
Project: 43919
Buggy source:
private void addOtherSettingsIfNecessary(SettingsHelper helper,String version){
  Settings temp=new Settings();
  if (helper.getProperty(debug) == null) {
    helper.setProperty(debug,Boolean.toString(temp.isDebugEnabled()));
  }
  if (helper.getProperty(tagDuration) == null) {
    helper.setProperty(tagDuration,String.valueOf(temp.getTagDuration()));
  }
  if (helper.getProperty(instaKill) == null) {
    helper.setProperty(instaKill,Boolean.toString(temp.isInstaKill()));
  }
  if (helper.getProperty(SettingsLoader.version) == null || !isLatestVersion(helper,version)) {
    helper.setProperty(SettingsLoader.version,version);
  }
  if (helper.getProperty(disabledWorlds) == null) {
    helper.setProperty("String_Node_Str","String_Node_Str");
  }
  if (helper.getProperty(disabledCommands) == null) {
    helper.setProperty("String_Node_Str","String_Node_Str");
  }
  if (helper.getProperty(npcName) == null) {
    helper.setProperty(npcName,temp.getNpcName());
  }
  if (helper.getProperty(blockEditWhileTagged) == null) {
    helper.setProperty(blockEditWhileTagged,Boolean.toString(temp.isBlockEditWhileTagged()));
  }
  if (helper.getProperty(sendMessageWhenTagged) == null) {
    helper.setProperty(sendMessageWhenTagged,Boolean.toString(temp.isSendMessageWhenTagged()));
  }
}

Fixed version (ground truth):
private void addOtherSettingsIfNecessary(SettingsHelper helper,String version){
  Settings temp=new Settings();
  if (helper.getProperty(debug) == null) {
    helper.setProperty(debug,Boolean.toString(temp.isDebugEnabled()));
  }
  if (helper.getProperty(tagDuration) == null) {
    helper.setProperty(tagDuration,String.valueOf(temp.getTagDuration()));
  }
  if (helper.getProperty(instaKill) == null) {
    helper.setProperty(instaKill,Boolean.toString(temp.isInstaKill()));
  }
  if (helper.getProperty(SettingsLoader.version) == null || !isLatestVersion(helper,version)) {
    helper.setProperty(SettingsLoader.version,version);
  }
  if (helper.getProperty(disabledWorlds) == null) {
    helper.setProperty("String_Node_Str","String_Node_Str");
  }
  if (helper.getProperty(disabledCommands) == null) {
    helper.setProperty("String_Node_Str","String_Node_Str");
  }
  if (helper.getProperty(npcName) == null) {
    helper.setProperty(npcName,temp.getNpcName());
  }
  if (helper.getProperty(blockEditWhileTagged) == null) {
    helper.setProperty(blockEditWhileTagged,Boolean.toString(temp.isBlockEditWhileTagged()));
  }
  if (helper.getProperty(sendMessageWhenTagged) == null) {
    helper.setProperty(sendMessageWhenTagged,Boolean.toString(temp.isSendMessageWhenTagged()));
  }
  if (helper.getProperty(npcDespawnTime) == null) {
    helper.setProperty(npcDespawnTime,String.valueOf(temp.getNpcDespawnTime()));
  }
}
Program: 43920
Project: 43920
Buggy source:
private boolean hasValidProperties(SettingsHelper helper){
  if ((helper.getProperty(version) != null) && (helper.getProperty(tagDuration) != null) && (helper.getProperty(debug) != null)&& (helper.getProperty(instaKill) != null)&& (helper.getProperty(disabledCommands) != null)&& (helper.getProperty(disabledWorlds) != null)&& (helper.getProperty(npcName) != null)&& (helper.getProperty(blockEditWhileTagged) != null)&& (helper.getProperty(sendMessageWhenTagged) != null)) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean hasValidProperties(SettingsHelper helper){
  if ((helper.getProperty(version) != null) && (helper.getProperty(tagDuration) != null) && (helper.getProperty(debug) != null)&& (helper.getProperty(instaKill) != null)&& (helper.getProperty(disabledCommands) != null)&& (helper.getProperty(disabledWorlds) != null)&& (helper.getProperty(npcName) != null)&& (helper.getProperty(blockEditWhileTagged) != null)&& (helper.getProperty(sendMessageWhenTagged) != null)&& (helper.getProperty(npcDespawnTime) != null)) {
    return true;
  }
 else {
    return false;
  }
}
Program: 43921
Project: 43921
Buggy source:
private void loadProperties(SettingsHelper helper){
  settings.setDebugEnabled(Boolean.valueOf(helper.getProperty(debug)));
  settings.setTagDuration(Integer.valueOf(helper.getProperty(tagDuration)));
  settings.setBlockEditWhileTagged(Boolean.valueOf(helper.getProperty(blockEditWhileTagged)));
  settings.setInstaKill(Boolean.valueOf(helper.getProperty(instaKill)));
  settings.setSendMessageWhenTagged(Boolean.valueOf(helper.getProperty(sendMessageWhenTagged)));
  settings.setNpcName(String.valueOf(helper.getProperty(npcName)));
  String disabledCommandsString=helper.getProperty(disabledCommands).replace("String_Node_Str","String_Node_Str");
  disabledCommandsString=disabledCommandsString.replace("String_Node_Str","String_Node_Str");
  String disabledCmds[]=disabledCommandsString.split("String_Node_Str");
  if (disabledCmds.length == 1 && disabledCmds[0].equals("String_Node_Str")) {
    settings.setDisabledCommands(new String[0]);
  }
 else {
    settings.setDisabledCommands(disabledCmds);
  }
  String disabledWorldsString=helper.getProperty(disabledWorlds).replace("String_Node_Str","String_Node_Str");
  disabledWorldsString=disabledWorldsString.replace("String_Node_Str","String_Node_Str");
  settings.setDisallowedWorlds(disabledWorldsString.split("String_Node_Str"));
}

Fixed version (ground truth):
private void loadProperties(SettingsHelper helper){
  settings.setDebugEnabled(Boolean.valueOf(helper.getProperty(debug)));
  settings.setTagDuration(Integer.valueOf(helper.getProperty(tagDuration)));
  settings.setNpcDespawnTime(Integer.valueOf(helper.getProperty(npcDespawnTime)));
  settings.setBlockEditWhileTagged(Boolean.valueOf(helper.getProperty(blockEditWhileTagged)));
  settings.setInstaKill(Boolean.valueOf(helper.getProperty(instaKill)));
  settings.setSendMessageWhenTagged(Boolean.valueOf(helper.getProperty(sendMessageWhenTagged)));
  settings.setNpcName(String.valueOf(helper.getProperty(npcName)));
  String disabledCommandsString=helper.getProperty(disabledCommands).replace("String_Node_Str","String_Node_Str");
  disabledCommandsString=disabledCommandsString.replace("String_Node_Str","String_Node_Str");
  String disabledCmds[]=disabledCommandsString.split("String_Node_Str");
  if (disabledCmds.length == 1 && disabledCmds[0].equals("String_Node_Str")) {
    settings.setDisabledCommands(new String[0]);
  }
 else {
    settings.setDisabledCommands(disabledCmds);
  }
  String disabledWorldsString=helper.getProperty(disabledWorlds).replace("String_Node_Str","String_Node_Str");
  disabledWorldsString=disabledWorldsString.replace("String_Node_Str","String_Node_Str");
  settings.setDisallowedWorlds(disabledWorldsString.split("String_Node_Str"));
}
Program: 43922
Project: 43922
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onEntityDeath(EntityDeathEvent event){
  if (plugin.npcm.isNPC(event.getEntity())) {
    onNPCDeath(event);
  }
 else   if (event.getEntity() instanceof Player) {
    Player deadPlayer=(Player)event.getEntity();
    onPlayerDeath(deadPlayer);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onEntityDeath(EntityDeathEvent event){
  if (plugin.npcm.isNPC(event.getEntity())) {
    onNPCDeath(event.getEntity());
  }
 else   if (event.getEntity() instanceof Player) {
    Player deadPlayer=(Player)event.getEntity();
    onPlayerDeath(deadPlayer);
  }
}
Program: 43923
Project: 43923
Buggy source:
private void onNPCDeath(EntityDeathEvent event){
  if (plugin.hasDataContainer(plugin.getPlayerName(event.getEntity()))) {
    plugin.killPlayerEmptyInventory(plugin.getPlayerData(plugin.getPlayerName(event.getEntity())));
  }
}

Fixed version (ground truth):
public void onNPCDeath(String plrName){
  if (plugin.hasDataContainer(plrName)) {
    plugin.killPlayerEmptyInventory(plugin.getPlayerData(plrName));
  }
}
Program: 43925
Project: 43925
Buggy source:
private void onPlayerQuitTimedMode(Player quitPlr){
  if (plugin.hasDataContainer(quitPlr.getName())) {
    PlayerDataContainer quitDataContainer=plugin.getPlayerData(quitPlr.getName());
    if (!quitDataContainer.hasPVPtagExpired()) {
      quitDataContainer.setHealth(quitPlr.getHealth());
      quitDataContainer.setPlayerArmor(quitPlr.getInventory().getArmorContents());
      quitDataContainer.setPlayerInventory(quitPlr.getInventory().getContents());
      quitDataContainer.setExp(quitPlr.getExp());
      plugin.scheduleDelayedKill(quitPlr.getName());
    }
  }
}

Fixed version (ground truth):
private void onPlayerQuitTimedMode(Player quitPlr){
  if (plugin.hasDataContainer(quitPlr.getName())) {
    PlayerDataContainer quitDataContainer=plugin.getPlayerData(quitPlr.getName());
    if (!quitDataContainer.hasPVPtagExpired()) {
      if (plugin.isDebugEnabled()) {
        plugin.log.info("String_Node_Str");
      }
      if (plugin.settings.isInstaKill()) {
        quitPlr.setHealth(0);
        plugin.removeDataContainer(quitPlr.getName());
      }
 else {
        final NPC npc=plugin.spawnNpc(quitPlr.getName(),quitPlr.getLocation());
        if (npc.getBukkitEntity() instanceof Player) {
          Player npcPlayer=(Player)npc.getBukkitEntity();
          plugin.copyContentsNpc(npc,quitPlr);
          String plrName=quitPlr.getName();
          plugin.npcm.rename(plrName,plugin.getNpcName(plrName));
          npcPlayer.setHealth(quitPlr.getHealth());
          quitDataContainer.setSpawnedNPC(true);
          quitDataContainer.setNPCId(quitPlr.getName());
          quitDataContainer.setShouldBePunished(true);
          quitPlr.getWorld().createExplosion(quitPlr.getLocation(),explosionDamage);
          plugin.scheduleDelayedKill(quitPlr,npc);
        }
      }
    }
  }
}
Program: 43926
Project: 43926
Buggy source:
private void onPlayerJoinTimedMode(Player joinedPlr){
}

Fixed version (ground truth):
private void onPlayerJoinTimedMode(Player loginPlayer){
  if (plugin.hasDataContainer(loginPlayer.getName())) {
    PlayerDataContainer loginDataContainer=plugin.getPlayerData(loginPlayer.getName());
    if (loginDataContainer.hasSpawnedNPC()) {
      if (plugin.isDebugEnabled()) {
        plugin.log.info("String_Node_Str");
      }
      plugin.despawnNPC(loginDataContainer);
    }
    if (plugin.isDebugEnabled()) {
      plugin.log.info("String_Node_Str" + loginDataContainer.getPlayerName() + "String_Node_Str");
    }
    if (loginDataContainer.shouldBePunished()) {
      if (plugin.isDebugEnabled()) {
        plugin.log.info("String_Node_Str");
      }
      loginPlayer.setExp(loginDataContainer.getExp());
      loginPlayer.getInventory().setArmorContents(loginDataContainer.getPlayerArmor());
      loginPlayer.getInventory().setContents(loginDataContainer.getPlayerInventory());
      loginPlayer.setHealth(loginDataContainer.getHealth());
      assert(loginPlayer.getHealth() == loginDataContainer.getHealth());
      loginPlayer.setLastDamageCause(new EntityDamageEvent(loginPlayer,DamageCause.ENTITY_EXPLOSION,0));
    }
    plugin.removeDataContainer(loginPlayer.getName());
    plugin.createPlayerData(loginPlayer.getName()).setPvPTimeout(plugin.getTagDuration());
  }
}
Program: 43927
Project: 43927
Buggy source:
@EventHandler public void onPlayerQuit(PlayerQuitEvent e){
  Player quitPlr=e.getPlayer();
  if (plugin.settings.getCurrentMode() == Settings.SettingsType.NPC) {
    onPlayerQuitNPCMode(quitPlr);
  }
 else   if (plugin.settings.getCurrentMode() == Settings.SettingsType.TIMED) {
    onPlayerQuitTimedMode(quitPlr);
  }
}

Fixed version (ground truth):
@EventHandler public void onPlayerQuit(PlayerQuitEvent e){
  Player quitPlr=e.getPlayer();
  if (plugin.settings.getNpcDespawnTime() == -1) {
    onPlayerQuitNPCMode(quitPlr);
  }
 else   if (plugin.settings.getNpcDespawnTime() > 0) {
    onPlayerQuitTimedMode(quitPlr);
  }
}
Program: 43928
Project: 43928
Buggy source:
private void onPlayerQuitNPCMode(Player quitPlr){
  if (plugin.hasDataContainer(quitPlr.getName())) {
    PlayerDataContainer quitDataContainer=plugin.getPlayerData(quitPlr.getName());
    if (!quitDataContainer.hasPVPtagExpired()) {
      if (plugin.isDebugEnabled()) {
        plugin.log.info("String_Node_Str");
      }
      if (plugin.settings.isInstaKill()) {
        quitPlr.setHealth(0);
        plugin.removeDataContainer(quitPlr.getName());
      }
 else {
        NPC npc=plugin.spawnNpc(quitPlr.getName(),quitPlr.getLocation());
        if (npc.getBukkitEntity() instanceof Player) {
          Player npcPlayer=(Player)npc.getBukkitEntity();
          plugin.copyContentsNpc(npc,quitPlr);
          String plrName=quitPlr.getName();
          plugin.npcm.rename(plrName,plugin.getNpcName(plrName));
          npcPlayer.setHealth(quitPlr.getHealth());
          quitDataContainer.setSpawnedNPC(true);
          quitDataContainer.setNPCId(quitPlr.getName());
          quitDataContainer.setShouldBePunished(true);
          quitPlr.getWorld().createExplosion(quitPlr.getLocation(),explosionDamage);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void onPlayerQuitNPCMode(final Player quitPlr){
  if (plugin.hasDataContainer(quitPlr.getName())) {
    PlayerDataContainer quitDataContainer=plugin.getPlayerData(quitPlr.getName());
    if (!quitDataContainer.hasPVPtagExpired()) {
      if (plugin.isDebugEnabled()) {
        plugin.log.info("String_Node_Str");
      }
      if (plugin.settings.isInstaKill()) {
        quitPlr.setHealth(0);
        plugin.removeDataContainer(quitPlr.getName());
      }
 else {
        final NPC npc=plugin.spawnNpc(quitPlr.getName(),quitPlr.getLocation());
        if (npc.getBukkitEntity() instanceof Player) {
          Player npcPlayer=(Player)npc.getBukkitEntity();
          plugin.copyContentsNpc(npc,quitPlr);
          String plrName=quitPlr.getName();
          plugin.npcm.rename(plrName,plugin.getNpcName(plrName));
          npcPlayer.setHealth(quitPlr.getHealth());
          quitDataContainer.setSpawnedNPC(true);
          quitDataContainer.setNPCId(quitPlr.getName());
          quitDataContainer.setShouldBePunished(true);
          quitPlr.getWorld().createExplosion(quitPlr.getLocation(),explosionDamage);
        }
      }
    }
  }
}
Program: 43929
Project: 43929
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST) public void onPlayerJoin(PlayerJoinEvent e){
  Player loginPlayer=e.getPlayer();
  if (plugin.settings.getCurrentMode() == Settings.SettingsType.NPC) {
    onPlayerJoinNPCMode(loginPlayer);
  }
 else   if (plugin.settings.getCurrentMode() == Settings.SettingsType.TIMED) {
    onPlayerJoinTimedMode(loginPlayer);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST) public void onPlayerJoin(PlayerJoinEvent e){
  Player loginPlayer=e.getPlayer();
  if (plugin.settings.getNpcDespawnTime() == -1) {
    onPlayerJoinNPCMode(loginPlayer);
  }
 else   if (plugin.settings.getNpcDespawnTime() > 0) {
    onPlayerJoinTimedMode(loginPlayer);
  }
 else {
    plugin.log.info("String_Node_Str");
  }
}
Program: 43930
Project: 43930
Buggy source:
public Settings(){
  currentMode=SettingsType.NPC;
  instaKill=false;
  tagDuration=10;
  debugEnabled=false;
  disabledCommands=new String[0];
  disallowedWorlds=new String[0];
  npcName="String_Node_Str";
  blockEditWhileTagged=true;
  sendMessageWhenTagged=false;
}

Fixed version (ground truth):
public Settings(){
  currentMode=SettingsType.NPC;
  instaKill=false;
  tagDuration=10;
  debugEnabled=false;
  disabledCommands=new String[0];
  disallowedWorlds=new String[0];
  npcName="String_Node_Str";
  blockEditWhileTagged=true;
  sendMessageWhenTagged=false;
  npcDespawnTime=-1;
}
Program: 43932
Project: 43932
Buggy source:
public void dropitemsandclearPCCitems(String Winner,String Loser){
  PlayerCombatClass PCCLoser=getPCC(Loser);
  PlayerCombatClass PCCWinner=getPCC(Winner);
  if (isPlrOnline(PCCWinner.getPlayerName())) {
    Player PlrWinner=getServer().getPlayer(PCCWinner.getPlayerName());
    sendMessageWinner(PlrWinner,PCCLoser.getPlayerName());
    if (getPenalty().equals("String_Node_Str")) {
      logit("String_Node_Str" + Loser + "String_Node_Str"+ Winner+ "String_Node_Str");
      for (int i=0; PCCLoser.getItems().size() > i; i++) {
        PlrWinner.getWorld().dropItemNaturally(PlrWinner.getLocation(),PCCLoser.getItems().get(i));
      }
    }
  }
 else {
    logit("String_Node_Str");
  }
  PCCLoser.clearItems();
  return;
}

Fixed version (ground truth):
public void dropitemsandclearPCCitems(String Winner,String Loser){
  PlayerCombatClass PCCLoser=getPCC(Loser);
  PlayerCombatClass PCCWinner=getPCC(Winner);
  if (isPlrOnline(PCCWinner.getPlayerName())) {
    Player PlrWinner=getServer().getPlayer(PCCWinner.getPlayerName());
    sendMessageWinner(PlrWinner,PCCLoser.getPlayerName());
    if (getPenalty().equals("String_Node_Str")) {
      logit("String_Node_Str" + Loser + "String_Node_Str"+ Winner+ "String_Node_Str");
      if (PCCLoser.getItems() != null) {
        for (int i=0; PCCLoser.getItems().size() > i; i++) {
          PlrWinner.getWorld().dropItemNaturally(PlrWinner.getLocation(),PCCLoser.getItems().get(i));
        }
      }
    }
  }
 else {
    logit("String_Node_Str");
  }
  PCCLoser.clearItems();
  return;
}
Program: 43933
Project: 43933
Buggy source:
public void publish(LogRecord logRecord){
  String mystring=logRecord.getMessage();
  if (mystring.contains("String_Node_Str")) {
    String myarray[]=mystring.split("String_Node_Str");
    if (myarray.length == 4) {
      String PlrQuitName=myarray[0];
      String DisconnectMessage=myarray[3];
      getPCC(PlrQuitName).setDisconnectType(DisconnectMessage);
    }
  }
}

Fixed version (ground truth):
public void publish(LogRecord logRecord){
  if (logRecord == null) {
    logit("String_Node_Str");
    return;
  }
 else   if (logRecord.getMessage() == null) {
    logit("String_Node_Str");
    return;
  }
 else {
    try {
      String mystring=logRecord.getMessage();
      if (mystring.contains("String_Node_Str")) {
        String myarray[]=mystring.split("String_Node_Str");
        if (!(myarray == null)) {
          logit("String_Node_Str");
          if (myarray.length == 4) {
            String PlrQuitName=myarray[0];
            String DisconnectMessage=myarray[3];
            getPCC(PlrQuitName).setDisconnectType(DisconnectMessage);
          }
        }
 else {
          logit("String_Node_Str");
        }
      }
      return;
    }
 catch (    NullPointerException e) {
      log.info("String_Node_Str");
    }
  }
}
Program: 43935
Project: 43935
Buggy source:
@Override public void run(){
  plugin.logit("String_Node_Str");
  PlayerCombatClass CCQuitter=plugin.getPCC(name);
  CCQuitter.setScheduledtask(false);
  if (!(plugin.isPlrOnline(CCQuitter.getPlayerName()))) {
    plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
    if (CCQuitter.isTagged()) {
      CCQuitter.setPvplogged(true);
      if (plugin.getPenalty().equals("String_Node_Str")) {
        if (plugin.getInventoryClear()) {
          plugin.dropitemsandclearPCCitems(CCQuitter.getTaggedBy(),CCQuitter.getPlayerName());
        }
      }
    }
  }
 else {
    removetaggedbyandremovefromtaggedplayers(CCQuitter);
  }
}

Fixed version (ground truth):
@Override public void run(){
  plugin.logit("String_Node_Str");
  PlayerCombatClass CCQuitter=plugin.getPCC(name);
  CCQuitter.setScheduledtask(false);
  if (!(plugin.isPlrOnline(CCQuitter.getPlayerName()))) {
    plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
    if (CCQuitter.isTagged()) {
      CCQuitter.setPvplogged(true);
      plugin.dropitemsandclearPCCitems(CCQuitter.getTaggedBy(),CCQuitter.getPlayerName());
    }
  }
 else {
    removetaggedbyandremovefromtaggedplayers(CCQuitter);
  }
}
Program: 43936
Project: 43936
Buggy source:
public void clearItems(){
  ITEMS.clear();
  return;
}

Fixed version (ground truth):
public void clearItems(){
  if (ITEMS != null) {
    ITEMS.clear();
  }
  return;
}
Program: 43937
Project: 43937
Buggy source:
public void dropitemsandclearPCCitems(String Winner,String Loser){
  PlayerCombatClass PCCWinner=getPCC(Winner);
  PlayerCombatClass PCCLoser=getPCC(Loser);
  if (!(getServer().getPlayer(PCCWinner.getPlayerName()) == null)) {
    Player PlrWinner=getServer().getPlayer(PCCWinner.getPlayerName());
    logit("String_Node_Str" + Loser + "String_Node_Str"+ Winner+ "String_Node_Str");
    if (PlrWinner.isOnline()) {
      PlrWinner.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ Loser+ ChatColor.GOLD+ "String_Node_Str");
      for (int i=0; PCCLoser.getItems().size() > i; i++) {
        PlrWinner.getWorld().dropItemNaturally(PlrWinner.getLocation(),PCCLoser.getItems().get(i));
      }
    }
 else {
    }
  }
 else {
    logit("String_Node_Str");
  }
  PCCLoser.clearItems();
  return;
}

Fixed version (ground truth):
public void dropitemsandclearPCCitems(String Winner,String Loser){
  PlayerCombatClass PCCWinner=getPCC(Winner);
  PlayerCombatClass PCCLoser=getPCC(Loser);
  if (isPlrOnline(PCCWinner.getPlayerName())) {
    Player PlrWinner=getServer().getPlayer(PCCWinner.getPlayerName());
    logit("String_Node_Str" + Loser + "String_Node_Str"+ Winner+ "String_Node_Str");
    PlrWinner.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ Loser+ ChatColor.GOLD+ "String_Node_Str");
    for (int i=0; PCCLoser.getItems().size() > i; i++) {
      PlrWinner.getWorld().dropItemNaturally(PlrWinner.getLocation(),PCCLoser.getItems().get(i));
    }
  }
 else {
    logit("String_Node_Str");
  }
  PCCLoser.clearItems();
  return;
}
Program: 43938
Project: 43938
Buggy source:
public void updateTags(String playername,String originalPlayerName){
  PlayerCombatClass PCCPlr1=getPCC(playername);
  if (PCCPlr1.isTagged()) {
    logit(PCCPlr1.getPlayerName() + "String_Node_Str");
    if (PCCPlr1.tagExpired()) {
      logit("String_Node_Str");
      if (!(PCCPlr1.hasScheduledtask())) {
        if (!(getServer().getPlayer(PCCPlr1.getTaggedBy()) == null)) {
          logit(PCCPlr1.getPlayerName() + "String_Node_Str");
          PlayerCombatClass PCCPlr2=getPCC(PCCPlr1.getTaggedBy());
          logit("String_Node_Str");
          PCCPlr2.removeFromTaggedPlayers(PCCPlr1.getPlayerName());
          logit("String_Node_Str");
          PCCPlr1.removeTaggedBy();
        }
      }
 else {
        logit(PCCPlr1.getPlayerName() + "String_Node_Str");
        if (!(getServer().getPlayer(PCCPlr1.getPlayerName()) == null)) {
          logit(PCCPlr1.getTaggedBy() + "String_Node_Str");
          logit("String_Node_Str");
          getServer().getScheduler().cancelTask(PCCPlr1.getTasknumber());
          PCCPlr1.setScheduledtask(false);
          logit(PCCPlr1.getPlayerName() + "String_Node_Str");
          PlayerCombatClass PCCPlr2=getPCC(PCCPlr1.getTaggedBy());
          logit("String_Node_Str");
          PCCPlr2.removeFromTaggedPlayers(PCCPlr1.getPlayerName());
          logit("String_Node_Str");
          PCCPlr1.removeTaggedBy();
        }
      }
    }
  }
  if (PCCPlr1.hasTaggedPlayer()) {
    logit(PCCPlr1.getPlayerName() + "String_Node_Str");
    ArrayList<String> Myarray=PCCPlr1.getTaggedPlayers();
    logit("String_Node_Str");
    Iterator<String> itr=Myarray.iterator();
    ArrayList<String> backup=new ArrayList<String>();
    while (itr.hasNext()) {
      backup.add(itr.next());
    }
    Iterator<String> newitr=backup.iterator();
    while (newitr.hasNext()) {
      String currentplayer=newitr.next();
      if (originalPlayerName == currentplayer) {
        continue;
      }
      logit("String_Node_Str" + currentplayer);
      updateTags(currentplayer,originalPlayerName);
    }
  }
}

Fixed version (ground truth):
public void updateTags(String playername,Boolean Continue_deeper){
  PlayerCombatClass Tagged=getPCC(playername);
  if (Tagged.isTagged()) {
    if (Tagged.tagExpired()) {
      if (isPlrOnline(Tagged.getPlayerName())) {
        PlayerCombatClass Tagger=getPCC(Tagged.getTaggedBy());
        Tagged.removeTaggedBy();
        Tagger.removeFromTaggedPlayers(Tagged.getPlayerName());
      }
    }
  }
  if (Continue_deeper == true) {
    if (Tagged.hasTaggedPlayer()) {
      logit(Tagged.getPlayerName() + "String_Node_Str");
      ArrayList<String> Myarray=Tagged.getTaggedPlayers();
      logit("String_Node_Str");
      Iterator<String> itr=Myarray.iterator();
      ArrayList<String> backup=new ArrayList<String>();
      while (itr.hasNext()) {
        backup.add(itr.next());
      }
      Iterator<String> newitr=backup.iterator();
      while (newitr.hasNext()) {
        String currentplayer=newitr.next();
        logit("String_Node_Str" + currentplayer);
        updateTags(currentplayer,false);
      }
    }
  }
}
Program: 43939
Project: 43939
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  if (command.getName().equalsIgnoreCase("String_Node_Str") || command.getName().equalsIgnoreCase("String_Node_Str")) {
    if (sender instanceof Player) {
      if (args.length == 0) {
        Player CmdPlr=(Player)sender;
        PlayerCombatClass PCCPlr=getPCC(CmdPlr.getName());
        updateTags(PCCPlr.getPlayerName(),PCCPlr.getPlayerName());
        if (PCCPlr.isTagged()) {
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.RED+ PCCPlr.getTaggedBy()+ ChatColor.GOLD+ "String_Node_Str"+ PCCPlr.tagPeriodInSeconds()+ "String_Node_Str");
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + getGracePeriod() / 1000 + "String_Node_Str");
        }
 else {
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str");
        }
        CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.RED+ PCCPlr.TaggedList());
        return true;
      }
    }
 else {
      log.info("String_Node_Str");
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  if (command.getName().equalsIgnoreCase("String_Node_Str") || command.getName().equalsIgnoreCase("String_Node_Str")) {
    if (sender instanceof Player) {
      if (args.length == 0) {
        Player CmdPlr=(Player)sender;
        PlayerCombatClass PCCPlr=getPCC(CmdPlr.getName());
        updateTags(PCCPlr.getPlayerName(),true);
        if (PCCPlr.isTagged()) {
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.RED+ PCCPlr.getTaggedBy()+ ChatColor.GOLD+ "String_Node_Str"+ PCCPlr.tagPeriodInSeconds()+ "String_Node_Str");
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + getGracePeriod() / 1000 + "String_Node_Str");
        }
 else {
          CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str");
        }
        CmdPlr.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.RED+ PCCPlr.TaggedList());
        return true;
      }
    }
 else {
      log.info("String_Node_Str");
      return true;
    }
  }
  return false;
}
Program: 43940
Project: 43940
Buggy source:
@Override public void onPlayerKick(PlayerKickEvent e){
  plugin.logit("String_Node_Str");
  Player Plr=e.getPlayer();
  plugin.logit("String_Node_Str");
  PlayerCombatClass PlrKicked=plugin.getPCC(Plr.getName());
  if (PlrKicked.isTagged()) {
    plugin.logit("String_Node_Str");
    PlayerCombatClass Tagger=plugin.getPCC(PlrKicked.getTaggedBy());
    plugin.logit("String_Node_Str");
    PlrKicked.removeTaggedBy();
    plugin.logit("String_Node_Str");
    Tagger.removeFromTaggedPlayers(PlrKicked.getPlayerName());
    plugin.logit("String_Node_Str");
    PlrKicked.setPvplogged(false);
    plugin.logit("String_Node_Str");
    PlrKicked.setGraceAndTagPast();
    if (PlrKicked.hasScheduledtask()) {
      plugin.logit("String_Node_Str");
      PlrKicked.setScheduledtask(false);
      plugin.getServer().getScheduler().cancelTask(PlrKicked.getTasknumber());
    }
  }
 else {
    plugin.logit("String_Node_Str");
  }
  return;
}

Fixed version (ground truth):
@Override public void onPlayerKick(PlayerKickEvent e){
  plugin.logit("String_Node_Str");
  Player Plr=e.getPlayer();
  plugin.logit("String_Node_Str");
  PlayerCombatClass PlrKicked=plugin.getPCC(Plr.getName());
  if (PlrKicked.isTagged()) {
    plugin.logit("String_Node_Str");
    PlayerCombatClass Tagger=plugin.getPCC(PlrKicked.getTaggedBy());
    plugin.logit("String_Node_Str");
    PlrKicked.removeTaggedBy();
    plugin.logit("String_Node_Str");
    Tagger.removeFromTaggedPlayers(PlrKicked.getPlayerName());
    plugin.logit("String_Node_Str");
    PlrKicked.setPvplogged(false);
    plugin.logit("String_Node_Str");
    if (PlrKicked.hasScheduledtask()) {
      plugin.logit("String_Node_Str");
      PlrKicked.setScheduledtask(false);
      plugin.getServer().getScheduler().cancelTask(PlrKicked.getTasknumber());
    }
  }
 else {
    plugin.logit("String_Node_Str");
  }
  plugin.logit("String_Node_Str" + new Boolean(PlrKicked.hasTaggedPlayer()).toString());
  if (PlrKicked.hasTaggedPlayer()) {
    ArrayList<String> Myarray=PlrKicked.getTaggedPlayers();
    plugin.logit("String_Node_Str");
    Iterator<String> itr=Myarray.iterator();
    ArrayList<String> backup=new ArrayList<String>();
    while (itr.hasNext()) {
      String temp=itr.next();
      plugin.logit(temp + "String_Node_Str" + PlrKicked.getPlayerName()+ "String_Node_Str");
      backup.add(temp);
    }
    Iterator<String> newitr=backup.iterator();
    while (newitr.hasNext()) {
      PlayerCombatClass PCCPlr2=plugin.getPCC(newitr.next());
      plugin.logit("String_Node_Str");
      PlrKicked.removeFromTaggedPlayers(PCCPlr2.getPlayerName());
      plugin.logit("String_Node_Str");
      PCCPlr2.removeTaggedBy();
    }
  }
  return;
}
Program: 43941
Project: 43941
Buggy source:
@Override public void onPlayerQuit(PlayerQuitEvent e){
}

Fixed version (ground truth):
@Override public void onPlayerQuit(PlayerQuitEvent e){
  final Player quitter=e.getPlayer();
  final PlayerCombatClass CCQuitter=plugin.getPCC(quitter.getName());
  if (CCQuitter.isTagged()) {
    if (!(CCQuitter.tagExpired())) {
      plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
      CCQuitter.setItems(quitter);
      if (!(CCQuitter.hasScheduledtask())) {
        plugin.logit("String_Node_Str");
        CCQuitter.setScheduledtask(true);
        CCQuitter.setGracePeriod(plugin.getGracePeriod());
        if (!((plugin.getServer().getPlayer(CCQuitter.getTaggedBy())) == null)) {
          plugin.getServer().getPlayer(CCQuitter.getTaggedBy()).sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ CCQuitter.getPlayerName()+ ChatColor.GOLD+ "String_Node_Str"+ (plugin.getGracePeriod() / 1000)+ "String_Node_Str");
        }
        CombatTagRunnable cr=new CombatTagRunnable(CCQuitter.getPlayerName());
        CCQuitter.setTasknumber(plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,cr,(CCQuitter.getGracePeriod() / 50)));
      }
 else {
        plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
      }
    }
 else {
    }
  }
 else {
    plugin.logit(quitter.getName() + "String_Node_Str");
  }
}
Program: 43942
Project: 43942
Buggy source:
@Override public void run(){
  PlayerCombatClass CCQuitter=plugin.getPCC(name);
  CCQuitter.setScheduledtask(false);
  if (plugin.getServer().getPlayer(CCQuitter.getPlayerName()) == null) {
    plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
    if (CCQuitter.isTagged()) {
      CCQuitter.setPvplogged(true);
      if (plugin.getPenalty().equals("String_Node_Str")) {
        if (plugin.getInventoryClear()) {
          plugin.dropitemsandclearPCCitems(CCQuitter.getTaggedBy(),CCQuitter.getPlayerName());
        }
      }
    }
  }
 else {
    CCQuitter.removeTaggedBy();
    plugin.getPCC(CCQuitter.getTaggedBy()).removeFromTaggedPlayers(CCQuitter.getPlayerName());
  }
}

Fixed version (ground truth):
@Override public void run(){
  plugin.logit("String_Node_Str");
  PlayerCombatClass CCQuitter=plugin.getPCC(name);
  CCQuitter.setScheduledtask(false);
  if (!(plugin.isPlrOnline(CCQuitter.getPlayerName()))) {
    plugin.logit(CCQuitter.getPlayerName() + "String_Node_Str");
    if (CCQuitter.isTagged()) {
      CCQuitter.setPvplogged(true);
      if (plugin.getPenalty().equals("String_Node_Str")) {
        if (plugin.getInventoryClear()) {
          plugin.dropitemsandclearPCCitems(CCQuitter.getTaggedBy(),CCQuitter.getPlayerName());
        }
      }
    }
  }
 else {
    plugin.logit("String_Node_Str");
    if (!(plugin.getServer().getPlayer(CCQuitter.getPlayerName()).isOnline())) {
      if (plugin.getPenalty().equals("String_Node_Str")) {
        if (plugin.getInventoryClear()) {
          plugin.dropitemsandclearPCCitems(CCQuitter.getTaggedBy(),CCQuitter.getPlayerName());
        }
      }
    }
 else {
      removetaggedbyandremovefromtaggedplayers(CCQuitter);
    }
  }
}
Program: 43943
Project: 43943
Buggy source:
@Override public void onPlayerJoin(PlayerJoinEvent e){
  Player p=e.getPlayer();
  if (!plugin.isinPlayerList(p.getName())) {
    plugin.logit("String_Node_Str");
    plugin.addtoPCC(p);
  }
  PlayerCombatClass PlrComClass=plugin.getPCC(p.getName());
  if (PlrComClass.hasPvplogged()) {
    plugin.killAndClean(p);
    if (PlrComClass.isTagged()) {
      PlayerCombatClass tagger=plugin.getPCC(PlrComClass.getTaggedBy());
      plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str"+ ChatColor.RED+ PlrComClass.getTaggedBy());
      tagger.removeFromTaggedPlayers(PlrComClass.getPlayerName());
    }
 else {
      plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str");
    }
    PlrComClass.removeTaggedBy();
    PlrComClass.setPvplogged(false);
  }
 else   if (plugin.checkpvplogger(p.getName())) {
    plugin.killAndClean(p);
    plugin.logit("String_Node_Str" + p.getName() + "String_Node_Str");
    plugin.removepvplogger(p.getName());
    plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
  }
  return;
}

Fixed version (ground truth):
@Override public void onPlayerJoin(PlayerJoinEvent e){
  Player p=e.getPlayer();
  if (!plugin.isinPlayerList(p.getName())) {
    plugin.logit("String_Node_Str");
    plugin.addtoPCC(p);
  }
  PlayerCombatClass PlrComClass=plugin.getPCC(p.getName());
  if (PlrComClass.hasPvplogged()) {
    plugin.killAndClean(p);
    if (PlrComClass.isTagged()) {
      PlayerCombatClass tagger=plugin.getPCC(PlrComClass.getTaggedBy());
      plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str"+ ChatColor.RED+ PlrComClass.getTaggedBy());
      tagger.removeFromTaggedPlayers(PlrComClass.getPlayerName());
    }
 else {
      plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str");
    }
    PlrComClass.removeTaggedBy();
    PlrComClass.setPvplogged(false);
  }
 else   if (plugin.checkpvplogger(p.getName())) {
    plugin.killAndClean(p);
    plugin.logit("String_Node_Str" + p.getName() + "String_Node_Str");
    plugin.removepvplogger(p.getName());
    plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ p.getName()+ ChatColor.GOLD+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
    PlayerCombatClass PlrLogin=plugin.getPCC(p.getName());
    if (PlrLogin.isTagged()) {
      if (PlrLogin.hasScheduledtask()) {
        plugin.getServer().getScheduler().cancelTask(PlrLogin.getTasknumber());
        PlrLogin.setScheduledtask(false);
        PlrLogin.setTagExpiration(plugin.getDelay());
      }
    }
  }
  return;
}
Program: 43944
Project: 43944
Buggy source:
private static LoggerProvider findProvider(){
  try {
    final LogManager jdkLogManager=LogManager.getLogManager();
    if (jdkLogManager.getClass().getName().equals("String_Node_Str")) {
      return new JBossLogManagerProvider();
    }
  }
 catch (  Throwable t) {
  }
  final ClassLoader cl=getClassLoader();
  try {
    Class.forName("String_Node_Str",true,cl);
    Class.forName("String_Node_Str",true,cl);
    return new Log4jLoggerProvider();
  }
 catch (  Throwable t) {
  }
  try {
    Class.forName("String_Node_Str",false,cl);
    return new Slf4jLoggerProvider();
  }
 catch (  Throwable t) {
  }
  return new JDKLoggerProvider();
}

Fixed version (ground truth):
private static LoggerProvider findProvider(){
  try {
    final LogManager jdkLogManager=LogManager.getLogManager();
    if (jdkLogManager.getClass().getName().equals("String_Node_Str")) {
      Class.forName("String_Node_Str",false,LoggerProviders.class.getClassLoader());
      return new JBossLogManagerProvider();
    }
  }
 catch (  Throwable t) {
  }
  final ClassLoader cl=getClassLoader();
  try {
    Class.forName("String_Node_Str",true,cl);
    Class.forName("String_Node_Str",true,cl);
    return new Log4jLoggerProvider();
  }
 catch (  Throwable t) {
  }
  try {
    Class.forName("String_Node_Str",false,cl);
    return new Slf4jLoggerProvider();
  }
 catch (  Throwable t) {
  }
  return new JDKLoggerProvider();
}
Program: 43945
Project: 43945
Buggy source:
public boolean onKeyDown(int keyCode,KeyEvent event){
  if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
    Intent intent;
    intent=new Intent("String_Node_Str");
    getBaseContext().sendBroadcast(intent);
    return true;
  }
 else   if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
    Intent intent;
    intent=new Intent("String_Node_Str");
    getBaseContext().sendBroadcast(intent);
    return true;
  }
 else {
    return super.onKeyDown(keyCode,event);
  }
}

Fixed version (ground truth):
public boolean onKeyDown(int keyCode,KeyEvent event){
  Intent intent;
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_DOWN:
    intent=new Intent("String_Node_Str");
  getBaseContext().sendBroadcast(intent);
return true;
case KeyEvent.KEYCODE_VOLUME_UP:
intent=new Intent("String_Node_Str");
getBaseContext().sendBroadcast(intent);
return true;
case KeyEvent.KEYCODE_BACK:
case KeyEvent.KEYCODE_HOME:
return true;
default :
return super.onKeyDown(keyCode,event);
}
}
Program: 43946
Project: 43946
Buggy source:
public void setCustomBackground(){
  if (utils.getCheckBoxPref(this,LockscreenSettings.KEY_SHOW_CUSTOM_BG,false)) {
    String BG_FILE=getFilesDir().toString() + File.separator + LockscreenSettings.BG_PHOTO_FILE;
    Bitmap bgBitmap=BitmapFactory.decodeFile(BG_FILE);
    BitmapDrawable background=new BitmapDrawable(getResources(),bgBitmap);
    background.setGravity(Gravity.CENTER);
    getWindow().setBackgroundDrawable(background);
  }
 else {
    getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  }
}

Fixed version (ground truth):
public void setCustomBackground(){
  if (utils.getCheckBoxPref(this,LockscreenSettings.KEY_SHOW_CUSTOM_BG,false)) {
    if (bgBitmap != null) {
      bgBitmap.recycle();
      bgBitmap=null;
      System.gc();
    }
    String BG_FILE=getFilesDir().toString() + File.separator + LockscreenSettings.BG_PHOTO_FILE;
    bgBitmap=BitmapFactory.decodeFile(BG_FILE);
    BitmapDrawable background=new BitmapDrawable(getResources(),bgBitmap);
    background.setGravity(Gravity.CENTER);
    getWindow().setBackgroundDrawable(background);
  }
 else {
    getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  }
}
Program: 43949
Project: 43949
Buggy source:
public void causeAjaxErrorActionListener(AjaxBehaviorEvent event){
  getResponse().setStatus(501);
}

Fixed version (ground truth):
public void causeAjaxErrorActionListener(ActionEvent event){
  getResponse().setStatus(501);
}
Program: 43950
Project: 43950
Buggy source:
@Test @Uses({@Use(field="String_Node_Str",enumeration=true),@Use(field="String_Node_Str",enumeration=true)}) public void testDirectionAndMethod(){
  notifyStackAttributes.set(NotifyStackAttributes.direction,direction.name().toLowerCase(Locale.ENGLISH));
  notifyStackAttributes.set(NotifyStackAttributes.method,method.name().toLowerCase(Locale.ENGLISH));
  notifyStackAttributes.set(NotifyStackAttributes.position,"String_Node_Str");
  generateMessagesWithWait(3);
  NotifyMessage firstMessage=getMessageWithNumber(1);
  NotifyMessage secondMessage=getMessageWithNumber(2);
  NotifyMessage thirdMessage=getMessageWithNumber(3);
  Locations locationsM1=Utils.getLocations(firstMessage.getRoot());
  Locations locationsM2=Utils.getLocations(secondMessage.getRoot());
  Locations locationsM3=Utils.getLocations(thirdMessage.getRoot());
  if (method.equals(Method.FIRST)) {
    Assert.assertTrue(direction.isAfter(locationsM1,locationsM2));
    Assert.assertTrue(direction.isAfter(locationsM2,locationsM3));
  }
 else   if (method.equals(Method.LAST)) {
    Assert.assertFalse(direction.isAfter(locationsM1,locationsM2));
    Assert.assertFalse(direction.isAfter(locationsM2,locationsM3));
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str" + method);
  }
}

Fixed version (ground truth):
@Test @Uses({@Use(field="String_Node_Str",enumeration=true),@Use(field="String_Node_Str",enumeration=true)}) public void testDirectionAndMethod(){
  notifyStackAttributes.set(NotifyStackAttributes.direction,direction.name().toLowerCase(Locale.ENGLISH));
  notifyStackAttributes.set(NotifyStackAttributes.method,method.name().toLowerCase(Locale.ENGLISH));
  notifyStackAttributes.set(NotifyStackAttributes.position,"String_Node_Str");
  waiting(500);
  generateMessagesWithWait(3);
  NotifyMessage firstMessage=getMessageWithNumber(1);
  NotifyMessage secondMessage=getMessageWithNumber(2);
  NotifyMessage thirdMessage=getMessageWithNumber(3);
  Locations locationsM1=Utils.getLocations(firstMessage.getRoot());
  Locations locationsM2=Utils.getLocations(secondMessage.getRoot());
  Locations locationsM3=Utils.getLocations(thirdMessage.getRoot());
  if (method.equals(Method.FIRST)) {
    Assert.assertTrue(direction.isAfter(locationsM1,locationsM2));
    Assert.assertTrue(direction.isAfter(locationsM2,locationsM3));
  }
 else   if (method.equals(Method.LAST)) {
    Assert.assertFalse(direction.isAfter(locationsM1,locationsM2));
    Assert.assertFalse(direction.isAfter(locationsM2,locationsM3));
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str" + method);
  }
}
Program: 43951
Project: 43951
Buggy source:
@Test public void testRerenderStack(){
  generateMessagesWithWait(3);
  Assert.assertEquals(notify.size(),3,"String_Node_Str");
  MetamerPage.waitRequest(rerenderStackButton,WaitRequestType.XHR).click();
  Graphene.waitAjax().until(new ExpectedCondition<Boolean>(){
    @Override public Boolean apply(    WebDriver from){
      return notify.size() == 0;
    }
  }
);
  Assert.assertEquals(notify.size(),0,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testRerenderStack(){
  waiting(500);
  generateMessagesWithWait(3);
  Assert.assertEquals(notify.size(),3,"String_Node_Str");
  MetamerPage.waitRequest(rerenderStackButton,WaitRequestType.XHR).click();
  Graphene.waitAjax().until(new ExpectedCondition<Boolean>(){
    @Override public Boolean apply(    WebDriver from){
      return notify.size() == 0;
    }
  }
);
  Assert.assertEquals(notify.size(),0,"String_Node_Str");
}
Program: 43952
Project: 43952
Buggy source:
@Test @Use(field="String_Node_Str",enumeration=true) public void testPosition(){
  notifyStackAttributes.set(NotifyStackAttributes.position,position.value);
  generateMessagesWithWait(3);
  NotifyMessage firstMessage=getMessageWithNumber(1);
  NotifyMessage secondMessage=getMessageWithNumber(2);
  NotifyMessage thirdMessage=getMessageWithNumber(3);
  Assert.assertEquals(firstMessage.getPosition(),position.getPosition());
  Assert.assertEquals(secondMessage.getPosition(),position.getPosition());
  Assert.assertEquals(thirdMessage.getPosition(),position.getPosition());
}

Fixed version (ground truth):
@Test @Use(field="String_Node_Str",enumeration=true) public void testPosition(){
  notifyStackAttributes.set(NotifyStackAttributes.position,position.value);
  waiting(500);
  generateMessagesWithWait(3);
  NotifyMessage firstMessage=getMessageWithNumber(1);
  NotifyMessage secondMessage=getMessageWithNumber(2);
  NotifyMessage thirdMessage=getMessageWithNumber(3);
  Assert.assertEquals(firstMessage.getPosition(),position.getPosition());
  Assert.assertEquals(secondMessage.getPosition(),position.getPosition());
  Assert.assertEquals(thirdMessage.getPosition(),position.getPosition());
}
Program: 43953
Project: 43953
Buggy source:
public void testRequestEventsBefore(WebElement attributesTable,String... events){
  for (  String event : events) {
    String inputExp=format("String_Node_Str",event);
    WebElement input=attributesTable.findElement(By.cssSelector(inputExp));
    String inputVal=format("String_Node_Str",event);
    String inputValFull="String_Node_Str" + inputVal + "String_Node_Str";
    input.clear();
    waiting(1000);
    input=attributesTable.findElement(By.cssSelector(inputExp));
    input.sendKeys(inputValFull);
    waiting(300);
    Graphene.waitAjax().until(ElementPresent.getInstance().element(attributesTable));
    input=attributesTable.findElement(By.cssSelector(inputExp));
    MetamerPage.waitRequest(input,WaitRequestType.HTTP).submit();
  }
  cleanMetamerEventsVariable();
}

Fixed version (ground truth):
public void testRequestEventsBefore(WebElement attributesTable,String... events){
  for (  String event : events) {
    String inputExp=format("String_Node_Str",event);
    WebElement input=attributesTable.findElement(By.cssSelector(inputExp));
    String inputVal=format("String_Node_Str",event);
    String inputValFull="String_Node_Str" + inputVal + "String_Node_Str";
    input.clear();
    waiting(1000);
    input=attributesTable.findElement(By.cssSelector(inputExp));
    input.sendKeys(inputValFull);
    waiting(300);
    Graphene.waitAjax().until().element(attributesTable).is().present();
    input=attributesTable.findElement(By.cssSelector(inputExp));
    MetamerPage.waitRequest(input,WaitRequestType.HTTP).submit();
  }
  cleanMetamerEventsVariable();
}
Program: 43954
Project: 43954
Buggy source:
public void addNewTabToCollection(){
  UITab tab=new UITab();
  int index=tabs.size() + 6;
  tab.setHeader("String_Node_Str" + index + "String_Node_Str");
  tab.setId("String_Node_Str" + index);
  tab.setName("String_Node_Str" + index);
  tab.setRender("String_Node_Str" + index);
  tabs.add(tab);
}

Fixed version (ground truth):
public void addNewTabToCollection(){
  UITab tab=new UITab();
  int index=tabs.size() + 6;
  tab.setHeader("String_Node_Str" + index + "String_Node_Str");
  tab.setId("String_Node_Str" + index);
  tab.setName("String_Node_Str" + index);
  tabs.add(tab);
}
Program: 43955
Project: 43955
Buggy source:
public void attachNewTabProgramatically(){
  UITab tab=(UITab)FacesContext.getCurrentInstance().getApplication().createComponent(UITab.COMPONENT_TYPE);
  int index=tabPanel.getChildren().size() + 1;
  tab.setHeader("String_Node_Str" + index + "String_Node_Str");
  tab.setId("String_Node_Str" + index);
  tab.setName("String_Node_Str" + index);
  tab.setRender("String_Node_Str" + index);
  tabPanel.getChildren().add(tab);
}

Fixed version (ground truth):
public void attachNewTabProgramatically(){
  UITab tab=(UITab)FacesContext.getCurrentInstance().getApplication().createComponent(UITab.COMPONENT_TYPE);
  int index=tabPanel.getChildren().size() + 1;
  tab.setHeader("String_Node_Str" + index + "String_Node_Str");
  tab.setId("String_Node_Str" + index);
  tab.setName("String_Node_Str" + index);
  tabPanel.getChildren().add(tab);
}
Program: 43956
Project: 43956
Buggy source:
protected void checkEvent(String text,int number){
  LogEntries filter=log.getLogEntries(LogEntryLevel.INFO).filter(new RichFacesFilterBuilder().filterToContentContains(text));
  int logEntriesWithContent=filter.size();
  assertEquals(logEntriesWithContent,number,"String_Node_Str");
}

Fixed version (ground truth):
protected void checkEvent(String text,int number){
  LogEntries filter=log.getLogEntries(LogEntryLevel.INFO).filter(new RichFacesLogFilterBuilder().filterToContentContains(text));
  int logEntriesWithContent=filter.size();
  assertEquals(logEntriesWithContent,number,"String_Node_Str");
}