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
               }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are declared in the same class
Number of node comparisons21
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.7
    Clone typeType 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);
    19
    log.debug("Potential <a href> match: " + newUrl);
    17
    log.debug("Potential <frame src> match: " + newUrl);
    Differences
    Expression1Expression2Difference
    "Potential match: ""Potential match: "LITERAL_VALUE_MISMATCH
    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);
    Precondition Violations (0)
    Row Violation