nus-yam/ex-repair huggingface dataset:
Program: 33448
Project: 33448
Buggy source:
public static ProjectWebHooksBean buildWithoutNew(WebHookProjectSettings projSettings,SProject project,Collection<WebHookPayload> registeredPayloads,List<WebHookTemplate> templateList){
  ProjectWebHooksBean bean=new ProjectWebHooksBean();
  List<SBuildType> projectBuildTypes=TeamCityIdResolver.getOwnBuildTypes(project);
  bean.projectId=TeamCityIdResolver.getInternalProjectId(project);
  bean.webHookList=new LinkedHashMap<String,WebhookConfigAndBuildTypeListHolder>();
  for (  WebHookConfig config : projSettings.getWebHooksAsList()) {
    addWebHookConfigHolder(bean,projectBuildTypes,config,registeredPayloads,templateList);
  }
  return bean;
}

Fixed version (ground truth):
public static ProjectWebHooksBean buildWithoutNew(WebHookProjectSettings projSettings,SBuildType sBuildType,SProject project,Collection<WebHookPayload> registeredPayloads,List<WebHookTemplate> templateList){
  ProjectWebHooksBean bean=new ProjectWebHooksBean();
  List<SBuildType> projectBuildTypes=TeamCityIdResolver.getOwnBuildTypes(project);
  Set<String> enabledBuildTypes=new HashSet<String>();
  enabledBuildTypes.add(sBuildType.getBuildTypeId());
  bean.projectId=TeamCityIdResolver.getInternalProjectId(project);
  bean.webHookList=new LinkedHashMap<String,WebhookConfigAndBuildTypeListHolder>();
  for (  WebHookConfig config : projSettings.getBuildWebHooksAsList(sBuildType)) {
    addWebHookConfigHolder(bean,projectBuildTypes,config,registeredPayloads,templateList);
  }
  return bean;
}
Program: 33449
Project: 33449
Buggy source:
@Override public boolean supportsPayloadFormat(String payloadFormat){
  return supportedFormats.contains(payloadFormat);
}

Fixed version (ground truth):
@Override public boolean supportsPayloadFormat(String payloadFormat){
  for (  String format : supportedFormats) {
    if (payloadFormat.equalsIgnoreCase(format)) {
      return true;
    }
  }
  return false;
}
Program: 33450
Project: 33450
Buggy source:
private void rebuildOrderedListOfTemplates(){
  this.orderedTemplateCollection.clear();
  for (  WebHookTemplate payloadTemplate : springTemplates.values()) {
    this.orderedTemplateCollection.add(payloadTemplate);
  }
  for (  WebHookTemplate payloadTemplate : xmlConfigTemplates.values()) {
    this.orderedTemplateCollection.add(payloadTemplate);
  }
  Collections.sort(this.orderedTemplateCollection,rankComparator);
}

Fixed version (ground truth):
private void rebuildOrderedListOfTemplates(){
  this.orderedTemplateCollection.clear();
  HashMap<String,WebHookTemplate> combinedTemplates=new HashMap<String,WebHookTemplate>();
  for (  WebHookTemplate payloadTemplate : springTemplates.values()) {
    combinedTemplates.put(payloadTemplate.getTemplateShortName(),payloadTemplate);
  }
  for (  WebHookTemplate payloadTemplate : xmlConfigTemplates.values()) {
    combinedTemplates.put(payloadTemplate.getTemplateShortName(),payloadTemplate);
  }
  this.orderedTemplateCollection.addAll(combinedTemplates.values());
  Collections.sort(this.orderedTemplateCollection,rankComparator);
}
Program: 33455
Project: 33455
Buggy source:
public void setBranch(Branch branch){
  this.branch=branch;
}

Fixed version (ground truth):
public void setBranch(Branch branch){
  this.branch=new WebHooksBranchImpl(branch);
}
Program: 33460
Project: 33460
Buggy source:
@JsonCreator public AzureTableConfiguration(@JsonProperty("String_Node_Str") String accountName,@JsonProperty("String_Node_Str") String accountKey,@JsonProperty("String_Node_Str") Duration timeout,@JsonProperty("String_Node_Str") Duration retryInterval,@JsonProperty("String_Node_Str") int retryAttempts){
  this.retryInterval=checkNotNull(retryInterval,"String_Node_Str");
  this.retryAttempts=checkNotNull(retryAttempts,"String_Node_Str");
  this.timeout=checkNotNull(timeout,"String_Node_Str");
  this.storageCredentialsAccountAndKey=new StorageCredentialsAccountAndKey(checkNotNull(accountName,"String_Node_Str"),checkNotNull(accountKey,"String_Node_Str"));
}

Fixed version (ground truth):
@JsonCreator public AzureTableConfiguration(@JsonProperty("String_Node_Str") String accountName,@JsonProperty("String_Node_Str") String accountKey,@JsonProperty("String_Node_Str") Duration timeout,@JsonProperty("String_Node_Str") Duration retryInterval,@JsonProperty("String_Node_Str") int retryAttempts){
  this.retryInterval=checkNotNull(retryInterval,"String_Node_Str");
  this.retryAttempts=retryAttempts;
  this.timeout=checkNotNull(timeout,"String_Node_Str");
  this.storageCredentialsAccountAndKey=new StorageCredentialsAccountAndKey(checkNotNull(accountName,"String_Node_Str"),checkNotNull(accountKey,"String_Node_Str"));
}
Program: 33463
Project: 33463
Buggy source:
private static InstanceDiscovery createClassInstance(Class<InstanceDiscovery> instanceDiscoveryClass,BreakerboxServiceConfiguration configuration,Environment environment) throws Exception {
  if (instanceDiscoveryClass.equals(RancherInstanceDiscovery.class) && configuration.getRancherInstanceConfiguration().isPresent()) {
    return new RancherInstanceDiscovery(configuration.getRancherInstanceConfiguration().get(),environment.getObjectMapper());
  }
 else   if (instanceDiscoveryClass.equals(YamlInstanceDiscovery.class)) {
    return new YamlInstanceDiscovery(configuration.getTurbine(),environment.getValidator(),environment.getObjectMapper());
  }
  return instanceDiscoveryClass.newInstance();
}

Fixed version (ground truth):
private static InstanceDiscovery createClassInstance(Class<InstanceDiscovery> instanceDiscoveryClass,BreakerboxServiceConfiguration configuration,Environment environment) throws Exception {
  if (instanceDiscoveryClass.equals(RancherInstanceDiscovery.class) && configuration.getRancherInstanceConfiguration().isPresent()) {
    return new RancherInstanceDiscovery(configuration.getRancherInstanceConfiguration().get(),environment.getObjectMapper());
  }
 else   if (instanceDiscoveryClass.equals(YamlInstanceDiscovery.class)) {
    return new YamlInstanceDiscovery(configuration.getTurbine(),environment.getValidator(),environment.getObjectMapper());
  }
  return instanceDiscoveryClass.getConstructor().newInstance();
}
Program: 33464
Project: 33464
Buggy source:
protected void registerTenacityProperties(Map<TenacityPropertyKey,TenacityConfiguration> tenacityPropertyKeyConfigurations,BreakerboxServiceConfiguration configuration){
}

Fixed version (ground truth):
@Override protected void registerTenacityProperties(Map<TenacityPropertyKey,TenacityConfiguration> tenacityPropertyKeyConfigurations,BreakerboxServiceConfiguration configuration){
}
Program: 33465
Project: 33465
Buggy source:
@Test public void testToDate() throws Exception {
  assertThat(SimpleDateParser.millisToDate(String.valueOf(testDateEpoch))).isEqualTo(testDateFormatted);
}

Fixed version (ground truth):
@Test public void testToDate() throws Exception {
  assertThat(SimpleDateParser.millisToDate(String.valueOf(testDateEpoch))).isEqualTo(DateFormatUtils.format(new Date(testDateEpoch),SimpleDateParser.DATE_FORMAT));
}
Program: 33466
Project: 33466
Buggy source:
public ImmutableList<SyncState> inSync(ServiceId serviceId,DependencyId dependencyId){
  final ImmutableList<InstanceConfiguration> configurations=fetch(serviceId,dependencyId);
  final Optional<ServiceEntity> serviceEntity=breakerboxStore.retrieve(serviceId,dependencyId);
  if (serviceEntity.isPresent()) {
    final Optional<TenacityConfiguration> tenacityConfiguration=breakerboxStore.retrieve(dependencyId,Optional.<String>absent()).get().getConfiguration();
    if (tenacityConfiguration.isPresent()) {
      return FluentIterable.from(configurations).transform(funComputeSyncState(tenacityConfiguration.get())).toList();
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
  return FluentIterable.from(configurations).transform(funUnsynchronized()).toList();
}

Fixed version (ground truth):
public ImmutableList<SyncState> inSync(ServiceId serviceId,DependencyId dependencyId){
  final ImmutableList<InstanceConfiguration> configurations=fetch(serviceId,dependencyId);
  final Optional<DependencyEntity> entityOptional=breakerboxStore.retrieve(dependencyId,Optional.<String>absent());
  if (entityOptional.isPresent()) {
    final DependencyEntity entity=entityOptional.get();
    if (entity.getConfiguration().isPresent()) {
      return FluentIterable.from(configurations).transform(funComputeSyncState(entity.getConfiguration().get())).toList();
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
  return FluentIterable.from(configurations).transform(funUnsynchronized()).toList();
}
Program: 33467
Project: 33467
Buggy source:
@Test public void noBreakerboxConfiguration(){
  final SyncComparator syncComparator=new SyncComparator(mockFactory,mockTenacityStory);
  when(mockTenacityStory.retrieve(serviceId,dependencyId)).thenReturn(Optional.<ServiceEntity>absent());
  when(mockFactory.create(any(URI.class),any(TenacityPropertyKey.class))).thenReturn(mockFetcher);
  when(mockFetcher.queue()).thenReturn(Futures.immediateFuture(Optional.of(new TenacityConfiguration())));
  assertThat(syncComparator.inSync(serviceId,dependencyId)).isEqualTo(unsynchronized());
}

Fixed version (ground truth):
@Test public void noBreakerboxConfiguration(){
  final SyncComparator syncComparator=new SyncComparator(mockFactory,mockTenacityStory);
  when(mockTenacityStory.retrieve(eq(dependencyId),eq(Optional.<String>absent()))).thenReturn(Optional.<DependencyEntity>absent());
  when(mockFactory.create(any(URI.class),any(TenacityPropertyKey.class))).thenReturn(mockFetcher);
  when(mockFetcher.queue()).thenReturn(Futures.immediateFuture(Optional.of(new TenacityConfiguration())));
  assertThat(syncComparator.inSync(serviceId,dependencyId)).isEqualTo(unsynchronized());
}
Program: 33468
Project: 33468
Buggy source:
@Test public void noConfigurations(){
  final SyncComparator syncComparator=new SyncComparator(mockFactory,mockTenacityStory);
  when(mockTenacityStory.retrieve(serviceId,dependencyId)).thenReturn(Optional.<ServiceEntity>absent());
  when(mockFactory.create(any(URI.class),any(TenacityPropertyKey.class))).thenReturn(mockFetcher);
  when(mockFetcher.queue()).thenReturn(Futures.immediateFuture(Optional.<TenacityConfiguration>absent()));
  assertThat(syncComparator.inSync(serviceId,dependencyId)).isEqualTo(unsynchronized());
}

Fixed version (ground truth):
@Test public void noConfigurations(){
  final SyncComparator syncComparator=new SyncComparator(mockFactory,mockTenacityStory);
  when(mockTenacityStory.retrieve(eq(dependencyId),eq(Optional.<String>absent()))).thenReturn(Optional.<DependencyEntity>absent());
  when(mockFactory.create(any(URI.class),any(TenacityPropertyKey.class))).thenReturn(mockFetcher);
  when(mockFetcher.queue()).thenReturn(Futures.immediateFuture(Optional.<TenacityConfiguration>absent()));
  assertThat(syncComparator.inSync(serviceId,dependencyId)).isEqualTo(unsynchronized());
}
Program: 33469
Project: 33469
Buggy source:
public <EntityType extends TableServiceEntity>Optional<EntityType> retrieve(TableKey tableKey){
  try {
    final TableResult tableResult=cloudTableClient.execute(tableKey.getTable().toString(),TableOperation.retrieve(tableKey.getPartitionKey(),tableKey.getRowKey(),tableKey.getEntityClass()));
    return Optional.fromNullable((EntityType)tableResult.getResultAsType());
  }
 catch (  StorageException e) {
    LOG.warn("String_Node_Str",tableKey.getTable(),e);
  }
  return Optional.absent();
}

Fixed version (ground truth):
public <EntityType extends TableServiceEntity>Optional<EntityType> retrieve(TableKey tableKey){
  try {
    final TableResult tableResult=cloudTableClient.execute(tableKey.getTable().toString(),TableOperation.retrieve(tableKey.getPartitionKey(),tableKey.getRowKey(),tableKey.getEntityClass()));
    final EntityType entityType=tableResult.getResultAsType();
    return Optional.fromNullable(entityType);
  }
 catch (  StorageException e) {
    LOG.warn("String_Node_Str",tableKey.getTable(),e);
  }
  return Optional.absent();
}
Program: 33470
Project: 33470
Buggy source:
@Override public URI apply(Instance input){
  final URI original=URI.create(input.getHostname());
  try {
    return new URI(original.getScheme(),original.getUserInfo(),original.getHost(),original.getPort(),TenacityClient.TENACITY_PROPERTYKEYS_PATH,original.getQuery(),original.getFragment());
  }
 catch (  URISyntaxException err) {
    LOGGER.warn("String_Node_Str",err);
  }
  return original;
}

Fixed version (ground truth):
@Override public URI apply(Instance input){
  final URI original=URI.create(input.getHostname());
  try {
    return new URI(original.getScheme(),original.getUserInfo(),original.getHost(),original.getPort(),"String_Node_Str",original.getQuery(),original.getFragment());
  }
 catch (  URISyntaxException err) {
    LOGGER.warn("String_Node_Str",err);
  }
  return original;
}
Program: 33471
Project: 33471
Buggy source:
private static Function<Instance,URI> toPropertyKeyUri(){
  return new Function<Instance,URI>(){
    @Override public URI apply(    Instance input){
      final URI original=URI.create(input.getHostname());
      try {
        return new URI(original.getScheme(),original.getUserInfo(),original.getHost(),original.getPort(),TenacityClient.TENACITY_PROPERTYKEYS_PATH,original.getQuery(),original.getFragment());
      }
 catch (      URISyntaxException err) {
        LOGGER.warn("String_Node_Str",err);
      }
      return original;
    }
  }
;
}

Fixed version (ground truth):
private static Function<Instance,URI> toPropertyKeyUri(){
  return new Function<Instance,URI>(){
    @Override public URI apply(    Instance input){
      final URI original=URI.create(input.getHostname());
      try {
        return new URI(original.getScheme(),original.getUserInfo(),original.getHost(),original.getPort(),"String_Node_Str",original.getQuery(),original.getFragment());
      }
 catch (      URISyntaxException err) {
        LOGGER.warn("String_Node_Str",err);
      }
      return original;
    }
  }
;
}
Program: 33472
Project: 33472
Buggy source:
private ColumnSlice[] getPagedColumnSlices(DecoratedKey dk,Collection<IndexEntry> entries,int pageSize){
  ColumnSlice[] columnSlices=new ColumnSlice[pageSize];
  int i=0;
  for (  IndexEntry entry : entries) {
    CellName cellName=entry.clusteringKey;
    if (!filter.columnFilter(dk.getKey()).maySelectPrefix(tableMapper.table.getComparator(),cellName.start())) {
      continue;
    }
    Composite start=tableMapper.start(cellName);
    Composite end=tableMapper.end(start);
    ColumnSlice columnSlice=new ColumnSlice(start,end);
    columnSlices[i++]=columnSlice;
    if (i >= pageSize) {
      break;
    }
  }
  return columnSlices;
}

Fixed version (ground truth):
private ColumnSlice[] getPagedColumnSlices(DecoratedKey dk,Collection<IndexEntry> entries,int pageSize){
  ColumnSlice[] columnSlices=new ColumnSlice[Math.min(entries.size(),pageSize)];
  int i=0;
  for (  IndexEntry entry : entries) {
    CellName cellName=entry.clusteringKey;
    if (!filter.columnFilter(dk.getKey()).maySelectPrefix(tableMapper.table.getComparator(),cellName.start())) {
      continue;
    }
    Composite start=tableMapper.start(cellName);
    Composite end=tableMapper.end(start);
    ColumnSlice columnSlice=new ColumnSlice(start,end);
    columnSlices[i++]=columnSlice;
    if (i >= pageSize) {
      break;
    }
  }
  return columnSlices;
}
Program: 33473
Project: 33473
Buggy source:
private ColumnSlice[] getPagedColumnSlices(DecoratedKey dk,Collection<IndexEntry> entries,int pageSize){
  ColumnSlice[] columnSlices=new ColumnSlice[Math.min(entries.size(),pageSize)];
  int i=0;
  for (  IndexEntry entry : entries) {
    CellName cellName=entry.clusteringKey;
    if (!filter.columnFilter(dk.getKey()).maySelectPrefix(tableMapper.table.getComparator(),cellName.start())) {
      continue;
    }
    Composite start=tableMapper.start(cellName);
    Composite end=tableMapper.end(start);
    ColumnSlice columnSlice=new ColumnSlice(start,end);
    columnSlices[i++]=columnSlice;
    if (i >= pageSize) {
      break;
    }
  }
  return columnSlices;
}

Fixed version (ground truth):
private ColumnSlice[] getPagedColumnSlices(DecoratedKey dk,Collection<IndexEntry> entries,int pageSize){
  ArrayList<ColumnSlice> columnSlices=new ArrayList<>(Math.min(entries.size(),pageSize));
  for (  IndexEntry entry : entries) {
    CellName cellName=entry.clusteringKey;
    if (!filter.columnFilter(dk.getKey()).maySelectPrefix(tableMapper.table.getComparator(),cellName.start())) {
      continue;
    }
    Composite start=tableMapper.start(cellName);
    Composite end=tableMapper.end(start);
    ColumnSlice columnSlice=new ColumnSlice(start,end);
    columnSlices.add(columnSlice);
    if (columnSlices.size() == pageSize) {
      break;
    }
  }
  return columnSlices.toArray(new ColumnSlice[columnSlices.size()]);
}
Program: 33474
Project: 33474
Buggy source:
@Override public List<Row> search(ExtendedFilter mainFilter){
  List<IndexExpression> clause=mainFilter.getClause();
  if (logger.isDebugEnabled())   logger.debug("String_Node_Str",clause);
  try {
    String queryString=getQueryString(matchThisIndex(clause));
    Search search=getQuery(queryString);
    return getRows(mainFilter,search,queryString);
  }
 catch (  Exception e) {
    if (tableMapper.isMetaColumn) {
      ByteBuffer errorMsg=UTF8Type.instance.decompose("String_Node_Str" + StringEscapeUtils.escapeEcmaScript(e.getMessage()) + "String_Node_Str");
      Row row=tableMapper.getRowWithMetaColumn(errorMsg);
      if (row != null) {
        return Collections.singletonList(row);
      }
    }
    logger.error("String_Node_Str",e);
    return Collections.EMPTY_LIST;
  }
}

Fixed version (ground truth):
@Override public List<Row> search(ExtendedFilter mainFilter){
  List<IndexExpression> clause=mainFilter.getClause();
  if (logger.isDebugEnabled())   logger.debug("String_Node_Str",clause);
  try {
    String queryString=getQueryString(matchThisIndex(clause));
    Search search=getQuery(queryString);
    return getRows(mainFilter,search,queryString);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    if (tableMapper.isMetaColumn) {
      ByteBuffer errorMsg=UTF8Type.instance.decompose("String_Node_Str" + StringEscapeUtils.escapeEcmaScript(e.getMessage()) + "String_Node_Str");
      Row row=tableMapper.getRowWithMetaColumn(errorMsg);
      if (row != null) {
        return Collections.singletonList(row);
      }
    }
    return Collections.EMPTY_LIST;
  }
}
Program: 33475
Project: 33475
Buggy source:
@Test public void shouldReportErrorRow() throws Exception {
  try {
    createKS(keyspace);
    createTableAndIndexForRow();
    ResultSet rs=getResults("String_Node_Str","String_Node_Str" + mq("String_Node_Str","String_Node_Str") + "String_Node_Str",true);
    List<Row> rows=rs.all();
    Assert.assertEquals(true,rows.toString().contains("String_Node_Str"));
  }
  finally {
    dropTable(keyspace,"String_Node_Str");
    dropKS(keyspace);
  }
}

Fixed version (ground truth):
@Test public void shouldReportErrorRow() throws Exception {
  try {
    createKS(keyspace);
    createTableAndIndexForRow();
    ResultSet rs=getResults("String_Node_Str","String_Node_Str",true);
    List<Row> rows=rs.all();
    Assert.assertEquals(true,rows.toString().contains("String_Node_Str"));
  }
  finally {
    dropTable(keyspace,"String_Node_Str");
    dropKS(keyspace);
  }
}
Program: 33476
Project: 33476
Buggy source:
/** 
 * It is ok to have another thread re-run this method after a halt().
 * @throws IllegalStateException if this processor is already running
 */
@Override public void run(){
  if (!running.compareAndSet(false,true)) {
    throw new IllegalStateException("String_Node_Str");
  }
  sequenceBarrier.clearAlert();
  notifyStart();
  boolean processedSequence=true;
  long nextSequence=sequence.get();
  T event=null;
  while (true) {
    try {
      if (processedSequence) {
        processedSequence=false;
        nextSequence=workSequence.incrementAndGet();
        sequence.set(nextSequence - 1L);
      }
      sequenceBarrier.waitFor(nextSequence);
      event=ringBuffer.get(nextSequence);
      workHandler.onEvent(event);
      processedSequence=true;
    }
 catch (    final AlertException ex) {
      if (!running.get()) {
        break;
      }
    }
catch (    final Throwable ex) {
      exceptionHandler.handleEventException(ex,nextSequence,event);
      processedSequence=true;
    }
  }
  notifyShutdown();
  running.set(false);
}

Fixed version (ground truth):
/** 
 * It is ok to have another thread re-run this method after a halt().
 * @throws IllegalStateException if this processor is already running
 */
@Override public void run(){
  if (!running.compareAndSet(false,true)) {
    throw new IllegalStateException("String_Node_Str");
  }
  sequenceBarrier.clearAlert();
  notifyStart();
  boolean processedSequence=true;
  long nextSequence=sequence.get();
  T event=null;
  while (true) {
    try {
      if (processedSequence) {
        processedSequence=false;
        nextSequence=workSequence.incrementAndGet();
        sequence.set(nextSequence - 1L);
      }
      if (sequenceBarrier.waitFor(nextSequence) >= nextSequence) {
        event=ringBuffer.get(nextSequence);
        workHandler.onEvent(event);
        processedSequence=true;
      }
    }
 catch (    final AlertException ex) {
      if (!running.get()) {
        break;
      }
    }
catch (    final Throwable ex) {
      exceptionHandler.handleEventException(ex,nextSequence,event);
      processedSequence=true;
    }
  }
  notifyShutdown();
  running.set(false);
}
Program: 33477
Project: 33477
Buggy source:
/** 
 * It is ok to have another thread re-run this method after a halt().
 * @throws IllegalStateException if this processor is already running
 */
@Override public void run(){
  if (!running.compareAndSet(false,true)) {
    throw new IllegalStateException("String_Node_Str");
  }
  sequenceBarrier.clearAlert();
  notifyStart();
  boolean processedSequence=true;
  long nextSequence=sequence.get();
  T event=null;
  while (true) {
    try {
      if (processedSequence) {
        processedSequence=false;
        nextSequence=workSequence.incrementAndGet();
        sequence.set(nextSequence - 1L);
      }
      if (sequenceBarrier.waitFor(nextSequence) >= nextSequence) {
        event=ringBuffer.get(nextSequence);
        workHandler.onEvent(event);
        processedSequence=true;
      }
    }
 catch (    final AlertException ex) {
      if (!running.get()) {
        break;
      }
    }
catch (    final Throwable ex) {
      exceptionHandler.handleEventException(ex,nextSequence,event);
      processedSequence=true;
    }
  }
  notifyShutdown();
  running.set(false);
}

Fixed version (ground truth):
/** 
 * It is ok to have another thread re-run this method after a halt().
 * @throws IllegalStateException if this processor is already running
 */
@Override public void run(){
  if (!running.compareAndSet(false,true)) {
    throw new IllegalStateException("String_Node_Str");
  }
  sequenceBarrier.clearAlert();
  notifyStart();
  boolean processedSequence=true;
  long cachedAvailableSequence=Long.MIN_VALUE;
  long nextSequence=sequence.get();
  T event=null;
  while (true) {
    try {
      if (processedSequence) {
        processedSequence=false;
        nextSequence=workSequence.incrementAndGet();
        sequence.set(nextSequence - 1L);
      }
      if (cachedAvailableSequence >= nextSequence) {
        event=ringBuffer.get(nextSequence);
        workHandler.onEvent(event);
        processedSequence=true;
      }
 else {
        cachedAvailableSequence=sequenceBarrier.waitFor(nextSequence);
      }
    }
 catch (    final AlertException ex) {
      if (!running.get()) {
        break;
      }
    }
catch (    final Throwable ex) {
      exceptionHandler.handleEventException(ex,nextSequence,event);
      processedSequence=true;
    }
  }
  notifyShutdown();
  running.set(false);
}
Program: 33478
Project: 33478
Buggy source:
/** 
 * Upon upgrade of disruptor to a version above 3.1.1, this method invocation can be replaced with  {@code disruptor.handleEventsWithWorkerPool}
 * @param workHandlers
 * @param exceptionHandler
 */
private void handleEventsWithWorkerPool(WorkHandler<IndexEntryEvent>[] workHandlers,ExceptionHandler exceptionHandler){
  final Sequence[] barrierSequences=new Sequence[0];
  final SequenceBarrier sequenceBarrier=ringBuffer.newBarrier(barrierSequences);
  EventProcessor[] workProcessors=new CustomWorkProcessor[numWorkers];
  Sequence workSequence=new Sequence(Sequencer.INITIAL_CURSOR_VALUE);
  for (int i=0; i < numWorkers; i++) {
    workProcessors[i]=new CustomWorkProcessor<IndexEntryEvent>(ringBuffer,sequenceBarrier,workHandlers[i],exceptionHandler,workSequence);
  }
  disruptor.handleEventsWith(workProcessors);
}

Fixed version (ground truth):
/** 
 * Upon upgrade of disruptor to a version above 3.2.0, this method invocation can be replaced with  {@code disruptor.handleEventsWithWorkerPool}
 * @param workHandlers
 * @param exceptionHandler
 */
private void handleEventsWithWorkerPool(WorkHandler<IndexEntryEvent>[] workHandlers,ExceptionHandler exceptionHandler){
  final Sequence[] barrierSequences=new Sequence[0];
  final SequenceBarrier sequenceBarrier=ringBuffer.newBarrier(barrierSequences);
  EventProcessor[] workProcessors=new CustomWorkProcessor[numWorkers];
  Sequence workSequence=new Sequence(Sequencer.INITIAL_CURSOR_VALUE);
  for (int i=0; i < numWorkers; i++) {
    workProcessors[i]=new CustomWorkProcessor<IndexEntryEvent>(ringBuffer,sequenceBarrier,workHandlers[i],exceptionHandler,workSequence);
  }
  disruptor.handleEventsWith(workProcessors);
}
Program: 33480
Project: 33480
Buggy source:
public ColumnFamily fetchRangeSlice(ArrayList<IndexEntryCollector.IndexEntry> entries,DecoratedKey dk){
  IndexEntryCollector.IndexEntry first=entries.get(0);
  IndexEntryCollector.IndexEntry last=entries.get(entries.size() - 1);
  CellName firstCellName=clusteringKey(first.primaryKey);
  CellName lastCellName=clusteringKey(last.primaryKey);
  QueryFilter sliceQueryFilter=QueryFilter.getSliceFilter(dk,tableMapper.table.name,start(firstCellName),end(lastCellName),false,Integer.MAX_VALUE,filter.timestamp);
  return tableMapper.table.getColumnFamily(sliceQueryFilter);
}

Fixed version (ground truth):
public Map<CellName,ColumnFamily> fetchRangeSlice(ArrayList<IndexEntryCollector.IndexEntry> entries,DecoratedKey dk){
  ColumnSlice[] columnSlices=getColumnSlices(entries);
  SliceQueryFilter sliceQueryFilter=new SliceQueryFilter(columnSlices,false,Integer.MAX_VALUE);
  QueryFilter queryFilter=new QueryFilter(dk,tableMapper.table.name,sliceQueryFilter,filter.timestamp);
  ColumnFamily columnFamily=tableMapper.table.getColumnFamily(queryFilter);
  return getRows(columnFamily);
}
Program: 33481
Project: 33481
Buggy source:
public final Composite start(CellName cellName){
  CBuilder builder=tableMapper.clusteringCType.builder();
  for (int i=0; i < cellName.clusteringSize(); i++) {
    ByteBuffer component=cellName.get(i);
    builder.add(component);
  }
  return builder.build();
}

Fixed version (ground truth):
private final Composite start(CellName cellName){
  CBuilder builder=tableMapper.clusteringCType.builder();
  for (int i=0; i < cellName.clusteringSize(); i++) {
    ByteBuffer component=cellName.get(i);
    builder.add(component);
  }
  return builder.build();
}
Program: 33482
Project: 33482
Buggy source:
public final Composite end(CellName cellName){
  return start(cellName).withEOC(Composite.EOC.END);
}

Fixed version (ground truth):
private final Composite end(CellName cellName){
  return start(cellName).withEOC(Composite.EOC.END);
}
Program: 33484
Project: 33484
Buggy source:
private void addCell(ByteBuffer rowKey,Map<String,ByteBuffer> pkNames,Map<String,List<Field>> primaryKeysVsFields,Map<String,Long> timestamps,Cell cell){
  CellName cellName=cell.name();
  ColumnIdentifier cql3ColName=cellName.cql3ColumnName(tableMapper.cfMetaData);
  String actualColName=cql3ColName.toString();
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str",actualColName);
  CellName clusteringKey=tableMapper.extractClusteringKey(cell.name());
  ByteBuffer primaryKeyBuff=tableMapper.primaryKey(rowKey,clusteringKey);
  String primaryKey=tableMapper.primaryKeyType.getString(primaryKeyBuff);
  pkNames.put(primaryKey,primaryKeyBuff);
  List<Field> fields=primaryKeysVsFields.get(primaryKey);
  if (fields == null) {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str",primaryKey);
    }
    fields=new LinkedList<>();
    primaryKeysVsFields.put(primaryKey,fields);
    timestamps.put(primaryKey,0l);
    addPartitionKeyFields(rowKey,timestamps,cell.timestamp(),primaryKey,fields);
    addClusteringKeyFields(clusteringKey,timestamps,cell.timestamp(),primaryKey,fields);
  }
  ColumnDefinition columnDefinition=tableMapper.cfMetaData.getColumnDefinition(cql3ColName);
  if (options.shouldIndex(actualColName)) {
    long existingTS=timestamps.get(primaryKey);
    timestamps.put(primaryKey,Math.max(existingTS,cell.timestamp()));
    addFields(cell,actualColName,fields,columnDefinition);
  }
}

Fixed version (ground truth):
private void addCell(ByteBuffer rowKey,Map<String,ByteBuffer> pkNames,Map<String,List<Field>> primaryKeysVsFields,Map<String,Long> timestamps,Cell cell){
  CellName cellName=cell.name();
  ColumnIdentifier cql3ColName=cellName.cql3ColumnName(tableMapper.cfMetaData);
  String actualColName=cql3ColName.toString();
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str",actualColName);
  CellName clusteringKey=tableMapper.extractClusteringKey(cell.name());
  ByteBuffer primaryKeyBuff=tableMapper.primaryKey(rowKey,clusteringKey);
  String primaryKey=tableMapper.primaryKeyType.getString(primaryKeyBuff);
  pkNames.put(primaryKey,primaryKeyBuff);
  List<Field> fields=primaryKeysVsFields.get(primaryKey);
  if (fields == null) {
    if (logger.isTraceEnabled()) {
      logger.trace("String_Node_Str",primaryKey);
    }
    fields=new LinkedList<>();
    primaryKeysVsFields.put(primaryKey,fields);
    timestamps.put(primaryKey,0l);
    addPartitionKeyFields(rowKey,timestamps,cell.timestamp(),primaryKey,fields);
    addClusteringKeyFields(clusteringKey,timestamps,cell.timestamp(),primaryKey,fields);
  }
  ColumnDefinition columnDefinition=tableMapper.cfMetaData.getColumnDefinition(cql3ColName);
  if (options.shouldIndex(actualColName)) {
    long existingTS=timestamps.get(primaryKey);
    timestamps.put(primaryKey,Math.max(existingTS,cell.timestamp()));
    addFields(cell,actualColName,fields,columnDefinition);
  }
}
Program: 33485
Project: 33485
Buggy source:
@Override public List<Row> doWithSearcher(org.apache.lucene.search.IndexSearcher searcher) throws Exception {
  Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
  List<Row> results;
  if (search == null) {
    results=new ArrayList<>();
  }
 else {
    Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
    Function function=search.function(options);
    Query query=search.query(options);
    int resultsLimit=searcher.getIndexReader().maxDoc();
    if (function.shouldLimit()) {
      if (resultsLimit == 0) {
        resultsLimit=1;
      }
      resultsLimit=Math.min(filter.currentLimit() + 1,resultsLimit);
    }
    function.init(options);
    IndexEntryCollector collector=new IndexEntryCollector(function,search,options,resultsLimit);
    searcher.search(query,collector);
    timer2.endLogTime("String_Node_Str" + collector.getTotalHits() + "String_Node_Str");
    if (SearchSupport.logger.isDebugEnabled()) {
      SearchSupport.logger.debug(String.format("String_Node_Str",collector.getTotalHits()));
    }
    ResultMapper iter=new ResultMapper(tableMapper,searchSupport,filter,collector,function.shouldTryScoring() && search.isShowScore());
    Utils.SimpleTimer timer3=Utils.getStartedTimer(SearchSupport.logger);
    results=function.process(iter,baseCfs,currentIndex);
    timer3.endLogTime("String_Node_Str" + collector.getTotalHits() + "String_Node_Str");
  }
  timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
  return results;
}

Fixed version (ground truth):
@Override public List<Row> doWithSearcher(org.apache.lucene.search.IndexSearcher searcher) throws Exception {
  Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
  List<Row> results;
  if (search == null) {
    results=new ArrayList<>();
  }
 else {
    Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
    Function function=search.function(options);
    Query query=search.query(options);
    int resultsLimit=searcher.getIndexReader().maxDoc();
    if (function.shouldLimit()) {
      if (resultsLimit == 0) {
        resultsLimit=1;
      }
      resultsLimit=Math.min(filter.currentLimit() + 1,resultsLimit);
    }
    function.init(options);
    IndexEntryCollector collector=new IndexEntryCollector(function,search,options,resultsLimit);
    searcher.search(query,collector);
    timer2.endLogTime("String_Node_Str" + collector.getTotalHits() + "String_Node_Str");
    if (SearchSupport.logger.isDebugEnabled()) {
      SearchSupport.logger.debug(String.format("String_Node_Str",collector.getTotalHits()));
    }
    ResultMapper iter=new ResultMapper(tableMapper,searchSupport,filter,collector,function.shouldTryScoring() && search.isShowScore());
    Utils.SimpleTimer timer3=Utils.getStartedTimer(SearchSupport.logger);
    results=function.process(iter,baseCfs,currentIndex);
    timer3.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
  }
  timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
  return results;
}
Program: 33488
Project: 33488
Buggy source:
@Override public Tuple apply(IndexEntryCollector.IndexEntry input){
  CellName cellName=resultMapper.clusteringKey(input.primaryKey);
  ColumnFamily cf=resultMapper.fetchSingleRow(dk,fullSlice,cellName);
  Tuple tuple=aggregateFunction.createTuple(options);
  resultMapper.tableMapper.load(positions,tuple,new Row(dk,cf));
  return tuple;
}

Fixed version (ground truth):
@Override public Tuple apply(IndexEntryCollector.IndexEntry input){
  CellName cellName=resultMapper.makeClusteringKey(input.primaryKey);
  ColumnFamily cf=fullSlice.get(cellName);
  if (cf != null) {
    Tuple tuple=aggregateFunction.createTuple(options);
    resultMapper.tableMapper.load(positions,tuple,new Row(dk,cf));
    return tuple;
  }
  return null;
}
Program: 33489
Project: 33489
Buggy source:
@Test public void shouldIndexPerRow() throws Exception {
  try {
    createKS(keyspace);
    createTableAndIndexForRow();
    countResults("String_Node_Str","String_Node_Str",false,true);
    String home=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",null);
    String browse=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1);
    String buy=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",null);
    String matchPattern=pattern(Arrays.asList(home,browse,buy));
    String aggregate=aggregate("String_Node_Str","String_Node_Str","String_Node_Str",true,"String_Node_Str");
    String fap=patternAggregate(matchPattern,aggregate);
    countResults("String_Node_Str","String_Node_Str" + fap + "String_Node_Str",true);
  }
  finally {
    dropTable(keyspace,"String_Node_Str");
    dropKS(keyspace);
  }
}

Fixed version (ground truth):
@Test public void shouldIndexPerRow() throws Exception {
  try {
    createKS(keyspace);
    createTableAndIndexForRow();
    countResults("String_Node_Str","String_Node_Str",false,true);
    String home=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",null);
    String browse=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1);
    String buy=state("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",null);
    String matchPattern=pattern(Arrays.asList(home,browse,buy));
    String aggregate=aggregate("String_Node_Str","String_Node_Str","String_Node_Str",true,"String_Node_Str");
    String fap=patternAggregate(matchPattern,aggregate);
    countResults("String_Node_Str","String_Node_Str" + fap + "String_Node_Str",true);
    String matchPattern2=pattern(Arrays.asList(home,browse));
    String aggregate2=aggregate("String_Node_Str","String_Node_Str","String_Node_Str",false,"String_Node_Str");
    String fap2=patternAggregate(matchPattern2,aggregate2);
    countResults("String_Node_Str","String_Node_Str" + fap2 + "String_Node_Str",true);
  }
  finally {
    dropTable(keyspace,"String_Node_Str");
    dropKS(keyspace);
  }
}
Program: 33490
Project: 33490
Buggy source:
public static ByteBuffer defaultValue(AbstractType type){
  CQL3Type cqlType=type.asCQL3Type();
  if (cqlType == CQL3Type.Native.INT) {
    return ByteBufferUtil.bytes(0);
  }
 else   if (cqlType == CQL3Type.Native.VARINT || cqlType == CQL3Type.Native.BIGINT || cqlType == CQL3Type.Native.COUNTER) {
    return ByteBufferUtil.bytes(0L);
  }
 else   if (cqlType == CQL3Type.Native.DECIMAL || cqlType == CQL3Type.Native.DOUBLE) {
    return ByteBufferUtil.bytes(0D);
  }
 else   if (cqlType == CQL3Type.Native.FLOAT) {
    return ByteBufferUtil.bytes(0F);
  }
 else   if (cqlType == CQL3Type.Native.TEXT || cqlType == CQL3Type.Native.VARCHAR) {
    return ByteBufferUtil.bytes("String_Node_Str");
  }
 else   if (cqlType == CQL3Type.Native.UUID) {
    return ByteBufferUtil.bytes(UUID.randomUUID());
  }
 else   if (cqlType == CQL3Type.Native.TIMEUUID) {
    return ByteBufferUtil.bytes(UUID.randomUUID());
  }
 else   if (cqlType == CQL3Type.Native.TIMESTAMP) {
    return ByteBufferUtil.bytes(0L);
  }
 else   if (cqlType == CQL3Type.Native.BOOLEAN) {
    return BooleanType.instance.decompose(false);
  }
 else {
    return ByteBufferUtil.EMPTY_BYTE_BUFFER;
  }
}

Fixed version (ground truth):
public static ByteBuffer defaultValue(AbstractType type){
  CQL3Type cqlType=type.asCQL3Type();
  if (cqlType == CQL3Type.Native.INT) {
    return ByteBufferUtil.bytes(0);
  }
 else   if (cqlType == CQL3Type.Native.VARINT || cqlType == CQL3Type.Native.BIGINT || cqlType == CQL3Type.Native.COUNTER) {
    return ByteBufferUtil.bytes(0L);
  }
 else   if (cqlType == CQL3Type.Native.DECIMAL || cqlType == CQL3Type.Native.DOUBLE) {
    return ByteBufferUtil.bytes(0D);
  }
 else   if (cqlType == CQL3Type.Native.FLOAT) {
    return ByteBufferUtil.bytes(0F);
  }
 else   if (cqlType == CQL3Type.Native.TEXT || cqlType == CQL3Type.Native.VARCHAR) {
    return ByteBufferUtil.bytes("String_Node_Str");
  }
 else   if (cqlType == CQL3Type.Native.UUID) {
    return ByteBufferUtil.bytes(UUID.randomUUID());
  }
 else   if (cqlType == CQL3Type.Native.TIMEUUID) {
    return ByteBufferUtil.bytes(UUIDGen.getTimeUUID(0));
  }
 else   if (cqlType == CQL3Type.Native.TIMESTAMP) {
    return ByteBufferUtil.bytes(0L);
  }
 else   if (cqlType == CQL3Type.Native.BOOLEAN) {
    return BooleanType.instance.decompose(false);
  }
 else {
    return ByteBufferUtil.EMPTY_BYTE_BUFFER;
  }
}
Program: 33491
Project: 33491
Buggy source:
public void logTime(String prefix){
  if (logger.isDebugEnabled())   logger.debug(String.format("String_Node_Str"),prefix,time());
}

Fixed version (ground truth):
public void logTime(String prefix){
  if (logger.isWarnEnabled())   logger.warn(String.format("String_Node_Str"),prefix,time());
}
Program: 33492
Project: 33492
Buggy source:
@Override protected Row computeNext(){
  DataRange range=filter.dataRange;
  SliceQueryFilter sliceQueryFilter=(SliceQueryFilter)filter.dataRange.columnFilter(ByteBufferUtil.EMPTY_BYTE_BUFFER);
  while (indexIterator.hasNext()) {
    try {
      IndexEntryCollector.IndexEntry entry=indexIterator.next();
      String pkNameString=entry.pkName;
      ByteBuffer rowKey=entry.rowKey;
      long ts=entry.timestamp;
      float score=entry.score;
      Pair<DecoratedKey,IDiskAtomFilter> keyAndFilter=getFilterAndKey(rowKey,sliceQueryFilter);
      if (keyAndFilter == null) {
        continue;
      }
      DecoratedKey dk=keyAndFilter.left;
      if (!range.contains(dk)) {
        if (SearchSupport.logger.isTraceEnabled()) {
          SearchSupport.logger.trace("String_Node_Str",dk.token);
        }
        continue;
      }
      if (SearchSupport.logger.isTraceEnabled()) {
        SearchSupport.logger.trace("String_Node_Str",dk);
      }
      Row row=getRow(pkNameString,keyAndFilter.right,dk,ts,score);
      if (row == null) {
        if (SearchSupport.logger.isTraceEnabled())         SearchSupport.logger.trace("String_Node_Str");
        continue;
      }
      return row;
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
  return endOfData();
}

Fixed version (ground truth):
@Override protected Row computeNext(){
  DataRange range=filter.dataRange;
  SliceQueryFilter sliceQueryFilter=(SliceQueryFilter)filter.dataRange.columnFilter(ByteBufferUtil.EMPTY_BYTE_BUFFER);
  while (indexIterator.hasNext() && columnsCount <= limit) {
    try {
      IndexEntryCollector.IndexEntry entry=indexIterator.next();
      String pkNameString=entry.pkName;
      ByteBuffer rowKey=entry.rowKey;
      long ts=entry.timestamp;
      float score=entry.score;
      Pair<DecoratedKey,IDiskAtomFilter> keyAndFilter=getFilterAndKey(rowKey,sliceQueryFilter);
      if (keyAndFilter == null) {
        continue;
      }
      DecoratedKey dk=keyAndFilter.left;
      if (!range.contains(dk)) {
        if (SearchSupport.logger.isTraceEnabled()) {
          SearchSupport.logger.trace("String_Node_Str",dk.token);
        }
        continue;
      }
      if (SearchSupport.logger.isTraceEnabled()) {
        SearchSupport.logger.trace("String_Node_Str",dk);
      }
      Row row=getRow(pkNameString,keyAndFilter.right,dk,ts,score);
      if (row == null) {
        if (SearchSupport.logger.isTraceEnabled())         SearchSupport.logger.trace("String_Node_Str");
        continue;
      }
      columnsCount++;
      return row;
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
  return endOfData();
}
Program: 33493
Project: 33493
Buggy source:
public RowScanner(SearchSupport searchSupport,ColumnFamilyStore table,ExtendedFilter filter,Iterator<IndexEntryCollector.IndexEntry> indexIterator) throws Exception {
  this.searchSupport=searchSupport;
  this.table=table;
  this.filter=filter;
  this.indexIterator=indexIterator;
}

Fixed version (ground truth):
public RowScanner(SearchSupport searchSupport,ColumnFamilyStore table,ExtendedFilter filter,Iterator<IndexEntryCollector.IndexEntry> indexIterator) throws Exception {
  this.searchSupport=searchSupport;
  this.table=table;
  this.filter=filter;
  this.indexIterator=indexIterator;
  this.limit=filter.currentLimit();
}
Program: 33494
Project: 33494
Buggy source:
@Override public List<Row> doWithSearcher(org.apache.lucene.search.IndexSearcher searcher) throws Exception {
  Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
  List<Row> results;
  if (search == null) {
    results=new ArrayList<>();
  }
 else {
    Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
    int maxResults=filter.maxRows();
    int limit=searcher.getIndexReader().maxDoc();
    if (limit == 0) {
      limit=1;
    }
    maxResults=Math.min(maxResults,limit);
    Query query=search.query(options);
    org.apache.lucene.search.SortField[] sort=search.usesSorting() ? search.sort(options) : null;
    IndexEntryCollector collector=new IndexEntryCollector(sort,maxResults);
    searcher.search(query,collector);
    timer2.endLogTime("String_Node_Str" + collector.totalHits + "String_Node_Str");
    if (SearchSupport.logger.isDebugEnabled()) {
      SearchSupport.logger.debug(String.format("String_Node_Str",collector.totalHits));
    }
    ColumnFamilyStore.AbstractScanIterator iter=new RowScanner(searchSupport,baseCfs,filter,collector.docs().iterator());
    List<Row> inputToFunction=baseCfs.filter(iter,filter);
    Function function=search.function(options);
    return function.process(inputToFunction,customColumnFactory,baseCfs,currentIndex);
  }
  timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
  return results;
}

Fixed version (ground truth):
@Override public List<Row> doWithSearcher(org.apache.lucene.search.IndexSearcher searcher) throws Exception {
  Utils.SimpleTimer timer=Utils.getStartedTimer(logger);
  List<Row> results;
  if (search == null) {
    results=new ArrayList<>();
  }
 else {
    Utils.SimpleTimer timer2=Utils.getStartedTimer(SearchSupport.logger);
    int resultsLimit=filter.currentLimit();
    int limit=searcher.getIndexReader().maxDoc();
    if (limit == 0) {
      limit=1;
    }
    resultsLimit=Math.min(resultsLimit,limit);
    Query query=search.query(options);
    org.apache.lucene.search.SortField[] sort=search.usesSorting() ? search.sort(options) : null;
    IndexEntryCollector collector=new IndexEntryCollector(sort,resultsLimit);
    searcher.search(query,collector);
    timer2.endLogTime("String_Node_Str" + collector.totalHits + "String_Node_Str");
    if (SearchSupport.logger.isDebugEnabled()) {
      SearchSupport.logger.debug(String.format("String_Node_Str",collector.totalHits));
    }
    ColumnFamilyStore.AbstractScanIterator iter=new RowScanner(searchSupport,baseCfs,filter,collector.docs().iterator());
    List<Row> inputToFunction=baseCfs.filter(iter,filter);
    Function function=search.function(options);
    return function.process(inputToFunction,customColumnFactory,baseCfs,currentIndex);
  }
  timer.endLogTime("String_Node_Str" + results.size() + "String_Node_Str");
  return results;
}
Program: 33496
Project: 33496
Buggy source:
@Override public void insert(Iterable<Field> doc){
  if (logger.isDebugEnabled())   logger.debug(indexName + "String_Node_Str" + doc);
  try {
    latest=indexWriter.addDocument(doc);
    indexSearcherReferenceManager.maybeRefresh();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void insert(Iterable<Field> doc){
  if (logger.isDebugEnabled())   logger.debug(indexName + "String_Node_Str" + doc);
  try {
    latest=indexWriter.addDocument(doc);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 33497
Project: 33497
Buggy source:
@Override public void delete(Term... terms){
  try {
    BooleanQuery q=new BooleanQuery();
    for (    Term t : terms) {
      if (logger.isDebugEnabled())       logger.debug(indexName + "String_Node_Str" + t);
      q.add(new TermQuery(t),BooleanClause.Occur.MUST);
    }
    latest=indexWriter.deleteDocuments(q);
    indexSearcherReferenceManager.maybeRefresh();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void delete(Term... terms){
  try {
    BooleanQuery q=new BooleanQuery();
    for (    Term t : terms) {
      if (logger.isDebugEnabled())       logger.debug(indexName + "String_Node_Str" + t);
      q.add(new TermQuery(t),BooleanClause.Occur.MUST);
    }
    latest=indexWriter.deleteDocuments(q);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 33498
Project: 33498
Buggy source:
public static void setCurrentWebDriver(RemoteWebDriver driver){
  perThreadDriver.set(ThreadSafeDriver.makeThreadSafe(driver));
}

Fixed version (ground truth):
public static void setCurrentWebDriver(SeleniumDriver driver){
  perThreadDriver.set(ThreadSafeDriver.makeThreadSafe((RemoteWebDriver)driver));
}
Program: 33499
Project: 33499
Buggy source:
/** 
 * @return the browser which should be used in the test run giventhe program's parameter. If no browser is specified, PhantomJS is used as the only standard browser
 */
public Browser getTargetBrowser(){
  if (this.targetBrowser == null) {
    String browserProptery=System.getProperty("String_Node_Str","String_Node_Str");
    this.targetBrowser=Browser.valueOf(browserProptery.trim().toUpperCase());
  }
  return this.targetBrowser;
}

Fixed version (ground truth):
/** 
 * @return the browser which should be used in the test run giventhe program's parameter. If no browser is specified, PhantomJS is used as the only standard browser
 */
public Browser getTargetBrowser(){
  if (this.targetBrowser == null) {
    String browserProperty=System.getProperty("String_Node_Str","String_Node_Str");
    this.targetBrowser=Browser.valueOf(browserProperty.trim().toUpperCase());
  }
  return this.targetBrowser;
}
Program: 33500
Project: 33500
Buggy source:
/** 
 * @return the initialized driver
 */
public RemoteWebDriver createNewDriver();

Fixed version (ground truth):
/** 
 * @return the initialized driver
 */
public SeleniumDriver createNewDriver();