aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-12-05 22:47:39 +0100
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-12-05 22:47:39 +0100
commit2ed3f3de87fcf99648c6a4b541a3bc05befaef3b (patch)
tree1a94119f8df48c34658030ac02fad43d496773f1 /sonar-duplications
parente3947d50e30dbd6bcc2d334e5efeb2a0010e8091 (diff)
downloadsonarqube-2ed3f3de87fcf99648c6a4b541a3bc05befaef3b.tar.gz
sonarqube-2ed3f3de87fcf99648c6a4b541a3bc05befaef3b.zip
Fix some quality flaws
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++;
}