Program: 68747
Project: 68747
Buggy source:
public void test() throws Exception {
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isSybase()) {
    throw new TestWarningException("String_Node_Str");
  }
  if ((getSession().getPlatform().isMySQL() || getSession().getPlatform().isTimesTen()) && lockMode == org.eclipse.persistence.queries.ObjectLevelReadQuery.LOCK_NOWAIT) {
    throw new TestWarningException("String_Node_Str");
  }
  ReadObjectQuery query=new ReadObjectQuery(Address.class);
  Address address=(Address)getSession().executeQuery(query);
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  query.setSelectionObject(address);
  address=(Address)getSession().executeQuery(query);
  uow=getSession().acquireUnitOfWork();
  address=(Address)uow.executeQuery(query);
  DatabaseSession session2=null;
  UnitOfWork uow2=null;
  try {
    if (getSession() instanceof org.eclipse.persistence.sessions.remote.RemoteSession) {
      session2=org.eclipse.persistence.testing.tests.remote.RemoteModel.getServerSession().getProject().createDatabaseSession();
    }
 else {
      session2=getSession().getProject().createDatabaseSession();
    }
    session2.setLog(getSession().getLog());
    session2.setLogLevel(getSession().getLogLevel());
    session2.login();
    uow2=session2.acquireUnitOfWork();
    boolean isLocked=false;
    try {
      Address lockedAddress=(Address)uow2.executeQuery(query);
    }
 catch (    EclipseLinkException exeception) {
      session2.logMessage(exeception.toString());
      isLocked=true;
    }
    if (!isLocked) {
      throw new TestErrorException("String_Node_Str");
    }
    session2.executeQuery(query);
  }
 catch (  RuntimeException e) {
    throw e;
  }
 finally {
    if (uow2 != null) {
      uow2.release();
    }
    if (session2 != null) {
      session2.logout();
    }
  }
  query.checkCacheOnly();
  address=(Address)getSession().executeQuery(query);
  strongAssert(address != null,"String_Node_Str");
}

Fixed version (ground truth):
public void test() throws Exception {
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isSybase()) {
    throw new TestWarningException("String_Node_Str");
  }
  if ((getSession().getPlatform().isMySQL()) && lockMode == org.eclipse.persistence.queries.ObjectLevelReadQuery.LOCK_NOWAIT) {
    throw new TestWarningException("String_Node_Str");
  }
  ReadObjectQuery query=new ReadObjectQuery(Address.class);
  Address address=(Address)getSession().executeQuery(query);
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  query.setSelectionObject(address);
  address=(Address)getSession().executeQuery(query);
  uow=getSession().acquireUnitOfWork();
  address=(Address)uow.executeQuery(query);
  DatabaseSession session2=null;
  UnitOfWork uow2=null;
  try {
    if (getSession() instanceof org.eclipse.persistence.sessions.remote.RemoteSession) {
      session2=org.eclipse.persistence.testing.tests.remote.RemoteModel.getServerSession().getProject().createDatabaseSession();
    }
 else {
      session2=getSession().getProject().createDatabaseSession();
    }
    session2.setLog(getSession().getLog());
    session2.setLogLevel(getSession().getLogLevel());
    session2.login();
    uow2=session2.acquireUnitOfWork();
    boolean isLocked=false;
    try {
      Address lockedAddress=(Address)uow2.executeQuery(query);
    }
 catch (    EclipseLinkException exeception) {
      session2.logMessage(exeception.toString());
      isLocked=true;
    }
    if (!isLocked) {
      throw new TestErrorException("String_Node_Str");
    }
    session2.executeQuery(query);
  }
 catch (  RuntimeException e) {
    throw e;
  }
 finally {
    if (uow2 != null) {
      uow2.release();
    }
    if (session2 != null) {
      session2.logout();
    }
  }
  query.checkCacheOnly();
  address=(Address)getSession().executeQuery(query);
  strongAssert(address != null,"String_Node_Str");
}