nus-yam/ex-repair huggingface dataset:
Program: 160365
Project: 160365
Buggy source:
@Override public void addObjectIDM(SObjectIDMPluginConfiguration objectIDM) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    session.executeAndCommitAction(new AddObjectIDMDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),getBimServer().getSConverter().convertFromSObject(objectIDM,session)));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long addObjectIDM(SObjectIDMPluginConfiguration objectIDM) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    return session.executeAndCommitAction(new AddObjectIDMDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),getBimServer().getSConverter().convertFromSObject(objectIDM,session)));
  }
 catch (  Exception e) {
    return handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160366
Project: 160366
Buggy source:
@Override public void addDeserializer(SDeserializerPluginConfiguration deserializer) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    DeserializerPluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(deserializer,session);
    session.executeAndCommitAction(new AddDeserializerDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long addDeserializer(SDeserializerPluginConfiguration deserializer) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    DeserializerPluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(deserializer,session);
    return session.executeAndCommitAction(new AddDeserializerDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    return handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160367
Project: 160367
Buggy source:
@Override public void addQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    QueryEnginePluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(queryEngine,session);
    session.executeAndCommitAction(new AddQueryEngineDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long addQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    QueryEnginePluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(queryEngine,session);
    return session.executeAndCommitAction(new AddQueryEngineDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    return handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160368
Project: 160368
Buggy source:
@Override public void addInternalService(SInternalServicePluginConfiguration internalService) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    session.executeAndCommitAction(new AddInternalServiceDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),getBimServer().getSConverter().convertFromSObject(internalService,session)));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long addInternalService(SInternalServicePluginConfiguration internalService) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    return session.executeAndCommitAction(new AddInternalServiceDatabaseAction(getBimServer(),session,getInternalAccessMethod(),getAuthorization(),getBimServer().getSConverter().convertFromSObject(internalService,session)));
  }
 catch (  Exception e) {
    return handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160369
Project: 160369
Buggy source:
@Override public void addModelMerger(SModelMergerPluginConfiguration modelMerger) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    ModelMergerPluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(modelMerger,session);
    session.executeAndCommitAction(new AddModelMergerDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long addModelMerger(SModelMergerPluginConfiguration modelMerger) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    ModelMergerPluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(modelMerger,session);
    return session.executeAndCommitAction(new AddModelMergerDatabaseAction(session,getInternalAccessMethod(),getAuthorization(),convert));
  }
 catch (  Exception e) {
    return handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160372
Project: 160372
Buggy source:
@Override protected URL findResource(String name){
  for (  PublicFindClassClassLoader jarClassLoader : jarClassLoaders) {
    URL resource=jarClassLoader.findResource(name);
    if (resource != null) {
      return resource;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public URL findResource(String name){
  for (  PublicFindClassClassLoader jarClassLoader : jarClassLoaders) {
    URL resource=jarClassLoader.findResource(name);
    if (resource != null) {
      return resource;
    }
  }
  return null;
}
Program: 160373
Project: 160373
Buggy source:
@Override protected Class<?> findClass(String name) throws ClassNotFoundException {
  for (  PublicFindClassClassLoader jarClassLoader : jarClassLoaders) {
    try {
      Class<?> findClass=jarClassLoader.findClass(name);
      if (findClass != null) {
        return findClass;
      }
    }
 catch (    ClassNotFoundException e) {
    }
  }
  throw new ClassNotFoundException(name);
}

Fixed version (ground truth):
@Override public Class<?> findClass(String name) throws ClassNotFoundException {
  for (  PublicFindClassClassLoader jarClassLoader : jarClassLoaders) {
    try {
      Class<?> findClass=jarClassLoader.findClass(name);
      if (findClass != null) {
        return findClass;
      }
    }
 catch (    ClassNotFoundException e) {
    }
  }
  throw new ClassNotFoundException(name);
}
Program: 160374
Project: 160374
Buggy source:
public ByteBuffer write() throws BimserverDatabaseException {
  EClass eClass=getDatabaseInterface().getEClassForOid(getOid());
  if (!eClass.isSuperTypeOf(eClass())) {
    throw new BimserverDatabaseException("String_Node_Str" + getOid() + "String_Node_Str"+ eClass().getName()+ "String_Node_Str"+ eClass.getName());
  }
  int nrFeatures=getPackageMetaData().getNrDatabaseFeatures(eClass);
  if (featureCounter > nrFeatures) {
    throw new BimserverDatabaseException("String_Node_Str" + this.eClass.getName() + "String_Node_Str"+ featureCounter+ "String_Node_Str"+ nrFeatures);
  }
 else   if (featureCounter < nrFeatures) {
    throw new BimserverDatabaseException("String_Node_Str" + this.eClass.getName() + "String_Node_Str"+ featureCounter+ "String_Node_Str"+ nrFeatures);
  }
  return buffer;
}

Fixed version (ground truth):
public ByteBuffer write() throws BimserverDatabaseException {
  EClass eClass=getDatabaseInterface().getEClassForOid(getOid());
  if (!eClass.isSuperTypeOf(eClass())) {
    throw new BimserverDatabaseException("String_Node_Str" + getOid() + "String_Node_Str"+ eClass().getName()+ "String_Node_Str"+ eClass.getName());
  }
  int nrFeatures=getPackageMetaData().getNrDatabaseFeatures(eClass);
  if (featureCounter > nrFeatures) {
    throw new BimserverDatabaseException("String_Node_Str" + this.eClass.getName() + "String_Node_Str"+ featureCounter+ "String_Node_Str"+ nrFeatures);
  }
 else   if (featureCounter < nrFeatures) {
    throw new BimserverDatabaseException("String_Node_Str" + this.eClass.getName() + "String_Node_Str"+ featureCounter+ "String_Node_Str"+ nrFeatures);
  }
  if (eClass.getName().equals("String_Node_Str") && buffer.position() == 27) {
    System.out.println();
  }
  return buffer;
}
Program: 160375
Project: 160375
Buggy source:
public void eUnset(EStructuralFeature feature) throws BimserverDatabaseException {
  if (feature.isUnsettable()) {
    int pos=featureCounter / 8;
    byte b=buffer.get(pos);
    b|=(1 << (featureCounter % 8));
    buffer.put(pos,b);
  }
 else {
    if (feature instanceof EReference) {
      ensureCapacity(buffer.position(),2);
      buffer.order(ByteOrder.LITTLE_ENDIAN);
      buffer.putShort((short)-1);
      buffer.order(ByteOrder.BIG_ENDIAN);
    }
 else     if (feature.getEType() instanceof EEnum) {
      writeEnum(feature,null);
    }
 else {
      writePrimitiveValue(feature,null);
    }
  }
  incrementFeatureCounter(feature);
}

Fixed version (ground truth):
public void eUnset(EStructuralFeature feature) throws BimserverDatabaseException {
  if (useUnsetBit(feature)) {
    int pos=featureCounter / 8;
    byte b=buffer.get(pos);
    b|=(1 << (featureCounter % 8));
    buffer.put(pos,b);
  }
 else {
    if (feature instanceof EReference) {
      if (feature.isMany()) {
        ensureCapacity(buffer.position(),4);
        buffer.putInt(0);
      }
 else {
        ensureCapacity(buffer.position(),2);
        buffer.order(ByteOrder.LITTLE_ENDIAN);
        buffer.putShort((short)-1);
        buffer.order(ByteOrder.BIG_ENDIAN);
      }
    }
 else     if (feature.getEType() instanceof EEnum) {
      writeEnum(feature,null);
    }
 else {
      writePrimitiveValue(feature,null);
    }
  }
  incrementFeatureCounter(feature);
}
Program: 160377
Project: 160377
Buggy source:
public SGeometryData convertToSObject(GeometryData input){
  if (input == null) {
    return null;
  }
  SGeometryData result=new SGeometryData();
  result.setOid(input.getOid());
  result.setRid(input.getRid());
  result.setIndices(input.getIndices());
  result.setVertices(input.getVertices());
  result.setNormals(input.getNormals());
  result.setMaterials(input.getMaterials());
  result.setMaterialIndices(input.getMaterialIndices());
  return result;
}

Fixed version (ground truth):
public SPluginInformation convertToSObject(PluginInformation input){
  if (input == null) {
    return null;
  }
  SPluginInformation result=new SPluginInformation();
  result.setOid(input.getOid());
  result.setRid(input.getRid());
  result.setName(input.getName());
  result.setType(SPluginType.values()[input.getType().ordinal()]);
  result.setDescription(input.getDescription());
  result.setEnabled(input.isEnabled());
  result.setIdentifier(input.getIdentifier());
  result.setInstallForAllUsers(input.isInstallForAllUsers());
  result.setInstallForNewUsers(input.isInstallForNewUsers());
  return result;
}
Program: 160378
Project: 160378
Buggy source:
public GeometryData convertFromSObject(SGeometryData input,GeometryData result,DatabaseSession session) throws BimserverDatabaseException {
  if (input == null) {
    return null;
  }
  result.setIndices(input.getIndices());
  result.setVertices(input.getVertices());
  result.setNormals(input.getNormals());
  result.setMaterials(input.getMaterials());
  result.setMaterialIndices(input.getMaterialIndices());
  return result;
}

Fixed version (ground truth):
public PluginInformation convertFromSObject(SPluginInformation input,PluginInformation result,DatabaseSession session) throws BimserverDatabaseException {
  if (input == null) {
    return null;
  }
  result.setName(input.getName());
  result.setType(PluginType.values()[input.getType().ordinal()]);
  result.setDescription(input.getDescription());
  result.setEnabled(input.isEnabled());
  result.setIdentifier(input.getIdentifier());
  result.setInstallForAllUsers(input.isInstallForAllUsers());
  result.setInstallForNewUsers(input.isInstallForNewUsers());
  return result;
}
Program: 160380
Project: 160380
Buggy source:
public static final BimServerClientInterface setupProtocolBuffers(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    BimServerClientFactory factory=new ProtocolBuffersBimServerClientFactory(address,8000,8000,null,metaDataManager);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
public static final BimServerClientInterface setupProtocolBuffers(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    BimServerClientFactory factory=new ProtocolBuffersBimServerClientFactory(address,8000,8000,null,metaDataManager);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  BimServerClientException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}
Program: 160381
Project: 160381
Buggy source:
public static final BimServerClientInterface setupSoap(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    BimServerClientFactory factory=new SoapBimServerClientFactory(metaDataManager,address);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
public static final BimServerClientInterface setupSoap(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    BimServerClientFactory factory=new SoapBimServerClientFactory(metaDataManager,address);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  BimServerClientException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}
Program: 160382
Project: 160382
Buggy source:
/** 
 * @param address
 * @return
 */
public static final BimServerClientInterface setupJson(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    if (!Files.isDirectory(home)) {
      Files.createDirectory(home);
    }
    Path tmp=home.resolve("String_Node_Str");
    if (!Files.isDirectory(tmp)) {
      Files.createDirectory(tmp);
    }
    MavenPluginRepository mavenPluginRepository=new MavenPluginRepository(home.resolve("String_Node_Str"));
    PluginManager pluginManager=new PluginManager(tmp,home.resolve("String_Node_Str"),mavenPluginRepository,System.getProperty("String_Node_Str"),null,null,null);
    pluginManager.loadAllPluginsFromEclipseWorkspace(Paths.get("String_Node_Str"),true);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    metaDataManager.init();
    pluginManager.initAllLoadedPlugins();
    BimServerClientFactory factory=new JsonBimServerClientFactory(metaDataManager,address);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param address
 * @return
 */
public static final BimServerClientInterface setupJson(String address){
  try {
    Path home=Paths.get("String_Node_Str");
    if (!Files.isDirectory(home)) {
      Files.createDirectory(home);
    }
    Path tmp=home.resolve("String_Node_Str");
    if (!Files.isDirectory(tmp)) {
      Files.createDirectory(tmp);
    }
    MavenPluginRepository mavenPluginRepository=new MavenPluginRepository(home.resolve("String_Node_Str"));
    PluginManager pluginManager=new PluginManager(tmp,home.resolve("String_Node_Str"),mavenPluginRepository,System.getProperty("String_Node_Str"),null,null,null);
    pluginManager.loadAllPluginsFromEclipseWorkspace(Paths.get("String_Node_Str"),true);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    metaDataManager.init();
    pluginManager.initAllLoadedPlugins();
    BimServerClientFactory factory=new JsonBimServerClientFactory(metaDataManager,address);
    return factory.create(new UsernamePasswordAuthenticationInfo("String_Node_Str","String_Node_Str"));
  }
 catch (  PluginException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ChannelConnectionException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  BimServerClientException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return null;
}
Program: 160383
Project: 160383
Buggy source:
public Runner(EClass eClass,RenderEnginePool renderEnginePool,DatabaseSession databaseSession,RenderEngineSettings renderEngineSettings,ObjectProvider objectProvider,StreamingSerializerPlugin ifcSerializerPlugin,RenderEngineFilter renderEngineFilter,GenerateGeometryResult generateGeometryResult,QueryContext queryContext){
  this.eClass=eClass;
  this.renderEnginePool=renderEnginePool;
  this.databaseSession=databaseSession;
  this.renderEngineSettings=renderEngineSettings;
  this.objectProvider=objectProvider;
  this.ifcSerializerPlugin=ifcSerializerPlugin;
  this.renderEngineFilter=renderEngineFilter;
  this.generateGeometryResult=generateGeometryResult;
  this.queryContext=queryContext;
}

Fixed version (ground truth):
public Runner(EClass eClass,RenderEnginePool renderEnginePool,DatabaseSession databaseSession,RenderEngineSettings renderEngineSettings,ObjectProvider objectProvider,StreamingSerializerPlugin ifcSerializerPlugin,RenderEngineFilter renderEngineFilter,GenerateGeometryResult generateGeometryResult,QueryContext queryContext,Query originalQuery){
  this.eClass=eClass;
  this.renderEnginePool=renderEnginePool;
  this.databaseSession=databaseSession;
  this.renderEngineSettings=renderEngineSettings;
  this.objectProvider=objectProvider;
  this.ifcSerializerPlugin=ifcSerializerPlugin;
  this.renderEngineFilter=renderEngineFilter;
  this.generateGeometryResult=generateGeometryResult;
  this.queryContext=queryContext;
  this.originalQuery=originalQuery;
}
Program: 160386
Project: 160386
Buggy source:
public static void main(String[] args){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    JsonBimServerClientFactory factory=new JsonBimServerClientFactory(metaDataManager,args[0]);
    BimServerClient client=factory.create(new UsernamePasswordAuthenticationInfo(args[1],args[2]));
    client.getServiceInterface().importData(args[3],args[1],args[2],args[4]);
  }
 catch (  PluginException e) {
    e.printStackTrace();
  }
catch (  ServiceException e) {
    e.printStackTrace();
  }
catch (  ChannelConnectionException e) {
    e.printStackTrace();
  }
catch (  PublicInterfaceNotFoundException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    Path home=Paths.get("String_Node_Str");
    Path tmp=home.resolve("String_Node_Str");
    PluginManager pluginManager=LocalDevPluginLoader.createPluginManager(home);
    MetaDataManager metaDataManager=new MetaDataManager(tmp);
    pluginManager.setMetaDataManager(metaDataManager);
    JsonBimServerClientFactory factory=new JsonBimServerClientFactory(metaDataManager,args[0]);
    BimServerClient client=factory.create(new UsernamePasswordAuthenticationInfo(args[1],args[2]));
    client.getServiceInterface().importData(args[3],args[1],args[2],args[4]);
  }
 catch (  PluginException e) {
    e.printStackTrace();
  }
catch (  ServiceException e) {
    e.printStackTrace();
  }
catch (  ChannelConnectionException e) {
    e.printStackTrace();
  }
catch (  PublicInterfaceNotFoundException e) {
    e.printStackTrace();
  }
catch (  BimServerClientException e) {
    e.printStackTrace();
  }
}
Program: 160387
Project: 160387
Buggy source:
public SPluginBundle processPluginLocation(PluginLocation<?> pluginLocation,boolean strictVersionChecking,DefaultArtifactVersion bimserverVersion){
  if (pluginLocation instanceof MavenPluginLocation) {
    return processMavenPluginLocation((MavenPluginLocation)pluginLocation,strictVersionChecking,bimserverVersion);
  }
 else   if (pluginLocation instanceof GitHubPluginLocation) {
    return processGitHubPluginLocation((GitHubPluginLocation)pluginLocation,strictVersionChecking,bimserverVersion);
  }
  return null;
}

Fixed version (ground truth):
public SPluginBundle processPluginLocation(PluginLocation<?> pluginLocation,boolean strictVersionChecking,DefaultArtifactVersion bimserverVersion){
  if (pluginLocation instanceof MavenPluginLocation) {
    return processMavenPluginLocation((MavenPluginLocation)pluginLocation,strictVersionChecking,bimserverVersion);
  }
  return null;
}
Program: 160388
Project: 160388
Buggy source:
@Override public HashMapVirtualObject next() throws BimserverDatabaseException {
  if (start == -1) {
    start=System.nanoTime();
  }
  try {
    while (!stack.isEmpty()) {
      if (stack.size() > 10000) {
        dumpEndQuery();
        throw new BimserverDatabaseException("String_Node_Str");
      }
      StackFrame stackFrame=stack.peek();
      if (stackFrame.isDone()) {
        stack.pop();
        continue;
      }
      stackFramesProcessed++;
      if (stackFramesProcessed > 10000000) {
        dumpEndQuery();
        throw new BimserverDatabaseException("String_Node_Str");
      }
      boolean done=stackFrame.process();
      stackFrame.setDone(done);
      if (stackFrame instanceof ObjectProvidingStackFrame) {
        HashMapVirtualObject currentObject=((ObjectProvidingStackFrame)stackFrame).getCurrentObject();
        if (currentObject != null) {
          if (!oidsRead.contains(currentObject.getOid())) {
            oidsRead.add(currentObject.getOid());
            return currentObject;
          }
        }
      }
    }
  }
 catch (  Exception e) {
    throw new BimserverDatabaseException(e);
  }
  dumpEndQuery();
  return null;
}

Fixed version (ground truth):
@Override public HashMapVirtualObject next() throws BimserverDatabaseException {
  if (start == -1) {
    start=System.nanoTime();
  }
  try {
    while (!stack.isEmpty()) {
      if (stack.size() > MAX_STACK_SIZE) {
        dumpEndQuery();
        throw new BimserverDatabaseException("String_Node_Str");
      }
      StackFrame stackFrame=stack.peek();
      if (stackFrame.isDone()) {
        stack.pop();
        continue;
      }
      stackFramesProcessed++;
      if (stackFramesProcessed > MAX_STACK_FRAMES_PROCESSED) {
        dumpEndQuery();
        throw new BimserverDatabaseException("String_Node_Str" + MAX_STACK_FRAMES_PROCESSED + "String_Node_Str");
      }
      boolean done=stackFrame.process();
      stackFrame.setDone(done);
      if (stackFrame instanceof ObjectProvidingStackFrame) {
        HashMapVirtualObject currentObject=((ObjectProvidingStackFrame)stackFrame).getCurrentObject();
        if (currentObject != null) {
          if (currentObject.eClass().getName().equals("String_Node_Str")) {
          }
          if (!oidsRead.contains(currentObject.getOid())) {
            oidsRead.add(currentObject.getOid());
            return currentObject;
          }
        }
      }
    }
  }
 catch (  Exception e) {
    throw new BimserverDatabaseException(e);
  }
  dumpEndQuery();
  return null;
}
Program: 160389
Project: 160389
Buggy source:
public void updateUserSettings(DatabaseSession session,User user) throws BimserverLockConflictException, BimserverDatabaseException {
  UserSettings userSettings=user.getUserSettings();
  if (userSettings == null) {
    userSettings=session.create(UserSettings.class);
    user.setUserSettings(userSettings);
    session.store(user);
  }
  for (  Entry<PluginContext,Plugin> pluginEntry : pluginManager.getAllPlugins(true).entrySet()) {
    if (pluginEntry.getValue() instanceof WebModulePlugin || pluginEntry.getValue() instanceof ModelCheckerPlugin) {
      continue;
    }
    PluginDescriptor pluginDescriptor=getPluginDescriptor(session,pluginEntry.getKey().getIdentifier());
    if (pluginDescriptor == null) {
      throw new BimserverDatabaseException("String_Node_Str" + pluginEntry.getKey().getIdentifier());
    }
    updateUserPlugin(session,user,pluginDescriptor,pluginEntry.getKey());
  }
  session.store(userSettings);
}

Fixed version (ground truth):
public void updateUserSettings(DatabaseSession session,User user) throws BimserverLockConflictException, BimserverDatabaseException {
  UserSettings userSettings=user.getUserSettings();
  if (userSettings == null) {
    userSettings=session.create(UserSettings.class);
    user.setUserSettings(userSettings);
    session.store(user);
  }
  for (  Entry<PluginContext,Plugin> pluginEntry : pluginManager.getAllPlugins(true).entrySet()) {
    if (pluginEntry.getValue() instanceof WebModulePlugin || pluginEntry.getValue() instanceof ModelCheckerPlugin) {
      continue;
    }
    PluginDescriptor pluginDescriptor=getPluginDescriptor(session,pluginEntry.getKey().getIdentifier());
    if (pluginDescriptor == null) {
      LOGGER.error("String_Node_Str" + pluginEntry.getKey().getIdentifier());
    }
 else {
      updateUserPlugin(session,user,pluginDescriptor,pluginEntry.getKey());
    }
  }
  session.store(userSettings);
}
Program: 160398
Project: 160398
Buggy source:
public PluginManager(Path tempDir,Path pluginsDir,Path mavenDir,String baseClassPath,ServiceFactory serviceFactory,NotificationsManagerInterface notificationsManagerInterface,SServicesMap servicesMap){
  LOGGER.debug("String_Node_Str");
  this.mavenDir=mavenDir;
  this.pluginsDir=pluginsDir;
  this.tempDir=tempDir;
  this.baseClassPath=baseClassPath;
  this.serviceFactory=serviceFactory;
  this.notificationsManagerInterface=notificationsManagerInterface;
  this.servicesMap=servicesMap;
  if (pluginsDir != null) {
    if (!Files.isDirectory(pluginsDir)) {
      try {
        Files.createDirectories(pluginsDir);
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
 else {
      try {
        for (        Path file : PathUtils.list(pluginsDir)) {
          try {
            PluginBundleVersionIdentifier pluginBundleVersionIdentifier=PluginBundleVersionIdentifier.fromFileName(file.getFileName().toString());
            loadPluginsFromJar(pluginBundleVersionIdentifier,file,extractPluginBundleFromJar(file),extractPluginBundleVersionFromJar(file));
            LOGGER.info("String_Node_Str" + pluginBundleVersionIdentifier.getHumanReadable());
          }
 catch (          PluginException e) {
            LOGGER.error("String_Node_Str",e);
          }
        }
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
public PluginManager(Path tempDir,Path pluginsDir,Path mavenDir,String baseClassPath,ServiceFactory serviceFactory,NotificationsManagerInterface notificationsManagerInterface,SServicesMap servicesMap){
  LOGGER.debug("String_Node_Str");
  this.mavenDir=mavenDir;
  this.pluginsDir=pluginsDir;
  this.tempDir=tempDir;
  this.baseClassPath=baseClassPath;
  this.serviceFactory=serviceFactory;
  this.notificationsManagerInterface=notificationsManagerInterface;
  this.servicesMap=servicesMap;
}
Program: 160399
Project: 160399
Buggy source:
private void processPluginDescriptor(PluginDescriptor pluginDescriptor,List<SPluginInformation> list){
  for (  AbstractPlugin pluginImplementation : pluginDescriptor.getPlugins()) {
    if (pluginImplementation instanceof JavaPlugin) {
      JavaPlugin javaPlugin=(JavaPlugin)pluginImplementation;
      SPluginInformation sPluginInformation=new SPluginInformation();
      sPluginInformation.setName(javaPlugin.getImplementationClass());
      sPluginInformation.setDescription(javaPlugin.getDescription());
      sPluginInformation.setIdentifier(javaPlugin.getImplementationClass());
      sPluginInformation.setType(getPluginTypeFromClass(javaPlugin.getInterfaceClass()));
      list.add(sPluginInformation);
    }
 else     if (pluginImplementation instanceof org.bimserver.plugins.WebModulePlugin) {
      org.bimserver.plugins.WebModulePlugin webModulePlugin=(org.bimserver.plugins.WebModulePlugin)pluginImplementation;
      SPluginInformation sPluginInformation=new SPluginInformation();
      sPluginInformation.setIdentifier(webModulePlugin.getIdentifier());
      sPluginInformation.setName(webModulePlugin.getIdentifier());
      sPluginInformation.setDescription(webModulePlugin.getDescription());
      sPluginInformation.setType(SPluginType.WEB_MODULE);
      list.add(sPluginInformation);
    }
  }
}

Fixed version (ground truth):
private void processPluginDescriptor(PluginDescriptor pluginDescriptor,List<SPluginInformation> list){
  for (  AbstractPlugin pluginImplementation : pluginDescriptor.getPlugins()) {
    if (pluginImplementation instanceof JavaPlugin) {
      JavaPlugin javaPlugin=(JavaPlugin)pluginImplementation;
      SPluginInformation sPluginInformation=new SPluginInformation();
      sPluginInformation.setName(javaPlugin.getImplementationClass());
      sPluginInformation.setDescription(javaPlugin.getDescription());
      sPluginInformation.setEnabled(true);
      sPluginInformation.setIdentifier(javaPlugin.getImplementationClass());
      sPluginInformation.setType(getPluginTypeFromClass(javaPlugin.getInterfaceClass()));
      list.add(sPluginInformation);
    }
 else     if (pluginImplementation instanceof org.bimserver.plugins.WebModulePlugin) {
      org.bimserver.plugins.WebModulePlugin webModulePlugin=(org.bimserver.plugins.WebModulePlugin)pluginImplementation;
      SPluginInformation sPluginInformation=new SPluginInformation();
      sPluginInformation.setIdentifier(webModulePlugin.getIdentifier());
      sPluginInformation.setName(webModulePlugin.getIdentifier());
      sPluginInformation.setDescription(webModulePlugin.getDescription());
      sPluginInformation.setType(SPluginType.WEB_MODULE);
      sPluginInformation.setEnabled(true);
      list.add(sPluginInformation);
    }
  }
}
Program: 160400
Project: 160400
Buggy source:
public PluginDescriptor getPluginDescriptor(InputStream inputStream) throws JAXBException {
  JAXBContext jaxbContext=JAXBContext.newInstance(PluginDescriptor.class);
  Unmarshaller unmarshaller=jaxbContext.createUnmarshaller();
  PluginDescriptor pluginDescriptor=(PluginDescriptor)unmarshaller.unmarshal(inputStream);
  return pluginDescriptor;
}

Fixed version (ground truth):
public PluginDescriptor getPluginDescriptor(byte[] bytes) throws JAXBException, IOException {
  return getPluginDescriptor(new ByteArrayInputStream(bytes));
}
Program: 160406
Project: 160406
Buggy source:
public void initInternalStructure(DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {
  RecordIterator recordIterator=keyValueStore.getRecordIterator(CLASS_LOOKUP_TABLE,databaseSession);
  try {
    Record record=recordIterator.next();
    while (record != null) {
      String packageAndClassName=BinUtils.byteArrayToString(record.getValue());
      String packageName=packageAndClassName.substring(0,packageAndClassName.indexOf("String_Node_Str"));
      String className=packageAndClassName.substring(packageAndClassName.indexOf("String_Node_Str") + 1);
      EClass eClass=(EClass)getEClassifier(packageName,className);
      keyValueStore.openTable(packageAndClassName);
      for (      EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
        if (eStructuralFeature.getEAnnotation("String_Node_Str") != null) {
          String indexTableName=eClass.getEPackage().getName() + "String_Node_Str" + eClass.getName()+ "String_Node_Str"+ eStructuralFeature.getName();
          try {
            keyValueStore.openIndexTable(indexTableName);
          }
 catch (          DatabaseNotFoundException e) {
          }
        }
      }
      Short cid=BinUtils.byteArrayToShort(record.getKey());
      classifiers.put(cid,eClass);
      record=recordIterator.next();
    }
  }
  finally {
    recordIterator.close();
  }
}

Fixed version (ground truth):
public void initInternalStructure(DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {
  RecordIterator recordIterator=keyValueStore.getRecordIterator(CLASS_LOOKUP_TABLE,databaseSession);
  try {
    Record record=recordIterator.next();
    while (record != null) {
      String packageAndClassName=BinUtils.byteArrayToString(record.getValue());
      String packageName=packageAndClassName.substring(0,packageAndClassName.indexOf("String_Node_Str"));
      String className=packageAndClassName.substring(packageAndClassName.indexOf("String_Node_Str") + 1);
      EClass eClass=(EClass)getEClassifier(packageName,className);
      boolean transactional=!(eClass.getEPackage() == Ifc2x3tc1Package.eINSTANCE || eClass.getEPackage() == Ifc4Package.eINSTANCE);
      keyValueStore.openTable(packageAndClassName,transactional);
      for (      EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
        if (eStructuralFeature.getEAnnotation("String_Node_Str") != null) {
          String indexTableName=eClass.getEPackage().getName() + "String_Node_Str" + eClass.getName()+ "String_Node_Str"+ eStructuralFeature.getName();
          try {
            keyValueStore.openIndexTable(indexTableName,transactional);
          }
 catch (          DatabaseNotFoundException e) {
          }
        }
      }
      Short cid=BinUtils.byteArrayToShort(record.getKey());
      classifiers.put(cid,eClass);
      record=recordIterator.next();
    }
  }
  finally {
    recordIterator.close();
  }
}
Program: 160408
Project: 160408
Buggy source:
void openIndexTable(String indexTableName) throws BimserverDatabaseException ;

Fixed version (ground truth):
void openIndexTable(String indexTableName,boolean transactional) throws BimserverDatabaseException ;
Program: 160409
Project: 160409
Buggy source:
boolean openTable(String tableName) throws BimserverDatabaseException ;

Fixed version (ground truth):
boolean openTable(String tableName,boolean transactional) throws BimserverDatabaseException ;
Program: 160410
Project: 160410
Buggy source:
public void openIndexTable(String tableName) throws BimserverDatabaseException {
  if (tables.containsKey(tableName)) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  DatabaseConfig databaseConfig=new DatabaseConfig();
  databaseConfig.setAllowCreate(false);
  databaseConfig.setDeferredWrite(defer);
  databaseConfig.setTransactional(useTransactions);
  databaseConfig.setSortedDuplicates(true);
  Database database=environment.openDatabase(null,tableName,databaseConfig);
  if (database == null) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  tables.put(tableName,database);
}

Fixed version (ground truth):
public void openIndexTable(String tableName,boolean transactional) throws BimserverDatabaseException {
  if (tables.containsKey(tableName)) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  DatabaseConfig databaseConfig=new DatabaseConfig();
  databaseConfig.setAllowCreate(false);
  databaseConfig.setDeferredWrite(!(transactional && useTransactions));
  databaseConfig.setTransactional(transactional && useTransactions);
  databaseConfig.setSortedDuplicates(true);
  Database database=environment.openDatabase(null,tableName,databaseConfig);
  if (database == null) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  tables.put(tableName,database);
}
Program: 160411
Project: 160411
Buggy source:
public boolean openTable(String tableName) throws BimserverDatabaseException {
  if (tables.containsKey(tableName)) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  DatabaseConfig databaseConfig=new DatabaseConfig();
  databaseConfig.setAllowCreate(false);
  databaseConfig.setDeferredWrite(defer);
  databaseConfig.setTransactional(useTransactions);
  databaseConfig.setSortedDuplicates(false);
  Database database=environment.openDatabase(null,tableName,databaseConfig);
  if (database == null) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  tables.put(tableName,database);
  return true;
}

Fixed version (ground truth):
public boolean openTable(String tableName,boolean transactional) throws BimserverDatabaseException {
  if (tables.containsKey(tableName)) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  DatabaseConfig databaseConfig=new DatabaseConfig();
  databaseConfig.setAllowCreate(false);
  databaseConfig.setDeferredWrite(!(transactional && useTransactions));
  databaseConfig.setTransactional(transactional && useTransactions);
  databaseConfig.setSortedDuplicates(false);
  Database database=environment.openDatabase(null,tableName,databaseConfig);
  if (database == null) {
    throw new BimserverDatabaseException("String_Node_Str" + tableName + "String_Node_Str");
  }
  tables.put(tableName,database);
  return true;
}
Program: 160412
Project: 160412
Buggy source:
@Override public void storeNoOverwrite(String tableName,byte[] key,byte[] value,int index,int length,DatabaseSession databaseSession) throws BimserverDatabaseException, BimserverLockConflictException, BimserverConcurrentModificationDatabaseException {
  DatabaseEntry dbKey=new DatabaseEntry(key);
  DatabaseEntry dbValue=new DatabaseEntry(value,index,length);
  try {
    Database database=getDatabase(tableName);
    OperationStatus putNoOverwrite=database.putNoOverwrite(getTransaction(databaseSession),dbKey,dbValue);
    if (putNoOverwrite == OperationStatus.KEYEXIST) {
      ByteBuffer keyBuffer=ByteBuffer.wrap(key);
      if (key.length == 16) {
        int pid=keyBuffer.getInt();
        long oid=keyBuffer.getLong();
        int rid=-keyBuffer.getInt();
        throw new BimserverConcurrentModificationDatabaseException("String_Node_Str" + pid + "String_Node_Str"+ oid+ "String_Node_Str"+ rid);
      }
 else {
        throw new BimserverConcurrentModificationDatabaseException("String_Node_Str");
      }
    }
  }
 catch (  LockConflictException e) {
    throw new BimserverLockConflictException(e);
  }
catch (  DatabaseException e) {
    throw new BimserverDatabaseException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void storeNoOverwrite(String tableName,byte[] key,byte[] value,int index,int length,DatabaseSession databaseSession) throws BimserverDatabaseException, BimserverLockConflictException, BimserverConcurrentModificationDatabaseException {
  DatabaseEntry dbKey=new DatabaseEntry(key);
  DatabaseEntry dbValue=new DatabaseEntry(value,index,length);
  try {
    Database database=getDatabase(tableName);
    OperationStatus putNoOverwrite=database.putNoOverwrite(database.getConfig().getTransactional() ? getTransaction(databaseSession) : null,dbKey,dbValue);
    if (putNoOverwrite == OperationStatus.KEYEXIST) {
      ByteBuffer keyBuffer=ByteBuffer.wrap(key);
      if (key.length == 16) {
        int pid=keyBuffer.getInt();
        long oid=keyBuffer.getLong();
        int rid=-keyBuffer.getInt();
        throw new BimserverConcurrentModificationDatabaseException("String_Node_Str" + pid + "String_Node_Str"+ oid+ "String_Node_Str"+ rid);
      }
 else {
        throw new BimserverConcurrentModificationDatabaseException("String_Node_Str");
      }
    }
  }
 catch (  LockConflictException e) {
    throw new BimserverLockConflictException(e);
  }
catch (  DatabaseException e) {
    throw new BimserverDatabaseException("String_Node_Str",e);
  }
}
Program: 160413
Project: 160413
Buggy source:
@Override public SearchingRecordIterator getRecordIterator(String tableName,byte[] mustStartWith,byte[] startSearchingAt,DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {
  Cursor cursor=null;
  try {
    cursor=getDatabase(tableName).openCursor(getTransaction(databaseSession),cursorConfig);
    BerkeleySearchingRecordIterator berkeleySearchingRecordIterator=new BerkeleySearchingRecordIterator(cursor,this,cursorCounter.incrementAndGet(),mustStartWith,startSearchingAt);
    if (MONITOR_CURSOR_STACK_TRACES) {
      openCursors.put(berkeleySearchingRecordIterator.getCursorId(),new Exception().getStackTrace());
    }
    return berkeleySearchingRecordIterator;
  }
 catch (  BimserverLockConflictException e) {
    if (cursor != null) {
      try {
        cursor.close();
        throw e;
      }
 catch (      DatabaseException e1) {
        LOGGER.error("String_Node_Str",e1);
      }
    }
  }
catch (  DatabaseException e1) {
    LOGGER.error("String_Node_Str",e1);
  }
  return null;
}

Fixed version (ground truth):
@Override public SearchingRecordIterator getRecordIterator(String tableName,byte[] mustStartWith,byte[] startSearchingAt,DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {
  Cursor cursor=null;
  try {
    Database database=getDatabase(tableName);
    cursor=database.openCursor(database.getConfig().getTransactional() ? getTransaction(databaseSession) : null,cursorConfig);
    BerkeleySearchingRecordIterator berkeleySearchingRecordIterator=new BerkeleySearchingRecordIterator(cursor,this,cursorCounter.incrementAndGet(),mustStartWith,startSearchingAt);
    if (MONITOR_CURSOR_STACK_TRACES) {
      openCursors.put(berkeleySearchingRecordIterator.getCursorId(),new Exception().getStackTrace());
    }
    return berkeleySearchingRecordIterator;
  }
 catch (  BimserverLockConflictException e) {
    if (cursor != null) {
      try {
        cursor.close();
        throw e;
      }
 catch (      DatabaseException e1) {
        LOGGER.error("String_Node_Str",e1);
      }
    }
  }
catch (  DatabaseException e1) {
    LOGGER.error("String_Node_Str",e1);
  }
  return null;
}
Program: 160414
Project: 160414
Buggy source:
@Override public void updateQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    QueryEnginePluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(queryEngine,session);
    session.executeAndCommitAction(new UpdateQueryEngineDatabaseAction(session,getInternalAccessMethod(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public void updateQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    QueryEnginePluginConfiguration convert=session.get(queryEngine.getOid(),OldQuery.getDefault());
    getBimServer().getSConverter().convertFromSObject(queryEngine,convert,session);
    session.executeAndCommitAction(new UpdateQueryEngineDatabaseAction(session,getInternalAccessMethod(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}
Program: 160415
Project: 160415
Buggy source:
@Override public void updateModelCompare(SModelComparePluginConfiguration modelCompare) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    ModelComparePluginConfiguration convert=getBimServer().getSConverter().convertFromSObject(modelCompare,session);
    session.executeAndCommitAction(new UpdateModelCompareDatabaseAction(session,getInternalAccessMethod(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public void updateModelCompare(SModelComparePluginConfiguration modelCompare) throws ServerException, UserException {
  requireRealUserAuthentication();
  DatabaseSession session=getBimServer().getDatabase().createSession();
  try {
    ModelComparePluginConfiguration convert=session.get(modelCompare.getOid(),OldQuery.getDefault());
    getBimServer().getSConverter().convertFromSObject(modelCompare,convert,session);
    session.executeAndCommitAction(new UpdateModelCompareDatabaseAction(session,getInternalAccessMethod(),convert));
  }
 catch (  Exception e) {
    handleException(e);
  }
 finally {
    session.close();
  }
}