File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/io/TextFile.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/ModuleControllerGui.java | |||
Method name: String getText()
|
Method name: void modifyTestElement(TestElement)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (line != null) {↵ | |||
2 | line = br.readLin↵ | 1 | if (tnw != null && tnw.getTreeNode() != null) {↵ | |
3 | e();↵ | 2 | selected = tnw.getTreeNode();↵ | |
4 | if (line != null) {↵ | 3 | if (selected != null) {↵ | |
5 | sb.append(line + lineEnd);↵ | 4 | ((ModuleController) element).setSelectedNode(selected);↵ | |
6 | }↵ | 5 | }↵ | |
7 | } | 6 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 4 | selected = tnw.getTreeNode(); | |||||||||||||||
12 | line = br.readLine(); |
| | |||||||||||||||
13 | if (line != null) |
| 5 | if (selected != null) | ||||||||||||||
|
| 6 | ((ModuleController)element).setSelectedNode(selected); | |||||||||||||||
14 | sb.append(line + lineEnd); |
| |
Row | Violation |
---|---|
1 | Unmatched statement selected=tnw.getTreeNode(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement line=br.readLine(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.String of variable line does not match with type org.apache.jmeter.gui.tree.JMeterTreeNode of variable selected |
4 | Unmatched statement ((ModuleController)element).setSelectedNode(selected); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement sb.append(line + lineEnd); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |