if (_rowsIter.hasNext())
{
_row = _rowsIter.next();
}
else
{
_row = null;
}
return _row != null;
if (_rowsIter.hasNext())
{
_row = _rowsIter.next();
}
else
{
_row = null;
}
return _row != null;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/MetaDataDataSet.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/ResultSetMetaDataDataSet.java
|
Method name: boolean next(IMessageHandler)
|
|
Method name: boolean next(IMessageHandler)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (_rowsIter.hasNext())↵ | | 1 | if (_rowsIter.hasNext())↵
|
2 | {↵ | | 2 | {↵
|
3 | _row = _rowsIter.next();↵ | | 3 | _row = _rowsIter.next();↵
|
4 | }↵ | | 4 | }↵
|
5 | else↵ | | 5 | else↵
|
6 | {↵ | | 6 | {↵
|
7 | _row = null;↵ | | 7 | _row = null;↵
|
8 | }↵ | | 8 | }↵
|
9 | return _row != null; | | 9 | return _row != null;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (_rowsIter.hasNext()) | | 1 | if (_rowsIter.hasNext()) |
2 | | | 2 | |
| | | | |
3 | | | 3 | |
4 | return _row != null; | | 4 | return _row != null; |
Precondition Violations (0)
Row |
Violation |