From 2ed3f3de87fcf99648c6a4b541a3bc05befaef3b Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Wed, 5 Dec 2012 22:47:39 +0100 Subject: [PATCH] Fix some quality flaws --- .../duplications/detector/original/BlocksGroup.java | 9 ++++++--- 1 file 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++; } -- 2.39.5