nus-yam/ex-repair huggingface dataset:
Program: 97899
Project: 97899
Buggy source:
private void loadCache(){
  if (this.currentCacheLoaded)   return;
  currentCacheLoaded=true;
  DboTableMeta metaDbo=proxyMeta.getMetaDbo();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keyList));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,true,false,batchSize);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    Row row=kv.getValue();
    Tuple<T> tuple=proxyMeta.convertIdToProxy(row,session,key,null);
    if (row == null) {
      throw new IllegalStateException("String_Node_Str" + owner + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ tuple.getEntityId()+ "String_Node_Str");
    }
    T value=proxyList.get(counter);
    proxyMeta.fillInInstance(row,session,value);
    counter++;
  }
}

Fixed version (ground truth):
private void loadCache(){
  if (this.currentCacheLoaded)   return;
  currentCacheLoaded=true;
  DboTableMeta metaDbo=proxyMeta.getMetaDbo();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keyList));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,true,false,batchSize);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    Row row=kv.getValue();
    if (row != null) {
      T value=proxyList.get(counter);
      proxyMeta.fillInInstance(row,session,value);
    }
    counter++;
  }
}
Program: 97900
Project: 97900
Buggy source:
@SuppressWarnings("String_Node_Str") public void loadCacheIfNeeded(){
  if (cacheLoaded)   return;
  DboTableMeta metaDbo=classMeta.getMetaDbo();
  DboColumnIdMeta idMeta=metaDbo.getIdColumnMeta();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keys));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,false,true,null);
  String name=getClass().getSimpleName();
  log.info(name + "String_Node_Str" + keys.size()+ "String_Node_Str"+ field);
  while (true) {
    Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    byte[] nonVirtKey=idMeta.unformVirtRowKey(key);
    Row row=kv.getValue();
    Tuple<V> tuple=classMeta.convertIdToProxy(row,session,nonVirtKey,null);
    if (row == null) {
      throw new IllegalStateException("String_Node_Str" + owner + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ tuple.getEntityId()+ "String_Node_Str");
    }
    V proxy=tuple.getProxy();
    classMeta.fillInInstance(row,session,proxy);
    Object mapKey=getKeyField(proxy);
    super.put((K)mapKey,proxy);
    originals.add(proxy);
  }
  cacheLoaded=true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void loadCacheIfNeeded(){
  if (cacheLoaded)   return;
  DboTableMeta metaDbo=classMeta.getMetaDbo();
  DboColumnIdMeta idMeta=metaDbo.getIdColumnMeta();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keys));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,false,true,null);
  String name=getClass().getSimpleName();
  log.info(name + "String_Node_Str" + keys.size()+ "String_Node_Str"+ field);
  while (true) {
    Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    byte[] nonVirtKey=idMeta.unformVirtRowKey(key);
    Row row=kv.getValue();
    Tuple<V> tuple=classMeta.convertIdToProxy(row,session,nonVirtKey,null);
    if (row == null)     continue;
    V proxy=tuple.getProxy();
    classMeta.fillInInstance(row,session,proxy);
    Object mapKey=getKeyField(proxy);
    super.put((K)mapKey,proxy);
    originals.add(proxy);
  }
  cacheLoaded=true;
}
Program: 97901
Project: 97901
Buggy source:
public void loadCacheIfNeeded(){
  if (cacheLoaded)   return;
  DboTableMeta metaDbo=metaClass.getMetaDbo();
  DboColumnIdMeta idMeta=metaDbo.getIdColumnMeta();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keys));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,false,true,null);
  String name=getClass().getSimpleName();
  log.info(name + "String_Node_Str" + keys.size()+ "String_Node_Str"+ field);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    byte[] nonVirtKey=idMeta.unformVirtRowKey(key);
    Row row=kv.getValue();
    Tuple<T> tuple=metaClass.convertIdToProxy(row,session,nonVirtKey,null);
    if (row == null) {
      if (!metaDbo.isEmbeddable())       throw new IllegalStateException("String_Node_Str" + owner + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ tuple.getEntityId()+ "String_Node_Str");
    }
    Holder<T> h=(Holder)originalHolders.get(counter);
    T value=h.getValue();
    if (value instanceof NoSqlProxy) {
      metaClass.fillInInstance(row,session,value);
    }
    counter++;
  }
  cacheLoaded=true;
}

Fixed version (ground truth):
public void loadCacheIfNeeded(){
  if (cacheLoaded)   return;
  DboTableMeta metaDbo=metaClass.getMetaDbo();
  IndiceToVirtual virtKeys=new IndiceToVirtual(metaDbo,new ListWrappingCursor<byte[]>(keys));
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,false,true,null);
  String name=getClass().getSimpleName();
  log.info(name + "String_Node_Str" + keys.size()+ "String_Node_Str"+ field);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    Row row=kv.getValue();
    if (row != null || metaDbo.isEmbeddable()) {
      Holder<T> h=(Holder)originalHolders.get(counter);
      T value=h.getValue();
      if (value instanceof NoSqlProxy) {
        metaClass.fillInInstance(row,session,value);
      }
    }
    counter++;
  }
  cacheLoaded=true;
}
Program: 97902
Project: 97902
Buggy source:
private boolean isNeedPersist(OWNER entity,Object value,Map<Field,Object> fieldToValue){
  if (!(entity instanceof NoSqlProxy))   return true;
  Object originalValue=fieldToValue.get(field);
  if (valuesEqual(originalValue,value))   return false;
  return true;
}

Fixed version (ground truth):
private boolean isNeedPersist(OWNER entity,Object value,Map<Field,Object> fieldToValue){
  if (!(entity instanceof NoSqlProxy))   return true;
 else   if (valuesEqual(fieldToValue,value))   return false;
  return true;
}
Program: 97903
Project: 97903
Buggy source:
private boolean valuesEqual(Object originalValue,Object value){
  if (originalValue == null && value == null)   return true;
 else   if (originalValue == null)   return false;
 else   if (originalValue.equals(value))   return true;
  return false;
}

Fixed version (ground truth):
private boolean valuesEqual(Map<Field,Object> fieldToValue,Object value){
  Object originalValue=fieldToValue.get(field);
  originalValue=unwrapIfNeeded(originalValue);
  if (originalValue == null && value == null)   return true;
 else   if (originalValue == null)   return false;
 else   if (originalValue.equals(value))   return true;
  return false;
}
Program: 97904
Project: 97904
Buggy source:
private void addIndexRemoves(InfoForIndex<OWNER> info,Object value,byte[] byteVal,StorageTypeEnum storageType){
  RowToPersist row=info.getRow();
  Map<Field,Object> fieldToValue=info.getFieldToValue();
  Object originalValue=fieldToValue.get(field);
  if (valuesEqual(originalValue,value))   return;
  byte[] pk=row.getKey();
  byte[] oldIndexedVal=translateValue(originalValue);
  List<IndexData> indexList=row.getIndexToRemove();
  addToList(info,oldIndexedVal,storageType,pk,indexList);
}

Fixed version (ground truth):
private void addIndexRemoves(InfoForIndex<OWNER> info,Object value,byte[] byteVal,StorageTypeEnum storageType){
  RowToPersist row=info.getRow();
  Map<Field,Object> fieldToValue=info.getFieldToValue();
  if (valuesEqual(fieldToValue,value))   return;
  Object originalValue=fieldToValue.get(field);
  byte[] pk=row.getKey();
  byte[] oldIndexedVal=translateValue(originalValue);
  List<IndexData> indexList=row.getIndexToRemove();
  addToList(info,oldIndexedVal,storageType,pk,indexList);
}
Program: 97906
Project: 97906
Buggy source:
private Counter processAllColumns(NoSqlTypedSession s,ColFamilyData data,Map<Object,KeyValue<TypedRow>> keyToRow,Cursor<IndexPoint> indexView2){
  String colName=data.getColumn();
  indexView2.beforeFirst();
  int rowCounter=0;
  int changedCounter=0;
  while (indexView2.next()) {
    IndexPoint pt=indexView2.getCurrent();
    KeyValue<TypedRow> row=keyToRow.get(pt.getKey());
    if (row == null) {
      log.debug("String_Node_Str" + pt.getKey());
    }
 else     if (row.getException() != null || row.getValue() == null) {
      removeIndexPt(s,data,pt);
      changedCounter++;
    }
 else {
      TypedRow val=row.getValue();
      TypedColumn column=val.getColumn(colName);
      if (column == null) {
        continue;
      }
      Object value=column.getValue();
      if (!valuesEqual(pt.getIndexedValue(),value)) {
        System.out.println("String_Node_Str" + pt.getKeyAsString() + "String_Node_Str"+ pt.getIndexedValueAsString()+ "String_Node_Str"+ column.getValueAsString());
        s.removeIndexPoint(pt,data.getPartitionBy(),data.getPartitionId());
        IndexColumn col=new IndexColumn();
        col.setColumnName(colName);
        col.setPrimaryKey(pt.getRawKey());
        byte[] indValue=column.getValueRaw();
        col.setIndexedValue(indValue);
        IndexPoint newPoint=new IndexPoint(pt.getRowKeyMeta(),col,data.getColumnMeta());
        s.addIndexPoint(newPoint,data.getPartitionBy(),data.getPartitionId());
        changedCounter++;
      }
    }
    rowCounter++;
    if (changedCounter > 50) {
      s.flush();
    }
    if (rowCounter % 20000 == 0) {
      System.out.println("String_Node_Str" + rowCounter + "String_Node_Str"+ changedCounter);
    }
  }
  s.flush();
  return new Counter(rowCounter,changedCounter);
}

Fixed version (ground truth):
private Counter processAllColumns(NoSqlTypedSession s,ColFamilyData data,Map<Object,KeyValue<TypedRow>> keyToRow,Cursor<IndexPoint> indexView2){
  String colName=data.getColumn();
  indexView2.beforeFirst();
  int rowCounter=0;
  int changedCounter=0;
  while (indexView2.next()) {
    IndexPoint pt=indexView2.getCurrent();
    KeyValue<TypedRow> row=keyToRow.get(pt.getKey());
    if (row == null) {
      log.debug("String_Node_Str" + pt.getKey());
    }
 else     if (row.getException() != null || row.getValue() == null) {
      removeIndexPt(s,data,pt);
      changedCounter++;
    }
 else {
      TypedRow val=row.getValue();
      if (processColumn(s,data,val,pt)) {
        changedCounter++;
      }
    }
    rowCounter++;
    if (changedCounter > 50) {
      s.flush();
    }
    if (rowCounter % 20000 == 0) {
      System.out.println("String_Node_Str" + rowCounter + "String_Node_Str"+ changedCounter);
    }
  }
  s.flush();
  return new Counter(rowCounter,changedCounter);
}
Program: 97907
Project: 97907
Buggy source:
@Override public void saveMonitor(PlayOrmMonitor monitor){
  MonitorDbo m=CopyUtil.copy(monitor);
  NoSqlEntityManager mgr=factory.createEntityManager();
  mgr.put(m);
  mgr.flush();
}

Fixed version (ground truth):
@Override public void saveMonitor(PlayOrmMonitor monitor){
  MonitorDbo m=CopyUtil.copy(monitor);
  NoSqlEntityManager mgr=factory.createEntityManager();
  mgr.put(m,false);
  mgr.flush();
}
Program: 97909
Project: 97909
Buggy source:
/** 
 * Converts to BigInteger byte form OR BigDecimal byte form OR UTF8 byte form
 * @param obj
 * @return
 */
public static byte[] convertToBytes(Object obj){
  Class clazz=obj.getClass();
  BaseConverter converter=stdConverters.get(clazz);
  if (converter == null)   throw new IllegalArgumentException("String_Node_Str" + clazz + "String_Node_Str");
  return converter.convertToNoSql(obj);
}

Fixed version (ground truth):
/** 
 * Converts to BigInteger byte form OR BigDecimal byte form OR UTF8 byte form
 * @param obj
 * @return
 */
public static byte[] convertToBytes(Object obj){
  if (obj == null)   return null;
  Class clazz=obj.getClass();
  BaseConverter converter=stdConverters.get(clazz);
  if (converter == null)   throw new IllegalArgumentException("String_Node_Str" + clazz + "String_Node_Str");
  return converter.convertToNoSql(obj);
}
Program: 97911
Project: 97911
Buggy source:
@Override public Object convertFromNoSqlImpl(byte[] value){
  byte[] timeArray=new byte[8];
  byte[] clockSeqAndNodeArray=new byte[8];
  System.arraycopy(value,0,timeArray,0,8);
  System.arraycopy(value,8,clockSeqAndNodeArray,0,8);
  long time=StandardConverters.convertFromBytes(Long.class,timeArray);
  long clockSeqAndNode=StandardConverters.convertFromBytes(Long.class,clockSeqAndNodeArray);
  UUID ud=new UUID(time,clockSeqAndNode);
  return ud;
}

Fixed version (ground truth):
@Override public Object convertFromNoSqlImpl(byte[] value){
  try {
    byte[] timeArray=new byte[8];
    byte[] clockSeqAndNodeArray=new byte[8];
    System.arraycopy(value,0,timeArray,0,8);
    System.arraycopy(value,8,clockSeqAndNodeArray,0,8);
    long time=StandardConverters.convertFromBytes(Long.class,timeArray);
    long clockSeqAndNode=StandardConverters.convertFromBytes(Long.class,clockSeqAndNodeArray);
    UUID ud=new UUID(time,clockSeqAndNode);
    return ud;
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + value.length,e);
  }
}
Program: 97914
Project: 97914
Buggy source:
@SuppressWarnings("String_Node_Str") private MetaField processToMany(MetaClassSingle<?> ownerMeta,DboTableMeta t,Field field,String colName,Class entityType,Field fieldForKey){
  if (!entityType.isAnnotationPresent(NoSqlEntity.class))   throw new RuntimeException("String_Node_Str" + entityType.getName() + "String_Node_Str"+ "String_Node_Str"+ field.getDeclaringClass().getName()+ "String_Node_Str"+ field.getName()+ "String_Node_Str");
  MetaAbstractClass<?> fkMeta=metaInfo.findOrCreate(entityType);
  if (field.getType().equals(CursorToMany.class)) {
    MetaCursorField metaField=metaCursorProvider.get();
    metaField.setup(t,field,colName,ownerMeta,fkMeta);
    return metaField;
  }
  if (!field.getType().equals(Map.class) && !field.getType().equals(List.class) && !field.getType().equals(Set.class)&& !field.getType().equals(Collection.class))   throw new RuntimeException("String_Node_Str" + field + "String_Node_Str");
  MetaToManyField metaField=metaListProvider.get();
  metaField.setup(t,field,colName,fkMeta,fieldForKey);
  return metaField;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private MetaField processToMany(MetaClassSingle<?> ownerMeta,DboTableMeta t,Field field,String colName,Class entityType,Field fieldForKey){
  Class<?> theSuperclass=null;
  Class<?> type=entityType;
  if (!entityType.isAnnotationPresent(NoSqlEntity.class)) {
    if (!entityType.isAnnotationPresent(NoSqlDiscriminatorColumn.class))     throw new RuntimeException("String_Node_Str" + entityType + "String_Node_Str"+ "String_Node_Str"+ field.getDeclaringClass().getName()+ "String_Node_Str"+ field.getName());
    theSuperclass=findSuperclassWithNoSqlEntity(entityType);
    runOtherSuperclassChecks(entityType,field,theSuperclass);
  }
  MetaAbstractClass<?> fkMeta=metaInfo.findOrCreate(type);
  if (theSuperclass != null) {
    MetaClassInheritance meta=(MetaClassInheritance)fkMeta;
    fkMeta=meta.findOrCreate(type,theSuperclass);
  }
  if (field.getType().equals(CursorToMany.class)) {
    MetaCursorField metaField=metaCursorProvider.get();
    metaField.setup(t,field,colName,ownerMeta,fkMeta);
    return metaField;
  }
  if (!field.getType().equals(Map.class) && !field.getType().equals(List.class) && !field.getType().equals(Set.class)&& !field.getType().equals(Collection.class))   throw new RuntimeException("String_Node_Str" + field + "String_Node_Str");
  MetaToManyField metaField=metaListProvider.get();
  metaField.setup(t,field,colName,fkMeta,fieldForKey);
  return metaField;
}
Program: 97916
Project: 97916
Buggy source:
@Test public void testInnerJoin(){
  putEntities();
  long start=System.currentTimeMillis();
  List<AAPartitionedTrade> trades=AAPartitionedTrade.findInPartition(mgr,5,"String_Node_Str",null);
  long total=System.currentTimeMillis() - start;
  log.info("String_Node_Str" + total + "String_Node_Str");
  Assert.assertEquals(2,trades.size());
}

Fixed version (ground truth):
@Test public void testInnerJoin(){
  putEntities();
  long start=System.currentTimeMillis();
  List<PartitionedTrade> trades=PartitionedTrade.findInPartition(mgr,5,"String_Node_Str",null);
  long total=System.currentTimeMillis() - start;
  log.info("String_Node_Str" + total + "String_Node_Str");
  Assert.assertEquals(2,trades.size());
}
Program: 97917
Project: 97917
Buggy source:
@Test public void testLeftOuterJoin(){
  putEntities();
  List<AAPartitionedTrade> trades=AAPartitionedTrade.findLeftOuter(mgr,5,"String_Node_Str",null);
  Assert.assertEquals(3,trades.size());
}

Fixed version (ground truth):
@Test public void testLeftOuterJoin(){
  putEntities();
  List<PartitionedTrade> trades=PartitionedTrade.findLeftOuter(mgr,5,"String_Node_Str",null);
  Assert.assertEquals(3,trades.size());
}
Program: 97918
Project: 97918
Buggy source:
private void putEntities(){
  PartSecurity sec=new PartSecurity();
  sec.setId("String_Node_Str");
  sec.setSecurityType("String_Node_Str");
  mgr.put(sec);
  PartSecurity sec2=new PartSecurity();
  sec2.setId("String_Node_Str");
  sec2.setSecurityType("String_Node_Str");
  mgr.put(sec2);
  PartSecurity sec3=new PartSecurity();
  sec3.setId("String_Node_Str");
  sec3.setSecurityType("String_Node_Str");
  mgr.put(sec3);
  mgr.flush();
  AAPartitionedTrade trade1=new AAPartitionedTrade();
  trade1.setId("String_Node_Str");
  trade1.setSecurity(sec);
  trade1.setNumShares(5);
  mgr.put(trade1);
  mgr.flush();
  AAPartitionedTrade trade2=new AAPartitionedTrade();
  trade2.setId("String_Node_Str");
  trade2.setSecurity(sec);
  trade2.setNumShares(6);
  mgr.put(trade2);
  AAPartitionedTrade trade3=new AAPartitionedTrade();
  trade3.setId("String_Node_Str");
  trade3.setSecurity(sec3);
  trade3.setNumShares(5);
  mgr.put(trade3);
  AAPartitionedTrade trade4=new AAPartitionedTrade();
  trade4.setId("String_Node_Str");
  trade4.setNumShares(5);
  mgr.put(trade4);
  AAPartitionedTrade trade5=new AAPartitionedTrade();
  trade5.setId("String_Node_Str");
  trade5.setSecurity(sec2);
  trade5.setNumShares(5);
  mgr.put(trade5);
  mgr.flush();
}

Fixed version (ground truth):
private void putEntities(){
  PartSecurity sec=new PartSecurity();
  sec.setId("String_Node_Str");
  sec.setSecurityType("String_Node_Str");
  mgr.put(sec);
  PartSecurity sec2=new PartSecurity();
  sec2.setId("String_Node_Str");
  sec2.setSecurityType("String_Node_Str");
  mgr.put(sec2);
  PartSecurity sec3=new PartSecurity();
  sec3.setId("String_Node_Str");
  sec3.setSecurityType("String_Node_Str");
  mgr.put(sec3);
  mgr.flush();
  PartitionedTrade trade1=new PartitionedTrade();
  trade1.setId("String_Node_Str");
  trade1.setSecurity(sec);
  trade1.setNumShares(5);
  mgr.put(trade1);
  mgr.flush();
  PartitionedTrade trade2=new PartitionedTrade();
  trade2.setId("String_Node_Str");
  trade2.setSecurity(sec);
  trade2.setNumShares(6);
  mgr.put(trade2);
  PartitionedTrade trade3=new PartitionedTrade();
  trade3.setId("String_Node_Str");
  trade3.setSecurity(sec3);
  trade3.setNumShares(5);
  mgr.put(trade3);
  PartitionedTrade trade4=new PartitionedTrade();
  trade4.setId("String_Node_Str");
  trade4.setNumShares(5);
  mgr.put(trade4);
  PartitionedTrade trade5=new PartitionedTrade();
  trade5.setId("String_Node_Str");
  trade5.setSecurity(sec2);
  trade5.setNumShares(5);
  mgr.put(trade5);
  mgr.flush();
}
Program: 97919
Project: 97919
Buggy source:
@Test public void testPartitioning(){
  PartAccount acc=new PartAccount();
  acc.setBusinessName("String_Node_Str");
  acc.setSomeNumber(5);
  PartAccount acc2=new PartAccount();
  acc.setBusinessName("String_Node_Str");
  acc.setSomeNumber(6);
  AAPartitionedTrade trade=new AAPartitionedTrade();
  trade.setAccount(acc);
  trade.setSecurityName("String_Node_Str");
  trade.setUniqueColumn("String_Node_Str");
  AAPartitionedTrade trade2=new AAPartitionedTrade();
  trade2.setAccount(acc);
  trade2.setSecurityName("String_Node_Str");
  trade2.setUniqueColumn("String_Node_Str");
  AAPartitionedTrade trade3=new AAPartitionedTrade();
  trade3.setAccount(acc);
  trade3.setSecurityName("String_Node_Str");
  trade3.setUniqueColumn("String_Node_Str");
  AAPartitionedTrade trade4=new AAPartitionedTrade();
  trade4.setAccount(acc2);
  trade4.setSecurityName("String_Node_Str");
  trade4.setUniqueColumn("String_Node_Str");
  mgr.put(acc);
  mgr.put(acc2);
  mgr.put(trade);
  mgr.put(trade3);
  mgr.put(trade4);
  mgr.flush();
  mgr.put(trade2);
  mgr.flush();
  List<AAPartitionedTrade> tradesInAcc1Partition=AAPartitionedTrade.findByUnique(mgr,trade.getUniqueColumn(),acc);
  Assert.assertEquals(2,tradesInAcc1Partition.size());
}

Fixed version (ground truth):
@Test public void testPartitioning(){
  PartAccount acc=new PartAccount();
  acc.setBusinessName("String_Node_Str");
  acc.setSomeNumber(5);
  PartAccount acc2=new PartAccount();
  acc.setBusinessName("String_Node_Str");
  acc.setSomeNumber(6);
  PartitionedTrade trade=new PartitionedTrade();
  trade.setAccount(acc);
  trade.setSecurityName("String_Node_Str");
  trade.setUniqueColumn("String_Node_Str");
  PartitionedTrade trade2=new PartitionedTrade();
  trade2.setAccount(acc);
  trade2.setSecurityName("String_Node_Str");
  trade2.setUniqueColumn("String_Node_Str");
  PartitionedTrade trade3=new PartitionedTrade();
  trade3.setAccount(acc);
  trade3.setSecurityName("String_Node_Str");
  trade3.setUniqueColumn("String_Node_Str");
  PartitionedTrade trade4=new PartitionedTrade();
  trade4.setAccount(acc2);
  trade4.setSecurityName("String_Node_Str");
  trade4.setUniqueColumn("String_Node_Str");
  mgr.put(acc);
  mgr.put(acc2);
  mgr.put(trade);
  mgr.put(trade3);
  mgr.put(trade4);
  mgr.flush();
  mgr.put(trade2);
  mgr.flush();
  List<PartitionedTrade> tradesInAcc1Partition=PartitionedTrade.findByUnique(mgr,trade.getUniqueColumn(),acc);
  Assert.assertEquals(2,tradesInAcc1Partition.size());
}
Program: 97920
Project: 97920
Buggy source:
public List<AAPartitionedTrade> getActivities(){
  return activities;
}

Fixed version (ground truth):
public List<PartitionedTrade> getActivities(){
  return activities;
}
Program: 97921
Project: 97921
Buggy source:
public void addActivity(AAPartitionedTrade act1){
  activities.add(act1);
}

Fixed version (ground truth):
public void addActivity(PartitionedTrade act1){
  activities.add(act1);
}
Program: 97922
Project: 97922
Buggy source:
@Override public AbstractCursor<KeyValue<Row>> find(DboTableMeta colFamily,Iterable<byte[]> rowKeys,boolean skipCache,Integer batchSize){
  Cache c=this;
  if (skipCache) {
    c=new EmptyCache(this);
  }
  CacheThreadLocal.setCache(c);
  try {
    AbstractCursor<KeyValue<Row>> rowsFromDb=session.find(colFamily,rowKeys,skipCache,batchSize);
    return rowsFromDb;
  }
  finally {
    CacheThreadLocal.setCache(null);
  }
}

Fixed version (ground truth):
@Override public AbstractCursor<KeyValue<Row>> find(DboTableMeta colFamily,Iterable<byte[]> rowKeys,boolean skipCache,Integer batchSize){
  Cache c=this;
  if (skipCache) {
    c=new EmptyCache(this);
  }
  CacheThreadLocal.setCache(c);
  AbstractCursor<KeyValue<Row>> rowsFromDb=session.find(colFamily,rowKeys,skipCache,batchSize);
  return rowsFromDb;
}
Program: 97923
Project: 97923
Buggy source:
@Override public AbstractCursor<KeyValue<Row>> find(DboTableMeta colFamily,Iterable<byte[]> rowKeys,Cache realCache,int batchSize,BatchListener l,MetaLookup mgr){
  BatchListener list=l;
  if (log.isInfoEnabled()) {
    list=new LogBatchFetch("String_Node_Str" + colFamily,l,batchSize);
  }
  Cache cache=CacheThreadLocal.getCache();
  return session.find(colFamily,rowKeys,cache,batchSize,list,mgr);
}

Fixed version (ground truth):
@Override public AbstractCursor<KeyValue<Row>> find(DboTableMeta colFamily,Iterable<byte[]> rowKeys,Cache realCache,int batchSize,BatchListener l,MetaLookup mgr){
  BatchListener list=l;
  Cache cache=CacheThreadLocal.getCache();
  if (log.isInfoEnabled()) {
    list=new LogBatchFetch("String_Node_Str" + colFamily,l,batchSize);
  }
  if (cache == null)   throw new IllegalArgumentException("String_Node_Str");
  return session.find(colFamily,rowKeys,cache,batchSize,list,mgr);
}
Program: 97924
Project: 97924
Buggy source:
private void loadCache(){
  if (this.currentCacheLoaded)   return;
  currentCacheLoaded=true;
  DboTableMeta metaDbo=proxyMeta.getMetaDbo();
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,keyList,true,batchSize);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    Row row=kv.getValue();
    Tuple<T> tuple=proxyMeta.convertIdToProxy(row,session,key,null);
    if (row == null) {
      throw new IllegalStateException("String_Node_Str" + owner + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ tuple.getEntityId()+ "String_Node_Str");
    }
    T value=proxyList.get(counter);
    proxyMeta.fillInInstance(row,session,value);
    counter++;
  }
}

Fixed version (ground truth):
private void loadCache(){
  if (this.currentCacheLoaded)   return;
  currentCacheLoaded=true;
  DboTableMeta metaDbo=proxyMeta.getMetaDbo();
  Iterable<byte[]> virtKeys=new IterToVirtual(metaDbo,keyList);
  AbstractCursor<KeyValue<Row>> rows=session.find(metaDbo,virtKeys,true,batchSize);
  int counter=0;
  while (true) {
    com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder=rows.nextImpl();
    if (holder == null)     break;
    KeyValue<Row> kv=holder.getValue();
    byte[] key=(byte[])kv.getKey();
    Row row=kv.getValue();
    Tuple<T> tuple=proxyMeta.convertIdToProxy(row,session,key,null);
    if (row == null) {
      throw new IllegalStateException("String_Node_Str" + owner + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ tuple.getEntityId()+ "String_Node_Str");
    }
    T value=proxyList.get(counter);
    proxyMeta.fillInInstance(row,session,value);
    counter++;
  }
}
Program: 97925
Project: 97925
Buggy source:
private KeyValue<T> translateRow(KeyValue<Row> kv){
  Row row=kv.getValue();
  Object key=kv.getKey();
  KeyValue<T> keyVal;
  if (row == null) {
    keyVal=new KeyValue<T>();
    Object obj=meta.getIdField().translateFromBytes((byte[])key);
    if (query != null) {
      RowNotFoundException exc=new RowNotFoundException("String_Node_Str" + query + "String_Node_Str");
      keyVal.setException(exc);
    }
    keyVal.setKey(obj);
  }
 else {
    keyVal=meta.translateFromRow(row,session);
  }
  return keyVal;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private KeyValue<T> translateRow(KeyValue<Row> kv){
  Row row=kv.getValue();
  Object key=kv.getKey();
  KeyValue<T> keyVal;
  if (row == null) {
    keyVal=new KeyValue<T>();
    MetaIdField idMeta=meta.getIdField();
    byte[] nonVirtKey=idMeta.unformVirtRowKey((byte[])key);
    Object obj=meta.getIdField().translateFromBytes(nonVirtKey);
    if (query != null) {
      RowNotFoundException exc=new RowNotFoundException("String_Node_Str" + query + "String_Node_Str");
      keyVal.setException(exc);
    }
    keyVal.setKey(obj);
  }
 else {
    keyVal=meta.translateFromRow(row,session);
  }
  return keyVal;
}
Program: 97926
Project: 97926
Buggy source:
private void createColFamilyInCassandra(DboTableMeta meta){
  String keysp=keyspace.getKeyspaceName();
  String cfName=meta.getRealColumnFamily().toLowerCase();
  String colFamily=meta.getRealColumnFamily();
  log.info("String_Node_Str" + cfName + "String_Node_Str"+ keysp);
  ColumnFamilyDefinition def=cluster.makeColumnFamilyDefinition().setName(colFamily).setKeyspace(keysp);
  log.info("String_Node_Str" + def.getKeyspace() + "String_Node_Str"+ def.getName());
  StorageTypeEnum rowKeyType=meta.getIdColumnMeta().getStorageType();
  ColumnType colType=ColumnType.ANY_EXCEPT_COMPOSITE;
  if (meta.isVirtualCf()) {
    rowKeyType=StorageTypeEnum.BYTES;
  }
 else {
    StorageTypeEnum type=meta.getColNamePrefixType();
    def=addRowKeyValidation(meta,def);
    def=setColumnNameCompareType(meta,type,def);
    if (type == StorageTypeEnum.STRING)     colType=ColumnType.COMPOSITE_STRINGPREFIX;
 else     if (type == StorageTypeEnum.INTEGER)     colType=ColumnType.COMPOSITE_INTEGERPREFIX;
 else     if (type == StorageTypeEnum.DECIMAL)     colType=ColumnType.COMPOSITE_DECIMALPREFIX;
  }
  addColumnFamily(def);
  String virtual=meta.getColumnFamily();
  String realCf=meta.getRealColumnFamily();
  Info info=createInfo(realCf,colType,rowKeyType);
  virtualToCfName.put(virtual,realCf);
  cfNameToCassandra.put(realCf,info);
}

Fixed version (ground truth):
private void createColFamilyInCassandra(DboTableMeta meta){
  String keysp=keyspace.getKeyspaceName();
  String cfName=meta.getRealColumnFamily().toLowerCase();
  String colFamily=meta.getRealColumnFamily();
  log.info("String_Node_Str" + cfName + "String_Node_Str"+ keysp);
  ColumnFamilyDefinition def=cluster.makeColumnFamilyDefinition().setName(colFamily).setKeyspace(keysp);
  log.info("String_Node_Str" + def.getKeyspace() + "String_Node_Str"+ def.getName());
  StorageTypeEnum rowKeyType=meta.getIdColumnMeta().getStorageType();
  ColumnType colType=ColumnType.ANY_EXCEPT_COMPOSITE;
  if (meta.isVirtualCf()) {
    rowKeyType=StorageTypeEnum.BYTES;
  }
 else {
    StorageTypeEnum type=meta.getColNamePrefixType();
    def=addRowKeyValidation(meta,def);
    def=setColumnNameCompareType(meta,type,def);
    if (type == StorageTypeEnum.STRING)     colType=ColumnType.COMPOSITE_STRINGPREFIX;
 else     if (type == StorageTypeEnum.INTEGER)     colType=ColumnType.COMPOSITE_INTEGERPREFIX;
 else     if (type == StorageTypeEnum.DECIMAL)     colType=ColumnType.COMPOSITE_DECIMALPREFIX;
  }
  addColumnFamily(def);
  String virtual=meta.getColumnFamily();
  String realCf=meta.getRealColumnFamily();
  String realCfLower=realCf.toLowerCase();
  Info info=createInfo(realCf,colType,rowKeyType);
  virtualToCfName.put(virtual,realCfLower);
  cfNameToCassandra.put(realCfLower,info);
}
Program: 97927
Project: 97927
Buggy source:
private Info tryToLoadColumnFamilyImpl(String virtCf,MetaLookup lookup) throws ConnectionException {
synchronized (virtCf.intern()) {
    log.info("String_Node_Str" + virtCf + "String_Node_Str");
    String cfName=virtualToCfName.get(virtCf);
    if (cfName != null) {
      Info info=cfNameToCassandra.get(cfName);
      if (info != null) {
        log.info("String_Node_Str" + virtCf + "String_Node_Str"+ cfName+ "String_Node_Str");
        return cfNameToCassandra.get(cfName);
      }
    }
    log.info("String_Node_Str" + virtCf + "String_Node_Str");
    DboTableMeta table=lookup.find(DboTableMeta.class,virtCf);
    if (table == null)     throw new IllegalArgumentException("String_Node_Str" + virtCf + "String_Node_Str");
    String realCf=table.getRealColumnFamily();
    Info info=cfNameToCassandra.get(realCf);
    if (info != null) {
      log.info("String_Node_Str" + virtCf + "String_Node_Str"+ realCf+ "String_Node_Str");
      String cfLowercase=realCf.toLowerCase();
      virtualToCfName.put(virtCf,cfLowercase);
      return info;
    }
    waitForNodesToBeUpToDate(null,300000);
    KeyspaceDefinition keySpaceMeta=keyspace.describeKeyspace();
    ColumnFamilyDefinition def=keySpaceMeta.getColumnFamily(realCf);
    if (def == null) {
      log.info("String_Node_Str" + realCf + "String_Node_Str"+ virtCf+ "String_Node_Str");
      return null;
    }
    log.info("String_Node_Str" + realCf + "String_Node_Str"+ virtCf+ "String_Node_Str");
    loadColumnFamily(def,virtCf,realCf);
    return lookupVirtCf(virtCf);
  }
}

Fixed version (ground truth):
private Info tryToLoadColumnFamilyImpl(String virtCf,MetaLookup lookup) throws ConnectionException {
synchronized (virtCf.intern()) {
    log.info("String_Node_Str" + virtCf + "String_Node_Str");
    String cfName=virtualToCfName.get(virtCf);
    if (cfName != null) {
      Info info=cfNameToCassandra.get(cfName);
      if (info != null) {
        log.info("String_Node_Str" + virtCf + "String_Node_Str"+ cfName+ "String_Node_Str");
        return cfNameToCassandra.get(cfName);
      }
    }
    DboTableMeta table=loadFromInMemoryOrDb(virtCf,lookup);
    String realCf=table.getRealColumnFamily();
    String realCfLower=realCf.toLowerCase();
    Info info=cfNameToCassandra.get(realCfLower);
    if (info != null) {
      log.info("String_Node_Str" + virtCf + "String_Node_Str"+ realCf+ "String_Node_Str");
      String cfLowercase=realCf.toLowerCase();
      virtualToCfName.put(virtCf,cfLowercase);
      return info;
    }
    waitForNodesToBeUpToDate(null,300000);
    KeyspaceDefinition keySpaceMeta=keyspace.describeKeyspace();
    ColumnFamilyDefinition def=keySpaceMeta.getColumnFamily(realCf);
    if (def == null) {
      log.info("String_Node_Str" + realCf + "String_Node_Str"+ virtCf+ "String_Node_Str");
      return null;
    }
    log.info("String_Node_Str" + realCf + "String_Node_Str"+ virtCf+ "String_Node_Str");
    loadColumnFamily(def,virtCf,realCf);
    return lookupVirtCf(virtCf);
  }
}
Program: 97928
Project: 97928
Buggy source:
private synchronized void createColFamilyImpl(String virtualCf,MetaLookup ormSession){
  if (lookupVirtCf(virtualCf) != null)   return;
  String keysp=keyspace.getKeyspaceName();
  log.info("String_Node_Str" + virtualCf + "String_Node_Str"+ keysp);
  DboTableMeta meta=ormSession.find(DboTableMeta.class,virtualCf);
  if (meta == null) {
    throw new IllegalStateException("String_Node_Str" + virtualCf + "String_Node_Str"+ "String_Node_Str");
  }
  log.info("String_Node_Str" + meta.getRealColumnFamily() + "String_Node_Str"+ meta.getRealVirtual()+ "String_Node_Str");
  createColFamilyInCassandra(meta);
}

Fixed version (ground truth):
private synchronized void createColFamilyImpl(String virtualCf,MetaLookup ormSession){
  if (lookupVirtCf(virtualCf) != null)   return;
  String keysp=keyspace.getKeyspaceName();
  log.info("String_Node_Str" + virtualCf + "String_Node_Str"+ keysp);
  DboTableMeta meta=loadFromInMemoryOrDb(virtualCf,ormSession);
  log.info("String_Node_Str" + meta.getRealColumnFamily() + "String_Node_Str"+ meta.getRealVirtual()+ "String_Node_Str");
  createColFamilyInCassandra(meta);
}
Program: 97929
Project: 97929
Buggy source:
public static Config getConfigForAllTests(){
  String clusterName="String_Node_Str";
  DbTypeEnum serverType=DbTypeEnum.IN_MEMORY;
  String seeds="String_Node_Str";
  return new Config(serverType,clusterName,seeds);
}

Fixed version (ground truth):
public static Config getConfigForAllTests(){
  String clusterName="String_Node_Str";
  DbTypeEnum serverType=DbTypeEnum.CASSANDRA;
  String seeds="String_Node_Str";
  return new Config(serverType,clusterName,seeds);
}
Program: 97930
Project: 97930
Buggy source:
public MetaField processManyToMany(MetaClassSingle<?> metaClass,DboTableMeta t,Field field){
  NoSqlOneToMany annotation=field.getAnnotation(NoSqlOneToMany.class);
  String colName=annotation.columnName();
  Class entityType=annotation.entityType();
  String keyFieldForMap=annotation.keyFieldForMap();
  return processToManyRelationship(metaClass,t,field,colName,entityType,keyFieldForMap);
}

Fixed version (ground truth):
public MetaField processManyToMany(MetaClassSingle<?> metaClass,DboTableMeta t,Field field){
  NoSqlManyToMany annotation=field.getAnnotation(NoSqlManyToMany.class);
  String colName=annotation.columnName();
  Class entityType=annotation.entityType();
  String keyFieldForMap=annotation.keyFieldForMap();
  return processToManyRelationship(metaClass,t,field,colName,entityType,keyFieldForMap);
}
Program: 97932
Project: 97932
Buggy source:
public synchronized static NoSqlEntityManagerFactory createFactoryOnce(){
  if (factory == null) {
    String clusterName="String_Node_Str";
    DbTypeEnum serverType=DbTypeEnum.CASSANDRA;
    String seeds="String_Node_Str";
    createFactory(serverType,clusterName,seeds);
  }
  return factory;
}

Fixed version (ground truth):
public synchronized static NoSqlEntityManagerFactory createFactoryOnce(){
  if (factory == null) {
    String clusterName="String_Node_Str";
    DbTypeEnum serverType=DbTypeEnum.IN_MEMORY;
    String seeds="String_Node_Str";
    createFactory(serverType,clusterName,seeds);
  }
  return factory;
}
Program: 97933
Project: 97933
Buggy source:
@Override public com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> nextImpl(){
  loadCache();
  if (!cachedRows.hasNext())   return null;
  return new Holder<KeyValue<Row>>(cachedRows.next());
}

Fixed version (ground truth):
@Override public com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> nextImpl(){
  loadCache();
  if (cachedRows == null || !cachedRows.hasNext())   return null;
  return new Holder<KeyValue<Row>>(cachedRows.next());
}
Program: 97935
Project: 97935
Buggy source:
public CursorReturnsEmptyRows(Iterable<byte[]> keys){
  this.keysIterable=keys;
}

Fixed version (ground truth):
public CursorReturnsEmptyRows(Iterable<byte[]> keys){
  this.keysIterable=keys;
  beforeFirst();
}
Program: 97936
Project: 97936
Buggy source:
/** 
 * Gets the Resource iterator for URL with Filter.
 * @param url
 * @param filter
 * @return
 * @throws IOException
 */
private ResourceIterator getResourceIterator(URL url2,Filter filter) throws IOException {
  URL url=url2;
  String urlString=url.toString();
  if (urlString.endsWith("String_Node_Str")) {
    urlString=urlString.substring(4);
    urlString=urlString.substring(0,urlString.length() - 2);
    url=new URL(urlString);
  }
  if (!urlString.endsWith("String_Node_Str")) {
    return new JarFileIterator(url.openStream(),filter);
  }
 else {
    if (!url.getProtocol().equals("String_Node_Str")) {
      throw new IOException("String_Node_Str" + url.getProtocol());
    }
    File f=new File(url.getPath());
    if (f.isDirectory()) {
      return new ClassFileIterator(f,filter);
    }
 else {
      return new JarFileIterator(url.openStream(),filter);
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets the Resource iterator for URL with Filter.
 * @param url
 * @param filter
 * @return
 * @throws IOException
 */
private ResourceIterator getResourceIterator(URL resource,Filter filter) throws IOException {
  URL url=resource;
  String urlString=url.toString();
  if (urlString.endsWith("String_Node_Str")) {
    urlString=urlString.substring(4);
    urlString=urlString.substring(0,urlString.length() - 2);
    url=new URL(urlString);
    return new JarFileIterator(url.openStream(),filter);
  }
 else   if (url.getProtocol().equals("String_Node_Str")) {
    String path=url.getPath();
    String newPath=path.replace((CharSequence)"String_Node_Str","String_Node_Str");
    File f=new File(newPath);
    Log.info("String_Node_Str" + f.getAbsolutePath());
    if (f.isDirectory()) {
      return new ClassFileIterator(f,filter);
    }
 else {
      throw new RuntimeException("String_Node_Str" + f.getAbsolutePath());
    }
  }
 else {
    throw new IOException("String_Node_Str" + resource.getProtocol());
  }
}
Program: 97937
Project: 97937
Buggy source:
private RowQuery createBasicRowQuery(byte[] rowKey,Info info1,ByteBufferRange range){
  ColumnFamily cf=info1.getColumnFamilyObj();
  Keyspace keyspace=columnFamilies.getKeyspace();
  ColumnFamilyQuery query=keyspace.prepareQuery(cf);
  RowQuery rowQuery=query.getKey(rowKey).autoPaginate(true).withColumnRange(range);
  return rowQuery;
}

Fixed version (ground truth):
private RowQuery createBasicRowQuery(byte[] rowKey,Info info1,ByteBufferRange range){
  ColumnFamily cf=info1.getColumnFamilyObj();
  Keyspace keyspace=columnFamilies.getKeyspace();
  ColumnFamilyQuery query1=keyspace.prepareQuery(cf);
  ColumnFamilyQuery query=query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
  RowQuery rowQuery=query.getKey(rowKey).autoPaginate(true).withColumnRange(range);
  return rowQuery;
}
Program: 97938
Project: 97938
Buggy source:
public void sendChangesImpl(List<Action> actions,NoSqlEntityManager mgr) throws ConnectionException {
  Keyspace keyspace=columnFamilies.getKeyspace();
  MutationBatch m=keyspace.prepareMutationBatch();
  for (  Action action : actions) {
    if (action instanceof Persist) {
      persist((Persist)action,mgr,m);
    }
 else     if (action instanceof Remove) {
      remove((Remove)action,m);
    }
 else     if (action instanceof PersistIndex) {
      persistIndex((PersistIndex)action,mgr,m);
    }
 else     if (action instanceof RemoveIndex) {
      removeIndex((RemoveIndex)action,m);
    }
  }
  long time=System.currentTimeMillis();
  m.execute();
  if (log.isInfoEnabled()) {
    long total=System.currentTimeMillis() - time;
    log.info("String_Node_Str" + total + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void sendChangesImpl(List<Action> actions,NoSqlEntityManager mgr) throws ConnectionException {
  Keyspace keyspace=columnFamilies.getKeyspace();
  MutationBatch m1=keyspace.prepareMutationBatch();
  MutationBatch m=m1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
  for (  Action action : actions) {
    if (action instanceof Persist) {
      persist((Persist)action,mgr,m);
    }
 else     if (action instanceof Remove) {
      remove((Remove)action,m);
    }
 else     if (action instanceof PersistIndex) {
      persistIndex((PersistIndex)action,mgr,m);
    }
 else     if (action instanceof RemoveIndex) {
      removeIndex((RemoveIndex)action,m);
    }
  }
  long time=System.currentTimeMillis();
  m.execute();
  if (log.isInfoEnabled()) {
    long total=System.currentTimeMillis() - time;
    log.info("String_Node_Str" + total + "String_Node_Str");
  }
}
Program: 97939
Project: 97939
Buggy source:
private Iterable<KeyValue<Row>> findImpl2(String colFamily,Iterable<byte[]> keys) throws ConnectionException {
  Info info=columnFamilies.fetchColumnFamilyInfo(colFamily);
  if (info == null) {
    log.info("String_Node_Str" + colFamily);
    for (    byte[] k : keys) {
      log.trace("String_Node_Str");
    }
    return new IterableReturnsEmptyRows(keys);
  }
  ColumnFamily cf=info.getColumnFamilyObj();
  ColumnType type=info.getColumnType();
  if (type != ColumnType.ANY_EXCEPT_COMPOSITE) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  Keyspace keyspace=columnFamilies.getKeyspace();
  ColumnFamilyQuery<byte[],byte[]> query=keyspace.prepareQuery(cf);
  RowSliceQuery<byte[],byte[]> slice=query.getKeySlice(keys);
  long time=System.currentTimeMillis();
  OperationResult<Rows<byte[],byte[]>> result=slice.execute();
  if (log.isInfoEnabled()) {
    long total=System.currentTimeMillis() - time;
    log.info("String_Node_Str" + total + "String_Node_Str");
  }
  Rows rows=result.getResult();
  IterableResult r=new IterableResult(rowProvider,rows);
  return r;
}

Fixed version (ground truth):
private Iterable<KeyValue<Row>> findImpl2(String colFamily,Iterable<byte[]> keys) throws ConnectionException {
  Info info=columnFamilies.fetchColumnFamilyInfo(colFamily);
  if (info == null) {
    log.info("String_Node_Str" + colFamily);
    for (    byte[] k : keys) {
      log.trace("String_Node_Str");
    }
    return new IterableReturnsEmptyRows(keys);
  }
  ColumnFamily cf=info.getColumnFamilyObj();
  ColumnType type=info.getColumnType();
  if (type != ColumnType.ANY_EXCEPT_COMPOSITE) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  Keyspace keyspace=columnFamilies.getKeyspace();
  ColumnFamilyQuery<byte[],byte[]> query1=keyspace.prepareQuery(cf);
  ColumnFamilyQuery<byte[],byte[]> q2=query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
  RowSliceQuery<byte[],byte[]> slice=q2.getKeySlice(keys);
  long time=System.currentTimeMillis();
  OperationResult<Rows<byte[],byte[]>> result=slice.execute();
  if (log.isInfoEnabled()) {
    long total=System.currentTimeMillis() - time;
    log.info("String_Node_Str" + total + "String_Node_Str");
  }
  Rows rows=result.getResult();
  IterableResult r=new IterableResult(rowProvider,rows);
  return r;
}
Program: 97940
Project: 97940
Buggy source:
public Info fetchColumnFamilyInfo(String colFamily){
  String cf=colFamily.toLowerCase();
  Info info=existingColumnFamilies2.get(cf);
  return info;
}

Fixed version (ground truth):
public Info fetchColumnFamilyInfo(String colFamily){
  String cf=colFamily.toLowerCase();
  Info info=existingColumnFamilies2.get(cf);
  if (info == null) {
    info=tryToLoadColumnFamily(colFamily);
  }
  return info;
}
Program: 97941
Project: 97941
Buggy source:
private void findExistingColumnFamilies(KeyspaceDefinition keySpaceMeta){
  List<ColumnFamilyDefinition> cfList=keySpaceMeta.getColumnFamilyList();
  for (  ColumnFamilyDefinition def : cfList) {
    String comparatorType=def.getComparatorType();
    ColumnType type=ColumnType.ANY_EXCEPT_COMPOSITE;
    if (formName(UTF8Type.class,BytesType.class).equals(comparatorType)) {
      type=ColumnType.COMPOSITE_STRINGPREFIX;
    }
 else     if (formName(IntegerType.class,BytesType.class).equals(comparatorType)) {
      type=ColumnType.COMPOSITE_INTEGERPREFIX;
    }
 else     if (formName(DecimalType.class,BytesType.class).equals(comparatorType)) {
      type=ColumnType.COMPOSITE_DECIMALPREFIX;
    }
    String keyValidationClass=def.getKeyValidationClass();
    StorageTypeEnum keyType=null;
    if (UTF8Type.class.getName().equals(keyValidationClass)) {
      keyType=StorageTypeEnum.STRING;
    }
 else     if (DecimalType.class.getName().equals(keyValidationClass)) {
      keyType=StorageTypeEnum.DECIMAL;
    }
 else     if (IntegerType.class.getName().equals(keyValidationClass)) {
      keyType=StorageTypeEnum.INTEGER;
    }
 else     if (BytesType.class.getName().equals(keyValidationClass)) {
      keyType=StorageTypeEnum.BYTES;
    }
    String colFamily=def.getName();
    Info info=createInfo(colFamily,type,keyType);
    String lowerCaseName=colFamily.toLowerCase();
    existingColumnFamilies2.put(lowerCaseName,info);
  }
}

Fixed version (ground truth):
private void findExistingColumnFamilies(KeyspaceDefinition keySpaceMeta){
  List<ColumnFamilyDefinition> cfList=keySpaceMeta.getColumnFamilyList();
  for (  ColumnFamilyDefinition def : cfList) {
    loadColumnFamily(def);
  }
}
Program: 97942
Project: 97942
Buggy source:
private synchronized void createColFamily(String colFamily,NoSqlEntityManager mgr){
  if (existingColumnFamilies2.get(colFamily.toLowerCase()) != null)   return;
  log.info("String_Node_Str" + colFamily + "String_Node_Str");
  DboTableMeta cf=dbMetaFromOrmOnly.getMeta(colFamily);
  if (cf == null) {
    cf=mgr.find(DboTableMeta.class,colFamily);
    log.info("String_Node_Str" + cf);
  }
  if (cf == null) {
    throw new IllegalStateException("String_Node_Str" + colFamily + "String_Node_Str"+ "String_Node_Str");
  }
  ColumnFamilyDefinition def=cluster.makeColumnFamilyDefinition().setName(colFamily).setKeyspace(keyspace.getKeyspaceName());
  StorageTypeEnum rowKeyType=cf.getIdColumnMeta().getStorageType();
  StorageTypeEnum type=cf.getColNamePrefixType();
  def=addRowKeyValidation(cf,def);
  def=setColumnNameCompareType(cf,type,def);
  ColumnType colType=ColumnType.ANY_EXCEPT_COMPOSITE;
  if (type == StorageTypeEnum.STRING)   colType=ColumnType.COMPOSITE_STRINGPREFIX;
 else   if (type == StorageTypeEnum.INTEGER)   colType=ColumnType.COMPOSITE_INTEGERPREFIX;
 else   if (type == StorageTypeEnum.DECIMAL)   colType=ColumnType.COMPOSITE_DECIMALPREFIX;
  addColumnFamily(def);
  Info info=createInfo(colFamily,colType,rowKeyType);
  String cfName=colFamily.toLowerCase();
  existingColumnFamilies2.put(cfName,info);
}

Fixed version (ground truth):
private synchronized void createColFamily(String colFamily,NoSqlEntityManager mgr){
  try {
    createColFamilyImpl(colFamily,mgr);
  }
 catch (  Exception e) {
    log.warn("String_Node_Str",e);
  }
}