Program: 95142
Project: 95142
Buggy source:
public void connect(ID remote,IConnectContext joinContext) throws ContainerConnectException {
  fireContainerEvent(new ContainerConnectingEvent(this.getID(),remote,joinContext));
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    debug("String_Node_Str" + remote + "String_Node_Str"+ joinContext+ "String_Node_Str");
    ISynchAsynchConnection aConnection=createConnection(remote,joinContext);
    Object response=null;
synchronized (getConnectLock()) {
      if (isConnected()) {
        killConnection(aConnection);
        throw new ConnectException("String_Node_Str" + getConnectedID());
      }
      if (isConnecting()) {
        killConnection(aConnection);
        throw new ConnectException("String_Node_Str");
      }
      setStateConnecting(aConnection);
    }
    Callback[] callbacks=createAuthorizationCallbacks();
    if (joinContext != null) {
      CallbackHandler handler=joinContext.getCallbackHandler();
      if (handler != null) {
        handler.handle(callbacks);
      }
    }
synchronized (connectLock) {
synchronized (aConnection) {
        try {
          Object connectData=createConnectData(remote,callbacks,null);
          response=aConnection.connect(remote,connectData,getConnectTimeout());
        }
 catch (        IOException e) {
          if (getConnection() != aConnection)           killConnection(aConnection);
 else           setStateUnconnected(aConnection);
          throw e;
        }
        if (getConnection() != aConnection) {
          killConnection(aConnection);
          throw new ConnectException("String_Node_Str");
        }
        ID serverID=null;
        try {
          serverID=handleConnectResponse(remote,response);
        }
 catch (        Exception e) {
          setStateUnconnected(aConnection);
          throw new ConnectException("String_Node_Str");
        }
        aConnection.start();
        setStateConnected(serverID,aConnection);
      }
    }
  }
 catch (  Exception e) {
    dumpStack("String_Node_Str",e);
    ContainerConnectException except=new ContainerConnectException("String_Node_Str" + remote.getName(),e);
    throw except;
  }
}

Fixed version (ground truth):
public void connect(ID remote,IConnectContext joinContext) throws ContainerConnectException {
  fireContainerEvent(new ContainerConnectingEvent(this.getID(),remote,joinContext));
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    debug("String_Node_Str" + remote + "String_Node_Str"+ joinContext+ "String_Node_Str");
    ISynchAsynchConnection aConnection=createConnection(remote,joinContext);
    Object response=null;
synchronized (getConnectLock()) {
      if (isConnected()) {
        killConnection(aConnection);
        throw new ConnectException("String_Node_Str" + getConnectedID());
      }
      if (isConnecting()) {
        killConnection(aConnection);
        throw new ConnectException("String_Node_Str");
      }
      setStateConnecting(aConnection);
synchronized (aConnection) {
        Callback[] callbacks=createAuthorizationCallbacks();
        if (joinContext != null) {
          CallbackHandler handler=joinContext.getCallbackHandler();
          if (handler != null) {
            handler.handle(callbacks);
          }
        }
        try {
          Object connectData=createConnectData(remote,callbacks,null);
          response=aConnection.connect(remote,connectData,getConnectTimeout());
        }
 catch (        IOException e) {
          if (getConnection() != aConnection)           killConnection(aConnection);
 else           setStateUnconnected(aConnection);
          throw e;
        }
        if (getConnection() != aConnection) {
          killConnection(aConnection);
          throw new ConnectException("String_Node_Str");
        }
        ID serverID=null;
        try {
          serverID=handleConnectResponse(remote,response);
        }
 catch (        Exception e) {
          setStateUnconnected(aConnection);
          throw new ConnectException("String_Node_Str");
        }
        aConnection.start();
        setStateConnected(serverID,aConnection);
      }
    }
  }
 catch (  Exception e) {
    dumpStack("String_Node_Str",e);
    ContainerConnectException except=new ContainerConnectException("String_Node_Str" + remote.getName(),e);
    throw except;
  }
}