@SuppressWarnings("unchecked")
 public void regen() {
   List<CheckBoxNode> nodes = new ArrayList<>();
   Enumeration<DefaultMutableTreeNode> children = root.children();
   while (children.hasMoreElements()) {
     CheckBoxNode child = (CheckBoxNode) children.nextElement();
     Enumeration<DefaultMutableTreeNode> childChild = child.children();
     while (childChild.hasMoreElements()) {
       CheckBoxNode leaf = (CheckBoxNode) childChild.nextElement();
       nodes.add(leaf);
     }
   }
   for (CheckBoxNode n : nodes) {
     for (IClass c : n.getClasses()) {
       c.setDrawable(false);
     }
   }
   for (CheckBoxNode n : nodes) {
     if (n.isSelected()) {
       for (IClass c : n.getClasses()) {
         c.setDrawable(true);
       }
     }
   }
   ClassParser.getInstance().regenGV();
 }
 private void initializeCheckBoxPatternArrays() {
   for (IPatternDetector p : this.patternInformation.keySet()) {
     if (this.patternInformation.get(p).isEmpty()) {
       continue;
     }
     CheckBoxNode node = new CheckBoxNode(p.getPatternName(), this, false);
     for (IClass patternName : this.patternInformation.get(p).keySet()) {
       CheckBoxNode t =
           new CheckBoxNode(
               patternName.getClassName(),
               patternInformation.get(p).get(patternName),
               this,
               false);
       node.add(t);
     }
     this.root.add(node);
   }
 }