test_class.declarator: classUnderTest = null
test_class.original_string: SGATracePanel classUnderTest = null;
test_class.type: SGATracePanel
test_class.var_name: classUnderTest
test_class.declarator: mockSession = mockHelper.createMock(ISession.class)
test_class.modifier: private
test_class.original_string: private ISession mockSession = mockHelper.createMock(ISession.class);
test_class.type: ISession
test_class.var_name: mockSession
test_class.declarator: mockSQLConnection = mockHelper.createMock(ISQLConnection.class)
test_class.modifier: private
test_class.original_string: private ISQLConnection mockSQLConnection = mockHelper.createMock(ISQLConnection.class);
test_class.type: ISQLConnection
test_class.var_name: mockSQLConnection
test_class.declarator: mockConnection = mockHelper.createMock(Connection.class)
test_class.modifier: private
test_class.original_string: private Connection mockConnection = mockHelper.createMock(Connection.class);
test_class.type: Connection
test_class.var_name: mockConnection
test_class.declarator: mockApplication = mockHelper.createMock(IApplication.class)
test_class.modifier: private
test_class.original_string: private IApplication mockApplication = mockHelper.createMock(IApplication.class);
test_class.type: IApplication
test_class.var_name: mockApplication
test_class.declarator: mockPreparedStatementForAccessible = 
  		mockHelper.createMock("mockPreparedStatementForAccessible", PreparedStatement.class)
test_class.modifier: private
test_class.original_string: private PreparedStatement mockPreparedStatementForAccessible = 
  		mockHelper.createMock("mockPreparedStatementForAccessible", PreparedStatement.class);
test_class.type: PreparedStatement
test_class.var_name: mockPreparedStatementForAccessible
test_class.declarator: mockResultSetForAccessible = mockHelper.createMock(ResultSet.class)
test_class.modifier: private
test_class.original_string: private ResultSet mockResultSetForAccessible = mockHelper.createMock(ResultSet.class);
test_class.type: ResultSet
test_class.var_name: mockResultSetForAccessible
test_class.declarator: mockPreparedStatementForSGATrace = 	
  		mockHelper.createMock("mockPreparedStatementForSGATrace", PreparedStatement.class)
test_class.modifier: private
test_class.original_string: private PreparedStatement mockPreparedStatementForSGATrace = 	
  		mockHelper.createMock("mockPreparedStatementForSGATrace", PreparedStatement.class);
test_class.type: PreparedStatement
test_class.var_name: mockPreparedStatementForSGATrace
test_class.declarator: mockResultSetForSGATrace = mockHelper.createMock(ResultSet.class)
test_class.modifier: private
test_class.original_string: private ResultSet mockResultSetForSGATrace = mockHelper.createMock(ResultSet.class);
test_class.type: ResultSet
test_class.var_name: mockResultSetForSGATrace
test_class.file: sql12/plugins/oracle/src/test/java/net/sourceforge/squirrel_sql/plugins/oracle/SGAtrace/SGATracePanelTest.java
test_class.identifier: SGATracePanelTest
test_class.superclass: extends BaseSQuirreLJUnit4TestCase
test_case.body: @Test
  	public void testPopulateSGATrace() throws SQLException {
  		
  		expect(mockSession.getSQLConnection()).andStubReturn(mockSQLConnection);
  		expect(mockSession.getApplication()).andStubReturn(mockApplication);
  		
  		// Accessible query
  		expect(mockSQLConnection.prepareStatement(isA(String.class))).andReturn(mockPreparedStatementForAccessible);
  		expect(mockPreparedStatementForAccessible.executeQuery()).andStubReturn(mockResultSetForAccessible);
  		
  		mockResultSetForAccessible.close();
  		expect(mockResultSetForAccessible.getStatement()).andStubReturn(mockPreparedStatementForAccessible);
  		mockPreparedStatementForAccessible.close();
  		
  		// SGA query
  		expect(mockSQLConnection.getConnection()).andStubReturn(mockConnection);
  		expect(mockConnection.prepareStatement(isA(String.class))).andReturn(mockPreparedStatementForSGATrace);
  		expect(mockPreparedStatementForSGATrace.execute()).andStubReturn(true);
  		expect(mockPreparedStatementForSGATrace.getResultSet()).andStubReturn(mockResultSetForSGATrace);
  		expect(mockResultSetForSGATrace.next()).andReturn(true).andReturn(false);
  		expect(mockResultSetForSGATrace.getString(EasyMock.anyInt())).andStubReturn("testValue");
  		
  		mockResultSetForSGATrace.close();
  		expect(mockResultSetForSGATrace.getStatement()).andStubReturn(mockPreparedStatementForSGATrace);
  		mockPreparedStatementForSGATrace.close();
  		
  		
  		mockHelper.replayAll();
  		classUnderTest = new SGATracePanel(mockSession, 0);
  		mockHelper.verifyAll();
  	}
test_case.class_method_signature: SGATracePanelTest.testPopulateSGATrace()
test_case.full_signature: @Test public void testPopulateSGATrace()
test_case.identifier: testPopulateSGATrace
test_case.invocations: andStubReturn expect getSQLConnection andStubReturn expect getApplication andReturn expect prepareStatement isA andStubReturn expect executeQuery close andStubReturn expect getStatement close andStubReturn expect getConnection andReturn expect prepareStatement isA andStubReturn expect execute andStubReturn expect getResultSet andReturn andReturn expect next andStubReturn expect getString anyInt close andStubReturn expect getStatement close replayAll verifyAll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPopulateSGATrace()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: s_stringMgr =
        StringManagerFactory.getStringManager(SGATracePanel.class)
focal_class.modifier: private static final
focal_class.original_string: private static final StringManager s_stringMgr =
        StringManagerFactory.getStringManager(SGATracePanel.class);
focal_class.type: StringManager
focal_class.var_name: s_stringMgr
focal_class.declarator: sgaTraceSQL =
        "  SELECT a.SQL_Text, " +
           "         a.First_Load_Time, " +
           "         b.username, " +
           "         a.Parse_Calls, " +
           "         a.Executions, " +
           "         a.Sorts, " +
           "         a.Disk_Reads, " +
           "         a.Buffer_Gets, " +
           "         a.Rows_Processed, " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Sorts / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Disk_Reads / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Buffer_Gets / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Rows_Processed / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Sorts / a.Rows_Processed, " +
           "                          3 ) ), " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Disk_Reads / a.Rows_Processed, " +
           "                          3 ) ) , " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Buffer_Gets / a.Rows_Processed, " +
           "                          3 ) ), " +
           "         a.Address || ':' || a.Hash_Value " +
           "    FROM v$sqlarea a, " +
           "         sys.all_users b " +
           "   WHERE a.parsing_user_id = b.user_id "
focal_class.modifier: private static final
focal_class.original_string: private static final String sgaTraceSQL =
        "  SELECT a.SQL_Text, " +
           "         a.First_Load_Time, " +
           "         b.username, " +
           "         a.Parse_Calls, " +
           "         a.Executions, " +
           "         a.Sorts, " +
           "         a.Disk_Reads, " +
           "         a.Buffer_Gets, " +
           "         a.Rows_Processed, " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Sorts / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Disk_Reads / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Buffer_Gets / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Executions, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Rows_Processed / a.Executions, " +
           "                          3 ) ), " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Sorts / a.Rows_Processed, " +
           "                          3 ) ), " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Disk_Reads / a.Rows_Processed, " +
           "                          3 ) ) , " +
           "         DECODE ( a.Rows_Processed, " +
           "                  0, " +
           "                  'N/A', " +
           "                  ROUND ( a.Buffer_Gets / a.Rows_Processed, " +
           "                          3 ) ), " +
           "         a.Address || ':' || a.Hash_Value " +
           "    FROM v$sqlarea a, " +
           "         sys.all_users b " +
           "   WHERE a.parsing_user_id = b.user_id ";
focal_class.type: String
focal_class.var_name: sgaTraceSQL
focal_class.declarator: _session
focal_class.modifier: private
focal_class.original_string: private ISession _session;
focal_class.type: ISession
focal_class.var_name: _session
focal_class.declarator: _sgaTrace
focal_class.modifier: private
focal_class.original_string: private AutoWidthResizeTable _sgaTrace;
focal_class.type: AutoWidthResizeTable
focal_class.var_name: _sgaTrace
focal_class.declarator: hasResized = false
focal_class.modifier: private
focal_class.original_string: private boolean hasResized = false;
focal_class.type: boolean
focal_class.var_name: hasResized
focal_class.declarator: _refreshTimer = new Timer(true)
focal_class.modifier: private
focal_class.original_string: private Timer _refreshTimer = new Timer(true);
focal_class.type: Timer
focal_class.var_name: _refreshTimer
focal_class.declarator: _autoRefresh = false
focal_class.modifier: private
focal_class.original_string: private boolean _autoRefresh = false;
focal_class.type: boolean
focal_class.var_name: _autoRefresh
focal_class.declarator: _refreshPeriod = 10
focal_class.modifier: private
focal_class.original_string: private int _refreshPeriod = 10;
focal_class.type: int
focal_class.var_name: _refreshPeriod
focal_class.file: sql12/plugins/oracle/src/main/java/net/sourceforge/squirrel_sql/plugins/oracle/SGAtrace/SGATracePanel.java
focal_class.identifier: SGATracePanel
focal_class.class_method_signature: SGATracePanel.SGATracePanel(ISession session, int autoRefeshPeriod)
focal_class.full_signature: public  SGATracePanel(ISession session, int autoRefeshPeriod)
focal_class.identifier: SGATracePanel
focal_class.modifiers: public
focal_class.parameters: (ISession session, int autoRefeshPeriod)
focal_class.signature:  SGATracePanel(ISession session, int autoRefeshPeriod)
focal_class.class_method_signature: SGATracePanel.getSession()
focal_class.full_signature: public ISession getSession()
focal_class.identifier: getSession
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ISession
focal_class.signature: ISession getSession()
focal_class.class_method_signature: SGATracePanel.resetTimer()
focal_class.full_signature: private void resetTimer()
focal_class.identifier: resetTimer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void resetTimer()
focal_class.class_method_signature: SGATracePanel.setAutoRefresh(boolean enable)
focal_class.full_signature: public void setAutoRefresh(boolean enable)
focal_class.identifier: setAutoRefresh
focal_class.modifiers: public
focal_class.parameters: (boolean enable)
focal_class.return: void
focal_class.signature: void setAutoRefresh(boolean enable)
focal_class.class_method_signature: SGATracePanel.getAutoRefesh()
focal_class.full_signature: public boolean getAutoRefesh()
focal_class.identifier: getAutoRefesh
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getAutoRefesh()
focal_class.class_method_signature: SGATracePanel.setAutoRefreshPeriod(int seconds)
focal_class.full_signature: public void setAutoRefreshPeriod(int seconds)
focal_class.identifier: setAutoRefreshPeriod
focal_class.modifiers: public
focal_class.parameters: (int seconds)
focal_class.return: void
focal_class.signature: void setAutoRefreshPeriod(int seconds)
focal_class.class_method_signature: SGATracePanel.getAutoRefreshPeriod()
focal_class.full_signature: public int getAutoRefreshPeriod()
focal_class.identifier: getAutoRefreshPeriod
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAutoRefreshPeriod()
focal_class.class_method_signature: SGATracePanel.createTableModel()
focal_class.full_signature: protected DefaultTableModel createTableModel()
focal_class.identifier: createTableModel
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: DefaultTableModel
focal_class.signature: DefaultTableModel createTableModel()
focal_class.class_method_signature: SGATracePanel.populateSGATrace()
focal_class.full_signature: public synchronized void populateSGATrace()
focal_class.identifier: populateSGATrace
focal_class.modifiers: public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void populateSGATrace()
focal_class.class_method_signature: SGATracePanel.createGUI()
focal_class.full_signature: private void createGUI()
focal_class.identifier: createGUI
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createGUI()
focal_class.superclass: extends JPanel
focal_method.body: public synchronized void populateSGATrace()
     {
        if (!OraclePlugin.checkObjectAccessible(_session, sgaTraceSQL))
        {
           return;
        }
        PreparedStatement s = null;
        ResultSet rs = null;
        try
        {
           s = _session.getSQLConnection().getConnection().prepareStatement(sgaTraceSQL);
           if (s.execute())
           {
              rs = s.getResultSet();
              DefaultTableModel tm = createTableModel();
              while (rs.next())
              {
                 String sqlText = rs.getString(1);
                 String flt = rs.getString(2);
                 String schema = rs.getString(3);
                 String calls = rs.getString(4);
                 String executions = rs.getString(5);
                 String sorts = rs.getString(6);
                 String diskReads = rs.getString(7);
                 String bufGets = rs.getString(8);
                 String rows = rs.getString(9);
                 String sortsExec = rs.getString(10);
                 String diskReadsExec = rs.getString(11);
                 String rowsExec = rs.getString(12);
                 String sortsRows = rs.getString(13);
                 String diskReadsRow = rs.getString(14);
                 String bufGetsRow = rs.getString(15);
  
                 //Should probably create my own table model but i am being a bit slack.
                 tm.addRow(new Object[]{sqlText, flt, schema, calls, executions,
                    sorts, diskReads, bufGets, rows, sortsExec,
                    diskReadsExec, rowsExec, sortsRows, diskReadsRow,
                    bufGetsRow});
              }
              _sgaTrace.setModel(tm);
              if (!hasResized)
              {
                 hasResized = true;
                 _sgaTrace.resizeColumnWidth(300);
              }
           }
        }
        catch (SQLException ex)
        {
           _session.showErrorMessage(ex);
        } finally {
        	SQLUtilities.closeResultSet(rs);
        	SQLUtilities.closeStatement(s);
        }
        
     }
focal_method.class_method_signature: SGATracePanel.populateSGATrace()
focal_method.full_signature: public synchronized void populateSGATrace()
focal_method.identifier: populateSGATrace
focal_method.invocations: checkObjectAccessible prepareStatement getConnection getSQLConnection execute getResultSet createTableModel next getString getString getString getString getString getString getString getString getString getString getString getString getString getString getString addRow setModel resizeColumnWidth showErrorMessage closeResultSet closeStatement
focal_method.modifiers: public synchronized
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void populateSGATrace()