nus-yam/ex-repair huggingface dataset:
Program: 18512
Project: 18512
Buggy source:
public CassandraConnectionInfo(String clusterName,String hostAdress,String port,String keySpaceName){
  cluster=HFactory.getOrCreateCluster(clusterName,hostAdress);
  keyspace=HFactory.createKeyspace(keySpaceName,cluster);
}

Fixed version (ground truth):
/** 
 * Instantiates a new cassandra connection info.
 * @param clusterName the cluster name
 * @param hostAdress the host adress
 * @param port the port
 * @param keySpaceName the key space name
 */
public CassandraConnectionInfo(String clusterName,String hostAdress,String port,String keySpaceName){
  cluster=HFactory.getOrCreateCluster(clusterName,hostAdress);
  keyspace=HFactory.createKeyspace(keySpaceName,cluster);
}
Program: 18513
Project: 18513
Buggy source:
public Cluster getCluster(){
  return cluster;
}

Fixed version (ground truth):
/** 
 * Gets the cluster.
 * @return the cluster
 */
public Cluster getCluster(){
  return cluster;
}
Program: 18514
Project: 18514
Buggy source:
public Keyspace getKeyspace(){
  return keyspace;
}

Fixed version (ground truth):
/** 
 * Gets the keyspace.
 * @return the keyspace
 */
public Keyspace getKeyspace(){
  return keyspace;
}
Program: 18515
Project: 18515
Buggy source:
public CassandraObject(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super();
  this.startTime=startTime;
  this.endTime=endTime;
  this.connectionInfo=connectionInfo;
}

Fixed version (ground truth):
/** 
 * Instantiates a new cassandra object.
 * @param startTime the start time
 * @param endTime the end time
 * @param connectionInfo the connection info
 */
public CassandraObject(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super();
  this.startTime=startTime;
  this.endTime=endTime;
  this.connectionInfo=connectionInfo;
}
Program: 18516
Project: 18516
Buggy source:
public ColumnFamilyReader(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super(startTime,endTime,connectionInfo);
}

Fixed version (ground truth):
/** 
 * Instantiates a new column family reader.
 * @param startTime the start time
 * @param endTime the end time
 * @param connectionInfo the connection info
 */
public ColumnFamilyReader(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super(startTime,endTime,connectionInfo);
}
Program: 18517
Project: 18517
Buggy source:
public abstract Map<KeyType,AggregationData<KeyType>> readData();

Fixed version (ground truth):
/** 
 * Read data.
 * @return the map
 */
public abstract Map<KeyType,AggregationData<KeyType>> readData();
Program: 18518
Project: 18518
Buggy source:
public abstract List<KeyType> retrieveKeysInRange();

Fixed version (ground truth):
/** 
 * Retrieve keys in range.
 * @return the list
 */
public abstract List<KeyType> retrieveKeysInRange();
Program: 18519
Project: 18519
Buggy source:
public KeyType getKey(){
  return key;
}

Fixed version (ground truth):
/** 
 * Gets the key.
 * @return the key
 */
public KeyType getKey(){
  return key;
}
Program: 18520
Project: 18520
Buggy source:
public void addColumn(Object columnKey,Object columnValue){
  this.columns.put(columnKey,columnValue);
}

Fixed version (ground truth):
/** 
 * Adds the column.
 * @param columnKey the column key
 * @param columnValue the column value
 */
public void addColumn(Object columnKey,Object columnValue){
  this.columns.put(columnKey,columnValue);
}
Program: 18521
Project: 18521
Buggy source:
public Object getValue(Object columnKey){
  return this.columns.get(columnKey);
}

Fixed version (ground truth):
/** 
 * Gets the value.
 * @param columnKey the column key
 * @return the value
 */
public Object getValue(Object columnKey){
  return this.columns.get(columnKey);
}
Program: 18522
Project: 18522
Buggy source:
public boolean contains(Object columnKey){
  return this.columns.containsKey(columnKey);
}

Fixed version (ground truth):
/** 
 * Contains.
 * @param columnKey the column key
 * @return true, if successful
 */
public boolean contains(Object columnKey){
  return this.columns.containsKey(columnKey);
}
Program: 18523
Project: 18523
Buggy source:
public int size(){
  return this.columns.size();
}

Fixed version (ground truth):
/** 
 * Size.
 * @return the int
 */
public int size(){
  return this.columns.size();
}
Program: 18524
Project: 18524
Buggy source:
public AggregationData(KeyType key){
  this(key,new HashMap<Object,Object>());
}

Fixed version (ground truth):
/** 
 * Instantiates a new aggregation data.
 * @param key the key
 */
public AggregationData(KeyType key){
  this(key,new HashMap<Object,Object>());
}
Program: 18525
Project: 18525
Buggy source:
public Map<Object,Object> getColumns(){
  return columns;
}

Fixed version (ground truth):
/** 
 * Gets the columns.
 * @return the columns
 */
public Map<Object,Object> getColumns(){
  return columns;
}
Program: 18526
Project: 18526
Buggy source:
@Override public Map<String,AggregationData<String>> readData(){
  Map<String,AggregationData<String>> result=new HashMap<String,AggregationData<String>>();
  try {
    List<String> keysToRead=retrieveKeysInRange();
    MultigetSliceQuery<String,Long,String> multigetSliceQuery=HFactory.createMultigetSliceQuery(connectionInfo.getKeyspace(),STR_SERIALIZER,LONG_SERIALIZER,STR_SERIALIZER);
    multigetSliceQuery.setColumnFamily(columnFamilyName);
    multigetSliceQuery.setKeys(keysToRead);
    multigetSliceQuery.setRange(startTime.getTime(),endTime.getTime(),false,ROWS_NUMBER_MAX_VALUE);
    QueryResult<Rows<String,Long,String>> queryResult=multigetSliceQuery.execute();
    if (queryResult != null) {
      for (      Row<String,Long,String> row : queryResult.get()) {
        AggregationData<String> rowData=new AggregationData<String>(row.getKey());
        for (        HColumn<Long,String> column : row.getColumnSlice().getColumns()) {
          rowData.addColumn(column.getName(),column.getValue());
        }
        result.put(row.getKey(),rowData);
      }
    }
 else {
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getCause() != null) {
      e.getCause().printStackTrace();
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Map<String,AggregationData<String>> readData(){
  Map<String,AggregationData<String>> result=new HashMap<String,AggregationData<String>>();
  try {
    List<String> keysToRead=retrieveKeysInRange();
    MultigetSliceQuery<String,Long,String> multigetSliceQuery=HFactory.createMultigetSliceQuery(connectionInfo.getKeyspace(),STR_SERIALIZER,LONG_SERIALIZER,STR_SERIALIZER);
    multigetSliceQuery.setColumnFamily(columnFamilyName);
    multigetSliceQuery.setKeys(keysToRead);
    multigetSliceQuery.setRange(startTime.getTime(),endTime.getTime(),false,ROWS_NUMBER_MAX_VALUE);
    QueryResult<Rows<String,Long,String>> queryResult=multigetSliceQuery.execute();
    if (queryResult != null) {
      for (      Row<String,Long,String> row : queryResult.get()) {
        AggregationData<String> rowData=new AggregationData<String>(row.getKey());
        for (        HColumn<Long,String> column : row.getColumnSlice().getColumns()) {
          rowData.addColumn(column.getName(),column.getValue());
        }
        result.put(row.getKey(),rowData);
      }
    }
 else {
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getCause() != null) {
      e.getCause().printStackTrace();
    }
  }
  return result;
}
Program: 18527
Project: 18527
Buggy source:
@Override public List<String> retrieveKeysInRange(){
  List<String> rowKeys=new ArrayList<String>();
  try {
    RangeSlicesQuery<String,Long,String> rangeSlicesQuery=HFactory.createRangeSlicesQuery(connectionInfo.getKeyspace(),STR_SERIALIZER,LONG_SERIALIZER,STR_SERIALIZER);
    rangeSlicesQuery.setColumnFamily(columnFamilyName);
    rangeSlicesQuery.setKeys(null,null);
    rangeSlicesQuery.setReturnKeysOnly();
    rangeSlicesQuery.setRange(startTime.getTime(),endTime.getTime(),false,ROWS_NUMBER_MAX_VALUE);
    rangeSlicesQuery.setRowCount(ROWS_NUMBER_MAX_VALUE);
    QueryResult<OrderedRows<String,Long,String>> result=rangeSlicesQuery.execute();
    OrderedRows<String,Long,String> orderedRows=result.get();
    for (    Row<String,Long,String> row : orderedRows) {
      if (!row.getColumnSlice().getColumns().isEmpty()) {
        rowKeys.add(row.getKey());
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getCause() != null) {
      e.getCause().printStackTrace();
    }
  }
  return rowKeys;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public List<String> retrieveKeysInRange(){
  List<String> rowKeys=new ArrayList<String>();
  try {
    RangeSlicesQuery<String,Long,String> rangeSlicesQuery=HFactory.createRangeSlicesQuery(connectionInfo.getKeyspace(),STR_SERIALIZER,LONG_SERIALIZER,STR_SERIALIZER);
    rangeSlicesQuery.setColumnFamily(columnFamilyName);
    rangeSlicesQuery.setKeys(null,null);
    rangeSlicesQuery.setReturnKeysOnly();
    rangeSlicesQuery.setRange(startTime.getTime(),endTime.getTime(),false,ROWS_NUMBER_MAX_VALUE);
    rangeSlicesQuery.setRowCount(ROWS_NUMBER_MAX_VALUE);
    QueryResult<OrderedRows<String,Long,String>> result=rangeSlicesQuery.execute();
    OrderedRows<String,Long,String> orderedRows=result.get();
    for (    Row<String,Long,String> row : orderedRows) {
      if (!row.getColumnSlice().getColumns().isEmpty()) {
        rowKeys.add(row.getKey());
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getCause() != null) {
      e.getCause().printStackTrace();
    }
  }
  return rowKeys;
}
Program: 18528
Project: 18528
Buggy source:
public AbstractErrorCountsReader(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super(startTime,endTime,connectionInfo);
}

Fixed version (ground truth):
/** 
 * Instantiates a new abstract error counts reader.
 * @param startTime the start time
 * @param endTime the end time
 * @param connectionInfo the connection info
 */
public AbstractErrorCountsReader(Date startTime,Date endTime,CassandraConnectionInfo connectionInfo){
  super(startTime,endTime,connectionInfo);
}
Program: 18530
Project: 18530
Buggy source:
/** 
 * Transform aggregated error values.
 * @param rows the rows
 * @return the map
 */
private Map<String,Map<String,Object>> transformAggregatedErrorValues(List<Map<String,Object>> rows){
  Map<String,Map<String,Object>> result=new HashMap<String,Map<String,Object>>();
  for (  Map<String,Object> row : rows) {
    long errorId=(Long)row.get("String_Node_Str");
    result.put(String.valueOf(errorId),row);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Transform aggregated error values.
 * @param rows the rows
 * @return the map
 */
private Map<String,Map<String,Object>> transformAggregatedErrorValues(List<Map<String,Object>> rows){
  Map<String,Map<String,Object>> result=new HashMap<String,Map<String,Object>>();
  for (  Map<String,Object> row : rows) {
    long errorId=(Long)row.get("String_Node_Str");
    if (result.containsKey(String.valueOf(errorId))) {
      Map<String,Object> oldRow=result.get(String.valueOf(errorId));
      Long oldErrorCount=(Long)oldRow.get("String_Node_Str");
      oldErrorCount+=(Long)row.get("String_Node_Str");
      oldRow.put("String_Node_Str",oldErrorCount);
    }
 else {
      result.put(String.valueOf(errorId),row);
    }
  }
  return result;
}
Program: 18533
Project: 18533
Buggy source:
/** 
 * {@inheritDoc}
 */
public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<String> errorKeys=KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItemsWithStringColumnValues((List<K>)errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      String errorValueKey=findItemSet2.getValue();
      ErrorValue errorValue=errorValuesDaoImpl.find(errorValueKey);
      row.put((K)"String_Node_Str",errorByIdDaoImpl.findCountByTimeRange(errorValue.getErrorId(),beginTime,endTime));
      row.put((K)"String_Node_Str",errorValue.getErrorId());
      row.put((K)"String_Node_Str",errorValue.getName());
      if (filters.get(ResourceEntity.CONSUMER.value()) != null) {
        row.put((K)"String_Node_Str",errorValue.getConsumerName());
      }
      row.put((K)"String_Node_Str",errorValue.isServerSide());
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<String> errorKeys=KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItemsWithStringColumnValues((List<K>)errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      String errorValueKey=findItemSet2.getValue();
      ErrorValue errorValue=errorValuesDaoImpl.find(errorValueKey);
      row.put((K)"String_Node_Str",1L);
      row.put((K)"String_Node_Str",errorValue.getErrorId());
      row.put((K)"String_Node_Str",errorValue.getName());
      if (filters.get(ResourceEntity.CONSUMER.value()) != null) {
        row.put((K)"String_Node_Str",errorValue.getConsumerName());
      }
      row.put((K)"String_Node_Str",errorValue.isServerSide());
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}
Program: 18541
Project: 18541
Buggy source:
public Map<String,List<MetricValue<?>>> findMetricValuesByOperation(String metricName,long firstStartTime,long l,boolean serverSide,int aggregationPeriod,Map<String,List<String>> filters) throws ServiceException ;

Fixed version (ground truth):
public Map<String,List<MetricValue<?>>> findMetricValuesByOperation(List<String> ipaddressList,String metricName,long firstStartTime,long l,boolean serverSide,int aggregationPeriod,Map<String,List<String>> filters) throws ServiceException ;
Program: 18543
Project: 18543
Buggy source:
/** 
 * Creates the metric time series key.
 * @param metricName the metric name
 * @param serviceName the service name
 * @param operationName the operation name
 * @param snapshotInterval the snapshot interval
 * @param isServerSide the is server side
 * @return the string
 * @throws ServiceException the service exception
 */
private String createMetricTimeSeriesKey(String metricName,String serviceName,String operationName,int snapshotInterval,boolean isServerSide) throws ServiceException {
  String ipAddress=getIPAddress();
  return ipAddress + KEY_SEPARATOR + serviceName+ KEY_SEPARATOR+ operationName+ KEY_SEPARATOR+ metricName+ KEY_SEPARATOR+ snapshotInterval+ KEY_SEPARATOR+ isServerSide;
}

Fixed version (ground truth):
/** 
 * Creates the metric time series key.
 * @param metricName the metric name
 * @param serviceName the service name
 * @param operationName the operation name
 * @param snapshotInterval the snapshot interval
 * @param isServerSide the is server side
 * @return the string
 * @throws ServiceException the service exception
 */
private String createMetricTimeSeriesKey(String ipAddress,String metricName,String serviceName,String operationName,int snapshotInterval,boolean isServerSide) throws ServiceException {
  return ipAddress + KEY_SEPARATOR + serviceName+ KEY_SEPARATOR+ operationName+ KEY_SEPARATOR+ metricName+ KEY_SEPARATOR+ snapshotInterval+ KEY_SEPARATOR+ isServerSide;
}
Program: 18545
Project: 18545
Buggy source:
/** 
 * Find metric values by consumer.
 * @param ipAddressList the ip address list
 * @param metricName the metric name
 * @param begin the begin
 * @param end the end
 * @param serverSide the server side
 * @param aggregationPeriod the aggregation period
 * @param serviceName the service name
 * @param operationNames the operation names
 * @param consumerNames the consumer names
 * @return the map
 * @throws ServiceException the service exception
 */
Map<String,List<MetricValue<?>>> findMetricValuesByConsumer(List<String> ipAddressList,String metricName,long begin,long end,boolean serverSide,int aggregationPeriod,String serviceName,List<String> operationNames,List<String> consumerNames) throws ServiceException ;

Fixed version (ground truth):
/** 
 * Find metric values by consumer.
 * @param ipAddressList the ip address list
 * @param metricName the metric name
 * @param begin the begin
 * @param end the end
 * @param serverSide the server side
 * @param aggregationPeriod the aggregation period
 * @param serviceName the service name
 * @param operationNames the operation names
 * @param consumerNames the consumer names
 * @return the mapString metricName,
 * @throws ServiceException the service exception
 */
Map<String,List<MetricValue<?>>> findMetricValuesByConsumer(List<String> ipAddressList,String metricName,long begin,long end,boolean serverSide,int aggregationPeriod,String serviceName,List<String> operationNames,List<String> consumerNames) throws ServiceException ;
Program: 18546
Project: 18546
Buggy source:
private double retrieveCallCounts(long startTime,long duration,double calls1){
  List<String> metricValuesList=new ArrayList<String>();
  List<?> valuesByIpAndDateList=metricValuesByIpAndDateDAO.findByRange(Long.valueOf(startTime),Long.valueOf(startTime + duration));
  for (  Object superModel : valuesByIpAndDateList) {
    Map<Long,Model> superColumns=((SuperModel<String,Long>)superModel).getColumns();
    for (    Entry<Long,Model> superColumn : superColumns.entrySet()) {
      Model<String> model=superColumn.getValue();
      Map<String,Object> columns=model.getColumns();
      for (      Entry<String,Object> column : columns.entrySet()) {
        if (column.getKey().contains(SystemMetricDefs.OP_TIME_TOTAL.getMetricName())) {
          metricValuesList.add(column.getKey());
        }
      }
    }
  }
  for (  String metricValueKey : metricValuesList) {
    org.ebayopensource.turmeric.monitoring.provider.model.MetricValue<?> metricValue=metricValuesDAO.find(metricValueKey);
    Map<String,Object> columns=metricValue.getColumns();
    if (columns != null && !columns.isEmpty()) {
      if (columns.containsKey("String_Node_Str")) {
        Object value=columns.get("String_Node_Str");
        if (value != null) {
          calls1=calls1 + Long.valueOf(value.toString());
        }
      }
    }
  }
  return calls1;
}

Fixed version (ground truth):
private double retrieveCallCounts(long startTime,long duration,double calls1){
  List<String> metricValuesList=new ArrayList<String>();
  List<?> valuesByIpAndDateList=metricValuesByIpAndDateDAO.findByRange(Long.valueOf(startTime),Long.valueOf(startTime + duration));
  for (  Object superModel : valuesByIpAndDateList) {
    Map<Long,Model> superColumns=((SuperModel<String,Long>)superModel).getColumns();
    for (    Entry<Long,Model> superColumn : superColumns.entrySet()) {
      Model<String> model=superColumn.getValue();
      Map<String,Object> columns=model.getColumns();
      for (      Entry<String,Object> column : columns.entrySet()) {
        if (column.getKey().contains(SystemMetricDefs.OP_TIME_TOTAL.getMetricName())) {
          metricValuesList.add(column.getKey());
        }
      }
    }
  }
  for (  String metricValueKey : metricValuesList) {
    org.ebayopensource.turmeric.monitoring.provider.model.MetricValue<?> metricValue=metricValuesDAO.find(metricValueKey);
    Map<String,Object> columns=metricValue.getColumns();
    if (columns != null && !columns.isEmpty()) {
      if (columns.containsKey("String_Node_Str")) {
        Object value=columns.get("String_Node_Str");
        if (value != null) {
          calls1=calls1 + (Long)value;
        }
      }
    }
  }
  return calls1;
}
Program: 18547
Project: 18547
Buggy source:
private Map<String,List<String>> populateFilters(final List<String> serviceNames,final List<String> operationNames,final List<String> consumerNames){
  Map<String,List<String>> filters=new HashMap<String,List<String>>();
  if (!serviceNames.isEmpty()) {
    filters.put(ResourceEntity.SERVICE.value(),serviceNames);
  }
  if (!operationNames.isEmpty()) {
    filters.put(ResourceEntity.OPERATION.value(),operationNames);
  }
  if (!consumerNames.isEmpty()) {
    filters.put(ResourceEntity.CONSUMER.value(),consumerNames);
  }
  return filters;
}

Fixed version (ground truth):
private Map<String,List<String>> populateFilters(final List<String> serviceNames,final List<String> operationNames,final List<String> consumerNames){
  Map<String,List<String>> filters=new HashMap<String,List<String>>();
  if (serviceNames != null && !serviceNames.isEmpty()) {
    filters.put(ResourceEntity.SERVICE.value(),serviceNames);
  }
  if (operationNames != null && !operationNames.isEmpty()) {
    filters.put(ResourceEntity.OPERATION.value(),operationNames);
  }
  if (consumerNames != null && !consumerNames.isEmpty()) {
    filters.put(ResourceEntity.CONSUMER.value(),consumerNames);
  }
  return filters;
}
Program: 18549
Project: 18549
Buggy source:
Error<?> find(K key);

Fixed version (ground truth):
public Error<?> find(K key);
Program: 18550
Project: 18550
Buggy source:
public BaseMetricsErrorsByFiltersDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO<String> errorValuesDaoImpl){
  super(clusterName,host,s_keyspace,kTypeClass,Model.class,columnFamilyName);
  this.errorValuesDaoImpl=errorValuesDaoImpl;
}

Fixed version (ground truth):
public BaseMetricsErrorsByFiltersDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO<String> errorValuesDaoImpl,final MetricsErrorByIdDAO<Long> errorByIdDaoImpl){
  super(clusterName,host,s_keyspace,kTypeClass,Model.class,columnFamilyName);
  this.errorValuesDaoImpl=errorValuesDaoImpl;
  this.errorByIdDaoImpl=errorByIdDaoImpl;
}
Program: 18551
Project: 18551
Buggy source:
public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<String> errorKeys=KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItemsWithStringColumnValues((List<K>)errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      String errorValueKey=findItemSet2.getValue();
      ErrorValue errorValue=errorValuesDaoImpl.find(errorValueKey);
      row.put((K)"String_Node_Str",200l);
      row.put((K)"String_Node_Str",errorValue.getErrorId());
      row.put((K)"String_Node_Str",errorValue.getName());
      if (filters.get(ResourceEntity.CONSUMER.value()) != null || !filters.get(ResourceEntity.CONSUMER.value()).isEmpty()) {
        row.put((K)"String_Node_Str",errorValue.getConsumerName());
      }
      row.put((K)"String_Node_Str",errorValue.isServerSide());
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}

Fixed version (ground truth):
public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<String> errorKeys=KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItemsWithStringColumnValues((List<K>)errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      String errorValueKey=findItemSet2.getValue();
      ErrorValue errorValue=errorValuesDaoImpl.find(errorValueKey);
      row.put((K)"String_Node_Str",errorByIdDaoImpl.findCountByTimeRange(errorValue.getErrorId(),beginTime,endTime));
      row.put((K)"String_Node_Str",errorValue.getErrorId());
      row.put((K)"String_Node_Str",errorValue.getName());
      if (filters.get(ResourceEntity.CONSUMER.value()) != null) {
        row.put((K)"String_Node_Str",errorValue.getConsumerName());
      }
      row.put((K)"String_Node_Str",errorValue.isServerSide());
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}
Program: 18552
Project: 18552
Buggy source:
@Override public MetricValue find(K key){
  SliceQuery<String,String,Object> query=HFactory.createSliceQuery(keySpace,StringSerializer.get(),StringSerializer.get(),ObjectSerializer.get());
  QueryResult<ColumnSlice<String,Object>> result=query.setColumnFamily(columnFamilyName).setKey((String)key).setRange("String_Node_Str","String_Node_Str",false,10).execute();
  try {
    if (result.get().getColumns().isEmpty()) {
      return null;
    }
  }
 catch (  Exception e) {
    return null;
  }
  try {
    MetricValue metricValue=new MetricValue<K>(key);
    Map<String,Object> columns=metricValue.getColumns();
    ColumnSlice<String,Object> queryResult=result.get();
    for (    HColumn<String,Object> column : queryResult.getColumns()) {
      Object val=column.getValue();
      columns.put(column.getName(),val);
    }
    return metricValue;
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public MetricValue find(K key){
  SliceQuery<String,String,Object> query=HFactory.createSliceQuery(keySpace,StringSerializer.get(),StringSerializer.get(),ObjectSerializer.get());
  QueryResult<ColumnSlice<String,Object>> result=query.setColumnFamily(columnFamilyName).setKey((String)key).setRange("String_Node_Str","String_Node_Str",false,10).execute();
  try {
    if (result.get().getColumns().isEmpty()) {
      return null;
    }
  }
 catch (  Exception e) {
    return null;
  }
  try {
    MetricValue metricValue=new MetricValue<K>(key);
    Map<String,Object> columns=metricValue.getColumns();
    ColumnSlice<String,Object> queryResult=result.get();
    for (    HColumn<String,Object> column : queryResult.getColumns()) {
      Object val=column.getValue();
      columns.put(column.getName(),val);
    }
    return metricValue;
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + key,e);
  }
}
Program: 18553
Project: 18553
Buggy source:
/** 
 * Instantiates a new metrics error dao impl.
 * @param clusterName the cluster name
 * @param host the host
 * @param s_keyspace the s_keyspace
 * @param columnFamilyName the column family name
 */
public MetricsErrorsByCategoryDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO<String> errorValuesDaoImpl){
  super(clusterName,host,s_keyspace,columnFamilyName,kTypeClass,errorValuesDaoImpl);
}

Fixed version (ground truth):
/** 
 * Instantiates a new metrics error dao impl.
 * @param clusterName the cluster name
 * @param host the host
 * @param s_keyspace the s_keyspace
 * @param columnFamilyName the column family name
 */
public MetricsErrorsByCategoryDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO<String> errorValuesDaoImpl,final MetricsErrorByIdDAO<Long> errorByIdDaoImpl){
  super(clusterName,host,s_keyspace,columnFamilyName,kTypeClass,errorValuesDaoImpl,errorByIdDaoImpl);
}
Program: 18554
Project: 18554
Buggy source:
/** 
 * Instantiates a new metrics errors by severity dao impl.
 * @param clusterName the cluster name
 * @param host the host
 * @param s_keyspace the s_keyspace
 * @param columnFamilyName the column family name
 * @param errorValuesDaoImpl the error values dao impl
 */
public MetricsErrorsBySeverityDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO errorValuesDaoImpl){
  super(clusterName,host,s_keyspace,columnFamilyName,kTypeClass,errorValuesDaoImpl);
}

Fixed version (ground truth):
/** 
 * Instantiates a new metrics errors by severity dao impl.
 * @param clusterName the cluster name
 * @param host the host
 * @param s_keyspace the s_keyspace
 * @param columnFamilyName the column family name
 * @param errorValuesDaoImpl the error values dao impl
 */
public MetricsErrorsBySeverityDAOImpl(final String clusterName,final String host,final String s_keyspace,final String columnFamilyName,final Class<K> kTypeClass,final MetricsErrorValuesDAO errorValuesDaoImpl,MetricsErrorByIdDAO<Long> errorByIdDaoImpl){
  super(clusterName,host,s_keyspace,columnFamilyName,kTypeClass,errorValuesDaoImpl,errorByIdDaoImpl);
}
Program: 18555
Project: 18555
Buggy source:
@Override public GetErrorMetricsDataResponse getErrorMetricsData(GetErrorMetricsDataRequest getErrorMetricsDataRequest){
  GetErrorMetricsDataResponse response=null;
  initialize();
  try {
    response=new GetErrorMetricsDataResponse();
    List<ExtendedErrorViewData> result=s_provider.getExtendedErrorMetricsData(getErrorMetricsDataRequest.getErrorType(),getErrorMetricsDataRequest.getServiceName(),getErrorMetricsDataRequest.getOperationName(),getErrorMetricsDataRequest.getConsumerName(),getErrorMetricsDataRequest.getErrorId(),getErrorMetricsDataRequest.getErrorCategory(),getErrorMetricsDataRequest.getErrorSeverity(),getErrorMetricsDataRequest.getErrorName(),getErrorMetricsDataRequest.getMetricCriteria());
    updateErrorDiffValues(result);
    response.getReturnData().addAll(result);
  }
 catch (  Exception e) {
    response.setErrorMessage(new ErrorMessage());
    response.getErrorMessage().getError().add(ErrorDataFactory.createErrorData(ErrorConstants.SVC_SOAMETRICSQUERYSERVICE_INTERNAL_ERROR,ErrorConstants.ERRORDOMAIN));
  }
  return response;
}

Fixed version (ground truth):
@Override public GetErrorMetricsDataResponse getErrorMetricsData(GetErrorMetricsDataRequest getErrorMetricsDataRequest){
  GetErrorMetricsDataResponse response=null;
  initialize();
  try {
    response=new GetErrorMetricsDataResponse();
    List<ExtendedErrorViewData> result=s_provider.getExtendedErrorMetricsData(getErrorMetricsDataRequest.getErrorType(),getErrorMetricsDataRequest.getServiceName(),getErrorMetricsDataRequest.getOperationName(),getErrorMetricsDataRequest.getConsumerName(),getErrorMetricsDataRequest.getErrorId(),getErrorMetricsDataRequest.getErrorCategory(),getErrorMetricsDataRequest.getErrorSeverity(),getErrorMetricsDataRequest.getErrorName(),getErrorMetricsDataRequest.getMetricCriteria());
    updateErrorDiffValues(result);
    response.getReturnData().addAll(result);
  }
 catch (  Error err) {
    err.printStackTrace();
  }
catch (  Exception e) {
    response.setErrorMessage(new ErrorMessage());
    response.getErrorMessage().getError().add(ErrorDataFactory.createErrorData(ErrorConstants.SVC_SOAMETRICSQUERYSERVICE_INTERNAL_ERROR,ErrorConstants.ERRORDOMAIN));
  }
  return response;
}
Program: 18556
Project: 18556
Buggy source:
public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<K> errorKeys=(List<K>)KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItems(errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}

Fixed version (ground truth):
public List<Map<K,Object>> findErrorValuesByFilter(long beginTime,long endTime,boolean serverSide,int aggregationPeriod,Long errorId,String filter,Map<String,List<String>> filters){
  final List<String> errorKeys=KeyGeneratorUtil.generateErrorValuesKeys(serverSide,filters,filter);
  Map<K,Map<Long,String>> findItems=findItems((List<K>)errorKeys,beginTime,endTime);
  List<Map<K,Object>> result=new ArrayList<Map<K,Object>>();
  Set<Entry<K,Map<Long,String>>> entrySet=findItems.entrySet();
  for (  Entry<K,Map<Long,String>> findItemSet : entrySet) {
    Map<Long,String> value=findItemSet.getValue();
    Set<Entry<Long,String>> entrySet2=value.entrySet();
    for (    Entry<Long,String> findItemSet2 : entrySet2) {
      Map<K,Object> row=new HashMap<K,Object>();
      row.put((K)"String_Node_Str",findItemSet2.getKey());
      result.add(row);
    }
  }
  return result;
}
Program: 18559
Project: 18559
Buggy source:
@Test public void testCallCountOneServiceNoOperationAnotherConsumer() throws ServiceException {
  long duration=60 * 6;
  int aggregationPeriod=20;
  int expectedSum=4;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  criteriaInfo.setConsumerName("String_Node_Str");
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinuteAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}

Fixed version (ground truth):
@Test public void testCallCountOneServiceNoOperationAnotherConsumer() throws ServiceException {
  long duration=60 * 6;
  int aggregationPeriod=20;
  int expectedSum=4;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  criteriaInfo.setConsumerName("String_Node_Str");
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinutesAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}
Program: 18560
Project: 18560
Buggy source:
@Override @Before public void setUp() throws Exception {
  super.setUp();
  now=System.currentTimeMillis();
  consumerName="String_Node_Str";
  oneMinuteAgo=now - TimeUnit.SECONDS.toMillis(60);
  opName="String_Node_Str";
  sixMinuteAgo=now - TimeUnit.SECONDS.toMillis(60 * 6);
  srvcAdminName="String_Node_Str";
  threeMinutesAgo=now - TimeUnit.SECONDS.toMillis(60 * 3);
  twoMinutesAgo=now - TimeUnit.SECONDS.toMillis(60 * 2);
  errorStorageProvider=new CassandraErrorLoggingHandler();
  metricsStorageProvider=new CassandraMetricsStorageProvider();
  InitContext ctx=new MockInitContext(options);
  errorStorageProvider.init(ctx);
  metricsStorageProvider.init(options,null,MonitoringSystem.COLLECTION_LOCATION_SERVER,20);
  queryprovider=new SOAMetricsQueryServiceCassandraProviderImpl();
  createTestData();
}

Fixed version (ground truth):
@Override @Before public void setUp() throws Exception {
  super.setUp();
  now=System.currentTimeMillis();
  consumerName="String_Node_Str";
  oneMinuteAgo=now - TimeUnit.SECONDS.toMillis(60);
  opName="String_Node_Str";
  sixMinutesAgo=now - TimeUnit.SECONDS.toMillis(60 * 6);
  srvcAdminName="String_Node_Str";
  threeMinutesAgo=now - TimeUnit.SECONDS.toMillis(60 * 3);
  twoMinutesAgo=now - TimeUnit.SECONDS.toMillis(60 * 2);
  errorStorageProvider=new CassandraErrorLoggingHandler();
  metricsStorageProvider=new CassandraMetricsStorageProvider();
  InitContext ctx=new MockInitContext(options);
  errorStorageProvider.init(ctx);
  metricsStorageProvider.init(options,null,MonitoringSystem.COLLECTION_LOCATION_SERVER,20);
  queryprovider=new SOAMetricsQueryServiceCassandraProviderImpl();
  createTestData();
}
Program: 18561
Project: 18561
Buggy source:
@Test public void testCallCountOneServiceNoOperationOneConsumer() throws ServiceException {
  long duration=60 * 7;
  int aggregationPeriod=20;
  int expectedSum=9;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  criteriaInfo.setConsumerName(consumerName);
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinuteAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}

Fixed version (ground truth):
@Test public void testCallCountOneServiceNoOperationOneConsumer() throws ServiceException {
  long duration=60 * 6;
  int aggregationPeriod=20;
  int expectedSum=12;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  criteriaInfo.setConsumerName(consumerName);
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinutesAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}
Program: 18562
Project: 18562
Buggy source:
@Test public void testCallCountOneServiceNoOperationNoConsumer() throws ServiceException {
  long duration=60 * 6;
  int aggregationPeriod=20;
  int expectedSum=13;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinuteAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}

Fixed version (ground truth):
@Test public void testCallCountOneServiceNoOperationNoConsumer() throws ServiceException {
  long duration=60 * 6;
  int aggregationPeriod=20;
  int expectedSum=16;
  CriteriaInfo criteriaInfo=new CriteriaInfo();
  criteriaInfo.setMetricName("String_Node_Str");
  criteriaInfo.setServiceName(srvcAdminName);
  criteriaInfo.setRoleType("String_Node_Str");
  List<MetricGraphData> response=queryprovider.getMetricValue(criteriaInfo,sixMinutesAgo,duration,aggregationPeriod,"String_Node_Str");
  assertNotNull(response);
  assertEquals("String_Node_Str",duration / aggregationPeriod,response.size());
  int sum=0;
  for (  MetricGraphData metricGraphData : response) {
    sum+=metricGraphData.getCount();
  }
  assertEquals("String_Node_Str" + expectedSum,expectedSum,sum);
}
Program: 18563
Project: 18563
Buggy source:
@Before public void setUp() throws Exception {
  super.setUp();
  metricsErrorByIdDAOImpl=new MetricsErrorByIdDAOImpl<Long>(TURMERIC_TEST_CLUSTER,HOST,KEY_SPACE,"String_Node_Str",Long.class);
  queryprovider=new SOAMetricsQueryServiceCassandraProviderImpl();
  errorStorageProvider=new CassandraErrorLoggingHandler();
  metricsStorageProvider=new CassandraMetricsStorageProvider();
  InitContext ctx=new MockInitContext(options);
  errorStorageProvider.init(ctx);
  metricsStorageProvider.init(options,null,MonitoringSystem.COLLECTION_LOCATION_SERVER,20);
  createData();
}

Fixed version (ground truth):
@Override @Before public void setUp() throws Exception {
  super.setUp();
  metricsErrorByIdDAOImpl=new MetricsErrorByIdDAOImpl<Long>(TURMERIC_TEST_CLUSTER,HOST,KEY_SPACE,"String_Node_Str",Long.class);
  errorStorageProvider=new CassandraErrorLoggingHandler();
  metricsStorageProvider=new CassandraMetricsStorageProvider();
  InitContext ctx=new MockInitContext(options);
  errorStorageProvider.init(ctx);
  metricsStorageProvider.init(options,null,MonitoringSystem.COLLECTION_LOCATION_SERVER,20);
  queryprovider=new SOAMetricsQueryServiceCassandraProviderImpl();
  createData();
}
Program: 18564
Project: 18564
Buggy source:
@After public void tearDown(){
  super.tearDown();
}

Fixed version (ground truth):
@Override @After public void tearDown(){
  super.tearDown();
}
Program: 18565
Project: 18565
Buggy source:
@Test public void testDateSelectionInFilter(){
  assertNotNull(consumerPresenter);
  ConsumerView view=(ConsumerView)consumerPresenter.getView();
  assertNotNull(view);
  Tree serviceTree=(Tree)view.getSelector();
  assertNotNull(serviceTree);
  assertNotNull(serviceTree.getItem(0));
  assertNotNull(serviceTree.getItem(0).getChild(0));
  TreeItem serviceToSelect=serviceTree.getItem(0).asTreeItem().getChild(0);
  String html=serviceToSelect.asTreeItem().getHTML();
  assertNotNull(html);
  Map<String,Set<String>> consumerData=service.getConsumerData();
  String firstServiceName=consumerData.keySet().iterator().next();
  assertTrue(html.contains(firstServiceName));
  selectServiceForTab(ServicePresenter.SERVICE_ID,firstServiceName);
  view.getFilter().setDate1(new Date());
  Browser.click((Widget)view.getFilter().getApplyButton());
  FlexTable table=view.getTable(ConsumerMetric.CallVolume);
  assertNotNull(table);
  Widget cellContent=table.getWidget(1,0);
  assertNotNull(cellContent);
  Iterator<String> operationIterator=consumerData.get(firstServiceName).iterator();
  NodeList<Node> childNodes=cellContent.getElement().getChildNodes();
  int childNodesLength=childNodes.getLength();
  for (int i=0; i < childNodesLength; i++) {
    assertEquals(operationIterator.next(),childNodes.getItem(i).getNodeValue());
  }
}

Fixed version (ground truth):
@Test public void testDateSelectionInFilter(){
  assertNotNull(consumerPresenter);
  ConsumerView view=(ConsumerView)consumerPresenter.getView();
  assertNotNull(view);
  Tree serviceTree=(Tree)view.getSelector();
  assertNotNull(serviceTree);
  assertNotNull(serviceTree.getItem(0));
  assertNotNull(serviceTree.getItem(0).getChild(0));
  TreeItem serviceToSelect=serviceTree.getItem(0).asTreeItem().getChild(0);
  String html=serviceToSelect.asTreeItem().getHTML();
  assertNotNull(html);
  Map<String,Set<String>> consumerData=service.getConsumerData();
  String firstServiceName=consumerData.keySet().iterator().next();
  assertTrue(html.contains(firstServiceName));
  selectServiceForTab(ConsumerPresenter.CONSUMER_ID,firstServiceName);
  view.getFilter().setDate1(new Date());
  Browser.click((Widget)view.getFilter().getApplyButton());
  FlexTable table=view.getTable(ConsumerMetric.CallVolume);
  assertNotNull(table);
  Widget cellContent=table.getWidget(1,0);
  assertNotNull(cellContent);
  Iterator<String> operationIterator=consumerData.get(firstServiceName).iterator();
  NodeList<Node> childNodes=cellContent.getElement().getChildNodes();
  int childNodesLength=childNodes.getLength();
  for (int i=0; i < childNodesLength; i++) {
    assertEquals(operationIterator.next(),childNodes.getItem(i).getNodeValue());
  }
}
Program: 18568
Project: 18568
Buggy source:
public void onValueChange(ValueChangeEvent<Date> event){
  Date date=event.getValue();
  int[] hrs=Util.getAvailableHours(date);
  ConsumerPresenter.this.view.getFilter().setHours2(hrs);
}

Fixed version (ground truth):
public void onValueChange(ValueChangeEvent<Date> event){
  Date date=event.getValue();
  int[] hrs=Util.getAvailableHours(date);
  ConsumerPresenter.this.view.getFilter().setHours1(hrs);
}
Program: 18569
Project: 18569
Buggy source:
protected void getConsumerServiceErrorTrends(final String serviceName,final String operationName,final long date1,final long date2,final int durationHrs,List<String> consumerNames){
  ConsumerTabCallbackQueue queue=new ConsumerErrorCountCallbackQueue();
  queue.setView(ConsumerPresenter.this.view);
  final Iterator<String> consuemrIterator=consumerNames.iterator();
  String consumerName=null;
  while (consuemrIterator.hasNext()) {
    consumerName=consuemrIterator.next();
    GWT.log("String_Node_Str" + consumerName);
    ParallelCallback<List<TimeSlotData>> cllbck=new ParallelCallback<List<TimeSlotData>>();
    cllbck.setId(consumerName);
    queue.add(cllbck);
    CriteriaInfoImpl criteriaInfo=new CriteriaInfoImpl();
    criteriaInfo.setMetricName("String_Node_Str");
    criteriaInfo.setConsumerName(consumerName);
    criteriaInfo.setServiceName(serviceName);
    if (operationName != null) {
      criteriaInfo.setOperationName(operationName);
    }
    criteriaInfo.setRoleType("String_Node_Str");
    MetricValue firstDateValue=new MetricValue(criteriaInfo,date1,3600l * durationHrs,3600,"String_Node_Str");
    MetricValue secondDateValue=new MetricValue(criteriaInfo,date2,3600l * durationHrs,3600,"String_Node_Str");
    queryService.getMetricValueTrend(firstDateValue,secondDateValue,cllbck);
  }
}

Fixed version (ground truth):
protected void getConsumerServiceErrorTrends(final String serviceName,final String operationName,final long date1,final long date2,final int durationHrs,List<String> consumerNames){
  ConsumerTabCallbackQueue queue=new ConsumerErrorCountCallbackQueue(serviceName,operationName,durationHrs,ConsumerPresenter.this.view);
  final Iterator<String> consuemrIterator=consumerNames.iterator();
  String consumerName=null;
  while (consuemrIterator.hasNext()) {
    consumerName=consuemrIterator.next();
    GWT.log("String_Node_Str" + consumerName);
    ParallelCallback<List<TimeSlotData>> cllbck=new ParallelCallback<List<TimeSlotData>>();
    cllbck.setId(consumerName);
    queue.add(cllbck);
    CriteriaInfoImpl criteriaInfo=new CriteriaInfoImpl();
    criteriaInfo.setMetricName("String_Node_Str");
    criteriaInfo.setConsumerName(consumerName);
    criteriaInfo.setServiceName(serviceName);
    if (operationName != null) {
      criteriaInfo.setOperationName(operationName);
    }
    criteriaInfo.setRoleType("String_Node_Str");
    MetricValue firstDateValue=new MetricValue(criteriaInfo,date1,3600l * durationHrs,3600,"String_Node_Str");
    MetricValue secondDateValue=new MetricValue(criteriaInfo,date2,3600l * durationHrs,3600,"String_Node_Str");
    queryService.getMetricValueTrend(firstDateValue,secondDateValue,cllbck);
  }
}