CPD Results

The following document contains the results of PMD's CPD 5.6.1.

Duplications

File Line
com/buckosoft/BSAccount/db/DatabaseImpl.java 64
com/buckosoft/BSAccount/db/DatabaseImpl.java 89
									.setParameter("password", password)
									.uniqueResult();
			if (a != null) {
				a.setLastAccess(null);
				session.update(a);
			}
			refreshNeeded = false;
		} catch (HibernateException e) {
			e.printStackTrace();
		} finally {
			session.getTransaction().commit();
		}
		return(a);
	}

	/* (non-Javadoc)
	 * @see com.buckosoft.BSAccount.db.Database#getAccount(int)
	 */
	@Override
	public BSAccount getAccount(int userId) {
File Line
com/buckosoft/BSAccount/db/DatabaseImpl.java 57
com/buckosoft/BSAccount/db/DatabaseImpl.java 83
	public BSAccount getAccount(String username, String password) {
		Session session = hibernateUtil.getSessionFactory().getCurrentSession();
		session.getTransaction().begin();
		BSAccount a = null;
		try {
			a = (BSAccount)session.createQuery("from BSAccount a where a.username = :username and password = PASSWORD(:password)")
File Line
com/buckosoft/BSAccount/db/DatabaseImpl.java 161
com/buckosoft/BSAccount/db/DatabaseImpl.java 182
		} catch (Exception e) {
			session.getTransaction().rollback();
			e.printStackTrace();
			return;
		} finally {
			session.getTransaction().commit();
		}
	}