Program: 10217
Project: 10217
Buggy source:
@EventHandler public void serverTag(ReplaceableTagEvent event){
  if (!event.matches("String_Node_Str","String_Node_Str","String_Node_Str") || event.replaced())   return;
  Attribute attribute=new Attribute(event.raw_tag,event.getScriptEntry()).fulfill(1);
  if (attribute.startsWith("String_Node_Str")) {
    String flag_name;
    if (attribute.hasContext(1))     flag_name=attribute.getContext(1);
 else {
      event.setReplaced("String_Node_Str");
      return;
    }
    event.setReplaced(new Element(FlagManager.serverHasFlag(flag_name)).getAttribute(attribute.fulfill(1)));
  }
  if (attribute.startsWith("String_Node_Str")) {
    String flag_name;
    if (attribute.hasContext(1))     flag_name=attribute.getContext(1);
 else {
      event.setReplaced("String_Node_Str");
      return;
    }
    attribute.fulfill(1);
    if (attribute.startsWith("String_Node_Str") || attribute.startsWith("String_Node_Str")) {
      event.setReplaced(new Element(!FlagManager.serverHasFlag(flag_name)).getAttribute(attribute.fulfill(1)));
      return;
    }
    if (attribute.startsWith("String_Node_Str") && !FlagManager.serverHasFlag(flag_name)) {
      event.setReplaced(new Element(0).getAttribute(attribute.fulfill(1)));
      return;
    }
    if (FlagManager.serverHasFlag(flag_name))     event.setReplaced(new dList(DenizenAPI.getCurrentInstance().flagManager().getGlobalFlag(flag_name)).getAttribute(attribute));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList allMats=new dList();
    for (    Material mat : Material.values())     allMats.add(mat.name());
    event.setReplaced(allMats.getAttribute(attribute.fulfill(1)));
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList allFlags=new dList(DenizenAPI.getCurrentInstance().flagManager().listGlobalFlags());
    dList searchFlags=null;
    if (!allFlags.isEmpty() && attribute.hasContext(1)) {
      searchFlags=new dList();
      String search=attribute.getContext(1).toLowerCase();
      if (search.startsWith("String_Node_Str")) {
        String regex=search.substring(6);
        try {
          Pattern pattern=Pattern.compile(search.substring(6));
          for (          String flag : allFlags)           if (pattern.matcher(flag).matches())           searchFlags.add(flag);
        }
 catch (        Exception e) {
          dB.echoError(e);
        }
      }
 else {
        for (        String flag : allFlags)         if (flag.toLowerCase().contains(search))         searchFlags.add(flag);
      }
    }
    event.setReplaced(searchFlags == null ? allFlags.getAttribute(attribute.fulfill(1)) : searchFlags.getAttribute(attribute.fulfill(1)));
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(System.currentTimeMillis()).getAttribute(attribute.fulfill(1)));
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    event.setReplaced(new Element(EventManager.eventExists(attribute.getContext(1)) || EventManager.eventExists(EventManager.StripIdentifiers(attribute.getContext(1)))).getAttribute(attribute.fulfill(1)));
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    String eventName=attribute.getContext(1).toUpperCase();
    List<WorldScriptContainer> EventsOne=EventManager.events.get("String_Node_Str" + eventName);
    List<WorldScriptContainer> EventsTwo=EventManager.events.get("String_Node_Str" + EventManager.StripIdentifiers(eventName));
    if (EventsOne == null && EventsTwo == null) {
      dB.echoError("String_Node_Str" + eventName + "String_Node_Str");
    }
 else {
      dList list=new dList();
      if (EventsOne != null) {
        for (        WorldScriptContainer script : EventsOne) {
          list.add("String_Node_Str" + script.getName());
        }
      }
      if (EventsTwo != null) {
        for (        WorldScriptContainer script : EventsTwo) {
          if (!list.contains("String_Node_Str" + script.getName()))           list.add("String_Node_Str" + script.getName());
        }
      }
      event.setReplaced(list.getAttribute(attribute.fulfill(1)));
    }
  }
  if (attribute.startsWith("String_Node_Str")) {
    NPC npc=((Citizens)Bukkit.getPluginManager().getPlugin("String_Node_Str")).getNPCSelector().getSelected(Bukkit.getConsoleSender());
    if (npc == null)     return;
 else     event.setReplaced(new dNPC(npc).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    ArrayList<dNPC> npcs=new ArrayList<dNPC>();
    for (    NPC npc : CitizensAPI.getNPCRegistry())     if (npc.getName().equalsIgnoreCase(attribute.getContext(1)))     npcs.add(dNPC.mirrorCitizensNPC(npc));
    event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    event.setReplaced(new Element(new File(DenizenAPI.getCurrentInstance().getDataFolder(),attribute.getContext(1)).exists()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(DenizenAPI.getCurrentInstance().getDescription().getVersion()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(Bukkit.getBukkitVersion()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(Bukkit.getServer().getVersion()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(System.getProperty("String_Node_Str")).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(Bukkit.getServer().getMaxPlayers()).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList list=new dList();
    for (    Map.Entry<String,Connection> entry : SQLCommand.connections.entrySet()) {
      try {
        if (!entry.getValue().isClosed()) {
          list.add(entry.getKey());
        }
 else {
          SQLCommand.connections.remove(entry.getKey());
        }
      }
 catch (      SQLException e) {
        dB.echoError(attribute.getScriptEntry().getResidingQueue(),e);
      }
    }
    event.setReplaced(list.getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    if (Depends.permissions == null) {
      dB.echoError("String_Node_Str");
      return;
    }
    event.setReplaced(new dList(Arrays.asList(Depends.permissions.getGroups())).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList plugins=new dList();
    for (    Plugin plugin : Bukkit.getServer().getPluginManager().getPlugins())     plugins.add(plugin.getName());
    event.setReplaced(plugins.getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    dList scripts=new dList();
    for (    String str : ScriptRegistry._getScriptNames())     scripts.add("String_Node_Str" + str);
    event.setReplaced(scripts.getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    Player matchPlayer=null;
    String matchInput=attribute.getContext(1).toLowerCase();
    for (    Player player : Bukkit.getOnlinePlayers()) {
      if (player.getName().toLowerCase().equals(matchInput)) {
        matchPlayer=player;
        break;
      }
 else       if (player.getName().toLowerCase().contains(matchInput) && matchPlayer == null) {
        matchPlayer=player;
      }
    }
    if (matchPlayer == null) {
      event.setReplaced("String_Node_Str");
    }
 else {
      event.setReplaced(new dPlayer(matchPlayer).getAttribute(attribute.fulfill(1)));
    }
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    dScript script=dScript.valueOf(attribute.getContext(1));
    if (script == null || !(script.getContainer() instanceof AssignmentScriptContainer)) {
      dB.echoError("String_Node_Str");
    }
 else {
      ArrayList<dNPC> npcs=new ArrayList<dNPC>();
      for (      NPC npc : CitizensAPI.getNPCRegistry()) {
        if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment() && npc.getTrait(AssignmentTrait.class).getAssignment().getName().equalsIgnoreCase(script.getName()))         npcs.add(dNPC.mirrorCitizensNPC(npc));
      }
      event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
      return;
    }
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    String flag=attribute.getContext(1);
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    Player player : Bukkit.getOnlinePlayers()) {
      if (DenizenAPI.getCurrentInstance().flagManager().getPlayerFlag(new dPlayer(player),flag).size() > 0)       players.add(new dPlayer(player));
    }
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    String flag=attribute.getContext(1);
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    Map.Entry<String,UUID> entry : dPlayer.getAllPlayers().entrySet()) {
      if (DenizenAPI.getCurrentInstance().flagManager().getPlayerFlag(entry.getValue(),flag).size() > 0)       players.add(new dPlayer(entry.getValue()));
    }
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    String flag=attribute.getContext(1);
    ArrayList<dNPC> npcs=new ArrayList<dNPC>();
    for (    NPC npc : CitizensAPI.getNPCRegistry()) {
      dNPC dNpc=dNPC.mirrorCitizensNPC(npc);
      if (dNpc.isSpawned() && FlagManager.npcHasFlag(dNpc,flag))       npcs.add(dNpc);
    }
    event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str") && attribute.hasContext(1)) {
    String flag=attribute.getContext(1);
    ArrayList<dNPC> npcs=new ArrayList<dNPC>();
    for (    NPC npc : CitizensAPI.getNPCRegistry()) {
      dNPC dNpc=dNPC.mirrorCitizensNPC(npc);
      if (FlagManager.npcHasFlag(dNpc,flag))       npcs.add(dNpc);
    }
    event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dNPC> npcs=new ArrayList<dNPC>();
    for (    NPC npc : CitizensAPI.getNPCRegistry())     npcs.add(dNPC.mirrorCitizensNPC(npc));
    event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dWorld> worlds=new ArrayList<dWorld>();
    for (    World world : Bukkit.getWorlds())     worlds.add(dWorld.mirrorBukkitWorld(world));
    event.setReplaced(new dList(worlds).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlugin> plugins=new ArrayList<dPlugin>();
    for (    Plugin plugin : Bukkit.getServer().getPluginManager().getPlugins())     plugins.add(new dPlugin(plugin));
    event.setReplaced(new dList(plugins).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    OfflinePlayer player : Bukkit.getOfflinePlayers())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    Player player : Bukkit.getOnlinePlayers())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    OfflinePlayer player : Bukkit.getOfflinePlayers())     if (!player.isOnline())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    OfflinePlayer player : Bukkit.getOfflinePlayers())     if (player.isOp())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    Player player : Bukkit.getOnlinePlayers())     if (player.isOp())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    ArrayList<dPlayer> players=new ArrayList<dPlayer>();
    for (    OfflinePlayer player : Bukkit.getOfflinePlayers())     if (player.isOp() && !player.isOnline())     players.add(dPlayer.mirrorBukkitPlayer(player));
    event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
    return;
  }
  if (attribute.startsWith("String_Node_Str")) {
    event.setReplaced(new Element(Bukkit.getServer().getMotd()).getAttribute(attribute.fulfill(1)));
    return;
  }
}

Fixed version (ground truth):
@EventHandler public void serverTag(ReplaceableTagEvent event){
}