Program: 178610
Project: 178610
Buggy source:
public static String bridgeLogin(LocalSocket clientSocket,LocalSocket serverSocket,ConnectionInfo info,PassthroughConnection ptc,boolean reconnect,String fullHostname){
  Packet packet=new Packet();
  Packet CtSHandshake;
  String password=Globals.getPassword();
  if (fullHostname == null || password == null) {
    if (fullHostname != null) {
      ptc.printLogMessage("String_Node_Str");
    }
    ptc.printLogMessage("String_Node_Str");
    CtSHandshake=new Packet02Handshake(info.getUsernameRaw());
  }
 else {
    ptc.printLogMessage("String_Node_Str");
    CtSHandshake=new Packet52ProxyLogin("String_Node_Str",fullHostname,info.getUsernameRaw());
  }
  try {
    if (serverSocket.pout.sendPacket(CtSHandshake) == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  try {
    packet=serverSocket.pin.getPacket(packet);
    if (packet == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  Packet02Handshake StCHandshake=new Packet02Handshake(packet);
  String hash=StCHandshake.getUsername();
  if (fullHostname != null) {
    if (password == null) {
      ptc.printLogMessage("String_Node_Str");
    }
 else {
      String confirmCode=sha1Hash(password + hash);
      Packet code=new Packet52ProxyLogin(confirmCode,info.getHostname(),info.getUsernameRaw());
      System.out.println("String_Node_Str");
      try {
        if (serverSocket.pout.sendPacket(code) == null) {
          return "String_Node_Str";
        }
      }
 catch (      EOFException eof) {
        return "String_Node_Str";
      }
catch (      IOException ioe) {
        return "String_Node_Str";
      }
    }
  }
  String expectedCode=null;
  if (Globals.isAuth()) {
    hash=getHashString();
    StCHandshake=new Packet02Handshake(hash);
    expectedCode=sha1Hash(password + hash);
  }
  boolean passwordAccepted=false;
  if (!reconnect) {
    try {
      if (clientSocket.pout.sendPacket(StCHandshake) == null) {
        return "String_Node_Str";
      }
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
    try {
      packet=clientSocket.pin.getPacket(packet,10000);
      if (packet == null) {
        return "String_Node_Str";
      }
 else       if (packet.getByte(0) != 1) {
        return "String_Node_Str";
      }
      packet=new Packet01Login(packet);
      info.clientVersion=packet.getInt(1);
      info.craftProxyLogin=((Packet01Login)packet).getSeed() == MAGIC_SEED;
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
    if (packet.getByte(0) == 0x52) {
      Packet52ProxyLogin proxyLogin=new Packet52ProxyLogin(packet);
      if (proxyLogin.getCode().equals(expectedCode)) {
        passwordAccepted=true;
        try {
          packet=clientSocket.pin.getPacket(packet);
          if (packet == null) {
            return "String_Node_Str";
          }
          info.clientVersion=packet.getInt(1);
        }
 catch (        EOFException eof) {
          return "String_Node_Str";
        }
catch (        IOException ioe) {
          return "String_Node_Str";
        }
      }
 else {
        ptc.printLogMessage("String_Node_Str" + expectedCode);
        ptc.printLogMessage("String_Node_Str" + proxyLogin.getCode());
        return "String_Node_Str";
      }
    }
  }
 else {
    String username=info.getUsername();
    packet=new Packet(200);
    packet.writeByte((byte)0x01);
    packet.writeInt(info.clientVersion);
    packet.writeString16(username.substring(0,Math.min(128,username.length())));
    packet.writeLong(0);
    packet.writeString16("String_Node_Str");
    packet.writeInt(0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
  }
  Packet01Login CtSLogin=new Packet01Login(packet);
  try {
    if (serverSocket.pout.sendPacket(CtSLogin) == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  try {
    packet=serverSocket.pin.getPacket(packet);
    if (packet == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  if (!passwordAccepted && !reconnect && Globals.isAuth()) {
    if (!authenticate(ptc.connectionInfo.getUsername(),hash,ptc)) {
      return "String_Node_Str";
    }
  }
  Packet01Login StCLogin=new Packet01Login(packet);
  info.serverPlayerId=StCLogin.getVersion();
  info.loginDimension=StCLogin.getDimension();
  info.loginUnknownRespawn=StCLogin.getUnknown();
  info.loginCreative=(byte)StCLogin.getMode();
  info.loginHeight=StCLogin.getHeight();
  info.loginSeed=StCLogin.getSeed();
  info.levelType=StCLogin.getLevelType();
  if (!reconnect) {
    info.clientPlayerId=StCLogin.getVersion();
    try {
      if (clientSocket.pout.sendPacket(StCLogin) == null) {
        return "String_Node_Str";
      }
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
  }
  return null;
}

Fixed version (ground truth):
public static String bridgeLogin(LocalSocket clientSocket,LocalSocket serverSocket,ConnectionInfo info,PassthroughConnection ptc,boolean reconnect,String fullHostname){
  Packet packet=new Packet();
  Packet CtSHandshake;
  String password=Globals.getPassword();
  if (fullHostname == null || password == null) {
    if (fullHostname != null) {
      ptc.printLogMessage("String_Node_Str");
    }
    ptc.printLogMessage("String_Node_Str");
    CtSHandshake=new Packet02Handshake(info.getUsernameRaw());
  }
 else {
    ptc.printLogMessage("String_Node_Str");
    CtSHandshake=new Packet52ProxyLogin("String_Node_Str",fullHostname,info.getUsernameRaw());
  }
  try {
    if (serverSocket.pout.sendPacket(CtSHandshake) == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  try {
    packet=serverSocket.pin.getPacket(packet);
    if (packet == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  Packet02Handshake StCHandshake=new Packet02Handshake(packet);
  String hash=StCHandshake.getUsername();
  if (fullHostname != null) {
    if (password == null) {
      ptc.printLogMessage("String_Node_Str");
    }
 else {
      String confirmCode=sha1Hash(password + hash);
      Packet code=new Packet52ProxyLogin(confirmCode,info.getHostname(),info.getUsernameRaw());
      ptc.printLogMessage("String_Node_Str");
      try {
        if (serverSocket.pout.sendPacket(code) == null) {
          return "String_Node_Str";
        }
      }
 catch (      EOFException eof) {
        return "String_Node_Str";
      }
catch (      IOException ioe) {
        return "String_Node_Str";
      }
    }
  }
  String expectedCode=null;
  if (Globals.isAuth()) {
    hash=getHashString();
    StCHandshake=new Packet02Handshake(hash);
    expectedCode=sha1Hash(password + hash);
  }
  boolean passwordAccepted=false;
  if (!reconnect) {
    try {
      if (clientSocket.pout.sendPacket(StCHandshake) == null) {
        return "String_Node_Str";
      }
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
    try {
      packet=clientSocket.pin.getPacket(packet,10000);
      if (packet == null) {
        return "String_Node_Str";
      }
 else       if (packet.getByte(0) != 1 && packet.getByte(0) != 0x52) {
        return "String_Node_Str";
      }
      if (packet.getByte(0) == 1) {
        packet=new Packet01Login(packet);
        info.clientVersion=packet.getInt(1);
        info.craftProxyLogin=((Packet01Login)packet).getSeed() == MAGIC_SEED;
      }
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
    if (packet.getByte(0) == 0x52) {
      Packet52ProxyLogin proxyLogin=new Packet52ProxyLogin(packet);
      if (proxyLogin.getCode().equals(expectedCode)) {
        ptc.printLogMessage("String_Node_Str");
        passwordAccepted=true;
        try {
          packet=clientSocket.pin.getPacket(packet);
          if (packet == null) {
            return "String_Node_Str";
          }
          info.clientVersion=packet.getInt(1);
        }
 catch (        EOFException eof) {
          return "String_Node_Str";
        }
catch (        IOException ioe) {
          return "String_Node_Str";
        }
      }
 else {
        ptc.printLogMessage("String_Node_Str" + expectedCode);
        ptc.printLogMessage("String_Node_Str" + proxyLogin.getCode());
        return "String_Node_Str";
      }
    }
  }
 else {
    String username=info.getUsername();
    packet=new Packet(200);
    packet.writeByte((byte)0x01);
    packet.writeInt(info.clientVersion);
    packet.writeString16(username.substring(0,Math.min(128,username.length())));
    packet.writeLong(0);
    packet.writeString16("String_Node_Str");
    packet.writeInt(0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
    packet.writeByte((byte)0);
  }
  Packet01Login CtSLogin=new Packet01Login(packet);
  try {
    if (serverSocket.pout.sendPacket(CtSLogin) == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  try {
    packet=serverSocket.pin.getPacket(packet);
    if (packet == null) {
      return "String_Node_Str";
    }
  }
 catch (  EOFException eof) {
    return "String_Node_Str";
  }
catch (  IOException ioe) {
    return "String_Node_Str";
  }
  if (!passwordAccepted && !reconnect && Globals.isAuth()) {
    if (!authenticate(ptc.connectionInfo.getUsername(),hash,ptc)) {
      return "String_Node_Str";
    }
  }
  Packet01Login StCLogin=new Packet01Login(packet);
  info.serverPlayerId=StCLogin.getVersion();
  info.loginDimension=StCLogin.getDimension();
  info.loginUnknownRespawn=StCLogin.getUnknown();
  info.loginCreative=(byte)StCLogin.getMode();
  info.loginHeight=StCLogin.getHeight();
  info.loginSeed=StCLogin.getSeed();
  info.levelType=StCLogin.getLevelType();
  if (!reconnect) {
    info.clientPlayerId=StCLogin.getVersion();
    try {
      if (clientSocket.pout.sendPacket(StCLogin) == null) {
        return "String_Node_Str";
      }
    }
 catch (    EOFException eof) {
      return "String_Node_Str";
    }
catch (    IOException ioe) {
      return "String_Node_Str";
    }
  }
  return null;
}