File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompletionInfoCollection.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompletionInfoCollection.java | |||
Method name: MappedClassInfo getMappedClassInfoFor(String, boolean, boolean)
|
Method name: MappedClassInfo getMappedClassInfoForNonAliasedToken(CompletionParser, boolean, boolean)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | ArrayList<PropertyInfo> matchingAttributes = currentAliasInfo.getQualifiedMatchingAttributes(cp);↵ | 1 | ArrayList<PropertyInfo> matchingAttributes = mappedClassInfo.getQualifiedMatchingAttributes(cp);↵ | |
2 | for (PropertyInfo matchingAttribute : matchingAttributes)↵ | 2 | for (PropertyInfo matchingAttribute : matchingAttributes)↵ | |
3 | {↵ | 3 | {↵ | |
4 | if(matchingAttribute.getHibernatePropertyInfo().getPropertyName().equals(cp.getLastToken()))↵ | 4 | if(matchingAttribute.getHibernatePropertyInfo().getPropertyName().equals(cp.getLastToken()))↵ | |
5 | {↵ | 5 | {↵ | |
6 | return matchingAttribute.getMappedClassInfo();↵ | 6 | return matchingAttribute.getMappedClassInfo();↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
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) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | ArrayList<PropertyInfo> matchingAttributes = currentAliasInfo.getQualifiedMatchingAttributes(cp); |
| 5 | ArrayList<PropertyInfo> matchingAttributes = mappedClassInfo.getQualifiedMatchingAttributes(cp); | ||||||||||||||
9 | for (PropertyInfo matchingAttribute : matchingAttributes) | 6 | for (PropertyInfo matchingAttribute : matchingAttributes) | |||||||||||||||
10 | if (matchingAttribute.getHibernatePropertyInfo().getPropertyName().equals(cp.getLastToken())) | 7 | if (matchingAttribute.getHibernatePropertyInfo().getPropertyName().equals(cp.getLastToken())) | |||||||||||||||
11 | return matchingAttribute.getMappedClassInfo(); | 8 | return matchingAttribute.getMappedClassInfo(); |
Row | Violation |
---|---|
1 | Expression currentAliasInfo cannot be unified with expression mappedClassInfo , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public ArrayList<net.sourceforge.squirrel_sql.plugins.hibernate.mapping.PropertyInfo> getQualifiedMatchingAttributes(net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser) |
2 | Not all possible execution flows end in a return statement |