public String getLimitString(String sql, int offset, int limit) {
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();
public String getLimitString(String sql, int offset, int limit) {
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/DB2390Dialect.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/DB2400Dialect.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public String getLimitString(String sql, int offset, int limit) {↵ | | 1 | public String getLimitString(String sql, int offset, int limit) {↵
|
2 | if ( offset > 0 ) {↵ | | 2 | if ( offset > 0 ) {↵
|
3 | throw new UnsupportedOperationException( "query result offset is not supported" );↵ | | 3 | throw new UnsupportedOperationException( "query result offset is not supported" );↵
|
4 | }↵ | | 4 | }↵
|
5 | return new StringBuffer( sql.length() + 40 )↵ | | 5 | return new StringBuffer( sql.length() + 40 )↵
|
6 | .append( sql )↵ | | 6 | .append( sql )↵
|
7 | .append( " fetch first " )↵ | | 7 | .append( " fetch first " )↵
|
8 | .append( limit )↵ | | 8 | .append( limit )↵
|
9 | .append( " rows only " )↵ | | 9 | .append( " rows only " )↵
|
10 | .toString();↵ | | 10 | .toString();↵
|
11 | | | 11 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |