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 addFormUrls(Document, HTTPSampleResult, HTTPSamplerBase, List)
|
Method name: void addAnchorUrls(Document, HTTPSampleResult, HTTPSamplerBase, List)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | while (iter.hasNext()) {↵ | |||
2 | HTTPSamplerBase newUrl = (HTTPSamplerBase) iter.next();↵ | 1 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base));↵ | |
3 | newUrl.setMethod(HTTPConstants.POST);↵ | 2 | newUrl.setMethod(HTTPConstants.GET);↵ | |
4 | if (log.isDebugEnabled()) {↵ | 3 | if (log.isDebugEnabled()) {↵ | |
5 | log.debug("Potential Form match: " + newUrl.toString());↵ | 4 | log.debug("Potential <a href> match: " + newUrl);↵ | |
6 | }↵ | 5 | }↵ | |
7 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵ | 6 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵ | |
8 | log.debug("Matched!");↵ | 7 | log.debug("Matched!");↵ | |
9 | potentialLinks.add(newUrl);↵ | 8 | potentialLinks.add(newUrl);↵ | |
10 | }↵ | 9 | ↵ | |
11 | } | 10 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | HTTPSamplerBase newUrl = (HTTPSamplerBase)iter.next(); |
| 16 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base)); | ||||||||||
8 | newUrl.setMethod(HTTPConstants.POST); |
| 17 | newUrl.setMethod(HTTPConstants.GET); | ||||||||||
9 | if (log.isDebugEnabled()) | 18 | if (log.isDebugEnabled()) | |||||||||||
10 | log.debug("Potential Form match: " + newUrl.toString()); |
| | |||||||||||
|
| 19 | log.debug("Potential <a href> match: " + newUrl); | |||||||||||
11 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) | 20 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) | |||||||||||
12 | log.debug("Matched!"); | 21 | log.debug("Matched!"); | |||||||||||
13 | potentialLinks.add(newUrl); | 22 | potentialLinks.add(newUrl); |
Row | Violation |
---|---|
1 | Unmatched statement log.debug("Potential Form match: " + newUrl.toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement log.debug("Potential <a href> match: " + newUrl); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |