File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/tab/MysqlTriggerSourceTab.java | File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/tab/MysqlViewSourceTab.java | |||
Method name: PreparedStatement createStatement()
|
Method name: PreparedStatement createStatement()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | final ISession session = getSession();↵ | 1 | final ISession session = getSession();↵ | |
2 | final IDatabaseObjectInfo doi = getDatabaseObjectInfo();↵ | 2 | final IDatabaseObjectInfo doi = getDatabaseObjectInfo();↵ | |
3 | ISQLConnection conn = session.getSQLConnection();↵ | 3 | ISQLConnection conn = session.getSQLConnection();↵ | |
4 | if (s_log.isDebugEnabled()) {↵ | 4 | if (s_log.isDebugEnabled()) {↵ | |
5 | s_log.debug("Running SQL for View source tab: "+SQL);↵ | 5 | s_log.debug("Running SQL for View source tab: "+SQL);↵ | |
6 | s_log.debug("Binding catalog name "+doi.getCatalogName()+↵ | 6 | s_log.debug("Binding catalog name "+doi.getCatalogName()+↵ | |
7 | " as first bind value");↵ | 7 | " as first bind value");↵ | |
8 | s_log.debug("Binding table name "+doi.getSimpleName()+↵ | 8 | s_log.debug("Binding table name "+doi.getSimpleName()+↵ | |
9 | " as second bind value"); ↵ | 9 | " as second bind value"); ↵ | |
10 | ↵ | |||
10 | }↵ | 11 | }↵ | |
11 | PreparedStatement pstmt = conn.prepareStatement(SQL);↵ | 12 | PreparedStatement pstmt = conn.prepareStatement(SQL);↵ | |
12 | ↵ | 13 | ↵ | |
13 | pstmt.setString(1, doi.getCatalogName());↵ | 14 | pstmt.setString(1, doi.getCatalogName());↵ | |
14 | pstmt.setString(2, doi.getSimpleName());↵ | 15 | pstmt.setString(2, doi.getSimpleName());↵ | |
15 | return pstmt; | 16 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 65 |
Number of mapped statements | 11 |
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) | 5.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | final ISession session = getSession(); | 1 | final ISession session = getSession(); | |
2 | final IDatabaseObjectInfo doi = getDatabaseObjectInfo(); | 2 | final IDatabaseObjectInfo doi = getDatabaseObjectInfo(); | |
3 | ISQLConnection conn = session.getSQLConnection(); | 3 | ISQLConnection conn = session.getSQLConnection(); | |
4 | if (s_log.isDebugEnabled()) | 4 | if (s_log.isDebugEnabled()) | |
5 | s_log.debug("Running SQL for View source tab: " + SQL); | 5 | s_log.debug("Running SQL for View source tab: " + SQL); | |
6 | s_log.debug("Binding catalog name " + doi.getCatalogName() + " as first bind value"); | 6 | s_log.debug("Binding catalog name " + doi.getCatalogName() + " as first bind value"); | |
7 | s_log.debug("Binding table name " + doi.getSimpleName() + " as second bind value"); | 7 | s_log.debug("Binding table name " + doi.getSimpleName() + " as second bind value"); | |
8 | PreparedStatement pstmt = conn.prepareStatement(SQL); | 8 | PreparedStatement pstmt = conn.prepareStatement(SQL); | |
9 | pstmt.setString(1, doi.getCatalogName()); | 9 | pstmt.setString(1, doi.getCatalogName()); | |
10 | pstmt.setString(2, doi.getSimpleName()); | 10 | pstmt.setString(2, doi.getSimpleName()); | |
11 | return pstmt; | 11 | return pstmt; |
Row | Violation |
---|