Program: 114839
Project: 114839
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str" + "String_Node_Str",dependsOnMethods="String_Node_Str") public void CheckAccessControlAllowCredentialsHeadersWithSpecificOrigin() throws Exception {
  if (TestUserMode.SUPER_TENANT_ADMIN == userMode) {
    serverConfigurationManager.applyConfigurationWithoutRestart(new File(getAMResourceLocation() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"));
    serverConfigurationManager.restartGracefully();
  }
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION,APIMIntegrationConstants.IS_API_EXISTS);
  HttpClient httpclient=HttpClientBuilder.create().build();
  HttpGet get=new HttpGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION));
  get.addHeader("String_Node_Str",ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE_LOCALHOST);
  get.addHeader("String_Node_Str","String_Node_Str" + accessToken);
  org.apache.http.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_LOCALHOST,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  assertNotNull(pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + "String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str" + "String_Node_Str",dependsOnMethods="String_Node_Str") public void CheckAccessControlAllowCredentialsHeadersWithSpecificOrigin() throws Exception {
  if (TestUserMode.SUPER_TENANT_ADMIN == userMode) {
    serverConfigurationManager.applyConfigurationWithoutRestart(new File(getAMResourceLocation() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"));
    serverConfigurationManager.restartGracefully();
    super.init();
  }
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION,APIMIntegrationConstants.IS_API_EXISTS);
  HttpClient httpclient=HttpClientBuilder.create().build();
  HttpGet get=new HttpGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION));
  get.addHeader("String_Node_Str",ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE_LOCALHOST);
  get.addHeader("String_Node_Str","String_Node_Str" + accessToken);
  org.apache.http.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_LOCALHOST,ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + "String_Node_Str");
  assertNotNull(pickHeader(responseHeaders,ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + "String_Node_Str");
}