File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/MappedClassInfo.java | File path: /sql12/plugins/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/StandardCompletorModel.java | |||
Method name: Collection extends CompletionInfo> getMatchingAttributes(CompletionParser)
|
Method name: ArrayList
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | if(propertyInfo.matchesUnQualified(parser.getLastToken()))↵ | 1 | if↵ | |
2 | {↵ | |||
3 | ret.add(propertyInfo);↵ | |||
4 | ↵ | 2 | (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat))↵ | |
3 | {↵ | |||
4 | toReturn = infos[i];↵ | |||
5 | break;↵ | |||
5 | } | 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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 6.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (propertyInfo.matchesUnQualified(parser.getLastToken())) |
| 14 | if (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat)) | ||||||||||||||||||||
4 | ret.add(propertyInfo); |
| | |||||||||||||||||||||
|
| 15 | toReturn = infos[i]; | |||||||||||||||||||||
|
| 16 | break; |
Row | Violation |
---|---|
1 | Expression propertyInfo cannot be unified with expression infos[i] , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public boolean matchesUnQualified(java.lang.String) |
2 | Unmatched statement ret.add(propertyInfo); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement toReturn=infos[i]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched break; |
5 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |