String currentSortOrder = (String) sortOrderChooser.getSelectedItem(); if (!analysisRun.getSortOrder().equals(currentSortOrder)) { populateAnalysisRunTreeModel(analysisRun, currentSortOrder); }
}   String currentSortOrder = sortOrderChooser.getSelectedItem().toString(); if (!analysisRun.getSortOrder().equals(currentSortOrder)) { populateAnalysisRunTreeModel(analysisRun, currentSortOrder); }  if (modelChanged) { System.out.println("Setting analysis run's tree model in bug tree...");
    private void synchAnalysisRun(AnalysisRun analysisRun) {        if (analysisRun != currentAnalysisRun) {            // If this is the first time the analysis run is being shown in             // the bug tree, it won't have a tree model yet.            if (analysisRun.getTreeModel() == null) {                DefaultMutableTreeNode bugRootNode = new DefaultMutableTreeNode();                DefaultTreeModel bugTreeModel = new DefaultTreeModel(bugRootNode);                analysisRun.setTreeModel(bugTreeModel);            }                        // Make sure that the sort order is correct.            String currentSortOrder = (String) sortOrderChooser.getSelectedItem();            if (!analysisRun.getSortOrder().equals(currentSortOrder)) {                populateAnalysisRunTreeModel(analysisRun, currentSortOrder);            }                        bugTree.setModel(analysisRun.getTreeModel());            // TODO: restore state of tree! I.e., which nodes expanded, and selection            currentAnalysisRun = analysisRun;        }    }