Program: 11972
Project: 11972
Buggy source:
/** 
 * This method provide dcos and sso token to be used to generate client cookie
 * @return cookieToken list of token generated
 * @throws Exception exception
 */
public HashMap<String,String> ssoTokenGenerator() throws Exception {
  String protocol="String_Node_Str";
  HashMap<String,String> cookieToken=new HashMap<>();
  SSLContext sslContext=SSLContext.getInstance("String_Node_Str");
  sslContext.init(null,ALL_TRUSTING_TRUST_MANAGER,new SecureRandom());
  HttpClientContext context=HttpClientContext.create();
  HttpGet httpGet=new HttpGet(protocol + ssoHost + "String_Node_Str");
  HttpClient client=HttpClientBuilder.create().setSslcontext(sslContext).setRedirectStrategy(new LaxRedirectStrategy()).setDefaultRequestConfig(RequestConfig.custom().setCircularRedirectsAllowed(true).build()).build();
  try {
    HttpResponse firstResponse=client.execute(httpGet,context);
    logger.debug(firstResponse.getStatusLine().toString());
    Document doc=Jsoup.parse(getStringFromIS(firstResponse.getEntity().getContent()));
    Elements code=doc.select("String_Node_Str");
    String loginCode=code.attr("String_Node_Str");
    String executionCode=doc.select("String_Node_Str").attr("String_Node_Str");
    for (    Header oneHeader : firstResponse.getAllHeaders()) {
      logger.debug(oneHeader.getName() + "String_Node_Str" + oneHeader.getValue());
    }
    URI redirect=context.getRedirectLocations().get(context.getRedirectLocations().size() - 1);
    List<NameValuePair> params=new ArrayList<>();
    params.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    params.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    params.add(new BasicNameValuePair("String_Node_Str",userName));
    params.add(new BasicNameValuePair("String_Node_Str",passWord));
    if (!tenant.isEmpty()) {
      params.add(new BasicNameValuePair("String_Node_Str",tenant));
    }
    params.add(new BasicNameValuePair("String_Node_Str",loginCode));
    params.add(new BasicNameValuePair("String_Node_Str",executionCode));
    HttpPost httpPost=new HttpPost(redirect);
    httpPost.setEntity(new UrlEncodedFormEntity(params));
    HttpResponse secondResponse=client.execute(httpPost,context);
    for (    Header oneHeader : secondResponse.getAllHeaders()) {
      logger.debug(oneHeader.getName() + "String_Node_Str" + oneHeader.getValue());
    }
    HttpGet managementGet=new HttpGet(protocol + ssoHost + managementHost);
    client.execute(managementGet,context);
    for (    Cookie oneCookie : context.getCookieStore().getCookies()) {
      logger.debug(oneCookie.getName() + "String_Node_Str" + oneCookie.getValue());
      cookieToken.put(oneCookie.getName(),oneCookie.getValue());
    }
  }
 catch (  Exception e) {
    e.getStackTrace();
  }
  return cookieToken;
}

Fixed version (ground truth):
/** 
 * This method provide dcos and sso token to be used to generate client cookie
 * @return cookieToken list of token generated
 * @throws Exception exception
 */
public HashMap<String,String> ssoTokenGenerator() throws Exception {
  String protocol="String_Node_Str";
  HashMap<String,String> cookieToken=new HashMap<>();
  SSLContext sslContext=SSLContext.getInstance("String_Node_Str");
  sslContext.init(null,ALL_TRUSTING_TRUST_MANAGER,new SecureRandom());
  HttpClientContext context=HttpClientContext.create();
  HttpGet httpGet=new HttpGet(protocol + ssoHost + "String_Node_Str");
  HttpClient client=HttpClientBuilder.create().setSslcontext(sslContext).setRedirectStrategy(new LaxRedirectStrategy()).setDefaultRequestConfig(RequestConfig.custom().setCircularRedirectsAllowed(true).build()).build();
  try {
    HttpResponse firstResponse=client.execute(httpGet,context);
    logger.debug(firstResponse.getStatusLine().toString());
    Document doc=Jsoup.parse(getStringFromIS(firstResponse.getEntity().getContent()));
    Elements code=doc.select("String_Node_Str");
    String loginCode=code.attr("String_Node_Str");
    String executionCode=doc.select("String_Node_Str").attr("String_Node_Str");
    for (    Header oneHeader : firstResponse.getAllHeaders()) {
      logger.debug(oneHeader.getName() + "String_Node_Str" + oneHeader.getValue());
    }
    URI redirect=context.getRedirectLocations().get(context.getRedirectLocations().size() - 1);
    List<NameValuePair> params=new ArrayList<>();
    params.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    params.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
    params.add(new BasicNameValuePair("String_Node_Str",userName));
    params.add(new BasicNameValuePair("String_Node_Str",passWord));
    if (tenant != null) {
      params.add(new BasicNameValuePair("String_Node_Str",tenant));
    }
    params.add(new BasicNameValuePair("String_Node_Str",loginCode));
    params.add(new BasicNameValuePair("String_Node_Str",executionCode));
    HttpPost httpPost=new HttpPost(redirect);
    httpPost.setEntity(new UrlEncodedFormEntity(params));
    HttpResponse secondResponse=client.execute(httpPost,context);
    for (    Header oneHeader : secondResponse.getAllHeaders()) {
      logger.debug(oneHeader.getName() + "String_Node_Str" + oneHeader.getValue());
    }
    HttpGet managementGet=new HttpGet(protocol + ssoHost + managementHost);
    client.execute(managementGet,context);
    for (    Cookie oneCookie : context.getCookieStore().getCookies()) {
      logger.debug(oneCookie.getName() + "String_Node_Str" + oneCookie.getValue());
      cookieToken.put(oneCookie.getName(),oneCookie.getValue());
    }
  }
 catch (  Exception e) {
    e.getStackTrace();
  }
  return cookieToken;
}