File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/tab/MysqlTriggerSourceTab.java | File path: /sql12/plugins/sybase/src/net/sourceforge/squirrel_sql/plugins/SybaseASE/tab/ViewSourceTab.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 for param 1: "+doi.getCatalogName()↵ | |
7 | " as first bind value");↵ | 7 | );↵ | |
8 | s_log.debug("Binding table name "+doi.getSimpleName()+↵ | 8 | s_log.debug("Binding for param 2: "+doi.getSimpleName()↵ | |
9 | " as second bind value"); ↵ | 9 | );↵ | |
10 | }↵ | 10 | }↵ | |
11 | PreparedStatement pstmt = conn.prepareStatement(SQL);↵ | 11 | PreparedStatement pstmt = conn.prepareStatement(SQL);↵ | |
12 | ↵ | 12 | ↵ | |
13 | pstmt.setString(1, doi.getCatalogName());↵ | 13 | pstmt.setString(1, doi.getCatalogName());↵ | |
14 | pstmt.setString(2, doi.getSimpleName());↵ | 14 | pstmt.setString(2, doi.getSimpleName());↵ | |
15 | return pstmt; | 15 |
| |
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.7 |
Clone type | Type 2 |
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 for param 1: " + doi.getCatalogName()); | |||||||||||||||
7 | s_log.debug("Binding table name " + doi.getSimpleName() + " as second bind value"); |
| 7 | s_log.debug("Binding for param 2: " + doi.getSimpleName()); | |||||||||||||||
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 |
---|---|
1 | Expression "Binding catalog name " + doi.getCatalogName() + " as first bind value" cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression "Binding for param 1: " + doi.getCatalogName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression "Binding table name " + doi.getSimpleName() + " as second bind value" cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression "Binding for param 2: " + doi.getSimpleName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |