Program: 10381
Project: 10381
Buggy source:
/** 
 * Saves the current values in this object to the Denizen saves.yml. This is called internally when needed, but might be useful to call if you are extending the usage of Flags yourself.
 */
public void save(){
  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,value.values);
  denizen.getSaves().set(flagPath + "String_Node_Str",(expiration > 0 ? expiration : null));
  rebuild();
  WorldScriptHelper.doEvents(world_script_events,npc,player != null ? player.getPlayerEntity() : null,context);
}

Fixed version (ground truth):
/** 
 * Saves the current values in this object to the Denizen saves.yml. This is called internally when needed, but might be useful to call if you are extending the usage of Flags yourself.
 */
public void save(){
  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,value.values);
  denizen.getSaves().set(flagPath + "String_Node_Str",(expiration > 0 ? expiration : null));
  rebuild();
  WorldScriptHelper.doEvents(world_script_events,npc,player != null ? player.getPlayerEntity() : null,context);
}