Program: 114865
Project: 114865
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void CheckCORSHeadersInResponse() throws Exception {
  HttpClient httpclient=HttpClientBuilder.create().build();
  HttpGet get=new HttpGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION));
  get.addHeader("String_Node_Str","String_Node_Str");
  get.addHeader("String_Node_Str","String_Node_Str" + accessToken);
  HttpResponse response=httpclient.execute(get);
  assertEquals(response.getStatusLine().getStatusCode(),HTTP_RESPONSE_CODE_OK,"String_Node_Str");
  Header[] responseHeaders=response.getAllHeaders();
  log.info("String_Node_Str");
  for (  Header header : responseHeaders) {
    log.info(header.getName() + "String_Node_Str" + header.getValue());
  }
  Header header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_METHODS_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_METHODS_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_METHODS_HEADER_ALL_VALUES,ACCESS_CONTROL_ALLOW_METHODS_HEADER + "String_Node_Str");
  header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_HEADERS_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_HEADERS_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_HEADERS_HEADER_VALUE,ACCESS_CONTROL_ALLOW_HEADERS_HEADER + "String_Node_Str");
  assertNull(pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void CheckCORSHeadersInResponse() throws Exception {
  HttpClient httpclient=HttpClientBuilder.create().build();
  HttpGet get=new HttpGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION));
  get.addHeader("String_Node_Str","String_Node_Str");
  get.addHeader("String_Node_Str","String_Node_Str" + accessToken);
  HttpResponse response=httpclient.execute(get);
  assertEquals(response.getStatusLine().getStatusCode(),HTTP_RESPONSE_CODE_OK,"String_Node_Str");
  Header[] responseHeaders=response.getAllHeaders();
  log.info("String_Node_Str");
  for (  Header header : responseHeaders) {
    log.info(header.getName() + "String_Node_Str" + header.getValue());
  }
  Header header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_METHODS_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_METHODS_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_METHODS_HEADER_VALUE,ACCESS_CONTROL_ALLOW_METHODS_HEADER + "String_Node_Str");
  header=pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_HEADERS_HEADER);
  assertNotNull(header,ACCESS_CONTROL_ALLOW_HEADERS_HEADER + "String_Node_Str");
  assertEquals(header.getValue(),ACCESS_CONTROL_ALLOW_HEADERS_HEADER_VALUE,ACCESS_CONTROL_ALLOW_HEADERS_HEADER + "String_Node_Str");
  assertNull(pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + "String_Node_Str" + "String_Node_Str");
}