docs: private void dumpHoldTimeAndStackInfo(MCWrapper mcw, StringBuffer aBuffer, StringBuffer connectionLeakBuffer, long currentTime,
                                            ArrayList<ToStringStackElements> mcwInitialStackList) {
          Throwable t = null;
          long startHoldTime = ((com.ibm.ejs.j2c.MCWrapper) mcw).getHoldTimeStart();
          if (startHoldTime != 0) { //  - if start time is zero we don't have enough information to dump the stack information.
              long holdTime = currentTime - startHoldTime;
              if (holdTime > holdTimeLimit * 1000) {
                  /*
                   * Remove nl chars from current buffer, normally the length should be one.
                   */
                  for (int i = 0; i < nl.length(); ++i) {
                      aBuffer.deleteCharAt(aBuffer.length() - 1);
                  }
                  //aBuffer.deleteCharAt(aBuffer.length()-1);
                  Date startDateTime = new Date(startHoldTime);
                  long lastAllTime = ((com.ibm.ejs.j2c.MCWrapper) mcw).getLastAllocationTime();
                  String startDateAllocationTime = startHoldTime == lastAllTime ? " Start time same as last allocation time " : " Last allocation time " + new Date(lastAllTime);
                  long timeInUseInSeconds = holdTime / 1000;
                  /*
                   * Add the new in-use information to the trace.
                   */
                  aBuffer.append(" Start time inuse " + startDateTime + " Time inuse " + timeInUseInSeconds + " (seconds) " + startDateAllocationTime + nl);
                  t = ((com.ibm.ejs.j2c.MCWrapper) mcw).getInitialRequestStackTrace();
                  if (t != null) {
                      /*
                       * Add the connection leak logic to the trace.
                       */
                      connectionLeakBuffer.append("  " + mcw);
                      connectionLeakBuffer.append("     Start time inuse " + startDateTime + " Time inuse " + timeInUseInSeconds + " (seconds)" + nl);
                      connectionLeakBuffer.append("    " + startDateAllocationTime + nl);
                      connectionLeakBuffer.append("       getConnection stack trace information:");
  
                      StackTraceElement[] mcwInitialStack = t.getStackTrace();
                      boolean stringBuffersEqual = false;
                      int matchingMCStack = -1;
                      int occurred = -1;
                      if (mcwInitialStackList.size() != 0) {
                          // process stack information looking for duplicates.
                          int j = 0;
                          for (ToStringStackElements previousMCWSTE : mcwInitialStackList) {
                              boolean stackLinesEqual = true;
                              if (mcwInitialStack.length == previousMCWSTE.ste.length) {
                                  int i = 0;
                                  for (Object currentMCWSTE : mcwInitialStack) {
                                      // search through stack comparing each line in stack
                                      if (!currentMCWSTE.toString().equals(previousMCWSTE.ste[i++].toString())) {
                                          stackLinesEqual = false;
                                          break;
                                      }
                                  }
                                  if (stackLinesEqual == true) {
                                      // stacks are equal
                                      stringBuffersEqual = true;
                                      matchingMCStack = ++j;
                                      occurred = ++previousMCWSTE.numberOfOccurrents;
                                      break;
                                  }
                              }
                              ++j;
                          }
                      }
                      if (stringBuffersEqual) {
                          // stack matches existing stack already dumped.
                          connectionLeakBuffer.append("          Matches stack number " + matchingMCStack + " occurred " + occurred + " times" + nl);
                      } else {
                          // add stack and dump the stack information
                          mcwInitialStackList.add(new ToStringStackElements(mcwInitialStack, 1));
                          connectionLeakBuffer.append("          Stack number " + mcwInitialStackList.size() + nl);
                          for (Object o : mcwInitialStack) {
                              connectionLeakBuffer.append("          " + o.toString() + nl);
                          }
                      }
                      connectionLeakBuffer.append(nl);
                  }
              }
          }
      }