File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java | |||
Method name: Iterator getEmbeddedResourceURLs(byte[], URL, URLCollection)
|
Method name: void addFormActionsAndCharSet(String, Map, String)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 9 | |||
1 | if (log.isDebugEnabled()) {↵ | 1 | if (log.isDebugEnabled()) {↵ | |
2 | log.debug("Parsing html of: " + baseUrl);↵ | 2 | log.debug("Parsing html of: " + html);↵ | |
3 | }↵ | 3 | }↵ | |
4 | ↵ | 4 | ↵ | |
5 | Parser htmlParser = null;↵ | 5 | Parser htmlParser = null;↵ | |
6 | try {↵ | 6 | try {↵ | |
7 | String contents = new String(html);↵ | 7 | ↵ | |
8 | htmlParser = new Parser();↵ | 8 | htmlParser = new Parser();↵ | |
9 | htmlParser.setInputHTML(contents);↵ | 9 | htmlParser.setInputHTML(html);↵ | |
10 | } catch (Exception e) {↵ | 10 | } catch (Exception e) {↵ | |
11 | throw new HTMLParseException(e);↵ | 11 | throw new HTMLParseException(e);↵ | |
12 | }↵ | 12 | }↵ | |
13 | // Now parse the DOM tree↵ | 13 | // Now parse the DOM tree↵ | |
14 | try {↵ | 14 | try {↵ | |
15 | // we start to iterate through the elements↵ | 15 | // we start to iterate through the elements↵ | |
16 | parseNodes(htmlParser.elements(), new URLPointer(baseUrl), urls);↵ | 16 | parseNodes(htmlParser.elements(), formEncodings, pageEncoding);↵ | |
17 | log.debug("End : parseNodes");↵ | 17 | log.debug("End : parseNodes");↵ | |
18 | } catch (ParserException e) {↵ | 18 | } catch (ParserException e) {↵ | |
19 | throw new HTMLParseException(e);↵ | 19 | throw new HTMLParseException(e);↵ | |
20 | }↵ | 20 |
| |
21 | return urls.iterator(); | |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 54 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 3.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (log.isDebugEnabled()) | 1 | if (log.isDebugEnabled()) | |||||||||||||||||||||||
2 | log.debug("Parsing html of: " + baseUrl); |
| 2 | log.debug("Parsing html of: " + html); | ||||||||||||||||||||||
3 | Parser htmlParser = null; | 3 | Parser htmlParser = null; | |||||||||||||||||||||||
4 | try | 4 | try | |||||||||||||||||||||||
5 | String contents = new String(html); | | ||||||||||||||||||||||||
6 | htmlParser = new Parser(); | 5 | htmlParser = new Parser(); | |||||||||||||||||||||||
7 | htmlParser.setInputHTML(contents); |
| 6 | htmlParser.setInputHTML(html); | ||||||||||||||||||||||
8 | try | 7 | try | |||||||||||||||||||||||
9 | parseNodes(htmlParser.elements(), new URLPointer(baseUrl), urls); |
| 9 | log.debug("End : parseNodes"); | ||||||||||||||||||||||
10 | log.debug("End : parseNodes"); |
| 8 | parseNodes(htmlParser.elements(), formEncodings, pageEncoding); | ||||||||||||||||||||||
11 | return urls.iterator(); |
| |
Row | Violation |
---|---|
1 | Type java.net.URL of variable baseUrl does not match with type java.lang.String of variable html |
2 | Expression parseNodes(htmlParser.elements(),new URLPointer(baseUrl),urls) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression parseNodes(htmlParser.elements(),new URLPointer(baseUrl),urls) is a void method call, and thus it cannot be parameterized |
4 | Expression log.debug("End : parseNodes") is a void method call, and thus it cannot be parameterized |
5 | Expression parseNodes(htmlParser.elements(),new URLPointer(baseUrl),urls) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression parseNodes(htmlParser.elements(),new URLPointer(baseUrl),urls) is a void method call, and thus it cannot be parameterized |
7 | Expression log.debug("End : parseNodes") is a void method call, and thus it cannot be parameterized |
8 | Expression parseNodes(htmlParser.elements(),formEncodings,pageEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression log.debug("End : parseNodes") is a void method call, and thus it cannot be parameterized |
10 | Expression parseNodes(htmlParser.elements(),formEncodings,pageEncoding) is a void method call, and thus it cannot be parameterized |
11 | Expression parseNodes(htmlParser.elements(),formEncodings,pageEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression log.debug("End : parseNodes") is a void method call, and thus it cannot be parameterized |
13 | Expression parseNodes(htmlParser.elements(),formEncodings,pageEncoding) is a void method call, and thus it cannot be parameterized |
14 | Unmatched return urls.iterator(); |