File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/SGAtrace/SGATraceInternalFrame.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/dboutput/DBOutputInternalFrame.java | |||
Method name: void createGUI()
|
Method name: void createGUI(ISession)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | addWidgetListener(new WidgetAdapter()↵ | 1 | addWidgetListener(new WidgetAdapter()↵ | |
2 | {↵ | 2 | {↵ | |
3 | public void widgetClosing(WidgetEvent e)↵ | 3 | public void widgetClosing(WidgetEvent e)↵ | |
4 | {↵ | 4 | {↵ | |
5 | SGATraceInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(), _sgaTracePanel.getAutoRefreshPeriod());↵ | 5 | ↵ | |
6 | _sgaTracePanel.setAutoRefresh(false);↵ | 6 | onWidgetClosing();↵ | |
7 | }↵ | 7 | }↵ | |
8 | });↵ | 8 | });↵ | |
9 | Icon icon = _resources.getIcon(getClass(), "frameIcon"); //i18n↵ | 9 | Icon icon = _resources.getIcon(getClass(), "frameIcon"); //i18n↵ | |
10 | if (icon != null)↵ | 10 | if (icon != null)↵ | |
11 | {↵ | 11 | {↵ | |
12 | setFrameIcon(icon);↵ | 12 | setFrameIcon(icon);↵ | |
13 | }↵ | 13 | }↵ | |
14 | OracleInternalFrameCallback cb = new OracleInternalFrameCallback()↵ | 14 | OracleInternalFrameCallback cb = new OracleInternalFrameCallback()↵ | |
15 | {↵ | 15 | {↵ | |
16 | public void createPanelAndToolBar(boolean stayOnTop, int autoRefeshPeriod)↵ | 16 | public void createPanelAndToolBar(boolean stayOnTop, int autoRefeshPeriod)↵ | |
17 | {↵ | 17 | {↵ | |
18 | _sgaTracePanel = new SGATracePanel(getSession(), autoRefeshPeriod);↵ | 18 | _dbOutputPanel = new DBOutputPanel(getSession(), autoRefeshPeriod);↵ | |
19 | _toolBar = new SGATraceToolBar(getSession(), stayOnTop, autoRefeshPeriod);↵ | 19 | _toolBar = new DBOutputToolBar(getSession(), stayOnTop, autoRefeshPeriod);↵ | |
20 | JPanel contentPanel = new JPanel(new BorderLayout());↵ | 20 | JPanel contentPanel = new JPanel(new BorderLayout());↵ | |
21 | contentPanel.add(_toolBar, BorderLayout.NORTH);↵ | 21 | contentPanel.add(_toolBar, BorderLayout.NORTH);↵ | |
22 | contentPanel.add(_sgaTracePanel, BorderLayout.CENTER);↵ | 22 | contentPanel.add(_dbOutputPanel, BorderLayout.CENTER);↵ | |
23 | setContentPane(contentPanel);↵ | 23 | setContentPane(contentPanel);↵ | |
24 | _dbOutputPanel.setAutoRefreshPeriod(autoRefeshPeriod);↵ | |||
24 | }↵ | 25 | }↵ | |
25 | };↵ | 26 | };↵ | |
26 | initFromPrefs(PREF_PART_SGA_FRAME, cb); | 27 | initFromPrefs(PREF_PART_DB_OUTPUT_FRAME, cb); | |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
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) | 88.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | addWidgetListener(new WidgetAdapter() {...}); | |||||||||||
1 | addWidgetListener(new WidgetAdapter() {...}); |
| | |||||||||||
2 | Icon icon = _resources.getIcon(getClass(), "frameIcon"); | 2 | Icon icon = _resources.getIcon(getClass(), "frameIcon"); | |||||||||||
3 | if (icon != null) | 3 | if (icon != null) | |||||||||||
4 | setFrameIcon(icon); | 4 | setFrameIcon(icon); | |||||||||||
|
| 5 | OracleInternalFrameCallback cb = new OracleInternalFrameCallback() {...}; | |||||||||||
5 | OracleInternalFrameCallback cb = new OracleInternalFrameCallback() {...}; |
| | |||||||||||
6 | initFromPrefs(PREF_PART_SGA_FRAME, cb); |
| 6 | initFromPrefs(PREF_PART_DB_OUTPUT_FRAME, cb); |
Row | Violation |
---|---|
1 | Unmatched statement addWidgetListener(new WidgetAdapter(){ public void widgetClosing( WidgetEvent e){ onWidgetClosing(); } } ); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement addWidgetListener(new WidgetAdapter(){ public void widgetClosing( WidgetEvent e){ SGATraceInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(),_sgaTracePanel.getAutoRefreshPeriod()); _sgaTracePanel.setAutoRefresh(false); } } ); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement OracleInternalFrameCallback cb=new OracleInternalFrameCallback(){ public void createPanelAndToolBar( boolean stayOnTop, int autoRefeshPeriod){ _dbOutputPanel=new DBOutputPanel(getSession(),autoRefeshPeriod); _toolBar=new DBOutputToolBar(getSession(),stayOnTop,autoRefeshPeriod); JPanel contentPanel=new JPanel(new BorderLayout()); contentPanel.add(_toolBar,BorderLayout.NORTH); contentPanel.add(_dbOutputPanel,BorderLayout.CENTER); setContentPane(contentPanel); _dbOutputPanel.setAutoRefreshPeriod(autoRefeshPeriod); } } ; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement OracleInternalFrameCallback cb=new OracleInternalFrameCallback(){ public void createPanelAndToolBar( boolean stayOnTop, int autoRefeshPeriod){ _sgaTracePanel=new SGATracePanel(getSession(),autoRefeshPeriod); _toolBar=new SGATraceToolBar(getSession(),stayOnTop,autoRefeshPeriod); JPanel contentPanel=new JPanel(new BorderLayout()); contentPanel.add(_toolBar,BorderLayout.NORTH); contentPanel.add(_sgaTracePanel,BorderLayout.CENTER); setContentPane(contentPanel); } } ; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |