nus-yam/ex-repair huggingface dataset:
Program: 162273
Project: 162273
Buggy source:
@Test @Ignore public void hystrixStreamWorks(){
  String url="String_Node_Str" + port;
  WebTestClient testClient=WebTestClient.bindToServer().baseUrl(url).build();
  testClient.get().uri("String_Node_Str").exchange().expectStatus().isOk();
  WebClient client=WebClient.create(url);
  Flux<String> result=client.get().uri(BASE_PATH + "String_Node_Str").accept(MediaType.TEXT_EVENT_STREAM).exchange().flatMapMany(res -> res.bodyToFlux(Map.class)).take(5).filter(map -> "String_Node_Str".equals(map.get("String_Node_Str"))).map(map -> (String)map.get("String_Node_Str"));
  StepVerifier.create(result).expectNext("String_Node_Str").thenCancel().verify();
}

Fixed version (ground truth):
@Test public void hystrixStreamWorks(){
  String url="String_Node_Str" + port;
  WebTestClient testClient=WebTestClient.bindToServer().baseUrl(url).build();
  testClient.get().uri("String_Node_Str").exchange().expectStatus().isOk();
  WebClient client=WebClient.create(url);
  Flux<String> result=client.get().uri(BASE_PATH + "String_Node_Str").accept(MediaType.TEXT_EVENT_STREAM).exchange().flatMapMany(res -> res.bodyToFlux(Map.class)).take(5).filter(map -> "String_Node_Str".equals(map.get("String_Node_Str"))).map(map -> (String)map.get("String_Node_Str"));
  StepVerifier.create(result).expectNext("String_Node_Str").thenCancel().verify();
}
Program: 162274
Project: 162274
Buggy source:
@ReadOperation public Map<String,Object> invoke(){
  Map<String,Object> map=new LinkedHashMap<String,Object>();
  AbstractConfiguration config=ConfigurationManager.getConfigInstance();
  if (config instanceof ConcurrentCompositeConfiguration) {
    ConcurrentCompositeConfiguration composite=(ConcurrentCompositeConfiguration)config;
    for (    Configuration item : composite.getConfigurations()) {
      append(map,item);
    }
  }
 else {
    append(map,config);
  }
  return map;
}

Fixed version (ground truth):
@ReadOperation public Map<String,Object> invoke(){
  Map<String,Object> map=new LinkedHashMap<>();
  AbstractConfiguration config=ConfigurationManager.getConfigInstance();
  if (config instanceof ConcurrentCompositeConfiguration) {
    ConcurrentCompositeConfiguration composite=(ConcurrentCompositeConfiguration)config;
    for (    Configuration item : composite.getConfigurations()) {
      append(map,item);
    }
  }
 else {
    append(map,config);
  }
  return map;
}
Program: 162275
Project: 162275
Buggy source:
HttpRequest toHttpRequest(){
  return new HttpRequest(){
    @Override public HttpMethod getMethod(){
      return HttpMethod.resolve(RibbonRequest.this.toRequest().method());
    }
    @Override public String getMethodValue(){
      return getMethod().name();
    }
    @Override public URI getURI(){
      return RibbonRequest.this.getUri();
    }
    @Override public HttpHeaders getHeaders(){
      Map<String,List<String>> headers=new HashMap<String,List<String>>();
      Map<String,Collection<String>> feignHeaders=RibbonRequest.this.toRequest().headers();
      for (      String key : feignHeaders.keySet()) {
        headers.put(key,new ArrayList<String>(feignHeaders.get(key)));
      }
      HttpHeaders httpHeaders=new HttpHeaders();
      httpHeaders.putAll(headers);
      return httpHeaders;
    }
  }
;
}

Fixed version (ground truth):
HttpRequest toHttpRequest(){
  return new HttpRequest(){
    @Override public HttpMethod getMethod(){
      return HttpMethod.resolve(RibbonRequest.this.toRequest().method());
    }
    @Override public String getMethodValue(){
      return getMethod().name();
    }
    @Override public URI getURI(){
      return RibbonRequest.this.getUri();
    }
    @Override public HttpHeaders getHeaders(){
      Map<String,List<String>> headers=new HashMap<>();
      Map<String,Collection<String>> feignHeaders=RibbonRequest.this.toRequest().headers();
      for (      String key : feignHeaders.keySet()) {
        headers.put(key,new ArrayList<String>(feignHeaders.get(key)));
      }
      HttpHeaders httpHeaders=new HttpHeaders();
      httpHeaders.putAll(headers);
      return httpHeaders;
    }
  }
;
}
Program: 162276
Project: 162276
Buggy source:
FeignRetryPolicyServiceInstance(String serviceId,HttpRequest request){
  this.serviceId=serviceId;
  this.request=request;
  this.metadata=new HashMap<String,String>();
}

Fixed version (ground truth):
FeignRetryPolicyServiceInstance(String serviceId,HttpRequest request){
  this.serviceId=serviceId;
  this.request=request;
  this.metadata=new HashMap<>();
}
Program: 162277
Project: 162277
Buggy source:
@Override protected void doHealthCheck(Builder builder) throws Exception {
  List<String> openCircuitBreakers=new ArrayList<String>();
  for (  HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) {
    HystrixCircuitBreaker circuitBreaker=HystrixCircuitBreaker.Factory.getInstance(metrics.getCommandKey());
    if (circuitBreaker != null && circuitBreaker.isOpen()) {
      openCircuitBreakers.add(metrics.getCommandGroup().name() + "String_Node_Str" + metrics.getCommandKey().name());
    }
  }
  if (!openCircuitBreakers.isEmpty()) {
    builder.status(CIRCUIT_OPEN).withDetail("String_Node_Str",openCircuitBreakers);
  }
 else {
    builder.up();
  }
}

Fixed version (ground truth):
@Override protected void doHealthCheck(Builder builder) throws Exception {
  List<String> openCircuitBreakers=new ArrayList<>();
  for (  HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) {
    HystrixCircuitBreaker circuitBreaker=HystrixCircuitBreaker.Factory.getInstance(metrics.getCommandKey());
    if (circuitBreaker != null && circuitBreaker.isOpen()) {
      openCircuitBreakers.add(metrics.getCommandGroup().name() + "String_Node_Str" + metrics.getCommandKey().name());
    }
  }
  if (!openCircuitBreakers.isEmpty()) {
    builder.status(CIRCUIT_OPEN).withDetail("String_Node_Str",openCircuitBreakers);
  }
 else {
    builder.up();
  }
}
Program: 162278
Project: 162278
Buggy source:
@Override public void setAdditionalFilters(Collection<ClientFilter> additionalFilters){
  additionalFilters=new LinkedHashSet<ClientFilter>(additionalFilters);
  this.additionalFilters=additionalFilters;
  super.setAdditionalFilters(additionalFilters);
}

Fixed version (ground truth):
@Override public void setAdditionalFilters(Collection<ClientFilter> additionalFilters){
  additionalFilters=new LinkedHashSet<>(additionalFilters);
  this.additionalFilters=additionalFilters;
  super.setAdditionalFilters(additionalFilters);
}
Program: 162279
Project: 162279
Buggy source:
/** 
 * Construct a Jersey   {@link javax.ws.rs.core.Application} with all the resourcesrequired by the Eureka server.
 */
@Bean public javax.ws.rs.core.Application jerseyApplication(Environment environment,ResourceLoader resourceLoader){
  ClassPathScanningCandidateComponentProvider provider=new ClassPathScanningCandidateComponentProvider(false,environment);
  provider.addIncludeFilter(new AnnotationTypeFilter(Path.class));
  provider.addIncludeFilter(new AnnotationTypeFilter(Provider.class));
  Set<Class<?>> classes=new HashSet<Class<?>>();
  for (  String basePackage : EUREKA_PACKAGES) {
    Set<BeanDefinition> beans=provider.findCandidateComponents(basePackage);
    for (    BeanDefinition bd : beans) {
      Class<?> cls=ClassUtils.resolveClassName(bd.getBeanClassName(),resourceLoader.getClassLoader());
      classes.add(cls);
    }
  }
  Map<String,Object> propsAndFeatures=new HashMap<String,Object>();
  propsAndFeatures.put(ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX,EurekaConstants.DEFAULT_PREFIX + "String_Node_Str");
  DefaultResourceConfig rc=new DefaultResourceConfig(classes);
  rc.setPropertiesAndFeatures(propsAndFeatures);
  return rc;
}

Fixed version (ground truth):
/** 
 * Construct a Jersey   {@link javax.ws.rs.core.Application} with all the resourcesrequired by the Eureka server.
 */
@Bean public javax.ws.rs.core.Application jerseyApplication(Environment environment,ResourceLoader resourceLoader){
  ClassPathScanningCandidateComponentProvider provider=new ClassPathScanningCandidateComponentProvider(false,environment);
  provider.addIncludeFilter(new AnnotationTypeFilter(Path.class));
  provider.addIncludeFilter(new AnnotationTypeFilter(Provider.class));
  Set<Class<?>> classes=new HashSet<>();
  for (  String basePackage : EUREKA_PACKAGES) {
    Set<BeanDefinition> beans=provider.findCandidateComponents(basePackage);
    for (    BeanDefinition bd : beans) {
      Class<?> cls=ClassUtils.resolveClassName(bd.getBeanClassName(),resourceLoader.getClassLoader());
      classes.add(cls);
    }
  }
  Map<String,Object> propsAndFeatures=new HashMap<>();
  propsAndFeatures.put(ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX,EurekaConstants.DEFAULT_PREFIX + "String_Node_Str");
  DefaultResourceConfig rc=new DefaultResourceConfig(classes);
  rc.setPropertiesAndFeatures(propsAndFeatures);
  return rc;
}
Program: 162280
Project: 162280
Buggy source:
@Test public void contextLoads() throws Exception {
  this.application.hello();
  assertThat(this.registration).isNotNull();
  assertThat(this.registration.getServiceId()).isEqualTo("String_Node_Str");
  this.task.gatherMetrics();
  Message<?> message=this.collector.forChannel(output).take();
  JsonNode tree=mapper.readTree((String)message.getPayload());
  assertThat(tree.hasNonNull("String_Node_Str"));
  assertThat(tree.hasNonNull("String_Node_Str"));
  assertThat(tree.hasNonNull("String_Node_Str"));
  assertThat(tree.findValue("String_Node_Str").asText().equals("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void contextLoads() throws Exception {
  this.application.hello();
  assertThat(this.registration).isNotNull();
  assertThat(this.registration.getServiceId()).isEqualTo("String_Node_Str");
  this.task.gatherMetrics();
  Message<?> message=this.collector.forChannel(output).take();
  JsonNode tree=mapper.readTree((String)message.getPayload());
  assertThat(tree.hasNonNull("String_Node_Str")).isTrue();
  assertThat(tree.hasNonNull("String_Node_Str")).isTrue();
  assertThat(tree.hasNonNull("String_Node_Str")).isTrue();
  assertThat(tree.findValue("String_Node_Str").asText()).isEqualTo("String_Node_Str");
}
Program: 162281
Project: 162281
Buggy source:
@Override public List<Server> getFilteredListOfServers(List<Server> servers){
  List<Server> output=super.getFilteredListOfServers(servers);
  if (this.zone != null && output.size() == servers.size()) {
    List<Server> local=new ArrayList<Server>();
    for (    Server server : output) {
      if (this.zone.equalsIgnoreCase(server.getZone())) {
        local.add(server);
      }
    }
    if (!local.isEmpty()) {
      return local;
    }
  }
  return output;
}

Fixed version (ground truth):
@Override public List<Server> getFilteredListOfServers(List<Server> servers){
  List<Server> output=super.getFilteredListOfServers(servers);
  if (this.zone != null && output.size() == servers.size()) {
    List<Server> local=new ArrayList<>();
    for (    Server server : output) {
      if (this.zone.equalsIgnoreCase(server.getZone())) {
        local.add(server);
      }
    }
    if (!local.isEmpty()) {
      return local;
    }
  }
  return output;
}
Program: 162282
Project: 162282
Buggy source:
RibbonRetryPolicyServiceInstance(String serviceId,HttpRequest request){
  this.serviceId=serviceId;
  this.request=request;
  this.metadata=new HashMap<String,String>();
}

Fixed version (ground truth):
RibbonRetryPolicyServiceInstance(String serviceId,HttpRequest request){
  this.serviceId=serviceId;
  this.request=request;
  this.metadata=new HashMap<>();
}
Program: 162283
Project: 162283
Buggy source:
@Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event){
  Integer serverPort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  Integer managementPort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  Integer turbinePort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  if (serverPort == null && managementPort == null) {
    return;
  }
  if (serverPort != Integer.valueOf(-1)) {
    Map<String,Object> ports=new HashMap<String,Object>();
    if (turbinePort == null) {
      ports.put("String_Node_Str",-1);
      if (serverPort != null) {
        ports.put("String_Node_Str",serverPort);
      }
    }
 else     if (managementPort != null && managementPort != -1 && serverPort == null) {
      ports.put("String_Node_Str",managementPort);
    }
    event.getEnvironment().getPropertySources().addFirst(new MapPropertySource("String_Node_Str",ports));
  }
}

Fixed version (ground truth):
@Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event){
  Integer serverPort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  Integer managementPort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  Integer turbinePort=event.getEnvironment().getProperty("String_Node_Str",Integer.class);
  if (serverPort == null && managementPort == null) {
    return;
  }
  if (serverPort != Integer.valueOf(-1)) {
    Map<String,Object> ports=new HashMap<>();
    if (turbinePort == null) {
      ports.put("String_Node_Str",-1);
      if (serverPort != null) {
        ports.put("String_Node_Str",serverPort);
      }
    }
 else     if (managementPort != null && managementPort != -1 && serverPort == null) {
      ports.put("String_Node_Str",managementPort);
    }
    event.getEnvironment().getPropertySources().addFirst(new MapPropertySource("String_Node_Str",ports));
  }
}
Program: 162284
Project: 162284
Buggy source:
/** 
 * Compute a map of path pattern to route. The default is just a static map from the  {@link ZuulProperties}, but subclasses can add dynamic calculations.
 */
protected Map<String,ZuulRoute> locateRoutes(){
  LinkedHashMap<String,ZuulRoute> routesMap=new LinkedHashMap<String,ZuulRoute>();
  for (  ZuulRoute route : this.properties.getRoutes().values()) {
    routesMap.put(route.getPath(),route);
  }
  return routesMap;
}

Fixed version (ground truth):
/** 
 * Compute a map of path pattern to route. The default is just a static map from the  {@link ZuulProperties}, but subclasses can add dynamic calculations.
 */
protected Map<String,ZuulRoute> locateRoutes(){
  LinkedHashMap<String,ZuulRoute> routesMap=new LinkedHashMap<>();
  for (  ZuulRoute route : this.properties.getRoutes().values()) {
    routesMap.put(route.getPath(),route);
  }
  return routesMap;
}
Program: 162285
Project: 162285
Buggy source:
public void appendDebug(Map<String,Object> info,int status,MultiValueMap<String,String> headers){
  if (this.traces != null) {
    @SuppressWarnings("String_Node_Str") Map<String,Object> trace=(Map<String,Object>)info.get("String_Node_Str");
    Map<String,Object> output=new LinkedHashMap<String,Object>();
    trace.put("String_Node_Str",output);
    debugHeaders(headers,output);
    output.put("String_Node_Str","String_Node_Str" + status);
  }
}

Fixed version (ground truth):
public void appendDebug(Map<String,Object> info,int status,MultiValueMap<String,String> headers){
  if (this.traces != null) {
    @SuppressWarnings("String_Node_Str") Map<String,Object> trace=(Map<String,Object>)info.get("String_Node_Str");
    Map<String,Object> output=new LinkedHashMap<>();
    trace.put("String_Node_Str",output);
    debugHeaders(headers,output);
    output.put("String_Node_Str","String_Node_Str" + status);
  }
}
Program: 162287
Project: 162287
Buggy source:
private MultiValueMap<String,String> revertHeaders(Header[] headers){
  MultiValueMap<String,String> map=new LinkedMultiValueMap<String,String>();
  for (  Header header : headers) {
    String name=header.getName();
    if (!map.containsKey(name)) {
      map.put(name,new ArrayList<String>());
    }
    map.get(name).add(header.getValue());
  }
  return map;
}

Fixed version (ground truth):
private MultiValueMap<String,String> revertHeaders(Header[] headers){
  MultiValueMap<String,String> map=new LinkedMultiValueMap<>();
  for (  Header header : headers) {
    String name=header.getName();
    if (!map.containsKey(name)) {
      map.put(name,new ArrayList<String>());
    }
    map.get(name).add(header.getValue());
  }
  return map;
}
Program: 162288
Project: 162288
Buggy source:
@Bean public ApacheHttpClientFactory apacheHttpClientFactory(){
  return new MyApacheHttpClientFactory();
}

Fixed version (ground truth):
@Bean public ApacheHttpClientFactory apacheHttpClientFactory(HttpClientBuilder builder){
  return new MyApacheHttpClientFactory(builder);
}
Program: 162289
Project: 162289
Buggy source:
@Bean public OkHttpClientFactory clientFactory(){
  return new MyOkHttpClientFactory();
}

Fixed version (ground truth):
@Bean public OkHttpClientFactory clientFactory(OkHttpClient.Builder builder){
  return new MyOkHttpClientFactory(builder);
}
Program: 162290
Project: 162290
Buggy source:
@Bean public ApacheHttpClientFactory customHttpClientFactory(){
  return new CustomApacheHttpClientFactory();
}

Fixed version (ground truth):
@Bean public ApacheHttpClientFactory customHttpClientFactory(HttpClientBuilder builder){
  return new CustomApacheHttpClientFactory(builder);
}
Program: 162291
Project: 162291
Buggy source:
@Bean ApacheHttpClientFactory clientFactory(){
  return new DefaultApacheHttpClientFactory();
}

Fixed version (ground truth):
@Bean ApacheHttpClientFactory clientFactory(){
  return new DefaultApacheHttpClientFactory(HttpClientBuilder.create());
}
Program: 162292
Project: 162292
Buggy source:
@Bean public ApacheHttpClientFactory apacheHttpClientFactory(){
  return new MyApacheHttpClientFactory();
}

Fixed version (ground truth):
@Bean public ApacheHttpClientFactory apacheHttpClientFactory(HttpClientBuilder builder){
  return new MyApacheHttpClientFactory(builder);
}
Program: 162293
Project: 162293
Buggy source:
@Test public void updatedWhenRegionChanged(){
  changeProperty("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton(REGION)));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
  changeProperty("String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton(REGION)));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
}

Fixed version (ground truth):
@Test @Ignore public void updatedWhenRegionChanged(){
  changeProperty("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton(REGION)));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
  changeProperty("String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton(REGION)));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
}
Program: 162294
Project: 162294
Buggy source:
private void changeProperty(final String... pairs){
  EnvironmentTestUtils.addEnvironment(this.context,pairs);
}

Fixed version (ground truth):
private void changeProperty(final String... pairs){
  TestPropertyValues.of(pairs).applyTo(this.context);
}
Program: 162295
Project: 162295
Buggy source:
@Test public void updatedWhenAvailabilityZoneChanged(){
  changeProperty("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton("String_Node_Str")));
  assertTrue(this.peerEurekaNodes.getPeerEurekaNodes().get(0).getServiceUrl().equals("String_Node_Str"));
  changeProperty("String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton("String_Node_Str")));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
}

Fixed version (ground truth):
@Test @Ignore public void updatedWhenAvailabilityZoneChanged(){
  changeProperty("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton("String_Node_Str")));
  assertTrue(this.peerEurekaNodes.getPeerEurekaNodes().get(0).getServiceUrl().equals("String_Node_Str"));
  changeProperty("String_Node_Str");
  this.context.publishEvent(new EnvironmentChangeEvent(Collections.singleton("String_Node_Str")));
  assertTrue("String_Node_Str",serviceUrlMatches("String_Node_Str"));
}
Program: 162296
Project: 162296
Buggy source:
@Bean protected ArchaiusEndpoint archaiusEndpoint(){
  return new ArchaiusEndpoint();
}

Fixed version (ground truth):
@Bean @ConditionalOnEnabledEndpoint protected ArchaiusEndpoint archaiusEndpoint(){
  return new ArchaiusEndpoint();
}
Program: 162297
Project: 162297
Buggy source:
@Override public Map<String,Object> invoke(){
  Map<String,Object> map=new LinkedHashMap<String,Object>();
  AbstractConfiguration config=ConfigurationManager.getConfigInstance();
  if (config instanceof ConcurrentCompositeConfiguration) {
    ConcurrentCompositeConfiguration composite=(ConcurrentCompositeConfiguration)config;
    for (    Configuration item : composite.getConfigurations()) {
      append(map,item);
    }
  }
 else {
    append(map,config);
  }
  return map;
}

Fixed version (ground truth):
@ReadOperation public Map<String,Object> invoke(){
  Map<String,Object> map=new LinkedHashMap<String,Object>();
  AbstractConfiguration config=ConfigurationManager.getConfigInstance();
  if (config instanceof ConcurrentCompositeConfiguration) {
    ConcurrentCompositeConfiguration composite=(ConcurrentCompositeConfiguration)config;
    for (    Configuration item : composite.getConfigurations()) {
      append(map,item);
    }
  }
 else {
    append(map,config);
  }
  return map;
}
Program: 162298
Project: 162298
Buggy source:
@ManagedAttribute public Map<String,String> invoke(){
  Map<String,String> map=new LinkedHashMap<>();
  for (  Route route : this.routes.getRoutes()) {
    map.put(route.getFullPath(),route.getLocation());
  }
  return map;
}

Fixed version (ground truth):
@ReadOperation public Map<String,String> invoke(){
  Map<String,String> map=new LinkedHashMap<>();
  for (  Route route : this.routes.getRoutes()) {
    map.put(route.getFullPath(),route.getLocation());
  }
  return map;
}
Program: 162299
Project: 162299
Buggy source:
@Autowired public RoutesEndpoint(RouteLocator routes){
  super(ID,true);
  this.routes=routes;
}

Fixed version (ground truth):
public RoutesEndpoint(RouteLocator routes){
  this.routes=routes;
}
Program: 162300
Project: 162300
Buggy source:
@Bean public RoutesEndpoint zuulEndpoint(RouteLocator routeLocator){
  return new RoutesEndpoint(routeLocator);
}

Fixed version (ground truth):
@Bean @ConditionalOnEnabledEndpoint public RoutesEndpoint zuulEndpoint(RouteLocator routeLocator){
  return new RoutesEndpoint(routeLocator);
}
Program: 162301
Project: 162301
Buggy source:
@Test public void pathStartsWithSlash(){
  HystrixStreamEndpoint endpoint=new HystrixStreamEndpoint();
  assertEquals("String_Node_Str",endpoint.getPath());
}

Fixed version (ground truth):
@Test public void pathStartsWithSlash(){
  HystrixStreamEndpoint endpoint=new HystrixStreamEndpoint();
}
Program: 162302
Project: 162302
Buggy source:
private synchronized void buildContentData(){
  try {
    MultiValueMap<String,Object> builder=RequestContentDataExtractor.extract(this.request);
    FormHttpOutputMessage data=new FormHttpOutputMessage();
    this.contentType=MediaType.valueOf(this.request.getContentType());
    data.getHeaders().setContentType(this.contentType);
    FormBodyWrapperFilter.this.formHttpMessageConverter.write(builder,this.contentType,data);
    this.contentType=data.getHeaders().getContentType();
    this.contentData=data.getInput();
    this.contentLength=this.contentData.length;
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private synchronized void buildContentData(){
  if (this.contentData != null) {
    return;
  }
  try {
    MultiValueMap<String,Object> builder=RequestContentDataExtractor.extract(this.request);
    FormHttpOutputMessage data=new FormHttpOutputMessage();
    this.contentType=MediaType.valueOf(this.request.getContentType());
    data.getHeaders().setContentType(this.contentType);
    FormBodyWrapperFilter.this.formHttpMessageConverter.write(builder,this.contentType,data);
    this.contentType=data.getHeaders().getContentType();
    byte[] input=data.getInput();
    this.contentLength=input.length;
    this.contentData=input;
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 162303
Project: 162303
Buggy source:
public RibbonLoadBalancedRetryPolicy(String serviceId,RibbonLoadBalancerContext context,ServiceInstanceChooser loadBalanceChooser,IClientConfig clientConfig){
  this.serviceId=serviceId;
  this.lbContext=context;
  this.loadBalanceChooser=loadBalanceChooser;
  String retryableStatusCodesProp=clientConfig.getPropertyAsString(RETRYABLE_STATUS_CODES,"String_Node_Str");
  String[] retryableStatusCodesArray=retryableStatusCodesProp.split("String_Node_Str");
  for (  String code : retryableStatusCodesArray) {
    if (!StringUtils.isEmpty(code)) {
      try {
        retryableStatusCodes.add(Integer.valueOf(code));
      }
 catch (      NumberFormatException e) {
      }
    }
  }
}

Fixed version (ground truth):
public RibbonLoadBalancedRetryPolicy(String serviceId,RibbonLoadBalancerContext context,ServiceInstanceChooser loadBalanceChooser,IClientConfig clientConfig){
  this.serviceId=serviceId;
  this.lbContext=context;
  this.loadBalanceChooser=loadBalanceChooser;
  String retryableStatusCodesProp=clientConfig.getPropertyAsString(RETRYABLE_STATUS_CODES,"String_Node_Str");
  String[] retryableStatusCodesArray=retryableStatusCodesProp.split("String_Node_Str");
  for (  String code : retryableStatusCodesArray) {
    if (!StringUtils.isEmpty(code)) {
      try {
        retryableStatusCodes.add(Integer.valueOf(code.trim()));
      }
 catch (      NumberFormatException e) {
      }
    }
  }
}
Program: 162304
Project: 162304
Buggy source:
HttpRequest toHttpRequest(){
  return new HttpRequest(){
    @Override public HttpMethod getMethod(){
      return HttpMethod.resolve(RibbonRequest.this.toRequest().method());
    }
    @Override public URI getURI(){
      return RibbonRequest.this.getUri();
    }
    @Override public HttpHeaders getHeaders(){
      Map<String,List<String>> headers=new HashMap<String,List<String>>();
      Map<String,Collection<String>> feignHeaders=RibbonRequest.this.toRequest().headers();
      for (      String key : feignHeaders.keySet()) {
        headers.put(key,new ArrayList<String>(feignHeaders.get(key)));
      }
      HttpHeaders httpHeaders=new HttpHeaders();
      httpHeaders.putAll(headers);
      return httpHeaders;
    }
  }
;
}

Fixed version (ground truth):
HttpRequest toHttpRequest(){
  return new HttpRequest(){
    @Override public HttpMethod getMethod(){
      return HttpMethod.resolve(RibbonRequest.this.toRequest().method());
    }
    @Override public String getMethodValue(){
      return getMethod().name();
    }
    @Override public URI getURI(){
      return RibbonRequest.this.getUri();
    }
    @Override public HttpHeaders getHeaders(){
      Map<String,List<String>> headers=new HashMap<String,List<String>>();
      Map<String,Collection<String>> feignHeaders=RibbonRequest.this.toRequest().headers();
      for (      String key : feignHeaders.keySet()) {
        headers.put(key,new ArrayList<String>(feignHeaders.get(key)));
      }
      HttpHeaders httpHeaders=new HttpHeaders();
      httpHeaders.putAll(headers);
      return httpHeaders;
    }
  }
;
}
Program: 162306
Project: 162306
Buggy source:
@Override public boolean canWrite(Class<?> clazz,MediaType mediaType){
  return true;
}

Fixed version (ground truth):
@Override public boolean canWrite(Class<?> clazz,MediaType mediaType){
  if (clazz == String.class) {
    return true;
  }
  return false;
}
Program: 162307
Project: 162307
Buggy source:
@Test public void testCustomHttpMessageConverter(){
  SpringEncoder encoder=this.context.getInstance("String_Node_Str",SpringEncoder.class);
  assertThat(encoder,is(notNullValue()));
  RequestTemplate request=new RequestTemplate();
  encoder.encode("String_Node_Str",MyType.class,request);
  Collection<String> contentTypeHeader=request.headers().get("String_Node_Str");
  assertThat("String_Node_Str",contentTypeHeader,is(notNullValue()));
  assertThat("String_Node_Str",contentTypeHeader.isEmpty(),is(false));
  String header=contentTypeHeader.iterator().next();
  assertThat("String_Node_Str",header,is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testCustomHttpMessageConverter(){
  SpringEncoder encoder=this.context.getInstance("String_Node_Str",SpringEncoder.class);
  assertThat(encoder,is(notNullValue()));
  RequestTemplate request=new RequestTemplate();
  encoder.encode("String_Node_Str",MyType.class,request);
  Collection<String> contentTypeHeader=request.headers().get("String_Node_Str");
  assertThat("String_Node_Str",contentTypeHeader,is(notNullValue()));
  assertThat("String_Node_Str",contentTypeHeader.isEmpty(),is(false));
  String header=contentTypeHeader.iterator().next();
  assertThat("String_Node_Str",header,is("String_Node_Str"));
  assertThat("String_Node_Str",request.charset(),is(notNullValue()));
  assertThat("String_Node_Str",request.charset(),is(Charset.forName("String_Node_Str")));
}
Program: 162308
Project: 162308
Buggy source:
public String getQueryString(MultiValueMap<String,String> params){
  if (params.isEmpty()) {
    return "String_Node_Str";
  }
  StringBuilder query=new StringBuilder();
  Map<String,Object> singles=new HashMap<>();
  for (  String param : params.keySet()) {
    int i=0;
    for (    String value : params.get(param)) {
      query.append("String_Node_Str");
      query.append(param);
      if (!"String_Node_Str".equals(value)) {
        singles.put(param + i,value);
        query.append("String_Node_Str");
        query.append(param + i);
        query.append("String_Node_Str");
      }
      i++;
    }
  }
  UriTemplate template=new UriTemplate("String_Node_Str" + query.toString().substring(1));
  return template.expand(singles).toString();
}

Fixed version (ground truth):
/** 
 * Get url encoded query string. Pay special attention to single parameters with no values and parameter names with colon (:) from use of UriTemplate.
 * @param params Un-encoded request parameters
 * @return
 */
public String getQueryString(MultiValueMap<String,String> params){
  if (params.isEmpty()) {
    return "String_Node_Str";
  }
  StringBuilder query=new StringBuilder();
  Map<String,Object> singles=new HashMap<>();
  for (  String param : params.keySet()) {
    int i=0;
    for (    String value : params.get(param)) {
      query.append("String_Node_Str");
      query.append(param);
      if (!"String_Node_Str".equals(value)) {
        String key=param;
        if (key.contains("String_Node_Str")) {
          key=(key.replaceAll("String_Node_Str","String_Node_Str"));
        }
        if (key.contains("String_Node_Str")) {
          key=key.replaceAll("String_Node_Str","String_Node_Str");
        }
        key=key + i;
        singles.put(key,value);
        query.append("String_Node_Str");
        query.append(key);
        query.append("String_Node_Str");
      }
      i++;
    }
  }
  UriTemplate template=new UriTemplate("String_Node_Str" + query.toString().substring(1));
  return template.expand(singles).toString();
}
Program: 162309
Project: 162309
Buggy source:
@Override public Object run(){
  RequestContext ctx=RequestContext.getCurrentContext();
  HttpServletRequest request=ctx.getRequest();
  FormBodyRequestWrapper wrapper=null;
  if (request instanceof HttpServletRequestWrapper) {
    HttpServletRequest wrapped=(HttpServletRequest)ReflectionUtils.getField(this.requestField,request);
    wrapper=new FormBodyRequestWrapper(wrapped);
    ReflectionUtils.setField(this.requestField,request,wrapper);
  }
 else {
    wrapper=new FormBodyRequestWrapper(request);
    ctx.setRequest(wrapper);
  }
  if (wrapper != null) {
    ctx.getZuulRequestHeaders().put("String_Node_Str",wrapper.getContentType());
  }
  return null;
}

Fixed version (ground truth):
@Override public Object run(){
  RequestContext ctx=RequestContext.getCurrentContext();
  HttpServletRequest request=ctx.getRequest();
  FormBodyRequestWrapper wrapper=null;
  if (request instanceof HttpServletRequestWrapper) {
    HttpServletRequest wrapped=(HttpServletRequest)ReflectionUtils.getField(this.requestField,request);
    wrapper=new FormBodyRequestWrapper(wrapped);
    ReflectionUtils.setField(this.requestField,request,wrapper);
    if (request instanceof ServletRequestWrapper) {
      ReflectionUtils.setField(this.servletRequestField,request,wrapper);
    }
  }
 else {
    wrapper=new FormBodyRequestWrapper(request);
    ctx.setRequest(wrapper);
  }
  if (wrapper != null) {
    ctx.getZuulRequestHeaders().put("String_Node_Str",wrapper.getContentType());
  }
  return null;
}
Program: 162310
Project: 162310
Buggy source:
public FormBodyWrapperFilter(){
  this.requestField=ReflectionUtils.findField(HttpServletRequestWrapper.class,"String_Node_Str",HttpServletRequest.class);
  Assert.notNull(this.requestField,"String_Node_Str");
  this.requestField.setAccessible(true);
}

Fixed version (ground truth):
public FormBodyWrapperFilter(){
  this.requestField=ReflectionUtils.findField(HttpServletRequestWrapper.class,"String_Node_Str",HttpServletRequest.class);
  this.servletRequestField=ReflectionUtils.findField(ServletRequestWrapper.class,"String_Node_Str",ServletRequest.class);
  Assert.notNull(this.requestField,"String_Node_Str");
  Assert.notNull(this.servletRequestField,"String_Node_Str");
  this.requestField.setAccessible(true);
  this.servletRequestField.setAccessible(true);
}
Program: 162311
Project: 162311
Buggy source:
@Override protected ClientHttpResponse run() throws Exception {
  final RequestContext context=RequestContext.getCurrentContext();
  String contentLengthHeader=context.getRequest().getHeader("String_Node_Str");
  if (StringUtils.hasText(contentLengthHeader)) {
    this.context.setContentLength(new Long(contentLengthHeader));
  }
  RQ request=createRequest();
  RS response=this.client.executeWithLoadBalancer(request);
  context.set("String_Node_Str",response);
  if (this.isResponseTimedOut()) {
    if (response != null) {
      response.close();
    }
  }
  return new RibbonHttpResponse(response);
}

Fixed version (ground truth):
@Override protected ClientHttpResponse run() throws Exception {
  final RequestContext context=RequestContext.getCurrentContext();
  long contentLength=context.getRequest().getContentLengthLong();
  if (contentLength != -1) {
    this.context.setContentLength(contentLength);
  }
  RQ request=createRequest();
  RS response=this.client.executeWithLoadBalancer(request);
  context.set("String_Node_Str",response);
  if (this.isResponseTimedOut()) {
    if (response != null) {
      response.close();
    }
  }
  return new RibbonHttpResponse(response);
}
Program: 162312
Project: 162312
Buggy source:
@Override public URI reconstructURIWithServer(Server server,URI original){
  String scheme=original.getScheme();
  if (!"String_Node_Str".equals(scheme) && this.serverIntrospector.isSecure(server)) {
    original=UriComponentsBuilder.fromUri(original).scheme("String_Node_Str").build().toUri();
  }
  return super.reconstructURIWithServer(server,original);
}

Fixed version (ground truth):
@Override public URI reconstructURIWithServer(Server server,URI original){
  String scheme=original.getScheme();
  if (!"String_Node_Str".equals(scheme) && this.serverIntrospector.isSecure(server)) {
    original=UriComponentsBuilder.fromUri(original).scheme("String_Node_Str").build(true).toUri();
  }
  return super.reconstructURIWithServer(server,original);
}
Program: 162313
Project: 162313
Buggy source:
@Test public void restClientInitCalledOnce(){
  CountingConfig config=new CountingConfig();
  config.setProperty(CommonClientConfigKey.ConnectTimeout,"String_Node_Str");
  config.setProperty(CommonClientConfigKey.ReadTimeout,"String_Node_Str");
  config.setProperty(CommonClientConfigKey.MaxHttpConnectionsPerHost,"String_Node_Str");
  config.setClientName("String_Node_Str");
  new TestRestClient(config);
  assertThat(config.count,is(equalTo(1)));
}

Fixed version (ground truth):
@Test public void restClientInitCalledOnce(){
  new TestRestClient(config);
  assertThat(config.count,is(equalTo(1)));
}
Program: 162316
Project: 162316
Buggy source:
private void validate(Map<String,Object> attributes){
  if (StringUtils.hasText((String)attributes.get("String_Node_Str"))) {
    Assert.isTrue(!StringUtils.hasText((String)attributes.get("String_Node_Str")),"String_Node_Str");
  }
}

Fixed version (ground truth):
private void validate(Map<String,Object> attributes){
  AnnotationAttributes annotation=AnnotationAttributes.fromMap(attributes);
  annotation.getAliasedString("String_Node_Str",FeignClient.class,null);
}
Program: 162317
Project: 162317
Buggy source:
@Override public void start(){
  if (this.gauges == null) {
    return;
  }
  MetricsAsJsonPollerListener listener=new MetricsAsJsonPollerListener(){
    @Override public void handleJsonMetric(    String json){
      try {
        @SuppressWarnings("String_Node_Str") Map<String,Object> map=HystrixMetricsPollerConfiguration.this.mapper.readValue(json,Map.class);
        if (map != null && map.containsKey("String_Node_Str")) {
          addMetrics(map,"String_Node_Str");
        }
      }
 catch (      IOException ex) {
      }
    }
  }
;
  this.poller=new HystrixMetricsPoller(listener,2000);
  this.poller.start();
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void start(){
  if (this.gauges == null) {
    return;
  }
  MetricsAsJsonPollerListener listener=new MetricsAsJsonPollerListener(){
    @Override public void handleJsonMetric(    String json){
      try {
        @SuppressWarnings("String_Node_Str") Map<String,Object> map=HystrixMetricsPollerConfiguration.this.mapper.readValue(json,Map.class);
        if (map != null && map.containsKey("String_Node_Str")) {
          addMetrics(map,"String_Node_Str");
        }
      }
 catch (      IOException ex) {
      }
    }
  }
;
  this.poller=new HystrixMetricsPoller(listener,metricsProperties.getPollingIntervalMs());
  this.poller.start();
  logger.info("String_Node_Str");
}
Program: 162318
Project: 162318
Buggy source:
@Override public Object getObject() throws Exception {
  FeignContext context=applicationContext.getBean(FeignContext.class);
  Feign.Builder builder=feign(context);
  if (!StringUtils.hasText(this.url)) {
    String url;
    if (!this.name.startsWith("String_Node_Str")) {
      url="String_Node_Str" + this.name;
    }
 else {
      url=this.name;
    }
    return loadBalance(builder,context,new HardCodedTarget<>(this.type,this.name,url));
  }
  if (StringUtils.hasText(this.url) && !this.url.startsWith("String_Node_Str")) {
    this.url="String_Node_Str" + this.url;
  }
  return targeter.target(this,builder,context,new HardCodedTarget<>(this.type,this.name,this.url));
}

Fixed version (ground truth):
@Override public Object getObject() throws Exception {
  FeignContext context=applicationContext.getBean(FeignContext.class);
  Feign.Builder builder=feign(context);
  if (!StringUtils.hasText(this.url)) {
    String url;
    if (!this.name.startsWith("String_Node_Str")) {
      url="String_Node_Str" + this.name;
    }
 else {
      url=this.name;
    }
    url+=cleanPath();
    return loadBalance(builder,context,new HardCodedTarget<>(this.type,this.name,url));
  }
  if (StringUtils.hasText(this.url) && !this.url.startsWith("String_Node_Str")) {
    this.url="String_Node_Str" + this.url;
  }
  String url=this.url + cleanPath();
  return targeter.target(this,builder,context,new HardCodedTarget<>(this.type,this.name,url));
}
Program: 162319
Project: 162319
Buggy source:
private void registerFeignClient(BeanDefinitionRegistry registry,AnnotationMetadata annotationMetadata,Map<String,Object> attributes){
  String className=annotationMetadata.getClassName();
  BeanDefinitionBuilder definition=BeanDefinitionBuilder.genericBeanDefinition(FeignClientFactoryBean.class);
  validate(attributes);
  definition.addPropertyValue("String_Node_Str",getUrl(attributes));
  String name=getName(attributes);
  definition.addPropertyValue("String_Node_Str",name);
  definition.addPropertyValue("String_Node_Str",className);
  definition.addPropertyValue("String_Node_Str",attributes.get("String_Node_Str"));
  definition.addPropertyValue("String_Node_Str",attributes.get("String_Node_Str"));
  definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
  String alias=name + "String_Node_Str";
  AbstractBeanDefinition beanDefinition=definition.getBeanDefinition();
  beanDefinition.setPrimary(true);
  BeanDefinitionHolder holder=new BeanDefinitionHolder(beanDefinition,className,new String[]{alias});
  BeanDefinitionReaderUtils.registerBeanDefinition(holder,registry);
}

Fixed version (ground truth):
private void registerFeignClient(BeanDefinitionRegistry registry,AnnotationMetadata annotationMetadata,Map<String,Object> attributes){
  String className=annotationMetadata.getClassName();
  BeanDefinitionBuilder definition=BeanDefinitionBuilder.genericBeanDefinition(FeignClientFactoryBean.class);
  validate(attributes);
  definition.addPropertyValue("String_Node_Str",getUrl(attributes));
  definition.addPropertyValue("String_Node_Str",getPath(attributes));
  String name=getName(attributes);
  definition.addPropertyValue("String_Node_Str",name);
  definition.addPropertyValue("String_Node_Str",className);
  definition.addPropertyValue("String_Node_Str",attributes.get("String_Node_Str"));
  definition.addPropertyValue("String_Node_Str",attributes.get("String_Node_Str"));
  definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
  String alias=name + "String_Node_Str";
  AbstractBeanDefinition beanDefinition=definition.getBeanDefinition();
  beanDefinition.setPrimary(true);
  BeanDefinitionHolder holder=new BeanDefinitionHolder(beanDefinition,className,new String[]{alias});
  BeanDefinitionReaderUtils.registerBeanDefinition(holder,registry);
}
Program: 162320
Project: 162320
Buggy source:
@Bean public RibbonClientHttpRequestFactory ribbonClientHttpRequestFactory(){
  return new RibbonClientHttpRequestFactory(this.springClientFactory,this.loadBalancerClient);
}

Fixed version (ground truth):
@Bean public RibbonClientHttpRequestFactory ribbonClientHttpRequestFactory(){
  return new RibbonClientHttpRequestFactory(this.springClientFactory);
}
Program: 162321
Project: 162321
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public ClientHttpRequest createRequest(URI originalUri,HttpMethod httpMethod) throws IOException {
  String serviceId=originalUri.getHost();
  if (serviceId == null) {
    throw new IOException("String_Node_Str" + originalUri.toASCIIString() + "String_Node_Str");
  }
  ServiceInstance instance=this.loadBalancer.choose(serviceId);
  if (instance == null) {
    throw new IllegalStateException("String_Node_Str" + serviceId);
  }
  URI uri=this.loadBalancer.reconstructURI(instance,originalUri);
  IClientConfig clientConfig=this.clientFactory.getClientConfig(instance.getServiceId());
  RestClient client=this.clientFactory.getClient(instance.getServiceId(),RestClient.class);
  HttpRequest.Verb verb=HttpRequest.Verb.valueOf(httpMethod.name());
  RibbonLoadBalancerContext context=this.clientFactory.getLoadBalancerContext(serviceId);
  Server server=null;
  if (instance instanceof RibbonServer) {
    server=((RibbonServer)instance).getServer();
  }
  RibbonStatsRecorder statsRecorder=new RibbonStatsRecorder(context,server);
  return new RibbonHttpRequest(uri,verb,client,clientConfig,statsRecorder);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public ClientHttpRequest createRequest(URI originalUri,HttpMethod httpMethod) throws IOException {
  String serviceId=originalUri.getHost();
  if (serviceId == null) {
    throw new IOException("String_Node_Str" + originalUri.toASCIIString() + "String_Node_Str");
  }
  IClientConfig clientConfig=this.clientFactory.getClientConfig(serviceId);
  RestClient client=this.clientFactory.getClient(serviceId,RestClient.class);
  HttpRequest.Verb verb=HttpRequest.Verb.valueOf(httpMethod.name());
  return new RibbonHttpRequest(originalUri,verb,client,clientConfig);
}
Program: 162322
Project: 162322
Buggy source:
public RibbonClientHttpRequestFactory(SpringClientFactory clientFactory,LoadBalancerClient loadBalancer){
  this.clientFactory=clientFactory;
  this.loadBalancer=loadBalancer;
}

Fixed version (ground truth):
public RibbonClientHttpRequestFactory(SpringClientFactory clientFactory){
  this.clientFactory=clientFactory;
}
Program: 162323
Project: 162323
Buggy source:
@Override protected ClientHttpResponse executeInternal(HttpHeaders headers) throws IOException {
  try {
    addHeaders(headers);
    if (outputStream != null) {
      outputStream.close();
      builder.entity(outputStream.toByteArray());
    }
    HttpRequest request=builder.build();
    HttpResponse response=client.execute(request,config);
    statsRecorder.recordStats(response);
    return new RibbonHttpResponse(response);
  }
 catch (  Exception e) {
    statsRecorder.recordStats(e);
    throw new IOException(e);
  }
}

Fixed version (ground truth):
@Override protected ClientHttpResponse executeInternal(HttpHeaders headers) throws IOException {
  try {
    addHeaders(headers);
    if (outputStream != null) {
      outputStream.close();
      builder.entity(outputStream.toByteArray());
    }
    HttpRequest request=builder.build();
    HttpResponse response=client.executeWithLoadBalancer(request,config);
    return new RibbonHttpResponse(response);
  }
 catch (  Exception e) {
    throw new IOException(e);
  }
}
Program: 162324
Project: 162324
Buggy source:
private void addHeaders(HttpHeaders headers){
  for (  String name : headers.keySet()) {
    if (!isDynamic(name)) {
      List<String> values=headers.get(name);
      for (      String value : values) {
        builder.header(name,value);
      }
    }
  }
}

Fixed version (ground truth):
private void addHeaders(HttpHeaders headers){
  for (  String name : headers.keySet()) {
    if (isDynamic(name) && outputStream != null) {
      continue;
    }
    if (name.equals("String_Node_Str") && outputStream == null) {
      continue;
    }
    List<String> values=headers.get(name);
    for (    String value : values) {
      builder.header(name,value);
    }
  }
}
Program: 162325
Project: 162325
Buggy source:
public RibbonHttpRequest(URI uri,HttpRequest.Verb verb,RestClient client,IClientConfig config,RibbonStatsRecorder statsRecorder){
  this.uri=uri;
  this.verb=verb;
  this.client=client;
  this.config=config;
  this.statsRecorder=statsRecorder;
  this.builder=HttpRequest.newBuilder().uri(uri).verb(verb);
}

Fixed version (ground truth):
public RibbonHttpRequest(URI uri,HttpRequest.Verb verb,RestClient client,IClientConfig config){
  this.uri=uri;
  this.verb=verb;
  this.client=client;
  this.config=config;
  this.builder=HttpRequest.newBuilder().uri(uri).verb(verb);
}
Program: 162326
Project: 162326
Buggy source:
private AtomicLong getCounterStorage(Id id){
  final AtomicLong newCounter=new AtomicLong(0);
  final AtomicLong existingCounter=counters.putIfAbsent(id,newCounter);
  return existingCounter == null ? newCounter : existingCounter;
}

Fixed version (ground truth):
private AtomicLong getCounterStorage(Id id){
  final AtomicLong newCounter=new AtomicLong(0);
  final AtomicLong existingCounter=counters.putIfAbsent(id,newCounter);
  return existingCounter == null ? registry.gauge(id,newCounter) : existingCounter;
}