File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/sessioninfo/SessionInfoInternalFrame.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/SGAtrace/SGATraceInternalFrame.java | |||
Method name: void createGUI(ISession)
|
Method name: void createGUI()
|
|||
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 | SessionInfoInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(), _sessionInfoPanel.getAutoRefreshPeriod());↵ | 5 | SGATraceInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(), _sgaTracePanel.getAutoRefreshPeriod());↵ | |
6 | _sessionInfoPanel.setAutoRefresh(false);↵ | 6 | _sgaTracePanel.setAutoRefresh(false);↵ | |
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 | _sessionInfoPanel = new SessionInfoPanel(getSession(), autoRefeshPeriod);↵ | 18 | _sgaTracePanel = new SGATracePanel(getSession(), autoRefeshPeriod);↵ | |
19 | _toolBar = new SessionInfoToolBar(getSession(), stayOnTop, autoRefeshPeriod);↵ | 19 | _toolBar = new SGATraceToolBar(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(_sessionInfoPanel, BorderLayout.CENTER);↵ | 22 | contentPanel.add(_sgaTracePanel, BorderLayout.CENTER);↵ | |
23 | setContentPane(contentPanel);↵ | 23 | setContentPane(contentPanel);↵ | |
24 | _sessionInfoPanel.setAutoRefreshPeriod(autoRefeshPeriod);↵ | |||
25 | }↵ | 24 | }↵ | |
26 | };↵ | 25 | };↵ | |
27 | initFromPrefs(PREF_PART_INFO_FRAME, cb); | 26 | initFromPrefs(PREF_PART_SGA_FRAME, cb); | |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 94.9 |
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_INFO_FRAME, cb); |
| 6 | initFromPrefs(PREF_PART_SGA_FRAME, cb); |
Row | Violation |
---|---|
1 | Expression _sessionInfoPanel cannot be unified with expression _sgaTracePanel , because common superclass javax.swing.JPanel does not declare member(s) public int getAutoRefreshPeriod() , public void setAutoRefresh(boolean) |
2 | Expression _sessionInfoPanel cannot be unified with expression _sgaTracePanel , because common superclass javax.swing.JPanel does not declare member(s) public int getAutoRefreshPeriod() , public void setAutoRefresh(boolean) |
3 | Super method call addWidgetListener(new WidgetAdapter(){ public void widgetClosing( WidgetEvent e){ SessionInfoInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(),_sessionInfoPanel.getAutoRefreshPeriod()); _sessionInfoPanel.setAutoRefresh(false); } } ); cannot be extracted from method |
4 | Super method call addWidgetListener(new WidgetAdapter(){ public void widgetClosing( WidgetEvent e){ SGATraceInternalFrame.super.internalFrameClosing(_toolBar.isStayOnTop(),_sgaTracePanel.getAutoRefreshPeriod()); _sgaTracePanel.setAutoRefresh(false); } } ); cannot be extracted from method |
5 | 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 or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement OracleInternalFrameCallback cb=new OracleInternalFrameCallback(){ public void createPanelAndToolBar( boolean stayOnTop, int autoRefeshPeriod){ _sessionInfoPanel=new SessionInfoPanel(getSession(),autoRefeshPeriod); _toolBar=new SessionInfoToolBar(getSession(),stayOnTop,autoRefeshPeriod); JPanel contentPanel=new JPanel(new BorderLayout()); contentPanel.add(_toolBar,BorderLayout.NORTH); contentPanel.add(_sessionInfoPanel,BorderLayout.CENTER); setContentPane(contentPanel); _sessionInfoPanel.setAutoRefreshPeriod(autoRefeshPeriod); } } ; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |