Program: 185453
Project: 185453
Buggy source:
private ICompletionProposal proposeConstructor(char[] simpleTypeName,int parameterCount,char[] signature,char[][] parameterTypes,char[][] parameterNames,int modifiers,char[] packageName,int typeModifiers,int accessibility,char[] fullyQualifiedName,boolean isQualified,int extraFlags){
  char[] completionExpressionChars=completionExpression.toCharArray();
  if (contextOnly && !CharOperation.equals(completionExpressionChars,simpleTypeName) && !CharOperation.equals(completionExpressionChars,fullyQualifiedName)) {
    return null;
  }
  GroovyCompletionProposal proposal=createProposal(contextOnly ? CompletionProposal.METHOD_REF : CompletionProposal.CONSTRUCTOR_INVOCATION,offset - 1);
  proposal.setIsContructor(true);
  proposal.setName(simpleTypeName);
  proposal.setTypeName(simpleTypeName);
  proposal.setPackageName(packageName);
  proposal.setDeclarationTypeName(simpleTypeName);
  proposal.setDeclarationPackageName(packageName);
  proposal.setDeclarationSignature(CompletionEngine.createNonGenericTypeSignature(packageName,simpleTypeName));
  proposal.setFlags(Flags.isDeprecated(typeModifiers) ? modifiers | Flags.AccDeprecated : modifiers);
  proposal.setAdditionalFlags(extraFlags);
  proposal.setAccessibility(accessibility);
  populateParameterInfo(proposal,parameterCount,parameterNames,parameterTypes,signature,isQualified);
  populateReplacementInfo(proposal,packageName,simpleTypeName,fullyQualifiedName);
  float relevanceMultiplier=(accessibility == IAccessRule.K_ACCESSIBLE) ? 3 : 0;
  relevanceMultiplier+=computeRelevanceForCaseMatching(completionExpressionChars,simpleTypeName);
  proposal.setRelevance(Relevance.MEDIUM_HIGH.getRelevance(relevanceMultiplier));
  GroovyJavaMethodCompletionProposal lazyProposal=new GroovyJavaMethodCompletionProposal(proposal,getProposalOptions(),javaContext,null);
  lazyProposal.setImportRewite(groovyRewriter.getImportRewrite(monitor));
  return lazyProposal;
}

Fixed version (ground truth):
private ICompletionProposal proposeConstructor(char[] simpleTypeName,int parameterCount,char[] signature,char[][] parameterTypes,char[][] parameterNames,int modifiers,char[] packageName,int typeModifiers,int accessibility,char[] fullyQualifiedName,boolean isQualified,int extraFlags){
  char[] completionExpressionChars=completionExpression.toCharArray();
  int completionOffset=offset - 1, kind=CompletionProposal.CONSTRUCTOR_INVOCATION;
  if (contextOnly) {
    if (!CharOperation.equals(completionExpressionChars,simpleTypeName) && !CharOperation.equals(completionExpressionChars,fullyQualifiedName)) {
      return null;
    }
    kind=CompletionProposal.METHOD_REF;
    completionOffset=((MethodInfoContentAssistContext)context).methodNameEnd;
  }
  GroovyCompletionProposal proposal=createProposal(kind,completionOffset);
  proposal.setIsContructor(true);
  proposal.setName(simpleTypeName);
  proposal.setTypeName(simpleTypeName);
  proposal.setPackageName(packageName);
  proposal.setDeclarationTypeName(simpleTypeName);
  proposal.setDeclarationPackageName(packageName);
  proposal.setDeclarationSignature(CompletionEngine.createNonGenericTypeSignature(packageName,simpleTypeName));
  proposal.setFlags(Flags.isDeprecated(typeModifiers) ? modifiers | Flags.AccDeprecated : modifiers);
  proposal.setAdditionalFlags(extraFlags);
  proposal.setAccessibility(accessibility);
  populateParameterInfo(proposal,parameterCount,parameterNames,parameterTypes,signature,isQualified);
  populateReplacementInfo(proposal,packageName,simpleTypeName,fullyQualifiedName);
  float relevanceMultiplier=(accessibility == IAccessRule.K_ACCESSIBLE) ? 3 : 0;
  relevanceMultiplier+=computeRelevanceForCaseMatching(completionExpressionChars,simpleTypeName);
  proposal.setRelevance(Relevance.MEDIUM_HIGH.getRelevance(relevanceMultiplier));
  GroovyJavaMethodCompletionProposal lazyProposal=new GroovyJavaMethodCompletionProposal(proposal,getProposalOptions(),javaContext,null);
  lazyProposal.setImportRewite(groovyRewriter.getImportRewrite(monitor));
  return lazyProposal;
}