nus-yam/ex-repair huggingface dataset:
Program: 46994
Project: 46994
Buggy source:
@Test public void testValues_withPredicate(){
  final int max=27;
  final IMap map=client.getMap(randomString());
  final Set expected=new TreeSet();
  for (int key=0; key < max; key++) {
    Object value=key + "String_Node_Str";
    map.put(key,value);
  }
  expected.add(4);
  final Set keySet=map.keySet(new SqlPredicate("String_Node_Str"));
  assertEquals(expected,keySet);
}

Fixed version (ground truth):
@Test public void testValues_withPredicate(){
  final int max=27;
  final IMap map=client.getMap(randomString());
  final Set expected=new TreeSet();
  for (int key=0; key < max; key++) {
    Object value=key + "String_Node_Str";
    map.put(key,value);
  }
  expected.add("String_Node_Str");
  final Collection collection=map.values(new SqlPredicate("String_Node_Str"));
  final Set resultSet=new TreeSet(collection);
  assertEquals(expected,resultSet);
}
Program: 46995
Project: 46995
Buggy source:
@Test public void testValues_withPredicate(){
  final int max=27;
  final IMap map=client.getMap(randomString());
  final Set expected=new TreeSet();
  for (int key=0; key < max; key++) {
    Object value=key + "String_Node_Str";
    map.put(key,value);
  }
  expected.add(4);
  final Set keySet=map.keySet(new SqlPredicate("String_Node_Str"));
  assertEquals(expected,keySet);
}

Fixed version (ground truth):
@Test public void testValues_withPredicate(){
  final int max=27;
  final IMap map=client.getMap(randomString());
  final Set expected=new TreeSet();
  for (int key=0; key < max; key++) {
    Object value=key + "String_Node_Str";
    map.put(key,value);
  }
  expected.add("String_Node_Str");
  final Collection collection=map.values(new SqlPredicate("String_Node_Str"));
  final Set resultSet=new TreeSet(collection);
  assertEquals(expected,resultSet);
}
Program: 46996
Project: 46996
Buggy source:
private int getOrInitTargetPartitionId(){
  int targetPartitionId=this.targetPartitionId;
  while (targetPartitionId == Operation.GENERIC_PARTITION_ID) {
    final int partitionCount=getContext().getPartitionService().getPartitionCount();
    targetPartitionId=new Random().nextInt(partitionCount);
    if (!TARGET_PARTITION_ID_UPDATER.compareAndSet(this,-1,targetPartitionId)) {
      targetPartitionId=this.targetPartitionId;
    }
  }
  return targetPartitionId;
}

Fixed version (ground truth):
private int getOrInitTargetPartitionId(){
  int targetPartitionId=this.targetPartitionId;
  while (targetPartitionId == Operation.GENERIC_PARTITION_ID) {
    final int partitionCount=getContext().getPartitionService().getPartitionCount();
    targetPartitionId=RANDOM_PARTITION_ID_GENERATOR.nextInt(partitionCount);
    if (!TARGET_PARTITION_ID_UPDATER.compareAndSet(this,-1,targetPartitionId)) {
      targetPartitionId=this.targetPartitionId;
    }
  }
  return targetPartitionId;
}
Program: 46997
Project: 46997
Buggy source:
private int getOrInitTargetPartitionId(){
  int targetPartitionId=this.targetPartitionId;
  while (targetPartitionId == Operation.GENERIC_PARTITION_ID) {
    final int partitionCount=getContext().getPartitionService().getPartitionCount();
    targetPartitionId=new Random().nextInt(partitionCount);
    if (!TARGET_PARTITION_ID_UPDATER.compareAndSet(this,-1,targetPartitionId)) {
      targetPartitionId=this.targetPartitionId;
    }
  }
  return targetPartitionId;
}

Fixed version (ground truth):
private int getOrInitTargetPartitionId(){
  int targetPartitionId=this.targetPartitionId;
  while (targetPartitionId == Operation.GENERIC_PARTITION_ID) {
    final int partitionCount=getContext().getPartitionService().getPartitionCount();
    targetPartitionId=RANDOM_PARTITION_ID_GENERATOR.nextInt(partitionCount);
    if (!TARGET_PARTITION_ID_UPDATER.compareAndSet(this,-1,targetPartitionId)) {
      targetPartitionId=this.targetPartitionId;
    }
  }
  return targetPartitionId;
}
Program: 46998
Project: 46998
Buggy source:
@Test public void testResultType(){
  map.put("String_Node_Str","String_Node_Str");
  Set<String> entries=map.localKeySet(TruePredicate.INSTANCE);
  QueryResultCollection collection=assertInstanceOf(QueryResultCollection.class,entries);
  QueryResultRow row=(QueryResultRow)collection.getRows().iterator().next();
  assertEquals(serializationService.toData("String_Node_Str"),row.getKey());
  assertNull(row.getValue());
}

Fixed version (ground truth):
@Test public void testResultType(){
  map.put(localKey1,"String_Node_Str");
  Set<String> entries=map.localKeySet(TruePredicate.INSTANCE);
  QueryResultCollection collection=assertInstanceOf(QueryResultCollection.class,entries);
  QueryResultRow row=(QueryResultRow)collection.getRows().iterator().next();
  assertEquals(localKey1,serializationService.toObject(row.getKey()));
  assertNull(row.getValue());
}
Program: 46999
Project: 46999
Buggy source:
@Override protected Predicate getPredicate(){
  return predicate;
}

Fixed version (ground truth):
@Override protected Predicate getPredicate(){
  return predicate == null ? TruePredicate.INSTANCE : predicate;
}
Program: 47000
Project: 47000
Buggy source:
@Override public Object[] getParameters(){
  return new Object[]{predicate};
}

Fixed version (ground truth):
@Override public Object[] getParameters(){
  return predicate == null ? null : new Object[]{predicate};
}
Program: 47001
Project: 47001
Buggy source:
private Collection<V> valuesForPagingPredicate(PagingPredicate pagingPredicate){
  pagingPredicate.setIterationType(IterationType.VALUE);
  MapQueryRequest request=new MapQueryRequest(name,pagingPredicate,IterationType.VALUE);
  QueryResultSet result=invoke(request);
  List<Entry> resultList=new ArrayList<Entry>(result.size());
  Iterator<Entry> iterator=result.rawIterator();
  while (iterator.hasNext()) {
    Entry entry=iterator.next();
    K key=toObject(entry.getKey());
    V value=toObject(entry.getValue());
    resultList.add(new AbstractMap.SimpleImmutableEntry<Object,V>(key,value));
  }
  return (Collection)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.VALUE);
}

Fixed version (ground truth):
private Collection<V> valuesForPagingPredicate(PagingPredicate pagingPredicate){
  pagingPredicate.setIterationType(IterationType.ENTRY);
  MapQueryRequest request=new MapQueryRequest(name,pagingPredicate,IterationType.ENTRY);
  Collection<QueryResultRow> result=invoke(request);
  List<Entry> resultList=new ArrayList<Entry>(result.size());
  for (  QueryResultRow row : result) {
    K key=toObject(row.getKey());
    V value=toObject(row.getValue());
    resultList.add(new AbstractMap.SimpleImmutableEntry<Object,V>(key,value));
  }
  return (Collection)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.VALUE);
}
Program: 47002
Project: 47002
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public Set<Entry<K,V>> entrySet(Predicate predicate){
  PagingPredicate pagingPredicate=null;
  if (predicate instanceof PagingPredicate) {
    pagingPredicate=(PagingPredicate)predicate;
    pagingPredicate.setIterationType(IterationType.ENTRY);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.ENTRY);
  QueryResultSet result=invoke(request);
  if (pagingPredicate == null) {
    SerializationService serializationService=getContext().getSerializationService();
    InflatableSet.Builder<Entry<K,V>> setBuilder=InflatableSet.newBuilder(result.size());
    for (    Object data : result) {
      AbstractMap.SimpleImmutableEntry<Data,Data> dataEntry=(AbstractMap.SimpleImmutableEntry<Data,Data>)data;
      LazyMapEntry lazyEntry=new LazyMapEntry(dataEntry.getKey(),dataEntry.getValue(),serializationService);
      setBuilder.add(lazyEntry);
    }
    return setBuilder.build();
  }
  ArrayList<Map.Entry> resultList=new ArrayList<Map.Entry>();
  for (  Object data : result) {
    AbstractMap.SimpleImmutableEntry<Data,Data> dataEntry=(AbstractMap.SimpleImmutableEntry<Data,Data>)data;
    K key=toObject(dataEntry.getKey());
    V value=toObject(dataEntry.getValue());
    resultList.add(new AbstractMap.SimpleEntry<K,V>(key,value));
  }
  return (Set)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.ENTRY);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Set<Entry<K,V>> entrySet(Predicate predicate){
  PagingPredicate pagingPredicate=null;
  if (predicate instanceof PagingPredicate) {
    pagingPredicate=(PagingPredicate)predicate;
    pagingPredicate.setIterationType(IterationType.ENTRY);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.ENTRY);
  Collection<QueryResultRow> result=invoke(request);
  if (pagingPredicate == null) {
    SerializationService serializationService=getContext().getSerializationService();
    InflatableSet.Builder<Entry<K,V>> setBuilder=InflatableSet.newBuilder(result.size());
    for (    QueryResultRow row : result) {
      LazyMapEntry entry=new LazyMapEntry(row.getKey(),row.getValue(),serializationService);
      setBuilder.add(entry);
    }
    return setBuilder.build();
  }
  ArrayList<Map.Entry> resultList=new ArrayList<Map.Entry>();
  for (  QueryResultRow data : result) {
    K key=toObject(data.getKey());
    V value=toObject(data.getValue());
    resultList.add(new AbstractMap.SimpleEntry<K,V>(key,value));
  }
  return (Set)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.ENTRY);
}
Program: 47003
Project: 47003
Buggy source:
@Override public Collection<V> values(Predicate predicate){
  if (predicate instanceof PagingPredicate) {
    return valuesForPagingPredicate((PagingPredicate)predicate);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.VALUE);
  QueryResultSet result=invoke(request);
  List<V> values=new ArrayList<V>(result.size());
  for (  Object data : result) {
    V value=toObject(data);
    values.add(value);
  }
  return values;
}

Fixed version (ground truth):
@Override public Collection<V> values(Predicate predicate){
  if (predicate instanceof PagingPredicate) {
    return valuesForPagingPredicate((PagingPredicate)predicate);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.VALUE);
  Collection<QueryResultRow> result=invoke(request);
  List<V> values=new ArrayList<V>(result.size());
  for (  QueryResultRow row : result) {
    values.add((V)toObject(row.getValue()));
  }
  return values;
}
Program: 47004
Project: 47004
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public Set<K> keySet(Predicate predicate){
  PagingPredicate pagingPredicate=null;
  if (predicate instanceof PagingPredicate) {
    pagingPredicate=(PagingPredicate)predicate;
    pagingPredicate.setIterationType(IterationType.KEY);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.KEY);
  QueryResultSet result=invoke(request);
  if (pagingPredicate == null) {
    InflatableSet.Builder<K> setBuilder=InflatableSet.newBuilder(result.size());
    for (    Object o : result) {
      final K key=toObject(o);
      setBuilder.add(key);
    }
    return setBuilder.build();
  }
  Iterator<Entry> iterator=result.rawIterator();
  ArrayList<Map.Entry> resultList=new ArrayList<Map.Entry>();
  while (iterator.hasNext()) {
    Entry entry=iterator.next();
    K key=toObject(entry.getKey());
    resultList.add(new AbstractMap.SimpleImmutableEntry<K,V>(key,null));
  }
  return (Set<K>)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.KEY);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Set<K> keySet(Predicate predicate){
  PagingPredicate pagingPredicate=null;
  if (predicate instanceof PagingPredicate) {
    pagingPredicate=(PagingPredicate)predicate;
    pagingPredicate.setIterationType(IterationType.KEY);
  }
  MapQueryRequest request=new MapQueryRequest(name,predicate,IterationType.KEY);
  Collection<QueryResultRow> result=invoke(request);
  if (pagingPredicate == null) {
    InflatableSet.Builder<K> setBuilder=InflatableSet.newBuilder(result.size());
    for (    QueryResultRow row : result) {
      K key=toObject(row.getKey());
      setBuilder.add(key);
    }
    return setBuilder.build();
  }
  ArrayList<Map.Entry> resultList=new ArrayList<Map.Entry>(result.size());
  for (  QueryResultRow row : result) {
    K key=toObject(row.getKey());
    resultList.add(new AbstractMap.SimpleImmutableEntry<K,V>(key,null));
  }
  return (Set<K>)getSortedQueryResultSet(resultList,pagingPredicate,IterationType.KEY);
}
Program: 47005
Project: 47005
Buggy source:
@Override protected final Object call() throws Exception {
  Collection<QueryResultEntry> result=new LinkedList<QueryResultEntry>();
  Collection<Member> members=nodeEngine.getClusterService().getMembers();
  List<Future> futures=new ArrayList<Future>();
  Predicate predicate=getPredicate();
  createInvocations(members,futures,predicate);
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  Set<Integer> finishedPartitions=new HashSet<Integer>(partitionCount);
  collectResults(result,futures,finishedPartitions);
  if (hasMissingPartitions(finishedPartitions,partitionCount)) {
    List<Integer> missingList=findMissingPartitions(finishedPartitions,partitionCount);
    List<Future> missingFutures=new ArrayList<Future>(missingList.size());
    createInvocationsForMissingPartitions(missingList,missingFutures,predicate);
    collectResultsFromMissingPartitions(result,missingFutures);
  }
  return reduce(result);
}

Fixed version (ground truth):
@Override protected final Object call() throws Exception {
  Collection<QueryResultRow> result=new LinkedList<QueryResultRow>();
  Collection<Member> members=nodeEngine.getClusterService().getMembers();
  List<Future> futures=new ArrayList<Future>();
  Predicate predicate=getPredicate();
  createInvocations(members,futures,predicate);
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  Set<Integer> finishedPartitions=new HashSet<Integer>(partitionCount);
  collectResults(result,futures,finishedPartitions);
  if (hasMissingPartitions(finishedPartitions,partitionCount)) {
    List<Integer> missingList=findMissingPartitions(finishedPartitions,partitionCount);
    List<Future> missingFutures=new ArrayList<Future>(missingList.size());
    createInvocationsForMissingPartitions(missingList,missingFutures,predicate);
    collectResultsFromMissingPartitions(result,missingFutures);
  }
  return reduce(result);
}
Program: 47006
Project: 47006
Buggy source:
protected abstract Object reduce(Collection<QueryResultEntry> result);

Fixed version (ground truth):
protected abstract Object reduce(Collection<QueryResultRow> result);
Program: 47007
Project: 47007
Buggy source:
private void collectResults(Collection<QueryResultEntry> result,List<Future> futures,Set<Integer> finishedPartitions) throws InterruptedException, java.util.concurrent.ExecutionException {
  for (  Future future : futures) {
    QueryResult queryResult=(QueryResult)future.get();
    if (queryResult != null) {
      Collection<Integer> partitionIds=queryResult.getPartitionIds();
      if (partitionIds != null) {
        finishedPartitions.addAll(partitionIds);
        result.addAll(queryResult.getResult());
      }
    }
  }
}

Fixed version (ground truth):
private void collectResults(Collection<QueryResultRow> result,List<Future> futures,Set<Integer> finishedPartitions) throws InterruptedException, java.util.concurrent.ExecutionException {
  for (  Future future : futures) {
    QueryResult queryResult=(QueryResult)future.get();
    if (queryResult != null) {
      Collection<Integer> partitionIds=queryResult.getPartitionIds();
      if (partitionIds != null) {
        finishedPartitions.addAll(partitionIds);
        result.addAll(queryResult.getRows());
      }
    }
  }
}
Program: 47008
Project: 47008
Buggy source:
private void createInvocationsForMissingPartitions(List<Integer> missingPartitionsList,List<Future> futures,Predicate predicate){
  final InternalOperationService operationService=nodeEngine.getOperationService();
  for (  Integer partitionId : missingPartitionsList) {
    QueryPartitionOperation queryPartitionOperation=new QueryPartitionOperation(getDistributedObjectName(),predicate);
    queryPartitionOperation.setPartitionId(partitionId);
    try {
      Future future=operationService.invokeOnPartition(SERVICE_NAME,queryPartitionOperation,partitionId);
      futures.add(future);
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}

Fixed version (ground truth):
private void createInvocationsForMissingPartitions(List<Integer> missingPartitionsList,List<Future> futures,Predicate predicate){
  final InternalOperationService operationService=nodeEngine.getOperationService();
  for (  Integer partitionId : missingPartitionsList) {
    QueryPartitionOperation queryPartitionOperation=new QueryPartitionOperation(getDistributedObjectName(),predicate,IterationType.ENTRY);
    queryPartitionOperation.setPartitionId(partitionId);
    try {
      Future future=operationService.invokeOnPartition(SERVICE_NAME,queryPartitionOperation,partitionId);
      futures.add(future);
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}
Program: 47009
Project: 47009
Buggy source:
private void collectResultsFromMissingPartitions(Collection<QueryResultEntry> result,List<Future> futures) throws InterruptedException, java.util.concurrent.ExecutionException {
  for (  Future future : futures) {
    QueryResult queryResult=(QueryResult)future.get();
    result.addAll(queryResult.getResult());
  }
}

Fixed version (ground truth):
private void collectResultsFromMissingPartitions(Collection<QueryResultRow> result,List<Future> futures) throws InterruptedException, java.util.concurrent.ExecutionException {
  for (  Future future : futures) {
    QueryResult queryResult=(QueryResult)future.get();
    result.addAll(queryResult.getRows());
  }
}
Program: 47010
Project: 47010
Buggy source:
private void createInvocations(Collection<Member> members,List<Future> futures,Predicate predicate){
  final InternalOperationService operationService=nodeEngine.getOperationService();
  for (  Member member : members) {
    Future future=operationService.createInvocationBuilder(SERVICE_NAME,new QueryOperation(getDistributedObjectName(),predicate),member.getAddress()).invoke();
    futures.add(future);
  }
}

Fixed version (ground truth):
private void createInvocations(Collection<Member> members,List<Future> futures,Predicate predicate){
  final InternalOperationService operationService=nodeEngine.getOperationService();
  for (  Member member : members) {
    Future future=operationService.createInvocationBuilder(SERVICE_NAME,new QueryOperation(getDistributedObjectName(),predicate,IterationType.ENTRY),member.getAddress()).invoke();
    futures.add(future);
  }
}
Program: 47011
Project: 47011
Buggy source:
@Override protected Object reduce(Collection<QueryResultEntry> result){
  HashMap<Data,Data> map=new HashMap<Data,Data>();
  for (  QueryResultEntry resultEntry : result) {
    map.put(resultEntry.getKeyData(),resultEntry.getValueData());
  }
  Set<Map.Entry<Data,Data>> entries=map.entrySet();
  return entries;
}

Fixed version (ground truth):
@Override protected Object reduce(Collection<QueryResultRow> result){
  HashMap<Data,Data> map=new HashMap<Data,Data>();
  for (  QueryResultRow resultEntry : result) {
    map.put(resultEntry.getKey(),resultEntry.getValue());
  }
  Set<Map.Entry<Data,Data>> entries=map.entrySet();
  return entries;
}
Program: 47012
Project: 47012
Buggy source:
/** 
 * This copy-constructor is intended to be used by   {@link #clone()} method only.
 * @param other
 */
private InflatableSet(InflatableSet other){
  compactList=new ArrayList<T>(other.compactList.size());
  compactList.addAll(other.compactList);
  if (other.inflatedSet != null) {
    inflatedSet=new HashSet<T>(other.inflatedSet);
  }
  state=other.state;
}

Fixed version (ground truth):
/** 
 * This copy-constructor is intended to be used by   {@link #clone()} method only.
 * @param other other InflatableSet which should be cloned
 */
private InflatableSet(InflatableSet<T> other){
  compactList=new ArrayList<T>(other.compactList.size());
  compactList.addAll(other.compactList);
  if (other.inflatedSet != null) {
    inflatedSet=new HashSet<T>(other.inflatedSet);
  }
  state=other.state;
}
Program: 47013
Project: 47013
Buggy source:
/** 
 * Returns a shallow copy of this <tt>InflatableSet</tt> instance: the keys and values themselves are not cloned.
 * @return a shallow copy of this set
 */
@Override protected Object clone(){
  return new InflatableSet<T>(this);
}

Fixed version (ground truth):
/** 
 * Returns a shallow copy of this <tt>InflatableSet</tt> instance: the keys and values themselves are not cloned.
 * @return a shallow copy of this set
 */
@Override @SuppressFBWarnings("String_Node_Str") protected Object clone(){
  return new InflatableSet<T>(this);
}
Program: 47014
Project: 47014
Buggy source:
LinkedList<WanReplicationEvent> getFailureQ(){
  return failureQ;
}

Fixed version (ground truth):
List<WanReplicationEvent> getFailureQ(){
  return failureQ;
}
Program: 47015
Project: 47015
Buggy source:
@Test public void interruptedReplicationShouldNotDropAnEvent() throws InterruptedException {
  WanNoDelayReplication replication=spy(new WanNoDelayReplication());
  doThrow(InterruptedException.class).when(replication).getConnection();
  ReplicationEventObject eventObject=new MapReplicationUpdate();
  replication.publishReplicationEvent("String_Node_Str",eventObject);
  replication.run();
  replication.shutdown();
  assertEquals(0,replication.getEventQueue().size());
  assertEquals(1,replication.getFailureQ().size());
  assertSame(eventObject,replication.getFailureQ().peek().getEventObject());
}

Fixed version (ground truth):
@Test public void interruptedReplicationShouldNotDropAnEvent() throws InterruptedException {
  WanNoDelayReplication replication=spy(new WanNoDelayReplication());
  doThrow(InterruptedException.class).when(replication).getConnection();
  ReplicationEventObject eventObject=new MapReplicationUpdate();
  replication.publishReplicationEvent("String_Node_Str",eventObject);
  replication.run();
  replication.shutdown();
  assertEquals(0,replication.getEventQueue().size());
  assertEquals(1,replication.getFailureQ().size());
  assertSame(eventObject,replication.getFailureQ().get(0).getEventObject());
}
Program: 47017
Project: 47017
Buggy source:
private void executeTask(Runnable task){
  NonBlockingIOThread target=getTargetIoThread(task);
  if (target == this) {
    task.run();
  }
 else {
    target.addTask(task);
  }
}

Fixed version (ground truth):
private void executeTask(Runnable task){
  NonBlockingIOThread target=getTargetIoThread(task);
  if (target == this) {
    task.run();
  }
 else {
    target.addTaskAndWakeup(task);
  }
}
Program: 47018
Project: 47018
Buggy source:
/** 
 * Adds a task to be executed by the NonBlockingIOThread and wakes up the selector so that it will eventually pick up the task.
 * @param task the task to add.
 * @throws NullPointerException if task is null
 */
public final void addTaskAndWakeup(Runnable task){
  taskQueue.add(task);
  if (!selectNow) {
    selector.wakeup();
  }
}

Fixed version (ground truth):
/** 
 * Adds a task to be executed by the NonBlockingIOThread and wakes up the selector so that it will eventually pick up the task.
 * @param task the task to add.
 * @throws NullPointerException if task is null
 */
public void addTaskAndWakeup(Runnable task){
  taskQueue.add(task);
  if (!selectNow) {
    selector.wakeup();
  }
}
Program: 47019
Project: 47019
Buggy source:
/** 
 * Overrides the public address of a member. Behind a NAT, two endpoints may not be able to see/access each other.  If both nodes set their public addresses to their defined addresses on NAT, then that way  they can communicate with each other. It should be set in the format “host IP address:port number”.
 */
public NetworkConfig setPublicAddress(String publicAddress){
  this.publicAddress=publicAddress;
  return this;
}

Fixed version (ground truth):
/** 
 * Overrides the public address of a member. Behind a NAT, two endpoints may not be able to see/access each other. If both nodes set their public addresses to their defined addresses on NAT, then that way they can communicate with each other. It should be set in the format “host IP address:port number”.
 */
public NetworkConfig setPublicAddress(String publicAddress){
  this.publicAddress=publicAddress;
  return this;
}
Program: 47020
Project: 47020
Buggy source:
@Override public void run(){
  if (!alive) {
    return;
  }
  final long now=Clock.currentTimeMillis();
  for (  ClientConnection connection : connections.values()) {
    if (now - connection.lastReadTime() > heartBeatTimeout) {
      if (connection.isHeartBeating()) {
        LOGGER.warning("String_Node_Str" + connection);
        connection.heartBeatingFailed();
        fireHeartBeatStopped(connection);
      }
    }
    if (now - connection.lastReadTime() > heartBeatInterval) {
      ClientMessage request=ClientPingCodec.encodeRequest();
      ClientInvocation clientInvocation=new ClientInvocation(client,request,connection);
      clientInvocation.setBypassHeartbeatCheck(true);
      clientInvocation.invoke();
    }
 else {
      if (!connection.isHeartBeating()) {
        LOGGER.warning("String_Node_Str" + connection);
        connection.heartBeatingSucceed();
        fireHeartBeatStarted(connection);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!alive) {
    return;
  }
  final long now=Clock.currentTimeMillis();
  for (  ClientConnection connection : connections.values()) {
    if (now - connection.lastReadTimeMillis() > heartBeatTimeout) {
      if (connection.isHeartBeating()) {
        LOGGER.warning("String_Node_Str" + connection);
        connection.heartBeatingFailed();
        fireHeartBeatStopped(connection);
      }
    }
    if (now - connection.lastReadTimeMillis() > heartBeatInterval) {
      ClientMessage request=ClientPingCodec.encodeRequest();
      ClientInvocation clientInvocation=new ClientInvocation(client,request,connection);
      clientInvocation.setBypassHeartbeatCheck(true);
      clientInvocation.invoke();
    }
 else {
      if (!connection.isHeartBeating()) {
        LOGGER.warning("String_Node_Str" + connection);
        connection.heartBeatingSucceed();
        fireHeartBeatStarted(connection);
      }
    }
  }
}
Program: 47021
Project: 47021
Buggy source:
@Override public void run(){
  if (!alive) {
    return;
  }
  final long now=Clock.currentTimeMillis();
  for (  ClientConnection connection : connections.values()) {
    if (now - connection.lastReadTime() > heartBeatTimeout) {
      if (connection.isHeartBeating()) {
        connection.heartBeatingFailed();
        fireHeartBeatStopped(connection);
      }
    }
    if (now - connection.lastReadTime() > heartBeatInterval) {
      final ClientPingRequest request=new ClientPingRequest();
      new ClientInvocation(client,request,connection).invoke();
    }
 else {
      if (!connection.isHeartBeating()) {
        connection.heartBeatingSucceed();
        fireHeartBeatStarted(connection);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!alive) {
    return;
  }
  final long now=Clock.currentTimeMillis();
  for (  ClientConnection connection : connections.values()) {
    if (now - connection.lastReadTimeMillis() > heartBeatTimeout) {
      if (connection.isHeartBeating()) {
        connection.heartBeatingFailed();
        fireHeartBeatStopped(connection);
      }
    }
    if (now - connection.lastReadTimeMillis() > heartBeatInterval) {
      final ClientPingRequest request=new ClientPingRequest();
      new ClientInvocation(client,request,connection).invoke();
    }
 else {
      if (!connection.isHeartBeating()) {
        connection.heartBeatingSucceed();
        fireHeartBeatStarted(connection);
      }
    }
  }
}
Program: 47022
Project: 47022
Buggy source:
private void monitor(String memberUuid,ClientEndpointImpl clientEndpoint){
  if (clientEndpoint.isFirstConnection()) {
    return;
  }
  final Connection connection=clientEndpoint.getConnection();
  final long lastTimePackageReceived=connection.lastReadTime();
  final long timeoutInMillis=TimeUnit.SECONDS.toMillis(heartbeatTimeoutSeconds);
  final long currentTimeInMillis=Clock.currentTimeMillis();
  if (lastTimePackageReceived + timeoutInMillis < currentTimeInMillis) {
    if (memberUuid.equals(clientEndpoint.getPrincipal().getOwnerUuid())) {
      logger.log(Level.WARNING,"String_Node_Str" + connection);
      connection.close();
    }
  }
}

Fixed version (ground truth):
private void monitor(String memberUuid,ClientEndpointImpl clientEndpoint){
  if (clientEndpoint.isFirstConnection()) {
    return;
  }
  final Connection connection=clientEndpoint.getConnection();
  final long lastTimePackageReceived=connection.lastReadTimeMillis();
  final long timeoutInMillis=TimeUnit.SECONDS.toMillis(heartbeatTimeoutSeconds);
  final long currentTimeInMillis=Clock.currentTimeMillis();
  if (lastTimePackageReceived + timeoutInMillis < currentTimeInMillis) {
    if (memberUuid.equals(clientEndpoint.getPrincipal().getOwnerUuid())) {
      logger.log(Level.WARNING,"String_Node_Str" + connection);
      connection.close();
    }
  }
}
Program: 47023
Project: 47023
Buggy source:
@Override public void removeAll(Set<Data> keys,int completionId){
  final long now=Clock.currentTimeMillis();
  final Set<Data> localKeys=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
  try {
    deleteAllCacheEntry(localKeys);
  }
  finally {
    final Set<Data> keysToClean=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
    for (    Data key : keysToClean) {
      eventsBatchingEnabled=true;
      final R record=records.get(key);
      if (localKeys.contains(key) && record != null) {
        final boolean isExpired=processExpiredEntry(key,record,now);
        if (!isExpired) {
          deleteRecord(key,IGNORE_COMPLETION);
          if (isStatisticsEnabled()) {
            statistics.increaseCacheRemovals(1);
          }
        }
        keys.add(key);
      }
 else {
        keys.remove(key);
      }
      eventsBatchingEnabled=false;
      hasExpiringEntry=false;
    }
    int orderKey=keys.hashCode();
    publishBatchedEvents(name,CacheEventType.REMOVED,orderKey);
    if (isEventsEnabled()) {
      publishEvent(createCacheCompleteEvent(new DefaultData(),completionId));
    }
  }
}

Fixed version (ground truth):
@Override public void removeAll(Set<Data> keys,int completionId){
  final long now=Clock.currentTimeMillis();
  final Set<Data> localKeys=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
  try {
    deleteAllCacheEntry(localKeys);
  }
  finally {
    final Set<Data> keysToClean=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
    for (    Data key : keysToClean) {
      eventsBatchingEnabled=true;
      final R record=records.get(key);
      if (localKeys.contains(key) && record != null) {
        final boolean isExpired=processExpiredEntry(key,record,now);
        if (!isExpired) {
          deleteRecord(key,IGNORE_COMPLETION);
          if (isStatisticsEnabled()) {
            statistics.increaseCacheRemovals(1);
          }
        }
        keys.add(key);
      }
 else {
        keys.remove(key);
      }
      eventsBatchingEnabled=false;
      hasExpiringEntry=false;
    }
    int orderKey=keys.hashCode();
    publishBatchedEvents(name,CacheEventType.REMOVED,orderKey);
    if (isEventsEnabled()) {
      publishEvent(createCacheCompleteEvent(completionId));
    }
  }
}
Program: 47024
Project: 47024
Buggy source:
public void setAccessHit(long accessHit){
  this.accessHit=accessHit;
}

Fixed version (ground truth):
public CacheEventContext setAccessHit(long accessHit){
  this.accessHit=accessHit;
  return this;
}
Program: 47025
Project: 47025
Buggy source:
public void setIsOldValueAvailable(boolean isOldValueAvailable){
  this.isOldValueAvailable=isOldValueAvailable;
}

Fixed version (ground truth):
public CacheEventContext setIsOldValueAvailable(boolean isOldValueAvailable){
  this.isOldValueAvailable=isOldValueAvailable;
  return this;
}
Program: 47026
Project: 47026
Buggy source:
public void setExpirationTime(long expirationTime){
  this.expirationTime=expirationTime;
}

Fixed version (ground truth):
public CacheEventContext setExpirationTime(long expirationTime){
  this.expirationTime=expirationTime;
  return this;
}
Program: 47027
Project: 47027
Buggy source:
public void setOrigin(String origin){
  this.origin=origin;
}

Fixed version (ground truth):
public CacheEventContext setOrigin(String origin){
  this.origin=origin;
  return this;
}
Program: 47028
Project: 47028
Buggy source:
public void setDataKey(Data dataKey){
  this.dataKey=dataKey;
}

Fixed version (ground truth):
public CacheEventContext setDataKey(Data dataKey){
  this.dataKey=dataKey;
  return this;
}
Program: 47029
Project: 47029
Buggy source:
public void setEventType(CacheEventType eventType){
  this.eventType=eventType;
}

Fixed version (ground truth):
public CacheEventContext setEventType(CacheEventType eventType){
  this.eventType=eventType;
  return this;
}
Program: 47030
Project: 47030
Buggy source:
public void setCacheName(String cacheName){
  this.cacheName=cacheName;
}

Fixed version (ground truth):
public CacheEventContext setCacheName(String cacheName){
  this.cacheName=cacheName;
  return this;
}
Program: 47031
Project: 47031
Buggy source:
public void setDataValue(Data dataValue){
  this.dataValue=dataValue;
}

Fixed version (ground truth):
public CacheEventContext setDataValue(Data dataValue){
  this.dataValue=dataValue;
  return this;
}
Program: 47032
Project: 47032
Buggy source:
public void setCompletionId(int completionId){
  this.completionId=completionId;
}

Fixed version (ground truth):
public CacheEventContext setCompletionId(int completionId){
  this.completionId=completionId;
  return this;
}
Program: 47033
Project: 47033
Buggy source:
public void setOrderKey(int orderKey){
  this.orderKey=orderKey;
}

Fixed version (ground truth):
public CacheEventContext setOrderKey(int orderKey){
  this.orderKey=orderKey;
  return this;
}
Program: 47034
Project: 47034
Buggy source:
public void setDataOldValue(Data dataOldValue){
  this.dataOldValue=dataOldValue;
}

Fixed version (ground truth):
public CacheEventContext setDataOldValue(Data dataOldValue){
  this.dataOldValue=dataOldValue;
  return this;
}
Program: 47035
Project: 47035
Buggy source:
@Override public void beforeRun() throws Exception {
  ICacheService service=getService();
  cache=service.getCacheRecordStore(name,getPartitionId());
}

Fixed version (ground truth):
@Override public void beforeRun() throws Exception {
  service=getService();
  cache=service.getCacheRecordStore(name,getPartitionId());
}
Program: 47036
Project: 47036
Buggy source:
@Override public void run() throws Exception {
  if (cache == null) {
    return;
  }
  filterKeys();
  try {
    if (keys == null) {
      cache.removeAll(filteredKeys,completionId);
    }
 else     if (!filteredKeys.isEmpty()) {
      cache.removeAll(filteredKeys,completionId);
    }
    response=new CacheClearResponse(Boolean.TRUE);
  }
 catch (  CacheException e) {
    response=new CacheClearResponse(e);
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  if (cache == null) {
    service.publishEvent(createCacheCompleteEvent(completionId).setCacheName(name));
    return;
  }
  filterKeys();
  try {
    if (keys == null) {
      cache.removeAll(filteredKeys,completionId);
    }
 else     if (!filteredKeys.isEmpty()) {
      cache.removeAll(filteredKeys,completionId);
    }
 else {
      service.publishEvent(createCacheCompleteEvent(completionId).setCacheName(name));
    }
    response=new CacheClearResponse(Boolean.TRUE);
  }
 catch (  CacheException e) {
    response=new CacheClearResponse(e);
  }
}
Program: 47037
Project: 47037
Buggy source:
@Override public void removeAll(Set<Data> keys,int completionId){
  final long now=Clock.currentTimeMillis();
  final Set<Data> localKeys=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
  try {
    deleteAllCacheEntry(localKeys);
  }
  finally {
    final Set<Data> keysToClean=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
    for (    Data key : keysToClean) {
      eventsBatchingEnabled=true;
      final R record=records.get(key);
      if (localKeys.contains(key) && record != null) {
        final boolean isExpired=processExpiredEntry(key,record,now);
        if (!isExpired) {
          deleteRecord(key,IGNORE_COMPLETION);
          if (isStatisticsEnabled()) {
            statistics.increaseCacheRemovals(1);
          }
        }
        keys.add(key);
      }
 else {
        keys.remove(key);
      }
      eventsBatchingEnabled=false;
      hasExpiringEntry=false;
    }
    int orderKey=keys.hashCode();
    publishBatchedEvents(name,CacheEventType.REMOVED,orderKey);
    if (isEventsEnabled()) {
      publishEvent(createCacheCompleteEvent(new HeapData(),completionId));
    }
  }
}

Fixed version (ground truth):
@Override public void removeAll(Set<Data> keys,int completionId){
  final long now=Clock.currentTimeMillis();
  final Set<Data> localKeys=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
  try {
    deleteAllCacheEntry(localKeys);
  }
  finally {
    final Set<Data> keysToClean=new HashSet<Data>(keys.isEmpty() ? records.keySet() : keys);
    for (    Data key : keysToClean) {
      eventsBatchingEnabled=true;
      final R record=records.get(key);
      if (localKeys.contains(key) && record != null) {
        final boolean isExpired=processExpiredEntry(key,record,now);
        if (!isExpired) {
          deleteRecord(key,IGNORE_COMPLETION);
          if (isStatisticsEnabled()) {
            statistics.increaseCacheRemovals(1);
          }
        }
        keys.add(key);
      }
 else {
        keys.remove(key);
      }
      eventsBatchingEnabled=false;
      hasExpiringEntry=false;
    }
    int orderKey=keys.hashCode();
    publishBatchedEvents(name,CacheEventType.REMOVED,orderKey);
    if (isEventsEnabled()) {
      publishEvent(createCacheCompleteEvent(completionId));
    }
  }
}
Program: 47038
Project: 47038
Buggy source:
public void setAccessHit(long accessHit){
  this.accessHit=accessHit;
}

Fixed version (ground truth):
public CacheEventContext setAccessHit(long accessHit){
  this.accessHit=accessHit;
  return this;
}
Program: 47039
Project: 47039
Buggy source:
public void setIsOldValueAvailable(boolean isOldValueAvailable){
  this.isOldValueAvailable=isOldValueAvailable;
}

Fixed version (ground truth):
public CacheEventContext setIsOldValueAvailable(boolean isOldValueAvailable){
  this.isOldValueAvailable=isOldValueAvailable;
  return this;
}
Program: 47040
Project: 47040
Buggy source:
public void setExpirationTime(long expirationTime){
  this.expirationTime=expirationTime;
}

Fixed version (ground truth):
public CacheEventContext setExpirationTime(long expirationTime){
  this.expirationTime=expirationTime;
  return this;
}
Program: 47041
Project: 47041
Buggy source:
public void setOrigin(String origin){
  this.origin=origin;
}

Fixed version (ground truth):
public CacheEventContext setOrigin(String origin){
  this.origin=origin;
  return this;
}
Program: 47042
Project: 47042
Buggy source:
public void setDataKey(Data dataKey){
  this.dataKey=dataKey;
}

Fixed version (ground truth):
public CacheEventContext setDataKey(Data dataKey){
  this.dataKey=dataKey;
  return this;
}
Program: 47043
Project: 47043
Buggy source:
public void setEventType(CacheEventType eventType){
  this.eventType=eventType;
}

Fixed version (ground truth):
public CacheEventContext setEventType(CacheEventType eventType){
  this.eventType=eventType;
  return this;
}
Program: 47044
Project: 47044
Buggy source:
public void setCacheName(String cacheName){
  this.cacheName=cacheName;
}

Fixed version (ground truth):
public CacheEventContext setCacheName(String cacheName){
  this.cacheName=cacheName;
  return this;
}
Program: 47045
Project: 47045
Buggy source:
public void setDataValue(Data dataValue){
  this.dataValue=dataValue;
}

Fixed version (ground truth):
public CacheEventContext setDataValue(Data dataValue){
  this.dataValue=dataValue;
  return this;
}
Program: 47046
Project: 47046
Buggy source:
public void setCompletionId(int completionId){
  this.completionId=completionId;
}

Fixed version (ground truth):
public CacheEventContext setCompletionId(int completionId){
  this.completionId=completionId;
  return this;
}
Program: 47047
Project: 47047
Buggy source:
public void setOrderKey(int orderKey){
  this.orderKey=orderKey;
}

Fixed version (ground truth):
public CacheEventContext setOrderKey(int orderKey){
  this.orderKey=orderKey;
  return this;
}
Program: 47048
Project: 47048
Buggy source:
public void setDataOldValue(Data dataOldValue){
  this.dataOldValue=dataOldValue;
}

Fixed version (ground truth):
public CacheEventContext setDataOldValue(Data dataOldValue){
  this.dataOldValue=dataOldValue;
  return this;
}
Program: 47049
Project: 47049
Buggy source:
@Override public void beforeRun() throws Exception {
  ICacheService service=getService();
  cache=service.getRecordStore(name,getPartitionId());
}

Fixed version (ground truth):
@Override public void beforeRun() throws Exception {
  service=getService();
  cache=service.getRecordStore(name,getPartitionId());
}
Program: 47050
Project: 47050
Buggy source:
@Override public void run() throws Exception {
  if (cache == null) {
    return;
  }
  filterKeys();
  try {
    if (keys == null) {
      cache.removeAll(filteredKeys,completionId);
    }
 else     if (!filteredKeys.isEmpty()) {
      cache.removeAll(filteredKeys,completionId);
    }
    response=new CacheClearResponse(Boolean.TRUE);
  }
 catch (  CacheException e) {
    response=new CacheClearResponse(e);
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  if (cache == null) {
    service.publishEvent(createCacheCompleteEvent(completionId).setCacheName(name));
    return;
  }
  filterKeys();
  try {
    if (keys == null) {
      cache.removeAll(filteredKeys,completionId);
    }
 else     if (!filteredKeys.isEmpty()) {
      cache.removeAll(filteredKeys,completionId);
    }
 else {
      service.publishEvent(createCacheCompleteEvent(completionId).setCacheName(name));
    }
    response=new CacheClearResponse(Boolean.TRUE);
  }
 catch (  CacheException e) {
    response=new CacheClearResponse(e);
  }
}
Program: 47051
Project: 47051
Buggy source:
static StringCreator createStringCreator(boolean fastStringEnabled){
  return fastStringEnabled ? buildFastStringCreator() : new DefaultStringCreator();
}

Fixed version (ground truth):
static StringCreator createStringCreator(boolean fastStringEnabled){
  StringCreator stringCreator=fastStringEnabled ? buildFastStringCreator() : new DefaultStringCreator();
  if (stringCreator == null) {
    stringCreator=new DefaultStringCreator();
  }
  return stringCreator;
}
Program: 47052
Project: 47052
Buggy source:
static StringCreator createStringCreator(boolean fastStringEnabled){
  return fastStringEnabled ? buildFastStringCreator() : new DefaultStringCreator();
}

Fixed version (ground truth):
static StringCreator createStringCreator(boolean fastStringEnabled){
  StringCreator stringCreator=fastStringEnabled ? buildFastStringCreator() : new DefaultStringCreator();
  if (stringCreator == null) {
    stringCreator=new DefaultStringCreator();
  }
  return stringCreator;
}
Program: 47053
Project: 47053
Buggy source:
private <T extends EventListener>T initializeListener(ListenerConfig listenerConfig){
  T listener=null;
  if (listenerConfig.getImplementation() != null) {
    listener=(T)listenerConfig.getImplementation();
  }
 else   if (listenerConfig.getClassName() != null) {
    try {
      return ClassLoaderUtil.newInstance(getNodeEngine().getConfigClassLoader(),listenerConfig.getClassName());
    }
 catch (    Exception e) {
      throw ExceptionUtil.rethrow(e);
    }
  }
  if (listener instanceof HazelcastInstanceAware) {
    ((HazelcastInstanceAware)listener).setHazelcastInstance(getNodeEngine().getHazelcastInstance());
  }
  return listener;
}

Fixed version (ground truth):
private <T extends EventListener>T initializeListener(ListenerConfig listenerConfig){
  T listener=getListenerImplOrNull(listenerConfig);
  if (listener instanceof HazelcastInstanceAware) {
    ((HazelcastInstanceAware)listener).setHazelcastInstance(getNodeEngine().getHazelcastInstance());
  }
  return listener;
}
Program: 47054
Project: 47054
Buggy source:
@Test public void testListener() throws InterruptedException {
  ITopic topic=client.getReliableTopic(randomString());
  final CountDownLatch latch=new CountDownLatch(10);
  MessageListener listener=new MessageListener(){
    public void onMessage(    Message message){
      System.out.println("String_Node_Str");
      latch.countDown();
    }
  }
;
  topic.addMessageListener(listener);
  for (int i=0; i < 10; i++) {
    topic.publish(i);
  }
  assertTrue(latch.await(20,TimeUnit.SECONDS));
}

Fixed version (ground truth):
@Test public void testListener() throws InterruptedException {
  ITopic topic=client.getReliableTopic(randomString());
  int messageCount=10;
  final CountDownLatch latch=new CountDownLatch(messageCount);
  MessageListener listener=new MessageListener(){
    public void onMessage(    Message message){
      System.out.println("String_Node_Str");
      latch.countDown();
    }
  }
;
  topic.addMessageListener(listener);
  for (int i=0; i < messageCount; i++) {
    topic.publish(i);
  }
  assertTrue(latch.await(20,TimeUnit.SECONDS));
}
Program: 47055
Project: 47055
Buggy source:
@Override protected Object filter(Object response){
  ReadResultSetImpl readResultSet=(ReadResultSetImpl)response;
  int readCount=readResultSet.readCount();
  List<Data> items=new ArrayList<Data>(readCount);
  for (  Data item : readResultSet.getDataItems()) {
    items.add(item);
  }
  return new PortableReadResultSet<Object>(readCount,items);
}

Fixed version (ground truth):
@Override protected Object filter(Object response){
  ReadResultSetImpl readResultSet=(ReadResultSetImpl)response;
  int size=readResultSet.size();
  List<Data> items=new ArrayList<Data>(size);
  Data[] dataItems=readResultSet.getDataItems();
  for (int k=0; k < size; k++) {
    items.add(dataItems[k]);
  }
  int readCount=readResultSet.readCount();
  return new PortableReadResultSet<Object>(readCount,items);
}
Program: 47056
Project: 47056
Buggy source:
public static String getReturnDescription(String commentString){
  String result="String_Node_Str";
  final String RETURN_TAG="String_Node_Str";
  int returnTagStartIndex=commentString.indexOf(RETURN_TAG);
  if (returnTagStartIndex >= 0) {
    int descriptionStartIndex=returnTagStartIndex + RETURN_TAG.length();
    int nextTagIndex=commentString.indexOf("String_Node_Str",descriptionStartIndex);
    if (nextTagIndex >= 0) {
      result=commentString.substring(descriptionStartIndex,nextTagIndex);
    }
 else {
      result=commentString.substring(descriptionStartIndex);
    }
    result.trim();
    result=result.replace("String_Node_Str","String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
public static String getReturnDescription(String commentString){
  String result="String_Node_Str";
  final String RETURN_TAG="String_Node_Str";
  int returnTagStartIndex=commentString.indexOf(RETURN_TAG);
  if (returnTagStartIndex >= 0) {
    int descriptionStartIndex=returnTagStartIndex + RETURN_TAG.length();
    int nextTagIndex=commentString.indexOf("String_Node_Str",descriptionStartIndex);
    if (nextTagIndex >= 0) {
      result=commentString.substring(descriptionStartIndex,nextTagIndex);
    }
 else {
      result=commentString.substring(descriptionStartIndex);
    }
    result=result.trim();
    result=result.replace("String_Node_Str","String_Node_Str");
  }
  return result;
}
Program: 47057
Project: 47057
Buggy source:
public AddAllRequest(String name,Data[] items,OverflowPolicy overflowPolicy){
  super(name);
  this.items=items;
  this.overflowPolicy=overflowPolicy;
}

Fixed version (ground truth):
@edu.umd.cs.findbugs.annotations.SuppressWarnings({"String_Node_Str"}) public AddAllRequest(String name,Data[] items,OverflowPolicy overflowPolicy){
  super(name);
  this.items=items;
  this.overflowPolicy=overflowPolicy;
}