Source:
<code>public IFunctionSummary[] getMatchingFunctions(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String prefix) { ArrayList<IFunctionSummary> fList = new ArrayList<>(); ITranslationUnit t = context.getTranslationUnit(); boolean qualifiedCPP = false; if (t.isCXXLanguage()) { try { if (context instanceof IContentAssistHelpInvocationContext) { IASTCompletionNode node = ((IContentAssistHelpInvocationContext)context).getCompletionNode(); IASTName[] names = node.getNames(); for (IASTName name : names) { if (name.isQualified()) { <START> qualifiedCPP = true; <END> } } } } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } if (!qualifiedCPP) { for (int di = 0; di < helpBooks.length; ++di) { LibHoverLibrary l = libraries.get(helpBooks[di]); LibHoverInfo cppInfo = l.getHoverInfo(); SortedMap<String, FunctionInfo> map = cppInfo.functions.tailMap(prefix); Set<Map.Entry<String, FunctionInfo>> c = map.entrySet(); for (Iterator<Entry<String, FunctionInfo>> i = c.iterator(); i.hasNext();) { Map.Entry<String, FunctionInfo> e = i.next(); FunctionInfo x = e.getValue(); String name = x.getName(); if (name.startsWith(prefix) && !name.startsWith("0")) { FunctionSummary f = new FunctionSummary(); f.ReturnType = x.getReturnType(); f.Prototype = x.getPrototype(); f.Summary = x.getDescription(); f.Name = x.getName(); ArrayList<String> headers = x.getHeaders(); for (int i1 = 0; i1 < headers.size(); ++i1) f.setIncludeName(headers.get(i1)); fList.add(f); } } } } IFunctionSummary[] summaries = new IFunctionSummary[fList.size()]; for (int k = 0; k < summaries.length; k++) { summaries[k] = fList.get(k); } return summaries; }</code><technical_language>Insert break avoid running loop more necessary</technical_language>

Target:
public IFunctionSummary[] getMatchingFunctions(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String prefix) { ArrayList<IFunctionSummary> fList = new ArrayList<>(); ITranslationUnit t = context.getTranslationUnit(); boolean qualifiedCPP = false; if (t.isCXXLanguage()) { try { if (context instanceof IContentAssistHelpInvocationContext) { IASTCompletionNode node = ((IContentAssistHelpInvocationContext)context).getCompletionNode(); IASTName[] names = node.getNames(); for (IASTName name : names) { if (name.isQualified()) { qualifiedCPP = true; break; } } } } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } if (!qualifiedCPP) { for (int di = 0; di < helpBooks.length; ++di) { LibHoverLibrary l = libraries.get(helpBooks[di]); LibHoverInfo cppInfo = l.getHoverInfo(); SortedMap<String, FunctionInfo> map = cppInfo.functions.tailMap(prefix); Set<Map.Entry<String, FunctionInfo>> c = map.entrySet(); for (Iterator<Entry<String, FunctionInfo>> i = c.iterator(); i.hasNext();) { Map.Entry<String, FunctionInfo> e = i.next(); FunctionInfo x = e.getValue(); String name = x.getName(); if (name.startsWith(prefix) && !name.startsWith("0")) { FunctionSummary f = new FunctionSummary(); f.ReturnType = x.getReturnType(); f.Prototype = x.getPrototype(); f.Summary = x.getDescription(); f.Name = x.getName(); ArrayList<String> headers = x.getHeaders(); for (int i1 = 0; i1 < headers.size(); ++i1) f.setIncludeName(headers.get(i1)); fList.add(f); } } } } IFunctionSummary[] summaries = new IFunctionSummary[fList.size()]; for (int k = 0; k < summaries.length; k++) { summaries[k] = fList.get(k); } return summaries; }