Program: 153282
Project: 153282
Buggy source:
public void run(){
  boolean connected=true;
  LocalSocket clientSocket=new LocalSocket(socketToClient,this);
  if (!clientSocket.success) {
    printLogMessage("String_Node_Str");
    return;
  }
  String kickMessage=Packet01Login.processLogin(clientSocket.in,clientSocket.out,this,this,Globals.isAuth());
  if (kickMessage != null) {
    printLogMessage(kickMessage);
    PacketFFKick.kick(clientSocket.out,this,this,kickMessage);
    connected=false;
  }
  String hostname=ReconnectCache.get(clientInfo.getUsername());
  int portnum=ReconnectCache.getPort(hostname,defaultPort);
  hostname=ReconnectCache.getHost(hostname,"String_Node_Str");
  boolean firstConnection=true;
  while (connected && !killed()) {
    Socket serverBasicSocket=LocalSocket.openSocket(hostname,portnum,this);
    if (serverBasicSocket == null) {
      printLogMessage("String_Node_Str");
      PacketFFKick.kick(clientSocket.out,this,this,"String_Node_Str");
      LocalSocket.closeSocket(clientSocket.socket,this);
      return;
    }
    LocalSocket serverSocket=new LocalSocket(serverBasicSocket,this);
    if (!serverSocket.success) {
      printLogMessage("String_Node_Str");
      PacketFFKick.kickAndClose(clientSocket,this,this,"String_Node_Str");
      return;
    }
    kickMessage=Packet01Login.serverLogin(serverSocket.in,serverSocket.out,this,this);
    if (kickMessage != null) {
      printLogMessage(kickMessage);
      PacketFFKick.kick(clientSocket.out,this,this,kickMessage);
      connected=false;
    }
    if (connected) {
      ReconnectCache.store(clientInfo.getUsername(),hostname,portnum);
      Packet01Login serverLoginPacket=new Packet01Login(serverSocket.in,this,this);
      if (serverLoginPacket.packetId == null || serverLoginPacket.read(serverSocket.in,this,this,true,null) == null) {
        printLogMessage("String_Node_Str");
        connected=false;
      }
 else {
        clientInfo.setPlayerEntityId(serverLoginPacket.getVersion());
        if (firstConnection) {
          firstConnection=false;
          Packet01Login clientLoginPacket=new Packet01Login(clientSocket.out,this,this);
          if (!forward) {
            clientLoginPacket.setVersion(Globals.getDefaultPlayerId());
          }
 else {
            clientLoginPacket.setVersion(serverLoginPacket.getVersion());
          }
          if (Globals.getDimension() == null) {
            printLogMessage("String_Node_Str" + serverLoginPacket.getDimension());
            clientLoginPacket.setDimension(serverLoginPacket.getDimension());
          }
 else {
            printLogMessage("String_Node_Str" + Globals.getDimension());
            clientLoginPacket.setDimension(Globals.getDimension());
          }
          clientLoginPacket.setMapSeed(serverLoginPacket.getMapSeed());
          clientLoginPacket.setUsername(serverLoginPacket.getUsername());
          if (clientLoginPacket.packetId == null || clientLoginPacket.write(clientSocket.out,this,this,true) == null) {
            printLogMessage("String_Node_Str");
            connected=false;
          }
        }
        if (connected) {
          if (forward) {
            serverToClient=new DataStreamBridge(serverSocket.in,clientSocket.out,this);
            clientToServer=new DataStreamBridge(clientSocket.in,serverSocket.out,this);
            connected=false;
          }
 else {
            serverToClient=new DataStreamDownLinkBridge(serverSocket.in,clientSocket.out,this);
            clientToServer=new DataStreamUpLinkBridge(clientSocket.in,serverSocket.out,this);
            connected=false;
          }
          boolean localEnabled;
synchronized (enabledSync) {
            localEnabled=enabled;
            if (enabled) {
              serverToClient.start();
              clientToServer.start();
            }
          }
          if (localEnabled) {
            while ((clientToServer.isAlive() || serverToClient.isAlive())) {
              try {
                clientToServer.join(500);
                serverToClient.join(500);
              }
 catch (              InterruptedException ie) {
                kill();
              }
              if (killed() || (!(clientToServer.isAlive() && serverToClient.isAlive()))) {
                clientToServer.interrupt();
                serverToClient.interrupt();
              }
            }
          }
        }
      }
    }
    printLogMessage("String_Node_Str");
    LocalSocket.closeSocket(serverSocket.socket,this);
  }
  if (!getKickMessageSent()) {
    PacketFFKick.kick(clientSocket.out,this,this,"String_Node_Str");
  }
  printLogMessage("String_Node_Str");
  LocalSocket.closeSocket(clientSocket.socket,this);
}

Fixed version (ground truth):
public void run(){
  boolean connected=true;
  LocalSocket clientSocket=new LocalSocket(socketToClient,this);
  if (!clientSocket.success) {
    printLogMessage("String_Node_Str");
    return;
  }
  String kickMessage=Packet01Login.processLogin(clientSocket.in,clientSocket.out,this,this,Globals.isAuth());
  if (kickMessage != null) {
    printLogMessage(kickMessage);
    PacketFFKick.kick(clientSocket.out,this,this,kickMessage);
    connected=false;
  }
  String hostname=ReconnectCache.get(clientInfo.getUsername());
  int portnum=ReconnectCache.getPort(hostname,defaultPort);
  hostname=ReconnectCache.getHost(hostname,"String_Node_Str");
  boolean firstConnection=true;
  while (connected && !killed()) {
    Socket serverBasicSocket=LocalSocket.openSocket(hostname,portnum,this);
    if (serverBasicSocket == null) {
      printLogMessage("String_Node_Str");
      PacketFFKick.kick(clientSocket.out,this,this,"String_Node_Str");
      LocalSocket.closeSocket(clientSocket.socket,this);
      return;
    }
    LocalSocket serverSocket=new LocalSocket(serverBasicSocket,this);
    if (!serverSocket.success) {
      printLogMessage("String_Node_Str");
      PacketFFKick.kickAndClose(clientSocket,this,this,"String_Node_Str");
      return;
    }
    kickMessage=Packet01Login.serverLogin(serverSocket.in,serverSocket.out,this,this);
    if (kickMessage != null) {
      printLogMessage(kickMessage);
      PacketFFKick.kick(clientSocket.out,this,this,kickMessage);
      connected=false;
    }
    if (connected) {
      ReconnectCache.store(clientInfo.getUsername(),hostname,portnum);
      Packet01Login serverLoginPacket=new Packet01Login(serverSocket.in,this,this);
      if (serverLoginPacket.packetId == null || serverLoginPacket.read(serverSocket.in,this,this,true,null) == null) {
        printLogMessage("String_Node_Str");
        connected=false;
      }
 else {
        clientInfo.setPlayerEntityId(serverLoginPacket.getVersion());
        if (firstConnection) {
          firstConnection=false;
          Packet01Login clientLoginPacket=new Packet01Login(clientSocket.out,this,this);
          if (!forward) {
            clientLoginPacket.setVersion(Globals.getDefaultPlayerId());
          }
 else {
            clientLoginPacket.setVersion(serverLoginPacket.getVersion());
          }
          if (Globals.getDimension() == null) {
            if (Globals.isVerbose()) {
              printLogMessage("String_Node_Str" + serverLoginPacket.getDimension());
            }
            clientLoginPacket.setDimension(serverLoginPacket.getDimension());
          }
 else {
            if (Globals.isVerbose()) {
              printLogMessage("String_Node_Str" + Globals.getDimension());
            }
            clientLoginPacket.setDimension(Globals.getDimension());
          }
          clientLoginPacket.setMapSeed(serverLoginPacket.getMapSeed());
          clientLoginPacket.setUsername(serverLoginPacket.getUsername());
          if (clientLoginPacket.packetId == null || clientLoginPacket.write(clientSocket.out,this,this,true) == null) {
            if (Globals.isVerbose()) {
              printLogMessage("String_Node_Str");
            }
            connected=false;
          }
        }
        if (connected) {
          if (forward) {
            serverToClient=new DataStreamBridge(serverSocket.in,clientSocket.out,this);
            clientToServer=new DataStreamBridge(clientSocket.in,serverSocket.out,this);
            connected=false;
          }
 else {
            serverToClient=new DataStreamDownLinkBridge(serverSocket.in,clientSocket.out,this);
            clientToServer=new DataStreamUpLinkBridge(clientSocket.in,serverSocket.out,this);
            connected=false;
          }
          boolean localEnabled;
synchronized (enabledSync) {
            localEnabled=enabled;
            if (enabled) {
              serverToClient.start();
              clientToServer.start();
            }
          }
          if (localEnabled) {
            while ((clientToServer.isAlive() || serverToClient.isAlive())) {
              try {
                clientToServer.join(500);
                serverToClient.join(500);
              }
 catch (              InterruptedException ie) {
                kill();
              }
              if (killed() || (!(clientToServer.isAlive() && serverToClient.isAlive()))) {
                clientToServer.interrupt();
                serverToClient.interrupt();
              }
            }
          }
        }
      }
    }
    printLogMessage("String_Node_Str");
    LocalSocket.closeSocket(serverSocket.socket,this);
  }
  if (!getKickMessageSent()) {
    PacketFFKick.kick(clientSocket.out,this,this,"String_Node_Str");
  }
  printLogMessage("String_Node_Str");
  LocalSocket.closeSocket(clientSocket.socket,this);
}