Ignore:
Timestamp:
08/11/14 08:22:13 (10 years ago)
Author:
rkrimmel
Message:

About to fix bug in containsPattern

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java

    r1656 r1657  
    9595         * <p> 
    9696         * the task handling strategy to be used for comparing tasks during 
    97          * iteration detection i.e., after the tasks are 
    98          * harmonized 
     97         * iteration detection i.e., after the tasks are harmonized 
    9998         * </p> 
    10099         */ 
    101100        private TaskHandlingStrategy identityTaskHandlingStrategy; 
    102  
    103  
    104101 
    105102        /** 
     
    166163                                .generate(appData.getNumberSequences(), submat, 9); 
    167164 
    168                  
    169                  
    170165                // Retrieve all matches reached a specific threshold 
    171166                Console.traceln(Level.INFO, "retrieving significant sequence pieces"); 
     
    174169                                        Level.FINEST, 
    175170                                        "retrieving significant sequence pieces:  " 
    176                                                         + Math.round((float) i / (float) appData.getNumberSequences().size() 
    177                                                                         * 100) + "%"); 
     171                                                        + Math.round((float) i 
     172                                                                        / (float) appData.getNumberSequences() 
     173                                                                                        .size() * 100) + "%"); 
    178174                        for (int j = 0; j < appData.getNumberSequences().size(); j++) { 
    179175                                if (i != j) { 
     
    197193                                        .getFirstSequence().size()) 
    198194                                continue; 
    199          
     195 
    200196                        for (int j = 0; j < appData.getNumberSequences().size(); j++) { 
    201                                 LinkedList<Integer> startpositions = appData.getNumberSequences().get(j) 
    202                                                 .containsPattern(pattern); 
     197                                LinkedList<Integer> startpositions = appData 
     198                                                .getNumberSequences().get(j).containsPattern(pattern); 
    203199                                if (startpositions.size() > 0) { 
    204200                                        NumberSequence tempns = appData.getNumberSequences().get(j); 
    205                                          
     201 
    206202                                        for (Iterator<Integer> jt = startpositions.iterator(); jt 
    207203                                                        .hasNext();) { 
    208204                                                int start = jt.next(); 
    209                                                 //TODO: Debug Output 
     205                                                // TODO: Debug Output 
    210206                                                /* 
    211                                                 System.out.println("Found match "); 
    212                                                 pattern.getFirstSequence().printSequence(); 
    213                                                 pattern.getSecondSequence().printSequence();  
    214                                                 System.out.println("in sequence " + (j+1) + " at position " + start); 
    215                                                 for(int k=0;k<tempns.getSequence().length;k++) { 
    216                                                         System.out.print(k + ": " + tempns.getSequence()[k] + " "); 
    217                                                         System.out.println(appData.getNumber2Task().get(tempns.getSequence()[k])); 
    218                                                 } 
    219                                                 */ 
    220                                                 pattern.addOccurence( 
    221                                                                 new MatchOccurence(start, j)); 
     207                                                 * System.out.println("Found match "); 
     208                                                 * pattern.getFirstSequence().printSequence(); 
     209                                                 * pattern.getSecondSequence().printSequence(); 
     210                                                 * System.out.println("in sequence " + (j+1) + 
     211                                                 * " at position " + start); for(int 
     212                                                 * k=0;k<tempns.getSequence().length;k++) { 
     213                                                 * System.out.print(k + ": " + tempns.getSequence()[k] + 
     214                                                 * " "); 
     215                                                 * System.out.println(appData.getNumber2Task().get( 
     216                                                 * tempns.getSequence()[k])); } 
     217                                                 */ 
     218                                                pattern.addOccurence(new MatchOccurence(start, start 
     219                                                                + pattern.size(), j)); 
    222220                                        } 
    223221 
     
    230228                Comparator<Match> comparator = new Comparator<Match>() { 
    231229                        public int compare(Match m1, Match m2) { 
    232                                 return m2.occurenceCount() - m1.occurenceCount();  
    233                                                                                                                                          
     230                                return m2.occurenceCount() - m1.occurenceCount(); 
     231 
    234232                        } 
    235233                }; 
    236                 //Collections.sort(matchseqs, comparator); 
    237                  
     234                // Collections.sort(matchseqs, comparator); 
    238235 
    239236                // TODO: Harmonize matches: finding double matches and merge them 
    240237                /* 
    241                 Console.traceln(Level.INFO, "harmonizing matches"); 
    242                 int i=0; 
    243                  
    244                 while(i<matchseqs.size()) { 
    245                         int j=i; 
    246                         while(j<matchseqs.size()) { 
    247                                 if(i!=j) { 
    248                                         if(matchseqs.get(i).equals(matchseqs.get(j))) { 
    249                                                 //matchseqs.get(i).addOccurencesOf(matchseqs.get(j)); 
    250                                                 matchseqs.remove(j); 
    251                                          
    252                                                 //System.out.println("Sequence " + i); 
    253                                                 //matchseqs.get(i).getFirstSequence().printSequence(); 
    254                                                 //matchseqs.get(i).getSecondSequence().printSequence(); 
    255                                                 //System.out.println("is equal to sequence " + j); 
    256                                                 //matchseqs.get(j).getFirstSequence().printSequence(); 
    257                                                 //matchseqs.get(j).getSecondSequence().printSequence(); 
    258                                                 continue; 
    259                                         } 
    260                                 } 
    261                                 j++; 
    262                         } 
    263                         i++; 
    264                 } 
    265                 Collections.sort(matchseqs, comparator); 
    266                 */ 
    267                  
    268                  
    269                 // Just printing the results out 
     238                 * Console.traceln(Level.INFO, "harmonizing matches"); int i=0; 
     239                 *  
     240                 * while(i<matchseqs.size()) { int j=i; while(j<matchseqs.size()) { 
     241                 * if(i!=j) { if(matchseqs.get(i).equals(matchseqs.get(j))) { 
     242                 * //matchseqs.get(i).addOccurencesOf(matchseqs.get(j)); 
     243                 * matchseqs.remove(j); 
     244                 *  
     245                 * //System.out.println("Sequence " + i); 
     246                 * //matchseqs.get(i).getFirstSequence().printSequence(); 
     247                 * //matchseqs.get(i).getSecondSequence().printSequence(); 
     248                 * //System.out.println("is equal to sequence " + j); 
     249                 * //matchseqs.get(j).getFirstSequence().printSequence(); 
     250                 * //matchseqs.get(j).getSecondSequence().printSequence(); continue; } } 
     251                 * j++; } i++; } Collections.sort(matchseqs, comparator); 
     252                 */ 
     253 
     254                HashMap<Integer, List<MatchOccurence>> replacedOccurences = new HashMap<Integer, List<MatchOccurence>>(); 
     255                // Replace matches in the sessions 
    270256                for (int i = 0; i < matchseqs.size(); i++) { 
    271257                        // Every pattern consists of 2 sequences, therefore the minimum 
     
    274260                        // well 
    275261                        if (matchseqs.get(i).occurenceCount() > 2) { 
    276                                  
    277                                 ISequence task = matchAsSequence(appData,matchseqs.get(i)); 
    278                                 for(Iterator<MatchOccurence> it = matchseqs.get(i).getOccurences().iterator();it.hasNext();) { 
     262 
     263                                ISequence task = matchAsSequence(appData, matchseqs.get(i)); 
     264                                invalidOccurence: for (Iterator<MatchOccurence> it = matchseqs 
     265                                                .get(i).getOccurences().iterator(); it.hasNext();) { 
    279266                                        MatchOccurence oc = it.next(); 
    280267                                        System.out.println("Trying to replace sequence: "); 
    281268                                        matchseqs.get(i).getFirstSequence().printSequence(); 
    282269                                        matchseqs.get(i).getSecondSequence().printSequence(); 
    283                                         System.out.println(" in session number: " + (oc.getSequenceId()+1) + " at position " + (oc.getStartindex()) + "-" + (oc.getStartindex()+matchseqs.get(i).getFirstSequence().size())); 
     270                                        System.out.println(" in session number: " 
     271                                                        + (oc.getSequenceId() + 1) 
     272                                                        + " at position " 
     273                                                        + (oc.getStartindex()) 
     274                                                        + "-" 
     275                                                        + (oc.getStartindex() + matchseqs.get(i) 
     276                                                                        .getFirstSequence().size())); 
    284277                                        System.out.println(); 
    285                                         /* 
    286                                         System.out.println("Printing session: "); 
    287                                         for(int j=0;j<sessions.get(oc.getSequenceId()).size();j++) { 
    288                                                 System.out.println(j+ ": " + sessions.get(oc.getSequenceId()).get(j)); 
    289                                         }*/ 
    290                                         List<ISequenceInstance> sequenceInstances = new LinkedList<ISequenceInstance>(); 
    291                                         RuleUtils.createNewSubSequenceInRange(sessions.get(oc.getSequenceId()), oc.getStartindex(), oc.getStartindex()+matchseqs.get(i).getFirstSequence().size(), task,        taskFactory, taskBuilder); 
    292         } 
    293                                 //System.out.println(task); 
    294                                 //matchseqs.get(i).getFirstSequence().printSequence(); 
    295                                 //matchseqs.get(i).getSecondSequence().printSequence(); 
    296                                 //System.out.println("Found pattern " 
    297                                 //              + matchseqs.get(i).occurenceCount() + " times"); 
     278 
     279                                        //System.out.println("Printing session: "); 
     280                                        for (int j = 0; j < sessions.get(oc.getSequenceId()).size(); j++) { 
     281                                          System.out.println(j + ": "+ sessions.get(oc.getSequenceId()).get(j)); 
     282                                        } 
     283 
     284                                        // Check if nothing has been replaced in the sequence we 
     285                                        // want to replace 
     286                                        if (replacedOccurences.get(oc.getSequenceId()) == null) { 
     287                                                replacedOccurences.put(oc.getSequenceId(), 
     288                                                                new LinkedList<MatchOccurence>()); 
     289                                        } else { 
     290                                                // check if we have any replaced occurence with indexes 
     291                                                // smaller than ours. If so, we need to adjust our start 
     292                                                // and endpoints 
     293                                                // of the replacement. 
     294                                                // Also do a check if we have replaced this specific 
     295                                                // MatchOccurence in this sequence already. Jump to the 
     296                                                // next occurence if this is the case. 
     297                                                // This is no more neccessary once the matches are 
     298                                                // harmonized. 
     299                                                for (Iterator<MatchOccurence> jt = replacedOccurences 
     300                                                                .get(oc.getSequenceId()).iterator(); jt 
     301                                                                .hasNext();) { 
     302                                                        MatchOccurence tmpOC = jt.next(); 
     303                                                        if (tmpOC.getStartindex() == oc.getStartindex()) { 
     304                                                                System.out.println("This position has already been replaced in this iteration"); 
     305                                                                continue invalidOccurence; 
     306                                                                 
     307                                                        } 
     308                                                        if (tmpOC.getStartindex() < oc 
     309                                                                        .getStartindex()) { 
     310                                                                int diff = tmpOC.getEndindex() 
     311                                                                                - tmpOC.getStartindex(); 
     312                                                                // Just to be sure. 
     313                                                                if (diff > 0) { 
     314                                                                        System.out.println("Old index: Start: " 
     315                                                                                        + oc.getStartindex() + " End " 
     316                                                                                        + oc.getEndindex()); 
     317                                                                        oc.setStartindex(oc.getStartindex() - diff+1); 
     318                                                                        oc.setEndindex(oc.getEndindex() - diff+1); 
     319                                                                        System.out.println("Updated index: Start: " 
     320                                                                                        + oc.getStartindex() + " End " 
     321                                                                                        + oc.getEndindex()); 
     322                                                                } else { 
     323                                                                        Console.traceln(Level.WARNING, 
     324                                                                                        "End index of a Match before start. This should never happen"); 
     325                                                                } 
     326                                                        } 
     327                                                } 
     328                                        } 
     329 
     330                                         
     331                                        ISequenceInstance sequenceInstances = RuleUtils.createNewSubSequenceInRange( 
     332                                                        sessions.get(oc.getSequenceId()), 
     333                                                        oc.getStartindex(), oc.getEndindex(), task, 
     334                                                        taskFactory, taskBuilder); 
     335                                         
     336                                        //Adjust the length of the match regarding to the length of instance. (OptionalInstances may be shorter)  
     337                                        oc.setEndindex(oc.getStartindex()+sequenceInstances.size()-RuleUtils.missedOptionals); 
     338                                        replacedOccurences.get(oc.getSequenceId()).add(oc); 
     339                                } 
     340                         
    298341                                System.out.println(); 
    299342                        } 
    300343                } 
    301                  
    302344 
    303345                alignments = null; 
    304346 
    305347                do { 
    306                    
    307                   appData.getStopWatch().start("whole loop"); // 
    308                   detectAndReplaceIterations(appData); 
    309                   
    310                   appData.getStopWatch().start("task replacement"); // 
    311                   //detectAndReplaceTasks(appData); // 
    312                   appData.getStopWatch().stop("task replacement"); // 
    313                   appData.getStopWatch().stop("whole loop"); 
    314                    
    315                   appData.getStopWatch().dumpStatistics(System.out); // 
    316                   appData.getStopWatch().reset(); 
    317                    
    318                   } while (appData.detectedAndReplacedTasks()); 
    319                   
     348 
     349                        appData.getStopWatch().start("whole loop"); // 
     350                        detectAndReplaceIterations(appData); 
     351 
     352                        appData.getStopWatch().start("task replacement"); // 
     353                        // detectAndReplaceTasks(appData); // 
     354                        appData.getStopWatch().stop("task replacement"); // 
     355                        appData.getStopWatch().stop("whole loop"); 
     356 
     357                        appData.getStopWatch().dumpStatistics(System.out); // 
     358                        appData.getStopWatch().reset(); 
     359 
     360                } while (appData.detectedAndReplacedTasks()); 
    320361 
    321362                Console.println("created " 
     
    334375        } 
    335376 
    336          
    337          
    338377        /** 
    339378         * <p> 
     
    363402                ITask task; 
    364403                List<IUserSession> sessions = appData.getSessions(); 
    365                 for (int j = 0; j< sessions.size();j++) { 
     404                for (int j = 0; j < sessions.size(); j++) { 
    366405                        IUserSession session = sessions.get(j); 
    367          
     406 
    368407                        NumberSequence templist = new NumberSequence(session.size()); 
    369408 
     
    375414                                        uniqueTasks.addSymbol(taskInstance, taskInstance.getTask()); 
    376415                                        templist.getSequence()[i] = taskInstance.getTask().getId(); 
    377                  
     416 
    378417                                } else { 
    379418                                        taskBuilder.setTask(taskInstance, task); 
     
    381420                                        unifiedTasks++; 
    382421                                } 
    383                                 appData.getNumber2Task().put(templist.getSequence()[i], taskInstance.getTask()); 
     422                                appData.getNumber2Task().put(templist.getSequence()[i], 
     423                                                taskInstance.getTask()); 
    384424                                 
    385                                 //System.out.println("TaskID: " + taskInstance.getTask().getId()+ " Numbersequence: " + templist.getSequence()[i]); 
    386                         } 
    387                         //Each NumberSequence is identified by its id, beginning to count at zero 
     425                                //if(j==1) { 
     426                                //      System.out.println(i + ": TaskID: " + 
     427                                //      taskInstance.getTask().getId()+ " Numbersequence: " + 
     428                                //      templist.getSequence()[i]); 
     429                                //} 
     430                                 
     431                        } 
     432                        // Each NumberSequence is identified by its id, beginning to count 
     433                        // at zero 
    388434                        templist.setId(j); 
    389435                        appData.getNumberSequences().add(templist); 
     
    528574        } 
    529575 
    530          
    531          ISequence matchAsSequence(RuleApplicationData appData,Match m) { 
    532                  
    533                 ISequence sequence = taskFactory.createNewSequence(); 
    534                  
    535                 int[] first = m.getFirstSequence().getSequence(); 
    536                 int[] second = m.getSecondSequence().getSequence(); 
    537  
    538                  
    539                 //Both sequences of a match are equally long 
    540                 for(int i=0;i<m.getFirstSequence().size();i++) { 
    541          
    542                         //Two gaps aligned to each other: Have not seen it happening so far, just to handle it 
    543                         if(first[i]==-1 && second[i]==-1) { 
    544                                 //TODO: Do nothing? 
    545                         } 
    546                         //Both events are equal, we can simply add the task referring to the number 
    547                         else if(first[i]==second[i]) { 
    548                                 taskBuilder.addChild(sequence, appData.getNumber2Task().get(first[i])); 
    549                         } 
    550                         //We have a gap in the first sequence, we need to add the task of the second sequence as optional 
    551                         else if(first[i]==-1 && second[i]!=-1) { 
    552                                 IOptional optional = taskFactory.createNewOptional(); 
    553                                 taskBuilder.setMarkedTask(optional, appData.getNumber2Task().get(second[i])); 
    554                                 taskBuilder.addChild(sequence,optional); 
    555                         } 
    556                         //We have a gap in the second sequence, we need to add the task of the first sequence as optional 
    557                         else if(first[i]!=-1 && second[i]==-1) { 
    558                                 IOptional optional = taskFactory.createNewOptional(); 
    559                                 taskBuilder.setMarkedTask(optional, appData.getNumber2Task().get(first[i])); 
    560                                 taskBuilder.addChild(sequence,optional); 
    561                         } 
    562                         //Both tasks are unequal, we need to insert a selection here 
    563                         else { 
    564                                 ISelection selection = taskFactory.createNewSelection(); 
    565                                 taskBuilder.addChild(selection, appData.getNumber2Task().get(first[i])); 
    566                                 taskBuilder.addChild(selection, appData.getNumber2Task().get(second[i])); 
    567                                 taskBuilder.addChild(sequence,selection); 
    568                         } 
    569                 } 
    570                  
    571                 //TODO: Debug output 
    572                 /* 
    573                 for (int i =0;i<sequence.getChildren().size();i++) { 
    574                         System.out.println(sequence.getChildren().get(i)); 
    575                  
    576                         if(sequence.getChildren().get(i).getType() == "selection") { 
    577                                 for(int j=0; j< ((ISelection) sequence.getChildren().get(i)).getChildren().size();j++) { 
    578                                         System.out.println("\t" +((ISelection) sequence.getChildren().get(i)).getChildren().get(j)); 
    579                                 } 
    580                         } 
    581                 } 
    582                 */ 
    583                         return sequence; 
    584                 } 
    585          
    586          
     576        ISequence matchAsSequence(RuleApplicationData appData, Match m) { 
     577 
     578                ISequence sequence = taskFactory.createNewSequence(); 
     579 
     580                int[] first = m.getFirstSequence().getSequence(); 
     581                int[] second = m.getSecondSequence().getSequence(); 
     582 
     583                // Both sequences of a match are equally long 
     584                for (int i = 0; i < m.getFirstSequence().size(); i++) { 
     585 
     586                        // Two gaps aligned to each other: Have not seen it happening so 
     587                        // far, just to handle it 
     588                        if (first[i] == -1 && second[i] == -1) { 
     589                                // TODO: Do nothing? 
     590                        } 
     591                        // Both events are equal, we can simply add the task referring to 
     592                        // the number 
     593                        else if (first[i] == second[i]) { 
     594                                taskBuilder.addChild(sequence, 
     595                                                appData.getNumber2Task().get(first[i])); 
     596                        } 
     597                        // We have a gap in the first sequence, we need to add the task of 
     598                        // the second sequence as optional 
     599                        else if (first[i] == -1 && second[i] != -1) { 
     600                                IOptional optional = taskFactory.createNewOptional(); 
     601                                taskBuilder.setMarkedTask(optional, appData.getNumber2Task() 
     602                                                .get(second[i])); 
     603                                taskBuilder.addChild(sequence, optional); 
     604                        } 
     605                        // We have a gap in the second sequence, we need to add the task of 
     606                        // the first sequence as optional 
     607                        else if (first[i] != -1 && second[i] == -1) { 
     608                                IOptional optional = taskFactory.createNewOptional(); 
     609                                taskBuilder.setMarkedTask(optional, appData.getNumber2Task() 
     610                                                .get(first[i])); 
     611                                taskBuilder.addChild(sequence, optional); 
     612                        } 
     613                        // Both tasks are unequal, we need to insert a selection here 
     614                        else { 
     615                                ISelection selection = taskFactory.createNewSelection(); 
     616                                taskBuilder.addChild(selection, 
     617                                                appData.getNumber2Task().get(first[i])); 
     618                                taskBuilder.addChild(selection, 
     619                                                appData.getNumber2Task().get(second[i])); 
     620                                taskBuilder.addChild(sequence, selection); 
     621                        } 
     622                } 
     623 
     624                // TODO: Debug output 
     625                /* 
     626                 * for (int i =0;i<sequence.getChildren().size();i++) { 
     627                 * System.out.println(sequence.getChildren().get(i)); 
     628                 *  
     629                 * if(sequence.getChildren().get(i).getType() == "selection") { for(int 
     630                 * j=0; j< ((ISelection) 
     631                 * sequence.getChildren().get(i)).getChildren().size();j++) { 
     632                 * System.out.println("\t" +((ISelection) 
     633                 * sequence.getChildren().get(i)).getChildren().get(j)); } } } 
     634                 */ 
     635                return sequence; 
     636        } 
     637 
    587638        /** 
    588639         * <p> 
     
    659710                appData.getStopWatch().start("detecting tasks"); 
    660711 
    661                 //getSequencesOccuringMostOften(appData); 
     712                // getSequencesOccuringMostOften(appData); 
    662713 
    663714                appData.getStopWatch().stop("detecting tasks"); 
     
    667718 
    668719                appData.getStopWatch().stop("replacing tasks"); 
    669                  
    670                 //Console.traceln(Level.INFO, "detected and replaced " 
    671                 //              + appData.getLastFoundTasks().size() + " tasks occuring " 
    672                 //              + appData.getLastFoundTasks().getOccurrenceCount() + " times"); 
    673         } 
    674  
    675          
    676  
     720 
     721                // Console.traceln(Level.INFO, "detected and replaced " 
     722                // + appData.getLastFoundTasks().size() + " tasks occuring " 
     723                // + appData.getLastFoundTasks().getOccurrenceCount() + " times"); 
     724        } 
    677725 
    678726        /** 
     
    684732                appData.detectedAndReplacedTasks(false); 
    685733 
    686         /* 
    687                         Console.traceln(Level.FINER, "replacing tasks occurrences"); 
    688                          
    689                         for (List<ITaskInstance> task : appData.getLastFoundTasks()) { 
    690                                 ISequence sequence = taskFactory.createNewSequence(); 
    691  
    692                                 Console.traceln(Level.FINEST, "replacing " + sequence.getId() 
    693                                                 + ": " + task); 
    694  
    695                                 List<ISequenceInstance> sequenceInstances = replaceTaskOccurrences( 
    696                                                 task, appData.getSessions(), sequence); 
    697  
    698                                 harmonizeSequenceInstancesModel(sequence, sequenceInstances, 
    699                                                 task.size()); 
    700                                 appData.detectedAndReplacedTasks(appData 
    701                                                 .detectedAndReplacedTasks() 
    702                                                 || (sequenceInstances.size() > 0)); 
    703  
    704                                 if (sequenceInstances.size() < appData.getLastFoundTasks() 
    705                                                 .getOccurrenceCount()) { 
    706                                         Console.traceln(Level.FINE, 
    707                                                         sequence.getId() 
    708                                                                         + ": replaced task only " 
    709                                                                         + sequenceInstances.size() 
    710                                                                         + " times instead of expected " 
    711                                                                         + appData.getLastFoundTasks() 
    712                                                                                         .getOccurrenceCount()); 
    713                                 } 
    714                         } 
    715                         */ 
    716         } 
    717  
     734                /* 
     735                 * Console.traceln(Level.FINER, "replacing tasks occurrences"); 
     736                 *  
     737                 * for (List<ITaskInstance> task : appData.getLastFoundTasks()) { 
     738                 * ISequence sequence = taskFactory.createNewSequence(); 
     739                 *  
     740                 * Console.traceln(Level.FINEST, "replacing " + sequence.getId() + ": " 
     741                 * + task); 
     742                 *  
     743                 * List<ISequenceInstance> sequenceInstances = replaceTaskOccurrences( 
     744                 * task, appData.getSessions(), sequence); 
     745                 *  
     746                 * harmonizeSequenceInstancesModel(sequence, sequenceInstances, 
     747                 * task.size()); appData.detectedAndReplacedTasks(appData 
     748                 * .detectedAndReplacedTasks() || (sequenceInstances.size() > 0)); 
     749                 *  
     750                 * if (sequenceInstances.size() < appData.getLastFoundTasks() 
     751                 * .getOccurrenceCount()) { Console.traceln(Level.FINE, sequence.getId() 
     752                 * + ": replaced task only " + sequenceInstances.size() + 
     753                 * " times instead of expected " + appData.getLastFoundTasks() 
     754                 * .getOccurrenceCount()); } } 
     755                 */ 
     756        } 
    718757 
    719758        /** 
     
    847886        } 
    848887 
    849  
    850888        /** 
    851889     *  
     
    853891        private static class RuleApplicationData { 
    854892 
    855                  
    856                 private HashMap<Integer,ITask> number2task; 
    857                  
    858                  
     893                private HashMap<Integer, ITask> number2task; 
     894 
    859895                private ArrayList<NumberSequence> numberseqs; 
    860                  
     896 
    861897                /** 
    862898         *  
    863899         */ 
    864900                private List<IUserSession> sessions; 
    865  
    866  
    867901 
    868902                /** 
     
    887921                        this.sessions = sessions; 
    888922                        numberseqs = new ArrayList<NumberSequence>(); 
    889                         number2task = new HashMap<Integer,ITask>(); 
    890                         stopWatch= new StopWatch(); 
    891                         result =  new RuleApplicationResult(); 
     923                        number2task = new HashMap<Integer, ITask>(); 
     924                        stopWatch = new StopWatch(); 
     925                        result = new RuleApplicationResult(); 
    892926                } 
    893927 
     
    899933                } 
    900934 
    901                  
    902935                private ArrayList<NumberSequence> getNumberSequences() { 
    903936                        return numberseqs; 
    904937                } 
    905  
    906          
    907938 
    908939                /** 
     
    934965                } 
    935966 
    936                 private HashMap<Integer,ITask> getNumber2Task() { 
     967                private HashMap<Integer, ITask> getNumber2Task() { 
    937968                        return number2task; 
    938969                } 
     
    940971        } 
    941972 
    942          
    943  
    944  
    945973} 
Note: See TracChangeset for help on using the changeset viewer.