Program: 185604
Project: 185604
Buggy source:
public List<IGroovyProposal> getStatementAndExpressionProposals(ContentAssistContext context,ClassNode completionType,boolean isStatic,Set<ClassNode> categories){
  String event=null;
  if (GroovyLogManager.manager.hasLoggers()) {
    GroovyLogManager.manager.log(TraceCategory.DSL,"String_Node_Str" + context.fullCompletionExpression);
    event="String_Node_Str";
    GroovyLogManager.manager.logStart(event);
  }
  List<IContributionElement> contributions;
  List<IGroovyProposal> proposals=new ArrayList<IGroovyProposal>();
  try {
    DSLDStore store=GroovyDSLCoreActivator.getDefault().getContextStoreManager().getDSLDStore(context.unit.getJavaProject());
    ModuleNodeInfo info=context.unit.getModuleInfo(true);
    if (info == null) {
      if (GroovyLogManager.manager.hasLoggers()) {
        GroovyLogManager.manager.log(TraceCategory.CONTENT_ASSIST,"String_Node_Str" + context.unit.getElementName());
      }
      return Collections.EMPTY_LIST;
    }
    GroovyDSLDContext pattern=new GroovyDSLDContext(context.unit,info.module,info.resolver);
    pattern.setCurrentScope(context.currentScope);
    pattern.setTargetType(completionType);
    pattern.setStatic(isStatic);
    pattern.setPrimaryNode(context.location == ContentAssistLocation.STATEMENT || (context.location == ContentAssistLocation.METHOD_CONTEXT && context.currentScope.isPrimaryNode()));
    contributions=store.findContributions(pattern,DSLPreferences.getDisabledScriptsAsSet());
    boolean isMethodContext=context instanceof MethodInfoContentAssistContext;
    for (    IContributionElement element : contributions) {
      if (element.contributionName().startsWith(context.getPerceivedCompletionExpression())) {
        IGroovyProposal proposal=element.toProposal(completionType,pattern.getResolverCache());
        if (proposal != null) {
          proposals.add(proposal);
        }
        if (isMethodContext) {
          proposals.addAll(element.extraProposals(completionType,pattern.getResolverCache(),(Expression)((MethodInfoContentAssistContext)context).completionNode));
        }
      }
    }
  }
 catch (  CoreException e) {
    GroovyDSLCoreActivator.logException(e);
  }
  if (event != null) {
    GroovyLogManager.manager.logEnd(event,TraceCategory.DSL);
  }
  return proposals;
}

Fixed version (ground truth):
public List<IGroovyProposal> getStatementAndExpressionProposals(ContentAssistContext context,ClassNode completionType,boolean isStatic,Set<ClassNode> categories){
  String event=null;
  if (GroovyLogManager.manager.hasLoggers()) {
    GroovyLogManager.manager.log(TraceCategory.DSL,"String_Node_Str" + context.fullCompletionExpression);
    event="String_Node_Str";
    GroovyLogManager.manager.logStart(event);
  }
  List<IContributionElement> contributions;
  List<IGroovyProposal> proposals=new ArrayList<IGroovyProposal>();
  try {
    DSLDStore store=GroovyDSLCoreActivator.getDefault().getContextStoreManager().getDSLDStore(context.unit.getJavaProject());
    ModuleNodeInfo info=context.unit.getModuleInfo(true);
    if (info == null) {
      if (GroovyLogManager.manager.hasLoggers()) {
        GroovyLogManager.manager.log(TraceCategory.CONTENT_ASSIST,"String_Node_Str" + context.unit.getElementName());
      }
      return Collections.EMPTY_LIST;
    }
    GroovyDSLDContext pattern=new GroovyDSLDContext(context.unit,info.module,info.resolver);
    pattern.setCurrentScope(context.currentScope);
    pattern.setTargetType(completionType);
    pattern.setStatic(isStatic);
    pattern.setPrimaryNode(context.location == ContentAssistLocation.STATEMENT || (context.location == ContentAssistLocation.METHOD_CONTEXT && context.currentScope.isPrimaryNode()));
    contributions=store.findContributions(pattern,DSLPreferences.getDisabledScriptsAsSet());
    boolean isMethodContext=(context instanceof MethodInfoContentAssistContext);
    for (    IContributionElement element : contributions) {
      if (element.contributionName().startsWith(context.getPerceivedCompletionExpression())) {
        IGroovyProposal proposal=element.toProposal(completionType,pattern.getResolverCache());
        if (proposal != null) {
          proposals.add(proposal);
        }
        if (isMethodContext) {
          proposals.addAll(element.extraProposals(completionType,pattern.getResolverCache(),(Expression)((MethodInfoContentAssistContext)context).completionNode));
        }
      }
    }
  }
 catch (  CoreException e) {
    GroovyDSLCoreActivator.logException(e);
  }
  if (event != null) {
    GroovyLogManager.manager.logEnd(event,TraceCategory.DSL);
  }
  return proposals;
}