@Override
	public List<Method> findMethodsCalled(String methodName, InputStream data) {
		ArrayList<Method> listMethods = new ArrayList<>();

		XMLInputFactory xmlif = XMLInputFactory.newInstance();
		try {
			XMLStreamReader xmlsr = xmlif.createXMLStreamReader(data);

			SAXBuilder builder = new SAXBuilder();
			int eventType;
			while (xmlsr.hasNext()) {
				eventType = xmlsr.next();

				if (eventType != XMLEvent.START_ELEMENT
						|| !xmlsr.getLocalName().matches("^function[_A-Za-z]*")) {
					continue;
				}

				// some method found

				// Build a DOM string
				String builderDOMStructure = Util
						.builDOMMethodStructureString(xmlsr);
				// log.trace(builderDOMStructure);

				// Build DOM Structure from string
				InputStream inputStreamDOM = new ByteArrayInputStream(
						builderDOMStructure.getBytes());

				try {
					Document document = (Document) builder
							.build(inputStreamDOM);
					Element rootNode = document.getRootElement();

					// this is the right method ?
					String name = rootNode.getChildText("name");
					if (!name.equals(methodName)) {
						builderDOMStructure = null;
						continue;
					}

					// method found
					// log.debug(name);
					listMethods.add(Util.buildMethodFromDOM(rootNode));

				} catch (IOException e) {
					throw new RuntimeException(e);
				} catch (JDOMException e) {
					throw new RuntimeException(e);
				}
			}
		} catch (XMLStreamException e) {
			throw new RuntimeException(e);
		}

		return listMethods;
	}