CPD Results

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

Duplications

FileLine
org/hibernate/impl/QueryImpl.java117
org/hibernate/impl/SQLQueryImpl.java362
		Query countQuery = ((Session)this.session).createSQLQuery(sqlQueryBuffer.toString());
		
		//SET NAMED PARAMS	
		Map parameters = this.getNamedParams();
		Set parameterNames = parameters.keySet();
		Iterator iter = parameterNames.iterator();
		while (iter.hasNext()) {
			String name = (String)iter.next();
			TypedValue typedValue = (TypedValue)parameters.get(name);
			countQuery.setParameter(name, typedValue.getValue(), typedValue.getType());
		}
		
		//SET POSITIONAL PARAMS
		List paramTypes = this.getTypes();
		List paramValues = this.getValues();
		if (paramTypes != null && paramTypes.size() > 0) {
			for (int i = 0; i < paramTypes.size(); i++) {
				countQuery.setParameter(i, paramValues.get(i), (Type)paramTypes.get(i));
			}
		}
		int count = ((BigInteger)countQuery.uniqueResult()).intValue();

FileLine
net/smartlab/web/AbstractArchiveAction.java195
net/smartlab/web/AbstractArchiveAction.java223
			((DynaActionForm)form).set(name, new String[0]);
		} else {
			try {
				PropertyDescriptor[] descriptors = Introspector.getBeanInfo(form.getClass()).getPropertyDescriptors();
				for (int i = 0; i < descriptors.length; i++) {
					if (descriptors[i].getName().equals(name)) {
						Method setter = descriptors[i].getWriteMethod();
						Class[] types = setter.getParameterTypes();
						if (types.length == 1 && types[0].isArray() && types[0] == String.class) {
							setter.invoke(form, new String[0]);