try {
Session session = sessionFactory.getCurrentSession();
Object account = session.get(acctClass, id);
setBranch.invoke(account, branch);
session.update(account);
tm.commit();
}
catch (Exception e) {
log.error("rolling back", e);
tm.rollback();
throw e;
try {
Session session = sessionFactory.getCurrentSession();
Object account = session.get(acctClass, id);
setBalance.invoke(account, newBalance);
session.update(account);
tm.commit();
}
catch (Exception e) {
log.error("rolling back", e);
tm.rollback();
throw e;
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/classloader/ClassLoaderTestDAO.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/ClassLoaderTestDAO.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | try {↵ | | 1 | try {↵
|
2 | Session session = sessionFactory.getCurrentSession();↵ | | 2 | Session session = sessionFactory.getCurrentSession();↵
|
3 | Object account = session.get(acctClass, id);↵ | | 3 | Object account = session.get(acctClass, id);↵
|
4 | setBranch.invoke(account, branch);↵ | | 4 | setBalance.invoke(account, newBalance);↵
|
5 | session.update(account);↵ | | 5 | session.update(account);↵
|
6 | tm.commit();↵ | | 6 | tm.commit();↵
|
7 | }↵ | | 7 | }↵
|
8 | catch (Exception e) {↵ | | 8 | catch (Exception e) {↵
|
9 | log.error("rolling back", e);↵ | | 9 | log.error("rolling back", e);↵
|
10 | tm.rollback();↵ | | 10 | tm.rollback();↵
|
11 | throw e;↵ | | 11 | throw e;↵
|
12 | | | 12 |
|
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 |