Program: 116998
Project: 116998
Buggy source:
@Override public void put(URI uri,Map<String,List<String>> responseHeaders) throws IOException {
  if ((uri == null) || (responseHeaders == null))   return;
  String url=uri.toString();
  String expiryString=null;
  int sessionExpiry=AppConfig.getInstance(null).forceSessionCookieExpiry;
  for (  String headerKey : responseHeaders.keySet()) {
    if ((headerKey == null) || !(headerKey.equalsIgnoreCase("String_Node_Str") || headerKey.equalsIgnoreCase("String_Node_Str")))     continue;
    for (    String headerValue : responseHeaders.get(headerKey)) {
      boolean passOriginalHeader=true;
      if (sessionExpiry > 0) {
        List<HttpCookie> cookies=HttpCookie.parse(headerValue);
        for (        HttpCookie cookie : cookies) {
          if (cookie.getMaxAge() < 0 || cookie.getDiscard()) {
            cookie.setMaxAge(sessionExpiry);
            cookie.setDiscard(false);
            if (expiryString == null) {
              Calendar calendar=Calendar.getInstance();
              calendar.add(Calendar.SECOND,sessionExpiry);
              Date expiryDate=calendar.getTime();
              expiryString=String.format("String_Node_Str",DateUtils.formatDate(expiryDate),sessionExpiry);
            }
            StringBuilder newHeader=new StringBuilder();
            newHeader.append(cookie.toString());
            newHeader.append(expiryString);
            if (cookie.getPath() != null) {
              newHeader.append("String_Node_Str");
              newHeader.append(cookie.getPath());
            }
            if (cookie.getDomain() != null) {
              newHeader.append("String_Node_Str");
              newHeader.append(cookie.getDomain());
            }
            if (cookie.getSecure()) {
              newHeader.append("String_Node_Str");
            }
            this.webkitCookieManager.setCookie(url,newHeader.toString());
            passOriginalHeader=false;
          }
        }
      }
      if (passOriginalHeader)       this.webkitCookieManager.setCookie(url,headerValue);
    }
  }
}

Fixed version (ground truth):
@Override public void put(URI uri,Map<String,List<String>> responseHeaders) throws IOException {
  if ((uri == null) || (responseHeaders == null))   return;
  String url=uri.toString();
  String expiryString=null;
  int sessionExpiry=AppConfig.getInstance(null).forceSessionCookieExpiry;
  for (  String headerKey : responseHeaders.keySet()) {
    if ((headerKey == null) || !(headerKey.equalsIgnoreCase("String_Node_Str") || headerKey.equalsIgnoreCase("String_Node_Str")))     continue;
    for (    String headerValue : responseHeaders.get(headerKey)) {
      boolean passOriginalHeader=true;
      if (sessionExpiry > 0) {
        List<HttpCookie> cookies=HttpCookie.parse(headerValue);
        for (        HttpCookie cookie : cookies) {
          if (cookie.getMaxAge() < 0 || cookie.getDiscard()) {
            cookie.setMaxAge(sessionExpiry);
            cookie.setDiscard(false);
            if (expiryString == null) {
              Calendar calendar=Calendar.getInstance();
              calendar.add(Calendar.SECOND,sessionExpiry);
              Date expiryDate=calendar.getTime();
              expiryString="String_Node_Str" + DateUtils.formatDate(expiryDate) + "String_Node_Str"+ Integer.toString(sessionExpiry);
            }
            StringBuilder newHeader=new StringBuilder();
            newHeader.append(cookie.toString());
            newHeader.append(expiryString);
            if (cookie.getPath() != null) {
              newHeader.append("String_Node_Str");
              newHeader.append(cookie.getPath());
            }
            if (cookie.getDomain() != null) {
              newHeader.append("String_Node_Str");
              newHeader.append(cookie.getDomain());
            }
            if (cookie.getSecure()) {
              newHeader.append("String_Node_Str");
            }
            this.webkitCookieManager.setCookie(url,newHeader.toString());
            passOriginalHeader=false;
          }
        }
      }
      if (passOriginalHeader)       this.webkitCookieManager.setCookie(url,headerValue);
    }
  }
}