SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method clone has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public ParametricModel clone() {
        ParametricModel clonedPM = new ParametricModel(modelName, formula, depXml, level, modelId, estModelId);
        clonedPM.modelClass = modelClass;
        clonedPM.modelDbUuid = modelDbUuid;
        clonedPM.estimatedModelDbUuid = estimatedModelDbUuid;

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method useCurrentResults has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private void useCurrentResults(List<Double> startValues) {
        double cost = optimizerValues.getCost();

        parameterValues = new ArrayList<>(parameters.size());
        sse = cost * cost;

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method setValueAt has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        @Override
        public void setValueAt(Object value, int row, int column) {
            super.setValueAt(value, row, column);

            if (selectionExlusive && column == 1 && value.equals(Boolean.TRUE)) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method enableModelList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void enableModelList(final int[] idlist) {
        if (idlist == null || idlist.length == 0) return;
        // disable everything
        for (JCheckBox box : modelBoxSetPrim.values()) {
            box.setSelected(false);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method manageColor has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

      private void manageColor() {
          Color fg = Color.BLACK;
          Color bg = Color.WHITE;
          if (object != null) {
              String param = object.toString();

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method convertArray2String has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static String convertArray2String(Array array) {
        String result = null;
        if (array != null) {
            try {
                Object[] o = (Object[])array.getArray();
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method addCorrs has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private static ParamXml addCorrs(ParamXml px, int modelId, int emid) throws SQLException {
        Integer paramId = DBKernel.getID("ModellkatalogParameter", new String[]{"Modell", "Parametername", "Parametertyp"}, new String[]{modelId+"", px.origName, "2"}); // Bfrdb.PARAMTYPE_PARAM
        if (paramId == null) System.err.println("paramId = null... " + px.origName);
        Integer estParamId = DBKernel.getID("GeschaetzteParameter", new String[]{"GeschaetztesModell", "Parameter"}, new String[]{emid+"", paramId+""});
        ResultSet rs = DBKernel.getResultSet("SELECT \"param2\",\"Wert\" FROM \"GeschaetzteParameterCovCor\" WHERE \"param1\" = " + estParamId + " AND \"GeschaetztesModell\" = " + emid, false);
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method stripNonValidXMLCharacters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static String stripNonValidXMLCharacters(String in) {
          StringBuffer out = new StringBuffer(); // Used to hold the output.
          char current; // Used to reference the current character.

          if (in == null || ("".equals(in))) return ""; // vacancy test.
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method importFlowVariables has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public Collection<FlowVariable> importFlowVariables(String variableName) throws RException {

    checkInitialized();
    final List<FlowVariable> flowVars = new ArrayList<>();

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _createRow has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _createRow(value = "") {
        let O = this;
        let input = document.createElement("input");
        input.type = O.type;
        input.className = "form-control";
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _createTableToolbar has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _createTableToolbar() {
        let O = this;
        _log('TABLE / _createTableToolbar');

        if (O.opts.showToggle || O.opts.showColumns) {
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _handleRowSelect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _handleRowSelect($tr) {
        let O = this;
        // rows selectable and tr exists
        if (O.opts.rowSelectable && $tr) {
            // get current state
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getKnimeTuples has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static List<KnimeTuple> getKnimeTuples(Bfrdb db, Connection conn, KnimeSchema schema, int level, boolean withoutMdData, String where, EstimatedModelReaderNodeModel emrnm) throws SQLException {

Method checkTable4ISM has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private LinkedHashMap<String[], LinkedHashSet<String[]>> checkTable4ISM(String tablename, String[] fieldnames, int[] maxScores,
            String otherTable, String otherTableField, String[] otherTableDesires, boolean gentle) throws SQLException {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.java - About 50 mins to fix

Method loopInternal has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

     private boolean loopInternal(Vector<Integer> vv, int row, String[] mnTable, MyTable[] foreignFields, TableModel tm, String[] findStrings, HashSet<Integer> cols2Search) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/editoren/MyFilter.java - About 50 mins to fix

Method getTreeCellRendererComponent has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

                public Component getTreeCellRendererComponent(final JTree tree,
                    final Object value, final boolean sel, final boolean expanded, final boolean leaf,
                    final int row, final boolean hasFocus) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MyList.java - About 50 mins to fix

Method openNewWindow has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final MyDBTable dbTable, final Integer row, final Integer col, final Object[][] conditions) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 50 mins to fix

Method init has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

  private void init(Point loc, Dimension siz, String inhalt, boolean keyDispose, Dimension dim, Font font, boolean modal) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/InfoBox.java - About 50 mins to fix

Method openNewWindow has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final String mnTable, final String mnID, final MyDBForm dbForm, final JDialog owner) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 50 mins to fix

Method fillHashtable has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private static LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim,
            final boolean goDeeper, final boolean forceUpdate, HashSet<MyTable> alreadyUsed) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 50 mins to fix
Severity
Category
Status
Source
Language