if ( log.isDebugEnabled() ) { log.debug( "about to open PreparedStatement" + preparedStatementCountsToString() ); openPreparedStatementCount++; globalOpenPreparedStatementCount++; }
if ( log.isDebugEnabled() ) { log.debug( "about to open ResultSet" + resultSetCountsToString() ); openResultSetCount++; globalOpenResultSetCount++; }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java
Method name: void logOpenPreparedStatement() Method name: void logOpenResults()
Number of AST nodes: 4 Number of AST nodes: 4
1
if ( log.isDebugEnabled() ) {
1
if ( log.isDebugEnabled() ) {
2
			log.debug( "about to open PreparedStatement" + preparedStatementCountsToString() );
2
			log.debug( "about to open ResultSet" + resultSetCountsToString() );
3
			openPreparedStatementCount++;
3
			openResultSetCount++;
4
			globalOpenPreparedStatementCount++;
4
			globalOpenResultSetCount++;
5
		}
5
		}
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 declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (log.isDebugEnabled())
    1
    if (log.isDebugEnabled())
    2
    log.debug("about to open PreparedStatement" + preparedStatementCountsToString());
    2
    log.debug("about to open PreparedStatement" + preparedStatementCountsToString());
    2
    log.debug("about to open ResultSet" + resultSetCountsToString());
    Differences
    Expression1Expression2Difference
    "about to open PreparedStatement""about to open ResultSet"LITERAL_VALUE_MISMATCH
    preparedStatementCountsToStringresultSetCountsToStringMETHOD_INVOCATION_NAME_MISMATCH
    2
    log.debug("about to open ResultSet" + resultSetCountsToString());
    3
    openPreparedStatementCount++;
    3
    openPreparedStatementCount++;
    3
    openResultSetCount++;
    Differences
    Expression1Expression2Difference
    openPreparedStatementCountopenResultSetCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression openPreparedStatementCount is a field being modified, and thus it cannot be parameterized
    Expression openResultSetCount is a field being modified, and thus it cannot be parameterized
    3
    openResultSetCount++;
    4
    globalOpenPreparedStatementCount++;
    4
    globalOpenPreparedStatementCount++;
    4
    globalOpenResultSetCount++;
    Differences
    Expression1Expression2Difference
    globalOpenPreparedStatementCountglobalOpenResultSetCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression globalOpenPreparedStatementCount is a field being modified, and thus it cannot be parameterized
    Expression globalOpenResultSetCount is a field being modified, and thus it cannot be parameterized
    4
    globalOpenResultSetCount++;
    Precondition Violations (4)
    Row Violation
    1Expression openPreparedStatementCount is a field being modified, and thus it cannot be parameterized
    2Expression openResultSetCount is a field being modified, and thus it cannot be parameterized
    3Expression globalOpenPreparedStatementCount is a field being modified, and thus it cannot be parameterized
    4Expression globalOpenResultSetCount is a field being modified, and thus it cannot be parameterized