File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java | |||
Method name: JMeterGUIComponent getGuiFromCache(Class, Class)
|
Method name: JMeterGUIComponent getGuiFromCache(Class, Class)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | JMeterGUIComponent comp;↵ | 1 | JMeterGUIComponent comp;↵ | |
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);↵ | |
7 | }↵ | 7 | }↵ | |
8 | } else {↵ | 8 | } else {↵ | |
9 | comp = (JMeterGUIComponent) guis.get(guiClass);↵ | 9 | comp = (JMeterGUIComponent) guis.get(guiClass);↵ | |
10 | if (comp == null) {↵ | 10 | if (comp == null) {↵ | |
11 | comp = (JMeterGUIComponent) guiClass.newInstance();↵ | 11 | comp = (JMeterGUIComponent) guiClass.newInstance();↵ | |
12 | if (!(comp instanceof UnsharedComponent)) {↵ | 12 | if (!(comp instanceof UnsharedComponent)) {↵ | |
13 | guis.put(guiClass, comp);↵ | 13 | guis.put(guiClass, comp);↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | }↵ | 16 | }↵ | |
17 | return comp; | 17 |
| |
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 | 32 |
Number of mapped statements | 12 |
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.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | JMeterGUIComponent comp; | 1 | JMeterGUIComponent comp; | |
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); | |
12 | return comp; | 12 | return comp; |
Row | Violation |
---|