nus-yam/ex-repair huggingface dataset:
Program: 176432
Project: 176432
Buggy source:
protected boolean containsAll(final Collection arg0){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    result=getDataCollection().containsAll(arg0);
  }
  return result;
}

Fixed version (ground truth):
protected boolean containsAll(final Collection arg0){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    result=((Collection)getDataCollection()).containsAll(arg0);
  }
  return result;
}
Program: 176433
Project: 176433
Buggy source:
protected boolean add(final Object object){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && !dataCollection.contains(object) && object != null) {
    dataCollection.add(object);
    PropertyAccessorHelper.set(getOwner(),getRelation().getProperty(),dataCollection);
    result=true;
  }
  return result;
}

Fixed version (ground truth):
protected boolean add(final Object object){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && !((Collection)dataCollection).contains(object) && object != null) {
    ((Collection)dataCollection).add(object);
    PropertyAccessorHelper.set(getOwner(),getRelation().getProperty(),dataCollection);
    result=true;
  }
  return result;
}
Program: 176434
Project: 176434
Buggy source:
protected boolean removeAll(final Collection collection){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    dataCollection.removeAll(collection);
    result=true;
  }
  return result;
}

Fixed version (ground truth):
protected boolean removeAll(final Collection collection){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    ((Collection)dataCollection).removeAll(collection);
    result=true;
  }
  return result;
}
Program: 176435
Project: 176435
Buggy source:
protected Iterator iterator(){
  eagerlyLoadDataCollection();
  Iterator result=null;
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    result=getDataCollection().iterator();
  }
  return result;
}

Fixed version (ground truth):
protected Iterator iterator(){
  eagerlyLoadDataCollection();
  Iterator result=null;
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    result=((Collection)getDataCollection()).iterator();
  }
  return result;
}
Program: 176436
Project: 176436
Buggy source:
protected boolean addAll(final Collection collection){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    dataCollection.addAll(collection);
    result=true;
  }
  return result;
}

Fixed version (ground truth):
protected boolean addAll(final Collection collection){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    ((Collection)dataCollection).addAll(collection);
    result=true;
  }
  return result;
}
Program: 176437
Project: 176437
Buggy source:
protected Object[] toArray(final Object[] arg0){
  eagerlyLoadDataCollection();
  return dataCollection == null ? new Object[0] : dataCollection.toArray(arg0);
}

Fixed version (ground truth):
protected Object[] toArray(final Object[] arg0){
  eagerlyLoadDataCollection();
  return dataCollection == null ? new Object[0] : ((Collection)dataCollection).toArray(arg0);
}
Program: 176438
Project: 176438
Buggy source:
protected boolean remove(final Object object){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && object != null) {
    dataCollection.remove(object);
    result=true;
  }
  return result;
}

Fixed version (ground truth):
protected boolean remove(final Object object){
  eagerlyLoadDataCollection();
  boolean result=false;
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && object != null) {
    ((Collection)dataCollection).remove(object);
    result=true;
  }
  return result;
}
Program: 176439
Project: 176439
Buggy source:
protected boolean retainAll(final Collection collection){
  boolean result=false;
  eagerlyLoadDataCollection();
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    result=dataCollection.retainAll(collection);
  }
  return result;
}

Fixed version (ground truth):
protected boolean retainAll(final Collection collection){
  boolean result=false;
  eagerlyLoadDataCollection();
  if (dataCollection == null) {
    createEmptyDataCollection();
  }
  if (dataCollection != null && !(dataCollection instanceof ProxyCollection) && collection != null && !collection.isEmpty()) {
    result=((Collection)dataCollection).retainAll(collection);
  }
  return result;
}
Program: 176440
Project: 176440
Buggy source:
/** 
 * Retrieves actual collection data that implementor of this interface holds. Unless proxy collection is eagerly loaded, this values would normally be null
 */
Collection getDataCollection();

Fixed version (ground truth):
/** 
 * Retrieves actual collection data that implementor of this interface holds. Unless proxy collection is eagerly loaded, this values would normally be null
 */
Object getDataCollection();
Program: 176441
Project: 176441
Buggy source:
@Override public void clear(){
  super.clear();
}

Fixed version (ground truth):
@Override public void clear(){
  eagerlyLoadDataCollection();
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    ((Map)getDataCollection()).clear();
  }
}
Program: 176442
Project: 176442
Buggy source:
@Override public boolean isEmpty(){
  return super.isEmpty();
}

Fixed version (ground truth):
@Override public boolean isEmpty(){
  boolean result=true;
  eagerlyLoadDataCollection();
  if (getDataCollection() != null && !(getDataCollection() instanceof ProxyCollection)) {
    result=((Map)getDataCollection()).isEmpty();
  }
  return result;
}
Program: 176443
Project: 176443
Buggy source:
@Override public int size(){
  return super.size();
}

Fixed version (ground truth):
@Override public int size(){
  eagerlyLoadDataCollection();
  return dataCollection == null || dataCollection instanceof ProxyCollection ? 0 : ((Map)dataCollection).size();
}
Program: 176444
Project: 176444
Buggy source:
@Test public void test(){
  try {
    KsDef ksDef=CassandraCli.client.describe_keyspace("String_Node_Str");
    Assert.assertNotNull(ksDef);
    Assert.assertEquals(11,ksDef.getCf_defsSize());
    int count=0;
    for (    CfDef cfDef : ksDef.cf_defs) {
      if (cfDef.getName().equals("String_Node_Str")) {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName()));
        count++;
        continue;
      }
      if (cfDef.getName().equals("String_Node_Str")) {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName()));
        count++;
      }
 else {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        List<ColumnDef> columnDefs=cfDef.getColumn_metadata();
        Assert.assertEquals(1,columnDefs.size());
        count++;
      }
    }
    Assert.assertEquals(11,count);
  }
 catch (  NotFoundException e) {
    e.printStackTrace();
  }
catch (  InvalidRequestException e) {
    e.printStackTrace();
  }
catch (  TException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test public void test(){
  try {
    KsDef ksDef=CassandraCli.client.describe_keyspace("String_Node_Str");
    Assert.assertNotNull(ksDef);
    Assert.assertEquals(13,ksDef.getCf_defsSize());
    int count=0;
    for (    CfDef cfDef : ksDef.cf_defs) {
      if (cfDef.getName().equals("String_Node_Str")) {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName()));
        count++;
        continue;
      }
      if (cfDef.getName().equals("String_Node_Str")) {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName()));
        count++;
      }
 else {
        Assert.assertTrue(cfDef.getColumn_type().equals("String_Node_Str"));
        List<ColumnDef> columnDefs=cfDef.getColumn_metadata();
        Assert.assertEquals(1,columnDefs.size());
        count++;
      }
    }
    Assert.assertEquals(13,count);
  }
 catch (  NotFoundException e) {
    e.printStackTrace();
  }
catch (  InvalidRequestException e) {
    e.printStackTrace();
  }
catch (  TException e) {
    e.printStackTrace();
  }
}
Program: 176445
Project: 176445
Buggy source:
public static LoadState isLoadedWithReference(Object proxy,String property,MetadataCache cache){
  return isLoaded(get(proxy,property,cache));
}

Fixed version (ground truth):
public static LoadState isLoadedWithReference(Object proxy,String property,MetadataCache cache){
  return proxy == null ? LoadState.NOT_LOADED : isLoaded(get(proxy,property,cache));
}
Program: 176446
Project: 176446
Buggy source:
/** 
 * Adds typed parameter to   {@link TypedParameter}
 * @param type type of parameter(e.g. NAMED/INDEXED)
 * @param parameter parameter name.
 * @param clause filter clause.
 */
private void addTypedParameter(Type type,String parameter,UpdateClause clause){
  if (typedParameter == null) {
    typedParameter=new TypedParameter(type);
  }
  if (typedParameter.getType().equals(type)) {
    typedParameter.addParameters(parameter,clause);
  }
 else {
    logger.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Adds typed parameter to   {@link TypedParameter}
 * @param type type of parameter(e.g. NAMED/INDEXED)
 * @param parameter parameter name.
 * @param clause filter clause.
 */
private void addTypedParameter(Type type,String parameter,UpdateClause clause){
  if (type != null) {
    if (typedParameter == null) {
      typedParameter=new TypedParameter(type);
    }
    if (typedParameter.getType().equals(type)) {
      typedParameter.addParameters(parameter,clause);
    }
 else {
      logger.warn("String_Node_Str");
    }
  }
}
Program: 176447
Project: 176447
Buggy source:
public void addUpdateClause(final String property,final String value){
  UpdateClause updateClause=new UpdateClause(property.trim(),value.trim());
  updateClauseQueue.add(updateClause);
  addTypedParameter(value.trim().startsWith("String_Node_Str") ? Type.INDEXED : Type.NAMED,property,updateClause);
}

Fixed version (ground truth):
public void addUpdateClause(final String property,final String value){
  UpdateClause updateClause=new UpdateClause(property.trim(),value.trim());
  updateClauseQueue.add(updateClause);
  addTypedParameter(value.trim().startsWith("String_Node_Str") ? Type.INDEXED : value.trim().startsWith("String_Node_Str") ? Type.NAMED : null,property,updateClause);
}
Program: 176448
Project: 176448
Buggy source:
@Override public List<Object> getAllPhotographers(String className){
  EntityManager em=getEntityManager();
  Query q=em.createQuery("String_Node_Str" + className + "String_Node_Str");
  List<Object> photographers=q.getResultList();
  closeEntityManager();
  return photographers;
}

Fixed version (ground truth):
@Override public List<Object> getAllPhotographers(String className){
  EntityManager em=getEntityManager();
  Query q=em.createQuery("String_Node_Str" + className + "String_Node_Str");
  List<Object> photographers=q.getResultList();
  return photographers;
}
Program: 176449
Project: 176449
Buggy source:
@Override public SchemaManager getSchemaManager(Map<String,Object> puProperties){
  return null;
}

Fixed version (ground truth):
@Override public SchemaManager getSchemaManager(Map<String,Object> puProperties){
  if (schemaManager == null)   schemaManager=new CoreSchemaManager("String_Node_Str",puProperties);
  return schemaManager;
}
Program: 176450
Project: 176450
Buggy source:
@Override public void destroy(){
}

Fixed version (ground truth):
@Override public void destroy(){
  schemaManager.dropSchema();
}
Program: 176451
Project: 176451
Buggy source:
public void dropDatabase(){
  if (schemas != null) {
    for (    DummySchema schema : schemas.values()) {
      schema.dropSchema();
    }
  }
  schemas.clear();
}

Fixed version (ground truth):
public void dropDatabase(){
  if (schemas != null) {
    for (    DummySchema schema : schemas.values()) {
      schema.dropSchema();
    }
    schemas.clear();
  }
}
Program: 176452
Project: 176452
Buggy source:
/** 
 * @param paramString
 * @param paramThrowable
 */
public InvalidEntityDefinitionException(String paramString,Throwable paramThrowable){
  super(paramString,paramThrowable);
}

Fixed version (ground truth):
/** 
 * @param paramString
 */
public InvalidEntityDefinitionException(String paramString){
  super(paramString);
}
Program: 176453
Project: 176453
Buggy source:
public void addUpdateClause(final String property,final String value){
  UpdateClause updateClause=new UpdateClause(property.trim(),value.trim());
  updateClauseQueue.add(updateClause);
}

Fixed version (ground truth):
public void addUpdateClause(final String property,final String value){
  UpdateClause updateClause=new UpdateClause(property.trim(),value.trim());
  updateClauseQueue.add(updateClause);
  addTypedParameter(value.trim().startsWith("String_Node_Str") ? Type.INDEXED : Type.NAMED,property,updateClause);
}
Program: 176454
Project: 176454
Buggy source:
/** 
 * Returns specific clause value.
 * @param param parameter
 * @return clause value.
 */
public Object getClauseValue(Parameter param){
  Parameter match=null;
  if (typedParameter != null && typedParameter.jpaParameters != null) {
    for (    Parameter p : typedParameter.jpaParameters) {
      if (p.equals(param)) {
        match=p;
        if (typedParameter.getType().equals(Type.NAMED)) {
          FilterClause clause=typedParameter.getParameters().get("String_Node_Str" + p.getName());
          if (clause != null) {
            return clause.getValue();
          }
        }
 else {
          FilterClause clause=typedParameter.getParameters().get("String_Node_Str" + p.getPosition());
          if (clause != null) {
            return clause.getValue();
          }
        }
        break;
      }
    }
    if (match == null) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  throw new IllegalArgumentException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns specific clause value.
 * @param param parameter
 * @return clause value.
 */
public Object getClauseValue(Parameter param){
  Parameter match=null;
  if (typedParameter != null && typedParameter.jpaParameters != null) {
    for (    Parameter p : typedParameter.jpaParameters) {
      if (p.equals(param)) {
        match=p;
        if (typedParameter.getType().equals(Type.NAMED)) {
          FilterClause clause=typedParameter.getParameters().get("String_Node_Str" + p.getName());
          if (clause != null) {
            return clause.getValue();
          }
        }
 else {
          FilterClause clause=typedParameter.getParameters().get("String_Node_Str" + p.getPosition());
          if (clause != null) {
            return clause.getValue();
          }
 else {
            UpdateClause updateClause=typedParameter.getUpdateParameters().get("String_Node_Str" + p.getPosition());
            if (updateClause != null) {
              return updateClause.getValue();
            }
          }
        }
        break;
      }
    }
    if (match == null) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  logger.error("String_Node_Str",param);
  throw new IllegalArgumentException("String_Node_Str");
}
Program: 176455
Project: 176455
Buggy source:
@Override public LockModeType getLockMode(){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public LockModeType getLockMode(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176456
Project: 176456
Buggy source:
@Override public Query setFirstResult(int startPosition){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public Query setFirstResult(int startPosition){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176457
Project: 176457
Buggy source:
@Override public int getFirstResult(){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public int getFirstResult(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176458
Project: 176458
Buggy source:
/** 
 * Methods from   {@link Query} interface 
 */
@Override public Object getSingleResult(){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Methods from   {@link Query} interface 
 */
@Override public Object getSingleResult(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176459
Project: 176459
Buggy source:
@Override public FlushModeType getFlushMode(){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public FlushModeType getFlushMode(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176460
Project: 176460
Buggy source:
@Override public Query setParameter(Parameter<Date> paramParameter,Date paramDate,TemporalType paramTemporalType){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public Query setParameter(Parameter<Date> paramParameter,Date paramDate,TemporalType paramTemporalType){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176461
Project: 176461
Buggy source:
@Override public Query setFlushMode(FlushModeType flushMode){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public Query setFlushMode(FlushModeType flushMode){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176462
Project: 176462
Buggy source:
@Override public Query setLockMode(LockModeType paramLockModeType){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public Query setLockMode(LockModeType paramLockModeType){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 176463
Project: 176463
Buggy source:
@Override public List<?> getResultList(){
  if (log.isDebugEnabled())   log.info("String_Node_Str" + query);
  List results=new ArrayList();
  EntityMetadata m=getEntityMetadata();
  Client client=persistenceDelegeator.getClient(m);
  if (!m.isRelationViaJoinTable() && (m.getRelationNames() == null || (m.getRelationNames().isEmpty()))) {
    results=populateEntities(m,client);
  }
 else {
    results=recursivelyPopulateEntities(m,client);
  }
  if (kunderaQuery.isDeleteUpdate()) {
    onDeleteOrUpdate(results);
  }
  if (results != null) {
    for (    Object obj : results) {
      persistenceDelegeator.setProxyOwners(m,obj);
    }
  }
  return results != null ? results : new ArrayList();
}

Fixed version (ground truth):
@Override public List<?> getResultList(){
  if (log.isDebugEnabled())   log.info("String_Node_Str" + query);
  List results=new ArrayList();
  EntityMetadata m=getEntityMetadata();
  Client client=persistenceDelegeator.getClient(m);
  if (!m.isRelationViaJoinTable() && (m.getRelationNames() == null || (m.getRelationNames().isEmpty()))) {
    results=populateEntities(m,client);
  }
 else {
    results=recursivelyPopulateEntities(m,client);
  }
  if (kunderaQuery.isDeleteUpdate()) {
    onDeleteOrUpdate(results);
  }
  return results != null ? results : new ArrayList();
}
Program: 176464
Project: 176464
Buggy source:
/** 
 * Gets the query instance.
 * @param jpaQuery the jpa query
 * @param persistenceDelegator the persistence delegator
 * @param persistenceUnits the persistence units
 * @return the query
 * @throws ClassNotFoundException the class not found exception
 * @throws SecurityException the security exception
 * @throws NoSuchMethodException the no such method exception
 * @throws IllegalArgumentException the illegal argument exception
 * @throws InstantiationException the instantiation exception
 * @throws IllegalAccessException the illegal access exception
 * @throws InvocationTargetException the invocation target exception
 */
public Query getQuery(String jpaQuery,PersistenceDelegator persistenceDelegator,EntityMetadata m) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
  Query query;
  Class clazz=persistenceDelegator.getClient(m).getQueryImplementor();
  @SuppressWarnings("String_Node_Str") Constructor constructor=clazz.getConstructor(String.class,KunderaQuery.class,PersistenceDelegator.class);
  query=(Query)constructor.newInstance(jpaQuery,kunderaQuery,persistenceDelegator);
  return query;
}

Fixed version (ground truth):
/** 
 * Gets the query instance.
 * @param jpaQuery the jpa query
 * @param persistenceDelegator the persistence delegator
 * @param persistenceUnits the persistence units
 * @return the query
 * @throws ClassNotFoundException the class not found exception
 * @throws SecurityException the security exception
 * @throws NoSuchMethodException the no such method exception
 * @throws IllegalArgumentException the illegal argument exception
 * @throws InstantiationException the instantiation exception
 * @throws IllegalAccessException the illegal access exception
 * @throws InvocationTargetException the invocation target exception
 */
private Query getQuery(String jpaQuery,PersistenceDelegator persistenceDelegator,EntityMetadata m) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
  Query query;
  Class clazz=persistenceDelegator.getClient(m).getQueryImplementor();
  @SuppressWarnings("String_Node_Str") Constructor constructor=clazz.getConstructor(String.class,KunderaQuery.class,PersistenceDelegator.class);
  query=(Query)constructor.newInstance(jpaQuery,kunderaQuery,persistenceDelegator);
  return query;
}
Program: 176465
Project: 176465
Buggy source:
protected void getUserById(){
  twitter.createEntityManager();
  UserCassandra user1=twitter.findUserById(userId1);
  assertUser1(user1);
  UserCassandra user2=twitter.findUserById(userId2);
  assertUser2(user2);
}

Fixed version (ground truth):
protected void getUserById(){
  twitter.createEntityManager();
  UserCassandra user1=twitter.findUserById(userId1);
  assertUser1(user1);
  UserCassandra user2=twitter.findUserById(userId2);
  assertUser2(user2);
  twitter.closeEntityManager();
}
Program: 176466
Project: 176466
Buggy source:
/** 
 * @param < E >
 * @param entityMetadata
 * @param e
 */
private <E>void setProxyOwners(EntityMetadata entityMetadata,E e){
  Object entityId=PropertyAccessorHelper.getId(e,entityMetadata);
  for (  Relation r : entityMetadata.getRelations()) {
    String entityName=entityMetadata.getEntityClazz().getName() + "String_Node_Str" + entityId+ "String_Node_Str"+ r.getProperty().getName();
    KunderaProxy kunderaProxy=KunderaMetadata.INSTANCE.getCoreMetadata().getLazyInitializerFactory().getProxy(entityName);
    if (kunderaProxy != null) {
      kunderaProxy.getKunderaLazyInitializer().setOwner(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param < E >
 * @param entityMetadata
 * @param e
 */
private <E>void setProxyOwners(EntityMetadata entityMetadata,E e){
  Object entityId=PropertyAccessorHelper.getId(e,entityMetadata);
  for (  Relation r : entityMetadata.getRelations()) {
    if (r.isUnary()) {
      String entityName=entityMetadata.getEntityClazz().getName() + "String_Node_Str" + entityId+ "String_Node_Str"+ r.getProperty().getName();
      KunderaProxy kunderaProxy=KunderaMetadata.INSTANCE.getCoreMetadata().getLazyInitializerFactory().getProxy(entityName);
      if (kunderaProxy != null) {
        kunderaProxy.getKunderaLazyInitializer().setOwner(e);
      }
    }
  }
}
Program: 176467
Project: 176467
Buggy source:
@Override public void setOwner(Object owner) throws PersistenceException {
  if (!owner.getClass().equals(persistentClass))   this.owner=owner;
}

Fixed version (ground truth):
@Override public void setOwner(Object owner) throws PersistenceException {
  if (owner != null && !owner.getClass().equals(persistentClass))   this.owner=owner;
}
Program: 176468
Project: 176468
Buggy source:
@Override public void clearProxies(){
  proxies.clear();
}

Fixed version (ground truth):
@Override public void clearProxies(){
  for (  KunderaProxy proxy : proxies.values()) {
    proxy.getKunderaLazyInitializer().setOwner(null);
    proxy.getKunderaLazyInitializer().setInitialized(false);
  }
  proxies.clear();
}
Program: 176469
Project: 176469
Buggy source:
public void dropDatabase(){
  if (schemas != null) {
    for (    DummySchema schema : schemas.values()) {
      schema.dropSchema();
    }
  }
  schemas.clear();
}

Fixed version (ground truth):
public void dropDatabase(){
  if (schemas != null) {
    for (    DummySchema schema : schemas.values()) {
      schema.dropSchema();
    }
    schemas.clear();
  }
}
Program: 176472
Project: 176472
Buggy source:
public Properties getConnectionProperties(){
  DataStore ds=getDataStore();
  Properties properties=new Properties();
  if (ds != null) {
    if (ds.getConnection() != null) {
      properties=ds.getConnection().getProperties();
      return properties;
    }
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str");
    }
  }
  return properties;
}

Fixed version (ground truth):
public Properties getConnectionProperties(){
  DataStore ds=getDataStore();
  Properties properties=new Properties();
  if (ds != null) {
    if (ds.getConnection() != null) {
      properties=ds.getConnection().getProperties();
      return properties != null ? properties : new Properties();
    }
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str");
    }
  }
  return properties;
}
Program: 176473
Project: 176473
Buggy source:
/** 
 * @return pool an the basis of LoadBalancing policy.
 */
private IThriftPool getPoolUsingPolicy(){
  if (!hostPools.isEmpty()) {
    logger.info("String_Node_Str",loadBalancingPolicy.getClass());
    return (IThriftPool)loadBalancingPolicy.getPool(hostPools.values());
  }
  throw new KunderaException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return pool an the basis of LoadBalancing policy.
 */
private IThriftPool getPoolUsingPolicy(){
  if (!hostPools.isEmpty()) {
    logger.info("String_Node_Str",loadBalancingPolicy.getClass().getSimpleName());
    return (IThriftPool)loadBalancingPolicy.getPool(hostPools.values());
  }
  throw new KunderaException("String_Node_Str");
}
Program: 176474
Project: 176474
Buggy source:
Mutator getMutator(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    success=true;
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      if (PelopsUtils.verifyConnection(host,thriftPort)) {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createMutator(PelopsUtils.getPoolName(iThriftPool));
      }
      removePool(iThriftPool);
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}

Fixed version (ground truth):
Mutator getMutator(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    success=true;
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      CassandraHost cassandraHost=((CassandraHostConfiguration)configuration).getCassandraHost(nodes[0].getAddress(),((CommonsBackedPool)pool).getCluster().getConnectionConfig().getThriftPort());
      if (cassandraHost.isTestOnBorrow()) {
        if (cassandraHost.isTestOnBorrow() && PelopsUtils.verifyConnection(host,thriftPort)) {
          logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
          return Pelops.createMutator(PelopsUtils.getPoolName(iThriftPool));
        }
        removePool(iThriftPool);
      }
 else {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createMutator(PelopsUtils.getPoolName(iThriftPool));
      }
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}
Program: 176475
Project: 176475
Buggy source:
IPooledConnection getConnection(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    success=true;
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      if (PelopsUtils.verifyConnection(host,thriftPort)) {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return iThriftPool.getConnection();
      }
      removePool(iThriftPool);
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}

Fixed version (ground truth):
IPooledConnection getConnection(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    success=true;
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      CassandraHost cassandraHost=((CassandraHostConfiguration)configuration).getCassandraHost(nodes[0].getAddress(),((CommonsBackedPool)pool).getCluster().getConnectionConfig().getThriftPort());
      if (cassandraHost.isTestOnBorrow()) {
        if (cassandraHost.isTestOnBorrow() && PelopsUtils.verifyConnection(host,thriftPort)) {
          logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
          return iThriftPool.getConnection();
        }
        removePool(iThriftPool);
      }
 else {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return iThriftPool.getConnection();
      }
      removePool(iThriftPool);
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}
Program: 176476
Project: 176476
Buggy source:
Selector getSelector(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      if (PelopsUtils.verifyConnection(host,thriftPort)) {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createSelector(PelopsUtils.getPoolName(iThriftPool));
      }
      removePool(iThriftPool);
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}

Fixed version (ground truth):
Selector getSelector(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      CassandraHost cassandraHost=((CassandraHostConfiguration)configuration).getCassandraHost(nodes[0].getAddress(),((CommonsBackedPool)pool).getCluster().getConnectionConfig().getThriftPort());
      if (cassandraHost.isTestOnBorrow()) {
        if (cassandraHost.isTestOnBorrow() && PelopsUtils.verifyConnection(host,thriftPort)) {
          logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
          return Pelops.createSelector(PelopsUtils.getPoolName(iThriftPool));
        }
        removePool(iThriftPool);
      }
 else {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createSelector(PelopsUtils.getPoolName(iThriftPool));
      }
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}
Program: 176477
Project: 176477
Buggy source:
RowDeletor getRowDeletor(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      if (PelopsUtils.verifyConnection(host,thriftPort)) {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createRowDeletor(PelopsUtils.getPoolName(iThriftPool));
      }
      removePool(iThriftPool);
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}

Fixed version (ground truth):
RowDeletor getRowDeletor(IThriftPool pool){
  IThriftPool iThriftPool=pool;
  boolean success=false;
  while (!success) {
    if (iThriftPool != null) {
      Node[] nodes=((CommonsBackedPool)iThriftPool).getCluster().getNodes();
      String host=nodes[0].getAddress();
      int thriftPort=((CommonsBackedPool)iThriftPool).getCluster().getConnectionConfig().getThriftPort();
      CassandraHost cassandraHost=((CassandraHostConfiguration)configuration).getCassandraHost(nodes[0].getAddress(),((CommonsBackedPool)pool).getCluster().getConnectionConfig().getThriftPort());
      if (cassandraHost.isTestOnBorrow()) {
        if (cassandraHost.isTestOnBorrow() && PelopsUtils.verifyConnection(host,thriftPort)) {
          logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
          return Pelops.createRowDeletor(PelopsUtils.getPoolName(iThriftPool));
        }
        removePool(iThriftPool);
      }
 else {
        logger.info("String_Node_Str",nodes[0].getAddress(),thriftPort);
        return Pelops.createRowDeletor(PelopsUtils.getPoolName(iThriftPool));
      }
    }
    success=false;
    iThriftPool=getPoolUsingPolicy();
  }
  throw new KunderaException("String_Node_Str");
}
Program: 176478
Project: 176478
Buggy source:
/** 
 * @param host
 * @param port
 * @return
 */
public static boolean verifyConnection(String host,int port){
  try {
    TSocket socket=new TSocket(host,port);
    TTransport transport=new TFramedTransport(socket);
    TProtocol protocol=new TBinaryProtocol(transport);
    Cassandra.Client client=new Cassandra.Client(protocol);
    socket.open();
    return client.describe_cluster_name() != null;
  }
 catch (  TTransportException e) {
    logger.warn("String_Node_Str",host,port);
    return false;
  }
catch (  TException e) {
    logger.warn("String_Node_Str",host,port);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @param host
 * @param port
 * @return
 */
public static boolean verifyConnection(String host,int port){
  Socket socket=null;
  try {
    socket=new Socket(host,port);
    socket.setReuseAddress(true);
    socket.setSoLinger(true,0);
    boolean isConnected=socket.isConnected();
    return isConnected;
  }
 catch (  UnknownHostException e) {
    logger.warn("String_Node_Str",host,port);
    return false;
  }
catch (  IOException e) {
    logger.warn("String_Node_Str",host,port);
    return false;
  }
 finally {
    try {
      if (socket != null) {
        socket.close();
      }
    }
 catch (    IOException e) {
      logger.warn("String_Node_Str",host,port);
    }
  }
}
Program: 176479
Project: 176479
Buggy source:
/** 
 * Find List of objects based on value   {@columnValue} of column{@columnName}
 * @param m
 * @param columnName
 * @param columnValue
 * @param clazz
 * @param dataHandler
 * @return
 */
protected List<Object> findByRelationQuery(EntityMetadata m,String columnName,Object columnValue,Class clazz,CassandraDataHandler dataHandler){
  CQLTranslator translator=new CQLTranslator();
  String selectQuery=translator.SELECTALL_QUERY;
  selectQuery=StringUtils.replace(selectQuery,CQLTranslator.COLUMN_FAMILY,translator.ensureCase(new StringBuilder(),m.getTableName()).toString());
  StringBuilder selectQueryBuilder=new StringBuilder(selectQuery);
  selectQueryBuilder.append(CQLTranslator.ADD_WHERE_CLAUSE);
  translator.buildWhereClause(selectQueryBuilder,columnValue.getClass(),columnName,columnValue,"String_Node_Str");
  selectQueryBuilder.delete(selectQueryBuilder.lastIndexOf(CQLTranslator.AND_CLAUSE),selectQueryBuilder.length());
  return executeQuery(selectQueryBuilder.toString(),clazz,null,dataHandler);
}

Fixed version (ground truth):
/** 
 * Find List of objects based on value   {@columnValue} of column{@columnName}
 * @param m
 * @param columnName
 * @param columnValue
 * @param clazz
 * @param dataHandler
 * @return
 */
protected List<Object> findByRelationQuery(EntityMetadata m,String columnName,Object columnValue,Class clazz,CassandraDataHandler dataHandler){
  CQLTranslator translator=new CQLTranslator();
  String selectQuery=translator.SELECTALL_QUERY;
  selectQuery=StringUtils.replace(selectQuery,CQLTranslator.COLUMN_FAMILY,translator.ensureCase(new StringBuilder(),m.getTableName()).toString());
  StringBuilder selectQueryBuilder=new StringBuilder(selectQuery);
  selectQueryBuilder.append(CQLTranslator.ADD_WHERE_CLAUSE);
  translator.buildWhereClause(selectQueryBuilder,columnValue.getClass(),columnName,columnValue,"String_Node_Str");
  selectQueryBuilder.delete(selectQueryBuilder.lastIndexOf(CQLTranslator.AND_CLAUSE),selectQueryBuilder.length());
  return executeQuery(selectQueryBuilder.toString(),clazz,null,dataHandler,true);
}
Program: 176481
Project: 176481
Buggy source:
/** 
 * Executes query string using cql3.
 * @param cqlQuery
 * @return
 * @throws InvalidRequestException
 * @throws UnavailableException
 * @throws TimedOutException
 * @throws SchemaDisagreementException
 * @throws TException
 */
protected CqlResult executeCQLQuery(String cqlQuery) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException {
  Cassandra.Client conn=null;
  Object pooledConnection=null;
  pooledConnection=getConection(persistenceUnit);
  conn=getConnection(pooledConnection);
  try {
    if (isCql3Enabled()) {
      return conn.execute_cql3_query(ByteBufferUtil.bytes(cqlQuery),org.apache.cassandra.thrift.Compression.NONE,consistencyLevel);
    }
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str",cqlQuery);
    }
    return conn.execute_cql_query(ByteBufferUtil.bytes(cqlQuery),org.apache.cassandra.thrift.Compression.NONE);
  }
  finally {
    releaseConnection(pooledConnection);
  }
}

Fixed version (ground truth):
/** 
 * Executes query string using cql3.
 * @param cqlQuery
 * @return
 * @throws InvalidRequestException
 * @throws UnavailableException
 * @throws TimedOutException
 * @throws SchemaDisagreementException
 * @throws TException
 */
protected CqlResult executeCQLQuery(String cqlQuery,boolean isCql3Enabled) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException {
  Cassandra.Client conn=null;
  Object pooledConnection=null;
  pooledConnection=getConection(persistenceUnit);
  conn=getConnection(pooledConnection);
  try {
    if (isCql3Enabled || isCql3Enabled()) {
      return conn.execute_cql3_query(ByteBufferUtil.bytes(cqlQuery),org.apache.cassandra.thrift.Compression.NONE,consistencyLevel);
    }
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str",cqlQuery);
    }
    return conn.execute_cql_query(ByteBufferUtil.bytes(cqlQuery),org.apache.cassandra.thrift.Compression.NONE);
  }
  finally {
    releaseConnection(pooledConnection);
  }
}
Program: 176484
Project: 176484
Buggy source:
/** 
 * On composite columns.
 * @param translator the translator
 * @param columns the columns
 * @param queryBuilder the query builder
 */
private void onCompositeColumns(CQLTranslator translator,List<ColumnInfo> columns,StringBuilder queryBuilder){
  for (  ColumnInfo colInfo : columns) {
    String dataType=CassandraValidationClassMapper.getValidationClass(colInfo.getType());
    String cqlType=translator.getCQLType(dataType);
    translator.appendColumnName(queryBuilder,colInfo.getColumnName(),cqlType);
    queryBuilder.append("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * On composite columns.
 * @param translator the translator
 * @param columns the columns
 * @param queryBuilder the query builder
 */
private void onCompositeColumns(CQLTranslator translator,List<ColumnInfo> compositeColumns,StringBuilder queryBuilder,List<ColumnInfo> columns){
  for (  ColumnInfo colInfo : compositeColumns) {
    if (columns == null || (columns != null && !columns.contains(colInfo))) {
      String dataType=CassandraValidationClassMapper.getValidationClass(colInfo.getType());
      String cqlType=translator.getCQLType(dataType);
      translator.appendColumnName(queryBuilder,colInfo.getColumnName(),cqlType);
      queryBuilder.append("String_Node_Str");
    }
  }
}
Program: 176487
Project: 176487
Buggy source:
@Test public void test(){
  EntityManager em=emf.createEntityManager();
  EmployeeInfo emp_info=new EmployeeInfo();
  EmployeeAddress address_info=new EmployeeAddress();
  address_info.setStreet("String_Node_Str");
  emp_info.setAddress(address_info);
  emp_info.setEmployeeName("String_Node_Str");
  em.persist(emp_info);
  em.clear();
  EmployeeInfo result=em.find(EmployeeInfo.class,1l);
  Assert.assertNotNull(result);
  Assert.assertNotNull(result.getAddress());
  Assert.assertNotNull(result.getAddress().getStreet());
  Assert.assertNotNull(result.getAddress().getAddress());
  Assert.assertEquals("String_Node_Str",result.getAddress().getStreet());
  result.getAddress().setStreet("String_Node_Str");
  em.merge(result);
  em.clear();
  result=em.find(EmployeeInfo.class,1l);
  Assert.assertNotNull(result);
  Assert.assertNotNull(result.getAddress());
  Assert.assertNotNull(result.getAddress().getStreet());
  Assert.assertNotNull(result.getAddress().getAddress());
  Assert.assertEquals("String_Node_Str",result.getAddress().getStreet());
  em.remove(result);
  em.clear();
  result=em.find(EmployeeInfo.class,1l);
  Assert.assertNull(result);
}

Fixed version (ground truth):
@Test public void test(){
  EntityManager em=emf.createEntityManager();
  EmployeeInfo emp_info=new EmployeeInfo();
  EmployeeAddress address_info=new EmployeeAddress();
  address_info.setStreet("String_Node_Str");
  emp_info.setAddress(address_info);
  em.persist(emp_info);
  em.clear();
  EmployeeInfo result=em.find(EmployeeInfo.class,1l);
  Assert.assertNotNull(result);
  Assert.assertNotNull(result.getAddress());
  Assert.assertNotNull(result.getAddress().getStreet());
  Assert.assertNotNull(result.getAddress().getAddress());
  Assert.assertEquals("String_Node_Str",result.getAddress().getStreet());
  result.getAddress().setStreet("String_Node_Str");
  em.merge(result);
  em.clear();
  result=em.find(EmployeeInfo.class,1l);
  Assert.assertNotNull(result);
  Assert.assertNotNull(result.getAddress());
  Assert.assertNotNull(result.getAddress().getStreet());
  Assert.assertNotNull(result.getAddress().getAddress());
  Assert.assertEquals("String_Node_Str",result.getAddress().getStreet());
  em.remove(result);
  em.clear();
  result=em.find(EmployeeInfo.class,1l);
  Assert.assertNull(result);
}
Program: 176488
Project: 176488
Buggy source:
protected void getUserById(){
  twitter.createEntityManager();
  UserCassandra user1=twitter.findUserById(userId1);
  assertUser1(user1);
  UserCassandra user2=twitter.findUserById(userId2);
  assertUser2(user2);
  twitter.closeEntityManager();
}

Fixed version (ground truth):
protected void getUserById(){
  twitter.createEntityManager();
  UserCassandra user1=twitter.findUserById(userId1);
  assertUser1(user1);
  UserCassandra user2=twitter.findUserById(userId2);
  assertUser2(user2);
}
Program: 176491
Project: 176491
Buggy source:
void clear(){
  flushManager.clearFlushStack();
  getPersistenceCache().clean();
}

Fixed version (ground truth):
void clear(){
  flushManager.clearFlushStack();
  getPersistenceCache().clean();
  KunderaMetadata.INSTANCE.getCoreMetadata().getLazyInitializerFactory().clearProxies();
}
Program: 176492
Project: 176492
Buggy source:
/** 
 * @param < E >
 * @param entityMetadata
 * @param e
 */
private <E>void setProxyOwners(EntityMetadata entityMetadata,E e){
  Object entityId=PropertyAccessorHelper.getId(e,entityMetadata);
  for (  Relation r : entityMetadata.getRelations()) {
    if (r.isUnary()) {
      String entityName=entityMetadata.getEntityClazz().getName() + "String_Node_Str" + entityId+ "String_Node_Str"+ r.getProperty().getName();
      KunderaProxy kunderaProxy=KunderaMetadata.INSTANCE.getCoreMetadata().getLazyInitializerFactory().getProxy(entityName);
      if (kunderaProxy != null) {
        kunderaProxy.getKunderaLazyInitializer().setOwner(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param < E >
 * @param entityMetadata
 * @param e
 */
public <E>void setProxyOwners(EntityMetadata entityMetadata,E e){
  Object entityId=PropertyAccessorHelper.getId(e,entityMetadata);
  for (  Relation r : entityMetadata.getRelations()) {
    if (r.isUnary()) {
      String entityName=entityMetadata.getEntityClazz().getName() + "String_Node_Str" + entityId+ "String_Node_Str"+ r.getProperty().getName();
      KunderaProxy kunderaProxy=KunderaMetadata.INSTANCE.getCoreMetadata().getLazyInitializerFactory().getProxy(entityName);
      if (kunderaProxy != null) {
        kunderaProxy.getKunderaLazyInitializer().setOwner(e);
      }
    }
  }
}
Program: 176493
Project: 176493
Buggy source:
@Override protected Client instantiateClient(String persistenceUnit){
  return new CoreTestClient();
}

Fixed version (ground truth):
@Override protected Client instantiateClient(String persistenceUnit){
  return new CoreTestClient(indexManager,persistenceUnit);
}
Program: 176494
Project: 176494
Buggy source:
protected void executeAllTests(){
  insert();
  find();
  update();
  remove();
}

Fixed version (ground truth):
protected void executeAllTests(){
  insert();
  find();
  findPersonByIdColumn();
  findPersonByName();
  findAddressByIdColumn();
  update();
  remove();
}