Program: 91689
Project: 91689
Buggy source:
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext context){
  List<ICompletionProposal> proposals=new ArrayList<ICompletionProposal>();
  Iterator<Annotation> annotationIterator=context.getSourceViewer().getAnnotationModel().getAnnotationIterator();
  while (annotationIterator.hasNext()) {
    Annotation annotation=annotationIterator.next();
    if (annotation instanceof MarkerAnnotation) {
      MarkerAnnotation mark=(MarkerAnnotation)annotation;
      try {
        Position position=context.getSourceViewer().getAnnotationModel().getPosition(annotation);
        int lineNum=context.getSourceViewer().getDocument().getLineOfOffset(position.getOffset()) + 1;
        int currentLineNum=context.getSourceViewer().getDocument().getLineOfOffset(context.getOffset()) + 1;
        if (currentLineNum == lineNum) {
          String hint=mark.getMarker().getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT,null);
          if (hint != null) {
            if (hint.equals(IMavenConstants.EDITOR_HINT_PARENT_GROUP_ID)) {
              proposals.add(new IdPartRemovalProposal(context,false,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_PARENT_VERSION)) {
              proposals.add(new IdPartRemovalProposal(context,true,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_DEPENDENCY_OVERRIDE)) {
              proposals.add(new ManagedVersionRemovalProposal(context,true,mark));
              proposals.add(new IgnoreWarningProposal(context,mark,IMavenConstants.MARKER_IGNORE_MANAGED));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_PLUGIN_OVERRIDE)) {
              proposals.add(new ManagedVersionRemovalProposal(context,false,mark));
              proposals.add(new IgnoreWarningProposal(context,mark,IMavenConstants.MARKER_IGNORE_MANAGED));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MISSING_SCHEMA)) {
              proposals.add(new SchemaCompletionProposal(context,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION)) {
              extractedFromMarkers(proposals,mark);
              proposals.add(new LifecycleMappingProposal(context,mark,PluginExecutionAction.ignore));
            }
          }
        }
      }
 catch (      Exception e) {
        MvnIndexPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,MvnIndexPlugin.PLUGIN_ID,"String_Node_Str",e));
      }
    }
  }
  if (proposals.size() > 0) {
    return proposals.toArray(new ICompletionProposal[0]);
  }
  return null;
}

Fixed version (ground truth):
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext context){
  List<ICompletionProposal> proposals=new ArrayList<ICompletionProposal>();
  Iterator<Annotation> annotationIterator=context.getSourceViewer().getAnnotationModel().getAnnotationIterator();
  while (annotationIterator.hasNext()) {
    Annotation annotation=annotationIterator.next();
    if (annotation instanceof MarkerAnnotation) {
      MarkerAnnotation mark=(MarkerAnnotation)annotation;
      try {
        Position position=context.getSourceViewer().getAnnotationModel().getPosition(annotation);
        int lineNum=context.getSourceViewer().getDocument().getLineOfOffset(position.getOffset()) + 1;
        int currentLineNum=context.getSourceViewer().getDocument().getLineOfOffset(context.getOffset()) + 1;
        if (currentLineNum == lineNum) {
          String hint=mark.getMarker().getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT,null);
          if (hint != null) {
            if (hint.equals(IMavenConstants.EDITOR_HINT_PARENT_GROUP_ID)) {
              proposals.add(new IdPartRemovalProposal(context,false,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_PARENT_VERSION)) {
              proposals.add(new IdPartRemovalProposal(context,true,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_DEPENDENCY_OVERRIDE)) {
              proposals.add(new ManagedVersionRemovalProposal(context,true,mark));
              proposals.add(new IgnoreWarningProposal(context,mark,IMavenConstants.MARKER_IGNORE_MANAGED));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_PLUGIN_OVERRIDE)) {
              proposals.add(new ManagedVersionRemovalProposal(context,false,mark));
              proposals.add(new IgnoreWarningProposal(context,mark,IMavenConstants.MARKER_IGNORE_MANAGED));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_MISSING_SCHEMA)) {
              proposals.add(new SchemaCompletionProposal(context,mark));
            }
 else             if (hint.equals(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION)) {
              extractedFromMarkers(proposals,mark);
              proposals.add(new LifecycleMappingProposal(context,mark,PluginExecutionAction.ignore));
            }
 else             if (mark.getMarker().getAttribute(IMarker.SEVERITY,IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR && hint.equals(IMavenConstants.EDITOR_HINT_IMPLICIT_LIFECYCLEMAPPING)) {
              extractedFromMarkers(proposals,mark);
              proposals.add(new LifecycleMappingProposal(context,mark,PluginExecutionAction.ignore));
            }
          }
        }
      }
 catch (      Exception e) {
        MvnIndexPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,MvnIndexPlugin.PLUGIN_ID,"String_Node_Str",e));
      }
    }
  }
  if (proposals.size() > 0) {
    return proposals.toArray(new ICompletionProposal[0]);
  }
  return null;
}