try { 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); } } catch (MalformedURLException e) { log.warn("Bad URL "+e);
try { 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); } } catch (MalformedURLException e) { log.warn("Bad URL "+e);
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
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
           
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0