SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method setSettings has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public void setSettings(Config c, double[] volumeDef, String[] volumeUnitDef) {
        panel1.removeAll();
        l1.clear();
        lmat.clear();
        lage.clear();

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 retrieveParameter has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

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 retrieveParameter has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

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 getDataBackground has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public static Object getDataBackground(Model model) {
        Object background;

        final String modelType = model.getModelType();
        if (modelType.equalsIgnoreCase("genericModel")) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs 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 getModelMath has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public static Object getModelMath(Model model) {
        Object math;

        final String modelType = model.getModelType();
        if (modelType.equalsIgnoreCase("genericModel")) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs 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 getParameter has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public static List<Parameter> getParameter(Model model) {
        List<Parameter> parameters;

        final String modelType = model.getModelType();
        if (modelType.equalsIgnoreCase("genericModel")) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs 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 getGeneralInformation has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public static Object getGeneralInformation(Model model) {
        Object information;

        final String modelType = model.getModelType();
        if (modelType.equalsIgnoreCase("genericModel")) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs 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 getScope has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public static Object getScope(Model model) {
        Object scope;

        final String modelType = model.getModelType();
        if (modelType.equalsIgnoreCase("genericModel")) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs 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 loadSettings has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public void loadSettings(NodeSettingsRO settings) {
        try {
            selectedIDs = XmlConverter.xmlToObject(
                    settings.getString(CFG_SELECTEDIDS),
                    new ArrayList<String>());

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 createChart has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public void createChart() throws ConvertException {
        List<String> selectedIDs = null;

        if (configPanel.isDisplayFocusedRow()) {
            selectedIDs = Arrays.asList(selectionPanel.getFocusedID());

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 initGUI has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    private void initGUI() {
        String error = "";

        joinerBox.removeActionListener(this);
        joinerBox.setSelectedItem(set.getJoinType());

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 setSettings has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public void setSettings(Config c, Integer defAgent, Integer defMatrix, Double defTemp, Double defPh, Double defAw, Double agentConc, Callable<Void> refresher) throws InvalidSettingsException {
        this.defTemp = defTemp;
        this.defPh = defPh;
        this.defAw = defAw;
        this.agentConc = agentConc;

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 dbBackup has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    private static void dbBackup(final JFrame frame, final File backupFile, final boolean silent) {
        if (backupFile != null && backupFile.getParentFile().exists()) {
            try {
                if (backupFile.exists()) backupFile.delete();
                System.gc();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/BackupMyDBI.java - About 3 hrs 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 handleField has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    private static String handleField(final Object id, final MyTable[] foreignFields, final String[] mnTable, final int i, final boolean goDeeper, final String startDelim,
            final String delimiter, final String endDelim, HashSet<MyTable> alreadyUsed) {
        String result = "";
        if (id == null) {
            ;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 3 hrs 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 changeUser has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

  private void changeUser(final Object oldUser[], final Object newUser[]) {
        if (newUser != null && newUser[1] != null && newUser[1].toString().length() > 0) {
            String newUsername = newUser[1].toString();
            int newAccRight = Users.READ_ONLY;
            if (newUser[4] != null && newUser[4] instanceof Integer) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTrigger.java - About 3 hrs 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 retrieveParameter has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Parameter retrieveParameter(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
            throw new IllegalArgumentException("Missing parameter id");

Method checkTable4ISM has 89 lines of code (exceeds 25 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 {
        LinkedHashMap<String[], LinkedHashSet<String[]>> ldResult = new LinkedHashMap<>();
        if (maxScores.length != fieldnames.length) {
            System.err.println("fieldnames and simScores with different size...");
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.java - About 3 hrs to fix

Method loadPortObject has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        @SuppressWarnings("unchecked")
        public FskPortObject loadPortObject(PortObjectZipInputStream in, PortObjectSpec spec, ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {

Method createUI has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private void createUI() {

    final NodeContext nodeContext = NodeContext.getContext();
    final WorkflowManager wfm = nodeContext.getWorkflowManager();
    final WorkflowContext workflowContext = wfm.getContext();

File KnimeTuple.java has 315 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
Severity
Category
Status
Source
Language