File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/ConnectionReleaseMode.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/ValueInclusion.java | |||
Method name: ConnectionReleaseMode parse(String)
|
Method name: Object readResolve()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if ( AFTER_STATEMENT.name.equals( modeName ) ) {↵ | 1 | if ( name.equals( NONE.name ) ) { ↵ | |
2 | return AFTER_STATEMENT;↵ | 2 | return NONE; ↵ | |
3 | }↵ | 3 | } ↵ | |
4 | else if ( AFTER_TRANSACTION.name.equals( modeName ) ) {↵ | 4 | else if ( name.equals( FULL.name ) ) { ↵ | |
5 | return AFTER_TRANSACTION;↵ | 5 | return FULL; ↵ | |
6 | }↵ | 6 | } ↵ | |
7 | else if ( ON_CLOSE.name.equals( modeName ) ) {↵ | 7 | else if ( name.equals( PARTIAL.name ) ) { ↵ | |
8 | return ON_CLOSE;↵ | 8 | return PARTIAL; ↵ | |
9 | }↵ | 9 | } ↵ | |
10 | throw new Hiberna↵ | 10 | else {↵ | |
11 | teException( "could not determine appropriate connection release mode [" + modeName + "]" ); | 11 | throw new StreamCorruptedException( "unrecognized value inclusion [" + name + "]" );↵ | |
12 |
| |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 33 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (AFTER_STATEMENT.name.equals(modeName)) |
| 1 | if (name.equals(NONE.name)) | |||||||||||||
|
| 2 | return NONE; | ||||||||||||||
2 | return AFTER_STATEMENT; |
| | ||||||||||||||
3 | else if (AFTER_TRANSACTION.name.equals(modeName)) |
| 3 | else if (name.equals(FULL.name)) | |||||||||||||
|
| 4 | return FULL; | ||||||||||||||
4 | return AFTER_TRANSACTION; |
| | ||||||||||||||
5 | else if (ON_CLOSE.name.equals(modeName)) |
| 5 | else if (name.equals(PARTIAL.name)) | |||||||||||||
|
| 6 | return PARTIAL; | ||||||||||||||
6 | return ON_CLOSE; |
| | ||||||||||||||
| else | ||||||||||||||||
|
| 7 | throw new StreamCorruptedException("unrecognized value inclusion [" + name + "]"); | ||||||||||||||
7 | throw new HibernateException("could not determine appropriate connection release mode [" + modeName + "]"); |
| |
Row | Violation |
---|---|
1 | Unmatched return NONE; |
2 | Unmatched return AFTER_STATEMENT; |
3 | Unmatched return FULL; |
4 | Unmatched return AFTER_TRANSACTION; |
5 | Unmatched return PARTIAL; |
6 | Unmatched return ON_CLOSE; |
7 | Unmatched throw new StreamCorruptedException("unrecognized value inclusion [" + name + "]"); |
8 | Unmatched throw new HibernateException("could not determine appropriate connection release mode [" + modeName + "]"); |