The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
org/sat4j/sat/Lanceur.java | 446 |
org/sat4j/sat/Solvers.java | 176 |
private static Options createCLIOptions() { Options options = new Options(); options.addOption("l", "library", true, "specifies the name of the library used (minisat by default)"); options.addOption("s", "solver", true, "specifies the name of a prebuilt solver from the library"); options.addOption("S", "Solver", true, "setup a solver using a solver config string"); options.addOption("t", "timeout", true, "specifies the timeout (in seconds)"); options.addOption("T", "timeoutms", true, "specifies the timeout (in milliseconds)"); options.addOption("C", "conflictbased", false, "conflict based timeout (for deterministic behavior)"); options.addOption("d", "dot", true, "creates a sat4j.dot file in current directory representing the search"); options.addOption("f", "filename", true, "specifies the file to use (in conjunction with -d for instance)"); options.addOption("m", "mute", false, "Set launcher in silent mode"); options.addOption("k", "kleast", true, "limit the search to models having at least k variables set to false"); options.addOption("r", "trace", false, "traces the behavior of the solver"); options.addOption("opt", "optimize", false, "uses solver in optimize mode instead of sat mode (default)"); options.addOption("rw", "randomWalk", true, "specifies the random walk probability "); options.addOption("remote", "remoteControl", false, "launches remote control"); options.addOption("H", "hot", false, "keep the solver hot (do not reset heuristics) when a model is found"); options.addOption("y", "simplify", false, "simplify the set of clauses is possible"); Option op = options.getOption("l"); op.setArgName("libname"); op = options.getOption("s"); op.setArgName("solvername"); op = options.getOption("S"); op.setArgName("solverStringDefinition"); op = options.getOption("t"); op.setArgName("number"); op = options.getOption("T"); op.setArgName("number"); op = options.getOption("C"); op.setArgName("number"); op = options.getOption("k"); op.setArgName("number"); op = options.getOption("d"); op.setArgName("filename"); op = options.getOption("f"); op.setArgName("filename"); op = options.getOption("r"); op.setArgName("searchlistener"); op = options.getOption("rw"); op.setArgName("number"); return options; } |
File | Line |
---|---|
org/sat4j/sat/DetailedCommandPanel.java | 606 |
org/sat4j/sat/DetailedCommandPanel.java | 686 |
this.solver = Solvers.configureSolver(this.commandLines, this); this.telecomStrategy.setSolver(this.solver); this.telecomStrategy.setRestartStrategy(this.solver .getRestartStrategy()); this.solver.setRestartStrategy(this.telecomStrategy); this.restartPanel.setCurrentRestart(this.telecomStrategy .getRestartStrategy().getClass().getSimpleName()); IOrder order = this.solver.getOrder(); double proba = 0; if (this.optimizationMode) { if (order instanceof RandomWalkDecoratorObjective) { this.randomWalk = (RandomWalkDecorator) order; proba = this.randomWalk.getProbability(); } else if (order instanceof VarOrderHeapObjective) { this.randomWalk = new RandomWalkDecoratorObjective( (VarOrderHeapObjective) order, 0); } } else if (this.solver.getOrder() instanceof RandomWalkDecorator) { this.randomWalk = (RandomWalkDecorator) order; proba = this.randomWalk.getProbability(); } else { this.randomWalk = new RandomWalkDecorator((VarOrderHeap) order, 0); } this.randomWalk.setProbability(proba); this.rwPanel.setProba(proba); this.solver.setOrder(this.randomWalk); this.telecomStrategy.setPhaseSelectionStrategy(this.solver .getOrder().getPhaseSelectionStrategy()); this.solver.getOrder().setPhaseSelectionStrategy( |
File | Line |
---|---|
org/sat4j/sat/visu/TracePainterCross.java | 33 |
org/sat4j/sat/visu/TracePainterPlus.java | 33 |
this.m_pointPainter = new PointPainterPlus(plusSize); } /** * @see info.monitorenter.gui.chart.ITracePainter#endPaintIteration(java.awt.Graphics) */ @Override public void endPaintIteration(final Graphics g2d) { if (g2d != null) { int previousX = this.getPreviousX(); int previousY = this.getPreviousY(); if (previousX != Integer.MIN_VALUE || previousY != Integer.MIN_VALUE) { this.m_pointPainter.paintPoint(previousX, previousY, 0, 0, g2d, this.getPreviousPoint()); } } this.m_pointPainter.endPaintIteration(g2d); } /** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (this.getClass() != obj.getClass()) { return false; } final TracePainterPlus other = (TracePainterPlus) obj; |
File | Line |
---|---|
org/sat4j/sat/visu/TracePainterCross.java | 85 |
org/sat4j/sat/visu/TracePainterPlus.java | 85 |
return this.m_pointPainter.getPlusSize(); } /** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + (this.m_pointPainter == null ? 0 : this.m_pointPainter .hashCode()); return result; } /** * @see info.monitorenter.gui.chart.traces.painters.ATracePainter#paintPoint(int, * int, int, int, java.awt.Graphics, * info.monitorenter.gui.chart.ITracePoint2D) */ @Override public void paintPoint(final int absoluteX, final int absoluteY, final int nextX, final int nextY, final Graphics g, final ITracePoint2D original) { super.paintPoint(absoluteX, absoluteY, nextX, nextY, g, original); this.m_pointPainter.paintPoint(absoluteX, absoluteY, nextX, nextY, g, original); } /** * Sets the size of the plus to paint in pixel. * <p> * * @param plusSize * the diameter of the plus to paint in pixel. */ public void setPlusSize(final int plusSize) { this.m_pointPainter.setPlusSize(plusSize); |
File | Line |
---|---|
org/sat4j/sat/DetailedCommandPanel.java | 590 |
org/sat4j/sat/DetailedCommandPanel.java | 652 |
.equals(StartSolverEnum.SOLVER_LIST_PARAM_REMOTE)) { this.selectedSolver = (String) this.listeSolvers.getSelectedItem(); String[] partsSelectedSolver = this.selectedSolver.split("\\."); assert partsSelectedSolver.length == 2; assert partsSelectedSolver[0].equals(MINISAT_PREFIX) || partsSelectedSolver[0].equals(PB_PREFIX); ASolverFactory factory; if (partsSelectedSolver[0].equals(MINISAT_PREFIX)) { factory = org.sat4j.minisat.SolverFactory.instance(); } else { factory = org.sat4j.pb.SolverFactory.instance(); } this.solver = (ICDCL) factory .createSolverByName(partsSelectedSolver[1]); this.telecomStrategy.setSolver(this.solver); this.solver.setRestartStrategy(this.telecomStrategy); |
File | Line |
---|---|
org/sat4j/sat/Solvers.java | 405 |
org/sat4j/sat/Solvers.java | 440 |
Class.forName(PACKAGE_PHASE + "." + name) .newInstance()).keySet(); keySet.remove("class"); if (keySet.size() > 0) { classNames.add(name + keySet); } else { classNames.add(name); } } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } } logger.log("Available phase strategies (" + Solvers.PHASE + "): " |