} else if (params.length == args.length) {
int allPMatch = allParametersAndArgumentsMatch(params, args);
int lastArgMatch = isVargs(params)?lastArgMatchesVarg(params, args):-1;
if (lastArgMatch>=0) lastArgMatch++; // ensure exact matches are preferred over vargs
int dist = allPMatch>=0?Math.max(allPMatch, lastArgMatch):lastArgMatch;
<BUG>if (dist>=0 && !receiver.equals(m.getDeclaringClass())) dist+=getDistance(receiver, m.getDeclaringClass());
</BUG>
if (dist>=0 && dist<bestDist) {
bestChoices.clear();
bestChoices.add(m);

} else if (params.length == args.length) {
int allPMatch = allParametersAndArgumentsMatch(params, args);
int lastArgMatch = isVargs(params)?lastArgMatchesVarg(params, args):-1;
if (lastArgMatch>=0) lastArgMatch++; // ensure exact matches are preferred over vargs
int dist = allPMatch>=0?Math.max(allPMatch, lastArgMatch):lastArgMatch;
if (dist>=0 && !actualReceiver.equals(m.getDeclaringClass())) dist+=getDistance(actualReceiver, m.getDeclaringClass());
if (dist>=0 && dist<bestDist) {
bestChoices.clear();
bestChoices.add(m);
