public void setAllfreqUsedFuncCalls() { foreach (var item in frequentlyUsedFunctionCalls) { foreach (functionCallCounter t in item.functionCalls) { functionCallCounter t2 = allFrequentlyUsedFunctionCalls.Find(a => a.getLexeme() == t.getLexeme()); t2.setCount(t2.getCount() + t.getCount()); } } }
public void setAllCodeFuncCalls() { foreach (var item in codeFunctionCalls) { foreach (functionCallCounter t in item.functionCalls) { if (allCodeFunctionCalls.Select(a => a.getLexeme()).Contains(t.getLexeme())) { functionCallCounter t2 = allCodeFunctionCalls.Find(a => a.getLexeme() == t.getLexeme()); t2.setCount(t2.getCount() + t.getCount()); } else { allCodeFunctionCalls.Add(t.copy()); } } } }