Ignore:
Timestamp:
03/18/13 15:43:35 (11 years ago)
Author:
pharms
Message:
  • removed find bug warnings and TODOs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java

    r1129 r1133  
    131131            appData.getStopWatch().start("whole loop"); 
    132132            detectAndReplaceIterations(appData); 
    133             //mergeEqualTasks(appData); 
     133 
    134134            appData.getStopWatch().start("task replacement"); 
    135135            detectAndReplaceTasks(appData); 
     
    158158 
    159159    /** 
    160      * <p> 
    161      * TODO: comment 
    162      * </p> 
    163      * 
    164160     * @param appData 
    165161     */ 
     
    180176 
    181177    /** 
    182      * <p> 
    183      * TODO: comment 
    184      * </p> 
    185      * 
    186178     * @param appData 
    187179     */ 
     
    208200    } 
    209201 
    210 //    /** 
    211 //     * <p> 
    212 //     * TODO: comment 
    213 //     * </p> 
    214 //     * 
    215 //     * @param appData 
    216 //     */ 
    217 //    private void mergeEqualTasks(RuleApplicationData appData) { 
    218 //        System.out.println("merging equal tasks"); 
    219 //        appData.getStopWatch().start("merging equal tasks"); 
    220 //         
    221 //        int replacements = 0; 
    222 //        List<ISequence> sessions = appData.getSessions(); 
    223 //         
    224 //        IdentityHashMap<ITaskTreeNode, ITaskTreeNode> replacedChildren = 
    225 //            new IdentityHashMap<ITaskTreeNode, ITaskTreeNode>(); 
    226 //         
    227 //        for (int sessionIdx1 = 0; sessionIdx1 < sessions.size(); sessionIdx1++) { 
    228 //            List<ITaskTreeNode> children1 = appData.getSessions().get(sessionIdx1).getChildren(); 
    229 //            for (int childIdx1 = 0; childIdx1 < children1.size(); childIdx1++) { 
    230 //                // this is the child of which we search equal other children to merge and to 
    231 //                // replace with one single unique node 
    232 //                ITaskTreeNode child1 = children1.get(childIdx1); 
    233 //                 
    234 //                if (replacedChildren.containsKey(child1)) { 
    235 //                    continue; 
    236 //                } 
    237 //                 
    238 //                // now search for all other children that are equal. Also record the session they 
    239 //                // belong to as well as the index in that session 
    240 //                List<ITaskTreeNode> equalChildren = new LinkedList<ITaskTreeNode>(); 
    241 //                List<Integer> sessionIndexes = new LinkedList<Integer>(); 
    242 //                List<Integer> childIndexes = new LinkedList<Integer>(); 
    243 // 
    244 //                // add all information about the current child 
    245 //                equalChildren.add(child1); 
    246 //                sessionIndexes.add(sessionIdx1); 
    247 //                childIndexes.add(childIdx1); 
    248 //                 
    249 //                for (int sessionIdx2 = sessionIdx1; sessionIdx2 < sessions.size(); sessionIdx2++) { 
    250 //                    List<ITaskTreeNode> children2 = 
    251 //                          appData.getSessions().get(sessionIdx2).getChildren(); 
    252 //                     
    253 //                    int startIndex = (sessionIdx1 == sessionIdx2) ? childIdx1 + 1 : 0; 
    254 //                     
    255 //                    for (int childIdx2 = startIndex; childIdx2 < children2.size(); childIdx2++) { 
    256 //                        ITaskTreeNode child2 = children2.get(childIdx2); 
    257 //                         
    258 //                        if ((child1 != child2) && (nodeComparator.equals(child1, child2))) { 
    259 //                            // this is an equal child --> record its occurrence 
    260 //                            equalChildren.add(child2); 
    261 //                            sessionIndexes.add(sessionIdx2); 
    262 //                            childIndexes.add(childIdx2); 
    263 //                        } 
    264 //                    } 
    265 //                } 
    266 //                 
    267 //                // now merge the found children 
    268 //                if (equalChildren.size() > 1) { 
    269 //                    ITaskTreeNode replacement = 
    270 //                        mergeVariantsOfTasks(child1.toString(), equalChildren); 
    271 // 
    272 //                    for (int i = 0; i < sessionIndexes.size(); i++) { 
    273 //                        taskTreeBuilder.setChild(appData.getSessions().get(sessionIndexes.get(i)), 
    274 //                                                 childIndexes.get(i), replacement); 
    275 //                     
    276 //                        replacements++; 
    277 //                    } 
    278 //                     
    279 //                    // remember the replacement to prevent comparison of merged nodes 
    280 //                    replacedChildren.put(replacement, replacement); 
    281 //                     
    282 //                    System.out.println 
    283 //                        ("replaced " + sessionIndexes.size() + " occurrences of " + child1); 
    284 //                } 
    285 //            } 
    286 //        } 
    287 // 
    288 //        appData.getStopWatch().stop("merging equal tasks"); 
    289 //         
    290 //        System.out.println("replaced " + replacements + " equal tasks with unique replacements"); 
    291 //    } 
    292 // 
    293     /** 
    294      * <p> 
    295      * TODO: comment 
    296      * </p> 
    297      * 
     202    /** 
    298203     * @param appData 
    299204     */ 
     
    314219 
    315220    /** 
    316      * <p> 
    317      * TODO: comment 
    318      * </p> 
    319      * 
    320      * @param i 
    321221     * @return 
    322222     */ 
     
    359259 
    360260    /** 
    361      * <p> 
    362      * TODO: comment 
    363      * </p> 
    364      * 
    365261     * @param parent 
    366262     * @return 
     
    383279 
    384280    /** 
    385      * <p> 
    386      * TODO: comment 
    387      * </p> 
    388      * 
    389281     * @param trie 
    390282     * @param parent 
     
    399291 
    400292    /** 
    401      * <p> 
    402      * TODO: comment 
    403      * </p> 
    404      * 
    405293     * @param appData 
    406294     */ 
     
    445333 
    446334    /** 
    447      * <p> 
    448      * TODO: comment 
    449      * </p> 
    450      * 
    451335     * @param tree 
    452336     */ 
     
    479363 
    480364    /** 
    481      * <p> 
    482      * TODO: comment 
    483      * </p> 
    484      * 
    485365     * @param appData 
    486366     * @return 
     
    493373 
    494374    /** 
    495      * <p> 
    496      * TODO: comment 
    497      * </p> 
    498      * 
    499375     * @param appData 
    500376     * @return 
     
    525401 
    526402    /** 
    527      * <p> 
    528      * TODO: comment 
    529      * </p> 
    530      * 
    531403     * @param task 
    532404     * @param parent 
     
    578450 
    579451    /** 
    580      * <p> 
    581      * TODO: comment 
    582      * </p> 
    583      * 
    584452     * @param trie 
    585453     * @param object 
     
    613481     
    614482    /** 
    615      * <p> 
    616      * TODO comment 
    617      * </p> 
    618      *  
    619483     * @author Patrick Harms 
    620484     */ 
     
    632496 
    633497        /** 
    634          * <p> 
    635          * TODO: comment 
    636          * </p> 
    637498         * 
    638          * @param maxCount 
    639499         */ 
    640500        public MaxCountAndLongestTasksFinder() { 
     
    693553 
    694554        /** 
    695          * <p> 
    696          * TODO: comment 
    697          * </p> 
    698          * 
    699          * @return 
     555         *  @return 
    700556         */ 
    701557        public Tasks getFoundTasks() { 
     
    705561 
    706562        /** 
    707          * <p> 
    708          * TODO: comment 
    709          * </p> 
    710563         * 
    711564         */ 
     
    740593     *  
    741594     */ 
    742     private class RuleApplicationData { 
     595    private static class RuleApplicationData { 
    743596         
    744597        /** 
     
    898751 
    899752    /** 
    900      * <p> 
    901      * TODO comment 
    902      * </p> 
    903      *  
    904753     * @author Patrick Harms 
    905754     */ 
    906     private class Tasks implements Iterable<List<ITaskTreeNode>> { 
     755    private static class Tasks implements Iterable<List<ITaskTreeNode>> { 
    907756         
    908757        /** 
     
    917766 
    918767        /** 
    919          * <p> 
    920          * TODO: comment 
    921          * </p> 
    922          * 
    923768         * @param occurrenceCount 
    924769         * @param sequences 
     
    931776 
    932777        /** 
    933          * <p> 
    934          * TODO: comment 
    935          * </p> 
    936          * 
    937778         * @return 
    938779         */ 
     
    942783 
    943784        /** 
    944          * <p> 
    945          * TODO: comment 
    946          * </p> 
    947          * 
    948785         * @return 
    949786         */ 
Note: See TracChangeset for help on using the changeset viewer.