Program: 44741
Project: 44741
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 || block.getType() == Material.BOOKSHELF) {
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),CircuitManager.getBlockCurrent(block));
    }
  }
}

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.TRAP_DOOR || block.getType() == Material.FENCE_GATE) {
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),CircuitManager.getBlockCurrent(block));
    }
 else     if (block.getType() == Material.BOOKSHELF) {
      CircuitManager.activateCircuit(event.getClickedBlock().getLocation(),5);
    }
  }
}