nus-yam/ex-repair huggingface dataset:
Program: 10353
Project: 10353
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void execute(final ScriptEntry scriptEntry) throws CommandExecutionException {
  List<dEntity> entities=(List<dEntity>)scriptEntry.getObject("String_Node_Str");
  AgeType ageType=(AgeType)scriptEntry.getObject("String_Node_Str");
  int age=scriptEntry.getElement("String_Node_Str").asInt();
  boolean lock=scriptEntry.hasObject("String_Node_Str");
  dB.report(getName(),(lock ? aH.debugObj("String_Node_Str",lock) : "String_Node_Str") + (ageType != null ? aH.debugObj("String_Node_Str",ageType) : aH.debugObj("String_Node_Str",age)) + aH.debugObj("String_Node_Str",entities.toString()));
  for (  dEntity entity : entities) {
    if (entity.isSpawned()) {
      if (entity.isAgeable()) {
        if (ageType != null) {
          if (ageType.equals(AgeType.BABY))           entity.getAgeable().setBaby(true);
 else           entity.getAgeable().setBaby(false);
        }
 else         entity.getAgeable().setAge(age);
        if (lock)         entity.getAgeable().setLock(true);
      }
 else       if (entity.getBukkitEntity() instanceof Zombie) {
        if (ageType.equals(ageType.BABY))         ((Zombie)entity.getBukkitEntity()).setBaby(true);
 else         ((Zombie)entity.getBukkitEntity()).setBaby(false);
      }
 else {
        dB.echoError(entity.identify() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void execute(final ScriptEntry scriptEntry) throws CommandExecutionException {
  List<dEntity> entities=(List<dEntity>)scriptEntry.getObject("String_Node_Str");
  AgeType ageType=(AgeType)scriptEntry.getObject("String_Node_Str");
  int age=scriptEntry.getElement("String_Node_Str").asInt();
  boolean lock=scriptEntry.hasObject("String_Node_Str");
  dB.report(getName(),(lock ? aH.debugObj("String_Node_Str",lock) : "String_Node_Str") + (ageType != null ? aH.debugObj("String_Node_Str",ageType) : aH.debugObj("String_Node_Str",age)) + aH.debugObj("String_Node_Str",entities.toString()));
  for (  dEntity entity : entities) {
    if (entity.isSpawned()) {
      if (EntityAge.describes(entity)) {
        EntityAge property=EntityAge.getFrom(entity);
        if (ageType != null) {
          if (ageType.equals(AgeType.BABY))           property.setBaby(true);
 else           property.setBaby(false);
        }
 else         property.setAge(age);
        if (lock)         property.setLock(true);
      }
 else       dB.echoError(entity.identify() + "String_Node_Str");
    }
  }
}
Program: 10358
Project: 10358
Buggy source:
@Override public String identify(){
  if (item == null)   return "String_Node_Str";
  if (item.getTypeId() != 0) {
    if (isUnique()) {
      return "String_Node_Str" + NotableManager.getSavedId(this);
    }
 else     if (isItemscript()) {
      return "String_Node_Str" + getLore("String_Node_Str");
    }
  }
  return "String_Node_Str" + item.getType().name().toLowerCase();
}

Fixed version (ground truth):
@Override public String identify(){
  if (item == null)   return "String_Node_Str";
  if (item.getTypeId() != 0) {
    if (isUnique()) {
      return "String_Node_Str" + NotableManager.getSavedId(this);
    }
 else     if (isItemscript()) {
      return "String_Node_Str" + getLore("String_Node_Str");
    }
  }
  return "String_Node_Str" + dMaterial.getMaterialFrom(item.getType(),item.getData().getData()).identify().replace("String_Node_Str","String_Node_Str");
}
Program: 10361
Project: 10361
Buggy source:
/** 
 * Removes a value from the Flag's current values. If an index is specified, that specific value is removed. If no index is specified (or -1 is specified as the index), the first value that matches (values are checked as Double and String.equalsIgnoreCase) is removed. If a positive index is specified that does not exist, no removal is done.
 */
public void remove(Object obj,int index){
  checkExpired();
  if (index <= 0 && obj != null) {
    int x=0;
    for (    String val : value.values) {
      if (val.equalsIgnoreCase(String.valueOf(obj))) {
        value.values.remove(x);
        break;
      }
      try {
        if (Double.valueOf(val).equals(Double.valueOf((String)obj))) {
          value.values.remove(x);
          break;
        }
      }
 catch (      Exception e) {
      }
      x++;
    }
  }
 else   if (index < size())   value.values.remove(index - 1);
  save();
  rebuild();
}

Fixed version (ground truth):
/** 
 * Removes a value from the Flag's current values. If an index is specified, that specific value is removed. If no index is specified (or -1 is specified as the index), the first value that matches (values are checked as Double and String.equalsIgnoreCase) is removed. If a positive index is specified that does not exist, no removal is done.
 */
public void remove(Object obj,int index){
  checkExpired();
  if (index <= 0 && obj != null) {
    int x=0;
    for (    String val : value.values) {
      if (val.equalsIgnoreCase(String.valueOf(obj))) {
        value.values.remove(x);
        break;
      }
      try {
        if (Double.valueOf(val).equals(Double.valueOf((String)obj))) {
          value.values.remove(x);
          break;
        }
      }
 catch (      Exception e) {
      }
      x++;
    }
  }
 else   if (index <= size())   value.values.remove(index - 1);
  save();
  rebuild();
}
Program: 10365
Project: 10365
Buggy source:
public boolean matchesArgumentList(Class<? extends dObject> dClass){
  dList list=new dList(this.getValue());
  return list.filter(dClass) != null;
}

Fixed version (ground truth):
public boolean matchesArgumentList(Class<? extends dObject> dClass){
  dList list=new dList(this.getValue().replace("String_Node_Str","String_Node_Str"));
  return list.filter(dClass) != null;
}
Program: 10369
Project: 10369
Buggy source:
@Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  dB.report(getName(),(scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getdObject("String_Node_Str").debug() : scriptEntry.getScript().debug()) + (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getdObject("String_Node_Str").debug() : "String_Node_Str") + (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getElement("String_Node_Str").debug() : "String_Node_Str")+ (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getElement("String_Node_Str").debug() : "String_Node_Str"));
  dScript script=(dScript)scriptEntry.getObject("String_Node_Str");
  List<ScriptEntry> entries;
  if (scriptEntry.hasObject("String_Node_Str"))   entries=scriptEntry.getScript().getContainer().getEntries(scriptEntry.getPlayer(),scriptEntry.getNPC(),scriptEntry.getElement("String_Node_Str").asString());
 else   if (scriptEntry.hasObject("String_Node_Str"))   entries=script.getContainer().getEntries(scriptEntry.getPlayer(),scriptEntry.getNPC(),scriptEntry.getElement("String_Node_Str").asString());
 else   entries=script.getContainer().getBaseEntries(scriptEntry.getPlayer(),scriptEntry.getNPC());
  if (scriptEntry.hasObject("String_Node_Str"))   for (  ScriptEntry entry : entries)   entry.setInstant(true);
  scriptEntry.getResidingQueue().injectEntries(entries,0);
}

Fixed version (ground truth):
@Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  dB.report(getName(),(scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getdObject("String_Node_Str").debug() : scriptEntry.getScript().debug()) + (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getdObject("String_Node_Str").debug() : "String_Node_Str") + (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getElement("String_Node_Str").debug() : "String_Node_Str")+ (scriptEntry.hasObject("String_Node_Str") ? scriptEntry.getElement("String_Node_Str").debug() : "String_Node_Str"));
  dScript script=(dScript)scriptEntry.getObject("String_Node_Str");
  List<ScriptEntry> entries;
  if (scriptEntry.hasObject("String_Node_Str"))   entries=scriptEntry.getScript().getContainer().getEntries(scriptEntry.getPlayer(),scriptEntry.getNPC(),scriptEntry.getElement("String_Node_Str").asString());
 else   if (scriptEntry.hasObject("String_Node_Str"))   entries=script.getContainer().getEntries(scriptEntry.getPlayer(),scriptEntry.getNPC(),scriptEntry.getElement("String_Node_Str").asString());
 else   entries=script.getContainer().getBaseEntries(scriptEntry.getPlayer(),scriptEntry.getNPC());
  if (scriptEntry.hasObject("String_Node_Str"))   for (  ScriptEntry entry : entries)   entry.setInstant(true);
  ScriptBuilder.addObjectToEntries(entries,"String_Node_Str",scriptEntry.getObject("String_Node_Str"));
  scriptEntry.getResidingQueue().injectEntries(entries,0);
}
Program: 10370
Project: 10370
Buggy source:
public static void _buildCoreYamlScriptContainers(FileConfiguration yamlScripts){
  Set<String> scripts=yamlScripts.getKeys(false);
  for (  String scriptName : scripts)   if (yamlScripts.contains(scriptName + "String_Node_Str")) {
    String type=yamlScripts.getString(scriptName + "String_Node_Str");
    if (!scriptContainerTypes.containsKey(type.toUpperCase())) {
      dB.log("String_Node_Str" + scriptName + "String_Node_Str"+ type+ "String_Node_Str");
      continue;
    }
    Class typeClass=scriptContainerTypes.get(type.toUpperCase());
    try {
      scriptContainers.put(scriptName,typeClass.getConstructor(ConfigurationSection.class,String.class).newInstance(ScriptHelper._gs().getConfigurationSection(scriptName),scriptName));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public static void _buildCoreYamlScriptContainers(FileConfiguration yamlScripts){
  scriptContainers.clear();
  WorldScriptHelper.world_scripts.clear();
  ItemScriptHelper.item_scripts.clear();
  Set<String> scripts=yamlScripts.getKeys(false);
  for (  String scriptName : scripts)   if (yamlScripts.contains(scriptName + "String_Node_Str")) {
    String type=yamlScripts.getString(scriptName + "String_Node_Str");
    if (!scriptContainerTypes.containsKey(type.toUpperCase())) {
      dB.log("String_Node_Str" + scriptName + "String_Node_Str"+ type+ "String_Node_Str");
      continue;
    }
    Class typeClass=scriptContainerTypes.get(type.toUpperCase());
    try {
      scriptContainers.put(scriptName,typeClass.getConstructor(ConfigurationSection.class,String.class).newInstance(ScriptHelper._gs().getConfigurationSection(scriptName),scriptName));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 10373
Project: 10373
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.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.getValue().toLowerCase());
 else     if (!scriptEntry.hasObject("String_Node_Str") && !arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.getValue());
  }
  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.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.getValue().toLowerCase());
 else     if (!scriptEntry.hasObject("String_Node_Str") && !arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.raw_value);
  }
  if (!scriptEntry.hasObject("String_Node_Str") || !scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
}
Program: 10374
Project: 10374
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesEnum(Action.values()))     scriptEntry.addObject("String_Node_Str",Action.valueOf(arg.getValue().toUpperCase()));
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrimitive(aH.PrimitiveType.Double) && arg.matchesPrefix(RANGE_ARG))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix(ID_ARG))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dLocation.class))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     dB.echoError("String_Node_Str" + arg.raw_value + "String_Node_Str");
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesEnum(Action.values()))     scriptEntry.addObject("String_Node_Str",Action.valueOf(arg.getValue().toUpperCase()));
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrimitive(aH.PrimitiveType.Double) && arg.matchesPrefix(RANGE_ARG))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix(ID_ARG))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dLocation.class))     scriptEntry.addObject("String_Node_Str",arg.asType(dLocation.class));
 else     dB.echoError("String_Node_Str" + arg.raw_value + '\'');
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str" + Action.values());
}
Program: 10376
Project: 10376
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  if (scriptEntry.getArguments().size() > 4)   throw new InvalidArgumentsException(Messages.ERROR_LOTS_OF_ARGUMENTS);
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix("String_Node_Str")) {
      FormatScriptContainer format=null;
      String formatStr=arg.asElement().asString();
      format=ScriptRegistry.getScriptContainerAs(formatStr,FormatScriptContainer.class);
      if (format == null)       dB.echoError("String_Node_Str" + formatStr);
      scriptEntry.addObject("String_Node_Str",format);
    }
 else     if ((arg.matchesPrefix("String_Node_Str") || arg.matchesPrefix("String_Node_Str"))) {
      scriptEntry.addObject("String_Node_Str",((dList)arg.asType(dList.class)).filter(dPlayer.class));
    }
 else {
      if (!scriptEntry.hasObject("String_Node_Str"))       scriptEntry.addObject("String_Node_Str",arg.asElement());
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",(scriptEntry.hasPlayer() ? Arrays.asList(scriptEntry.getPlayer()) : null));
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException(Messages.ERROR_NO_TEXT);
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  if (scriptEntry.getArguments().size() > 4)   throw new InvalidArgumentsException(Messages.ERROR_LOTS_OF_ARGUMENTS);
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix(FORMAT_ARG)) {
      FormatScriptContainer format=null;
      String formatStr=arg.getValue();
      format=ScriptRegistry.getScriptContainerAs(formatStr,FormatScriptContainer.class);
      if (format == null)       dB.echoError("String_Node_Str" + formatStr + '\'');
      scriptEntry.addObject("String_Node_Str",format);
    }
 else     if ((arg.matchesPrefix("String_Node_Str") || arg.matchesPrefix(TARGET_ARG))) {
      scriptEntry.addObject("String_Node_Str",((dList)arg.asType(dList.class)).filter(dPlayer.class));
    }
 else {
      if (!scriptEntry.hasObject("String_Node_Str"))       scriptEntry.addObject("String_Node_Str",new Element(arg.raw_value));
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",(scriptEntry.hasPlayer() ? Arrays.asList(scriptEntry.getPlayer()) : null));
  if (!scriptEntry.hasObject("String_Node_Str"))   throw new InvalidArgumentsException(Messages.ERROR_NO_TEXT);
}
Program: 10377
Project: 10377
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  List<aH.Argument> arguments=new ArrayList<aH.Argument>();
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesEnum(Action.values()))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix("String_Node_Str") && arg.matchesArgumentType(dScript.class))     scriptEntry.addObject("String_Node_Str",arg.asType(dScript.class));
    arguments.add(arg);
  }
  scriptEntry.defaultObject("String_Node_Str",new Element("String_Node_Str"));
  scriptEntry.defaultObject("String_Node_Str",new Element(UUID.randomUUID().toString()));
  if (!scriptEntry.hasObject("String_Node_Str") && scriptEntry.getElement("String_Node_Str").asString().equalsIgnoreCase("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  if (scriptEntry.getPlayer() == null)   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.addObject("String_Node_Str",arguments);
}

Fixed version (ground truth):
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  List<aH.Argument> arguments=new ArrayList<aH.Argument>();
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesEnum(Action.values()))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesPrefix("String_Node_Str") && arg.matchesArgumentType(dScript.class))     scriptEntry.addObject("String_Node_Str",arg.asType(dScript.class));
 else     if (!scriptEntry.hasObject("String_Node_Str"))     scriptEntry.addObject("String_Node_Str",arg.asElement());
    arguments.add(arg);
  }
  scriptEntry.defaultObject("String_Node_Str",new Element("String_Node_Str"));
  scriptEntry.defaultObject("String_Node_Str",new Element(UUID.randomUUID().toString()));
  if (!scriptEntry.hasObject("String_Node_Str") && scriptEntry.getElement("String_Node_Str").asString().equalsIgnoreCase("String_Node_Str"))   throw new InvalidArgumentsException("String_Node_Str");
  if (scriptEntry.getPlayer() == null)   throw new InvalidArgumentsException("String_Node_Str");
  scriptEntry.addObject("String_Node_Str",arguments);
}
Program: 10382
Project: 10382
Buggy source:
/** 
 * Clears all values from a flag, essentially making it null.
 */
public void clear(){
  List<String> world_script_events=new ArrayList<String>();
  Map<String,Object> context=new HashMap<String,Object>();
  dPlayer player=null;
  if (dPlayer.matches(flagOwner))   player=dPlayer.valueOf(flagOwner);
  dNPC npc=null;
  if (dNPC.matches(flagOwner))   npc=dNPC.valueOf(flagOwner);
  String type;
  if (player != null) {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
 else   if (npc != null) {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
 else {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
  context.put("String_Node_Str",flagOwner);
  context.put("String_Node_Str",flagName);
  context.put("String_Node_Str",type);
  context.put("String_Node_Str",value.size() > 1 ? new dList(denizen.getSaves().getStringList(flagPath)) : value.size() == 1 ? new Element(value.get(0).asString()) : "String_Node_Str");
  world_script_events.add("String_Node_Str");
  denizen.getSaves().set(flagPath,null);
  denizen.getSaves().set(flagPath + "String_Node_Str",null);
  rebuild();
  WorldScriptHelper.doEvents(world_script_events,npc,player != null ? player.getPlayerEntity() : null,context);
}

Fixed version (ground truth):
/** 
 * Clears all values from a flag, essentially making it null.
 */
public void clear(){
  List<String> world_script_events=new ArrayList<String>();
  Map<String,dObject> context=new HashMap<String,dObject>();
  dPlayer player=null;
  if (dPlayer.matches(flagOwner))   player=dPlayer.valueOf(flagOwner);
  dNPC npc=null;
  if (dNPC.matches(flagOwner))   npc=dNPC.valueOf(flagOwner);
  String type;
  if (player != null) {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
 else   if (npc != null) {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
 else {
    type="String_Node_Str";
    world_script_events.add("String_Node_Str");
    world_script_events.add("String_Node_Str" + flagName + "String_Node_Str");
  }
  context.put("String_Node_Str",Element.valueOf(flagOwner));
  context.put("String_Node_Str",Element.valueOf(flagName));
  context.put("String_Node_Str",Element.valueOf(type));
  context.put("String_Node_Str",value.size() > 1 ? new dList(denizen.getSaves().getStringList(flagPath)) : value.size() == 1 ? new Element(value.get(0).asString()) : Element.valueOf("String_Node_Str"));
  world_script_events.add("String_Node_Str");
  denizen.getSaves().set(flagPath,null);
  denizen.getSaves().set(flagPath + "String_Node_Str",null);
  rebuild();
  WorldScriptHelper.doEvents(world_script_events,npc,player != null ? player.getPlayerEntity() : null,context);
}
Program: 10383
Project: 10383
Buggy source:
private void callAction(String act,Entity ent){
  Map<String,Object> context=new HashMap<String,Object>();
  context.put("String_Node_Str",new dEntity(ent));
  dnpc.action("String_Node_Str" + act + "String_Node_Str",null,context);
  dnpc.action(ent.getType().name() + "String_Node_Str" + act+ "String_Node_Str",null,context);
}

Fixed version (ground truth):
private void callAction(String act,Entity ent){
  Map<String,dObject> context=new HashMap<String,dObject>();
  context.put("String_Node_Str",new dEntity(ent));
  dnpc.action("String_Node_Str" + act + "String_Node_Str",null,context);
  dnpc.action(ent.getType().name() + "String_Node_Str" + act+ "String_Node_Str",null,context);
}
Program: 10385
Project: 10385
Buggy source:
@EventHandler public void contextTags(ReplaceableTagEvent event){
  if (!event.matches("String_Node_Str") || event.getScriptEntry() == null)   return;
  String type=event.getType();
  if (event.getScriptEntry().getResidingQueue().hasContext(type)) {
    Attribute attribute=new Attribute(event.raw_tag,event.getScriptEntry());
    event.setReplaced(event.getScriptEntry().getResidingQueue().getContext(type).getAttribute(attriute.fulfill(2)));
  }
  if (!ScriptRegistry.containsScript(event.getScriptEntry().getScript().getName(),TaskScriptContainer.class))   return;
  TaskScriptContainer script=ScriptRegistry.getScriptContainerAs(event.getScriptEntry().getScript().getName(),TaskScriptContainer.class);
  ScriptEntry entry=event.getScriptEntry();
  if (entry.hasObject("String_Node_Str")) {
    Map<String,String> context=(HashMap<String,String>)entry.getObject("String_Node_Str");
    Map<String,Integer> id=script.getContextMap();
    if (context.containsKey(String.valueOf(id.get(type.toUpperCase())))) {
      event.setReplaced(context.get(String.valueOf(id.get(type.toUpperCase()))));
    }
  }
 else   event.setReplaced("String_Node_Str");
}

Fixed version (ground truth):
@EventHandler public void contextTags(ReplaceableTagEvent event){
  if (!event.matches("String_Node_Str") || event.getScriptEntry() == null)   return;
  String type=event.getType();
  if (event.getScriptEntry().getResidingQueue().hasContext(type)) {
    Attribute attribute=new Attribute(event.raw_tag,event.getScriptEntry());
    event.setReplaced(event.getScriptEntry().getResidingQueue().getContext(type).getAttribute(attribute.fulfill(2)));
  }
  if (!ScriptRegistry.containsScript(event.getScriptEntry().getScript().getName(),TaskScriptContainer.class))   return;
  TaskScriptContainer script=ScriptRegistry.getScriptContainerAs(event.getScriptEntry().getScript().getName(),TaskScriptContainer.class);
  ScriptEntry entry=event.getScriptEntry();
  if (entry.hasObject("String_Node_Str")) {
    Map<String,String> context=(HashMap<String,String>)entry.getObject("String_Node_Str");
    Map<String,Integer> id=script.getContextMap();
    if (context.containsKey(String.valueOf(id.get(type.toUpperCase())))) {
      event.setReplaced(context.get(String.valueOf(id.get(type.toUpperCase()))));
    }
  }
 else   event.setReplaced("String_Node_Str");
}
Program: 10386
Project: 10386
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.Double))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dList.class)) {
      scriptEntry.addObject("String_Node_Str",((dList)arg.asType(dList.class)).filter(dEntity.class));
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dEntity.class)) {
      scriptEntry.addObject("String_Node_Str",Arrays.asList(arg.asType(dEntity.class)));
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",new Element(Integer.MAX_VALUE));
  if (!scriptEntry.hasObject("String_Node_Str")) {
    List<dEntity> entities=new ArrayList<dEntity>();
    if (scriptEntry.getPlayer() != null)     entities.add(scriptEntry.getPlayer().getDenizenEntity());
 else     if (scriptEntry.getNPC() != null)     entities.add(scriptEntry.getNPC().getDenizenEntity());
 else     throw new InvalidArgumentsException("String_Node_Str");
    scriptEntry.addObject("String_Node_Str",entities);
  }
}

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.Double))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dList.class)) {
      scriptEntry.addObject("String_Node_Str",((dList)arg.asType(dList.class)).filter(dEntity.class));
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dEntity.class)) {
      scriptEntry.addObject("String_Node_Str",Arrays.asList(arg.asType(dEntity.class)));
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",new Element(-1));
  if (!scriptEntry.hasObject("String_Node_Str")) {
    List<dEntity> entities=new ArrayList<dEntity>();
    if (scriptEntry.getPlayer() != null)     entities.add(scriptEntry.getPlayer().getDenizenEntity());
 else     if (scriptEntry.getNPC() != null)     entities.add(scriptEntry.getNPC().getDenizenEntity());
 else     throw new InvalidArgumentsException("String_Node_Str");
    scriptEntry.addObject("String_Node_Str",entities);
  }
}
Program: 10387
Project: 10387
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  List<dEntity> entities=(List<dEntity>)scriptEntry.getObject("String_Node_Str");
  Element amountelement=scriptEntry.getElement("String_Node_Str");
  dB.report(getName(),amountelement.debug() + aH.debugObj("String_Node_Str",entities));
  if (amountelement.asInt() == Integer.MAX_VALUE)   for (  dEntity entity : entities)   entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
 else {
    double amount=amountelement.asDouble();
    for (    dEntity entity : entities)     if (entity.getLivingEntity().getHealth() + amount < entity.getLivingEntity().getMaxHealth())     entity.getLivingEntity().setHealth(entity.getLivingEntity().getHealth() + amount);
 else     entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  List<dEntity> entities=(List<dEntity>)scriptEntry.getObject("String_Node_Str");
  Element amountelement=scriptEntry.getElement("String_Node_Str");
  dB.report(getName(),amountelement.debug() + aH.debugObj("String_Node_Str",entities));
  if (amountelement.asDouble() == -1)   for (  dEntity entity : entities)   entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
 else {
    double amount=amountelement.asDouble();
    for (    dEntity entity : entities)     if (entity.getLivingEntity().getHealth() + amount < entity.getLivingEntity().getMaxHealth())     entity.getLivingEntity().setHealth(entity.getLivingEntity().getHealth() + amount);
 else     entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
  }
}
Program: 10392
Project: 10392
Buggy source:
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
  for (  aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {
    if (!scriptEntry.hasObject("String_Node_Str") && !scriptEntry.hasObject("String_Node_Str") && arg.hasPrefix()&& arg.getPrefix().matchesArgumentType(dScript.class)) {
      scriptEntry.addObject("String_Node_Str",arg.getPrefix().asType(dScript.class));
      scriptEntry.addObject("String_Node_Str",arg.asElement());
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dScript.class)) {
      scriptEntry.addObject("String_Node_Str",arg.asType(dScript.class));
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && (arg.matchesPrimitive(aH.PrimitiveType.String) || arg.matchesPrimitive(aH.PrimitiveType.Integer))) {
      scriptEntry.addObject("String_Node_Str",arg.asElement());
      dB.echoDebug(Messages.DEBUG_SET_STEP,arg.toString());
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(Duration.class)) {
      scriptEntry.addObject("String_Node_Str",arg.asType(Duration.class));
    }
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",scriptEntry.getScript());
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",new Duration(-1d));
}

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") && !scriptEntry.hasObject("String_Node_Str") && arg.hasPrefix()&& arg.getPrefix().matchesArgumentType(dScript.class)) {
      scriptEntry.addObject("String_Node_Str",arg.getPrefix().asType(dScript.class));
      scriptEntry.addObject("String_Node_Str",arg.asElement());
    }
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(dScript.class))     scriptEntry.addObject("String_Node_Str",arg.asType(dScript.class));
 else     if (!scriptEntry.hasObject("String_Node_Str") && (arg.matchesPrimitive(aH.PrimitiveType.String) || arg.matchesPrimitive(aH.PrimitiveType.Integer)))     scriptEntry.addObject("String_Node_Str",arg.asElement());
 else     if (!scriptEntry.hasObject("String_Node_Str") && arg.matchesArgumentType(Duration.class))     scriptEntry.addObject("String_Node_Str",arg.asType(Duration.class));
  }
  if (!scriptEntry.hasObject("String_Node_Str"))   scriptEntry.addObject("String_Node_Str",scriptEntry.getScript());
  if (!scriptEntry.hasPlayer() || !scriptEntry.getPlayer().isValid())   throw new InvalidArgumentsException("String_Node_Str");
}
Program: 10394
Project: 10394
Buggy source:
@EventHandler public static void blockBreaks(BlockBreakEvent event){
  dLocation location=new dLocation(event.getBlock().getLocation());
  for (  Viewer viewer : viewers.values())   if (location.equals(viewer.getLocation())) {
    event.getPlayer().sendMessage(ChatColor.RED + "String_Node_Str");
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
@EventHandler public static void blockBreaks(BlockBreakEvent event){
  dLocation location=new dLocation(event.getBlock().getLocation());
  for (  Viewer viewer : viewers.values())   if (Utilities.isBlock(location,viewer.getLocation())) {
    event.getPlayer().sendMessage(ChatColor.RED + "String_Node_Str");
    event.setCancelled(true);
  }
}
Program: 10395
Project: 10395
Buggy source:
@EventHandler public static void reloadViewers(SavesReloadEvent event){
  for (  Viewer viewer : viewers.values()) {
    Bukkit.getScheduler().cancelTask(viewer.getTask());
  }
  viewers.clear();
  FileConfiguration saves=DenizenAPI.getCurrentInstance().getSaves();
  for (  String key : saves.getConfigurationSection("String_Node_Str").getKeys(false)) {
    Viewer viewer=new Viewer(key,saves.getString("String_Node_Str" + key.toLowerCase() + "String_Node_Str"),dLocation.valueOf(saves.getString("String_Node_Str" + key.toLowerCase() + "String_Node_Str")));
    viewers.put(key,viewer);
    final Sign sign=(Sign)viewer.getLocation().getBlock().getState();
    final String[] content=viewer.getContent().split("String_Node_Str");
    if (viewer.getContent().startsWith("String_Node_Str")) {
      int task=Bukkit.getScheduler().scheduleSyncRepeatingTask(DenizenAPI.getCurrentInstance(),new Runnable(){
        public void run(){
          Player player=Bukkit.getPlayerExact(content[1]);
          if (player == null)           Utilities.setSignLines((Sign)sign,new String[]{"String_Node_Str",content[1],"String_Node_Str","String_Node_Str"});
 else           Utilities.setSignLines((Sign)sign,new String[]{String.valueOf(player.getLocation().getX()),String.valueOf(player.getLocation().getY()),String.valueOf(player.getLocation().getZ()),player.getWorld().getName()});
        }
      }
,0,20);
      viewer.setTask(task);
    }
  }
}

Fixed version (ground truth):
@EventHandler public static void reloadViewers(SavesReloadEvent event){
  for (  Viewer viewer : viewers.values()) {
    Bukkit.getScheduler().cancelTask(viewer.getTask());
  }
  viewers.clear();
  FileConfiguration saves=DenizenAPI.getCurrentInstance().getSaves();
  if (saves.contains("String_Node_Str"))   for (  String key : saves.getConfigurationSection("String_Node_Str").getKeys(false)) {
    Viewer viewer=new Viewer(key,saves.getString("String_Node_Str" + key.toLowerCase() + "String_Node_Str"),dLocation.valueOf(saves.getString("String_Node_Str" + key.toLowerCase() + "String_Node_Str")));
    viewers.put(key,viewer);
    final Sign sign=(Sign)viewer.getLocation().getBlock().getState();
    final String[] content=viewer.getContent().split("String_Node_Str");
    if (viewer.getContent().startsWith("String_Node_Str")) {
      int task=Bukkit.getScheduler().scheduleSyncRepeatingTask(DenizenAPI.getCurrentInstance(),new Runnable(){
        public void run(){
          Player player=Bukkit.getPlayerExact(content[1]);
          if (player == null)           Utilities.setSignLines((Sign)sign,new String[]{"String_Node_Str",content[1],"String_Node_Str","String_Node_Str"});
 else           Utilities.setSignLines((Sign)sign,new String[]{String.valueOf(player.getLocation().getX()),String.valueOf(player.getLocation().getY()),String.valueOf(player.getLocation().getZ()),player.getWorld().getName()});
        }
      }
,0,20);
      viewer.setTask(task);
    }
  }
 else   return;
}
Program: 10396
Project: 10396
Buggy source:
public boolean matches(String string){
  return value.equalsIgnoreCase(string);
}

Fixed version (ground truth):
public boolean matches(String values){
  for (  String value : values.split("String_Node_Str"))   if (value.trim().equalsIgnoreCase(this.value))   return true;
  return false;
}
Program: 10399
Project: 10399
Buggy source:
@Override public boolean check(RequirementsContext context,List<String> args) throws RequirementCheckException {
  for (  String arg : args) {
    if (aH.matchesQuantity(arg)) {
      quantity=aH.getIntegerFrom(arg);
      dB.echoDebug("String_Node_Str" + quantity);
      continue;
    }
 else     if (aH.matchesItem(arg)) {
      if (ScriptRegistry.getScriptContainerAs(aH.getStringFrom(arg),ItemScriptContainer.class) != null) {
        item=ScriptRegistry.getScriptContainerAs(aH.getStringFrom(arg),ItemScriptContainer.class).getItemFrom(context.getPlayer(),context.getNPC()).getItemStack();
        dB.echoDebug("String_Node_Str");
        continue;
      }
 else {
        item=aH.getItemFrom(arg).getItemStack();
        dB.echoDebug("String_Node_Str");
        continue;
      }
    }
 else     if (aH.matchesItem("String_Node_Str" + arg)) {
      item=aH.getItemFrom("String_Node_Str" + arg).getItemStack();
      dB.echoDebug("String_Node_Str");
      continue;
    }
 else     throw new RequirementCheckException("String_Node_Str");
  }
  if (context.getPlayer().getPlayerEntity().getInventory().containsAtLeast(item,quantity)) {
    dB.echoDebug("String_Node_Str");
    return true;
  }
 else {
    dB.echoDebug("String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean check(RequirementsContext context,List<String> args) throws RequirementCheckException {
  dItem contains=null;
  int quantity=1;
  for (  aH.Argument arg : aH.interpret(args)) {
    if (contains == null && arg.matchesArgumentType(dItem.class))     contains=arg.asType(dItem.class);
 else     if (arg.matchesPrimitive(aH.PrimitiveType.Integer))     quantity=aH.getIntegerFrom(arg.getValue());
  }
  if (context.getPlayer().getPlayerEntity().getInventory().containsAtLeast(contains.getItemStack(),quantity)) {
    dB.echoDebug("String_Node_Str" + contains.identify() + "String_Node_Str");
    return true;
  }
 else {
    dB.echoDebug("String_Node_Str" + contains.identify() + "String_Node_Str");
    return false;
  }
}
Program: 10400
Project: 10400
Buggy source:
public boolean startsWith(String string,int attribute){
  string=string.toLowerCase();
  if (attributes.isEmpty())   return false;
  if (attributes.size() < attribute)   return false;
  if (raw_tag.split("String_Node_Str",attribute)[2].toLowerCase().startsWith(string))   return true;
  return false;
}

Fixed version (ground truth):
public boolean startsWith(String string,int attribute){
  string=string.toLowerCase();
  if (attributes.isEmpty())   return false;
  if (attributes.size() < attribute)   return false;
  if (raw_tag.split("String_Node_Str",attribute)[attribute - 1].toLowerCase().startsWith(string))   return true;
  return false;
}
Program: 10401
Project: 10401
Buggy source:
@EventHandler public void entityTarget(EntityTargetEvent event){
  Map<String,Object> context=new HashMap<String,Object>();
  Entity entity=event.getEntity();
  Entity target=event.getTarget();
  context.put("String_Node_Str",event.getReason().name());
  context.put("String_Node_Str",new dEntity(entity));
  if (event.getTarget() instanceof Player) {
    context.put("String_Node_Str",new dPlayer((Player)target));
  }
 else {
    context.put("String_Node_Str",new dEntity(target));
  }
  String determination=doEvents(Arrays.asList(entity.getType().name() + "String_Node_Str" + target.getType().name(),entity.getType().name() + "String_Node_Str" + target.getType().name()+ "String_Node_Str"+ event.getReason().name()),null,null,context);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
  if (determination.toUpperCase().startsWith("String_Node_Str")) {
    dEntity newTarget=dEntity.valueOf(aH.getStringFrom(determination));
    if (newTarget.getBukkitEntity() != null) {
      event.setTarget(newTarget.getBukkitEntity());
    }
  }
}

Fixed version (ground truth):
@EventHandler public void entityTarget(EntityTargetEvent event){
  Map<String,Object> context=new HashMap<String,Object>();
  Entity entity=event.getEntity();
  Entity target=event.getTarget();
  Player player=null;
  String reason=event.getReason().name();
  String entityType=entity.getType().name();
  context.put("String_Node_Str",new dEntity(entity));
  context.put("String_Node_Str",reason);
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  events.add("String_Node_Str" + reason);
  events.add(entityType + "String_Node_Str" + reason);
  if (target != null) {
    if (event.getTarget() instanceof Player) {
      player=(Player)target;
      context.put("String_Node_Str",new dPlayer(player));
    }
 else {
      context.put("String_Node_Str",new dEntity(target));
    }
    String targetType=target.getType().name();
    events.add("String_Node_Str");
    events.add("String_Node_Str" + reason);
    events.add("String_Node_Str" + targetType);
    events.add("String_Node_Str" + targetType + "String_Node_Str"+ reason);
    events.add(entityType + "String_Node_Str");
    events.add(entityType + "String_Node_Str" + reason);
    events.add(entityType + "String_Node_Str" + targetType);
    events.add(entityType + "String_Node_Str" + targetType+ "String_Node_Str"+ reason);
  }
  String determination=doEvents(events,null,player,context);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
  if (determination.toUpperCase().startsWith("String_Node_Str")) {
    dEntity newTarget=dEntity.valueOf(aH.getStringFrom(determination));
    if (newTarget.getBukkitEntity() != null) {
      event.setTarget(newTarget.getBukkitEntity());
    }
  }
}
Program: 10402
Project: 10402
Buggy source:
public boolean determineOutcome(){
  outcome=false;
  if (comparable instanceof String) {
    compare_as_strings();
    return outcome;
  }
 else   if (comparable instanceof dList) {
    compare_as_list();
    return outcome;
  }
 else   if (comparable instanceof Double) {
    compare_as_numbers();
    return outcome;
  }
 else   if (comparable instanceof Boolean) {
    if (!(comparedto instanceof Boolean)) {
    }
 else {
      if (comparable.equals(comparedto))       outcome=true;
 else       outcome=false;
    }
  }
  if (logic == Comparable.Logic.NEGATIVE)   outcome=!outcome;
  return outcome;
}

Fixed version (ground truth):
public boolean determineOutcome(){
  outcome=false;
  if (comparable instanceof String) {
    compare_as_strings();
  }
 else   if (comparable instanceof dList) {
    compare_as_list();
  }
 else   if (comparable instanceof Double) {
    compare_as_numbers();
  }
 else   if (comparable instanceof Boolean) {
    if (!(comparedto instanceof Boolean)) {
    }
 else {
      if (comparable.equals(comparedto))       outcome=true;
 else       outcome=false;
    }
  }
  if (logic == Comparable.Logic.NEGATIVE)   outcome=!outcome;
  return outcome;
}
Program: 10403
Project: 10403
Buggy source:
@Override public String identify(){
  if (isSaved(this))   return "String_Node_Str" + getSaved(this);
 else   if (CustomNBT.hasCustomNBT(getItemStack(),"String_Node_Str"))   return CustomNBT.getCustomNBT(getItemStack(),"String_Node_Str");
 else   if (getItemStack() != null)   return getItemStack().getType().name().toLowerCase() + (getItemStack().getData().getData() != 0 ? "String_Node_Str" + getItemStack().getData().getData() : "String_Node_Str");
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String identify(){
  if (getItemStack() == null)   return null;
  if (getItemStack().getTypeId() != 0) {
    if (isSaved(this))     return "String_Node_Str" + getSaved(this);
 else     if (CustomNBT.hasCustomNBT(getItemStack(),"String_Node_Str"))     return CustomNBT.getCustomNBT(getItemStack(),"String_Node_Str");
  }
  return getItemStack().getType().name().toLowerCase() + (getItemStack().getData().getData() != 0 ? "String_Node_Str" + getItemStack().getData().getData() : "String_Node_Str");
}
Program: 10405
Project: 10405
Buggy source:
@EventHandler public void playerInteractEntity(PlayerInteractEntityEvent event){
  Entity entity=event.getRightClicked();
  String determination;
  Map<String,Object> context=new HashMap<String,Object>();
  context.put("String_Node_Str",new dLocation(event.getRightClicked().getLocation()));
  if (entity instanceof Player) {
    context.put("String_Node_Str",new dPlayer((Player)entity));
  }
 else {
    context.put("String_Node_Str",new dEntity(entity));
  }
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  events.add("String_Node_Str" + entity.getType().name());
  if (entity instanceof ItemFrame) {
    dItem item=new dItem(((ItemFrame)entity).getItem());
    context.put("String_Node_Str",item);
    events.add("String_Node_Str" + entity.getType().name() + "String_Node_Str"+ item.identify().split("String_Node_Str")[0]);
  }
  determination=doEvents(events,null,event.getPlayer(),context);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}

Fixed version (ground truth):
@EventHandler public void playerInteractEntity(PlayerInteractEntityEvent event){
  Entity entity=event.getRightClicked();
  dItem item=new dItem(event.getPlayer().getItemInHand());
  String determination;
  Map<String,Object> context=new HashMap<String,Object>();
  context.put("String_Node_Str",new dLocation(event.getRightClicked().getLocation()));
  if (entity instanceof Player) {
    context.put("String_Node_Str",new dPlayer((Player)entity));
  }
 else {
    context.put("String_Node_Str",new dEntity(entity));
  }
  List<String> events=new ArrayList<String>();
  events.add("String_Node_Str");
  events.add("String_Node_Str" + entity.getType().name());
  events.add("String_Node_Str" + item.identify().split("String_Node_Str")[0]);
  events.add("String_Node_Str" + item.identify());
  events.add("String_Node_Str" + entity.getType().name() + "String_Node_Str"+ item.identify().split("String_Node_Str")[0]);
  events.add("String_Node_Str" + entity.getType().name() + "String_Node_Str"+ item.identify());
  if (entity instanceof ItemFrame) {
    dItem itemFrame=new dItem(((ItemFrame)entity).getItem());
    context.put("String_Node_Str",itemFrame);
    events.add("String_Node_Str" + entity.getType().name() + "String_Node_Str"+ itemFrame.identify().split("String_Node_Str")[0]);
  }
  determination=doEvents(events,null,event.getPlayer(),context);
  if (determination.toUpperCase().startsWith("String_Node_Str"))   event.setCancelled(true);
}
Program: 10406
Project: 10406
Buggy source:
/** 
 * To be used with the dBuggers' .report to provide debug output for objects that don't extend dObject.
 * @param prefix  name/type/simple description of the object being reported
 * @param value  object being reported will report the value of toString()
 * @return  color coded debug report
 */
public static String debugObj(String prefix,Object value){
  return "String_Node_Str" + prefix + "String_Node_Str"+ value.toString()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * To be used with the dBuggers' .report to provide debug output for objects that don't extend dObject.
 * @param prefix  name/type/simple description of the object being reported
 * @param value  object being reported will report the value of toString()
 * @return  color coded debug report
 */
public static String debugObj(String prefix,Object value){
  return "String_Node_Str" + prefix + "String_Node_Str"+ (value != null ? value.toString() : "String_Node_Str")+ "String_Node_Str";
}