Program: 97868
Project: 97868
Buggy source:
public void reindex(String cmd,NoSqlEntityManager mgr){
  String oldCommand=cmd.substring(8);
  String command=oldCommand.trim();
  ColFamilyData data=parseData(mgr,command);
  NoSqlTypedSession s=mgr.getTypedSession();
  String cf=data.getColFamily();
  String field=data.getColumn();
  String by=data.getPartitionBy();
  String id=data.getPartitionId();
  Cursor<IndexPoint> indexView=s.indexView(cf,field,by,id);
  Cursor<IndexPoint> indexView2=s.indexView(cf,field,by,id);
  DboTableMeta meta=data.getTableMeta();
  DboColumnMeta colMeta=data.getColumnMeta();
  System.out.println("String_Node_Str" + colMeta.getStorageType());
  System.out.println("String_Node_Str" + meta.getIdColumnMeta().getStorageType());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  int totalChanges=0;
  int rowCountProcessed=0;
  while (true) {
    Map<Object,KeyValue<TypedRow>> keyToRow=findNextSetOfData(s,cf,indexView);
    rowCountProcessed+=keyToRow.size();
    if (keyToRow.size() == 0) {
      break;
    }
    Counter c=processAllColumns(s,data,keyToRow,indexView2);
    totalChanges+=c.getChangedCounter();
    if (rowCountProcessed % 1000 == 0) {
      System.out.println("String_Node_Str" + rowCountProcessed + "String_Node_Str"+ totalRowCount+ "String_Node_Str"+ totalChanges);
    }
  }
  System.out.println("String_Node_Str" + rowCountProcessed + "String_Node_Str"+ totalRowCount+ "String_Node_Str"+ totalChanges);
}

Fixed version (ground truth):
public void reindex(String cmd,NoSqlEntityManager mgr){
  String oldCommand=cmd.substring(8);
  String command=oldCommand.trim();
  ColFamilyData data=parseData(mgr,command);
  NoSqlTypedSession s=mgr.getTypedSession();
  String cf=data.getColFamily();
  String field=data.getColumn();
  String by=data.getPartitionBy();
  String id=data.getPartitionId();
  DboTableMeta meta=data.getTableMeta();
  DboColumnMeta colMeta=data.getColumnMeta();
  if (!colMeta.isIndexed()) {
    System.out.println("String_Node_Str" + field + "String_Node_Str");
    ScanInfo info=ScanInfo.createScanInfo(colMeta,by,id);
    DboTableMeta indexTableMeta=mgr.find(DboTableMeta.class,info.getIndexColFamily());
    System.out.println("String_Node_Str");
    mgr.getSession().remove(indexTableMeta,info.getRowKey());
    s.flush();
    return;
  }
  Cursor<IndexPoint> indexView=s.indexView(cf,field,by,id);
  Cursor<IndexPoint> indexView2=s.indexView(cf,field,by,id);
  System.out.println("String_Node_Str" + colMeta.getStorageType());
  System.out.println("String_Node_Str" + meta.getIdColumnMeta().getStorageType());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  int totalChanges=0;
  int rowCountProcessed=0;
  while (true) {
    Map<Object,KeyValue<TypedRow>> keyToRow=findNextSetOfData(s,cf,indexView);
    rowCountProcessed+=keyToRow.size();
    if (keyToRow.size() == 0) {
      break;
    }
    Counter c=processAllColumns(s,data,keyToRow,indexView2);
    totalChanges+=c.getChangedCounter();
    if (rowCountProcessed % 1000 == 0) {
      System.out.println("String_Node_Str" + rowCountProcessed + "String_Node_Str"+ totalRowCount+ "String_Node_Str"+ totalChanges);
    }
  }
  System.out.println("String_Node_Str" + rowCountProcessed + "String_Node_Str"+ totalRowCount+ "String_Node_Str"+ totalChanges);
}