aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-duplications')
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java b/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java
index ba2dc5c1887..16d609f2a4c 100644
--- a/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java
+++ b/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java
@@ -151,13 +151,16 @@ final class BlocksGroup {
if (c == 0) {
c = block1.getIndexInFile() - indexCorrection - block2.getIndexInFile();
}
- if (c < 0) { // list1[i] < list2[j]
+ if (c < 0) {
+ // list1[i] < list2[j]
break;
}
- if (c != 0) { // list1[i] != list2[j]
+ if (c != 0) {
+ // list1[i] != list2[j]
j++;
}
- if (c == 0) { // list1[i] == list2[j]
+ if (c == 0) {
+ // list1[i] == list2[j]
i++;
j++;
}