if ( offset > 0 ) { throw new UnsupportedOperationException( "query result offset is not supported" ); } return new StringBuffer( querySelect.length() + 16 ) .append( querySelect ) .insert( 6, " first " + limit ) .toString();
if ( offset > 0 ) { throw new UnsupportedOperationException( "query result offset is not supported" ); } return new StringBuffer( sql.length() + 40 ) .append( sql ) .append( " fetch first " ) .append( limit ) .append( " rows only " ) .toString();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/IngresDialect.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
Method name: String getLimitString(String, int, int) Method name: String getLimitString(String, int, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( offset > 0 ) {
1
if ( offset > 0 ) {
2
			throw new UnsupportedOperationException( "query result offset is not supported" );
2
			throw new UnsupportedOperationException( "query result offset is not supported" );
3
		}
3
		}
4
		return new StringBuffer( querySelect.length() + 16 )
4
		return new StringBuffer( sql.length() + 40 )
5
				.append( querySelect )
5
				.append( 
6
				.insert( 6, " first " + limit
6
sql )
7
				.append( " fetch first " )
8
				.append( limit )
7
 )
9
				.append( " rows only " )
8
				.toString();
10
				.toString();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (offset > 0)
    1
    if (offset > 0)
    2
    throw new UnsupportedOperationException("query result offset is not supported");
    2
    throw new UnsupportedOperationException("query result offset is not supported");
                                                                                                                                                                                                                                                                      
    3
    return new StringBuffer(sql.length() + 40).append(sql).append(" fetch first ").append(limit).append(" rows only ").toString();
    Preondition Violations
    Unmatched return new StringBuffer(sql.length() + 40).append(sql).append(" fetch first ").append(limit).append(" rows only ").toString();
    3
    return new StringBuffer(sql.length() + 40).append(sql).append(" fetch first ").append(limit).append(" rows only ").toString();
    3
    return new StringBuffer(querySelect.length() + 16).append(querySelect).insert(6, " first " + limit).toString();
    3
    return new StringBuffer(querySelect.length() + 16).append(querySelect).insert(6, " first " + limit).toString();
    Preondition Violations
    Unmatched return new StringBuffer(querySelect.length() + 16).append(querySelect).insert(6," first " + limit).toString();
                                                                                                                                                                                                                                      
    Precondition Violations (2)
    Row Violation
    1Unmatched return new StringBuffer(sql.length() + 40).append(sql).append(" fetch first ").append(limit).append(" rows only ").toString();
    2Unmatched return new StringBuffer(querySelect.length() + 16).append(querySelect).insert(6," first " + limit).toString();