CPD Results

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

Duplications

File Project Line
xuml/tools/model/compiler/ClassWriter.java xuml-model-compiler 1838
xuml/tools/model/compiler/ClassWriter.java xuml-model-compiler 1878
info.addType(EntityManager.class));
            out.format("        @%s(\"unchecked\")\n", info.addType(SuppressWarnings.class));
            out.format("        %s<%s> list = em.createQuery(\"select e from %s e where ",
                    info.addType(List.class), info.getJavaClassSimpleName(),
                    info.getJavaClassSimpleName());
            {
                boolean first = true;
                for (MyIndependentAttribute attribute : find.getAttributes()) {
                    if (!first)
                        out.format(" and ");
                    out.format("e.%s=:%s", attribute.getFieldName(), attribute.getFieldName());
                    first = false;
                }
            }
            out.format("\")");
            for (MyIndependentAttribute attribute : find.getAttributes()) {
                out.format("\n            .setParameter(\"%s\", %s)", attribute.getFieldName(),
                        attribute.getFieldName());
            }
            out.format("\n            .getResultList();\n");
            out.format("\n      em.close();\n");