diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-17 17:03:59 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-17 17:37:25 +0200 |
commit | 123eaf25e79b8f15dbc90dd1678e861d49b3d41e (patch) | |
tree | c04fa9f19e08e528ae42d337789dde44e12a8971 /sonar-duplications/src/main/java | |
parent | c522de4c43833715bf6cfa46f6099cb4b45bdf7c (diff) | |
download | sonarqube-123eaf25e79b8f15dbc90dd1678e861d49b3d41e.tar.gz sonarqube-123eaf25e79b8f15dbc90dd1678e861d49b3d41e.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-duplications/src/main/java')
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/index/PackedMemoryCloneIndex.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/index/PackedMemoryCloneIndex.java b/sonar-duplications/src/main/java/org/sonar/duplications/index/PackedMemoryCloneIndex.java index ad49a4016e5..ed080415de8 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/index/PackedMemoryCloneIndex.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/index/PackedMemoryCloneIndex.java @@ -243,13 +243,13 @@ public class PackedMemoryCloneIndex extends AbstractCloneIndex { } private boolean isLessByHash(int i, int j) { - i *= blockInts; - j *= blockInts; - for (int k = 0; k < hashInts; k++, i++, j++) { - if (blockData[i] < blockData[j]) { + int i2 = i * blockInts; + int j2 = j * blockInts; + for (int k = 0; k < hashInts; k++, i2++, j2++) { + if (blockData[i2] < blockData[j2]) { return true; } - if (blockData[i] > blockData[j]) { + if (blockData[i2] > blockData[j2]) { return false; } } |