Changeset 1980


Ignore:
Timestamp:
06/30/15 10:01:48 (9 years ago)
Author:
pharms
Message:
  • bugfix in the detection of overlapping iterations
  • bugfix in the calculation of the diff level for identical sequences
File:
1 edited

Legend:

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

    r1974 r1980  
    899899                ((IIterationInstance) instance).size() > 1) 
    900900            { 
    901                 // iteration repeates multiple event tasks and is executed multiple times --> 
     901                // iteration repeats multiple event tasks and is executed multiple times --> 
    902902                // store path 
    903903                result.add(currentPath.subPath(0, currentPath.size())); // ensure to create a copy 
     
    948948        for (TaskPath leftPath : iterationsWithMultipleExecutions) { 
    949949            if (leftPath.getTask(0).equals(leftHandSide)) { 
    950                 int[] leftIdxs = leftHandSideTraversal.getIndexesRootedBy(leftPath); 
    951                  
    952950                for (TaskPath rightPath : iterationsWithMultipleExecutions) { 
    953951                    if (rightPath.getTask(0).equals(rightHandSide)) { 
     952                        int[] leftIdxs = leftHandSideTraversal.getIndexesRootedBy(leftPath); 
    954953                        int[] rightIdxs = rightHandSideTraversal.getIndexesRootedBy(rightPath); 
    955954                         
    956955                        adaptIndexesBasedOnDeltas(leftIdxs, rightIdxs, patch.getDeltas()); 
    957956                         
    958                         if (((leftIdxs[0] < rightIdxs[0]) && (rightIdxs[0] <= leftIdxs[1])) || 
    959                             ((rightIdxs[0] < leftIdxs[0]) && (leftIdxs[0] <= rightIdxs[1]))) 
     957                        if (((leftIdxs[0] <= rightIdxs[0]) && (rightIdxs[0] <= leftIdxs[1])) || 
     958                            ((rightIdxs[0] <= leftIdxs[0]) && (leftIdxs[0] <= rightIdxs[1]))) 
    960959                        { 
    961960                            overlappingIterations.add(leftPath); 
     
    12391238                             TaskTraversal traversal2) 
    12401239    { 
     1240        if (patch.getDeltas().size() == 0) { 
     1241            return 0; 
     1242        } 
     1243         
    12411244        int diffCount = 0; 
    12421245        int allCount = 0; 
Note: See TracChangeset for help on using the changeset viewer.