File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/QueryException.java | |||
Method name: void postProcessInsert(AST)
|
Method name: String getMessage()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if ( idSelectExprNode != null ) {↵ | |||
2 | AST currentFirstSelectExprNode = selectClause.getFirstChild();↵ | |||
3 | selectClause.setFirstChild( idSelectExprNode );↵ | |||
4 | idSelectExprNode.setNextSibling( currentFirstSelectExprNode );↵ | |||
5 | insertStatement.getIntoClause().prependIdColumnSpec();↵ | |||
6 | } | 1 | String msg = super.getMessage();↵ | |
2 | if ( queryString!=null ) msg += " [" + queryString + ']';↵ | |||
3 |
| |||
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String msg = super.getMessage(); | ||||||||||||||||
14 | if (idSelectExprNode != null) |
| 2 | if (queryString != null) | ||||||||||||||
| 3 | msg += " [" + queryString + ']'; | ||||||||||||||||
15 | AST currentFirstSelectExprNode = selectClause.getFirstChild(); | | ||||||||||||||||
16 | selectClause.setFirstChild(idSelectExprNode); | | ||||||||||||||||
17 | idSelectExprNode.setNextSibling(currentFirstSelectExprNode); | | ||||||||||||||||
18 | insertStatement.getIntoClause().prependIdColumnSpec(); | | ||||||||||||||||
|
| 4 | return msg; |
Row | Violation |
---|---|
1 | Type antlr.collections.AST of variable idSelectExprNode does not match with type java.lang.String of variable queryString |
2 | Unmatched return msg; |