File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/MappedClassInfo.java | File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/DefaultDropDialog.java | |||
Method name: String[] getAttributeNames()
|
Method name: String[] getSimpleNames(IDatabaseObjectInfo[])
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String[] ret = new String[_propertyInfos.length];↵ | 1 | String[] result = new String[dbInfo.length];↵ | |
2 | for (int i = 0; i < _propertyInfos.length; i++)↵ | 2 | for (int i = 0; i < result.length; i++)↵ | |
3 | ↵ | 3 | {↵ | |
4 | {↵ | 4 | ↵ | |
5 | ret[i] = _propertyInfos[i].getCompareString();↵ | 5 | result[i] = dbInfo[i].get↵ | |
6 | SimpleName();↵ | |||
6 | }↵ | 7 | }↵ | |
8 | ↵ | |||
7 | return ret; | 9 | return result; | |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String[] ret = new String[_propertyInfos.length]; |
| 1 | String[] result = new String[dbInfo.length]; | |||||||||||||||||
2 | for (int i = 0; i < _propertyInfos.length; i++) |
| 2 | for (int i = 0; i < result.length; i++) | |||||||||||||||||
|
| 3 | result[i] = dbInfo[i].getSimpleName(); | ||||||||||||||||||
3 | ret[i] = _propertyInfos[i].getCompareString(); |
| | ||||||||||||||||||
4 | return ret; |
| 4 | return result; |
Row | Violation |
---|---|
1 | Type int of variable _propertyInfos.length does not match with type int of variable dbInfo.length |
2 | Expression result.length cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type int of variable _propertyInfos.length does not match with type int of variable result.length |
4 | Unmatched statement result[i]=dbInfo[i].getSimpleName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement ret[i]=_propertyInfos[i].getCompareString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Expression ret cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression result cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfo and net.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialog do not have a common superclass |