SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method getQualityScore has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Integer getQualityScore() throws PmmException {
        PmmXmlDoc mdInfoXmlDoc = getMdInfo();
        if (mdInfoXmlDoc != null) {
            MdInfoXml mdix = null;
            for (PmmXmlElementConvertable el : mdInfoXmlDoc.getElementSet()) {

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

    public static double getSeconds(String unit) {
        if (unit == null) return 1;
        if (unit.equalsIgnoreCase("min")) return 60;
        if (unit.equalsIgnoreCase("h")) return 60*60;
        if (unit.equalsIgnoreCase("d")) return 24*60*60;

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

    private static void checkInWindowsFolders(File[] folders) {
        for (File folder : folders) {
            File binDir = new File(folder, "bin");
            if (binDir.isDirectory()) {
                File executable = new File(binDir, "R.exe");

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

    public static LinkedHashMap<String, String> getVarParMap(String varparStr) {
        LinkedHashMap<String, String> ret = new LinkedHashMap<>();
        if (varparStr != null) {
            String[] t1 = varparStr.split(",");
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 25 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 getRBinPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public Path getRBinPath(final String command) {
        Path binPath = Paths.get(getRHome(), "bin");

        if (Platform.getOS().equals(Platform.OS_WIN32)) {

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

    private static void findSystemRUnix() {
        String[] searchPaths = { "/usr/bin/R", "/usr/local/bin/R" };
        for (String s : searchPaths) {
            File f = new File(s);
            if (f.canExecute()) {

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

    public static Map<NameAndDbId, Integer> createColumnMap(final PCMLDocument pcmlDoc) {
        Map<NameAndDbId, Integer> columns = new LinkedHashMap<NameAndDbId, Integer>();

        XmlObject[] xmlObjects = pcmlDoc.selectPath("declare namespace s='" + PCMLUtil.getPCMLNamespace(pcmlDoc) + "' " + ".//s:ColumnList");
        for (XmlObject xmlObject : xmlObjects) {

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

  private static DataType importDataType(final REXP column) {
    if (column.isNull()) {
      return StringCell.TYPE;
    } else if (column.isLogical()) {
      return BooleanCell.TYPE;

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

    protected void waitWhile(final NodeContainer nc,
            final Hold hold) throws Exception {
        if (!hold.shouldHold()) {
            return;
        }
Severity: Minor
Found in de.bund.bfr.knime.testflows/src/WorkflowTestCase.java - About 25 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 executeAndWait has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected void executeAndWait(final NodeID... ids)
            throws Exception {
            NodeID prefix = null;
            WorkflowManager parent = null;
            for (NodeID id : ids) {
Severity: Minor
Found in de.bund.bfr.knime.testflows/src/WorkflowTestCase.java - About 25 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 validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        validate() {
            let O = this;
            let isValid;
            O.input.find( '.has-error' ).removeClass( 'has-error' );
            O.input.find( '.is-invalid' ).removeClass( 'is-invalid' );
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.SelectForm.js - About 25 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 _metadataDate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    _metadataDate: function _metadataDate(data) {
        if(data && data.constructor == Array) {
            var dTemp = new Date(data);
            if (Object.prototype.toString.call(dTemp) === "[object Date]") {
            // it is a date
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.utils.js - About 25 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 _blob has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    _blob         : async ( src, id, signal ) => {
        _log( 'UTILS / _fetchData._blob: '+ src + ', '+ id + ', ' + window._token);
        let data = null;
        // append id if not type "set"
        src = ! _isNull( id ) ? src + id + window._token: src  + window._token;
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.utils.js - About 25 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 _saveSimulation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    async _saveSimulation () {
        let O = this;
        _log( 'PANEL SIM / _saveSimulation', 'secondary' );

        if(O._$simNameInput.val() == ""){
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 25 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 validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        validate() {
            let O = this;
            let isValid;
            O.input.find( '.has-error' ).removeClass( 'has-error' );
            O.input.find( '.is-invalid' ).removeClass( 'is-invalid' );
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.TextareaForm.js - About 25 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 addRow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    addRow( rowIndex, rowData, tableData, isMainTable, isEdit) {
        
        let O = this;
        tableData = O._tableData
        // row
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 25 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

Severity
Category
Status
Source
Language