nus-yam/ex-repair huggingface dataset:
Program: 10255
Project: 10255
Buggy source:
public void switchBlock(Location interactLocation,SwitchState switchState,Player player){
  World world=interactLocation.getWorld();
  boolean currentState=(interactLocation.getBlock().getData() & 0x8) > 0;
  String state=switchState.toString();
  CraftPlayer craftPlayer=(CraftPlayer)player;
  if (craftPlayer == null && Bukkit.getOnlinePlayers().length > 0) {
    if (Bukkit.getOnlinePlayers().length > 0) {
      craftPlayer=(CraftPlayer)Bukkit.getOnlinePlayers()[0];
    }
 else {
      for (      NPC npc : CitizensAPI.getNPCRegistry()) {
        if (npc.isSpawned() && npc.getEntity() instanceof Player) {
          craftPlayer=(CraftPlayer)npc.getEntity();
          break;
        }
      }
    }
  }
  if ((state.equals("String_Node_Str") && !currentState) || (state.equals("String_Node_Str") && currentState) || state.equals("String_Node_Str")) {
    try {
      Block.e(interactLocation.getBlock().getType().getId()).interact(((CraftWorld)world).getHandle(),interactLocation.getBlockX(),interactLocation.getBlockY(),interactLocation.getBlockZ(),craftPlayer != null ? craftPlayer.getHandle() : null,0,0f,0f,0f);
      dB.log("String_Node_Str" + interactLocation.getBlock().getType().toString() + "String_Node_Str"+ ((interactLocation.getBlock().getData() & 0x8) > 0 ? "String_Node_Str" : "String_Node_Str"));
    }
 catch (    NullPointerException e) {
      dB.echoError("String_Node_Str" + interactLocation.getBlock().getType().toString() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void switchBlock(Location interactLocation,SwitchState switchState,Player player){
  World world=interactLocation.getWorld();
  boolean currentState=(interactLocation.getBlock().getData() & 0x8) > 0;
  String state=switchState.toString();
  CraftPlayer craftPlayer=(CraftPlayer)player;
  if (craftPlayer == null && Bukkit.getOnlinePlayers().size() > 0) {
    if (Bukkit.getOnlinePlayers().size() > 0) {
      craftPlayer=(CraftPlayer)Bukkit.getOnlinePlayers().toArray()[0];
    }
 else {
      for (      NPC npc : CitizensAPI.getNPCRegistry()) {
        if (npc.isSpawned() && npc.getEntity() instanceof Player) {
          craftPlayer=(CraftPlayer)npc.getEntity();
          break;
        }
      }
    }
  }
  if ((state.equals("String_Node_Str") && !currentState) || (state.equals("String_Node_Str") && currentState) || state.equals("String_Node_Str")) {
    try {
      Block.e(interactLocation.getBlock().getType().getId()).interact(((CraftWorld)world).getHandle(),interactLocation.getBlockX(),interactLocation.getBlockY(),interactLocation.getBlockZ(),craftPlayer != null ? craftPlayer.getHandle() : null,0,0f,0f,0f);
      dB.log("String_Node_Str" + interactLocation.getBlock().getType().toString() + "String_Node_Str"+ ((interactLocation.getBlock().getData() & 0x8) > 0 ? "String_Node_Str" : "String_Node_Str"));
    }
 catch (    NullPointerException e) {
      dB.echoError("String_Node_Str" + interactLocation.getBlock().getType().toString() + "String_Node_Str");
    }
  }
}
Program: 10256
Project: 10256
Buggy source:
public dItem getSpecialRecipeResult(ItemStack[] matrix){
  master:   for (  Map.Entry<dItem,dList> entry : ItemScriptContainer.specialrecipesMap.entrySet()) {
    for (int n=0; n < 9; n++) {
      dItem valueN=dItem.valueOf(entry.getValue().get(n));
      dItem matrixN=matrix[n] == null ? new dItem(Material.AIR) : new dItem(matrix[n].clone());
      valueN.setStackSize(1);
      matrixN.setStackSize(1);
      if (!valueN.identify().equals(matrixN.identify())) {
        continue master;
      }
    }
    return entry.getKey();
  }
  return null;
}

Fixed version (ground truth):
public dItem getSpecialRecipeResult(ItemStack[] matrix){
  master:   for (  Map.Entry<dItem,dList> entry : ItemScriptContainer.specialrecipesMap.entrySet()) {
    for (int n=0; n < 9; n++) {
      dItem valueN=dItem.valueOf(entry.getValue().get(n));
      dItem matrixN=matrix.length <= n || matrix[n] == null ? new dItem(Material.AIR) : new dItem(matrix[n].clone());
      valueN.setStackSize(1);
      matrixN.setStackSize(1);
      if (!valueN.identify().equals(matrixN.identify())) {
        continue master;
      }
    }
    return entry.getKey();
  }
  return null;
}
Program: 10257
Project: 10257
Buggy source:
/** 
 * Finds the closest Player to a particular location.
 * @param location    The location to find the closest Player to.
 * @param range    The maximum range to look for the Player.
 * @return    The closest Player to the location, or null if no Player was foundwithin the range specified.
 */
public static Player getClosestPlayer(Location location,int range){
  Player closestPlayer=null;
  double closestDistance=Math.pow(range,2);
  List<Player> playerList=new ArrayList<Player>(Arrays.asList(Bukkit.getOnlinePlayers()));
  Iterator<Player> it=playerList.iterator();
  while (it.hasNext()) {
    Player player=it.next();
    Location loc=player.getLocation();
    if (loc.getWorld().equals(location.getWorld()) && loc.distanceSquared(location) < closestDistance) {
      closestPlayer=player;
      closestDistance=player.getLocation().distanceSquared(location);
    }
  }
  return closestPlayer;
}

Fixed version (ground truth):
/** 
 * Finds the closest Player to a particular location.
 * @param location    The location to find the closest Player to.
 * @param range    The maximum range to look for the Player.
 * @return    The closest Player to the location, or null if no Player was foundwithin the range specified.
 */
public static Player getClosestPlayer(Location location,int range){
  Player closestPlayer=null;
  double closestDistance=Math.pow(range,2);
  List<Player> playerList=new ArrayList<Player>(Bukkit.getOnlinePlayers());
  Iterator<Player> it=playerList.iterator();
  while (it.hasNext()) {
    Player player=it.next();
    Location loc=player.getLocation();
    if (loc.getWorld().equals(location.getWorld()) && loc.distanceSquared(location) < closestDistance) {
      closestPlayer=player;
      closestDistance=player.getLocation().distanceSquared(location);
    }
  }
  return closestPlayer;
}
Program: 10258
Project: 10258
Buggy source:
/** 
 * Finds the closest Players to a particular location.
 * @param location    The location to find the closest Player to.
 * @param range    The maximum range to look for the Player.
 * @return    The closest Player to the location, or null if no Player was foundwithin the range specified.
 */
public static List<dPlayer> getClosestPlayers(Location location,int range){
  List<dPlayer> closestPlayers=new ArrayList<dPlayer>();
  double closestDistance=Math.pow(range,2);
  List<Player> playerList=new ArrayList<Player>(Arrays.asList(Bukkit.getOnlinePlayers()));
  Iterator<Player> it=playerList.iterator();
  while (it.hasNext()) {
    Player player=it.next();
    Location loc=player.getLocation();
    if (loc.getWorld().equals(location.getWorld()) && loc.distanceSquared(location) < closestDistance) {
      closestPlayers.add(dPlayer.mirrorBukkitPlayer(player));
    }
  }
  return closestPlayers;
}

Fixed version (ground truth):
/** 
 * Finds the closest Players to a particular location.
 * @param location    The location to find the closest Player to.
 * @param range    The maximum range to look for the Player.
 * @return    The closest Player to the location, or null if no Player was foundwithin the range specified.
 */
public static List<dPlayer> getClosestPlayers(Location location,int range){
  List<dPlayer> closestPlayers=new ArrayList<dPlayer>();
  double closestDistance=Math.pow(range,2);
  List<Player> playerList=new ArrayList<Player>(Bukkit.getOnlinePlayers());
  Iterator<Player> it=playerList.iterator();
  while (it.hasNext()) {
    Player player=it.next();
    Location loc=player.getLocation();
    if (loc.getWorld().equals(location.getWorld()) && loc.distanceSquared(location) < closestDistance) {
      closestPlayers.add(dPlayer.mirrorBukkitPlayer(player));
    }
  }
  return closestPlayers;
}
Program: 10260
Project: 10260
Buggy source:
public boolean isInsideCuboid(Location location){
  for (  LocationPair pair : pairs) {
    if (!location.getWorld().equals(pair.low.getWorld()))     continue;
    if (!Utilities.isBetween(pair.low.getBlockX(),pair.high.getBlockX(),location.getBlockX()))     continue;
    if (!Utilities.isBetween(pair.low.getBlockY(),pair.high.getBlockY(),location.getBlockY()))     continue;
    if (Utilities.isBetween(pair.low.getBlockZ(),pair.high.getBlockZ(),location.getZ()))     return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isInsideCuboid(Location location){
  for (  LocationPair pair : pairs) {
    if (!location.getWorld().equals(pair.low.getWorld()))     continue;
    if (!Utilities.isBetween(pair.low.getBlockX(),pair.high.getBlockX(),location.getBlockX()))     continue;
    if (!Utilities.isBetween(pair.low.getBlockY(),pair.high.getBlockY(),location.getBlockY()))     continue;
    if (Utilities.isBetween(pair.low.getBlockZ(),pair.high.getBlockZ(),location.getBlockZ()))     return true;
  }
  return false;
}
Program: 10261
Project: 10261
Buggy source:
@Override public String identify(){
  if (isUnique())   return "String_Node_Str" + NotableManager.getSavedId(this);
 else {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    for (    LocationPair pair : pairs) {
      sb.append(pair.low.getBlockX()).append(',').append(pair.low.getBlockY()).append(',').append(pair.low.getBlockZ()).append(',').append(pair.low.getWorld().getName()).append('|').append(pair.high.getBlockX()).append(',').append(pair.high.getBlockZ()).append(',').append(pair.high.getBlockZ()).append(',').append(pair.high.getWorld().getName()).append('|');
    }
    return sb.toString().substring(0,sb.toString().length() - 1);
  }
}

Fixed version (ground truth):
@Override public String identify(){
  if (isUnique())   return "String_Node_Str" + NotableManager.getSavedId(this);
 else {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    for (    LocationPair pair : pairs) {
      sb.append(pair.low.getBlockX()).append(',').append(pair.low.getBlockY()).append(',').append(pair.low.getBlockZ()).append(',').append(pair.low.getWorld().getName()).append('|').append(pair.high.getBlockX()).append(',').append(pair.high.getBlockY()).append(',').append(pair.high.getBlockZ()).append(',').append(pair.high.getWorld().getName()).append('|');
    }
    return sb.toString().substring(0,sb.toString().length() - 1);
  }
}
Program: 10262
Project: 10262
Buggy source:
public static void reloadEntities(){
  if (entities == null)   entities=new HashMap<UUID,String>();
  entities.clear();
  ConfigurationSection entity_scripts=DenizenAPI.getCurrentInstance().getEntities().getConfigurationSection("String_Node_Str");
  if (entity_scripts == null)   return;
  for (  String Path : entity_scripts.getKeys(false)) {
    UUID id=UUID.fromString(Path);
    String scriptname=entity_scripts.getString(Path + "String_Node_Str");
    entities.put(id,scriptname);
  }
}

Fixed version (ground truth):
public static void reloadEntities(){
  entities.clear();
  ConfigurationSection entity_scripts=DenizenAPI.getCurrentInstance().getEntities().getConfigurationSection("String_Node_Str");
  if (entity_scripts == null)   return;
  for (  String Path : entity_scripts.getKeys(false)) {
    UUID id=UUID.fromString(Path);
    String scriptname=entity_scripts.getString(Path + "String_Node_Str");
    entities.put(id,scriptname);
  }
}
Program: 10264
Project: 10264
Buggy source:
public dItem getSpecialRecipeResult(ItemStack[] matrix){
  master:   for (  Map.Entry<dItem,dList> entry : ItemScriptContainer.specialrecipesMap.entrySet()) {
    for (int n=0; n < 9; n++) {
      if (!dItem.valueOf(entry.getValue().get(n)).identify().equals(new dItem(matrix[n]).identify())) {
        continue master;
      }
    }
    return entry.getKey();
  }
  return null;
}

Fixed version (ground truth):
public dItem getSpecialRecipeResult(ItemStack[] matrix){
  master:   for (  Map.Entry<dItem,dList> entry : ItemScriptContainer.specialrecipesMap.entrySet()) {
    for (int n=0; n < 9; n++) {
      dItem valueN=dItem.valueOf(entry.getValue().get(n));
      dItem matrixN=new dItem(matrix[n].clone());
      valueN.setStackSize(1);
      matrixN.setStackSize(1);
      if (!valueN.identify().equals(matrixN.identify())) {
        continue master;
      }
    }
    return entry.getKey();
  }
  return null;
}
Program: 10265
Project: 10265
Buggy source:
@EventHandler public void playerEggThrow(PlayerEggThrowEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  dEntity egg=new dEntity(event.getEgg());
  context.put("String_Node_Str",egg);
  context.put("String_Node_Str",new Element(event.isHatching()));
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  if (event.isHatching())   events.add("String_Node_Str");
 else   events.add("String_Node_Str");
  String determination=EventManager.doEvents(events,null,new dPlayer(event.getPlayer()),context);
  if (dEntity.matches(determination)) {
    event.setHatching(true);
    event.setHatchingType(dEntity.valueOf(determination).getEntityType());
  }
}

Fixed version (ground truth):
@EventHandler public void playerEggThrow(PlayerEggThrowEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  dEntity egg=new dEntity(event.getEgg());
  context.put("String_Node_Str",egg);
  context.put("String_Node_Str",new Element(event.isHatching()));
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  if (event.isHatching())   events.add("String_Node_Str");
 else   events.add("String_Node_Str");
  String determination=EventManager.doEvents(events,null,new dPlayer(event.getPlayer()),context);
  if (determination.equalsIgnoreCase("String_Node_Str")) {
    event.setHatching(false);
  }
 else   if (dEntity.matches(determination)) {
    event.setHatching(true);
    event.setHatchingType(dEntity.valueOf(determination).getEntityType());
  }
}
Program: 10266
Project: 10266
Buggy source:
@Override public String getAttribute(Attribute attribute){
  if (attribute == null)   return null;
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(id).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(script_entries.size()).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    String state;
    if (is_started)     state="String_Node_Str";
 else     if (is_stopping)     state="String_Node_Str";
 else     state="String_Node_Str";
    return new Element(state).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(getAllDefinitions().toString()).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    if (reqId < 0 || !DetermineCommand.hasOutcome(reqId))     return Element.NULL.getAttribute(attribute.fulfill(1));
 else     return ObjectFetcher.pickObjectFor(DetermineCommand.readOutcome(reqId)).getAttribute(attribute.fulfill(1));
  }
  return new Element(identify()).getAttribute(attribute);
}

Fixed version (ground truth):
@Override public String getAttribute(Attribute attribute){
  if (attribute == null)   return null;
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(id).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(script_entries.size()).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    String state;
    if (is_started)     state="String_Node_Str";
 else     if (is_stopping)     state="String_Node_Str";
 else     state="String_Node_Str";
    return new Element(state).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str") && script != null) {
    return script.getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList commands=new dList();
    for (    ScriptEntry entry : script_entries) {
      StringBuilder sb=new StringBuilder();
      sb.append(entry.getCommandName()).append("String_Node_Str");
      for (      String arg : entry.getOriginalArguments()) {
        sb.append(arg).append("String_Node_Str");
      }
      commands.add(sb.substring(0,sb.length() - 1));
    }
  }
  if (attribute.startsWith("String_Node_Str")) {
    return new Element(getAllDefinitions().toString()).getAttribute(attribute.fulfill(1));
  }
  if (attribute.startsWith("String_Node_Str")) {
    if (reqId < 0 || !DetermineCommand.hasOutcome(reqId))     return Element.NULL.getAttribute(attribute.fulfill(1));
 else     return ObjectFetcher.pickObjectFor(DetermineCommand.readOutcome(reqId)).getAttribute(attribute.fulfill(1));
  }
  return new Element(identify()).getAttribute(attribute);
}
Program: 10267
Project: 10267
Buggy source:
/** 
 * Gets a Queue Object from a string form of q@queue_name.
 * @param string  the string or dScript argument String
 * @return  a ScriptQueue, or null if incorrectly formatted
 */
@Fetchable("String_Node_Str") public static ScriptQueue valueOf(String string){
  if (string == null)   return null;
  if (_queueExists(string))   return _getExistingQueue(string);
  return null;
}

Fixed version (ground truth):
/** 
 * Gets a Queue Object from a string form of q@queue_name.
 * @param string  the string or dScript argument String
 * @return  a ScriptQueue, or null if incorrectly formatted
 */
@Fetchable("String_Node_Str") public static ScriptQueue valueOf(String string){
  if (string == null)   return null;
  if (string.startsWith("String_Node_Str") && string.length() > 2)   string=string.substring(2);
  if (_queueExists(string))   return _getExistingQueue(string);
  return null;
}
Program: 10268
Project: 10268
Buggy source:
/** 
 * Starts the script queue.
 */
public void start(){
  if (is_started)   return;
  is_started=true;
  boolean is_delayed=delay_time > System.currentTimeMillis();
  Class<? extends ScriptQueue> clazz=this.cachedClass == null ? this.cachedClass=getClass() : this.cachedClass;
  String name=classNameCache.get(clazz);
  if (name == null)   classNameCache.put(clazz,name=clazz.getSimpleName());
  if (is_delayed) {
    dB.echoDebug(this,"String_Node_Str" + name + "String_Node_Str"+ id+ "String_Node_Str"+ "String_Node_Str"+ new Duration(((double)(delay_time - System.currentTimeMillis())) / 1000f).identify()+ "String_Node_Str");
  }
 else   dB.echoDebug(this,"String_Node_Str" + name + "String_Node_Str"+ id+ "String_Node_Str");
  if (is_delayed) {
    Bukkit.getScheduler().scheduleSyncDelayedTask(DenizenAPI.getCurrentInstance(),new Runnable(){
      @Override public void run(){
        onStart();
      }
    }
,(long)(((double)(delay_time - System.currentTimeMillis())) / 1000 * 20));
  }
 else   onStart();
}

Fixed version (ground truth):
/** 
 * Starts the script queue.
 */
public void start(){
  if (is_started)   return;
  is_started=true;
  boolean is_delayed=delay_time > System.currentTimeMillis();
  if (script_entries.size() > 0)   script=script_entries.get(0).getScript();
  Class<? extends ScriptQueue> clazz=this.cachedClass == null ? this.cachedClass=getClass() : this.cachedClass;
  String name=classNameCache.get(clazz);
  if (name == null)   classNameCache.put(clazz,name=clazz.getSimpleName());
  if (is_delayed) {
    dB.echoDebug(this,"String_Node_Str" + name + "String_Node_Str"+ id+ "String_Node_Str"+ "String_Node_Str"+ new Duration(((double)(delay_time - System.currentTimeMillis())) / 1000f).identify()+ "String_Node_Str");
  }
 else   dB.echoDebug(this,"String_Node_Str" + name + "String_Node_Str"+ id+ "String_Node_Str");
  if (is_delayed) {
    Bukkit.getScheduler().scheduleSyncDelayedTask(DenizenAPI.getCurrentInstance(),new Runnable(){
      @Override public void run(){
        onStart();
      }
    }
,(long)(((double)(delay_time - System.currentTimeMillis())) / 1000 * 20));
  }
 else   onStart();
}
Program: 10269
Project: 10269
Buggy source:
@EventHandler public void queueTag(ReplaceableTagEvent event){
  if (!event.matches("String_Node_Str"))   return;
  Attribute attribute=new Attribute(event.raw_tag,event.getScriptEntry()).fulfill(1);
  if (event.hasNameContext()) {
    if (ScriptQueue._queueExists(event.getNameContext()))     event.setReplaced(Element.NULL.getAttribute(attribute.fulfill(1)));
 else     event.setReplaced(ScriptQueue._getExistingQueue(event.getNameContext()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    event.setReplaced(new Element(ScriptQueue._queueExists(attribute.getContext(1))).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(ScriptQueue._getStats()).getAttribute(attribute.fulfill(1)));
    return;
  }
  event.setReplaced(event.getScriptEntry().getResidingQueue().getAttribute(attribute));
}

Fixed version (ground truth):
@EventHandler public void queueTag(ReplaceableTagEvent event){
  if (!event.matches("String_Node_Str"))   return;
  Attribute attribute=new Attribute(event.raw_tag,event.getScriptEntry()).fulfill(1);
  if (event.hasNameContext()) {
    if (ScriptQueue._queueExists(event.getNameContext()))     event.setReplaced(Element.NULL.getAttribute(attribute.fulfill(1)));
 else     event.setReplaced(ScriptQueue._getExistingQueue(event.getNameContext()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    event.setReplaced(new Element(ScriptQueue._queueExists(attribute.getContext(1))).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(ScriptQueue._getStats()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new dList(ScriptQueue._getQueues()).getAttribute(attribute.fulfill(1)));
    return;
  }
  event.setReplaced(event.getScriptEntry().getResidingQueue().getAttribute(attribute));
}
Program: 10270
Project: 10270
Buggy source:
public void setComparedto(String arg){
  if (operator == Comparable.Operator.MATCHES)   comparable=String.valueOf(comparable);
  if (comparable instanceof String)   comparedto=arg;
 else   if (comparable instanceof Double || comparable instanceof Integer) {
    if (aH.matchesInteger(arg))     comparedto=aH.getIntegerFrom(arg);
 else     if (aH.matchesDouble(arg))     comparedto=aH.getDoubleFrom(arg);
 else {
      dB.log(ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ "String_Node_Str"+ comparable+ "String_Node_Str"+ arg+ "String_Node_Str");
      comparedto=Double.NaN;
    }
  }
 else   if (comparable instanceof Boolean) {
    comparedto=aH.getBooleanFrom(arg);
  }
 else   if (comparable instanceof dList) {
    if (dList.matches(arg))     comparedto=dList.valueOf(arg);
 else     comparedto=arg;
  }
 else   comparedto=arg;
}

Fixed version (ground truth):
public void setComparedto(String arg){
  if (operator == Comparable.Operator.MATCHES)   comparable=String.valueOf(comparable);
  if (comparable instanceof String)   comparedto=arg;
 else   if (comparable instanceof Double || comparable instanceof Integer) {
    if (aH.matchesInteger(arg))     comparedto=aH.getIntegerFrom(arg);
 else     if (aH.matchesDouble(arg))     comparedto=aH.getDoubleFrom(arg);
 else {
      if (!arg.equalsIgnoreCase("String_Node_Str"))       dB.log(ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ "String_Node_Str"+ comparable+ "String_Node_Str"+ arg+ "String_Node_Str");
      comparedto=Double.NaN;
    }
  }
 else   if (comparable instanceof Boolean) {
    comparedto=aH.getBooleanFrom(arg);
  }
 else   if (comparable instanceof dList) {
    if (dList.matches(arg))     comparedto=dList.valueOf(arg);
 else     comparedto=arg;
  }
 else   comparedto=arg;
}
Program: 10271
Project: 10271
Buggy source:
@EventHandler public void blockForm(BlockFormEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  dMaterial material=dMaterial.getMaterialFrom(event.getBlock().getType(),event.getBlock().getData());
  context.put("String_Node_Str",new dLocation(event.getBlock().getLocation()));
  context.put("String_Node_Str",material);
  String determination=EventManager.doEvents(Arrays.asList("String_Node_Str",material.identifySimple() + "String_Node_Str"),null,null,context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}

Fixed version (ground truth):
@EventHandler public void blockForm(BlockFormEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  dMaterial material=dMaterial.getMaterialFrom(event.getNewState().getType(),event.getNewState().getData().getData());
  context.put("String_Node_Str",new dLocation(event.getBlock().getLocation()));
  context.put("String_Node_Str",material);
  String determination=EventManager.doEvents(Arrays.asList("String_Node_Str",material.identifySimple() + "String_Node_Str"),null,null,context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}
Program: 10272
Project: 10272
Buggy source:
public int asInt(){
  return Integer.valueOf(element.replaceAll("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public int asInt(){
  try {
    return Integer.valueOf(element.replaceAll("String_Node_Str","String_Node_Str"));
  }
 catch (  NumberFormatException ex) {
    dB.echoError("String_Node_Str" + element + "String_Node_Str");
    return 0;
  }
}
Program: 10277
Project: 10277
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matches("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",Element.TRUE);
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dList.class)) {
      scriptEntry.addObject("String_Node_Str",arg.asType(dList.class));
      scriptEntry.addObject("String_Node_Str",getBracedCommands(scriptEntry,1));
      break;
    }
 else     arg.reportUnhandled();
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matches("String_Node_Str")) {
      scriptEntry.addObject("String_Node_Str",Element.TRUE);
      break;
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dList.class)) {
      scriptEntry.addObject("String_Node_Str",arg.asType(dList.class));
      scriptEntry.addObject("String_Node_Str",getBracedCommands(scriptEntry,1));
      break;
    }
 else {
      arg.reportUnhandled();
      break;
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
}
Program: 10278
Project: 10278
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrimitive(aH.PrimitiveType.Integer)) {
      scriptEntry.addObject("String_Node_Str",arg.asElement());
      break;
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matches("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",Element.TRUE);
 else     arg.reportUnhandled();
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.addObject("String_Node_Str",getBracedCommands(scriptEntry,1));
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrimitive(aH.PrimitiveType.Integer)) {
      scriptEntry.addObject("String_Node_Str",arg.asElement());
      break;
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matches("String_Node_Str")) {
      scriptEntry.addObject("String_Node_Str",Element.TRUE);
      break;
    }
 else {
      arg.reportUnhandled();
      break;
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.addObject("String_Node_Str",getBracedCommands(scriptEntry,1));
}
Program: 10280
Project: 10280
Buggy source:
@EventHandler public void playerFish(PlayerFishEvent event){
  dNPC npc=null;
  String state=event.getState().name();
  Map<String,dObject> context=new HashMap<String,dObject>();
  context.put("String_Node_Str",new dEntity(event.getHook()));
  context.put("String_Node_Str",new Element(state));
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  events.add("String_Node_Str" + state);
  if (event.getCaught() != null) {
    dEntity entity=new dEntity(event.getCaught());
    context.put("String_Node_Str",entity.getDenizenObject());
    if (entity.isNPC())     npc=entity.getDenizenNPC();
    events.add("String_Node_Str" + entity.identifyType());
    events.add("String_Node_Str" + entity.identifyType() + "String_Node_Str"+ state);
  }
  String determination=EventManager.doEvents(events,npc,new dPlayer(event.getPlayer()),context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}

Fixed version (ground truth):
@EventHandler public void playerFish(PlayerFishEvent event){
  dNPC npc=null;
  String state=event.getState().name();
  Map<String,dObject> context=new HashMap<String,dObject>();
  context.put("String_Node_Str",new dEntity(event.getHook()));
  context.put("String_Node_Str",new Element(state));
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  events.add("String_Node_Str" + state);
  if (event.getCaught() != null) {
    Entity caught=event.getCaught();
    dEntity entity=new dEntity(caught);
    context.put("String_Node_Str",entity.getDenizenObject());
    if (caught instanceof Item) {
      context.put("String_Node_Str",new dItem(((Item)caught).getItemStack()));
    }
    if (entity.isNPC())     npc=entity.getDenizenNPC();
    events.add("String_Node_Str" + entity.identifyType());
    events.add("String_Node_Str" + entity.identifyType() + "String_Node_Str"+ state);
  }
  String determination=EventManager.doEvents(events,npc,new dPlayer(event.getPlayer()),context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}
Program: 10281
Project: 10281
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void creatureSpawn(CreatureSpawnEvent event){
  String reason=event.getSpawnReason().name();
  Entity entity=event.getEntity();
  entity.setMetadata("String_Node_Str",new FixedMetadataValue(DenizenAPI.getCurrentInstance(),reason));
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void creatureSpawn(CreatureSpawnEvent event){
  String reason=event.getSpawnReason().name();
  Entity entity=event.getEntity();
}
Program: 10282
Project: 10282
Buggy source:
@Override public String getAttribute(Attribute attribute){
  if (attribute == null)   return "String_Node_Str";
  if (attribute.startsWith("String_Node_Str")) {
    if (item.getItemStack().getData() instanceof Crops)     return new Element(((Crops)item.getItemStack().getData()).getState().name()).getAttribute(attribute.fulfill(1));
 else     if (item.getItemStack().getData() instanceof NetherWarts)     return new Element(((NetherWarts)item.getItemStack().getData()).getState().name()).getAttribute(attribute.fulfill(1));
 else     if (item.getItemStack().getData() instanceof CocoaPlant)     return new Element(((CocoaPlant)item.getItemStack().getData()).getSize().name()).getAttribute(attribute.fulfill(1));
  }
  return null;
}

Fixed version (ground truth):
@Override public String getAttribute(Attribute attribute){
  if (attribute == null)   return "String_Node_Str";
  if (attribute.startsWith("String_Node_Str")) {
    if (item.getItemStack().getData() instanceof Crops)     return new Element(((Crops)item.getItemStack().getData()).getState().name()).getAttribute(attribute.fulfill(1));
 else     if (item.getItemStack().getData() instanceof NetherWarts)     return new Element(((NetherWarts)item.getItemStack().getData()).getState().name()).getAttribute(attribute.fulfill(1));
 else     if (item.getItemStack().getData() instanceof CocoaPlant)     return new Element(((CocoaPlant)item.getItemStack().getData()).getSize().name()).getAttribute(attribute.fulfill(1));
 else     return new Element(item.getItemStack().getData().getData()).getAttribute(attribute.fulfill(1));
  }
  return null;
}
Program: 10284
Project: 10284
Buggy source:
@EventHandler public void entityExplode(EntityExplodeEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  if (event.getEntity() == null) {
    return;
  }
  dEntity entity=new dEntity(event.getEntity());
  context.put("String_Node_Str",entity.getDenizenObject());
  context.put("String_Node_Str",new dLocation(event.getLocation()));
  String blocks="String_Node_Str";
  for (  Block block : event.blockList()) {
    blocks=blocks + new dLocation(block.getLocation()) + "String_Node_Str";
  }
  context.put("String_Node_Str",blocks.length() > 0 ? new dList(blocks) : null);
  String determination=EventManager.doEvents(Arrays.asList("String_Node_Str",entity.identifyType() + "String_Node_Str"),null,null,context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
 else   if (determination.length() > 0 && !determination.equalsIgnoreCase("String_Node_Str")) {
    dList list=dList.valueOf(determination);
    event.blockList().clear();
    for (    String loc : list) {
      dLocation location=dLocation.valueOf(loc);
      if (location == null)       dB.echoError("String_Node_Str" + loc + "String_Node_Str");
 else       event.blockList().add(location.getWorld().getBlockAt(location));
    }
  }
}

Fixed version (ground truth):
@EventHandler public void entityExplode(EntityExplodeEvent event){
  Map<String,dObject> context=new HashMap<String,dObject>();
  if (event.getEntity() == null) {
    return;
  }
  dEntity entity=new dEntity(event.getEntity());
  context.put("String_Node_Str",entity.getDenizenObject());
  context.put("String_Node_Str",new dLocation(event.getLocation()));
  String blocks="String_Node_Str";
  for (  Block block : event.blockList()) {
    blocks=blocks + new dLocation(block.getLocation()) + "String_Node_Str";
  }
  context.put("String_Node_Str",new dList(blocks));
  String determination=EventManager.doEvents(Arrays.asList("String_Node_Str",entity.identifyType() + "String_Node_Str"),null,null,context,true);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
 else   if (determination.length() > 0 && !determination.equalsIgnoreCase("String_Node_Str")) {
    dList list=dList.valueOf(determination);
    event.blockList().clear();
    for (    String loc : list) {
      dLocation location=dLocation.valueOf(loc);
      if (location == null)       dB.echoError("String_Node_Str" + loc + "String_Node_Str");
 else       event.blockList().add(location.getWorld().getBlockAt(location));
    }
  }
}
Program: 10285
Project: 10285
Buggy source:
public dObject getHolder(){
  if (inventory.getInventory() == null)   return null;
  if (inventory.getIdType() != null && inventory.getIdType().equals("String_Node_Str") && inventory.getIdHolder() != null)   return dPlayer.valueOf(inventory.getIdHolder());
  org.bukkit.inventory.InventoryHolder holder=inventory.getInventory().getHolder();
  if (holder != null) {
    if (holder instanceof Entity && CitizensAPI.getNPCRegistry().isNPC((Entity)holder)) {
      return new dNPC(CitizensAPI.getNPCRegistry().getNPC((Entity)holder));
    }
 else     if (holder instanceof Player) {
      return new dPlayer((Player)holder);
    }
 else     if (holder instanceof Entity) {
      return new dEntity((Entity)holder);
    }
 else     if (holder instanceof BlockState) {
      return new dLocation(((BlockState)holder).getLocation());
    }
  }
 else   return new Element(inventory.getIdHolder());
  return null;
}

Fixed version (ground truth):
public dObject getHolder(){
  if (inventory.getInventory() == null)   return null;
  if (inventory.getIdType() != null && inventory.getIdType().equals("String_Node_Str") && inventory.getIdHolder() != null)   return dPlayer.valueOf(inventory.getIdHolder());
  org.bukkit.inventory.InventoryHolder holder=inventory.getInventory().getHolder();
  if (holder != null) {
    if (holder instanceof Entity && CitizensAPI.getNPCRegistry().isNPC((Entity)holder)) {
      return new dNPC(CitizensAPI.getNPCRegistry().getNPC((Entity)holder));
    }
 else     if (holder instanceof Player) {
      return new dPlayer((Player)holder);
    }
 else     if (holder instanceof Entity) {
      return new dEntity((Entity)holder);
    }
 else     if (holder instanceof DoubleChest) {
      return new dLocation(((DoubleChest)holder).getLocation());
    }
 else     if (holder instanceof BlockState) {
      return new dLocation(((BlockState)holder).getLocation());
    }
  }
 else   return new Element(inventory.getIdHolder());
  return null;
}
Program: 10286
Project: 10286
Buggy source:
public void Set(YamlConfiguration yaml,int index,String key,String value){
  if (index == -1) {
    yaml.set(key,value);
  }
 else {
    List<String> list=yaml.getStringList(key);
    if (index < 0)     index=0;
    if (index > list.size())     index=list.size() - 1;
    list.set(index,value);
    yaml.set(key,list);
  }
}

Fixed version (ground truth):
public void Set(YamlConfiguration yaml,int index,String key,String value){
  if (index == -1) {
    yaml.set(key,value);
  }
 else {
    List<String> list=yaml.getStringList(key);
    if (index < 0)     index=0;
    if (index > list.size())     index=list.size() - 1;
    if (list.size() == 0)     list.add("String_Node_Str");
    list.set(index,value);
    yaml.set(key,list);
  }
}
Program: 10287
Project: 10287
Buggy source:
public String Get(YamlConfiguration yaml,int index,String key,String def){
  if (index == -1) {
    return yaml.getString(key,def);
  }
 else {
    List<String> list=yaml.getStringList(key);
    if (index < 0)     index=0;
    if (index > list.size())     index=list.size() - 1;
    return list.get(index);
  }
}

Fixed version (ground truth):
public String Get(YamlConfiguration yaml,int index,String key,String def){
  if (index == -1) {
    return yaml.getString(key,def);
  }
 else {
    List<String> list=yaml.getStringList(key);
    if (index < 0)     index=0;
    if (index > list.size())     index=list.size() - 1;
    if (list.size() == 0)     return "String_Node_Str";
    return list.get(index);
  }
}
Program: 10288
Project: 10288
Buggy source:
@Override public void breakDown(){
  AsyncPlayerChatEvent.getHandlerList().unregister(this);
}

Fixed version (ground truth):
@Override public void breakDown(){
  PlayerChatEvent.getHandlerList().unregister(this);
}
Program: 10289
Project: 10289
Buggy source:
/** 
 * Makes the NPC sit a the specified location
 * @param location
 */
public void sit(Location location){
  DenizenAPI.getDenizenNPC(npc).action("String_Node_Str",null);
  if (npc.getBukkitEntity().getType() != EntityType.PLAYER) {
    return;
  }
  eh.getBukkitEntity().teleport(location.add(0.5,0,0.5));
  dB.log("String_Node_Str");
  eh.getDataWatcher().watch(0,Byte.valueOf((byte)0x04));
  sitting=true;
  chairLocation=location;
}

Fixed version (ground truth):
/** 
 * Makes the NPC sit a the specified location
 * @param location where to sit
 */
public void sit(Location location){
  DenizenAPI.getDenizenNPC(npc).action("String_Node_Str",null);
  if (npc.getBukkitEntity().getType() != EntityType.PLAYER) {
    return;
  }
  eh.getBukkitEntity().teleport(location.add(0.5,0,0.5));
  dB.log("String_Node_Str");
  eh.getDataWatcher().watch(0,Byte.valueOf((byte)0x04));
  sitting=true;
  chairLocation=location;
}
Program: 10290
Project: 10290
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  boolean remove_original=false;
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (arg.matchesArgumentType(dLocation.class) && !scriptEntry.hasObject("String_Node_Str") && !arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     if (arg.matchesArgumentType(dCuboid.class) && !scriptEntry.hasObject("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dCuboid.class));
 else     if (arg.matchesArgumentType(dLocation.class) && arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     if (arg.matches("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",Element.TRUE);
 else     arg.reportUnhandled();
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.defaultObject("String_Node_Str",Element.FALSE);
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (arg.matchesArgumentType(dLocation.class) && !scriptEntry.hasObject("String_Node_Str") && !arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     if (arg.matchesArgumentType(dCuboid.class) && !scriptEntry.hasObject("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dCuboid.class));
 else     if (arg.matchesArgumentType(dLocation.class) && arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     if (arg.matches("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",Element.TRUE);
 else     arg.reportUnhandled();
  }
  if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.defaultObject("String_Node_Str",Element.FALSE);
}
Program: 10291
Project: 10291
Buggy source:
public static void _saveLocations(){
  List<String> loclist=new ArrayList<String>();
  for (  Map.Entry<String,dLocation> entry : uniqueObjects.entrySet())   loclist.add(entry.getKey() + "String_Node_Str" + (entry.getValue().getBlockX() + 0.5)+ "String_Node_Str"+ entry.getValue().getBlockY()+ "String_Node_Str"+ (entry.getValue().getBlockZ() + 0.5)+ "String_Node_Str"+ entry.getValue().getYaw()+ "String_Node_Str"+ entry.getValue().getPitch()+ "String_Node_Str"+ entry.getValue().getWorld().getName());
  DenizenAPI.getCurrentInstance().getSaves().set("String_Node_Str",loclist);
}

Fixed version (ground truth):
public static void _saveLocations(){
  List<String> loclist=new ArrayList<String>();
  for (  Map.Entry<String,dLocation> entry : uniqueObjects.entrySet()) {
    if (entry == null || entry.getValue() == null || entry.getValue().getWorld() == null)     continue;
    loclist.add(entry.getKey() + "String_Node_Str" + (entry.getValue().getBlockX() + 0.5)+ "String_Node_Str"+ entry.getValue().getBlockY()+ "String_Node_Str"+ (entry.getValue().getBlockZ() + 0.5)+ "String_Node_Str"+ entry.getValue().getYaw()+ "String_Node_Str"+ entry.getValue().getPitch()+ "String_Node_Str"+ entry.getValue().getWorld().getName());
  }
  DenizenAPI.getCurrentInstance().getSaves().set("String_Node_Str",loclist);
}
Program: 10292
Project: 10292
Buggy source:
@Command(aliases={"String_Node_Str"},usage="String_Node_Str",desc="String_Node_Str",modifiers={"String_Node_Str"},min=1,max=3,permission="String_Node_Str") public void submit(CommandContext args,final CommandSender sender,NPC npc) throws CommandException {
  if (!dB.record) {
    Messaging.send(sender,ChatColor.RED + "String_Node_Str");
    return;
  }
  dB.record=false;
  Messaging.send(sender,ChatColor.GREEN + "String_Node_Str");
  final DebugSubmit submit=new DebugSubmit();
  submit.recording=dB.Recording.toString();
  dB.Recording=new StringBuilder();
  submit.start();
  BukkitRunnable task=new BukkitRunnable(){
    public void run(){
      if (!submit.isAlive()) {
        if (submit.Result == null) {
          Messaging.send(sender,ChatColor.RED + "String_Node_Str");
        }
 else {
          Messaging.send(sender,ChatColor.GREEN + "String_Node_Str" + submit.Result);
        }
        this.cancel();
      }
    }
  }
;
  task.runTaskTimer(DenizenAPI.getCurrentInstance(),0,20);
}

Fixed version (ground truth):
@Command(aliases={"String_Node_Str"},usage="String_Node_Str",desc="String_Node_Str",modifiers={"String_Node_Str"},min=1,max=3,permission="String_Node_Str") public void submit(CommandContext args,final CommandSender sender,NPC npc) throws CommandException {
  if (!dB.record) {
    Messaging.send(sender,ChatColor.RED + "String_Node_Str");
    return;
  }
  dB.record=false;
  Messaging.send(sender,ChatColor.GREEN + "String_Node_Str");
  final DebugSubmit submit=new DebugSubmit();
  submit.recording=dB.Recording.toString();
  dB.Recording=new StringBuilder();
  submit.start();
  BukkitRunnable task=new BukkitRunnable(){
    public void run(){
      if (!submit.isAlive()) {
        if (submit.Result == null) {
          Messaging.send(sender,ChatColor.RED + "String_Node_Str");
        }
 else {
          Messaging.send(sender,ChatColor.GREEN + "String_Node_Str" + submit.Result);
        }
        this.cancel();
      }
    }
  }
;
  task.runTaskTimer(DenizenAPI.getCurrentInstance(),0,10);
}
Program: 10293
Project: 10293
Buggy source:
@Override public void deconstructed(){
  InventoryClickEvent.getHandlerList().unregister(this);
}

Fixed version (ground truth):
@Override public void deconstructed(){
  InventoryClickEvent.getHandlerList().unregister(this);
  PlayerFishEvent.getHandlerList().unregister(this);
}
Program: 10294
Project: 10294
Buggy source:
public static <T extends dObject>T getObjectFrom(Class<T> dClass,String value,dPlayer player,dNPC npc){
  try {
    Matcher m=PROPERTIES_PATTERN.matcher(value);
    boolean matched=m.matches() && Adjustable.class.isAssignableFrom(dClass);
    T gotten=(T)((dClass.equals(dItem.class)) ? dItem.valueOf(matched ? m.group(1) : value,player,npc) : valueof.get(dClass).invoke(null,matched ? m.group(1) : value));
    if (gotten != null && matched) {
      String[] properties=m.group(2).split("String_Node_Str");
      for (      String property : properties) {
        String[] data=property.split("String_Node_Str",2);
        ((Adjustable)gotten).adjust(new Mechanism(new Element(data[0]),new Element(data[1].replace((char)0x2011,';'))));
      }
    }
    return gotten;
  }
 catch (  Exception e) {
    dB.echoError(e);
  }
  return null;
}

Fixed version (ground truth):
public static <T extends dObject>T getObjectFrom(Class<T> dClass,String value,dPlayer player,dNPC npc){
  try {
    List<String> matches=SeparateProperties(value);
    boolean matched=matches != null && Adjustable.class.isAssignableFrom(dClass);
    T gotten=(T)((dClass.equals(dItem.class)) ? dItem.valueOf(matched ? matches.get(0) : value,player,npc) : valueof.get(dClass).invoke(null,matched ? matches.get(0) : value));
    if (gotten != null && matched) {
      for (int i=1; i < matches.size(); i++) {
        String[] data=matches.get(i).split("String_Node_Str",2);
        ((Adjustable)gotten).adjust(new Mechanism(new Element(data[0]),new Element(data[1].replace((char)0x2011,';'))));
      }
    }
    return gotten;
  }
 catch (  Exception e) {
    dB.echoError(e);
  }
  return null;
}