Program: 95069
Project: 95069
Buggy source:
public void connect(ID remote,IConnectContext joinContext) throws ContainerConnectException {
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    debug("String_Node_Str" + remote + "String_Node_Str"+ joinContext+ "String_Node_Str");
    Object response=null;
synchronized (getConnectLock()) {
      if (isConnected())       throw new ConnectException("String_Node_Str" + getConnectedID());
      if (isConnecting())       throw new ConnectException("String_Node_Str");
      fireContainerEvent(new ContainerConnectingEvent(this.getID(),remote,joinContext));
      ISynchAsynchConnection aConnection=createConnection(remote,joinContext);
      setStateConnecting(aConnection);
synchronized (aConnection) {
        Object connectData=getConnectData(remote,joinContext);
        int connectTimeout=getConnectTimeout();
        try {
          response=aConnection.connect(remote,connectData,connectTimeout);
        }
 catch (        IOException e) {
          if (getConnection() != aConnection)           killConnection(aConnection);
 else           setStateDisconnected(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) {
          setStateDisconnected(aConnection);
          throw new ConnectException("String_Node_Str");
        }
        aConnection.start();
        setStateConnected(serverID,aConnection);
      }
    }
  }
 catch (  Exception e) {
    traceStack("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 {
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    debug("String_Node_Str" + remote + "String_Node_Str"+ joinContext+ "String_Node_Str");
    Object response=null;
synchronized (getConnectLock()) {
      if (isConnected())       throw new IllegalStateException("String_Node_Str" + getConnectedID());
      if (isConnecting())       throw new IllegalStateException("String_Node_Str");
      fireContainerEvent(new ContainerConnectingEvent(this.getID(),remote,joinContext));
      ISynchAsynchConnection aConnection=createConnection(remote,joinContext);
      setStateConnecting(aConnection);
synchronized (aConnection) {
        Object connectData=getConnectData(remote,joinContext);
        int connectTimeout=getConnectTimeout();
        try {
          response=aConnection.connect(remote,connectData,connectTimeout);
        }
 catch (        IOException e) {
          if (getConnection() != aConnection)           killConnection(aConnection);
 else           setStateDisconnected(aConnection);
          throw e;
        }
        if (getConnection() != aConnection) {
          killConnection(aConnection);
          throw new IllegalStateException("String_Node_Str");
        }
        ID serverID=null;
        try {
          serverID=handleConnectResponse(remote,response);
        }
 catch (        Exception e) {
          setStateDisconnected(aConnection);
          throw e;
        }
        aConnection.start();
        setStateConnected(serverID,aConnection);
      }
    }
  }
 catch (  Exception e) {
    traceStack("String_Node_Str",e);
    ContainerConnectException except=new ContainerConnectException("String_Node_Str" + remote.getName(),e);
    throw except;
  }
}