Program: 44736
Project: 44736
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  if (event.getItem() != null && event.getItem().getType() == Material.REDSTONE && event.getClickedBlock() != null && CircuitManager.hasPendingCircuit(event.getPlayer())) {
    Player player=event.getPlayer();
    PendingCircuit pc=CircuitManager.getPendingCircuit(player);
    Block block=event.getClickedBlock();
    Location clickedLoc=block.getLocation();
    if (!pc.hasSenderLocation()) {
      if (CircuitManager.isValidSender(block)) {
        if (CircuitManager.circuitExists(clickedLoc)) {
          plugin.msg(player,ChatColor.YELLOW + "String_Node_Str");
          plugin.msg(player,"String_Node_Str");
        }
 else {
          pc.setSenderLocation(clickedLoc);
          plugin.msg(player,"String_Node_Str");
        }
      }
 else {
        plugin.msg(player,ChatColor.RED + "String_Node_Str");
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ CircuitManager.getValidSendersString());
      }
    }
 else {
      if (pc.getSenderLocation().toString().equals(clickedLoc.toString())) {
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str");
      }
 else       if (CircuitManager.isValidReceiver(block)) {
        if (pc.getSenderLocation().getWorld().equals(clickedLoc.getWorld())) {
          if (QuantumConnectors.MAX_RECEIVERS_PER_CIRCUIT == 0 || pc.getCircuit().getReceiversCount() < QuantumConnectors.MAX_RECEIVERS_PER_CIRCUIT || player.hasPermission("String_Node_Str")) {
            pc.addReceiver(clickedLoc);
            plugin.msg(player,"String_Node_Str" + pc.getCircuit().getReceiversCount() + "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str");
          }
 else {
            plugin.msg(player,"String_Node_Str" + pc.getCircuit().getReceiversCount() + "String_Node_Str");
            plugin.msg(player,"String_Node_Str");
          }
        }
 else {
          plugin.msg(player,ChatColor.RED + "String_Node_Str");
        }
      }
 else {
        plugin.msg(player,ChatColor.RED + "String_Node_Str");
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ CircuitManager.getValidReceiversString());
        plugin.msg(player,"String_Node_Str");
      }
    }
  }
 else   if (event.getClickedBlock() != null && CircuitManager.circuitExists(event.getClickedBlock().getLocation())) {
    Block block=event.getClickedBlock();
    if (block.getType() == Material.WOODEN_DOOR || block.getType() == Material.TRAP_DOOR || block.getType() == Material.FENCE_GATE) {
      int current=CircuitManager.getBlockCurrent(block);
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),current,current > 0 ? 0 : 15);
    }
 else     if (block.getType() == Material.BOOKSHELF) {
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),5,0);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  if (event.getItem() != null && event.getItem().getType() == Material.REDSTONE && event.getClickedBlock() != null && CircuitManager.hasPendingCircuit(event.getPlayer())) {
    Player player=event.getPlayer();
    PendingCircuit pc=CircuitManager.getPendingCircuit(player);
    Block block=event.getClickedBlock();
    Location clickedLoc=block.getLocation();
    if (!pc.hasSenderLocation()) {
      if (CircuitManager.isValidSender(block)) {
        if (CircuitManager.circuitExists(clickedLoc)) {
          plugin.msg(player,ChatColor.YELLOW + "String_Node_Str");
          plugin.msg(player,"String_Node_Str");
        }
 else {
          pc.setSenderLocation(clickedLoc);
          plugin.msg(player,"String_Node_Str");
        }
      }
 else {
        plugin.msg(player,ChatColor.RED + "String_Node_Str");
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ CircuitManager.getValidSendersString());
      }
    }
 else {
      if (pc.getSenderLocation().toString().equals(clickedLoc.toString())) {
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str");
      }
 else       if (CircuitManager.isValidReceiver(block)) {
        if (pc.getSenderLocation().getWorld().equals(clickedLoc.getWorld())) {
          if (QuantumConnectors.MAX_RECEIVERS_PER_CIRCUIT == 0 || pc.getCircuit().getReceiversCount() < QuantumConnectors.MAX_RECEIVERS_PER_CIRCUIT || player.hasPermission("String_Node_Str")) {
            pc.addReceiver(clickedLoc);
            plugin.msg(player,"String_Node_Str" + pc.getCircuit().getReceiversCount() + "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str");
          }
 else {
            plugin.msg(player,"String_Node_Str" + pc.getCircuit().getReceiversCount() + "String_Node_Str");
            plugin.msg(player,"String_Node_Str");
          }
        }
 else {
          plugin.msg(player,ChatColor.RED + "String_Node_Str");
        }
      }
 else {
        plugin.msg(player,ChatColor.RED + "String_Node_Str");
        plugin.msg(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ CircuitManager.getValidReceiversString());
        plugin.msg(player,"String_Node_Str");
      }
    }
  }
 else   if (event.getClickedBlock() != null && CircuitManager.circuitExists(event.getClickedBlock().getLocation())) {
    Block block=event.getClickedBlock();
    if (block.getType() == Material.WOODEN_DOOR || block.getType() == Material.SPRUCE_DOOR || block.getType() == Material.BIRCH_DOOR || block.getType() == Material.JUNGLE_DOOR || block.getType() == Material.ACACIA_DOOR || block.getType() == Material.DARK_OAK_DOOR || block.getType() == Material.TRAP_DOOR || block.getType() == Material.FENCE_GATE || block.getType() == Material.SPRUCE_FENCE_GATE || block.getType() == Material.BIRCH_FENCE_GATE || block.getType() == Material.JUNGLE_FENCE_GATE || block.getType() == Material.ACACIA_FENCE_GATE || block.getType() == Material.DARK_OAK_FENCE_GATE) {
      int current=CircuitManager.getBlockCurrent(block);
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),current,current > 0 ? 0 : 15);
    }
 else     if (block.getType() == Material.BOOKSHELF) {
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),5,0);
    }
  }
}