File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java | |||
Method name: void addAnchorUrls(Document, HTTPSampleResult, HTTPSamplerBase, List)
|
Method name: void addFramesetUrls(Document, HTTPSampleResult, HTTPSamplerBase, List)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | try {↵ | 1 | try {↵ | |
2 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(↵ | 2 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(↵ | |
3 | hrefStr, new URL(result.getURL(), base));↵ | 3 | hrefStr, new URL(result.getURL(), base));↵ | |
4 | newUrl.setMethod(HTTPConstants.GET);↵ | 4 | newUrl.setMethod(HTTPConstants.GET);↵ | |
5 | if (log.isDebugEnabled()) {↵ | 5 | if (log.isDebugEnabled()) {↵ | |
6 | log.debug("Potential <a href> match: " + newUrl);↵ | 6 | log.debug("Potential <frame src> match: " + newUrl);↵ | |
7 | }↵ | |||
8 | ↵ | 7 | }↵ | |
9 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵ | 8 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵ | |
10 | log.debug("Matched!");↵ | 9 | log.debug("Matched!");↵ | |
11 | potentialLinks.add(newUrl);↵ | 10 | potentialLinks.add(newUrl);↵ | |
12 | }↵ | |||
13 | ↵ | 11 | }↵ | |
14 | } catch (MalformedURLException e) {↵ | 12 | } catch (MalformedURLException e) {↵ | |
15 | log.warn("Bad URL "+e);↵ | 13 | log.warn("Bad URL "+e);↵ | |
16 | } | 14 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 30 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | try | 13 | try | |||||||||||
16 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base)); | 14 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base)); | |||||||||||
17 | newUrl.setMethod(HTTPConstants.GET); | 15 | newUrl.setMethod(HTTPConstants.GET); | |||||||||||
18 | if (log.isDebugEnabled()) | 16 | if (log.isDebugEnabled()) | |||||||||||
19 | log.debug("Potential <a href> match: " + newUrl); |
| 17 | log.debug("Potential <frame src> match: " + newUrl); | ||||||||||
20 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) | 18 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) | |||||||||||
21 | log.debug("Matched!"); | 19 | log.debug("Matched!"); | |||||||||||
22 | potentialLinks.add(newUrl); | 20 | potentialLinks.add(newUrl); |
Row | Violation |
---|