File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLKeywordInfo.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLFunctionInfo.java | |||
Method name: ArrayList
|
Method name: ArrayList
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length);↵ | 1 | ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length);↵ | |
2 | for (String hqlKeyword : hqlKeywords)↵ | 2 | for (String builtInFunction : _builtInFunctions)↵ | |
3 | {↵ | 3 | {↵ | |
4 | ret.add(new HQLKeywordInfo(hqlKeyword));↵ | 4 | ret.add(new HQLFunctionInfo(builtInFunction));↵ | |
5 | }↵ | 5 | }↵ | |
6 | return ret; | 6 |
| |
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 having the same super class |
Number of node comparisons | 6 |
Number of mapped statements | 4 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length); |
| 1 | ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length); | ||||||||||||||||
2 | for (String hqlKeyword : hqlKeywords) |
| 2 | for (String builtInFunction : _builtInFunctions) | ||||||||||||||||
3 | ret.add(new HQLKeywordInfo(hqlKeyword)); |
| 3 | ret.add(new HQLFunctionInfo(builtInFunction)); | ||||||||||||||||
4 | return ret; | 4 | return ret; |
Row | Violation |
---|---|
1 | Expression new HQLKeywordInfo(hqlKeyword) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new HQLFunctionInfo(builtInFunction) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new HQLKeywordInfo(hqlKeyword) cannot be unified with expression new HQLFunctionInfo(builtInFunction) , because common superclass type net.sourceforge.squirrel_sql.plugins.hibernate.completion.SimpleHQLCompletionInfo cannot be passed as an argument to public boolean add(net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfo) |