Fork me on GitHub

CPD Results

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

Duplications

File Line
org/thegalactic/lattice/Concept.java 674
org/thegalactic/lattice/ConceptLattice.java 947
                        e.add(ed);
                        // check if F is a minimal set closed for dependance relation between source and target
                        ((TreeSet<ComparableSet>) ed.getContent()).add(newVal);
                        TreeSet<ComparableSet> valEd = new TreeSet<ComparableSet>((TreeSet<ComparableSet>) ed.getContent());
                        for (ComparableSet x1 : valEd) {
                            if (x1.containsAll(newVal) && !newVal.containsAll(x1)) {
                                ((TreeSet<ComparableSet>) ed.getContent()).remove(x1);
                            }
                            if (!x1.containsAll(newVal) && newVal.containsAll(x1)) {
                                ((TreeSet<ComparableSet>) ed.getContent()).remove(newVal);
                            }
                        }
                    }
                }
            }
        }
File Line
org/thegalactic/context/Context.java 1024
org/thegalactic/context/Context.java 1103
            for (Comparable o : ctx.getObservations()) {
                // Concept corresponding to observation o
                TreeSet<Comparable> setBo = this.getIntent(o);
                TreeSet<Comparable> setAo = this.getExtent(setBo);
                Concept cptO = new Concept(setAo, setBo);
                TreeSet<Comparable> attrUp = up.getIntent(cl.getNode(cptO)); // Doesn't work with up.getIntent(cptO) ...
                for (Comparable a : this.getAttributes()) { // NOT GOOD for complexity :-(
                    // Try to find attributes in up-arrow relation
                    TreeSet<Comparable> setAa = this.getExtent(a);
                    TreeSet<Comparable> setBa = this.getIntent(setAa);
                    Concept cptA = new Concept(setAa, setBa); // Concept corresponding to attribute a
                    if (attrUp.contains(cl.getNode(cptA))) {
                        ctx.addToAttributes(a);
                    }
                }
            }
File Line
org/thegalactic/context/Context.java 1040
org/thegalactic/context/Context.java 1087
            for (Comparable a : ctx.getAttributes()) {
                // Concept corresponding to observation a
                TreeSet<Comparable> setAa = this.getExtent(a);
                TreeSet<Comparable> setBa = this.getIntent(setAa);
                Concept cptA = new Concept(setAa, setBa);
                TreeSet<Comparable> obsDown = down.getExtent(cl.getNode(cptA));
                for (Comparable o : this.getObservations()) {
                    // Try to find attributes in down-arrow relation
                    TreeSet<Comparable> setBo = this.getIntent(o);
                    TreeSet<Comparable> setAo = this.getExtent(setBo);
                    Concept cptO = new Concept(setAo, setBo); // Concept corresponding to attribute o
                    if (obsDown.contains(cl.getNode(cptO))) {
                        ctx.addToObservations(o);
                    }
                }
            }
File Line
org/thegalactic/lattice/Lattice.java 497
org/thegalactic/lattice/Lattice.java 575
        ConceptLattice csl = new ConceptLattice();
        // associates each node to a new closed set of join irreducibles
        TreeSet<Node<N>> join = this.joinIrreducibles();
        TreeMap<Node, Concept> closure = new TreeMap<Node, Concept>();
        Lattice<N, E> lattice = new Lattice(this);
        lattice.transitiveClosure();
        lattice.reflexiveClosure();
        for (Node<N> target : lattice.getNodes()) {
            ComparableSet jx = new ComparableSet();
            for (Node<N> source : lattice.getPredecessorNodes(target)) {
                if (join.contains(source)) {
                    jx.add(source.getContent());
File Line
org/thegalactic/lattice/Concept.java 677
org/thegalactic/lattice/ConceptLattice.java 950
org/thegalactic/lattice/Lattice.java 916
                        TreeSet<ComparableSet> valEd = new TreeSet<ComparableSet>((TreeSet<ComparableSet>) ed.getContent());
                        for (ComparableSet x1 : valEd) {
                            if (x1.containsAll(newVal) && !newVal.containsAll(x1)) {
                                ((TreeSet<ComparableSet>) ed.getContent()).remove(x1);
                            }
                            if (!x1.containsAll(newVal) && newVal.containsAll(x1)) {
                                ((TreeSet<ComparableSet>) ed.getContent()).remove(newVal);
                            }
                        }
                    }
                }
            }
        }
File Line
org/thegalactic/lattice/ConceptLattice.java 625
org/thegalactic/lattice/ConceptLattice.java 673
                nred = new Node(c.getSetA().first());
            } else {
                nred = new Node();
            }
            reduced.put((Node) node, nred);
        }
        // addtion of nodes to lattice
        for (Object node : csl.getNodes()) {
            lattice.addNode(reduced.get(node));
        }
        // addtion of edges to lattice
        for (Object source : csl.getNodes()) {
            for (Object target : csl.getSuccessorNodes((Node) source)) {
                lattice.addEdge(reduced.get(source), reduced.get(target));
            }
        }
        return lattice;
    }

    /**
     * Returns a lattice where meet irreducibles node's content is replaced by
     * the first element of set B.
     *
     * Other nodes are replaced by a new comparable.
     *
     * @return a lattice
     */
    public Lattice getMeetReduction() {