SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function invariant has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

function invariant(condition, format, a, b, c, d, e, f) {

Consider simplifying this complex logical expression.
Open

        if (objCtor != othCtor &&
            ('constructor' in object && 'constructor' in other) &&
            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
          return false;

Function createWrapper has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {

Function _fill_yearsView has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

        _fill_yearsView: function(selector, cssClass, factor, step, currentYear, startYear, endYear, callback){

Consider simplifying this complex logical expression.
Open

      if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
                               _.isFunction(bCtor) && bCtor instanceof bCtor)
                          && ('constructor' in a && 'constructor' in b)) {
        return false;
      }

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

    public void loadSettings( final Config config ) throws InvalidSettingsException {        
        volume = config.containsKey(PARAM_VOLUME) ? config.getString( PARAM_VOLUME ) : null;
        volumeUnit = config.getString(PARAM_VOLUME_UNIT);
        temperature = config.containsKey(PARAM_TEMPERATURE) ? config.getString( PARAM_TEMPERATURE ) : null;
        tempAlt = config.containsKey(PARAM_TEMPERATUREALT) ? config.getString( PARAM_TEMPERATUREALT ) : null;

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

    public void saveSettings( final Config config ) {
        if (volume != null) {
            config.addString( PARAM_VOLUME, volume );
        }
        config.addString(PARAM_VOLUME_UNIT, volumeUnit);

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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

    private void calculateNewTimes(final Map<String, ProcessNode> processNodes, final Map<String, ProcessData> processChainData,
            final ProcessNode processNode, final Double time) {
        Inport[] in = processNode.getInportArray();
        for (int i = 0; i < in.length; i++) {
            OutportRef opr = in[i].getOutportRef();

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

    static ModelEquation convertModelEquation(JsonNode node) {

        ModelEquation equation = new ModelEquation();

        if (node.has("modelEquationName")) {

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

    private void removeAllRelevantComponents(JPanel panel) {
        if (panel != null) {
            for (int i=0;i<panel.getComponentCount();i++) {
                Component c = panel.getComponent(i);
                if (c instanceof JPanel) {

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

    public GenericModelScope retrieveScope(Sheet sheet) {

        GenericModelScope scope = new GenericModelScope();

        for (int numrow = 38; numrow <= 49; numrow++) {

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

    public OtherModelScope retrieveScope(Sheet sheet) {

        OtherModelScope scope = new OtherModelScope();
        
        

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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

    public GenericModelScope retrieveScope(Sheet sheet) {
    
        GenericModelScope scope = new GenericModelScope();

        for (int numrow = SCOPE_PRODHAZPOP_ROW; numrow <= (SCOPE_PRODHAZPOP_ROW + 11); numrow++) {

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

    static Assay convertAssay(JsonNode node) {

        Assay assay = new Assay();

        if (node.has("assayName")) {

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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

    public Assay retrieveAssay(Row row) {
        // Check first mandatory properties
        if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing assay name");
        }

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