CPD Results

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

Duplications

FileLine
org/sat4j/maxsat/WeightedMaxSatDecorator.java312
org/sat4j/maxsat/WeightedMaxSatDecorator.java381
    public IConstr addSoftAtMost(BigInteger weight, IVecInt literals, int degree)
            throws ContradictionException {
        checkMaxVarId();
        if (weight.compareTo(this.top) < 0) {
            this.coefs.push(weight);
            int newvar = nextFreeVarId(true);
            this.lits.push(newvar);
            IVec<BigInteger> cardcoeffs = new Vec<BigInteger>(
                    literals.size() + 1);
            cardcoeffs.growTo(literals.size(), BigInteger.ONE);
            literals.push(newvar);
            BigInteger bigDegree = BigInteger.valueOf(degree);
            cardcoeffs.push(bigDegree.negate());