CPD Results

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

Duplications

File Line
org/sat4j/tools/DimacsOutputSolver.java 170
org/sat4j/tools/DimacsStringSolver.java 191
    }

    public void printStat(PrintStream output, String prefix) {
        // TODO Auto-generated method stub
    }

    public void printStat(PrintWriter output, String prefix) {
        // TODO Auto-generated method stub

    }

    public Map<String, Number> getStat() {
        // TODO Auto-generated method stub
        return null;
    }

    public String toString(String prefix) {
        return "Dimacs output solver";
    }

    public void clearLearntClauses() {
        // TODO Auto-generated method stub

    }

    public int[] model() {
        throw new UnsupportedOperationException();
    }

    public boolean model(int var) {
        throw new UnsupportedOperationException();
    }

    public boolean isSatisfiable() throws TimeoutException {
        throw new TimeoutException("There is no real solver behind!");
    }

    public boolean isSatisfiable(IVecInt assumps) throws TimeoutException {
        throw new TimeoutException("There is no real solver behind!");
    }

    public int[] findModel() throws TimeoutException {
        throw new UnsupportedOperationException();
    }

    public int[] findModel(IVecInt assumps) throws TimeoutException {
        throw new UnsupportedOperationException();
    }

    public int nConstraints() {
        return nbclauses;
    }

    public int nVars() {
        return nbvars;
    }

File Line
org/sat4j/minisat/orders/VarOrder.java 203
org/sat4j/minisat/orders/VarOrderHeap.java 153
    }

    protected void updateActivity(final int var) {
        if ((activity[var] += varInc) > VAR_RESCALE_BOUND) {
            varRescaleActivity();
        }
    }

    /**
     * 
     */
    public void varDecayActivity() {
        varInc *= varDecay;
    }

    /**
     * 
     */
    private void varRescaleActivity() {
        for (int i = 1; i < activity.length; i++) {
            activity[i] *= VAR_RESCALE_FACTOR;
        }
        varInc *= VAR_RESCALE_FACTOR;
    }

    public double varActivity(int p) {
        return activity[var(p)];
    }

    /**
     * 
     */
    public int numberOfInterestingVariables() {
        int cpt = 0;
        for (int i = 1; i < activity.length; i++) {
            if (activity[i] > 1.0) {
                cpt++;
            }
        }
        return cpt;
    }

    /**
     * that method has the responsability to initialize all arrays in the
     * heuristics. PLEASE CALL super.init() IF YOU OVERRIDE THAT METHOD.
     */
    public void init() {
        int nlength = lits.nVars() + 1;

File Line
org/sat4j/reader/DimacsReader.java 253
org/sat4j/reader/LecteurDimacs.java 219
    }

    @Override
    public String decode(int[] model) {
        StringBuffer stb = new StringBuffer();
        for (int i = 0; i < model.length; i++) {
            stb.append(model[i]);
            stb.append(" ");
        }
        stb.append("0");
        return stb.toString();
    }

    @Override
    public void decode(int[] model, PrintWriter out) {
        for (int i = 0; i < model.length; i++) {
            out.print(model[i]);
            out.print(" ");
        }
        out.print("0");
    }

File Line
org/sat4j/reader/ExtendedDimacsReader.java 47
org/sat4j/tools/ExtendedDimacsArrayReader.java 44
public class ExtendedDimacsArrayReader extends DimacsArrayReader {

    public static final int FALSE = 1;

    public static final int TRUE = 2;

    public static final int NOT = 3;

    public static final int AND = 4;

    public static final int NAND = 5;

    public static final int OR = 6;

    public static final int NOR = 7;

    public static final int XOR = 8;

    public static final int XNOR = 9;

    public static final int IMPLIES = 10;

    public static final int IFF = 11;

    public static final int IFTHENELSE = 12;

    public static final int ATLEAST = 13;

    public static final int ATMOST = 14;

    public static final int COUNT = 15;

    private static final long serialVersionUID = 1L;

File Line
org/sat4j/reader/AAGReader.java 59
org/sat4j/reader/AIGReader.java 57
    AIGReader(ISolver s) {
        solver = new GateTranslator(s);
    }

    @Override
    public String decode(int[] model) {
        StringBuffer stb = new StringBuffer();
        for (int i = 0; i < nbinputs; i++) {
            stb.append(model[i]>0?1:0);
        }
        return stb.toString();
    }

    @Override
    public void decode(int[] model, PrintWriter out) {
        for (int i = 0; i < nbinputs; i++) {
            out.print(model[i]>0?1:0);
        }
    }