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 getGuiFromCache(Class, Class)
|
Method name: JMeterGUIComponent getGuiFromCache(Class, Class)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (guiClass == TestBeanGUI.class) {↵ | 1 | if (guiClass == TestBeanGUI.class) {↵ | |
2 | comp = (TestBeanGUI) testBeanGUIs.get(testClass);↵ | 2 | comp = (TestBeanGUI) testBeanGUIs.get(testClass);↵ | |
3 | if (comp == null) {↵ | 3 | if (comp == null) {↵ | |
4 | comp = new TestBeanGUI(testClass);↵ | 4 | comp = new TestBeanGUI(testClass);↵ | |
5 | testBeanGUIs.put(testClass, comp);↵ | 5 | testBeanGUIs.put(testClass, comp);↵ | |
6 | }↵ | 6 | }↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | comp = (JMeterGUIComponent) guis.get(guiClass);↵ | 8 | comp = (JMeterGUIComponent) guis.get(guiClass);↵ | |
9 | if (comp == null) {↵ | 9 | if (comp == null) {↵ | |
10 | comp = (JMeterGUIComponent) guiClass.newInstance();↵ | 10 | comp = (JMeterGUIComponent) guiClass.newInstance();↵ | |
11 | if (!(comp instanceof UnsharedComponent)) {↵ | 11 | if (!(comp instanceof UnsharedComponent)) {↵ | |
12 | guis.put(guiClass, comp);↵ | 12 | guis.put(guiClass, comp);↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | } | 15 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 28 |
Number of mapped statements | 10 |
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) | 2.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | if (guiClass == TestBeanGUI.class) | 2 | if (guiClass == TestBeanGUI.class) | |
3 | comp = (TestBeanGUI)testBeanGUIs.get(testClass); | 3 | comp = (TestBeanGUI)testBeanGUIs.get(testClass); | |
4 | if (comp == null) | 4 | if (comp == null) | |
5 | comp = new TestBeanGUI(testClass); | 5 | comp = new TestBeanGUI(testClass); | |
6 | testBeanGUIs.put(testClass, comp); | 6 | testBeanGUIs.put(testClass, comp); | |
else | else | |||
7 | comp = (JMeterGUIComponent)guis.get(guiClass); | 7 | comp = (JMeterGUIComponent)guis.get(guiClass); | |
8 | if (comp == null) | 8 | if (comp == null) | |
9 | comp = (JMeterGUIComponent)guiClass.newInstance(); | 9 | comp = (JMeterGUIComponent)guiClass.newInstance(); | |
10 | if (!(comp instanceof UnsharedComponent)) | 10 | if (!(comp instanceof UnsharedComponent)) | |
11 | guis.put(guiClass, comp); | 11 | guis.put(guiClass, comp); |
Row | Violation |
---|