Program: 10214
Project: 10214
Buggy source:
public void switchBlock(ScriptEntry scriptEntry,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 {
      if (interactLocation.getBlock().getType() == Material.IRON_DOOR_BLOCK) {
        interactLocation.getBlock().setData((byte)(interactLocation.getBlock().getData() ^ 4));
        Location block=null;
        if (interactLocation.clone().add(0,1,0).getBlock().getType() == Material.IRON_DOOR_BLOCK)         block=interactLocation.clone().add(0,1,0);
 else         if (interactLocation.clone().add(0,-1,0).getBlock().getType() == Material.IRON_DOOR_BLOCK)         block=interactLocation.clone().add(0,-1,0);
        if (block != null)         block.getBlock().setData((byte)(block.getBlock().getData() ^ 4));
      }
 else {
        Block.getById(interactLocation.getBlock().getType().getId()).interact(((CraftWorld)world).getHandle(),interactLocation.getBlockX(),interactLocation.getBlockY(),interactLocation.getBlockZ(),craftPlayer != null ? craftPlayer.getHandle() : null,0,0f,0f,0f);
      }
      dB.echoDebug(scriptEntry,"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(ScriptEntry scriptEntry,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     if (Depends.citizens != null) {
      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 {
      if (interactLocation.getBlock().getType() == Material.IRON_DOOR_BLOCK) {
        interactLocation.getBlock().setData((byte)(interactLocation.getBlock().getData() ^ 4));
        Location block=null;
        if (interactLocation.clone().add(0,1,0).getBlock().getType() == Material.IRON_DOOR_BLOCK)         block=interactLocation.clone().add(0,1,0);
 else         if (interactLocation.clone().add(0,-1,0).getBlock().getType() == Material.IRON_DOOR_BLOCK)         block=interactLocation.clone().add(0,-1,0);
        if (block != null)         block.getBlock().setData((byte)(block.getBlock().getData() ^ 4));
      }
 else {
        Block.getById(interactLocation.getBlock().getType().getId()).interact(((CraftWorld)world).getHandle(),interactLocation.getBlockX(),interactLocation.getBlockY(),interactLocation.getBlockZ(),craftPlayer != null ? craftPlayer.getHandle() : null,0,0f,0f,0f);
      }
      dB.echoDebug(scriptEntry,"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");
    }
  }
}