try {
updateCurrentNode();
TestElement curNode = treeListener.getCurrentNode().getTestElement();
JMeterGUIComponent comp = getGui(curNode);
comp.clearGui();
log.debug("Updating gui to new node");
comp.configure(curNode);
currentNodeUpdated = false;
return comp;
} catch (Exception e) {
log.error("Problem retrieving gui", e);
return null;
}
try {
updateCurrentNode();
TestElement curNode = treeListener.getCurrentNode().getTestElement();
JMeterGUIComponent comp = getGui(curNode);
comp.clearGui();
log.debug("Updating gui to new node");
comp.configure(curNode);
currentNodeUpdated = false;
return comp;
} catch (Exception e) {
log.error("Problem retrieving gui", e);
return null;
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
|
Method name: JMeterGUIComponent getCurrentGui()
|
|
Method name: JMeterGUIComponent getCurrentGui()
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | try {↵ | | 1 | try {↵
|
2 | updateCurrentNode();↵ | | 2 | updateCurrentNode();↵
|
3 | TestElement curNode = treeListener.getCurrentNode().getTestElement();↵ | | 3 | TestElement curNode = treeListener.getCurrentNode().getTestElement();↵
|
4 | JMeterGUIComponent comp = getGui(curNode);↵ | | 4 | JMeterGUIComponent comp = getGui(curNode);↵
|
5 | comp.clearGui();↵ | | 5 | comp.clearGui();↵
|
6 | log.debug("Updating gui to new node");↵ | | 6 | log.debug("Updating gui to new node");↵
|
7 | comp.configure(curNode);↵ | | 7 | comp.configure(curNode);↵
|
8 | currentNodeUpdated = false;↵ | | 8 | currentNodeUpdated = false;↵
|
9 | return comp;↵ | | 9 | return comp;↵
|
10 | } catch (Exception e) {↵ | | 10 | } catch (Exception e) {↵
|
11 | log.error("Problem retrieving gui", e);↵ | | 11 | log.error("Problem retrieving gui", e);↵
|
12 | return null;↵ | | 12 | return null;↵
|
13 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 81 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 200.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | | | 2 | |
3 | TestElement curNode = treeListener.getCurrentNode().getTestElement(); | | 3 | TestElement curNode = treeListener.getCurrentNode().getTestElement(); |
4 | JMeterGUIComponent comp = getGui(curNode); | | 4 | JMeterGUIComponent comp = getGui(curNode); |
5 | | | 5 | |
6 | log.debug("Updating gui to new node"); | | 6 | log.debug("Updating gui to new node"); |
7 | | | 7 | |
8 | currentNodeUpdated = false; | | 8 | currentNodeUpdated = false; |
9 | | | 9 | |
Precondition Violations (1)
Row |
Violation |
1 | Type org.apache.jmeter.gui.tree.JMeterTreeListener of variable treeListener does not match with type org.apache.jmeter.report.gui.tree.ReportTreeListener of variable treeListener |