HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(hrefStr, new URL(result.getURL(), base));
newUrl.setMethod(HTTPConstants.GET);
if (log.isDebugEnabled()) {
log.debug("Potential <a href> match: " + newUrl);
}
if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {
log.debug("Matched!");
potentialLinks.add(newUrl);
}
HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(
hrefStr, new URL(result.getURL(), base));
newUrl.setMethod(HTTPConstants.GET);
if (log.isDebugEnabled()) {
log.debug("Potential <frame src> match: " + newUrl);
}
if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {
log.debug("Matched!");
potentialLinks.add(newUrl);
}
Clone fragments detected by clone detection tool
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: 7
|
|
Number of AST nodes: 7
|
|
1 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(↵ | | 1 | HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor(↵
|
2 | hrefStr, new URL(result.getURL(), base));↵ | | 2 | hrefStr, new URL(result.getURL(), base));↵
|
3 | newUrl.setMethod(HTTPConstants.GET);↵ | | 3 | newUrl.setMethod(HTTPConstants.GET);↵
|
4 | if (log.isDebugEnabled()) {↵ | | 4 | if (log.isDebugEnabled()) {↵
|
5 | log.debug("Potential <a href> match: " + newUrl);↵ | | 5 | log.debug("Potential <frame src> match: " + newUrl);↵
|
6 | }↵ | | |
|
7 | ↵ | | 6 | }↵
|
8 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵ | | 7 | if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {↵
|
9 | log.debug("Matched!");↵ | | 8 | log.debug("Matched!");↵
|
10 | potentialLinks.add(newUrl);↵ | | 9 | potentialLinks.add(newUrl);↵
|
11 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
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 | | | 19 | |
22 | potentialLinks.add(newUrl); | | 20 | potentialLinks.add(newUrl); |
Precondition Violations (0)
Row |
Violation |