From 123eaf25e79b8f15dbc90dd1678e861d49b3d41e Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 17 Jul 2014 17:03:59 +0200 Subject: Fix some quality flaws --- .../org/sonar/duplications/index/PackedMemoryCloneIndex.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sonar-duplications/src/main/java') 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; } } -- cgit v1.2.3