Program: 95286
Project: 95286
Buggy source:
public void joinGroup(ID remoteSpace,Object data) throws SharedObjectContainerJoinException {
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    ISynchAsynchConnection aConnection=getClientConnection(remoteSpace,data);
    if (aConnection == null) {
      ConnectException c=new ConnectException("String_Node_Str" + "String_Node_Str" + remoteSpace.getName());
      throw c;
    }
    ContainerMessage response;
synchronized (connectLock) {
      if (isConnected()) {
        killConnection(aConnection);
        aConnection=null;
        ConnectException c=new ConnectException("String_Node_Str" + getGroupID());
        throw c;
      }
      if (isConnecting()) {
        killConnection(aConnection);
        aConnection=null;
        ConnectException c=new ConnectException("String_Node_Str");
        throw c;
      }
      connectionState=CONNECTING;
      connection=aConnection;
    }
synchronized (aConnection) {
      try {
        Object connectData=getConnectData(remoteSpace,data);
        response=(ContainerMessage)aConnection.connect(remoteSpace,connectData,0);
      }
 catch (      IOException e) {
synchronized (connectLock) {
          killConnection(aConnection);
          if (connection != aConnection) {
            aConnection=null;
            throw e;
          }
          connectionState=UNCONNECTED;
          connection=null;
          remoteServerID=null;
        }
        throw e;
      }
synchronized (connectLock) {
        if (connection != aConnection) {
          killConnection(aConnection);
          aConnection=null;
          ConnectException c=new ConnectException("String_Node_Str");
          throw c;
        }
        ID serverID=null;
        try {
          serverID=acceptNewServer(response);
        }
 catch (        Exception e) {
          killConnection(aConnection);
          aConnection=null;
          connection=null;
          remoteServerID=null;
          connectionState=UNCONNECTED;
          ConnectException c=new ConnectException("String_Node_Str");
          throw c;
        }
        aConnection.start();
        remoteServerID=serverID;
        connectionState=CONNECTED;
      }
    }
  }
 catch (  Exception e) {
    throw new SharedObjectContainerJoinException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void joinGroup(ID remote,Object data) throws SharedObjectContainerJoinException {
  try {
    if (isClosing)     throw new IllegalStateException("String_Node_Str");
    ISynchAsynchConnection aConnection=getClientConnection(remote,data);
    if (aConnection == null) {
      ConnectException c=new ConnectException("String_Node_Str" + "String_Node_Str" + remote.getName());
      throw c;
    }
    ContainerMessage response;
synchronized (connectLock) {
      if (isConnected()) {
        killConnection(aConnection);
        aConnection=null;
        ConnectException c=new ConnectException("String_Node_Str" + getGroupID());
        throw c;
      }
      if (isConnecting()) {
        killConnection(aConnection);
        aConnection=null;
        ConnectException c=new ConnectException("String_Node_Str");
        throw c;
      }
      connectionState=CONNECTING;
      connection=aConnection;
    }
synchronized (aConnection) {
      try {
        Object connectData=getConnectData(remote,data);
        response=(ContainerMessage)aConnection.connect(remote,connectData,0);
      }
 catch (      IOException e) {
synchronized (connectLock) {
          killConnection(aConnection);
          if (connection != aConnection) {
            aConnection=null;
            throw e;
          }
          connectionState=UNCONNECTED;
          connection=null;
          remoteServerID=null;
        }
        throw e;
      }
synchronized (connectLock) {
        if (connection != aConnection) {
          killConnection(aConnection);
          aConnection=null;
          ConnectException c=new ConnectException("String_Node_Str");
          throw c;
        }
        ID serverID=null;
        try {
          serverID=acceptNewServer(response);
        }
 catch (        Exception e) {
          killConnection(aConnection);
          aConnection=null;
          connection=null;
          remoteServerID=null;
          connectionState=UNCONNECTED;
          ConnectException c=new ConnectException("String_Node_Str");
          throw c;
        }
        aConnection.start();
        remoteServerID=serverID;
        connectionState=CONNECTED;
      }
    }
  }
 catch (  Exception e) {
    throw new SharedObjectContainerJoinException("String_Node_Str",e);
  }
}