if ( connection != null ) { try { connection.rollback(); connection.close(); } catch ( SQLException sqle ) { status = Status.STATUS_UNKNOWN; throw new SystemException(); } }
if ( connection != null ) { try { connection.rollback(); connection.close(); } catch ( SQLException sqle ) { status = Status.STATUS_UNKNOWN; throw new SystemException(); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/util/DualNodeJtaTransactionImpl.java File path: /hibernate-distribution-3.3.2.GA/project/testing/src/main/java/org/hibernate/test/tm/SimpleJtaTransactionImpl.java
Method name: void rollback() Method name: void rollback()
Number of AST nodes: 4 Number of AST nodes: 4
1
if ( connection != null ) {
1
if ( connection != null ) {
2
			try {
2
			try {
3
				connection.rollback();
3
				connection.rollback();
4
				connection.close();
4
				connection.close();
5
			}
5
			}
6
			catch ( SQLException sqle ) {
6
			catch ( SQLException sqle ) {
7
				status = Status.STATUS_UNKNOWN;
7
				status = Status.STATUS_UNKNOWN;
8
				throw new SystemException();
8
				throw new SystemException();
9
			}
9
			}
10
		}
10
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes
Number of node comparisons10
  1. {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.5
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    2
    if (connection != null)
    2
    if (connection != null)
    3
    try
    3
    try
    4
    connection.rollback();
    4
    connection.rollback();
    5
    connection.close();
    5
    connection.close();
    Precondition Violations (0)
    Row Violation