Program: 82821
Project: 82821
Buggy source:
@Override public void checkMatch(MatchList<IMethod> list,IValue receiver,Name name,ArgumentList arguments){
  if (name != this.name && name != null) {
    return;
  }
  final ParameterList parameters=this.getParameters();
  final int parameterStartIndex;
  final int argumentStartIndex;
  final int argumentCount;
  final int parameterCount=parameters.size();
  final int[] matchValues;
  final IType[] matchTypes;
  boolean invalid=false;
  final int mod=this.attributes.flags() & Modifiers.INFIX;
  if (receiver == null) {
    if (mod == Modifiers.INFIX) {
      invalid=true;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this));
      return;
    }
    argumentCount=arguments.size();
    matchValues=new int[argumentCount];
    matchTypes=new IType[argumentCount];
    argumentStartIndex=0;
    parameterStartIndex=0;
  }
 else   if (mod != 0 && receiver.isClassAccess()) {
    final IType receiverType=receiver.getType();
    if (!Types.isSuperType(this.getReceiverType(),receiverType)) {
      return;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this,IValue.EXACT_MATCH,receiverType,false));
      return;
    }
    parameterStartIndex=0;
    argumentCount=arguments.size();
    argumentStartIndex=1;
    matchValues=new int[1 + argumentCount];
    matchTypes=new IType[1 + argumentCount];
    matchValues[0]=1;
    matchTypes[0]=receiverType;
  }
 else {
    if (mod == Modifiers.STATIC && !receiver.isClassAccess()) {
      invalid=true;
    }
    final IType receiverType;
    if (mod == Modifiers.INFIX) {
      receiverType=parameters.get(0).getCovariantType();
      parameterStartIndex=1;
    }
 else {
      receiverType=this.getReceiverType();
      parameterStartIndex=0;
    }
    final int receiverMatch=TypeChecker.getTypeMatch(receiver,receiverType,list);
    if (receiverMatch == IValue.MISMATCH) {
      return;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this,receiverMatch,receiverType,false));
      return;
    }
    argumentCount=arguments.size();
    argumentStartIndex=1;
    matchValues=new int[1 + argumentCount];
    matchTypes=new IType[1 + argumentCount];
    matchValues[0]=receiverMatch;
    matchTypes[0]=receiverType;
  }
  final int parametersLeft=parameterCount - parameterStartIndex;
  if (argumentCount > parametersLeft && !this.isVariadic()) {
    return;
  }
  int defaults=0;
  int varargs=0;
  for (int argumentIndex=0; argumentIndex < parametersLeft; argumentIndex++) {
    final IParameter parameter=parameters.get(parameterStartIndex + argumentIndex);
    final int partialVarargs=arguments.checkMatch(matchValues,matchTypes,argumentStartIndex,argumentIndex,parameter,list);
switch (partialVarargs) {
case ArgumentList.MISMATCH:
      return;
case ArgumentList.DEFAULT:
    defaults++;
  continue;
default :
varargs+=partialVarargs;
}
}
for (int matchValue : matchValues) {
if (matchValue == IValue.MISMATCH) {
return;
}
}
list.add(new Candidate<>(this,matchValues,matchTypes,defaults,varargs,invalid));
}

Fixed version (ground truth):
@Override public void checkMatch(MatchList<IMethod> list,IValue receiver,Name name,ArgumentList arguments){
  if (name != this.name && name != null) {
    return;
  }
  final ParameterList parameters=this.getParameters();
  final int parameterStartIndex;
  final int argumentStartIndex;
  final int argumentCount;
  final int parameterCount=parameters.size();
  final int[] matchValues;
  final IType[] matchTypes;
  boolean invalid=false;
  final int mod=this.attributes.flags() & Modifiers.INFIX;
  if (receiver == null) {
    if (mod == Modifiers.INFIX) {
      invalid=true;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this));
      return;
    }
    argumentCount=arguments.size();
    matchValues=new int[argumentCount];
    matchTypes=new IType[argumentCount];
    argumentStartIndex=0;
    parameterStartIndex=0;
  }
 else   if (mod != 0 && receiver.isClassAccess()) {
    final IType receiverType=receiver.getType();
    if (!Types.isSuperType(this.getReceiverType(),receiverType)) {
      return;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this,IValue.EXACT_MATCH,receiverType,false));
      return;
    }
    parameterStartIndex=0;
    argumentCount=arguments.size();
    argumentStartIndex=1;
    matchValues=new int[1 + argumentCount];
    matchTypes=new IType[1 + argumentCount];
    matchValues[0]=1;
    matchTypes[0]=receiverType;
  }
 else {
    if (mod == Modifiers.STATIC && !receiver.isClassAccess()) {
      invalid=true;
    }
    final IType receiverType;
    if (mod == Modifiers.INFIX && !parameters.isEmpty()) {
      receiverType=parameters.get(0).getCovariantType();
      parameterStartIndex=1;
    }
 else {
      receiverType=this.getReceiverType();
      parameterStartIndex=0;
    }
    final int receiverMatch=TypeChecker.getTypeMatch(receiver,receiverType,list);
    if (receiverMatch == IValue.MISMATCH) {
      return;
    }
    if (arguments == null) {
      list.add(new Candidate<>(this,receiverMatch,receiverType,false));
      return;
    }
    argumentCount=arguments.size();
    argumentStartIndex=1;
    matchValues=new int[1 + argumentCount];
    matchTypes=new IType[1 + argumentCount];
    matchValues[0]=receiverMatch;
    matchTypes[0]=receiverType;
  }
  final int parametersLeft=parameterCount - parameterStartIndex;
  if (argumentCount > parametersLeft && !this.isVariadic()) {
    return;
  }
  int defaults=0;
  int varargs=0;
  for (int argumentIndex=0; argumentIndex < parametersLeft; argumentIndex++) {
    final IParameter parameter=parameters.get(parameterStartIndex + argumentIndex);
    final int partialVarargs=arguments.checkMatch(matchValues,matchTypes,argumentStartIndex,argumentIndex,parameter,list);
switch (partialVarargs) {
case ArgumentList.MISMATCH:
      return;
case ArgumentList.DEFAULT:
    defaults++;
  continue;
default :
varargs+=partialVarargs;
}
}
for (int matchValue : matchValues) {
if (matchValue == IValue.MISMATCH) {
return;
}
}
list.add(new Candidate<>(this,matchValues,matchTypes,defaults,varargs,invalid));
}