Program: 48733
Project: 48733
Buggy source:
/** 
 * Send request to load or update a VcObject with synchronization.
 * @param moRef
 * @param waitForRequest true if the caller blocks until the request finishes.
 * @param forcedUpdates the set of forced updates on the object
 * @param forceLoad true if force fetching the object when missing the cache.
 * @return the VcObject if available, null is possible if {@code waitForRequest}is set to false.
 */
private VcObject requestObject(ManagedObjectReference moRef,boolean waitForRequest,final EnumSet<UpdateType> forcedUpdates,boolean forceLoad){
  VcObjectRequest req=null;
  boolean isNewRequest=false;
synchronized (objCache) {
    IVcCacheObject obj=objCache.get(moRef);
    if (obj instanceof VcObjectRequest) {
      req=(VcObjectRequest)obj;
      AuAssert.check(req.getMoRef().equals(moRef));
      if (forcedUpdates != null) {
        VcObjectImpl renewResult=req.addUpdates(forcedUpdates);
        if (renewResult != null) {
          obj=renewResult;
        }
      }
    }
    if (obj == null) {
      if (forceLoad) {
        req=new VcObjectRequest(objCache,moRef);
        isNewRequest=true;
      }
 else {
        return null;
      }
    }
 else     if (obj instanceof VcObject) {
      if (forcedUpdates != null) {
        req=new VcObjectRequest(objCache,(VcObjectImpl)obj,forcedUpdates);
        isNewRequest=true;
      }
 else {
        return (VcObject)obj;
      }
    }
  }
  if (isNewRequest) {
    CmsWorker.addRequest(WorkQueue.VC_QUERY_NO_DELAY,req);
  }
  if (waitForRequest) {
    return req.getResult();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Send request to load or update a VcObject with synchronization.
 * @param moRef
 * @param waitForRequest true if the caller blocks until the request finishes.
 * @param forcedUpdates the set of forced updates on the object
 * @param forceLoad true if force fetching the object when missing the cache.
 * @return the VcObject if available, null is possible if {@code waitForRequest}is set to false.
 */
private VcObject requestObject(ManagedObjectReference moRef,boolean waitForRequest,final EnumSet<UpdateType> forcedUpdates,boolean forceLoad){
  VcObjectRequest req=null;
  boolean isNewRequest=false;
synchronized (objCache) {
    IVcCacheObject obj=objCache.get(moRef);
    if (obj instanceof VcObjectRequest) {
      req=(VcObjectRequest)obj;
      AuAssert.check(req.getMoRef().equals(moRef));
      if (forcedUpdates != null) {
        VcObjectImpl renewResult=req.addUpdates(forcedUpdates);
        if (renewResult != null) {
          obj=renewResult;
        }
      }
    }
    if (obj == null) {
      if (forceLoad) {
        req=new VcObjectRequest(objCache,moRef);
        isNewRequest=true;
      }
 else {
        return null;
      }
    }
 else     if (obj instanceof VcObject) {
      if (forcedUpdates != null) {
        req=new VcObjectRequest(objCache,(VcObjectImpl)obj,forcedUpdates);
        isNewRequest=true;
      }
 else {
        return (VcObject)obj;
      }
    }
  }
  if (isNewRequest) {
    CmsWorker.addRequest(WorkQueue.VC_QUERY_NO_DELAY,req);
  }
  if (waitForRequest && req != null) {
    return req.getResult();
  }
 else {
    return null;
  }
}