SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method doImportStandard has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
Open

    private int[] doImportStandard(HSSFWorkbook wb, JProgressBar progress, String filename) {
        int numSuccess = 0;
        int numFails = 0;
        HSSFSheet transactionSheet = wb.getSheet("Transactions");

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

File WriterUtils.java has 879 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.pmm.common.writer;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;

File XLSReader.java has 873 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

File SwaggerConsumptionSheetImporter.java has 872 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

File SwaggerHealthModelSheetImporter.java has 872 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

File SwaggerToxicologicalSheetImporter.java has 872 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

File FoodProcessUi.java has 868 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

File SwaggerProcessModelSheetImporter.java has 865 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;


import java.math.BigDecimal;
import java.util.Arrays;

File ParametricModel.java has 862 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

DBKernel has 108 methods (exceeds 20 allowed). Consider refactoring.
Open

public class DBKernel {

    /**
     * @param args
     */
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 2 days to fix

File javascript.js has 861 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS

File EmfMetadataModule.java has 858 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

Method monitoredAssign has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public void monitoredAssign(final String name, final BufferedDataTable table,
      final ExecutionMonitor exec, final int batchSize, final String rType,
      final boolean sendRowNames) throws RException, CanceledExecutionException {

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

    private Integer getID(String tablename, String[] feldnames, String[] feldVals, boolean[] key, boolean[] isStringType) {
        Integer result = null;
        String sql = "SELECT " + DBKernel.delimitL("ID") + " FROM " + DBKernel.delimitL(tablename) + " WHERE TRUE";
        String fns = "";
        String fvs = "";

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

File CombinedFskPortObject.java has 843 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

File editor.js has 842 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// For debug purposes
function printKeys(object) {
    for (var key in object) { alert(key); }
}

File SwaggerDoseResponseSheetImporter.java has 840 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

File clike.js has 837 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/clike/clike.js - About 2 days to fix

Method getDataTable has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring.
Open

    private void getDataTable(Bfrdb db) {
        try {
            try {
                if (refresher != null) refresher.call();
            }

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

File SwaggerPredictiveModelSheetImporter.java has 836 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package metadata;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
Severity
Category
Status
Source
Language