methodCallByMethodNameMap = new HashMap<String, List<MethodCall>>();
JXPathContext context = JXPathContext.newContext(codeBlockElement);
List<Element> methodCallElementList =
context.selectNodes("//" + JavaSourceTokenType.METHOD_CALL.getName());
for (Element methodCallElement : methodCallElementList) {
final MethodCall methodCall = new MethodCallJdom(methodCallElement);
List<MethodCall> methodCallList = methodCallByMethodNameMap.get(methodCall.getMethodName());
if (methodCallList == null) {
methodCallList = new LinkedList<MethodCall>();
methodCallByMethodNameMap.put(methodCall.getMethodName(), methodCallList);
}
methodCallList.add(methodCall);
}
}
return methodCallByMethodNameMap;