Program: 10389
Project: 10389
Buggy source:
@Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  String name=scriptEntry.getElement("String_Node_Str").asString();
  String value=scriptEntry.getElement("String_Node_Str").asString();
  Action action=(Action)scriptEntry.getObject("String_Node_Str");
  Duration duration=(Duration)scriptEntry.getObject("String_Node_Str");
  dEntity target=null;
  if (scriptEntry.getObject("String_Node_Str") instanceof dEntity)   target=(dEntity)scriptEntry.getObject("String_Node_Str");
  int index=-1;
  if (name.contains("String_Node_Str")) {
    try {
      index=Integer.valueOf(name.split("String_Node_Str")[1].replace("String_Node_Str","String_Node_Str"));
    }
 catch (    Exception e) {
      index=-1;
    }
    name=name.split("String_Node_Str")[0];
  }
  dB.report(getName(),aH.debugObj("String_Node_Str",name) + (index > 0 ? aH.debugObj("String_Node_Str",String.valueOf(index)) : "String_Node_Str") + aH.debugUniqueObj("String_Node_Str",action.toString(),(value != null ? value : "String_Node_Str"))+ (duration.getSeconds() > 0 ? duration.debug() : "String_Node_Str")+ aH.debugObj("String_Node_Str",(target != null ? (target.isNPC() ? target.getNPC() : target.isPlayer() ? target.getPlayer() : target.getType()) : "String_Node_Str")));
  Flag flag=null;
  if (target == null)   flag=denizen.flagManager().getGlobalFlag(name);
 else   if (target.isPlayer())   flag=denizen.flagManager().getPlayerFlag(target.getPlayer().getName(),name);
 else   if (target.isNPC())   flag=denizen.flagManager().getNPCFlag(target.getNPC().getId(),name);
switch (action) {
case INCREASE:
case DECREASE:
case MULTIPLY:
case DIVIDE:
    double currentValue=flag.get(index).asDouble();
  flag.set(Double.toString(math(currentValue,Double.valueOf(value),action)),index);
break;
case SET_BOOLEAN:
flag.set("String_Node_Str",index);
break;
case SET_VALUE:
flag.set(value,index);
break;
case INSERT:
flag.add(value);
break;
case REMOVE:
flag.remove(value,index);
break;
case SPLIT:
flag.split(value);
break;
case DELETE:
flag.clear();
}
if (duration.getSeconds() > 0) flag.setExpiration(System.currentTimeMillis() + Double.valueOf(duration.getSeconds() * 1000).longValue());
 else flag.setExpiration(0L);
}

Fixed version (ground truth):
@Override public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
  String name=scriptEntry.getElement("String_Node_Str").asString();
  String value=scriptEntry.getElement("String_Node_Str").asString();
  Action action=(Action)scriptEntry.getObject("String_Node_Str");
  Duration duration=(Duration)scriptEntry.getObject("String_Node_Str");
  dEntity target=null;
  if (scriptEntry.getObject("String_Node_Str") instanceof dEntity)   target=(dEntity)scriptEntry.getObject("String_Node_Str");
  int index=-1;
  if (name.contains("String_Node_Str")) {
    try {
      index=Integer.valueOf(name.split("String_Node_Str")[1].replace("String_Node_Str","String_Node_Str"));
    }
 catch (    Exception e) {
      index=-1;
    }
    name=name.split("String_Node_Str")[0];
  }
  dB.report(getName(),aH.debugObj("String_Node_Str",name) + (index > 0 ? aH.debugObj("String_Node_Str",String.valueOf(index)) : "String_Node_Str") + aH.debugUniqueObj("String_Node_Str",action.toString(),(value != null ? value : "String_Node_Str"))+ (duration.getSeconds() > 0 ? duration.debug() : "String_Node_Str")+ aH.debugObj("String_Node_Str",(target != null ? (target.isNPC() ? target.getNPC().getId() : target.isPlayer() ? target.getPlayer().getName() : target.getType()) : "String_Node_Str")));
  Flag flag=null;
  if (target == null)   flag=denizen.flagManager().getGlobalFlag(name);
 else   if (target.isPlayer())   flag=denizen.flagManager().getPlayerFlag(target.getPlayer().getName(),name);
 else   if (target.isNPC())   flag=denizen.flagManager().getNPCFlag(target.getNPC().getId(),name);
switch (action) {
case INCREASE:
case DECREASE:
case MULTIPLY:
case DIVIDE:
    double currentValue=flag.get(index).asDouble();
  flag.set(Double.toString(math(currentValue,Double.valueOf(value),action)),index);
break;
case SET_BOOLEAN:
flag.set("String_Node_Str",index);
break;
case SET_VALUE:
flag.set(value,index);
break;
case INSERT:
flag.add(value);
break;
case REMOVE:
flag.remove(value,index);
break;
case SPLIT:
flag.split(value);
break;
case DELETE:
flag.clear();
}
if (duration.getSeconds() > 0) flag.setExpiration(System.currentTimeMillis() + Double.valueOf(duration.getSeconds() * 1000).longValue());
 else flag.setExpiration(0L);
}