Program: 17490
Project: 17490
Buggy source:
/** 
 * Retrieves the attribute proposals. It queries all of the registered attribute assist contributors for proposals. It performs the logic to eliminate attributes that already exist for the tag. It then eliminates all attributes that would not be triggered by the current attributes.
 * @param state The state of the assist
 * @param attrText The attribute text 
 * @param tagname The tag that the attribute assist has been invoked upon
 * @param currAttribs A HashMap of the attributes that are current entered.
 * @return Array of ICompletionProposals for the user to see
 */
private ICompletionProposal[] getAttributeProposals(IAssistTagState state,Map currAttribs){
  Assert.isNotNull(state);
  Assert.isNotNull(currAttribs);
  String prefix=state.getDataSoFar();
  String attrText=state.getAttributeText().trim();
  String quote_parts[]=prefix.substring(1,state.getTagName().length()).split("String_Node_Str");
  if (quote_parts.length % 2 != 0) {
    if (!(prefix.indexOf('>') < 0)) {
      return null;
    }
    Set suggestedAttribs=getAttribsFromContributors(state);
    try {
      ArrayList attribs2Remove=new ArrayList();
      if (suggestedAttribs == null)       return new ICompletionProposal[0];
      Iterator attrIter=suggestedAttribs.iterator();
      while (attrIter.hasNext()) {
        Object attrObj=attrIter.next();
        Assert.isTrue(attrObj instanceof Parameter,"String_Node_Str");
        Parameter currParam=(Parameter)attrObj;
        if (currAttribs.containsKey(currParam.getName())) {
          attribs2Remove.add(currParam);
        }
 else         if ((currParam.isTriggered((HashMap)currAttribs) == Parameter.PARAM_NOTTRIGGERED)) {
          attribs2Remove.add(currParam);
        }
      }
      Iterator removeIter=attribs2Remove.iterator();
      while (removeIter.hasNext()) {
        suggestedAttribs.remove(removeIter.next());
      }
    }
 catch (    Throwable ex) {
      ex.printStackTrace();
    }
    return makeSetToProposal(CFDocUtils.eliminateDuplicateParams(suggestedAttribs,new HashSet(currAttribs.values())),state.getOffset(),ATTRTYPE,attrText.length());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieves the attribute proposals. It queries all of the registered attribute assist contributors for proposals. It performs the logic to eliminate attributes that already exist for the tag. It then eliminates all attributes that would not be triggered by the current attributes.
 * @param state The state of the assist
 * @param attrText The attribute text 
 * @param tagname The tag that the attribute assist has been invoked upon
 * @param currAttribs A HashMap of the attributes that are current entered.
 * @return Array of ICompletionProposals for the user to see
 */
private ICompletionProposal[] getAttributeProposals(IAssistTagState state,Map currAttribs){
  Assert.isNotNull(state,"String_Node_Str");
  Assert.isNotNull(currAttribs,"String_Node_Str");
  String prefix=state.getDataSoFar();
  String attrText=state.getAttributeText().trim();
  String quote_parts[]=prefix.substring(1,state.getTagName().length()).split("String_Node_Str");
  if (quote_parts.length % 2 != 0) {
    if (!(prefix.indexOf('>') < 0)) {
      return null;
    }
    Set suggestedAttribs=getAttribsFromContributors(state);
    try {
      ArrayList attribs2Remove=new ArrayList();
      if (suggestedAttribs == null)       return new ICompletionProposal[0];
      Iterator attrIter=suggestedAttribs.iterator();
      while (attrIter.hasNext()) {
        Object attrObj=attrIter.next();
        Assert.isTrue(attrObj instanceof Parameter,"String_Node_Str");
        Parameter currParam=(Parameter)attrObj;
        if (currAttribs.containsKey(currParam.getName())) {
          attribs2Remove.add(currParam);
        }
 else         if ((currParam.isTriggered((HashMap)currAttribs) == Parameter.PARAM_NOTTRIGGERED)) {
          attribs2Remove.add(currParam);
        }
      }
      Iterator removeIter=attribs2Remove.iterator();
      while (removeIter.hasNext()) {
        suggestedAttribs.remove(removeIter.next());
      }
    }
 catch (    Throwable ex) {
      ex.printStackTrace();
    }
    return makeSetToProposal(CFDocUtils.eliminateDuplicateParams(suggestedAttribs,new HashSet(currAttribs.values())),state.getOffset(),ATTRTYPE,attrText.length());
  }
  return null;
}