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: 11 | Number of AST nodes: 11 | |||
1 | String base = "";↵ | 1 | String base = "";↵ | |
2 | NodeList baseList = html.getElementsByTagName("base"); // $NON-NLS-1$↵ | 2 | NodeList baseList = html.getElementsByTagName("base"); // $NON-NLS-1$↵ | |
3 | if (baseList.getLength() > 0) {↵ | 3 | if (baseList.getLength() > 0) {↵ | |
4 | base = baseList.item(0).getAttributes().getNamedItem("href").getNodeValue(); // $NON-NLS-1$↵ | 4 | base = baseList.item(0).getAttributes().getNamedItem("href")↵ | |
5 | }↵ | |||
6 | ↵ | 5 | // $NON-NLS-1$↵ | |
6 | .getNodeValue();↵ | |||
7 | }↵ | |||
7 | NodeList nodeList = html.getElementsByTagName("a"); // $NON-NLS-1$↵ | 8 | NodeList nodeList = html.getElementsByTagName("frame"); // $NON-NLS-1$↵ | |
8 | for (int i = 0; i < nodeList.getLength(); i++) {↵ | 9 | for (int i = 0; i < nodeList.getLength(); i++) {↵ | |
9 | Node tempNode = nodeList.item(i);↵ | 10 | Node tempNode = nodeList.item(i);↵ | |
10 | NamedNodeMap nnm = tempNode.getAttributes();↵ | 11 | NamedNodeMap nnm = tempNode.getAttributes();↵ | |
11 | Node namedItem = nnm.getNamedItem("href"); // $NON-NLS-1$↵ | 12 | Node namedItem = nnm.getNamedItem("src"); // $NON-NLS-1$↵ | |
12 | if (namedItem == null) {↵ | 13 | if (namedItem == null) {↵ | |
13 | continue;↵ | |||
14 | }↵ | |||
15 | ↵ | 14 | continue;↵ | |
15 | }↵ | |||
16 | String hrefStr = namedItem.getNodeValue(); | 16 | String hrefStr = namedItem.getNodeValue(); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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) | 1.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | String base = ""; | 1 | String base = ""; | |
2 | NodeList baseList = html.getElementsByTagName("base"); | 2 | NodeList baseList = html.getElementsByTagName("base"); | |
3 | if (baseList.getLength() > 0) | 3 | if (baseList.getLength() > 0) | |
4 | base = baseList.item(0).getAttributes().getNamedItem("href").getNodeValue(); | 4 | base = baseList.item(0).getAttributes().getNamedItem("href").getNodeValue(); |
Row | Violation |
---|