SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

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

  public static LinkedHashMap<String, Object[]> generateColorMap(FskPortObject portObject,
      LinkedHashMap<String, Object[]> originalNamesMap, List<Parameter> topLevelJoinedModelParams, 
       AtomicInteger index, AtomicInteger generatedColorInt) {
    
    if (originalNamesMap == 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 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

Method codeM2Schema has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private List<JsM2Schema> codeM2Schema(List<KnimeTuple> tuples) {
        List<JsM2Schema> schemas = new ArrayList<>(tuples.size());

        for (KnimeTuple tuple : tuples) {

Method execute has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
            final ExecutionContext exec) throws Exception {
        //mergeInportNSettings(inData);
        if (doc != null) {            

Method stepNew has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private PmmTimeSeries stepNew(BufferedReader reader) throws IOException {
        // initialize next time series
        PmmTimeSeries next = new PmmTimeSeries();

        while (true) {

Method initComponents has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        withoutData = new JCheckBox();
        modelReaderUi = new ModelReaderUi(true);
        qualityPanel = new JPanel();

Method getMetaData has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public FskMetaData getMetaData() {
    FskMetaData template = new FskMetaData();

    Model model = doc.getModel();

Function tokenSmarty has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function tokenSmarty(stream, state) {
      if (stream.match(rightDelimiter, true)) {
        if (version === 3) {
          state.depth--;
          if (state.depth <= 0) {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/smarty/smarty.js - About 3 hrs to fix
Severity
Category
Status
Source
Language