nus-yam/ex-repair huggingface dataset:
Program: 17484
Project: 17484
Buggy source:
/** 
 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
 */
public void doSave(IProgressMonitor monitor){
  if (getPreferenceStore().getBoolean(EditorPreferenceConstants.P_BRACKET_MATCHING_ENABLED)) {
    ((CFEUndoManager)configuration.getUndoManager(this.getSourceViewer())).listenToTextChanges(false);
    RTrimAction trimAction=new RTrimAction();
    trimAction.setActiveEditor(null,getSite().getPage().getActiveEditor());
    trimAction.run(null);
    ((CFEUndoManager)configuration.getUndoManager(this.getSourceViewer())).listenToTextChanges(true);
  }
  try {
    super.doSave(monitor);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  foldingSetter.docChanged(false);
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
 */
public void doSave(IProgressMonitor monitor){
  if (getPreferenceStore().getBoolean(EditorPreferenceConstants.P_RTRIM_ON_SAVE)) {
    ((CFEUndoManager)configuration.getUndoManager(this.getSourceViewer())).listenToTextChanges(false);
    RTrimAction trimAction=new RTrimAction();
    trimAction.setActiveEditor(null,getSite().getPage().getActiveEditor());
    trimAction.run(null);
    ((CFEUndoManager)configuration.getUndoManager(this.getSourceViewer())).listenToTextChanges(true);
  }
  try {
    super.doSave(monitor);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  foldingSetter.docChanged(false);
}
Program: 17485
Project: 17485
Buggy source:
/** 
 * Constructor for NonRuleBasedDamagerRepairer.
 */
public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute){
  Assert.isNotNull(defaultTextAttribute);
  fDefaultTextAttribute=defaultTextAttribute;
}

Fixed version (ground truth):
/** 
 * Constructor for NonRuleBasedDamagerRepairer.
 */
public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute){
  Assert.isNotNull(defaultTextAttribute,"String_Node_Str");
  fDefaultTextAttribute=defaultTextAttribute;
}
Program: 17486
Project: 17486
Buggy source:
private boolean checkActuallyInTag(String cursorPrefix){
  Assert.isNotNull(cursorPrefix);
  int chevronCount=0;
  int quoteCount=0;
  boolean inQuotes=false;
  boolean inTag=false;
  String separators="String_Node_Str";
  for (int i=cursorPrefix.length() - 1; i >= 0; i--) {
    char currChar=cursorPrefix.charAt(i);
    if (currChar == '>' && !inQuotes) {
      chevronCount--;
      break;
    }
 else     if (currChar == '<' && !inQuotes) {
      inTag=true;
      this.lastOpenChevronPos=i;
      chevronCount++;
    }
 else     if (currChar == '\"') {
      if (quoteCount == 0) {
        for (i--; i >= 0; i--) {
          if (separators.indexOf(cursorPrefix.charAt(i)) == -1) {
            i++;
            break;
          }
 else           if (cursorPrefix.charAt(i) == '=') {
            inQuotes=true;
            quoteCount++;
            break;
          }
        }
      }
      inQuotes=(inQuotes) ? false : true;
      quoteCount++;
    }
  }
  if (quoteCount % 2 != 0 && chevronCount > 0) {
    inTag=false;
  }
  return inTag;
}

Fixed version (ground truth):
private boolean checkActuallyInTag(String cursorPrefix){
  Assert.isNotNull(cursorPrefix,"String_Node_Str");
  int chevronCount=0;
  int quoteCount=0;
  boolean inQuotes=false;
  boolean inTag=false;
  String separators="String_Node_Str";
  for (int i=cursorPrefix.length() - 1; i >= 0; i--) {
    char currChar=cursorPrefix.charAt(i);
    if (currChar == '>' && !inQuotes) {
      chevronCount--;
      break;
    }
 else     if (currChar == '<' && !inQuotes) {
      inTag=true;
      this.lastOpenChevronPos=i;
      chevronCount++;
    }
 else     if (currChar == '\"') {
      if (quoteCount == 0) {
        for (i--; i >= 0; i--) {
          if (separators.indexOf(cursorPrefix.charAt(i)) == -1) {
            i++;
            break;
          }
 else           if (cursorPrefix.charAt(i) == '=') {
            inQuotes=true;
            quoteCount++;
            break;
          }
        }
      }
      inQuotes=(inQuotes) ? false : true;
      quoteCount++;
    }
  }
  if (quoteCount % 2 != 0 && chevronCount > 0) {
    inTag=false;
  }
  return inTag;
}
Program: 17487
Project: 17487
Buggy source:
/** 
 * Helper function. Returns the value proposals for an attribute.
 * @param viewer The viewer, just pass in the computeCompletionProposals stuff
 * @param offset Ditto
 * @return Array of the proposals available.
 */
ICompletionProposal[] getAttributeValueProposals(IAssistTagState assistState){
  Assert.isNotNull(assistState);
  DefaultAssistAttributeState attrState=prepareForValueAssist(assistState);
  ArrayList valueContributors=((ICFEFileDocument)assistState.getIDocument()).getContentAssistManager().getValueAssistors();
  Iterator CACorIter=valueContributors.iterator();
  Set proposals=new TreeSet();
  while (CACorIter.hasNext()) {
    Value valueProps[]=((IAssistAttrValueContributor)CACorIter.next()).getAttributeValueProposals(attrState);
    if (valueProps == null)     continue;
    for (int i=0; i < valueProps.length; i++) {
      proposals.add(valueProps[i]);
    }
  }
  return makeSetToProposal(proposals,attrState.getOffset(),CFContentAssist.VALUETYPE,attrState.getValueSoFar().length());
}

Fixed version (ground truth):
/** 
 * Helper function. Returns the value proposals for an attribute.
 * @param viewer The viewer, just pass in the computeCompletionProposals stuff
 * @param offset Ditto
 * @return Array of the proposals available.
 */
ICompletionProposal[] getAttributeValueProposals(IAssistTagState assistState){
  Assert.isNotNull(assistState,"String_Node_Str");
  DefaultAssistAttributeState attrState=prepareForValueAssist(assistState);
  ArrayList valueContributors=((ICFEFileDocument)assistState.getIDocument()).getContentAssistManager().getValueAssistors();
  Iterator CACorIter=valueContributors.iterator();
  Set proposals=new TreeSet();
  while (CACorIter.hasNext()) {
    Value valueProps[]=((IAssistAttrValueContributor)CACorIter.next()).getAttributeValueProposals(attrState);
    if (valueProps == null)     continue;
    for (int i=0; i < valueProps.length; i++) {
      proposals.add(valueProps[i]);
    }
  }
  return makeSetToProposal(proposals,attrState.getOffset(),CFContentAssist.VALUETYPE,attrState.getValueSoFar().length());
}
Program: 17488
Project: 17488
Buggy source:
/** 
 * Returns the tag proposals based upon current information available. The tag proposals are based upon the HTML & CFML syntax dictionaries.
 * @param offset The offset in the document that the user invoked assist
 * @param document The document the user is working in.
 * @param invokerChar The char that invoked content assist.
 * @param prefix Everything from the invoke point to the start of the tag being worked upon
 * @return An array of completion proposals, otherwise <code>null</code> for no match.
 * @throws BadLocationException
 */
private ICompletionProposal[] getTagProposalsFromCACors(IAssistState assistState) throws BadLocationException {
  Assert.isNotNull(assistState);
  ArrayList proposals=new ArrayList();
  ArrayList tagAssists=((ICFEFileDocument)assistState.getIDocument()).getContentAssistManager().getTagAssistors();
  if (assistState.getDataSoFar().length() == 0)   return null;
  Iterator assistIter=tagAssists.iterator();
  while (assistIter.hasNext()) {
    ICompletionProposal[] props=((IAssistContributor)assistIter.next()).getTagProposals(assistState);
    if (props == null)     continue;
    for (int i=0; i < props.length; i++) {
      proposals.add(props[i]);
    }
  }
  ICompletionProposal[] retProps=new ICompletionProposal[proposals.size()];
  for (int i=0; i < retProps.length; i++) {
    retProps[i]=(ICompletionProposal)proposals.get(i);
  }
  return retProps;
}

Fixed version (ground truth):
/** 
 * Returns the tag proposals based upon current information available. The tag proposals are based upon the HTML & CFML syntax dictionaries.
 * @param offset The offset in the document that the user invoked assist
 * @param document The document the user is working in.
 * @param invokerChar The char that invoked content assist.
 * @param prefix Everything from the invoke point to the start of the tag being worked upon
 * @return An array of completion proposals, otherwise <code>null</code> for no match.
 * @throws BadLocationException
 */
private ICompletionProposal[] getTagProposalsFromCACors(IAssistState assistState) throws BadLocationException {
  Assert.isNotNull(assistState,"String_Node_Str");
  ArrayList proposals=new ArrayList();
  ArrayList tagAssists=((ICFEFileDocument)assistState.getIDocument()).getContentAssistManager().getTagAssistors();
  if (assistState.getDataSoFar().length() == 0)   return null;
  Iterator assistIter=tagAssists.iterator();
  while (assistIter.hasNext()) {
    ICompletionProposal[] props=((IAssistContributor)assistIter.next()).getTagProposals(assistState);
    if (props == null)     continue;
    for (int i=0; i < props.length; i++) {
      proposals.add(props[i]);
    }
  }
  ICompletionProposal[] retProps=new ICompletionProposal[proposals.size()];
  for (int i=0; i < retProps.length; i++) {
    retProps[i]=(ICompletionProposal)proposals.get(i);
  }
  return retProps;
}
Program: 17489
Project: 17489
Buggy source:
/** 
 * This method prepares a DefaultAssistTagState object ready for gathering attribute content assist. It creates the tagstate based upon the current standard assist state and adds on the required extras. 
 * @param assistState The current assist state for content assist
 * @param attrText The attribute text
 * @param prefix All of the data, tags, attributes & all
 * @param partItems Prefix split around spaces
 * @return The prepared DefaultAssistTagState
 */
private DefaultAssistTagState prepareForAttributeAssist(IAssistState assistState,String attrText,String prefix,ArrayList partItems){
  Assert.isNotNull(assistState);
  Assert.isNotNull(attrText);
  Assert.isNotNull(prefix);
  Assert.isNotNull(partItems);
  String tagName=((String)partItems.get(0)).substring(1).trim();
  DefaultAssistTagState attrTagState=new DefaultAssistTagState(assistState,tagName,attrText);
  UserMsg("String_Node_Str","String_Node_Str" + tagName + "String_Node_Str");
  return attrTagState;
}

Fixed version (ground truth):
/** 
 * This method prepares a DefaultAssistTagState object ready for gathering attribute content assist. It creates the tagstate based upon the current standard assist state and adds on the required extras. 
 * @param assistState The current assist state for content assist
 * @param attrText The attribute text
 * @param prefix All of the data, tags, attributes & all
 * @param partItems Prefix split around spaces
 * @return The prepared DefaultAssistTagState
 */
private DefaultAssistTagState prepareForAttributeAssist(IAssistState assistState,String attrText,String prefix,ArrayList partItems){
  Assert.isNotNull(assistState,"String_Node_Str");
  Assert.isNotNull(attrText,"String_Node_Str");
  Assert.isNotNull(prefix,"String_Node_Str");
  Assert.isNotNull(partItems,"String_Node_Str");
  String tagName=((String)partItems.get(0)).substring(1).trim();
  DefaultAssistTagState attrTagState=new DefaultAssistTagState(assistState,tagName,attrText);
  UserMsg("String_Node_Str","String_Node_Str" + tagName + "String_Node_Str");
  return attrTagState;
}
Program: 17491
Project: 17491
Buggy source:
/** 
 * Actually retrieves the proposals from the attribute assist contributors. They are queried based upon the current state of the content assist, the name of the invocation tag and the rest of the info. 
 * @param state The current state of the assist
 * @return The Set of Parameters that represent tha attribute contributions from the CACors
 */
private Set getAttribsFromContributors(IAssistTagState state){
  Assert.isNotNull(state);
  ArrayList attrValCACors=((ICFEFileDocument)state.getIDocument()).getContentAssistManager().getAttributeAssistors();
  HashSet retSet=new HashSet();
  Iterator CACorIter=attrValCACors.iterator();
  while (CACorIter.hasNext()) {
    IAssistTagContributor CACor=(IAssistTagContributor)CACorIter.next();
    Parameter[] possParams=CACor.getAttributeProposals(state);
    if (possParams == null)     continue;
    for (int i=0; i < possParams.length; i++) {
      retSet.add(possParams[i]);
    }
  }
  return retSet;
}

Fixed version (ground truth):
/** 
 * Actually retrieves the proposals from the attribute assist contributors. They are queried based upon the current state of the content assist, the name of the invocation tag and the rest of the info. 
 * @param state The current state of the assist
 * @return The Set of Parameters that represent tha attribute contributions from the CACors
 */
private Set getAttribsFromContributors(IAssistTagState state){
  Assert.isNotNull(state,"String_Node_Str");
  ArrayList attrValCACors=((ICFEFileDocument)state.getIDocument()).getContentAssistManager().getAttributeAssistors();
  HashSet retSet=new HashSet();
  Iterator CACorIter=attrValCACors.iterator();
  while (CACorIter.hasNext()) {
    IAssistTagContributor CACor=(IAssistTagContributor)CACorIter.next();
    Parameter[] possParams=CACor.getAttributeProposals(state);
    if (possParams == null)     continue;
    for (int i=0; i < possParams.length; i++) {
      retSet.add(possParams[i]);
    }
  }
  return retSet;
}
Program: 17493
Project: 17493
Buggy source:
/** 
 * Gets the list of registered tag attribute assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getAttributeAssistors(){
  Assert.isNotNull(this.attrAssistors);
  return this.attrAssistors;
}

Fixed version (ground truth):
/** 
 * Gets the list of registered tag attribute assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getAttributeAssistors(){
  Assert.isNotNull(this.attrAssistors,"String_Node_Str");
  return this.attrAssistors;
}
Program: 17494
Project: 17494
Buggy source:
/** 
 * Gets the list of registered tag assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getTagAssistors(){
  Assert.isNotNull(this.tagAssistors);
  return this.tagAssistors;
}

Fixed version (ground truth):
/** 
 * Gets the list of registered tag assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getTagAssistors(){
  Assert.isNotNull(this.tagAssistors,"String_Node_Str");
  return this.tagAssistors;
}
Program: 17495
Project: 17495
Buggy source:
/** 
 * <p> The primary assistant for CF docs will call each of these for every trigger char entered by the user that invokes content assist. </p> <p> Please note that it is recommended that classes implement the CFE-internal IAssistContributor interface rather than  IContentAssistProcessor. This allows primary assist to pass the state object that it has already calculated therefore saving some processing cycles. </p>
 * @return The ArrayList of root assistors which will be of either IContentAssistProcessor or IAssistContributor
 */
public ArrayList getRootAssistors(){
  Assert.isNotNull(this.rootAssistors);
  return this.rootAssistors;
}

Fixed version (ground truth):
/** 
 * <p> The primary assistant for CF docs will call each of these for every trigger char entered by the user that invokes content assist. </p> <p> Please note that it is recommended that classes implement the CFE-internal IAssistContributor interface rather than  IContentAssistProcessor. This allows primary assist to pass the state object that it has already calculated therefore saving some processing cycles. </p>
 * @return The ArrayList of root assistors which will be of either IContentAssistProcessor or IAssistContributor
 */
public ArrayList getRootAssistors(){
  Assert.isNotNull(this.rootAssistors,"String_Node_Str");
  return this.rootAssistors;
}
Program: 17496
Project: 17496
Buggy source:
/** 
 * Gets the list of registered tag attribute value assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getValueAssistors(){
  Assert.isNotNull(this.valueAssistors);
  return this.valueAssistors;
}

Fixed version (ground truth):
/** 
 * Gets the list of registered tag attribute value assistors 
 * @return ArrayList containing the assistors
 */
public ArrayList getValueAssistors(){
  Assert.isNotNull(this.valueAssistors,"String_Node_Str");
  return this.valueAssistors;
}
Program: 17497
Project: 17497
Buggy source:
/** 
 * Registers and possibly replaces an assistor
 * @param list The list that we are storing the assistors in
 * @param newAssistor The new assistor
 */
private void registerAssistor(ArrayList list,Object newAssistor){
  Assert.isNotNull(list);
  Assert.isNotNull(newAssistor);
  int cPos=list.indexOf(newAssistor);
  if (cPos != -1) {
    list.set(cPos,newAssistor);
  }
 else   list.add(newAssistor);
}

Fixed version (ground truth):
/** 
 * Registers and possibly replaces an assistor
 * @param list The list that we are storing the assistors in
 * @param newAssistor The new assistor
 */
private void registerAssistor(ArrayList list,Object newAssistor){
  Assert.isNotNull(list,"String_Node_Str");
  Assert.isNotNull(newAssistor,"String_Node_Str");
  int cPos=list.indexOf(newAssistor);
  if (cPos != -1) {
    list.set(cPos,newAssistor);
  }
 else   list.add(newAssistor);
}
Program: 17498
Project: 17498
Buggy source:
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,int offset){
  ArrayList proposals=new ArrayList();
  ArrayList proposers=new ArrayList();
  try {
    if (viewer.getDocument() instanceof ICFEFileDocument) {
      try {
        proposers=((ICFEFileDocument)viewer.getDocument()).getContentAssistManager().getRootAssistors();
      }
 catch (      Exception e) {
      }
    }
    DefaultAssistState state=AssistUtils.initialiseDefaultAssistState(viewer,offset);
    Iterator proposerIter=proposers.iterator();
    while (proposerIter.hasNext()) {
      Object currProc=proposerIter.next();
      Assert.isNotNull(currProc);
      ICompletionProposal[] tempProps=null;
      if (currProc instanceof IContentAssistProcessor) {
        IContentAssistProcessor currProcessor=(IContentAssistProcessor)currProc;
        tempProps=currProcessor.computeCompletionProposals(viewer,offset);
      }
 else       if (currProc instanceof IAssistContributor) {
        IAssistContributor currContrib=(IAssistContributor)currProc;
        tempProps=currContrib.getTagProposals(state);
      }
      if (tempProps != null && tempProps.length > 0) {
        proposals.addAll(arrayToCollection(tempProps));
      }
 else {
      }
    }
    return (ICompletionProposal[])proposals.toArray(new ICompletionProposal[proposals.size()]);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,int offset){
  ArrayList proposals=new ArrayList();
  ArrayList proposers=new ArrayList();
  try {
    if (viewer.getDocument() instanceof ICFEFileDocument) {
      try {
        proposers=((ICFEFileDocument)viewer.getDocument()).getContentAssistManager().getRootAssistors();
      }
 catch (      Exception e) {
      }
    }
    DefaultAssistState state=AssistUtils.initialiseDefaultAssistState(viewer,offset);
    Iterator proposerIter=proposers.iterator();
    while (proposerIter.hasNext()) {
      Object currProc=proposerIter.next();
      Assert.isNotNull(currProc,"String_Node_Str");
      ICompletionProposal[] tempProps=null;
      if (currProc instanceof IContentAssistProcessor) {
        IContentAssistProcessor currProcessor=(IContentAssistProcessor)currProc;
        tempProps=currProcessor.computeCompletionProposals(viewer,offset);
      }
 else       if (currProc instanceof IAssistContributor) {
        IAssistContributor currContrib=(IAssistContributor)currProc;
        tempProps=currContrib.getTagProposals(state);
      }
      if (tempProps != null && tempProps.length > 0) {
        proposals.addAll(arrayToCollection(tempProps));
      }
 else {
      }
    }
    return (ICompletionProposal[])proposals.toArray(new ICompletionProposal[proposals.size()]);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 17499
Project: 17499
Buggy source:
public IContextInformation[] computeContextInformation(ITextViewer viewer,int offset){
  ArrayList proposals=new ArrayList();
  ArrayList proposers=new ArrayList();
  if (viewer.getDocument() instanceof ICFEFileDocument) {
    proposers=((ICFEFileDocument)viewer.getDocument()).getContentAssistManager().getRootAssistors();
  }
  DefaultAssistState state=AssistUtils.initialiseDefaultAssistState(viewer,offset);
  Iterator proposerIter=proposers.iterator();
  while (proposerIter.hasNext()) {
    Object currProc=proposerIter.next();
    Assert.isNotNull(currProc);
    IContextInformation[] tempProps=null;
    if (currProc instanceof IContentAssistProcessor) {
      IContentAssistProcessor currProcessor=(IContentAssistProcessor)currProc;
      tempProps=currProcessor.computeContextInformation(viewer,offset);
    }
    if (tempProps != null && tempProps.length > 0) {
      proposals.addAll(arrayToCollection(tempProps));
    }
 else {
    }
  }
  return (IContextInformation[])proposals.toArray(new IContextInformation[proposals.size()]);
}

Fixed version (ground truth):
public IContextInformation[] computeContextInformation(ITextViewer viewer,int offset){
  ArrayList proposals=new ArrayList();
  ArrayList proposers=new ArrayList();
  if (viewer.getDocument() instanceof ICFEFileDocument) {
    proposers=((ICFEFileDocument)viewer.getDocument()).getContentAssistManager().getRootAssistors();
  }
  DefaultAssistState state=AssistUtils.initialiseDefaultAssistState(viewer,offset);
  Iterator proposerIter=proposers.iterator();
  while (proposerIter.hasNext()) {
    Object currProc=proposerIter.next();
    Assert.isNotNull(currProc,"String_Node_Str");
    IContextInformation[] tempProps=null;
    if (currProc instanceof IContentAssistProcessor) {
      IContentAssistProcessor currProcessor=(IContentAssistProcessor)currProc;
      tempProps=currProcessor.computeContextInformation(viewer,offset);
    }
    if (tempProps != null && tempProps.length > 0) {
      proposals.addAll(arrayToCollection(tempProps));
    }
 else {
    }
  }
  return (IContextInformation[])proposals.toArray(new IContextInformation[proposals.size()]);
}
Program: 17500
Project: 17500
Buggy source:
/** 
 * Determines whether the assist will trigger or not.
 * @param state The current state of content assist
 * @return True - trigger, false - don't trigger
 */
private boolean trigger(IAssistTagAttributeState state){
  Assert.isNotNull(state);
  if (state.getTagName().compareToIgnoreCase("String_Node_Str") != 0)   return false;
  if (state.getAttribute().compareToIgnoreCase("String_Node_Str") != 0)   return false;
  return true;
}

Fixed version (ground truth):
/** 
 * Determines whether the assist will trigger or not.
 * @param state The current state of content assist
 * @return True - trigger, false - don't trigger
 */
private boolean trigger(IAssistTagAttributeState state){
  Assert.isNotNull(state,"String_Node_Str");
  if (state.getTagName().compareToIgnoreCase("String_Node_Str") != 0)   return false;
  if (state.getAttribute().compareToIgnoreCase("String_Node_Str") != 0)   return false;
  return true;
}
Program: 17501
Project: 17501
Buggy source:
/** 
 * Converts a set that contains Value objects into a Value array. Copys every element from the set to the array.
 * @param sourceSet The source set of Value's. Will throw an assertion error if there is something other than a Value in this
 * @return The array of Value's
 */
private Value[] valueArrayFromSet(Set sourceSet){
  Assert.isNotNull(sourceSet,"String_Node_Str");
  Value retArray[]=new Value[sourceSet.size()];
  Iterator sourceIter=sourceSet.iterator();
  for (int i=0; sourceIter.hasNext(); i++) {
    Object tempObj=sourceIter.next();
    Assert.isTrue(tempObj instanceof Value);
    retArray[i]=(Value)tempObj;
  }
  return retArray;
}

Fixed version (ground truth):
/** 
 * Converts a set that contains Value objects into a Value array. Copys every element from the set to the array.
 * @param sourceSet The source set of Value's. Will throw an assertion error if there is something other than a Value in this
 * @return The array of Value's
 */
private Value[] valueArrayFromSet(Set sourceSet){
  Assert.isNotNull(sourceSet,"String_Node_Str");
  Value retArray[]=new Value[sourceSet.size()];
  Iterator sourceIter=sourceSet.iterator();
  for (int i=0; sourceIter.hasNext(); i++) {
    Object tempObj=sourceIter.next();
    Assert.isTrue(tempObj instanceof Value,"String_Node_Str");
    retArray[i]=(Value)tempObj;
  }
  return retArray;
}
Program: 17502
Project: 17502
Buggy source:
/** 
 */
public CFMLFunctionAssist(){
  this.sourceDict=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Assert.isNotNull(this.sourceDict);
}

Fixed version (ground truth):
/** 
 */
public CFMLFunctionAssist(){
  this.sourceDict=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Assert.isNotNull(this.sourceDict,"String_Node_Str");
}
Program: 17503
Project: 17503
Buggy source:
/** 
 */
public CFMLScopeAssist(){
  this.sourceDict=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Assert.isNotNull(this.sourceDict);
}

Fixed version (ground truth):
/** 
 */
public CFMLScopeAssist(){
  this.sourceDict=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Assert.isNotNull(this.sourceDict,"String_Node_Str");
}
Program: 17504
Project: 17504
Buggy source:
public ICompletionProposal[] getTagProposals(IAssistState state){
  Assert.isNotNull(state);
  if (state.getDataSoFar().length() > 0 && !state.getDataSoFar().toLowerCase().trim().startsWith("String_Node_Str"))   return new ICompletionProposal[0];
  return super.getTagProposals(state);
}

Fixed version (ground truth):
public ICompletionProposal[] getTagProposals(IAssistState state){
  Assert.isNotNull(state,"String_Node_Str");
  if (state.getDataSoFar().length() > 0 && !state.getDataSoFar().toLowerCase().trim().startsWith("String_Node_Str"))   return new ICompletionProposal[0];
  return super.getTagProposals(state);
}
Program: 17505
Project: 17505
Buggy source:
/** 
 * Sets the attribute for the state that this represents.
 * @param attributeText The name of the attribute
 */
public void setAttribute(String attributeText){
  Assert.isNotNull(attributeText);
  this.attribute=attributeText;
}

Fixed version (ground truth):
/** 
 * Sets the attribute for the state that this represents.
 * @param attributeText The name of the attribute
 */
public void setAttribute(String attributeText){
  Assert.isNotNull(attributeText,"String_Node_Str");
  this.attribute=attributeText;
}
Program: 17506
Project: 17506
Buggy source:
public String getAttribute(){
  Assert.isNotNull(this.attribute);
  return this.attribute;
}

Fixed version (ground truth):
public String getAttribute(){
  Assert.isNotNull(this.attribute,"String_Node_Str");
  return this.attribute;
}
Program: 17507
Project: 17507
Buggy source:
/** 
 * Sets the attribute value so far.
 * @param valueSoFar
 */
public void setValueSoFar(String valueSoFar){
  Assert.isNotNull(valueSoFar);
  this.valueSoFar=valueSoFar;
}

Fixed version (ground truth):
/** 
 * Sets the attribute value so far.
 * @param valueSoFar
 */
public void setValueSoFar(String valueSoFar){
  Assert.isNotNull(valueSoFar,"String_Node_Str");
  this.valueSoFar=valueSoFar;
}
Program: 17508
Project: 17508
Buggy source:
public String getValueSoFar(){
  Assert.isNotNull(this.valueSoFar);
  return this.valueSoFar;
}

Fixed version (ground truth):
public String getValueSoFar(){
  Assert.isNotNull(this.valueSoFar,"String_Node_Str");
  return this.valueSoFar;
}
Program: 17509
Project: 17509
Buggy source:
public ITextViewer getITextView(){
  Assert.isNotNull(this.textViewer);
  return this.textViewer;
}

Fixed version (ground truth):
public ITextViewer getITextView(){
  Assert.isNotNull(this.textViewer,"String_Node_Str");
  return this.textViewer;
}
Program: 17510
Project: 17510
Buggy source:
public String getDataSoFar(){
  Assert.isNotNull(this.dataSoFar);
  return this.dataSoFar;
}

Fixed version (ground truth):
public String getDataSoFar(){
  Assert.isNotNull(this.dataSoFar,"String_Node_Str");
  return this.dataSoFar;
}
Program: 17511
Project: 17511
Buggy source:
public void setDataSoFar(String dataSoFar){
  Assert.isNotNull(dataSoFar);
  this.dataSoFar=dataSoFar;
}

Fixed version (ground truth):
public void setDataSoFar(String dataSoFar){
  Assert.isNotNull(dataSoFar,"String_Node_Str");
  this.dataSoFar=dataSoFar;
}
Program: 17512
Project: 17512
Buggy source:
public void setTextViewer(ITextViewer newViewer){
  Assert.isNotNull(newViewer);
  this.textViewer=newViewer;
}

Fixed version (ground truth):
public void setTextViewer(ITextViewer newViewer){
  Assert.isNotNull(newViewer,"String_Node_Str");
  this.textViewer=newViewer;
}
Program: 17513
Project: 17513
Buggy source:
public int getOffset(){
  Assert.isTrue(this.offset >= 0);
  return this.offset;
}

Fixed version (ground truth):
public int getOffset(){
  Assert.isTrue(this.offset >= 0,"String_Node_Str");
  return this.offset;
}
Program: 17514
Project: 17514
Buggy source:
public void setPrevDelim(int prevDelim){
  Assert.isTrue(prevDelim >= 0);
  this.prevDelim=prevDelim;
}

Fixed version (ground truth):
public void setPrevDelim(int prevDelim){
  Assert.isTrue(prevDelim >= 0,"String_Node_Str");
  this.prevDelim=prevDelim;
}
Program: 17515
Project: 17515
Buggy source:
public void setDoc(IDocument doc){
  Assert.isNotNull(doc);
  this.doc=doc;
}

Fixed version (ground truth):
public void setDoc(IDocument doc){
  Assert.isNotNull(doc,"String_Node_Str");
  this.doc=doc;
}
Program: 17516
Project: 17516
Buggy source:
public void setOffset(int offset){
  Assert.isTrue(offset >= 0);
  this.offset=offset;
}

Fixed version (ground truth):
public void setOffset(int offset){
  Assert.isTrue(offset >= 0,"String_Node_Str");
  this.offset=offset;
}
Program: 17517
Project: 17517
Buggy source:
public IDocument getIDocument(){
  Assert.isNotNull(this.doc);
  return this.doc;
}

Fixed version (ground truth):
public IDocument getIDocument(){
  Assert.isNotNull(this.doc,"String_Node_Str");
  return this.doc;
}
Program: 17518
Project: 17518
Buggy source:
public int getPreviousDelimiterPosition(){
  Assert.isTrue(this.prevDelim >= 0);
  return this.prevDelim;
}

Fixed version (ground truth):
public int getPreviousDelimiterPosition(){
  Assert.isTrue(this.prevDelim >= 0,"String_Node_Str");
  return this.prevDelim;
}
Program: 17519
Project: 17519
Buggy source:
public String getAttributeText(){
  Assert.isNotNull(this.attrText);
  return this.attrText;
}

Fixed version (ground truth):
public String getAttributeText(){
  Assert.isNotNull(this.attrText,"String_Node_Str");
  return this.attrText;
}
Program: 17520
Project: 17520
Buggy source:
/** 
 * Sets the tag name for the assist
 * @param tag The tagname 
 */
public void setTagName(String tag){
  Assert.isNotNull(tag);
  this.tagName=tag;
}

Fixed version (ground truth):
/** 
 * Sets the tag name for the assist
 * @param tag The tagname 
 */
public void setTagName(String tag){
  Assert.isNotNull(tag,"String_Node_Str");
  this.tagName=tag;
}
Program: 17521
Project: 17521
Buggy source:
/** 
 * Sets the attribute text for the assist.
 * @param attrText The attribute text
 */
public void setAttrText(String attrText){
  Assert.isNotNull(attrText);
  this.attrText=attrText;
}

Fixed version (ground truth):
/** 
 * Sets the attribute text for the assist.
 * @param attrText The attribute text
 */
public void setAttrText(String attrText){
  Assert.isNotNull(attrText,"String_Node_Str");
  this.attrText=attrText;
}
Program: 17522
Project: 17522
Buggy source:
public String getTagName(){
  Assert.isNotNull(this.tagName);
  return this.tagName;
}

Fixed version (ground truth):
public String getTagName(){
  Assert.isNotNull(this.tagName,"String_Node_Str");
  return this.tagName;
}
Program: 17523
Project: 17523
Buggy source:
/** 
 * Creates this assist state based upon another.
 * @param baseState The base IAssistState object to base this instance upon.
 */
public DefaultAssistTagState(IAssistState baseState){
  super();
  Assert.isNotNull(baseState);
  this.setDataSoFar(baseState.getDataSoFar());
  this.setDoc(baseState.getIDocument());
  this.setOffset(baseState.getOffset());
  this.setOffsetPartition(baseState.getOffsetPartition());
  this.setPrevDelim(baseState.getPreviousDelimiterPosition());
  this.setTriggerChar(baseState.getTriggerData());
}

Fixed version (ground truth):
/** 
 * Creates this assist state based upon another.
 * @param baseState The base IAssistState object to base this instance upon.
 */
public DefaultAssistTagState(IAssistState baseState){
  super();
  Assert.isNotNull(baseState,"String_Node_Str");
  this.setDataSoFar(baseState.getDataSoFar());
  this.setDoc(baseState.getIDocument());
  this.setOffset(baseState.getOffset());
  this.setOffsetPartition(baseState.getOffsetPartition());
  this.setPrevDelim(baseState.getPreviousDelimiterPosition());
  this.setTriggerChar(baseState.getTriggerData());
}
Program: 17524
Project: 17524
Buggy source:
protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    try {
      connectionProperties.setHost(host.getText());
      connectionProperties.setPath(path.getText());
      connectionProperties.setUsername(username.getText());
      connectionProperties.setPassword(password.getText());
      connectionProperties.setConnectionid(connectionid.getText());
      connectionProperties.setPort(Integer.parseInt(port.getText()));
      connectionProperties.save();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (buttonId == DELETE_ID) {
    MessageBox confirm=new MessageBox(Display.getCurrent().getActiveShell(),SWT.ICON_QUESTION | SWT.YES | SWT.NO);
    confirm.setMessage("String_Node_Str");
    if (confirm.open() == SWT.OK) {
      FtpConnectionProperties.deleteConnection(connectionProperties.getConnectionid());
      connectionTable.setInput(new Object());
    }
  }
  super.buttonPressed(buttonId);
}

Fixed version (ground truth):
protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    try {
      connectionProperties.setHost(host.getText());
      connectionProperties.setPath(path.getText());
      connectionProperties.setUsername(username.getText());
      connectionProperties.setPassword(password.getText());
      connectionProperties.setConnectionid(connectionid.getText());
      connectionProperties.setPort(Integer.parseInt(port.getText()));
      connectionProperties.save();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (buttonId == DELETE_ID) {
    MessageBox confirm=new MessageBox(Display.getCurrent().getActiveShell(),SWT.ICON_QUESTION | SWT.YES | SWT.NO);
    confirm.setMessage("String_Node_Str");
    if (confirm.open() == SWT.YES) {
      System.out.println("String_Node_Str" + connectionProperties.getConnectionid());
      FtpConnectionProperties.deleteConnection(connectionProperties.getConnectionid());
      connectionTable.setInput(new Object());
    }
  }
  super.buttonPressed(buttonId);
}
Program: 17525
Project: 17525
Buggy source:
public void connect(){
  if (isConnected()) {
    return;
  }
  try {
    ftpClient=new FTPClient(connectionProperties.getHost(),-1,fConnectionTimeout);
    listener=new LogListener();
    ftpClient.setMessageListener(listener);
    ftpClient.login(connectionProperties.getUsername(),connectionProperties.getPassword());
    ftpClient.setConnectMode(FTPConnectMode.PASV);
    ftpClient.setType(FTPTransferType.ASCII);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void connect(){
  if (isConnected()) {
    return;
  }
  try {
    ftpClient=new FTPClient(connectionProperties.getHost(),connectionProperties.getPort(),fConnectionTimeout);
    listener=new LogListener();
    ftpClient.setMessageListener(listener);
    ftpClient.login(connectionProperties.getUsername(),connectionProperties.getPassword());
    ftpClient.setConnectMode(FTPConnectMode.PASV);
    ftpClient.setType(FTPTransferType.ASCII);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 17526
Project: 17526
Buggy source:
public static void removeListener(FTPMessageListener listener){
  listeners.remove(listener);
}

Fixed version (ground truth):
public void removeListener(FTPMessageListener listener){
  listeners.remove(listener);
}
Program: 17527
Project: 17527
Buggy source:
public static void addListener(FTPMessageListener listener){
  if (!listeners.contains(listener)) {
    listeners.add(listener);
  }
}

Fixed version (ground truth):
public void addListener(FTPMessageListener listener){
  if (!listeners.contains(listener)) {
    listeners.add(listener);
  }
}
Program: 17529
Project: 17529
Buggy source:
protected void validateInput(){
  String errorMessage=null;
  String test=connectionid.getText();
  if (!test.matches("String_Node_Str")) {
    errorMessage="String_Node_Str";
  }
 else   if (!host.getText().matches("String_Node_Str")) {
    errorMessage="String_Node_Str";
  }
  errorMessageLabel.setText(errorMessage == null ? "String_Node_Str" : errorMessage);
  okButton.setEnabled(errorMessage == null);
  errorMessageLabel.getParent().update();
}

Fixed version (ground truth):
protected void validateInput(){
  String errorMessage=null;
  String test=connectionid.getText();
  if (!test.matches("String_Node_Str")) {
    errorMessage="String_Node_Str";
  }
 else   if (!host.getText().matches("String_Node_Str")) {
    errorMessage="String_Node_Str";
  }
 else   if (!port.getText().matches("String_Node_Str")) {
    errorMessage="String_Node_Str";
  }
  errorMessageLabel.setText(errorMessage == null ? "String_Node_Str" : errorMessage);
  okButton.setEnabled(errorMessage == null);
  errorMessageLabel.getParent().update();
}
Program: 17531
Project: 17531
Buggy source:
protected Control createContents(Composite parent){
  Control contents=super.createContents(parent);
  deleteButton=createButton((Composite)buttonBar,DELETE_ID,"String_Node_Str",false);
  deleteButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      buttonPressed(((Integer)event.widget.getData()).intValue());
    }
  }
);
  okButton=getButton(IDialogConstants.OK_ID);
  okButton.setText("String_Node_Str");
  return contents;
}

Fixed version (ground truth):
protected Control createContents(Composite parent){
  Control contents=super.createContents(parent);
  deleteButton=createButton((Composite)buttonBar,DELETE_ID,"String_Node_Str",false);
  deleteButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      buttonPressed(((Integer)event.widget.getData()).intValue());
    }
  }
);
  okButton=getButton(IDialogConstants.OK_ID);
  okButton.setText("String_Node_Str");
  redraw();
  return contents;
}
Program: 17532
Project: 17532
Buggy source:
protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    try {
      connectionProperties.setHost(host.getText());
      connectionProperties.setPath(path.getText());
      connectionProperties.setUsername(username.getText());
      connectionProperties.setPassword(password.getText());
      connectionProperties.setConnectionid(connectionid.getText());
      connectionProperties.save();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (buttonId == DELETE_ID) {
    FtpConnectionProperties.deleteConnection(connectionProperties.getConnectionid());
    connectionTable.setInput(new Object());
  }
  super.buttonPressed(buttonId);
}

Fixed version (ground truth):
protected void buttonPressed(int buttonId){
  if (buttonId == IDialogConstants.OK_ID) {
    try {
      connectionProperties.setHost(host.getText());
      connectionProperties.setPath(path.getText());
      connectionProperties.setUsername(username.getText());
      connectionProperties.setPassword(password.getText());
      connectionProperties.setConnectionid(connectionid.getText());
      connectionProperties.setPort(Integer.parseInt(port.getText()));
      connectionProperties.save();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (buttonId == DELETE_ID) {
    FtpConnectionProperties.deleteConnection(connectionProperties.getConnectionid());
    connectionTable.setInput(new Object());
  }
  super.buttonPressed(buttonId);
}
Program: 17533
Project: 17533
Buggy source:
public void dispose(){
  LogListener.removeListener(this);
}

Fixed version (ground truth):
public void dispose(){
  ftpClient.removeLogListener(this);
}
Program: 17534
Project: 17534
Buggy source:
public void createPartControl(Composite parent){
  ftpClient=FtpConnection.getInstance();
  LogListener.addListener(this);
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  styledText=new StyledText(container,SWT.BORDER | SWT.MULTI | SWT.H_SCROLL| SWT.V_SCROLL);
  styledText.setLayout(new FillLayout());
  styledText.setEditable(false);
  String log=ftpClient.getLog();
  if (log == null) {
    log="String_Node_Str";
  }
  styledText.setText(log);
  styledText.setTopIndex(styledText.getLineCount());
  createActions();
  initializeToolBar();
  initializeMenu();
}

Fixed version (ground truth):
public void createPartControl(Composite parent){
  ftpClient=FtpConnection.getInstance();
  ftpClient.addLogListener(this);
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout());
  styledText=new StyledText(container,SWT.BORDER | SWT.MULTI | SWT.H_SCROLL| SWT.V_SCROLL);
  styledText.setLayout(new FillLayout());
  styledText.setEditable(false);
  String log=ftpClient.getLog();
  if (log == null) {
    log="String_Node_Str";
  }
  styledText.setText(log);
  styledText.setTopIndex(styledText.getLineCount());
  createActions();
  initializeToolBar();
  initializeMenu();
}
Program: 17535
Project: 17535
Buggy source:
public void dispose(){
  comboViewer.getContentProvider().dispose();
  directoryTreeViewer.getContentProvider().dispose();
  fileViewer.getContentProvider().dispose();
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (comboViewer.getContentProvider() != null) {
    comboViewer.getContentProvider().dispose();
  }
  if (directoryTreeViewer.getContentProvider() != null) {
    directoryTreeViewer.getContentProvider().dispose();
  }
  if (fileViewer.getContentProvider() != null) {
    fileViewer.getContentProvider().dispose();
  }
  super.dispose();
}
Program: 17538
Project: 17538
Buggy source:
public Object[] getChildren(Object parentElement){
  if (fileProvider == null) {
    return new Object[]{IFileProvider.INVALID_FILESYSTEM};
  }
  if (parentElement instanceof LocalFileSystem) {
    return fileProvider.getRoots();
  }
 else {
    try {
      File parent;
      if (parentElement instanceof File) {
        parent=(File)parentElement;
      }
 else {
        parent=new File(parentElement.toString());
      }
      return fileProvider.getChildren(parent,directoryFilter);
    }
 catch (    Exception e) {
      return new Object[]{"String_Node_Str"};
    }
  }
}

Fixed version (ground truth):
public Object[] getChildren(Object parentElement){
  try {
    if (fileProvider == null) {
      return new Object[]{IFileProvider.INVALID_FILESYSTEM};
    }
    if (parentElement instanceof LocalFileSystem) {
      return fileProvider.getRoots();
    }
 else {
      File parent;
      if (parentElement instanceof File) {
        parent=(File)parentElement;
      }
 else {
        parent=new File(parentElement.toString());
      }
      return fileProvider.getChildren(parent,directoryFilter);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    return new Object[]{"String_Node_Str" + e.getMessage()};
  }
}
Program: 17539
Project: 17539
Buggy source:
public String getText(Object element){
  String[] fullpath=element.toString().split("String_Node_Str");
  return fullpath[fullpath.length - 1];
}

Fixed version (ground truth):
public String getText(Object element){
  if (element.toString().length() == 1) {
    return element.toString();
  }
 else {
    String[] fullpath=element.toString().split("String_Node_Str");
    return fullpath[fullpath.length - 1];
  }
}
Program: 17540
Project: 17540
Buggy source:
public Object[] getElements(Object inputElement){
  if (fileProvider == null) {
    return new Object[]{IFileProvider.INVALID_FILESYSTEM};
  }
  if (inputElement != null) {
    String directoryName=inputElement.toString();
    if (directoryName.indexOf("String_Node_Str") == 0) {
      directoryName=directoryName.substring(1,directoryName.length() - 1);
    }
    File parent=new File(directoryName);
    return fileProvider.getChildren(parent,fileFilter);
  }
 else {
    contents=new File[]{};
  }
  return contents;
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  try {
    if (fileProvider == null) {
      return new Object[]{IFileProvider.INVALID_FILESYSTEM};
    }
    if (inputElement != null) {
      String directoryName=inputElement.toString();
      if (directoryName.indexOf("String_Node_Str") == 0) {
        directoryName=directoryName.substring(1,directoryName.length() - 1);
      }
      File parent=new File(directoryName);
      return fileProvider.getChildren(parent,fileFilter);
    }
 else {
      contents=new File[]{};
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    return new Object[]{"String_Node_Str" + e.getMessage()};
  }
  return contents;
}
Program: 17541
Project: 17541
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
  if (newInput instanceof IFileProvider) {
    fileProvider=(IFileProvider)newInput;
  }
 else {
    fileProvider=null;
  }
}

Fixed version (ground truth):
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
  if (newInput instanceof IFileProvider) {
    fileProvider=(IFileProvider)newInput;
  }
}
Program: 17544
Project: 17544
Buggy source:
public String getAccess(){
  try {
    return functionTag.getAttributeValue("String_Node_Str");
  }
 catch (  Exception e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getAccess(){
  try {
    if (functionTag.getAttributeValue("String_Node_Str") != null) {
      return functionTag.getAttributeValue("String_Node_Str");
    }
  }
 catch (  Exception e) {
  }
  return "String_Node_Str";
}
Program: 17546
Project: 17546
Buggy source:
public Image getImage(Object obj){
  try {
    CFCMethodViewItem item=(CFCMethodViewItem)obj;
    if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_REMOTE);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PUBLIC);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PACKAGE);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PRIVATE);
    }
    return null;
  }
 catch (  Exception e) {
    return CFPluginImages.get(CFPluginImages.ICON_METHOD_PUBLIC);
  }
}

Fixed version (ground truth):
public Image getImage(Object obj){
  try {
    CFCMethodViewItem item=(CFCMethodViewItem)obj;
    if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_REMOTE);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PUBLIC);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PACKAGE);
    }
 else     if (item.getAccess().toLowerCase().equals("String_Node_Str")) {
      return CFPluginImages.get(CFPluginImages.ICON_METHOD_PRIVATE);
    }
    return CFPluginImages.get(CFPluginImages.ICON_ALERT);
  }
 catch (  Exception e) {
    return CFPluginImages.get(CFPluginImages.ICON_METHOD_PUBLIC);
  }
}