Program: 94580
Project: 94580
Buggy source:
protected Object callSynch(RemoteServiceRegistrationImpl registration,IRemoteCall call) throws ECFException {
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",new Object[]{registration,call});
  boolean doneWaiting=false;
  Response response=null;
  try {
    final long requestId=sendCallRequest(registration,call);
    final long timeout=call.getTimeout() + System.currentTimeMillis();
    while ((timeout - System.currentTimeMillis()) > 0 && !doneWaiting) {
      final Request request=findRequestForId(requestId);
      if (request == null) {
        throw new NullPointerException(Messages.RegistrySharedObject_14 + requestId);
      }
synchronized (request) {
        if (request.isDone()) {
          removeRequest(request);
          Trace.trace(Activator.PLUGIN_ID,Messages.RegistrySharedObject_15 + request);
          doneWaiting=true;
          response=request.getResponse();
          if (response == null) {
            throw new NullPointerException(Messages.RegistrySharedObject_EXCEPTION_INVALID_RESPONSE);
          }
        }
 else {
          Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + RESPONSE_WAIT_INTERVAL + "String_Node_Str"+ request);
          request.wait(RESPONSE_WAIT_INTERVAL);
        }
      }
    }
    if (!doneWaiting) {
      throw new ECFException(Messages.RegistrySharedObject_19 + call.getTimeout() + Messages.RegistrySharedObject_20);
    }
  }
 catch (  final IOException e) {
    log(CALL_REQUEST_ERROR_CODE,CALL_REQUEST_ERROR_MESSAGE,e);
    throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_SENDING_REQUEST,e);
  }
catch (  final InterruptedException e) {
    log(CALL_REQUEST_TIMEOUT_ERROR_CODE,CALL_REQUEST_TIMEOUT_ERROR_MESSAGE,e);
    throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_WAIT_INTERRUPTED,e);
  }
  Object result=null;
  if (response.hadException()) {
    throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_IN_REMOTE_CALL,response.getException());
  }
  result=response.getResponse();
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
protected Object callSynch(RemoteServiceRegistrationImpl registration,IRemoteCall call) throws ECFException {
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",new Object[]{registration,call});
  boolean doneWaiting=false;
  Response response=null;
  try {
    final Request request=sendCallRequest(registration,call);
    final long timeout=call.getTimeout() + System.currentTimeMillis();
    while ((timeout - System.currentTimeMillis()) > 0 && !doneWaiting) {
synchronized (request) {
        if (request.isDone()) {
          Trace.trace(Activator.PLUGIN_ID,Messages.RegistrySharedObject_15 + request);
          doneWaiting=true;
          response=request.getResponse();
          if (response == null)           throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_INVALID_RESPONSE);
        }
 else {
          Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + RESPONSE_WAIT_INTERVAL + "String_Node_Str"+ request);
          request.wait(RESPONSE_WAIT_INTERVAL);
        }
      }
    }
    if (!doneWaiting)     throw new ECFException(Messages.RegistrySharedObject_19 + call.getTimeout() + Messages.RegistrySharedObject_20);
  }
 catch (  final IOException e) {
    log(CALL_REQUEST_ERROR_CODE,CALL_REQUEST_ERROR_MESSAGE,e);
    throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_SENDING_REQUEST,e);
  }
catch (  final InterruptedException e) {
    log(CALL_REQUEST_TIMEOUT_ERROR_CODE,CALL_REQUEST_TIMEOUT_ERROR_MESSAGE,e);
    throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_WAIT_INTERRUPTED,e);
  }
  Object result=null;
  if (response.hadException())   throw new ECFException(Messages.RegistrySharedObject_EXCEPTION_IN_REMOTE_CALL,response.getException());
  result=response.getResponse();
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",result);
  return result;
}