if(null == _schemaDetails)
{
return 0;
}
else
{
return _schemaDetails.length;
}
if(null == _data)
{
return 0;
}
else
{
return _data.size();
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/SchemaTableModel.java
|
|
File path: /sql12/plugins/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/prefs/PrefixesTableModel.java
|
Method name: int getRowCount()
|
|
Method name: int getRowCount()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if(null == _schemaDetails)↵ | | 1 | if(null == _↵
|
2 | {↵ | | |
|
3 | return 0;↵ | | |
|
4 | }↵ | | |
|
5 | else↵ | | |
|
6 | {↵ | | |
|
7 | return _schemaDetails.length;↵ | | |
|
8 | ↵ | | 2 | data)↵
|
| | | 3 | {↵
|
| | | 4 | return 0;↵
|
| | | 5 | }↵
|
| | | 6 | else↵
|
| | | 7 | {↵
|
| | | 8 | return _data.size();↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 having the same super class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (null == _schemaDetails) | | 1 | if (null == _data) |
2 | | | 2 | |
| | | | |
3 | return _schemaDetails.length; | | 3 | |
Precondition Violations (3)
Row |
Violation |
1 | Type net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties[] of variable _schemaDetails does not match with type java.util.ArrayList<net.sourceforge.squirrel_sql.plugins.codecompletion.prefs.PrefixedConfig> of variable _data |
2 | Expression _schemaDetails.length cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression _data.size() cannot be parameterized, because it has dependencies to/from statements that will be extracted |