File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/OldSaveService.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/OldSaveService.java | |||
Method name: TestElement createTestElement(Configuration)
|
Method name: Map createMap(Configuration, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (children[i].getName().equals("testelement")) { // $NON-NLS-1$↵ | 1 | if (items[i].getName().equals("testelement")) { // $NON-NLS-1$ ↵ | |
2 | element.setProperty(new TestElementProperty(children[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | 2 | map.put(items[i].getAttribute("name", ""), new TestElementProperty(items[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | |
3 | createTestElement(children[i])));↵ | 3 | createTestElement(items[i])));↵ | |
4 | } else if (children[i].getName().equals("collection")) { // $NON-NLS-1$↵ | 4 | } else if (items[i].getName().equals("collection")) { // $NON-NLS-1$ ↵ | |
5 | element.setProperty(↵ | 5 | map.put(items[i].getAttribute("name"), // $NON-NLS-1$ ↵ | |
6 | new CollectionProperty(children[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | 6 | new CollectionProperty(items[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | |
7 | createCollection(children[i], newClass)));↵ | 7 | createCollection(items[i], testClass)));↵ | |
8 | } else if (children[i].getName().equals("map")) { // $NON-NLS-1$↵ | 8 | } else if (items[i].getName().equals("map")) { // $NON-NLS-1$ ↵ | |
9 | element.setProperty(↵ | 9 | map.put(items[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | |
10 | new MapProperty(children[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | 10 | new MapProperty(items[i].getAttribute("name", ""), // $NON-NLS-1$ // $NON-NLS-2$↵ | |
11 | createMap(children[i],newClass)));↵ | 11 | createMap(items[i], testClass)));↵ | |
12 | } | 12 |
| |
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) | 1.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 28 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 4.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | else if (children[i].getName().equals("testelement")) |
| 8 | else if (items[i].getName().equals("testelement")) | ||||||||||
| 9 | map.put(items[i].getAttribute("name", ""), new TestElementProperty(items[i].getAttribute("name", ""), createTestElement(items[i]))); | ||||||||||||
18 | element.setProperty(new TestElementProperty(children[i].getAttribute("name", ""), createTestElement(children[i]))); | | ||||||||||||
19 | else if (children[i].getName().equals("collection")) |
| 10 | else if (items[i].getName().equals("collection")) | ||||||||||
| 11 | map.put(items[i].getAttribute("name"), new CollectionProperty(items[i].getAttribute("name", ""), createCollection(items[i], testClass))); | ||||||||||||
20 | element.setProperty(new CollectionProperty(children[i].getAttribute("name", ""), createCollection(children[i], newClass))); | | ||||||||||||
21 | else if (children[i].getName().equals("map")) |
| 12 | else if (items[i].getName().equals("map")) | ||||||||||
| 13 | map.put(items[i].getAttribute("name", ""), new MapProperty(items[i].getAttribute("name", ""), createMap(items[i], testClass))); | ||||||||||||
22 | element.setProperty(new MapProperty(children[i].getAttribute("name", ""), createMap(children[i], newClass))); | |
Row | Violation |
---|