nus-yam/ex-repair huggingface dataset:
Program: 176784
Project: 176784
Buggy source:
/** 
 * CRUD over Compound primary Key.
 */
@Test @PerfTest(invocations=1000) public void onCRUD(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  CassandraCompoundKey key=new CassandraCompoundKey("String_Node_Str",1,timeLineId);
  Map<String,Client> clients=(Map<String,Client>)em.getDelegate();
  Client client=clients.get(PERSISTENCE_UNIT);
  ((CassandraClientBase)client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
  CassandraPrimeUser user=new CassandraPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(currentDate);
  em.persist(user);
  em.clear();
  CassandraPrimeUser result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.clear();
  user.setTweetBody("String_Node_Str");
  em.merge(user);
  em.clear();
  result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.remove(result);
  em.clear();
  result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNull(result);
}

Fixed version (ground truth):
/** 
 * CRUD over Compound primary Key.
 */
@Test @PerfTest(invocations=10) public void onCRUD(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  CassandraCompoundKey key=new CassandraCompoundKey("String_Node_Str",1,timeLineId);
  Map<String,Client> clients=(Map<String,Client>)em.getDelegate();
  Client client=clients.get(PERSISTENCE_UNIT);
  ((CassandraClientBase)client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
  CassandraPrimeUser user=new CassandraPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(currentDate);
  em.persist(user);
  em.clear();
  CassandraPrimeUser result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.clear();
  user.setTweetBody("String_Node_Str");
  em.merge(user);
  em.clear();
  result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.remove(result);
  em.clear();
  result=em.find(CassandraPrimeUser.class,key);
  Assert.assertNull(result);
}
Program: 176786
Project: 176786
Buggy source:
@Test @PerfTest(invocations=1000) public void onExecute() throws Exception {
  executeTwissandraTest();
}

Fixed version (ground truth):
@Test @PerfTest(invocations=10) public void onExecute() throws Exception {
  executeTwissandraTest();
}
Program: 176787
Project: 176787
Buggy source:
/** 
 * delete by Named Query.
 */
private void deleteNamed(){
  UUID timeLineId=UUID.randomUUID();
  Date currentDate=new Date();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  String deleteQuery="String_Node_Str";
  EntityManager em=emf.createEntityManager();
  Query q=em.createQuery(deleteQuery);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.executeUpdate();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNull(result);
  em.close();
}

Fixed version (ground truth):
/** 
 * delete by Named Query.
 */
private void deleteNamed(){
  UUID timeLineId=UUID.randomUUID();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  String deleteQuery="String_Node_Str";
  EntityManager em=emf.createEntityManager();
  Query q=em.createQuery(deleteQuery);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.executeUpdate();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNull(result);
  em.close();
}
Program: 176788
Project: 176788
Buggy source:
/** 
 * Update by Named Query.
 * @return
 */
private void updateNamed(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  Date currentDate=new Date();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  MongoPrimeUser user=new MongoPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(new Date());
  em.persist(user);
  em=emf.createEntityManager();
  String updateQuery="String_Node_Str";
  Query q=em.createQuery(updateQuery);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.executeUpdate();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.close();
}

Fixed version (ground truth):
/** 
 * Update by Named Query.
 * @return
 */
private void updateNamed(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  MongoPrimeUser user=new MongoPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(currentDate);
  em.persist(user);
  em=emf.createEntityManager();
  String updateQuery="String_Node_Str";
  Query q=em.createQuery(updateQuery);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.executeUpdate();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.close();
}
Program: 176789
Project: 176789
Buggy source:
/** 
 * CRUD over Compound primary Key.
 */
@Test @PerfTest(invocations=1000) public synchronized void onCRUD(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  MongoPrimeUser user=new MongoPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(currentDate);
  em.persist(user);
  em.clear();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.clear();
  user.setTweetBody("String_Node_Str");
  em.merge(user);
  em.clear();
  result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.remove(result);
  em.clear();
  result=em.find(MongoPrimeUser.class,key);
  Assert.assertNull(result);
}

Fixed version (ground truth):
/** 
 * CRUD over Compound primary Key.
 */
@Test @PerfTest(invocations=10) public synchronized void onCRUD(){
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  MongoCompoundKey key=new MongoCompoundKey("String_Node_Str",1,timeLineId);
  MongoPrimeUser user=new MongoPrimeUser(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(currentDate);
  em.persist(user);
  em.clear();
  MongoPrimeUser result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.clear();
  user.setTweetBody("String_Node_Str");
  em.merge(user);
  em.clear();
  result=em.find(MongoPrimeUser.class,key);
  Assert.assertNotNull(result);
  Assert.assertEquals("String_Node_Str",result.getTweetBody());
  Assert.assertEquals(timeLineId,result.getKey().getTimeLineId());
  Assert.assertEquals(currentDate.getTime(),result.getTweetDate().getTime());
  em.remove(result);
  em.clear();
  result=em.find(MongoPrimeUser.class,key);
  Assert.assertNull(result);
}
Program: 176791
Project: 176791
Buggy source:
/** 
 * Test on execute.
 */
@Test @PerfTest(invocations=1000) public void testOnExecute(){
  executeTestSuite();
}

Fixed version (ground truth):
/** 
 * Test on execute.
 */
@Test @PerfTest(invocations=10) public void testOnExecute(){
  executeTestSuite();
}
Program: 176792
Project: 176792
Buggy source:
@BeforeClass public static void setUpBeforeClass() throws Exception {
  if (USE_EMBEDDED_SERVER) {
    CassandraCli.cassandraSetUp();
  }
  if (AUTO_MANAGE_SCHEMA) {
    CassandraCli.dropKeySpace(_KEYSPACE.toLowerCase());
    loadData();
  }
}

Fixed version (ground truth):
@BeforeClass public static void setUpBeforeClass() throws Exception {
  if (USE_EMBEDDED_SERVER) {
    CassandraCli.cassandraSetUp();
  }
  if (AUTO_MANAGE_SCHEMA) {
    CassandraCli.dropKeySpace(_KEYSPACE.toLowerCase());
    loadData();
  }
  restClient=new RESTClientImpl();
}
Program: 176794
Project: 176794
Buggy source:
@Before public void setup() throws Exception {
}

Fixed version (ground truth):
@Before public void setup() throws Exception {
  restClient.initialize(webResource,mediaType);
}
Program: 176796
Project: 176796
Buggy source:
private void setFieldValueViaCQL(Object entity,Object thriftColumnValue,Attribute attribute){
  if (attribute != null) {
    try {
      if (((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(String.class) || ((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(char.class) || ((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(Character.class)) {
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),new String((byte[])thriftColumnValue));
      }
 else       if (((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(short.class)) {
        IntegerAccessor accessor=new IntegerAccessor();
        Integer value=accessor.fromBytes(short.class,(byte[])thriftColumnValue);
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),String.valueOf(value));
      }
 else {
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),(byte[])thriftColumnValue);
      }
    }
 catch (    PropertyAccessException pae) {
      log.warn(pae.getMessage());
    }
  }
}

Fixed version (ground truth):
private void setFieldValueViaCQL(Object entity,Object thriftColumnValue,Attribute attribute){
  if (attribute != null) {
    try {
      if (((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(String.class) || ((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(char.class) || ((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(Character.class)) {
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),new String((byte[])thriftColumnValue));
      }
 else       if (((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(short.class)) {
        IntegerAccessor accessor=new IntegerAccessor();
        Integer value=accessor.fromBytes(short.class,(byte[])thriftColumnValue);
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),String.valueOf(value));
      }
 else       if (((AbstractAttribute)attribute).getBindableJavaType().isAssignableFrom(byte.class)) {
        IntegerAccessor accessor=new IntegerAccessor();
        Integer value=accessor.fromBytes(byte.class,(byte[])thriftColumnValue);
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),String.valueOf(value));
      }
 else {
        PropertyAccessorHelper.set(entity,(Field)attribute.getJavaMember(),(byte[])thriftColumnValue);
      }
    }
 catch (    PropertyAccessException pae) {
      log.warn(pae.getMessage());
    }
  }
}
Program: 176797
Project: 176797
Buggy source:
/** 
 * Appends value to builder object for given class type
 * @param builder string builder.
 * @param fieldClazz field class.
 * @param value value to be appended.
 * @param isPresent if field is present.
 * @return true, if value is not null else false.
 */
private boolean appendValue(StringBuilder builder,Class fieldClazz,Object value,boolean isPresent){
  if (value != null) {
    isPresent=true;
    if (fieldClazz.isAssignableFrom(String.class) || isDate(fieldClazz) || fieldClazz.isAssignableFrom(char.class)|| fieldClazz.isAssignableFrom(Character.class)|| fieldClazz.isAssignableFrom(boolean.class)|| fieldClazz.isAssignableFrom(Boolean.class)) {
      builder.append("String_Node_Str");
      if (isDate(fieldClazz)) {
        builder.append(PropertyAccessorFactory.getPropertyAccessor(fieldClazz).toString(value));
      }
 else {
        builder.append(value);
      }
      builder.append("String_Node_Str");
    }
 else     if (fieldClazz.isAssignableFrom(byte.class)) {
      ByteAccessor accessor=new ByteAccessor();
      builder.append(Hex.encodeHex(accessor.toBytes(value)));
    }
 else {
      builder.append(value);
    }
  }
  return isPresent;
}

Fixed version (ground truth):
/** 
 * Appends value to builder object for given class type
 * @param builder string builder.
 * @param fieldClazz field class.
 * @param value value to be appended.
 * @param isPresent if field is present.
 * @return true, if value is not null else false.
 */
private boolean appendValue(StringBuilder builder,Class fieldClazz,Object value,boolean isPresent){
  if (value != null) {
    isPresent=true;
    if (fieldClazz.isAssignableFrom(String.class) || isDate(fieldClazz) || fieldClazz.isAssignableFrom(char.class)|| fieldClazz.isAssignableFrom(Character.class)|| fieldClazz.isAssignableFrom(boolean.class)|| fieldClazz.isAssignableFrom(Boolean.class)) {
      builder.append("String_Node_Str");
      if (isDate(fieldClazz)) {
        builder.append(PropertyAccessorFactory.getPropertyAccessor(fieldClazz).toString(value));
      }
 else {
        builder.append(value);
      }
      builder.append("String_Node_Str");
    }
 else {
      builder.append(value);
    }
  }
  return isPresent;
}
Program: 176799
Project: 176799
Buggy source:
@Test public void onInvalidQueryParse(){
  KunderaQuery kunderQuery=new KunderaQuery();
  String validQuery="String_Node_Str";
  KunderaQueryParser parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertEquals("String_Node_Str",jpqlpe.getMessage());
  }
  kunderQuery=new KunderaQuery();
  validQuery="String_Node_Str";
  parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertEquals("String_Node_Str",jpqlpe.getMessage());
  }
  kunderQuery=new KunderaQuery();
  validQuery="String_Node_Str";
  parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertEquals("String_Node_Str",jpqlpe.getMessage());
  }
}

Fixed version (ground truth):
@Test public void onInvalidQueryParse(){
  KunderaQuery kunderQuery=new KunderaQuery();
  String validQuery="String_Node_Str";
  KunderaQueryParser parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertTrue(jpqlpe.getMessage().startsWith("String_Node_Str"));
  }
  kunderQuery=new KunderaQuery();
  validQuery="String_Node_Str";
  parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertTrue(jpqlpe.getMessage().startsWith("String_Node_Str"));
  }
  kunderQuery=new KunderaQuery();
  validQuery="String_Node_Str";
  parser=new KunderaQueryParser(kunderQuery,validQuery);
  try {
    parser.parse();
  }
 catch (  JPQLParseException jpqlpe) {
    Assert.assertTrue(jpqlpe.getMessage().startsWith("String_Node_Str"));
  }
}
Program: 176801
Project: 176801
Buggy source:
/** 
 * add tables to given keyspace   {@code ksDef}.
 * @param tableInfos the table infos
 * @param ksDef the ks def
 * @throws InvalidRequestException the invalid request exception
 * @throws SchemaDisagreementException the schema disagreement exception
 * @throws TException the t exception
 * @throws InterruptedException the interrupted exception
 */
private void addTablesToKeyspace(List<TableInfo> tableInfos,KsDef ksDef) throws InvalidRequestException, SchemaDisagreementException, TException, InterruptedException {
  cassandra_client.set_keyspace(databaseName);
  for (  TableInfo tableInfo : tableInfos) {
    for (    CfDef cfDef : ksDef.getCf_defs()) {
      if (cfDef.getName().equalsIgnoreCase(tableInfo.getTableName())) {
        cassandra_client.system_drop_column_family(tableInfo.getTableName());
        dropInvertedIndexTable(tableInfo);
        TimeUnit.SECONDS.sleep(3);
        break;
      }
    }
    if (tableInfo.getTableIdType() != null && tableInfo.getTableIdType().isAnnotationPresent(Embeddable.class)) {
      onCompoundKey(tableInfo);
    }
 else {
      cassandra_client.system_add_column_family(getTableMetadata(tableInfo));
      createInvertedIndexTable(tableInfo);
    }
  }
}

Fixed version (ground truth):
/** 
 * add tables to given keyspace   {@code ksDef}.
 * @param tableInfos the table infos
 * @param ksDef the ks def
 * @throws InvalidRequestException the invalid request exception
 * @throws SchemaDisagreementException the schema disagreement exception
 * @throws TException the t exception
 * @throws InterruptedException the interrupted exception
 */
private void addTablesToKeyspace(List<TableInfo> tableInfos,KsDef ksDef) throws InvalidRequestException, SchemaDisagreementException, TException, InterruptedException {
  cassandra_client.set_keyspace(databaseName);
  for (  TableInfo tableInfo : tableInfos) {
    for (    CfDef cfDef : ksDef.getCf_defs()) {
      if (cfDef.getName().equalsIgnoreCase(tableInfo.getTableName())) {
        cassandra_client.system_drop_column_family(tableInfo.getTableName());
        dropInvertedIndexTable(tableInfo);
        TimeUnit.SECONDS.sleep(3);
        break;
      }
    }
    if (tableInfo.getTableIdType() != null && tableInfo.getTableIdType().isAnnotationPresent(Embeddable.class)) {
      if (tableInfo.getType() != null && tableInfo.getType().equals(Type.SUPER_COLUMN_FAMILY.name())) {
        throw new SchemaGenerationException("String_Node_Str","String_Node_Str",databaseName);
      }
 else {
        onCompoundKey(tableInfo);
      }
    }
 else {
      cassandra_client.system_add_column_family(getTableMetadata(tableInfo));
      createInvertedIndexTable(tableInfo);
    }
  }
}
Program: 176803
Project: 176803
Buggy source:
public static GeospatialQuery getGeospatialQueryImplementor(String operator,Object shape){
  if (operator.equalsIgnoreCase("String_Node_Str")) {
    if (shape.getClass().isAssignableFrom(Circle.class)) {
      return new CircleQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Envelope.class)) {
      return new EnvelopeQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Triangle.class)) {
      return new TriangleQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Polygon.class)) {
      return new PolygonQueryImpl();
    }
 else {
      throw new QueryHandlerException("String_Node_Str" + shape.getClass() + "String_Node_Str"+ "String_Node_Str"+ operator+ "String_Node_Str");
    }
  }
 else   if (operator.equals("String_Node_Str") || operator.equals("String_Node_Str") || operator.equals("String_Node_Str")|| operator.equals("String_Node_Str")) {
    if (shape.getClass().isAssignableFrom(Point.class)) {
      return new NearQueryImpl();
    }
 else {
      throw new QueryHandlerException("String_Node_Str" + shape.getClass() + "String_Node_Str"+ "String_Node_Str"+ operator+ "String_Node_Str");
    }
  }
 else {
    throw new QueryHandlerException("String_Node_Str" + shape.getClass() + "String_Node_Str"+ "String_Node_Str"+ operator+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public static GeospatialQuery getGeospatialQueryImplementor(String operator,Object shape){
  if (operator.equalsIgnoreCase("String_Node_Str")) {
    if (shape.getClass().isAssignableFrom(Circle.class)) {
      return new CircleQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Envelope.class)) {
      return new EnvelopeQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Triangle.class)) {
      return new TriangleQueryImpl();
    }
 else     if (shape.getClass().isAssignableFrom(Polygon.class)) {
      return new PolygonQueryImpl();
    }
 else {
      throw new QueryHandlerException("String_Node_Str" + shape.getClass() + "String_Node_Str"+ "String_Node_Str"+ operator+ "String_Node_Str");
    }
  }
 else   if (operator.equals("String_Node_Str") || operator.equals("String_Node_Str") || operator.equals("String_Node_Str")|| operator.equals("String_Node_Str")) {
    return new NearQueryImpl();
  }
 else {
    throw new QueryHandlerException("String_Node_Str" + shape.getClass() + "String_Node_Str"+ "String_Node_Str"+ operator+ "String_Node_Str");
  }
}
Program: 176804
Project: 176804
Buggy source:
@Test public void executeTests() throws Exception {
  addPersons();
  findPerson();
  findWithinCircle();
  findWithinTriangle();
  findWithinPolygon();
  findWithinRectangle();
  findNear();
  findNearSphere();
  findCentreSphere();
  findUsingCLWithEQ();
  findWithinCircleAndName();
  updateNameWithinCircle();
  deleteNameWithinCircle();
  updatePerson();
  removePerson();
}

Fixed version (ground truth):
@Test public void executeTests() throws Exception {
  addPersons();
  findPerson();
  findWithinCircle();
  findWithinTriangle();
  findWithinPolygon();
  findWithinRectangle();
  findNear();
  findNearSphere();
  findCentreSphere();
  findUsingExactCurrentLocation();
  findWithinCircleAndName();
  updateNameWithinCircle();
  deleteNameWithinCircle();
  updatePerson();
  removePerson();
}
Program: 176807
Project: 176807
Buggy source:
/** 
 * @param indexColumnFamily
 * @param rowKey
 * @param columnName
 */
protected abstract void deleteColumn(String indexColumnFamily,String rowKey,byte[] columnName,String persistenceUnit,ConsistencyLevel consistencyLevel);

Fixed version (ground truth):
/** 
 * @param indexColumnFamily
 * @param rowKey
 * @param superColumnName
 * @param columnName TODO
 */
protected abstract void deleteColumn(String indexColumnFamily,String rowKey,byte[] superColumnName,String persistenceUnit,ConsistencyLevel consistencyLevel,byte[] columnName);
Program: 176808
Project: 176808
Buggy source:
@Override public SuperColumn getSuperColumnForRow(ConsistencyLevel consistencyLevel,String columnFamilyName,String rowKey,byte[] superColumnName,String persistenceUnit){
  Selector selector=Pelops.createSelector(PelopsUtils.generatePoolName(persistenceUnit));
  SuperColumn thriftSuperColumn=null;
  try {
    thriftSuperColumn=selector.getSuperColumnFromRow(columnFamilyName,rowKey,Bytes.fromByteArray(superColumnName),consistencyLevel);
  }
 catch (  NotFoundException e) {
    log.error(e.getMessage());
    e.printStackTrace();
    return null;
  }
catch (  PelopsException e) {
    e.printStackTrace();
    log.error(e.getMessage());
    return null;
  }
  return thriftSuperColumn;
}

Fixed version (ground truth):
@Override public SuperColumn getSuperColumnForRow(ConsistencyLevel consistencyLevel,String columnFamilyName,String rowKey,byte[] superColumnName,String persistenceUnit){
  Selector selector=Pelops.createSelector(PelopsUtils.generatePoolName(persistenceUnit));
  SuperColumn thriftSuperColumn=null;
  try {
    thriftSuperColumn=selector.getSuperColumnFromRow(columnFamilyName,rowKey,Bytes.fromByteArray(superColumnName),consistencyLevel);
  }
 catch (  NotFoundException e) {
    log.error(e.getMessage());
    return null;
  }
catch (  PelopsException e) {
    log.error(e.getMessage());
    return null;
  }
  return thriftSuperColumn;
}
Program: 176809
Project: 176809
Buggy source:
/** 
 * @param mutator
 * @param indexColumnFamily
 * @param rowKey
 * @param columnName
 */
public void deleteColumn(String indexColumnFamily,String rowKey,byte[] columnName,String persistenceUnit,ConsistencyLevel consistencyLevel){
  Mutator mutator=Pelops.createMutator(PelopsUtils.generatePoolName(persistenceUnit));
  mutator.deleteColumn(indexColumnFamily,rowKey,Bytes.fromByteArray(columnName));
  mutator.execute(consistencyLevel);
}

Fixed version (ground truth):
/** 
 * @param indexColumnFamily
 * @param rowKey
 * @param superColumnName
 * @param mutator
 */
public void deleteColumn(String indexColumnFamily,String rowKey,byte[] superColumnName,String persistenceUnit,ConsistencyLevel consistencyLevel,byte[] columnName){
  Mutator mutator=Pelops.createMutator(PelopsUtils.generatePoolName(persistenceUnit));
  mutator.deleteColumn(indexColumnFamily,rowKey,Bytes.fromByteArray(superColumnName));
  mutator.execute(consistencyLevel);
}
Program: 176811
Project: 176811
Buggy source:
@Override protected void deleteColumn(String indexColumnFamily,String rowKey,byte[] columnName,String persistenceUnit,ConsistencyLevel consistencyLevel){
  ColumnPath cp=new ColumnPath(indexColumnFamily);
  cp.setColumn(columnName);
  IPooledConnection conn=null;
  try {
    String keyspace=CassandraUtilities.getKeyspace(persistenceUnit);
    conn=PelopsUtils.getCassandraConnection(persistenceUnit);
    Cassandra.Client cassandra_client=conn.getAPI();
    cassandra_client.set_keyspace(keyspace);
    cassandra_client.remove(ByteBuffer.wrap(rowKey.getBytes()),cp,System.currentTimeMillis(),consistencyLevel);
  }
 catch (  InvalidRequestException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  UnavailableException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  TimedOutException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  TException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
 finally {
    PelopsUtils.releaseConnection(conn);
  }
}

Fixed version (ground truth):
@Override protected void deleteColumn(String indexColumnFamily,String rowKey,byte[] superColumnName,String persistenceUnit,ConsistencyLevel consistencyLevel,byte[] columnName){
  ColumnPath cp=new ColumnPath(indexColumnFamily);
  cp.setSuper_column(superColumnName);
  IPooledConnection conn=null;
  try {
    String keyspace=CassandraUtilities.getKeyspace(persistenceUnit);
    conn=PelopsUtils.getCassandraConnection(persistenceUnit);
    Cassandra.Client cassandra_client=conn.getAPI();
    cassandra_client.set_keyspace(keyspace);
    ColumnOrSuperColumn cosc;
    try {
      cosc=cassandra_client.get(ByteBuffer.wrap(rowKey.getBytes()),cp,consistencyLevel);
    }
 catch (    NotFoundException e) {
      return;
    }
    SuperColumn thriftSuperColumn=ThriftDataResultHelper.transformThriftResult(cosc,ColumnFamilyType.SUPER_COLUMN,null);
    if (thriftSuperColumn != null && thriftSuperColumn.getColumns() != null && thriftSuperColumn.getColumns().size() > 1) {
      cp.setColumn(columnName);
    }
    cassandra_client.remove(ByteBuffer.wrap(rowKey.getBytes()),cp,System.currentTimeMillis(),consistencyLevel);
  }
 catch (  InvalidRequestException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  UnavailableException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  TimedOutException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
catch (  TException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new IndexingException("String_Node_Str",e);
  }
 finally {
    PelopsUtils.releaseConnection(conn);
  }
}
Program: 176812
Project: 176812
Buggy source:
@Override void startServer(){
  try {
    CassandraCli.cassandraSetUp();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  TException e) {
    e.printStackTrace();
  }
catch (  InvalidRequestException e) {
    e.printStackTrace();
  }
catch (  UnavailableException e) {
    e.printStackTrace();
  }
catch (  TimedOutException e) {
    e.printStackTrace();
  }
catch (  SchemaDisagreementException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override void startServer(){
  try {
    CassandraCli.cassandraSetUp();
  }
 catch (  IOException e) {
    log.error(e.getMessage());
  }
catch (  TException e) {
    log.error(e.getMessage());
  }
catch (  InvalidRequestException e) {
    log.error(e.getMessage());
  }
catch (  UnavailableException e) {
    log.error(e.getMessage());
  }
catch (  TimedOutException e) {
    e.printStackTrace();
  }
catch (  SchemaDisagreementException e) {
    log.error(e.getMessage());
  }
}
Program: 176813
Project: 176813
Buggy source:
/** 
 * Execute suite.
 */
protected void executeTwissandraTest(){
  addAllUserInfo();
  getUserById();
  updateUser();
  getPersonalDetailByName();
  getTweetsByDevice();
  getTweetsByRelationshipAndDevice();
  getTweetsByUserIdAndDevice();
  removeUsers();
}

Fixed version (ground truth):
/** 
 * Execute suite.
 */
protected void executeTwissandraTest(){
  addAllUserInfo();
  getUserById();
  updateUser();
  getPersonalDetailByName();
  getAllUsers();
  getTweetsByDevice();
  getTweetsByRelationshipAndDevice();
  getTweetsByUserIdAndDevice();
  removeUsers();
}
Program: 176814
Project: 176814
Buggy source:
public TwitterService(String persistenceUnitName){
  if (emf == null) {
    try {
      emf=createEntityManagerFactory(persistenceUnitName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public TwitterService(String persistenceUnitName){
  if (emf == null) {
    try {
      emf=createEntityManagerFactory(persistenceUnitName);
    }
 catch (    Exception e) {
      log.error(e.getMessage());
    }
  }
}
Program: 176815
Project: 176815
Buggy source:
@Override protected List<Object> populateEntities(EntityMetadata m,Client client){
  log.debug("String_Node_Str");
  List<Object> result=null;
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  if (appMetadata.isNative(getJPAQuery())) {
    result=((CassandraClientBase)client).executeQuery(getJPAQuery(),m.getEntityClazz(),null);
  }
 else {
    if (MetadataUtils.useSecondryIndex(m.getPersistenceUnit())) {
      Map<Boolean,List<IndexClause>> ixClause=prepareIndexClause(m);
      boolean isRowKeyQuery=ixClause.keySet().iterator().next();
      if (!isRowKeyQuery) {
        result=((CassandraClientBase)client).find(ixClause.get(isRowKeyQuery),m,false,null,maxResult,getColumnList(m,getKunderaQuery().getResult()));
      }
 else {
        result=((CassandraEntityReader)getReader()).handleFindByRange(m,client,result,ixClause,isRowKeyQuery,getColumnList(m,getKunderaQuery().getResult()));
      }
    }
 else {
      result=populateUsingLucene(m,client,result);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override protected List<Object> populateEntities(EntityMetadata m,Client client){
  log.debug("String_Node_Str");
  List<Object> result=null;
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  if (appMetadata.isNative(getJPAQuery())) {
    result=((CassandraClientBase)client).executeQuery(getJPAQuery(),m.getEntityClazz(),null);
  }
 else {
    if (MetadataUtils.useSecondryIndex(m.getPersistenceUnit())) {
      boolean useInvertedIndex=CassandraIndexHelper.isInvertedIndexingApplicable(m);
      if (useInvertedIndex && !getKunderaQuery().getFilterClauseQueue().isEmpty()) {
        result=(List)((CassandraEntityReader)getReader()).readFromIndexTable(m,client,getKunderaQuery().getFilterClauseQueue());
      }
 else {
        Map<Boolean,List<IndexClause>> ixClause=prepareIndexClause(m);
        boolean isRowKeyQuery=ixClause.keySet().iterator().next();
        if (!isRowKeyQuery) {
          result=((CassandraClientBase)client).find(ixClause.get(isRowKeyQuery),m,false,null,maxResult,getColumnList(m,getKunderaQuery().getResult()));
        }
 else {
          result=((CassandraEntityReader)getReader()).handleFindByRange(m,client,result,ixClause,isRowKeyQuery,getColumnList(m,getKunderaQuery().getResult()));
        }
      }
    }
 else {
      result=populateUsingLucene(m,client,result);
    }
  }
  return result;
}
Program: 176816
Project: 176816
Buggy source:
@Override protected void onPersist(EntityMetadata metadata,Object entity,Object id,List<RelationHolder> relationHolders){
  Transaction tx=null;
  try {
    s=getStatelessSession();
    tx=s.beginTransaction();
    s.insert(entity);
  }
 catch (  org.hibernate.exception.ConstraintViolationException e) {
    log.info(e.getMessage());
    s.update(entity);
  }
catch (  HibernateException e) {
    log.info(e.getMessage());
  }
 finally {
    for (    RelationHolder rh : relationHolders) {
      String linkName=rh.getRelationName();
      Object linkValue=rh.getRelationValue();
      if (linkName != null && linkValue != null) {
        String updateSql="String_Node_Str" + metadata.getTableName() + "String_Node_Str"+ linkName+ "String_Node_Str"+ linkValue+ "String_Node_Str"+ ((AbstractAttribute)metadata.getIdAttribute()).getJPAColumnName()+ "String_Node_Str"+ id+ "String_Node_Str";
        s.createSQLQuery(updateSql).executeUpdate();
      }
    }
    tx.commit();
  }
}

Fixed version (ground truth):
@Override protected void onPersist(EntityMetadata metadata,Object entity,Object id,List<RelationHolder> relationHolders){
  Transaction tx=null;
  s=getStatelessSession();
  tx=s.beginTransaction();
  try {
    if (!isUpdate) {
      s.insert(entity);
      for (      RelationHolder rh : relationHolders) {
        String linkName=rh.getRelationName();
        Object linkValue=rh.getRelationValue();
        if (linkName != null && linkValue != null) {
          String updateSql="String_Node_Str" + metadata.getTableName() + "String_Node_Str"+ linkName+ "String_Node_Str"+ linkValue+ "String_Node_Str"+ ((AbstractAttribute)metadata.getIdAttribute()).getJPAColumnName()+ "String_Node_Str"+ id+ "String_Node_Str";
          s.createSQLQuery(updateSql).executeUpdate();
        }
      }
    }
 else {
      s.update(entity);
    }
  }
 catch (  org.hibernate.exception.ConstraintViolationException e) {
    log.info(e.getMessage());
  }
catch (  HibernateException e) {
    log.info(e.getMessage());
  }
 finally {
    tx.commit();
  }
}
Program: 176818
Project: 176818
Buggy source:
public static int deepHashCode(Object obj){
  Set visited=new HashSet();
  LinkedList<Object> stack=new LinkedList<Object>();
  stack.addFirst(obj);
  int hash=0;
  while (!stack.isEmpty()) {
    obj=stack.removeFirst();
    if (obj == null || visited.contains(obj)) {
      continue;
    }
    visited.add(obj);
    if (obj.getClass().isArray()) {
      int len=Array.getLength(obj);
      for (int i=0; i < len; i++) {
        stack.addFirst(Array.get(obj,i));
      }
      continue;
    }
    if (obj instanceof Collection) {
      stack.addAll(0,(Collection)obj);
      continue;
    }
    if (obj instanceof Map) {
      stack.addAll(0,((Map)obj).keySet());
      stack.addAll(0,((Map)obj).values());
      continue;
    }
    if (hasCustomHashCode(obj.getClass())) {
      hash+=obj.hashCode();
      continue;
    }
    Collection<Field> fields=getDeepDeclaredFields(obj.getClass());
    for (    Field field : fields) {
      try {
        stack.addFirst(field.get(obj));
      }
 catch (      Exception ignored) {
      }
    }
  }
  return hash;
}

Fixed version (ground truth):
public static int deepHashCode(Object obj){
  Set visited=new HashSet();
  LinkedList<Object> stack=new LinkedList<Object>();
  stack.addFirst(obj);
  int hash=0;
  while (!stack.isEmpty()) {
    obj=stack.removeFirst();
    if (obj == null || visited.contains(obj)) {
      continue;
    }
    visited.add(obj);
    if (obj.getClass().isArray()) {
      int len=Array.getLength(obj);
      for (int i=0; i < len; i++) {
        stack.addFirst(Array.get(obj,i));
      }
      continue;
    }
    if (obj instanceof Collection && !(obj instanceof PersistentCollection)) {
      stack.addAll(0,(Collection)obj);
      continue;
    }
    if (obj instanceof Map) {
      stack.addAll(0,((Map)obj).keySet());
      stack.addAll(0,((Map)obj).values());
      continue;
    }
    if (hasCustomHashCode(obj.getClass())) {
      hash+=obj.hashCode();
      continue;
    }
    Collection<Field> fields=getDeepDeclaredFields(obj.getClass());
    for (    Field field : fields) {
      try {
        stack.addFirst(field.get(obj));
      }
 catch (      Exception ignored) {
      }
    }
  }
  return hash;
}
Program: 176819
Project: 176819
Buggy source:
/** 
 * Compare two Collections that must be same length and in same order.
 * @param dualKey DualKey represents the two Collections to compare
 * @param visited Collection of objects already compared (prevents cycles)
 * @param stack add items to compare to the Stack (Stack versus recursion)
 * @return boolean false if the Collections are not the same length,otherwise place collection items on Stack to be further compared.
 */
private static boolean compareOrdered(DualKey dualKey,LinkedList<DualKey> stack,Collection visited){
  Collection col1=(Collection)dualKey._key1;
  Collection col2=(Collection)dualKey._key2;
  if (col1.size() != col2.size()) {
    return false;
  }
  Iterator i1=col1.iterator();
  Iterator i2=col2.iterator();
  while (i1.hasNext()) {
    DualKey dk=new DualKey(i1.next(),i2.next());
    if (!visited.contains(dk)) {
      stack.addFirst(dk);
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compare two Collections that must be same length and in same order.
 * @param dualKey DualKey represents the two Collections to compare
 * @param visited Collection of objects already compared (prevents cycles)
 * @param stack add items to compare to the Stack (Stack versus recursion)
 * @return boolean false if the Collections are not the same length,otherwise place collection items on Stack to be further compared.
 */
private static boolean compareOrdered(DualKey dualKey,LinkedList<DualKey> stack,Collection visited){
  Collection col1=(Collection)dualKey._key1;
  Collection col2=(Collection)dualKey._key2;
  if (col1 instanceof PersistentCollection || col2 instanceof PersistentCollection) {
    return false;
  }
  if (col1.size() != col2.size()) {
    return false;
  }
  Iterator i1=col1.iterator();
  Iterator i2=col2.iterator();
  while (i1.hasNext()) {
    DualKey dk=new DualKey(i1.next(),i2.next());
    if (!visited.contains(dk)) {
      stack.addFirst(dk);
    }
  }
  return true;
}
Program: 176820
Project: 176820
Buggy source:
/** 
 * Deeply compare the two sets referenced by dualKey. This method attempts to quickly determine inequality by length, then hash, and finally does a deepEquals on each element if the two Sets passed by the prior tests.
 * @param col1 Collection one
 * @param col2 Collection two
 * @param visited Set containing items that have already been compared, so as to prevent cycles.
 * @return boolean true if the Sets are deeply equals, false otherwise.
 */
private static boolean compareUnordered(Collection col1,Collection col2,Set visited){
  if (col1.size() != col2.size()) {
    return false;
  }
  int h1=deepHashCode(col1);
  int h2=deepHashCode(col2);
  if (h1 != h2) {
    return false;
  }
  List copy=new ArrayList(col2);
  for (  Object element1 : col1) {
    int len=copy.size();
    for (int i=0; i < len; i++) {
      if (deepEquals(element1,copy.get(i),visited)) {
        copy.remove(i);
        break;
      }
    }
    if (len == copy.size()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Deeply compare the two sets referenced by dualKey. This method attempts to quickly determine inequality by length, then hash, and finally does a deepEquals on each element if the two Sets passed by the prior tests.
 * @param col1 Collection one
 * @param col2 Collection two
 * @param visited Set containing items that have already been compared, so as to prevent cycles.
 * @return boolean true if the Sets are deeply equals, false otherwise.
 */
private static boolean compareUnordered(Collection col1,Collection col2,Set visited){
  if (col1 instanceof PersistentCollection || col2 instanceof PersistentCollection) {
    return false;
  }
  if (col1.size() != col2.size()) {
    return false;
  }
  int h1=deepHashCode(col1);
  int h2=deepHashCode(col2);
  if (h1 != h2) {
    return false;
  }
  List copy=new ArrayList(col2);
  for (  Object element1 : col1) {
    int len=copy.size();
    for (int i=0; i < len; i++) {
      if (deepEquals(element1,copy.get(i),visited)) {
        copy.remove(i);
        break;
      }
    }
    if (len == copy.size()) {
      return false;
    }
  }
  return true;
}
Program: 176821
Project: 176821
Buggy source:
protected void tearDown() throws Exception {
  pickr.close();
  if (RUN_IN_EMBEDDED_MODE) {
    stopServer();
  }
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  pickr.close();
  if (RUN_IN_EMBEDDED_MODE) {
    stopServer();
  }
  if (AUTO_MANAGE_SCHEMA) {
    CassandraCli.dropKeySpace("String_Node_Str");
  }
}
Program: 176822
Project: 176822
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176823
Project: 176823
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176824
Project: 176824
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176825
Project: 176825
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176826
Project: 176826
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176827
Project: 176827
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176828
Project: 176828
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176829
Project: 176829
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176830
Project: 176830
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176831
Project: 176831
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176832
Project: 176832
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176833
Project: 176833
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176834
Project: 176834
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176835
Project: 176835
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176836
Project: 176836
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176837
Project: 176837
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176838
Project: 176838
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176839
Project: 176839
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176840
Project: 176840
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176841
Project: 176841
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176842
Project: 176842
Buggy source:
@Override protected void stopServer(){
  HBaseCli.stopCluster();
}

Fixed version (ground truth):
@Override protected void stopServer(){
}
Program: 176843
Project: 176843
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  log.info("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  super.setUp();
}
Program: 176844
Project: 176844
Buggy source:
/** 
 * If parameterised metadata is not for intended persistence unit, assign it to null.
 * @param metadata entity metadata
 * @return metadata.
 */
private EntityMetadata belongsToPersistenceUnit(EntityMetadata metadata){
  if ((metadata.getPersistenceUnit() == null && !Constants.RDBMS_CLIENT_FACTORY.equalsIgnoreCase(client)) || metadata.getPersistenceUnit() != null && !metadata.getPersistenceUnit().equals(persistenceUnit)) {
    metadata=null;
  }
 else   if (metadata.getPersistenceUnit() == null && Constants.RDBMS_CLIENT_FACTORY.equalsIgnoreCase(client)) {
    metadata.setPersistenceUnit(persistenceUnit);
  }
  return metadata;
}

Fixed version (ground truth):
/** 
 * If parameterised metadata is not for intended persistence unit, assign it to null.
 * @param metadata entity metadata
 * @return metadata.
 */
private EntityMetadata belongsToPersistenceUnit(EntityMetadata metadata){
  if ((metadata.getPersistenceUnit() == null && !Constants.RDBMS_CLIENT_FACTORY.equalsIgnoreCase(client)) || metadata.getPersistenceUnit() != null && !metadata.getPersistenceUnit().equals(persistenceUnit)) {
    metadata=null;
  }
  return metadata;
}