public class DB2390Dialect extends DB2Dialect { public boolean supportsSequences() { return false; } public String getIdentitySelectString() { return "select identity_val_local() from sysibm.sysdummy1"; } public boolean supportsLimit() { return true; } public boolean supportsLimitOffset() { return false; } public boolean useMaxForLimit() { return true; } public boolean supportsVariableLimit() { return false; } 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 class DB2400Dialect extends DB2Dialect { public boolean supportsSequences() { return false; } public String getIdentitySelectString() { return "select identity_val_local() from sysibm.sysdummy1"; } public boolean supportsLimit() { return true; } public boolean supportsLimitOffset() { return false; } public boolean useMaxForLimit() { return true; } public boolean supportsVariableLimit() { return false; } 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 class DB2390Dialect extends DB2Dialect {
1
public class DB2400Dialect extends DB2Dialect {
2
	public boolean supportsSequences() {
2
	public boolean supportsSequences() {
3
		return false;
3
		return false;
4
	}
4
	}
5
	public String getIdentitySelectString() {
5
	public String getIdentitySelectString() {
6
		return "select identity_val_local() from sysibm.sysdummy1";
6
		return "select identity_val_local() from sysibm.sysdummy1";
7
	}
7
	}
8
	public boolean supportsLimit() {
8
	public boolean supportsLimit() {
9
		return true;
9
		return true;
10
	}
10
	}
11
	public boolean supportsLimitOffset() {
11
	public boolean supportsLimitOffset() {
12
		return false;
12
		return false;
13
	}
13
	}
14
	public boolean useMaxForLimit() {
14
	public boolean useMaxForLimit() {
15
		return true;
15
		return true;
16
	}
16
	}
17
	public boolean supportsVariableLimit() {
17
	public boolean supportsVariableLimit() {
18
		return false;
18
		return false;
19
	}
19
	}
20
	public String getLimitString(String sql, int offset, int limit) {
20
	public String getLimitString(String sql, int offset, int limit) {
21
		if ( offset > 0 ) {
21
		if ( offset > 0 ) {
22
			throw new UnsupportedOperationException( "query result offset is not supported" );
22
			throw new UnsupportedOperationException( "query result offset is not supported" );
23
		}
23
		}
24
		return new StringBuffer( sql.length() + 40 )
24
		return new StringBuffer( sql.length() + 40 )
25
				.append( sql )
25
				.append( sql )
26
				.append( " fetch first " )
26
				.append( " fetch first " )
27
				.append( limit )
27
				.append( limit )
28
				.append( " rows only " )
28
				.append( " rows only " )
29
				.toString();
29
				.toString();
30
	
30
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0