diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 1f9fd4330205..f7df9ebdf6b6 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1038,7 +1038,7 @@ public abstract class ChooseByNameBase { int match = shortName != null && matcher instanceof MinusculeMatcher ? ((MinusculeMatcher)matcher).matchingDegree(shortName) : Integer.MIN_VALUE; int stats = StatisticsManager.getInstance().getUseCount(new StatisticsInfo(statContext, text)); - if (stats > best || stats == best && match > bestMatch) { + if (match > bestMatch || match == bestMatch && stats > best) { best = stats; bestPosition = i; bestMatch = match;