Program: 15719
Project: 15719
Buggy source:
MaybeEmptyMemberAndArguments getMemberAndArguments(List tmArgs,BeansWrapper w) throws TemplateModelException {
  if (tmArgs == null) {
    tmArgs=Collections.EMPTY_LIST;
  }
  int l=tmArgs.size();
  Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  Object[] pojoArgs=new Object[l];
  outer:   for (int j=Math.min(l + 1,unwrappingHintsByParamCount.length - 1); j >= 0; --j) {
    Class[] unwarappingArgTypes=unwrappingHintsByParamCount[j];
    if (unwarappingArgTypes == null) {
      if (j == 0) {
        return EmptyMemberAndArguments.NO_SUCH_METHOD;
      }
      continue;
    }
    Iterator it=tmArgs.iterator();
    for (int i=0; i < l; ++i) {
      Object pojo=w.unwrapInternal((TemplateModel)it.next(),i < j ? unwarappingArgTypes[i] : unwarappingArgTypes[j - 1]);
      if (pojo == BeansWrapper.CAN_NOT_UNWRAP) {
        continue outer;
      }
      if (pojo != pojoArgs[i]) {
        pojoArgs[i]=pojo;
      }
    }
    break;
  }
  MaybeEmptyCallableMemberDescriptor maybeEmtpyMemberDesc=getMemberForArgs(pojoArgs,true);
  if (maybeEmtpyMemberDesc instanceof CallableMemberDescriptor) {
    CallableMemberDescriptor memberDesc=(CallableMemberDescriptor)maybeEmtpyMemberDesc;
    pojoArgs=((ArgumentPacker)argPackers.get(memberDesc.member)).packArgs(pojoArgs,tmArgs,w);
    if (pojoArgs == null) {
      return EmptyMemberAndArguments.NO_SUCH_METHOD;
    }
    BeansWrapper.coerceBigDecimals(memberDesc.paramTypes,pojoArgs);
    return new MemberAndArguments(memberDesc.member,pojoArgs);
  }
 else {
    return EmptyMemberAndArguments.from((EmptyCallableMemberDescriptor)maybeEmtpyMemberDesc);
  }
}

Fixed version (ground truth):
MaybeEmptyMemberAndArguments getMemberAndArguments(List tmArgs,BeansWrapper w) throws TemplateModelException {
  if (tmArgs == null) {
    tmArgs=Collections.EMPTY_LIST;
  }
  int l=tmArgs.size();
  Class[][] unwrappingHintsByParamCount=getUnwrappingHintsByParamCount();
  Object[] pojoArgs=new Object[l];
  outer:   for (int j=Math.min(l + 1,unwrappingHintsByParamCount.length - 1); j >= 0; --j) {
    Class[] unwarappingArgTypes=unwrappingHintsByParamCount[j];
    if (unwarappingArgTypes == null) {
      if (j == 0) {
        return EmptyMemberAndArguments.NO_SUCH_METHOD;
      }
      continue;
    }
    Iterator it=tmArgs.iterator();
    for (int i=0; i < l; ++i) {
      Object pojo=w.unwrapInternal((TemplateModel)it.next(),i < j ? unwarappingArgTypes[i] : unwarappingArgTypes[j - 1]);
      if (pojo == BeansWrapper.CAN_NOT_UNWRAP) {
        continue outer;
      }
      if (pojo != pojoArgs[i]) {
        pojoArgs[i]=pojo;
      }
    }
    break;
  }
  MaybeEmptyCallableMemberDescriptor maybeEmtpyMemberDesc=getMemberDescriptorForArgs(pojoArgs,true);
  if (maybeEmtpyMemberDesc instanceof CallableMemberDescriptor) {
    CallableMemberDescriptor memberDesc=(CallableMemberDescriptor)maybeEmtpyMemberDesc;
    pojoArgs=((ArgumentPacker)argPackers.get(memberDesc.member)).packArgs(pojoArgs,tmArgs,w);
    if (pojoArgs == null) {
      return EmptyMemberAndArguments.NO_SUCH_METHOD;
    }
    BeansWrapper.coerceBigDecimals(memberDesc.paramTypes,pojoArgs);
    return new MemberAndArguments(memberDesc.member,pojoArgs);
  }
 else {
    return EmptyMemberAndArguments.from((EmptyCallableMemberDescriptor)maybeEmtpyMemberDesc);
  }
}