code: private void createNodes(DefaultMutableTreeNode top) {
  
      // leaves
      DefaultMutableTreeNode defaultMutableTreeNode = null;
  
      // Train Files
      DefaultMutableTreeNode trainCategory = new DefaultMutableTreeNode("Train");
      top.add(trainCategory);
  
      // Test Files
      DefaultMutableTreeNode testCategory = new DefaultMutableTreeNode("Test");
      top.add(testCategory);
  
      // long count = UCSDAnomalyDAO.selectCount();
      int trainTestSplit = UCSDAnomalyDAO.getTrainTestSplit();
      int index = 1;
      do {
  
        DefaultMutableTreeNode category = new DefaultMutableTreeNode(index);
        if (index <= trainTestSplit) {
          trainCategory.add(category);
        } else {
          testCategory.add(category);
        }
  
        List<UCSDAnomaly> fames = UCSDAnomalyDAO.selectClip(index);
        for (UCSDAnomaly ucsdAnomaly : fames) {
          // ucsdAnomaly.getTifid();
          defaultMutableTreeNode = new DefaultMutableTreeNode(ucsdAnomaly);
          category.add(defaultMutableTreeNode);
        }
      } while (UCSDAnomalyDAO.selectClip(++index).size() > 0);
  
    }
docs: Create the tree
  
  @param top