nus-yam/ex-repair huggingface dataset:
Program: 85570
Project: 85570
Buggy source:
private ConfigRecord(String propertyName,String defaultValue,String currentValue,String description){
  this.propertyName=propertyName;
  this.defaultValue=defaultValue;
  this.currentValue=currentValue;
  this.description=description;
}

Fixed version (ground truth):
private ConfigRecord(String propertyName,String defaultValue,String currentValue,String description){
  if (propertyName == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (defaultValue == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (currentValue == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (description == null) {
    throw new NullPointerException("String_Node_Str");
  }
  this.propertyName=propertyName;
  this.defaultValue=defaultValue;
  this.currentValue=currentValue;
  this.description=description;
}
Program: 85571
Project: 85571
Buggy source:
private String getValue(Method getter,Object instance,String defaultValue){
  if (getter == null) {
    return defaultValue;
  }
  try {
    Object value=getter.invoke(instance);
    if (value == null) {
      return "String_Node_Str";
    }
    return value.toString();
  }
 catch (  Throwable e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private String getValue(Method getter,Object instance,String defaultValue){
  if (getter == null || instance == null) {
    return defaultValue;
  }
  try {
    Object value=getter.invoke(instance);
    if (value == null) {
      return "String_Node_Str";
    }
    return value.toString();
  }
 catch (  Throwable e) {
    return "String_Node_Str";
  }
}
Program: 85572
Project: 85572
Buggy source:
private void addConfig(ConfigurationProvider<?> configurationProvider,ImmutableSortedSet.Builder<ConfigRecord> builder) throws InvocationTargetException, IllegalAccessException {
  ConfigurationMetadata<?> metadata=ConfigurationMetadata.getValidConfigurationMetadata(configurationProvider.getConfigClass());
  Object instance=configurationProvider.get();
  Object defaults=configurationProvider.getDefaults();
  String prefix=configurationProvider.getPrefix();
  prefix=prefix == null ? "String_Node_Str" : (prefix + "String_Node_Str");
  for (  AttributeMetadata attribute : metadata.getAttributes().values()) {
    String propertyName=prefix + attribute.getPropertyName();
    Method getter=attribute.getGetter();
    String defaultValue=getValue(getter,defaults,"String_Node_Str");
    String currentValue=getValue(getter,instance,"String_Node_Str");
    String description=null;
    builder.add(new ConfigRecord(propertyName,defaultValue,currentValue,description));
  }
}

Fixed version (ground truth):
private void addConfig(ConfigurationProvider<?> configurationProvider,ImmutableSortedSet.Builder<ConfigRecord> builder) throws InvocationTargetException, IllegalAccessException {
  ConfigurationMetadata<?> metadata=configurationProvider.getConfigurationMetadata();
  Object instance=configurationProvider.get();
  Object defaults=null;
  if (!configurationProvider.isLegacy()) {
    defaults=configurationProvider.getDefaults();
  }
  String prefix=configurationProvider.getPrefix();
  prefix=prefix == null ? "String_Node_Str" : (prefix + "String_Node_Str");
  for (  AttributeMetadata attribute : metadata.getAttributes().values()) {
    String propertyName=prefix + attribute.getPropertyName();
    Method getter=attribute.getGetter();
    String defaultValue;
    if (!configurationProvider.isLegacy()) {
      defaultValue=getValue(getter,defaults,"String_Node_Str");
    }
 else {
      Default annotation=getter.getAnnotation(Default.class);
      if (annotation != null) {
        defaultValue=annotation.value();
      }
 else {
        defaultValue="String_Node_Str";
      }
    }
    String currentValue=getValue(getter,instance,"String_Node_Str");
    String description=attribute.getDescription();
    if (description == null)     description="String_Node_Str";
    builder.add(new ConfigRecord(propertyName,defaultValue,currentValue,description));
  }
}
Program: 85575
Project: 85575
Buggy source:
public static <T>ConfigurationMetadata<T> getConfigurationMetadata(Class<T> configClass){
  ConfigurationMetadata<T> metadata=new ConfigurationMetadata<T>(configClass);
  return metadata;
}

Fixed version (ground truth):
public static <T>ConfigurationMetadata<T> getConfigurationMetadata(Class<T> configClass){
  ConfigurationMetadata<T> metadata=new ConfigurationMetadata<T>(configClass,false);
  return metadata;
}
Program: 85576
Project: 85576
Buggy source:
public ConfigurationProvider(Class<T> configClass,String prefix,Map<String,String> properties){
  this.configClass=configClass;
  this.prefix=prefix;
  if (properties != null) {
    configurationFactory=new ConfigurationFactory(properties);
  }
}

Fixed version (ground truth):
public ConfigurationProvider(Class<T> configClass,String prefix,Map<String,String> properties){
  if (configClass == null) {
    throw new NullPointerException("String_Node_Str");
  }
  this.configClass=configClass;
  this.prefix=prefix;
  if (properties != null) {
    configurationFactory=new ConfigurationFactory(properties);
  }
}
Program: 85577
Project: 85577
Buggy source:
private void procesMethod(Method method,Class<? extends Annotation> annotationClass,Set<String> usedSet){
  if (method.isAnnotationPresent(annotationClass)) {
    if (!usedSet.contains(method.getName())) {
      if (method.getParameterTypes().length != 0) {
        throw new UnsupportedOperationException(String.format("String_Node_Str",method.getDeclaringClass().getName() + "String_Node_Str" + method.getName()+ "String_Node_Str"));
      }
      usedSet.add(method.getName());
      methodMap.put(PostConstruct.class,method);
    }
  }
}

Fixed version (ground truth):
private void procesMethod(Method method,Class<? extends Annotation> annotationClass,Set<String> usedSet){
  if (method.isAnnotationPresent(annotationClass)) {
    if (!usedSet.contains(method.getName())) {
      if (method.getParameterTypes().length != 0) {
        throw new UnsupportedOperationException(String.format("String_Node_Str",method.getDeclaringClass().getName() + "String_Node_Str" + method.getName()+ "String_Node_Str"));
      }
      usedSet.add(method.getName());
      methodMap.put(annotationClass,method);
    }
  }
}
Program: 85578
Project: 85578
Buggy source:
@Test public void testSubClassAnnotated() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(SimpleBase.class).to(SimpleBaseImpl.class).in(Scopes.SINGLETON);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testSubClassAnnotated() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(SimpleBase.class).to(SimpleBaseImpl.class).in(Scopes.SINGLETON);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str"));
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}
Program: 85579
Project: 85579
Buggy source:
@Test public void testExecuted() throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule());
  ExecutedInstance instance=injector.getInstance(ExecutedInstance.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  instance.waitForStart();
  lifeCycleManager.stop();
  instance.waitForEnd();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testExecuted() throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule());
  ExecutedInstance instance=injector.getInstance(ExecutedInstance.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  instance.waitForStart();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str"));
  lifeCycleManager.stop();
  instance.waitForEnd();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}
Program: 85580
Project: 85580
Buggy source:
@Test public void testNoPreDestroy() throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(PostConstructOnly.class).in(Scopes.SINGLETON);
      binder.bind(PreDestroyOnly.class).in(Scopes.SINGLETON);
    }
  }
);
  injector.getInstance(PostConstructOnly.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testNoPreDestroy() throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(PostConstructOnly.class).in(Scopes.SINGLETON);
      binder.bind(PreDestroyOnly.class).in(Scopes.SINGLETON);
    }
  }
);
  injector.getInstance(PostConstructOnly.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str"));
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}
Program: 85581
Project: 85581
Buggy source:
@Test public void testPrivateModule() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      final PrivateModule privateModule=new PrivateModule(){
        @Override protected void configure(){
          binder().bind(SimpleBase.class).to(SimpleBaseImpl.class).in(Scopes.SINGLETON);
          binder().expose(SimpleBase.class);
        }
      }
;
      binder.install(privateModule);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testPrivateModule() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      final PrivateModule privateModule=new PrivateModule(){
        @Override protected void configure(){
          binder().bind(SimpleBase.class).to(SimpleBaseImpl.class).in(Scopes.SINGLETON);
          binder().expose(SimpleBase.class);
        }
      }
;
      binder.install(privateModule);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str"));
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}
Program: 85582
Project: 85582
Buggy source:
@Test public void testDeepDependency() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(AnotherInstance.class).in(Scopes.SINGLETON);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  injector.getInstance(AnotherInstance.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testDeepDependency() throws Exception {
  Module module=new Module(){
    @Override public void configure(    Binder binder){
      binder.bind(AnotherInstance.class).in(Scopes.SINGLETON);
    }
  }
;
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifeCycleModule(),module);
  injector.getInstance(AnotherInstance.class);
  LifeCycleManager lifeCycleManager=injector.getInstance(LifeCycleManager.class);
  lifeCycleManager.start();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str"));
  lifeCycleManager.stop();
  Assert.assertEquals(stateLog,Arrays.asList("String_Node_Str","String_Node_Str"));
}
Program: 85583
Project: 85583
Buggy source:
@Test public void should_ReturnExpectedRecordedResponse_FromAnotherValidUrl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains("String_Node_Str")).isTrue();
  String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(responseContent).contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_ReturnExpectedRecordedResponse_FromAnotherValidUrl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains(HEADER_APPLICATION_XML)).isTrue();
  String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(responseContent).contains("String_Node_Str");
}
Program: 85584
Project: 85584
Buggy source:
@Test public void should_UpdateProduct_WhenPutRequestMadeOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat("String_Node_Str").isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_UpdateProduct_WhenPutRequestMadeOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat("String_Node_Str").isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85585
Project: 85585
Buggy source:
@Test public void should_FindPostContentsEqual_WhenJsonContentOrderIrrelevant() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String content=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_FindPostContentsEqual_WhenJsonContentOrderIrrelevant() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String content=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85586
Project: 85586
Buggy source:
@Test public void should_UpdateProduct_WhenPutRequestMadeWithWrongPost() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
  assertThat(responseContentAsString).contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_UpdateProduct_WhenPutRequestMadeWithWrongPost() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
  assertThat(responseContentAsString).contains("String_Node_Str");
}
Program: 85587
Project: 85587
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void should_ReturnExpectedResourceIdHeader_WhenSuccessfulRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains(Common.HEADER_APPLICATION_JSON)).isTrue();
  assertThat(headers.containsKey(StubResponse.STUBBY_RESOURCE_ID_HEADER)).isTrue();
  final List<String> headerValues=(List<String>)headers.get(StubResponse.STUBBY_RESOURCE_ID_HEADER);
  assertThat(headerValues.get(0)).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void should_ReturnExpectedResourceIdHeader_WhenSuccessfulRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains(HEADER_APPLICATION_JSON)).isTrue();
  assertThat(headers.containsKey(StubResponse.STUBBY_RESOURCE_ID_HEADER)).isTrue();
  final List<String> headerValues=(List<String>)headers.get(StubResponse.STUBBY_RESOURCE_ID_HEADER);
  assertThat(headerValues.get(0)).isEqualTo("String_Node_Str");
}
Program: 85588
Project: 85588
Buggy source:
@Test public void should_ReturnAllProducts_WhenGetRequestMade() throws Exception {
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String expectedContent=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpResponse response=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl).execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(expectedContent).isEqualTo(responseContent);
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_ReturnAllProducts_WhenGetRequestMade() throws Exception {
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String expectedContent=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpResponse response=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl).execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(expectedContent).isEqualTo(responseContent);
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85589
Project: 85589
Buggy source:
@Test public void should_UpdateProduct_WhenPutRequestMadeWithWrongPostOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
  assertThat(responseContentAsString).contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_UpdateProduct_WhenPutRequestMadeWithWrongPostOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
  assertThat(responseContentAsString).contains("String_Node_Str");
}
Program: 85590
Project: 85590
Buggy source:
@Test public void should_FindPostContentsEqual_WhenXmlContentOrderIrrelevant() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String content=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_XML);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_FindPostContentsEqual_WhenXmlContentOrderIrrelevant() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String content=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_XML);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85591
Project: 85591
Buggy source:
@Test public void should_CreateNewProduct_WhenPostRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.CREATED_201);
  assertThat("String_Node_Str").isEqualTo(responseContentAsString);
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_CreateNewProduct_WhenPostRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.CREATED_201);
  assertThat("String_Node_Str").isEqualTo(responseContentAsString);
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85592
Project: 85592
Buggy source:
@Test public void should_MakeSuccessfulRequest_WhenJsonRegexMatchesPostJson() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_MakeSuccessfulRequest_WhenJsonRegexMatchesPostJson() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85593
Project: 85593
Buggy source:
@Test public void should_ReturnExpectedRecordedResponse_OnSubsequentCallToValidUrl() throws Exception {
  ANSITerminal.muteConsole(false);
  final ByteArrayOutputStream consoleCaptor=new ByteArrayOutputStream();
  final boolean NO_AUTO_FLUSH=false;
  final PrintStream oldPrintStream=System.out;
  System.setOut(new PrintStream(consoleCaptor,NO_AUTO_FLUSH,StringUtils.UTF_8));
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final int LIMIT=5;
  for (int idx=1; idx <= LIMIT; idx++) {
    final HttpResponse actualResponse=request.execute();
    final String actualConsoleOutput=consoleCaptor.toString(StringUtils.UTF_8).trim();
    String firstCallResponseContent=actualResponse.parseAsString().trim();
    assertThat(firstCallResponseContent).contains("String_Node_Str");
    assertThat(actualConsoleOutput).containsOnlyOnce("String_Node_Str");
    if (idx == LIMIT) {
      System.setOut(oldPrintStream);
      System.out.println(actualConsoleOutput);
    }
  }
}

Fixed version (ground truth):
@Test public void should_ReturnExpectedRecordedResponse_OnSubsequentCallToValidUrl() throws Exception {
  ANSITerminal.muteConsole(false);
  final ByteArrayOutputStream consoleCaptor=new ByteArrayOutputStream();
  final boolean NO_AUTO_FLUSH=false;
  final PrintStream oldPrintStream=System.out;
  System.setOut(new PrintStream(consoleCaptor,NO_AUTO_FLUSH,StringUtils.UTF_8));
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final int LIMIT=5;
  for (int idx=1; idx <= LIMIT; idx++) {
    final HttpResponse actualResponse=request.execute();
    final String actualConsoleOutput=consoleCaptor.toString(StringUtils.UTF_8).trim();
    String firstCallResponseContent=actualResponse.parseAsString().trim();
    assertThat(firstCallResponseContent).contains("String_Node_Str");
    assertThat(actualConsoleOutput).containsOnlyOnce("String_Node_Str");
    if (idx == LIMIT) {
      System.setOut(oldPrintStream);
      System.out.println(actualConsoleOutput);
    }
  }
}
Program: 85594
Project: 85594
Buggy source:
@Test public void should_FindPostContentsNotEqual_WhenJsonParseExceptionThrown() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  assertThat(request.execute().getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
}

Fixed version (ground truth):
@Test public void should_FindPostContentsNotEqual_WhenJsonParseExceptionThrown() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  assertThat(request.execute().getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND_404);
}
Program: 85595
Project: 85595
Buggy source:
@Test public void should_MakeSuccessfulRequest_WhenStubbedValidJsonMatchesComplexValidJsonPost() throws Exception {
  final URL dataPostUrl=StubsPortalTest.class.getResource("String_Node_Str");
  final String content=StringUtils.inputStreamToString(dataPostUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_MakeSuccessfulRequest_WhenStubbedValidJsonMatchesComplexValidJsonPost() throws Exception {
  final URL dataPostUrl=StubsPortalTest.class.getResource("String_Node_Str");
  final String content=StringUtils.inputStreamToString(dataPostUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85596
Project: 85596
Buggy source:
@Test public void should_NotReturnExpectedRecordedResponse_FromValidUrl_WhenQueryValueNotCorrect() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains("String_Node_Str")).isTrue();
  String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(responseContent).contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_NotReturnExpectedRecordedResponse_FromValidUrl_WhenQueryValueNotCorrect() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  final HttpHeaders headers=response.getHeaders();
  assertThat(headers.getContentType().contains(HEADER_APPLICATION_XML)).isTrue();
  String responseContent=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(responseContent).contains("String_Node_Str");
  assertThat(responseContent).contains("String_Node_Str");
  assertThat(responseContent).contains("String_Node_Str");
}
Program: 85597
Project: 85597
Buggy source:
@Test public void should_UpdateProduct_WhenPutRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat("String_Node_Str").isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_UpdateProduct_WhenPutRequestMade() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.PUT,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat("String_Node_Str").isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85598
Project: 85598
Buggy source:
@Test public void should_CreateNewProduct_WhenPostRequestMadeOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.CREATED_201);
  assertThat("String_Node_Str").isEqualTo(responseContentAsString);
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_CreateNewProduct_WhenPostRequestMadeOverSsl() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders httpHeaders=new HttpHeaders();
  httpHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(httpHeaders);
  final HttpResponse response=request.execute();
  final String contentTypeHeader=response.getContentType();
  final String responseContentAsString=response.parseAsString().trim();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.CREATED_201);
  assertThat("String_Node_Str").isEqualTo(responseContentAsString);
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85599
Project: 85599
Buggy source:
@Test public void should_MakeSuccessfulRequest_WhenJsonRegexMatchesComplexJsonPost() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_MakeSuccessfulRequest_WhenJsonRegexMatchesComplexJsonPost() throws Exception {
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final String content="String_Node_Str";
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85600
Project: 85600
Buggy source:
@Test public void should_ReturnAllProducts_WhenGetRequestMadeOverSsl() throws Exception {
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String expectedContent=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final HttpResponse response=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl).execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(expectedContent).isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(Common.HEADER_APPLICATION_JSON);
}

Fixed version (ground truth):
@Test public void should_ReturnAllProducts_WhenGetRequestMadeOverSsl() throws Exception {
  final URL jsonContentUrl=StubsPortalTest.class.getResource("String_Node_Str");
  assertThat(jsonContentUrl).isNotNull();
  final String expectedContent=StringUtils.inputStreamToString(jsonContentUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_SSL_URL,"String_Node_Str");
  final HttpResponse response=HttpUtils.constructHttpRequest(HttpMethods.GET,requestUrl).execute();
  final String contentTypeHeader=response.getContentType();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(expectedContent).isEqualTo(response.parseAsString().trim());
  assertThat(contentTypeHeader).contains(HEADER_APPLICATION_JSON);
}
Program: 85601
Project: 85601
Buggy source:
@Test public void should_MakeSuccessfulRequest_WhenStubbedJsonRegexMatchesComplexValidJsonPost() throws Exception {
  final URL dataPostUrl=StubsPortalTest.class.getResource("String_Node_Str");
  final String content=StringUtils.inputStreamToString(dataPostUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(Common.HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void should_MakeSuccessfulRequest_WhenStubbedJsonRegexMatchesComplexValidJsonPost() throws Exception {
  final URL dataPostUrl=StubsPortalTest.class.getResource("String_Node_Str");
  final String content=StringUtils.inputStreamToString(dataPostUrl.openStream());
  final String requestUrl=String.format("String_Node_Str",STUBS_URL,"String_Node_Str");
  final HttpRequest request=HttpUtils.constructHttpRequest(HttpMethods.POST,requestUrl,content);
  final HttpHeaders requestHeaders=new HttpHeaders();
  requestHeaders.setContentType(HEADER_APPLICATION_JSON);
  request.setHeaders(requestHeaders);
  final HttpResponse response=request.execute();
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);
  assertThat(response.parseAsString().trim()).isEqualTo("String_Node_Str");
}
Program: 85602
Project: 85602
Buggy source:
public StubRequest build(){
  final StubRequest stubRequest=new StubRequest(url,post,file,methods,headers,query);
  this.url=null;
  this.methods=new ArrayList<String>();
  this.post=null;
  this.file=null;
  this.headers=new HashMap<String,String>();
  this.query=new LinkedHashMap<String,String>();
  return stubRequest;
}

Fixed version (ground truth):
public StubRequest build(){
  final StubRequest stubRequest=new StubRequest(url,post,file,methods,headers,query);
  this.url=null;
  this.methods=new ArrayList<>();
  this.post=null;
  this.file=null;
  this.headers=new LinkedHashMap<>();
  this.query=new LinkedHashMap<>();
  return stubRequest;
}
Program: 85603
Project: 85603
Buggy source:
@Test public void shouldMatchExpectedToStringOutput_WhenActualRequestHasNullHeaderValue() throws Exception {
  final StubRequest actualRequest=BUILDER.withUrl("String_Node_Str").withMethodGet().withMethodPost().withMethodPut().withPost(null).withQuery("String_Node_Str","String_Node_Str").withQuery("String_Node_Str","String_Node_Str").withHeaders("String_Node_Str",null).withHeaders("String_Node_Str","String_Node_Str").withHeaders("String_Node_Str","String_Node_Str").build();
  final String expectedToStringOutput="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertThat(actualRequest.toString()).isEqualTo(expectedToStringOutput);
}

Fixed version (ground truth):
@Test public void shouldMatchExpectedToStringOutput_WhenActualRequestHasNullHeaderValue() throws Exception {
  final StubRequest actualRequest=BUILDER.withUrl("String_Node_Str").withMethodGet().withMethodPost().withMethodPut().withPost(null).withQuery("String_Node_Str","String_Node_Str").withQuery("String_Node_Str","String_Node_Str").withHeaders("String_Node_Str","String_Node_Str").withHeaders("String_Node_Str","String_Node_Str").withHeaders("String_Node_Str",null).build();
  final String expectedToStringOutput="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertThat(actualRequest.toString()).isEqualTo(expectedToStringOutput);
}
Program: 85604
Project: 85604
Buggy source:
public StubRequestBuilder withMethodPost(){
  this.methods.add(HttpMethods.POST);
  return this;
}

Fixed version (ground truth):
public StubRequestBuilder withMethodPost(){
  this.methods.add(HttpMethod.POST.name());
  return this;
}
Program: 85605
Project: 85605
Buggy source:
public StubRequestBuilder withMethodGet(){
  this.methods.add(HttpMethods.GET);
  return this;
}

Fixed version (ground truth):
public StubRequestBuilder withMethodGet(){
  this.methods.add(HttpMethod.GET.name());
  return this;
}
Program: 85606
Project: 85606
Buggy source:
public StubRequestBuilder withMethodPut(){
  this.methods.add(HttpMethods.PUT);
  return this;
}

Fixed version (ground truth):
public StubRequestBuilder withMethodPut(){
  this.methods.add(HttpMethod.PUT.name());
  return this;
}
Program: 85607
Project: 85607
Buggy source:
public StubRequestBuilder withMethodHead(){
  this.methods.add(HttpMethods.HEAD);
  return this;
}

Fixed version (ground truth):
public StubRequestBuilder withMethodHead(){
  this.methods.add(HttpMethod.HEAD.name());
  return this;
}
Program: 85608
Project: 85608
Buggy source:
public Request withMethodPost(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethods.POST);
}

Fixed version (ground truth):
public Request withMethodPost(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethod.POST.name());
}
Program: 85609
Project: 85609
Buggy source:
public Request withMethodGet(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethods.GET);
}

Fixed version (ground truth):
public Request withMethodGet(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethod.GET.name());
}
Program: 85610
Project: 85610
Buggy source:
public Request withMethodPut(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethods.PUT);
}

Fixed version (ground truth):
public Request withMethodPut(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethod.PUT.name());
}