SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method createAllPossibleSimulations has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

  public static void createAllPossibleSimulations(FskPortObject firstFskObj,
      FskPortObject secondFskObj, CombinedFskPortObject outObj) {

    int indexFirst = 0;
    int indexSecond = 0;

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

    public double[][] getFunctionPoints(String paramX, String paramY,
            String unitX, String unitY, String transformX, String transformY,
            double minX, double maxX, double minY, double maxY,
            Map<String, Integer> choice) throws ConvertException {
        if (function == 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 sortCols has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    private Map<NameAndDbId, Integer> sortCols(Map<NameAndDbId, Integer> columns) {
        Map<NameAndDbId, Integer> sortedColumns = new LinkedHashMap<NameAndDbId, Integer>();
        for (NameAndDbId col : columns.keySet()) {
            if (JCheckboxWithObject.isAgent(col.getName())) sortedColumns.put(col, columns.get(col));
        }

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

    private DataTable createDataTable(ExpColumnList colList, List<DataPoint> dataPoints) {
        DataTable table = DataTable.Factory.newInstance();
        
        table.setColumnList(colList.columnList);

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

    @Override
    public Object getValueAt(int row, int col) {
      if (col == 0)
        return FskMetaDataFields.values()[row].fullname;
      else if (col == 1) {

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 deserialize has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public GenericModelGeneralInformation deserialize(JsonParser parser, DeserializationContext context)
                throws IOException, JsonProcessingException {

            JsonNode node = parser.readValueAsTree();

Method retrieveParameter has 77 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 retrieveParameter has 77 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");

Function localCompile has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function localCompile(_schema, _root, localRefs, baseId) {
    var isRoot = !_root || (_root && _root.schema == _schema);
    if (_root.schema != root.schema)
      return compile.call(self, _schema, _root, localRefs, baseId);

Function generate_propertyNames has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;
  var $dataLvl = it.dataLevel;
  var $schema = it.schema[$keyword];

Function generate__limitLength has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function generate__limitLength(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;
  var $dataLvl = it.dataLevel;
  var $schema = it.schema[$keyword];

Function generate_contains has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function generate_contains(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;
  var $dataLvl = it.dataLevel;
  var $schema = it.schema[$keyword];

File ChartSamplePanel.java has 294 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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    @Override
    protected void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException {

        // Load settings and update dialog
        try {
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/pmfwriter/PMFWriterNodeDialog.java on lines 153..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 193.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    @Override
    protected void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException {

        // Load settings and update dialog
        try {
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/pmfwriter/fsk/NodeDialog.java on lines 152..178

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 193.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  function AjaxAdapter ($element, options) {
    this.ajaxOptions = this._applyDefaults(options.get('ajax'));

    if (this.ajaxOptions.processResults != null) {
      this.processResults = this.ajaxOptions.processResults;
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 3658..3666

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    healthModel: {

        scope: [
            {
                id: "generalComment",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js and 3 other locations - About 3 hrs to fix
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1340..1364
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1681..1705
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1709..1733

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    processModel: {

        scope: [
            {
                id: "generalComment",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js and 3 other locations - About 3 hrs to fix
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1340..1364
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1681..1705
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1768..1792

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  function AjaxAdapter ($element, options) {
    this.ajaxOptions = this._applyDefaults(options.get('ajax'));

    if (this.ajaxOptions.processResults != null) {
      this.processResults = this.ajaxOptions.processResults;
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 3 hrs to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 3407..3415

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    toxicologicalModel: {

        scope: [
            {
                id: "generalComment",
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js and 3 other locations - About 3 hrs to fix
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1340..1364
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1709..1733
de.bund.bfr.knime.js/js-lib/bfr/fskapp/editor_data_1.0.0.js on lines 1768..1792

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language