public TransactionManager getTransactionManager(Properties props) throws HibernateException {
try {
Class clazz = Class.forName("org.objectweb.jotm.Current");
return (TransactionManager) clazz.getMethod("getTransactionManager", null).invoke(null, null);
}
catch (Exception e) {
throw new HibernateException( "Could not obtain JOTM transaction manager instance", e );
public TransactionManager getTransactionManager(Properties props) throws HibernateException {
try {
Class clazz = Class.forName("org.objectweb.jonas_tm.Current");
return (TransactionManager) clazz.getMethod("getTransactionManager", null).invoke(null, null);
}
catch (Exception e) {
throw new HibernateException( "Could not obtain JOnAS transaction manager instance", e );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/transaction/JOTMTransactionManagerLookup.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/transaction/JOnASTransactionManagerLookup.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public TransactionManager getTransactionManager(Properties props) throws HibernateException {↵ | | 1 | public TransactionManager getTransactionManager(Properties props) throws HibernateException {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | Class clazz = Class.forName("org.objectweb.jotm.Current");↵ | | 3 | Class clazz = Class.forName("org.objectweb.jonas_tm.Current");↵
|
4 | return (TransactionManager) clazz.getMethod("getTransactionManager", null).invoke(null, null);↵ | | 4 | return (TransactionManager) clazz.getMethod("getTransactionManager", null).invoke(null, null);↵
|
5 | }↵ | | 5 | }↵
|
6 | catch (Exception e) {↵ | | 6 | catch (Exception e) {↵
|
7 | throw new HibernateException( "Could not obtain JOTM transaction manager instance", e );↵ | | 7 | throw new HibernateException( "Could not obtain JOnAS transaction manager instance", e );↵
|
8 | | | 8 |
|
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 |