docs: private void addToWorkList(LinkedList<WorkListItem> workList, WorkListItem itemToAdd) {
          if (DEBUG) {
              new RuntimeException("Adding work list item " + itemToAdd).printStackTrace(System.out);
          }
          if (!itemToAdd.isAppCodeBase()) {
              // Auxiliary codebases are always added at the end
              workList.addLast(itemToAdd);
              return;
          }
  
          // Adding an application codebase: position a ListIterator
          // just before first auxiliary codebase (or at the end of the list
          // if there are no auxiliary codebases)
          ListIterator<WorkListItem> i = workList.listIterator();
          while (i.hasNext()) {
              WorkListItem listItem = i.next();
              if (!listItem.isAppCodeBase()) {
                  i.previous();
                  break;
              }
          }
  
          // Add the codebase to the worklist
          i.add(itemToAdd);
      }