aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications/src/main/java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-17 17:03:59 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-17 17:37:25 +0200
commit123eaf25e79b8f15dbc90dd1678e861d49b3d41e (patch)
treec04fa9f19e08e528ae42d337789dde44e12a8971 /sonar-duplications/src/main/java
parentc522de4c43833715bf6cfa46f6099cb4b45bdf7c (diff)
downloadsonarqube-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.java10
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;
}
}