nus-yam/ex-repair huggingface dataset:
Program: 93117
Project: 93117
Buggy source:
@Test public void testDeleteBlobsFail(){
  String sourceBlobName1="String_Node_Str";
  String sourceBlobName2="String_Node_Str";
  BlobInfo sourceBlob1=BlobInfo.builder(BUCKET,sourceBlobName1).build();
  BlobInfo sourceBlob2=BlobInfo.builder(BUCKET,sourceBlobName2).build();
  assertNotNull(storage.create(sourceBlob1));
  List<Boolean> deleteStatus=storage.delete(sourceBlob1.blobId(),sourceBlob2.blobId());
  assertTrue(deleteStatus.get(0));
  assertTrue(!deleteStatus.get(1));
}

Fixed version (ground truth):
@Test public void testDeleteBlobsFail(){
  String sourceBlobName1="String_Node_Str";
  String sourceBlobName2="String_Node_Str";
  BlobInfo sourceBlob1=BlobInfo.builder(BUCKET,sourceBlobName1).build();
  BlobInfo sourceBlob2=BlobInfo.builder(BUCKET,sourceBlobName2).build();
  assertNotNull(storage.create(sourceBlob1));
  List<Boolean> deleteStatus=storage.delete(sourceBlob1.blobId(),sourceBlob2.blobId());
  assertTrue(deleteStatus.get(0));
  assertFalse(deleteStatus.get(1));
}
Program: 93118
Project: 93118
Buggy source:
@Test public void testDeleteNonExistingBlob(){
  String blobName="String_Node_Str";
  assertTrue(!storage.delete(BUCKET,blobName));
}

Fixed version (ground truth):
@Test public void testDeleteNonExistingBlob(){
  String blobName="String_Node_Str";
  assertFalse(storage.delete(BUCKET,blobName));
}
Program: 93119
Project: 93119
Buggy source:
@Test public void testDeleteBlobNonExistingGeneration(){
  String blobName="String_Node_Str";
  BlobInfo blob=BlobInfo.builder(BUCKET,blobName).build();
  assertNotNull(storage.create(blob));
  assertTrue(!storage.delete(BlobId.of(BUCKET,blobName,-1L)));
}

Fixed version (ground truth):
@Test public void testDeleteBlobNonExistingGeneration(){
  String blobName="String_Node_Str";
  BlobInfo blob=BlobInfo.builder(BUCKET,blobName).build();
  assertNotNull(storage.create(blob));
  assertFalse(storage.delete(BlobId.of(BUCKET,blobName,-1L)));
}
Program: 93120
Project: 93120
Buggy source:
@AfterClass public static void afterClass() throws ExecutionException, InterruptedException {
  if (storage != null && !RemoteGcsHelper.forceDelete(storage,BUCKET,5,TimeUnit.SECONDS)) {
    if (log.isLoggable(Level.WARNING)) {
      log.log(Level.WARNING,"String_Node_Str",BUCKET);
    }
  }
}

Fixed version (ground truth):
@AfterClass public static void afterClass() throws ExecutionException, InterruptedException {
  if (storage != null && !RemoteGcsHelper.forceDelete(storage,BUCKET,5,TimeUnit.SECONDS) && log.isLoggable(Level.WARNING)) {
    log.log(Level.WARNING,"String_Node_Str",BUCKET);
  }
}
Program: 93121
Project: 93121
Buggy source:
/** 
 * Adds a row to be inserted without an associated id. <p>Example usage of adding a row without an associated id: <pre>      {@code InsertAllRequest.Builder builder = InsertAllRequest.builder(tableId); List<Long> repeatedFieldValue = Arrays.asList(1L, 2L); Map<String, Object> recordContent = new HashMap<String, Object>(); recordContent.put("subfieldName1", "value"); recordContent.put("subfieldName2", repeatedFieldValue); Map<String, Object> rowContent = new HashMap<String, Object>(); rowContent.put("fieldName1", true); rowContent.put("fieldName2", recordContent); builder.addRow(rowContent);}</pre>
 */
public Builder addRow(Map<String,Object> content){
  addRow(new RowToInsert(null,content));
  return this;
}

Fixed version (ground truth):
/** 
 * Adds a row to be inserted without an associated id. <p>Example usage of adding a row without an associated id: <pre>     {@code InsertAllRequest.Builder builder = InsertAllRequest.builder(tableId); List<Long> repeatedFieldValue = Arrays.asList(1L, 2L); Map<String, Object> recordContent = new HashMap<String, Object>(); recordContent.put("subfieldName1", "value"); recordContent.put("subfieldName2", repeatedFieldValue); Map<String, Object> rowContent = new HashMap<String, Object>(); rowContent.put("fieldName1", true); rowContent.put("fieldName2", recordContent); builder.addRow(rowContent);}</pre>
 */
public Builder addRow(Map<String,Object> content){
  addRow(new RowToInsert(null,content));
  return this;
}
Program: 93122
Project: 93122
Buggy source:
/** 
 * Sends a copy request. Returns a   {@link CopyWriter} object for the provided{@code CopyRequest}. If source and destination objects share the same location and storage class the source blob is copied with one request and   {@link CopyWriter#result()} immediatelyreturns, regardless of the  {@link CopyRequest#megabytesCopiedPerChunk} parameter.If source and destination have different location or storage class  {@link CopyWriter#result()}might issue multiple RPC calls depending on blob's size. <p>Example usage of copy: <pre>      {@code BlobInfo blob = service.copy(copyRequest).result();}</pre> To explicitly issue chunk copy requests use   {@link CopyWriter#copyChunk()} instead:<pre>     {@code CopyWriter copyWriter = service.copy(copyRequest);}while (!copyWriter.isDone())  copyWriter.copyChunk(); } BlobInfo blob = copyWriter.result(); } </pre>
 * @return a {@link CopyWriter} object that can be used to get information on the newly createdblob or to complete the copy if more than one RPC request is needed
 * @throws StorageException upon failure
 * @see <a href="https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite">Rewrite</a>
 */
CopyWriter copy(CopyRequest copyRequest);

Fixed version (ground truth):
/** 
 * Sends a copy request. Returns a   {@link CopyWriter} object for the provided{@code CopyRequest}. If source and destination objects share the same location and storage class the source blob is copied with one request and   {@link CopyWriter#result()} immediatelyreturns, regardless of the  {@link CopyRequest#megabytesCopiedPerChunk} parameter.If source and destination have different location or storage class  {@link CopyWriter#result()}might issue multiple RPC calls depending on blob's size. <p>Example usage of copy: <pre>      {@code BlobInfo blob = service.copy(copyRequest).result();}</pre> To explicitly issue chunk copy requests use   {@link CopyWriter#copyChunk()} instead:<pre>      {@code CopyWriter copyWriter = service.copy(copyRequest);}while (!copyWriter.isDone())  copyWriter.copyChunk(); } BlobInfo blob = copyWriter.result(); } </pre>
 * @return a {@link CopyWriter} object that can be used to get information on the newly createdblob or to complete the copy if more than one RPC request is needed
 * @throws StorageException upon failure
 * @see <a href="https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite">Rewrite</a>
 */
CopyWriter copy(CopyRequest copyRequest);
Program: 93123
Project: 93123
Buggy source:
protected static com.google.protobuf.Timestamp microsecondsToTimestampPb(long microseconds){
  long seconds=microseconds / 1000000;
  int nanos=(int)(microseconds % 1000000) * 1000;
  return com.google.protobuf.Timestamp.newBuilder().setSeconds(seconds).setNanos(nanos).build();
}

Fixed version (ground truth):
static com.google.protobuf.Timestamp microsecondsToTimestampPb(long microseconds){
  long seconds=microseconds / 1000000;
  int nanos=(int)(microseconds % 1000000) * 1000;
  return com.google.protobuf.Timestamp.newBuilder().setSeconds(seconds).setNanos(nanos).build();
}
Program: 93124
Project: 93124
Buggy source:
protected static long timestampPbToMicroseconds(com.google.protobuf.Timestamp timestampPb){
  return timestampPb.getSeconds() * 1000000 + timestampPb.getNanos() / 1000;
}

Fixed version (ground truth):
static long timestampPbToMicroseconds(com.google.protobuf.Timestamp timestampPb){
  return timestampPb.getSeconds() * 1000000 + timestampPb.getNanos() / 1000;
}
Program: 93125
Project: 93125
Buggy source:
@Override protected T computeNext(){
  while (!entityResultPbIter.hasNext() && !lastBatch) {
    query=query.nextQuery(runQueryResponsePb);
    sendRequest();
  }
  if (!entityResultPbIter.hasNext()) {
    return endOfData();
  }
  com.google.datastore.v1beta3.EntityResult entityResultPb=entityResultPbIter.next();
  cursor=entityResultPb.getCursor();
  @SuppressWarnings("String_Node_Str") T result=(T)actualResultType.convert(entityResultPb.getEntity());
  return result;
}

Fixed version (ground truth):
@Override protected T computeNext(){
  while (!entityResultPbIter.hasNext() && !lastBatch) {
    query=query.nextQuery(runQueryResponsePb);
    sendRequest();
  }
  if (!entityResultPbIter.hasNext()) {
    cursor=runQueryResponsePb.getBatch().getEndCursor();
    return endOfData();
  }
  com.google.datastore.v1beta3.EntityResult entityResultPb=entityResultPbIter.next();
  cursor=entityResultPb.getCursor();
  @SuppressWarnings("String_Node_Str") T result=(T)actualResultType.convert(entityResultPb.getEntity());
  return result;
}
Program: 93126
Project: 93126
Buggy source:
@Test public void testTranslateAndThrow() throws Exception {
  DatastoreException cause=new DatastoreException(503,"String_Node_Str","String_Node_Str");
  RetryHelper.RetryHelperException exceptionMock=createMock(RetryHelper.RetryHelperException.class);
  expect(exceptionMock.getCause()).andReturn(cause).times(2);
  replay(exceptionMock);
  try {
    DatastoreException.translateAndThrow(exceptionMock);
  }
 catch (  BaseServiceException ex) {
    assertEquals(503,ex.code());
    assertEquals("String_Node_Str",ex.getMessage());
    assertTrue(ex.retryable());
    assertTrue(ex.idempotent());
  }
 finally {
    verify(exceptionMock);
  }
}

Fixed version (ground truth):
@Test public void testTranslateAndThrow() throws Exception {
  DatastoreException cause=new DatastoreException(14,"String_Node_Str","String_Node_Str");
  RetryHelper.RetryHelperException exceptionMock=createMock(RetryHelper.RetryHelperException.class);
  expect(exceptionMock.getCause()).andReturn(cause).times(2);
  replay(exceptionMock);
  try {
    DatastoreException.translateAndThrow(exceptionMock);
  }
 catch (  BaseServiceException ex) {
    assertEquals(14,ex.code());
    assertEquals("String_Node_Str",ex.getMessage());
    assertTrue(ex.retryable());
    assertTrue(ex.idempotent());
  }
 finally {
    verify(exceptionMock);
  }
}
Program: 93127
Project: 93127
Buggy source:
@Test public void testDatastoreException() throws Exception {
  DatastoreException exception=new DatastoreException(409,"String_Node_Str","String_Node_Str");
  assertEquals(409,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(403,"String_Node_Str","String_Node_Str");
  assertEquals(403,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(503,"String_Node_Str","String_Node_Str");
  assertEquals(503,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(500,"String_Node_Str","String_Node_Str");
  assertEquals(500,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertFalse(exception.retryable());
  assertTrue(exception.idempotent());
  IOException cause=new SocketTimeoutException();
  exception=new DatastoreException(cause);
  assertNull(exception.reason());
  assertNull(exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
}

Fixed version (ground truth):
@Test public void testDatastoreException() throws Exception {
  DatastoreException exception=new DatastoreException(10,"String_Node_Str","String_Node_Str");
  assertEquals(10,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(4,"String_Node_Str","String_Node_Str");
  assertEquals(4,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(14,"String_Node_Str","String_Node_Str");
  assertEquals(14,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
  exception=new DatastoreException(2,"String_Node_Str","String_Node_Str");
  assertEquals(2,exception.code());
  assertEquals("String_Node_Str",exception.reason());
  assertEquals("String_Node_Str",exception.getMessage());
  assertFalse(exception.retryable());
  assertTrue(exception.idempotent());
  IOException cause=new SocketTimeoutException();
  exception=new DatastoreException(cause);
  assertNull(exception.reason());
  assertNull(exception.getMessage());
  assertTrue(exception.retryable());
  assertTrue(exception.idempotent());
}
Program: 93128
Project: 93128
Buggy source:
@Test public void testRetryableException() throws Exception {
  com.google.datastore.v1beta3.LookupRequest requestPb=com.google.datastore.v1beta3.LookupRequest.newBuilder().addKeys(KEY1.toPb()).build();
  com.google.datastore.v1beta3.LookupResponse responsePb=com.google.datastore.v1beta3.LookupResponse.newBuilder().addFound(com.google.datastore.v1beta3.EntityResult.newBuilder().setEntity(ENTITY1.toPb())).build();
  DatastoreRpcFactory rpcFactoryMock=EasyMock.createStrictMock(DatastoreRpcFactory.class);
  DatastoreRpc rpcMock=EasyMock.createStrictMock(DatastoreRpc.class);
  EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(DatastoreOptions.class))).andReturn(rpcMock);
  EasyMock.expect(rpcMock.lookup(requestPb)).andThrow(new DatastoreException(503,"String_Node_Str","String_Node_Str",null)).andReturn(responsePb);
  EasyMock.replay(rpcFactoryMock,rpcMock);
  DatastoreOptions options=this.options.toBuilder().retryParams(RetryParams.defaultInstance()).serviceRpcFactory(rpcFactoryMock).build();
  Datastore datastore=options.service();
  Entity entity=datastore.get(KEY1);
  assertEquals(ENTITY1,entity);
  EasyMock.verify(rpcFactoryMock,rpcMock);
}

Fixed version (ground truth):
@Test public void testRetryableException() throws Exception {
  com.google.datastore.v1beta3.LookupRequest requestPb=com.google.datastore.v1beta3.LookupRequest.newBuilder().addKeys(KEY1.toPb()).build();
  com.google.datastore.v1beta3.LookupResponse responsePb=com.google.datastore.v1beta3.LookupResponse.newBuilder().addFound(com.google.datastore.v1beta3.EntityResult.newBuilder().setEntity(ENTITY1.toPb())).build();
  DatastoreRpcFactory rpcFactoryMock=EasyMock.createStrictMock(DatastoreRpcFactory.class);
  DatastoreRpc rpcMock=EasyMock.createStrictMock(DatastoreRpc.class);
  EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(DatastoreOptions.class))).andReturn(rpcMock);
  EasyMock.expect(rpcMock.lookup(requestPb)).andThrow(new DatastoreException(14,"String_Node_Str","String_Node_Str",null)).andReturn(responsePb);
  EasyMock.replay(rpcFactoryMock,rpcMock);
  DatastoreOptions options=this.options.toBuilder().retryParams(RetryParams.defaultInstance()).serviceRpcFactory(rpcFactoryMock).build();
  Datastore datastore=options.service();
  Entity entity=datastore.get(KEY1);
  assertEquals(ENTITY1,entity);
  EasyMock.verify(rpcFactoryMock,rpcMock);
}
Program: 93129
Project: 93129
Buggy source:
private Builder(com.google.api.services.bigquery.model.JobConfiguration configurationPb){
  super(Type.COPY);
  JobConfigurationTableCopy copyConfigurationPb=configurationPb.getCopy();
  this.destinationTable=TableId.fromPb(copyConfigurationPb.getDestinationTable());
  if (copyConfigurationPb.getSourceTables() != null) {
    this.sourceTables=Lists.transform(copyConfigurationPb.getSourceTables(),TableId.FROM_PB_FUNCTION);
  }
 else {
    this.sourceTables=ImmutableList.of(TableId.fromPb(copyConfigurationPb.getSourceTable()));
  }
  if (copyConfigurationPb.getCreateDisposition() != null) {
    this.createDisposition=JobInfo.CreateDisposition.valueOf(copyConfigurationPb.getCreateDisposition());
  }
  if (copyConfigurationPb.getWriteDisposition() != null) {
    this.writeDisposition=JobInfo.WriteDisposition.valueOf(copyConfigurationPb.getWriteDisposition());
  }
}

Fixed version (ground truth):
private Builder(com.google.api.services.bigquery.model.JobConfiguration configurationPb){
  this();
  JobConfigurationTableCopy copyConfigurationPb=configurationPb.getCopy();
  this.destinationTable=TableId.fromPb(copyConfigurationPb.getDestinationTable());
  if (copyConfigurationPb.getSourceTables() != null) {
    this.sourceTables=Lists.transform(copyConfigurationPb.getSourceTables(),TableId.FROM_PB_FUNCTION);
  }
 else {
    this.sourceTables=ImmutableList.of(TableId.fromPb(copyConfigurationPb.getSourceTable()));
  }
  if (copyConfigurationPb.getCreateDisposition() != null) {
    this.createDisposition=JobInfo.CreateDisposition.valueOf(copyConfigurationPb.getCreateDisposition());
  }
  if (copyConfigurationPb.getWriteDisposition() != null) {
    this.writeDisposition=JobInfo.WriteDisposition.valueOf(copyConfigurationPb.getWriteDisposition());
  }
}
Program: 93130
Project: 93130
Buggy source:
@Override protected ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",sourceTables).add("String_Node_Str",destinationTable).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition);
}

Fixed version (ground truth):
@Override ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",sourceTables).add("String_Node_Str",destinationTable).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition);
}
Program: 93131
Project: 93131
Buggy source:
private Builder(com.google.api.services.bigquery.model.JobConfiguration configurationPb){
  super(Type.EXTRACT);
  JobConfigurationExtract extractConfigurationPb=configurationPb.getExtract();
  this.sourceTable=TableId.fromPb(extractConfigurationPb.getSourceTable());
  this.destinationUris=extractConfigurationPb.getDestinationUris();
  this.printHeader=extractConfigurationPb.getPrintHeader();
  this.fieldDelimiter=extractConfigurationPb.getFieldDelimiter();
  this.format=extractConfigurationPb.getDestinationFormat();
  this.compression=extractConfigurationPb.getCompression();
}

Fixed version (ground truth):
private Builder(com.google.api.services.bigquery.model.JobConfiguration configurationPb){
  this();
  JobConfigurationExtract extractConfigurationPb=configurationPb.getExtract();
  this.sourceTable=TableId.fromPb(extractConfigurationPb.getSourceTable());
  this.destinationUris=extractConfigurationPb.getDestinationUris();
  this.printHeader=extractConfigurationPb.getPrintHeader();
  this.fieldDelimiter=extractConfigurationPb.getFieldDelimiter();
  this.format=extractConfigurationPb.getDestinationFormat();
  this.compression=extractConfigurationPb.getCompression();
}
Program: 93132
Project: 93132
Buggy source:
@Override protected ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",sourceTable).add("String_Node_Str",destinationUris).add("String_Node_Str",format).add("String_Node_Str",printHeader).add("String_Node_Str",fieldDelimiter).add("String_Node_Str",compression);
}

Fixed version (ground truth):
@Override ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",sourceTable).add("String_Node_Str",destinationUris).add("String_Node_Str",format).add("String_Node_Str",printHeader).add("String_Node_Str",fieldDelimiter).add("String_Node_Str",compression);
}
Program: 93133
Project: 93133
Buggy source:
protected final int baseHashCode(){
  return Objects.hash(type);
}

Fixed version (ground truth):
final int baseHashCode(){
  return Objects.hash(type);
}
Program: 93134
Project: 93134
Buggy source:
protected final boolean baseEquals(JobConfiguration jobConfiguration){
  return Objects.equals(toPb(),jobConfiguration.toPb());
}

Fixed version (ground truth):
final boolean baseEquals(JobConfiguration jobConfiguration){
  return Objects.equals(toPb(),jobConfiguration.toPb());
}
Program: 93135
Project: 93135
Buggy source:
protected Builder(Type type){
  this.type=checkNotNull(type);
}

Fixed version (ground truth):
Builder(Type type){
  this.type=checkNotNull(type);
}
Program: 93136
Project: 93136
Buggy source:
protected ToStringHelper toStringHelper(){
  return MoreObjects.toStringHelper(this).add("String_Node_Str",type);
}

Fixed version (ground truth):
ToStringHelper toStringHelper(){
  return MoreObjects.toStringHelper(this).add("String_Node_Str",type);
}
Program: 93137
Project: 93137
Buggy source:
@SuppressWarnings("String_Node_Str") protected B self(){
  return (B)this;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") B self(){
  return (B)this;
}
Program: 93138
Project: 93138
Buggy source:
protected JobConfiguration(Builder builder){
  this.type=builder.type;
}

Fixed version (ground truth):
JobConfiguration(Builder builder){
  this.type=builder.type;
}
Program: 93139
Project: 93139
Buggy source:
JobInfo setProjectId(String projectId){
  return toBuilder().configuration(this.configuration().setProjectId(projectId)).build();
}

Fixed version (ground truth):
JobInfo setProjectId(String projectId){
  return toBuilder().configuration(configuration.setProjectId(projectId)).build();
}
Program: 93141
Project: 93141
Buggy source:
@Override protected ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",destinationTable).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition).add("String_Node_Str",formatOptions).add("String_Node_Str",maxBadRecords).add("String_Node_Str",schema).add("String_Node_Str",ignoreUnknownValues).add("String_Node_Str",projectionFields).add("String_Node_Str",sourceUris);
}

Fixed version (ground truth):
@Override ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",destinationTable).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition).add("String_Node_Str",formatOptions).add("String_Node_Str",maxBadRecords).add("String_Node_Str",schema).add("String_Node_Str",ignoreUnknownValues).add("String_Node_Str",projectionFields).add("String_Node_Str",sourceUris);
}
Program: 93143
Project: 93143
Buggy source:
@Override protected ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",query).add("String_Node_Str",destinationTable).add("String_Node_Str",defaultDataset).add("String_Node_Str",allowLargeResults).add("String_Node_Str",flattenResults).add("String_Node_Str",priority).add("String_Node_Str",tableDefinitions).add("String_Node_Str",useQueryCache).add("String_Node_Str",userDefinedFunctions).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition).add("String_Node_Str",dryRun);
}

Fixed version (ground truth):
@Override ToStringHelper toStringHelper(){
  return super.toStringHelper().add("String_Node_Str",query).add("String_Node_Str",destinationTable).add("String_Node_Str",defaultDataset).add("String_Node_Str",allowLargeResults).add("String_Node_Str",flattenResults).add("String_Node_Str",priority).add("String_Node_Str",tableDefinitions).add("String_Node_Str",useQueryCache).add("String_Node_Str",userDefinedFunctions).add("String_Node_Str",createDisposition).add("String_Node_Str",writeDisposition).add("String_Node_Str",dryRun);
}
Program: 93145
Project: 93145
Buggy source:
@Test public void testSetProjectId(){
  CopyJobConfiguration copyConfiguration=COPY_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",copyConfiguration.destinationTable().project());
  for (  TableId sourceTable : copyConfiguration.sourceTables()) {
    assertEquals("String_Node_Str",sourceTable.project());
  }
  ExtractJobConfiguration extractConfiguration=EXTRACT_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",extractConfiguration.sourceTable().project());
  LoadConfiguration loadConfiguration=LOAD_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",loadConfiguration.destinationTable().project());
  QueryJobConfiguration queryConfiguration=QUERY_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",queryConfiguration.defaultDataset().project());
  assertEquals("String_Node_Str",queryConfiguration.destinationTable().project());
}

Fixed version (ground truth):
@Test public void testSetProjectId(){
  CopyJobConfiguration copyConfiguration=COPY_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",copyConfiguration.destinationTable().project());
  for (  TableId sourceTable : copyConfiguration.sourceTables()) {
    assertEquals("String_Node_Str",sourceTable.project());
  }
  ExtractJobConfiguration extractConfiguration=EXTRACT_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",extractConfiguration.sourceTable().project());
  LoadJobConfiguration loadConfiguration=LOAD_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",loadConfiguration.destinationTable().project());
  QueryJobConfiguration queryConfiguration=QUERY_JOB.setProjectId("String_Node_Str").configuration();
  assertEquals("String_Node_Str",queryConfiguration.defaultDataset().project());
  assertEquals("String_Node_Str",queryConfiguration.destinationTable().project());
}
Program: 93146
Project: 93146
Buggy source:
/** 
 * Create a   {@code Cursor} given its URL safe encoded form.
 */
public static Cursor fromUrlSafe(String urlSafe){
  try {
    String utf8Str=URLDecoder.decode(urlSafe,UTF_8.name());
    DatastoreV1.Value.Builder builder=DatastoreV1.Value.newBuilder();
    TextFormat.merge(utf8Str,builder);
    return fromPb(builder.build());
  }
 catch (  UnsupportedEncodingException|ParseException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Create a   {@code Cursor} given its URL safe encoded form.
 */
public static Cursor fromUrlSafe(String urlSafe){
  try {
    return Cursor.copyFrom(BaseEncoding.base64Url().decode(urlSafe));
  }
 catch (  IllegalArgumentException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 93147
Project: 93147
Buggy source:
/** 
 * Returns the cursor in an encoded form that can be used as part of a URL.
 */
public String toUrlSafe(){
  try {
    return URLEncoder.encode(TextFormat.printToString(toPb()),UTF_8.name());
  }
 catch (  UnsupportedEncodingException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Returns the cursor in an encoded form that can be used as part of a URL.
 */
public String toUrlSafe(){
  return BaseEncoding.base64Url().encode(byteString.toByteArray());
}
Program: 93148
Project: 93148
Buggy source:
@Override public Tuple<String,Iterable<Project>> list(Map<Option,?> options) throws ResourceManagerException {
  try {
    ListProjectsResponse response=resourceManager.projects().list().setFilter(FIELDS.getString(options)).setFilter(FILTER.getString(options)).setPageSize(PAGE_SIZE.getInt(options)).setPageToken(PAGE_TOKEN.getString(options)).execute();
    return Tuple.<String,Iterable<Project>>of(response.getNextPageToken(),response.getProjects());
  }
 catch (  IOException ex) {
    throw translate(ex);
  }
}

Fixed version (ground truth):
@Override public Tuple<String,Iterable<Project>> list(Map<Option,?> options) throws ResourceManagerException {
  try {
    ListProjectsResponse response=resourceManager.projects().list().setFields(FIELDS.getString(options)).setFilter(FILTER.getString(options)).setPageSize(PAGE_SIZE.getInt(options)).setPageToken(PAGE_TOKEN.getString(options)).execute();
    return Tuple.<String,Iterable<Project>>of(response.getNextPageToken(),response.getProjects());
  }
 catch (  IOException ex) {
    throw translate(ex);
  }
}
Program: 93149
Project: 93149
Buggy source:
@Override public Iterable<T> values(){
  return results == null ? Collections.EMPTY_LIST : results;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Iterable<T> values(){
  return results == null ? Collections.EMPTY_LIST : results;
}
Program: 93150
Project: 93150
Buggy source:
public ServiceRpcT rpc(){
  if (rpc == null) {
    rpc=serviceRpcFactory.create((OptionsT)this);
  }
  return rpc;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ServiceRpcT rpc(){
  if (rpc == null) {
    rpc=serviceRpcFactory.create((OptionsT)this);
  }
  return rpc;
}
Program: 93151
Project: 93151
Buggy source:
private static <T>T newInstance(String className) throws IOException, ClassNotFoundException {
  try {
    return (T)Class.forName(className).newInstance();
  }
 catch (  InstantiationException|IllegalAccessException e) {
    throw new IOException(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static <T>T newInstance(String className) throws IOException, ClassNotFoundException {
  try {
    return (T)Class.forName(className).newInstance();
  }
 catch (  InstantiationException|IllegalAccessException e) {
    throw new IOException(e);
  }
}
Program: 93152
Project: 93152
Buggy source:
public ServiceT service(){
  if (service == null) {
    service=serviceFactory.create((OptionsT)this);
  }
  return service;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ServiceT service(){
  if (service == null) {
    service=serviceFactory.create((OptionsT)this);
  }
  return service;
}
Program: 93153
Project: 93153
Buggy source:
@Override public Builder toBuilder(){
  return new Builder(this);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Builder toBuilder(){
  return new Builder(this);
}
Program: 93154
Project: 93154
Buggy source:
@Override protected DatastoreRpcFactory defaultRpcFactory(){
  return DefaultDatastoreRpcFactory.INSTANCE;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected DatastoreRpcFactory defaultRpcFactory(){
  return DefaultDatastoreRpcFactory.INSTANCE;
}
Program: 93155
Project: 93155
Buggy source:
@Override protected DatastoreFactory defaultServiceFactory(){
  return DefaultDatastoreFactory.INSTANCE;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected DatastoreFactory defaultServiceFactory(){
  return DefaultDatastoreFactory.INSTANCE;
}
Program: 93156
Project: 93156
Buggy source:
@Before public void setUp() throws IOException, InterruptedException {
  datastoreRpcFactory=EasyMock.createMock(DatastoreRpcFactory.class);
  datastoreRpc=EasyMock.createMock(DatastoreRpc.class);
  options=DatastoreOptions.builder().normalizeDataset(false).serviceRpcFactory(datastoreRpcFactory).projectId(PROJECT_ID).host("String_Node_Str" + PORT);
  EasyMock.expect(datastoreRpcFactory.create(EasyMock.anyObject(DatastoreOptions.class))).andReturn(datastoreRpc).anyTimes();
  EasyMock.replay(datastoreRpcFactory,datastoreRpc);
}

Fixed version (ground truth):
@Before public void setUp(){
  datastoreRpcFactory=EasyMock.createMock(DatastoreRpcFactory.class);
  datastoreRpc=EasyMock.createMock(DatastoreRpc.class);
  options=DatastoreOptions.builder().normalizeDataset(false).serviceRpcFactory(datastoreRpcFactory).projectId(PROJECT_ID).host("String_Node_Str" + PORT);
  EasyMock.expect(datastoreRpcFactory.create(EasyMock.anyObject(DatastoreOptions.class))).andReturn(datastoreRpc).anyTimes();
  EasyMock.replay(datastoreRpcFactory,datastoreRpc);
}
Program: 93157
Project: 93157
Buggy source:
@Before public void setUp() throws IOException, InterruptedException {
  options=DatastoreOptions.builder().projectId(PROJECT_ID).host("String_Node_Str" + PORT).build();
  datastore=options.service();
  StructuredQuery<Key> query=Query.keyQueryBuilder().build();
  QueryResults<Key> result=datastore.run(query);
  datastore.delete(Iterators.toArray(result,Key.class));
  datastore.add(ENTITY1,ENTITY2);
}

Fixed version (ground truth):
@Before public void setUp(){
  options=DatastoreOptions.builder().projectId(PROJECT_ID).host("String_Node_Str" + PORT).build();
  datastore=options.service();
  StructuredQuery<Key> query=Query.keyQueryBuilder().build();
  QueryResults<Key> result=datastore.run(query);
  datastore.delete(Iterators.toArray(result,Key.class));
  datastore.add(ENTITY1,ENTITY2);
}
Program: 93158
Project: 93158
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Test public void testToBuilder() throws Exception {
  Set<String> content=Collections.singleton("String_Node_Str");
  ValueBuilder builder=new TestBuilder();
  builder.meaning(1).set(content).indexed(true);
  Value<?> value=builder.build();
  builder=value.toBuilder();
  assertEquals(Integer.valueOf(1),value.meaning());
  assertTrue(value.hasIndexed());
  assertTrue(value.indexed());
  assertEquals(ValueType.LIST,value.type());
  assertEquals(content,value.get());
  assertEquals(value,builder.build());
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Test public void testToBuilder() throws Exception {
  Set<String> content=Collections.singleton("String_Node_Str");
  @SuppressWarnings("String_Node_Str") ValueBuilder builder=new TestBuilder();
  builder.meaning(1).set(content).indexed(true);
  Value<?> value=builder.build();
  builder=value.toBuilder();
  assertEquals(Integer.valueOf(1),value.meaning());
  assertTrue(value.hasIndexed());
  assertTrue(value.indexed());
  assertEquals(ValueType.LIST,value.type());
  assertEquals(content,value.get());
  assertEquals(value,builder.build());
}
Program: 93159
Project: 93159
Buggy source:
@Override public Value<Set> build(){
  return new Value(this){
    @Override public TestBuilder toBuilder(){
      return new TestBuilder().mergeFrom(this);
    }
  }
;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public Value<Set> build(){
  return new Value(this){
    @Override public TestBuilder toBuilder(){
      return new TestBuilder().mergeFrom(this);
    }
  }
;
}
Program: 93160
Project: 93160
Buggy source:
@Override public Builder toBuilder(){
  return new Builder(this);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Builder toBuilder(){
  return new Builder(this);
}
Program: 93161
Project: 93161
Buggy source:
@Override protected StorageRpcFactory defaultRpcFactory(){
  return DefaultStorageRpcFactory.INSTANCE;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected StorageRpcFactory defaultRpcFactory(){
  return DefaultStorageRpcFactory.INSTANCE;
}
Program: 93162
Project: 93162
Buggy source:
@Override protected StorageFactory defaultServiceFactory(){
  return DefaultStorageFactory.INSTANCE;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected StorageFactory defaultServiceFactory(){
  return DefaultStorageFactory.INSTANCE;
}
Program: 93163
Project: 93163
Buggy source:
@Test public void testSaveAndRestore() throws IOException, ClassNotFoundException {
  byte[] firstResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  byte[] secondResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  ByteBuffer firstReadBuffer=ByteBuffer.allocate(42);
  ByteBuffer secondReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  expect(storageRpcMock.read(BLOB_ID.toPb(),EMPTY_RPC_OPTIONS,0,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",firstResult));
  expect(storageRpcMock.read(BLOB_ID.toPb(),EMPTY_RPC_OPTIONS,42,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",secondResult));
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  reader.read(firstReadBuffer);
  RestorableState<BlobReadChannel> readerState=reader.capture();
  BlobReadChannel restoredReader=readerState.restore();
  restoredReader.read(secondReadBuffer);
  assertArrayEquals(Arrays.copyOf(firstResult,firstReadBuffer.capacity()),firstReadBuffer.array());
  assertArrayEquals(secondResult,secondReadBuffer.array());
}

Fixed version (ground truth):
@Test public void testSaveAndRestore() throws IOException {
  byte[] firstResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  byte[] secondResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  ByteBuffer firstReadBuffer=ByteBuffer.allocate(42);
  ByteBuffer secondReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  expect(storageRpcMock.read(BLOB_ID.toPb(),EMPTY_RPC_OPTIONS,0,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",firstResult));
  expect(storageRpcMock.read(BLOB_ID.toPb(),EMPTY_RPC_OPTIONS,42,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",secondResult));
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  reader.read(firstReadBuffer);
  RestorableState<BlobReadChannel> readerState=reader.capture();
  BlobReadChannel restoredReader=readerState.restore();
  restoredReader.read(secondReadBuffer);
  assertArrayEquals(Arrays.copyOf(firstResult,firstReadBuffer.capacity()),firstReadBuffer.array());
  assertArrayEquals(secondResult,secondReadBuffer.array());
}
Program: 93164
Project: 93164
Buggy source:
@Test public void testStateEquals(){
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  BlobReadChannel secondReader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  RestorableState<BlobReadChannel> state=reader.capture();
  RestorableState<BlobReadChannel> secondState=secondReader.capture();
  assertEquals(state,secondState);
  assertEquals(state.hashCode(),secondState.hashCode());
  assertEquals(state.toString(),secondState.toString());
}

Fixed version (ground truth):
@Test public void testStateEquals(){
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  @SuppressWarnings("String_Node_Str") BlobReadChannel secondReader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  RestorableState<BlobReadChannel> state=reader.capture();
  RestorableState<BlobReadChannel> secondState=secondReader.capture();
  assertEquals(state,secondState);
  assertEquals(state.hashCode(),secondState.hashCode());
  assertEquals(state.toString(),secondState.toString());
}
Program: 93165
Project: 93165
Buggy source:
@Before public void setUp() throws IOException, InterruptedException {
  rpcFactoryMock=createMock(StorageRpcFactory.class);
  storageRpcMock=createMock(StorageRpc.class);
  expect(rpcFactoryMock.create(anyObject(StorageOptions.class))).andReturn(storageRpcMock);
  replay(rpcFactoryMock);
  options=StorageOptions.builder().projectId("String_Node_Str").serviceRpcFactory(rpcFactoryMock).build();
}

Fixed version (ground truth):
@Before public void setUp(){
  rpcFactoryMock=createMock(StorageRpcFactory.class);
  storageRpcMock=createMock(StorageRpc.class);
  expect(rpcFactoryMock.create(anyObject(StorageOptions.class))).andReturn(storageRpcMock);
  replay(rpcFactoryMock);
  options=StorageOptions.builder().projectId("String_Node_Str").serviceRpcFactory(rpcFactoryMock).build();
}
Program: 93166
Project: 93166
Buggy source:
@Test public void testReadGenerationChanged() throws IOException {
  BlobId blobId=BlobId.of(BUCKET_NAME,BLOB_NAME);
  reader=new BlobReadChannelImpl(options,blobId,EMPTY_RPC_OPTIONS);
  byte[] firstResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  byte[] secondResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  ByteBuffer firstReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  ByteBuffer secondReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  expect(storageRpcMock.read(blobId.toPb(),EMPTY_RPC_OPTIONS,0,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",firstResult));
  expect(storageRpcMock.read(blobId.toPb(),EMPTY_RPC_OPTIONS,DEFAULT_CHUNK_SIZE,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",firstResult));
  replay(storageRpcMock);
  reader.read(firstReadBuffer);
  try {
    reader.read(secondReadBuffer);
    fail("String_Node_Str");
  }
 catch (  StorageException ex) {
    StringBuilder messageBuilder=new StringBuilder();
    messageBuilder.append("String_Node_Str").append(blobId).append("String_Node_Str");
    assertEquals(messageBuilder.toString(),ex.getMessage());
  }
}

Fixed version (ground truth):
@Test public void testReadGenerationChanged() throws IOException {
  BlobId blobId=BlobId.of(BUCKET_NAME,BLOB_NAME);
  reader=new BlobReadChannelImpl(options,blobId,EMPTY_RPC_OPTIONS);
  byte[] firstResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  byte[] secondResult=randomByteArray(DEFAULT_CHUNK_SIZE);
  ByteBuffer firstReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  ByteBuffer secondReadBuffer=ByteBuffer.allocate(DEFAULT_CHUNK_SIZE);
  expect(storageRpcMock.read(blobId.toPb(),EMPTY_RPC_OPTIONS,0,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",firstResult));
  expect(storageRpcMock.read(blobId.toPb(),EMPTY_RPC_OPTIONS,DEFAULT_CHUNK_SIZE,DEFAULT_CHUNK_SIZE)).andReturn(StorageRpc.Tuple.of("String_Node_Str",secondResult));
  replay(storageRpcMock);
  reader.read(firstReadBuffer);
  try {
    reader.read(secondReadBuffer);
    fail("String_Node_Str");
  }
 catch (  StorageException ex) {
    StringBuilder messageBuilder=new StringBuilder();
    messageBuilder.append("String_Node_Str").append(blobId).append("String_Node_Str");
    assertEquals(messageBuilder.toString(),ex.getMessage());
  }
}
Program: 93167
Project: 93167
Buggy source:
@Test public void testClose() throws IOException {
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  assertTrue(reader.isOpen());
  reader.close();
  assertTrue(!reader.isOpen());
}

Fixed version (ground truth):
@Test public void testClose(){
  replay(storageRpcMock);
  reader=new BlobReadChannelImpl(options,BLOB_ID,EMPTY_RPC_OPTIONS);
  assertTrue(reader.isOpen());
  reader.close();
  assertTrue(!reader.isOpen());
}
Program: 93168
Project: 93168
Buggy source:
@Test public void testCopyToBlobId() throws Exception {
  BlobId targetId=BlobId.of("String_Node_Str","String_Node_Str");
  CopyWriter copyWriter=createMock(CopyWriter.class);
  BlobInfo target=BLOB_INFO.builder(targetId).build();
  Capture<CopyRequest> capturedCopyRequest=Capture.newInstance();
  expect(storage.copy(capture(capturedCopyRequest))).andReturn(copyWriter);
  replay(storage);
  CopyWriter returnedCopyWriter=blob.copyTo(targetId);
  assertEquals(copyWriter,returnedCopyWriter);
  assertEquals(capturedCopyRequest.getValue().source(),blob.id());
  assertEquals(capturedCopyRequest.getValue().target(),target);
  assertTrue(capturedCopyRequest.getValue().sourceOptions().isEmpty());
  assertTrue(capturedCopyRequest.getValue().targetOptions().isEmpty());
}

Fixed version (ground truth):
@Test public void testCopyToBlobId() throws Exception {
  BlobId targetId=BlobId.of("String_Node_Str","String_Node_Str");
  CopyWriter copyWriter=createMock(CopyWriter.class);
  BlobInfo target=BlobInfo.builder(targetId).build();
  Capture<CopyRequest> capturedCopyRequest=Capture.newInstance();
  expect(storage.copy(capture(capturedCopyRequest))).andReturn(copyWriter);
  replay(storage);
  CopyWriter returnedCopyWriter=blob.copyTo(targetId);
  assertEquals(copyWriter,returnedCopyWriter);
  assertEquals(capturedCopyRequest.getValue().source(),blob.id());
  assertEquals(capturedCopyRequest.getValue().target(),target);
  assertTrue(capturedCopyRequest.getValue().sourceOptions().isEmpty());
  assertTrue(capturedCopyRequest.getValue().targetOptions().isEmpty());
}
Program: 93169
Project: 93169
Buggy source:
@Test public void testStateEquals(){
  expect(storageRpcMock.open(BLOB_INFO.toPb(),EMPTY_RPC_OPTIONS)).andReturn(UPLOAD_ID).times(2);
  replay(storageRpcMock);
  writer=new BlobWriteChannelImpl(options,BLOB_INFO,EMPTY_RPC_OPTIONS);
  BlobWriteChannel writer2=new BlobWriteChannelImpl(options,BLOB_INFO,EMPTY_RPC_OPTIONS);
  RestorableState<BlobWriteChannel> state=writer.capture();
  RestorableState<BlobWriteChannel> state2=writer2.capture();
  assertEquals(state,state2);
  assertEquals(state.hashCode(),state2.hashCode());
  assertEquals(state.toString(),state2.toString());
}

Fixed version (ground truth):
@Test public void testStateEquals(){
  expect(storageRpcMock.open(BLOB_INFO.toPb(),EMPTY_RPC_OPTIONS)).andReturn(UPLOAD_ID).times(2);
  replay(storageRpcMock);
  writer=new BlobWriteChannelImpl(options,BLOB_INFO,EMPTY_RPC_OPTIONS);
  @SuppressWarnings("String_Node_Str") BlobWriteChannel writer2=new BlobWriteChannelImpl(options,BLOB_INFO,EMPTY_RPC_OPTIONS);
  RestorableState<BlobWriteChannel> state=writer.capture();
  RestorableState<BlobWriteChannel> state2=writer2.capture();
  assertEquals(state,state2);
  assertEquals(state.hashCode(),state2.hashCode());
  assertEquals(state.toString(),state2.toString());
}
Program: 93170
Project: 93170
Buggy source:
@Before public void setUp() throws IOException, InterruptedException {
  rpcFactoryMock=createMock(StorageRpcFactory.class);
  storageRpcMock=createMock(StorageRpc.class);
  expect(rpcFactoryMock.create(anyObject(StorageOptions.class))).andReturn(storageRpcMock);
  replay(rpcFactoryMock);
  options=StorageOptions.builder().projectId("String_Node_Str").serviceRpcFactory(rpcFactoryMock).build();
}

Fixed version (ground truth):
@Before public void setUp(){
  rpcFactoryMock=createMock(StorageRpcFactory.class);
  storageRpcMock=createMock(StorageRpc.class);
  expect(rpcFactoryMock.create(anyObject(StorageOptions.class))).andReturn(storageRpcMock);
  replay(rpcFactoryMock);
  options=StorageOptions.builder().projectId("String_Node_Str").serviceRpcFactory(rpcFactoryMock).build();
}
Program: 93171
Project: 93171
Buggy source:
@Test public void testGetAll() throws Exception {
  Capture<BatchRequest> capturedBatchRequest=Capture.newInstance();
  List<Result<BlobInfo>> batchResultList=new LinkedList<>();
  for (  BlobInfo info : BLOB_INFO_RESULTS) {
    batchResultList.add(new Result<>(info));
  }
  BatchResponse response=new BatchResponse(Collections.EMPTY_LIST,Collections.EMPTY_LIST,batchResultList);
  expect(storage.apply(capture(capturedBatchRequest))).andReturn(response);
  replay(storage);
  List<Blob> blobs=bucket.get("String_Node_Str","String_Node_Str","String_Node_Str");
  Set<BlobId> blobInfoSet=capturedBatchRequest.getValue().toGet().keySet();
  assertEquals(batchResultList.size(),blobInfoSet.size());
  for (  BlobInfo info : BLOB_INFO_RESULTS) {
    assertTrue(blobInfoSet.contains(info.blobId()));
  }
  Iterator<Blob> blobIterator=blobs.iterator();
  Iterator<Result<BlobInfo>> batchResultIterator=response.gets().iterator();
  while (batchResultIterator.hasNext() && blobIterator.hasNext()) {
    assertEquals(batchResultIterator.next().get(),blobIterator.next().info());
  }
  assertFalse(batchResultIterator.hasNext());
  assertFalse(blobIterator.hasNext());
}

Fixed version (ground truth):
@Test public void testGetAll() throws Exception {
  Capture<BatchRequest> capturedBatchRequest=Capture.newInstance();
  List<Result<BlobInfo>> batchResultList=new LinkedList<>();
  for (  BlobInfo info : BLOB_INFO_RESULTS) {
    batchResultList.add(new Result<>(info));
  }
  BatchResponse response=new BatchResponse(Collections.<Result<Boolean>>emptyList(),Collections.<Result<BlobInfo>>emptyList(),batchResultList);
  expect(storage.apply(capture(capturedBatchRequest))).andReturn(response);
  replay(storage);
  List<Blob> blobs=bucket.get("String_Node_Str","String_Node_Str","String_Node_Str");
  Set<BlobId> blobInfoSet=capturedBatchRequest.getValue().toGet().keySet();
  assertEquals(batchResultList.size(),blobInfoSet.size());
  for (  BlobInfo info : BLOB_INFO_RESULTS) {
    assertTrue(blobInfoSet.contains(info.blobId()));
  }
  Iterator<Blob> blobIterator=blobs.iterator();
  Iterator<Result<BlobInfo>> batchResultIterator=response.gets().iterator();
  while (batchResultIterator.hasNext() && blobIterator.hasNext()) {
    assertEquals(batchResultIterator.next().get(),blobIterator.next().info());
  }
  assertFalse(batchResultIterator.hasNext());
  assertFalse(blobIterator.hasNext());
}