Source:
private void initParams(List args) { if (args.size() > 2) { throw new IllegalArgumentException( "Laplace CPD expects at most 2 parameters, not " + args.size()); } if (!expectMeanAsArg) { if (!expectDiversityAsArg) { if (args.size() > 0) { throw new IllegalArgumentException( "Laplace CPD with fixed mean expects no " + "arguments."); } } else { if (!(args.get(0) instanceof Number)) { throw new IllegalArgumentException( "The divesity parameter of Laplace CPD must be of type Number, not " + args.get(0).getClass() + "."); } else { Double Diversity = (Double) args.get(0); if (Diversity <= 0) { throw new IllegalArgumentException( "Laplace CPD expects a positive real number as the diversity parameter, not " + Diversity + "."); } else { setDiversity(Diversity); } } } } else { if (args.size() < 1) { throw new IllegalArgumentException( "Laplace CPD created without a fixed mean; " + "requires mean as an argument."); } if (!(args.get(0) instanceof Number)) { throw new IllegalArgumentException( "The mean parameter of Laplace CPD must be of type Number, not " + args.get(0).getClass() + "."); } else { setMean((Double) args.get(0)); } if (!expectDiversityAsArg) { if (args.size() > 1) { throw new IllegalArgumentException( "Laplace CPD with fixed Laplace expects " + "only one argument."); } } else { if (args.size() < 2) { throw new IllegalArgumentException( "Laplace CPD created without a fixed " + "Laplace; requires diversity as argument."); } if (!(args.get(1) instanceof Number)) { throw new IllegalArgumentException( "The divesity parameter of Laplace CPD must be of type Number, not " + args.get(1).getClass() + "."); } else { double Diversity = (Double) args.get(1); if (Diversity <= 0) { throw new IllegalArgumentException( "Laplace CPD expects a positive real number as the diversity parameter, not " + Diversity + "."); } else { setDiversity(Diversity); } } } } }

Target:
private void initParams(List args) { if (args.size() > 2) { throw new IllegalArgumentException( "Laplace CPD expects at most 2 parameters, not " + args.size()); } if (!expectMeanAsArg) { if (!expectDiversityAsArg) { if (args.size() > 0) { throw new IllegalArgumentException( "Laplace CPD with fixed mean expects no " + "arguments."); } } else { if (!(args.get(0) instanceof Number)) { throw new IllegalArgumentException( "The divesity parameter of Laplace CPD must be of type Number, not " + args.get(0).getClass() + "."); } else { double Diversity = (Double) args.get(0); if (Diversity <= 0) { throw new IllegalArgumentException( "Laplace CPD expects a positive real number as the diversity parameter, not " + Diversity + "."); } else { setDiversity(Diversity); } } } } else { if (args.size() < 1) { throw new IllegalArgumentException( "Laplace CPD created without a fixed mean; " + "requires mean as an argument."); } if (!(args.get(0) instanceof Number)) { throw new IllegalArgumentException( "The mean parameter of Laplace CPD must be of type Number, not " + args.get(0).getClass() + "."); } else { setMean((Double) args.get(0)); } if (!expectDiversityAsArg) { if (args.size() > 1) { throw new IllegalArgumentException( "Laplace CPD with fixed Laplace expects " + "only one argument."); } } else { if (args.size() < 2) { throw new IllegalArgumentException( "Laplace CPD created without a fixed " + "Laplace; requires diversity as argument."); } if (!(args.get(1) instanceof Number)) { throw new IllegalArgumentException( "The divesity parameter of Laplace CPD must be of type Number, not " + args.get(1).getClass() + "."); } else { double Diversity = (Double) args.get(1); if (Diversity <= 0) { throw new IllegalArgumentException( "Laplace CPD expects a positive real number as the diversity parameter, not " + Diversity + "."); } else { setDiversity(Diversity); } } } } }