CPD Results

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

Duplications

File Line
tinlizard/model/Project.java 73
tinlizard/model/View.java 61
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "DESCRIPTION")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String description;

    public Integer getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Date getCreated() {
        return this.created;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public Date getLastModified() {
        return this.lastModified;
    }

    public String getLastModifiedBy() {
        return this.lastModifiedBy;
    }

    public void setId(final Integer id) {
        this.id = id;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setCreated(final Date created) {
        this.created = created;
    }

    public void setCreatedBy(final String createdBy) {
        this.createdBy = createdBy;
    }

    public void setLastModified(final Date lastModified) {
        this.lastModified = lastModified;
    }

    public void setLastModifiedBy(final String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public View() {

File Line
tinlizard/model/Policy.java 60
tinlizard/model/View.java 60
    private static final Class<View> CLASS = View.class;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "DESCRIPTION")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String description;

File Line
tinlizard/model/Policy.java 61
tinlizard/model/Project.java 73
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "DESCRIPTION")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String description;

File Line
tinlizard/model/Codeline.java 96
tinlizard/model/Project.java 71
    private static final Class<User> CLASS = User.class;
    private static final Logger LOG = Logger.getLogger(CLASS);
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "EMAIL")

File Line
tinlizard/model/Dependency.java 60
tinlizard/model/View.java 60
    private static final Class<Policy> CLASS = Policy.class;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "DESCRIPTION")

File Line
tinlizard/model/Codeline.java 98
tinlizard/model/Policy.java 61
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NAME", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String name;
    @Column(name = "CREATED", nullable = false)
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date created;
    @Column(name = "CREATED_BY", nullable = false)
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String createdBy;
    @Version
    @Column(name = "LAST_MODIFIED")
    @Field(index = Index.UN_TOKENIZED, store = Store.YES)
    @DateBridge(resolution = Resolution.SECOND)
    private Date lastModified;
    @Column(name = "LAST_MODIFIED_BY")
    @Field(index = Index.TOKENIZED, store = Store.NO)
    private String lastModifiedBy;
    @Column(name = "GROUP_ID", nullable = false)

File Line
tinlizard/model/Codeline.java 152
tinlizard/model/Dependency.java 100
    public Integer getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Date getCreated() {
        return this.created;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public Date getLastModified() {
        return this.lastModified;
    }

    public String getLastModifiedBy() {
        return this.lastModifiedBy;
    }

    public void setId(final Integer id) {
        this.id = id;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setCreated(final Date created) {
        this.created = created;
    }

    public void setCreatedBy(final String createdBy) {
        this.createdBy = createdBy;
    }

    public void setLastModified(final Date lastModified) {
        this.lastModified = lastModified;
    }

    public void setLastModifiedBy(final String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public String getEmail() {

File Line
tinlizard/model/Codeline.java 152
tinlizard/model/Policy.java 89
    public Integer getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Date getCreated() {
        return this.created;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public Date getLastModified() {
        return this.lastModified;
    }

    public String getLastModifiedBy() {
        return this.lastModifiedBy;
    }

    public void setId(final Integer id) {
        this.id = id;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setCreated(final Date created) {
        this.created = created;
    }

    public void setCreatedBy(final String createdBy) {
        this.createdBy = createdBy;
    }

    public void setLastModified(final Date lastModified) {
        this.lastModified = lastModified;
    }

    public void setLastModifiedBy(final String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public Policy() {

File Line
tinlizard/model/Codeline.java 480
tinlizard/model/Dependency.java 261
            Collection results = em.createQuery("select distinct o.groupId from Dependency o").getResultList();

            for (Iterator it = results.iterator(); it.hasNext();) {
                Object obj = it.next();
                groupIds.add(obj.toString());
            }

            tx.commit();
        } catch (Exception e) {
            JpaDao.getInstance().handleError(tx, "Delete Error", e);
        }

        return groupIds;
    }

    @SuppressWarnings("unchecked")
    public static Collection<String> findAllArtifactIds(final String groupId) {
        EntityManager em = JpaDao.getInstance().getEm();
        EntityTransaction tx = em.getTransaction();
        tx.begin();

        Collection<String> artifactIds = null;

        try {
            artifactIds = new ArrayList<String>();

            Collection results = em.createQuery("select distinct o.artifactId from Dependency o where groupId = ?").setParameter(1, groupId).getResultList();

File Line
tinlizard/web/PolicyWeb.java 72
tinlizard/web/ViewWeb.java 63
        return subject.getDescription();
    }

    @Exported
    public Date getCreated() {
        return subject.getCreated();
    }

    @Exported
    public String getCreatedBy() {
        return subject.getCreatedBy();
    }

    @Exported
    public Date getLastModified() {
        return subject.getLastModified();
    }

    @Exported
    public String getLastModifiedBy() {
        return subject.getLastModifiedBy();
    }

    @Exported(visibility = 1)
    public CodelineCollectionWeb getCodelines() {
        Collection<Codeline> allCodelines = this.subject.getCodelines();

        //ArrayUtils?XXX
        if (((allCodelines != null) && !allCodelines.isEmpty())) {
            return new CodelineCollectionWeb(allCodelines, Messages._AllCodelines());