SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method fetchConditions has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    private List<ConditionsData> fetchConditions(BufferedDataTable table) {

        /**
         * Two types of conditions tables:
         * <ol>

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

    public static KnimeTuple decodeTuple(final Model1DataTuple m1DataTuple) {
        final KnimeTuple outTuple = new KnimeTuple(SchemaFactory.createM1DataSchema());

        outTuple.setValue(TimeSeriesSchema.ATT_CONDID, m1DataTuple.condId);
        outTuple.setValue(TimeSeriesSchema.ATT_COMBASEID, m1DataTuple.combaseId);

Function d3_geo_clipCircle has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geo_clipCircle(radius) {
    var cr = Math.cos(radius), smallRadius = cr > 0, point = [ radius, 0 ], notHemisphere = Math.abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
    return d3_geo_clip(visible, clipLine, interpolate, polygonContains);
    function visible(λ, φ) {
      return Math.cos(λ) * Math.cos(φ) > cr;

Function debounce has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function debounce(func, wait, options) {
      var args,
          maxTimeoutId,
          result,
          stamp,

File MyDBTreeModel.java has 328 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
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtree/MyDBTreeModel.java - About 3 hrs to fix

Method itemStateChanged has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                for (String column : mappingBoxes.keySet()) {
                    if (e.getSource() == mappingBoxes.get(column)) {

Function _initRangeslider has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _initRangeslider ( container ) {
        let O = this;
        _log( 'UI / _initRangeslider' );

        let $elems = $( container ).length > 0 ? $( container ).find( '[data-rangeslider]' ) : $( '[data-rangeslider]' );
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.ui.js - About 3 hrs to fix

Function click has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        click: function(e) {
            e.preventDefault();
            var target = $(e.target).closest('span, td, th');
            if (target.length == 1) {
                switch(target[0].nodeName.toLowerCase()) {

SwaggerUtil has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SwaggerUtil {

    @Deprecated
    public static de.bund.bfr.metadata.swagger.GenericModelGeneralInformation convert(
            metadata.GeneralInformation deprecatedGeneralInformation) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs to fix

Assay has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class Assay {
  @SerializedName("name")
  private String name = null;

JSONDataTableSpec has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

@JsonAutoDetect
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public class JSONDataTableSpec {

    /**

PmmTimeSeriesTest has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("static-method")
public class PmmTimeSeriesTest {

    @Test
    public void testConstructors() {

File mllike.js has 326 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: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/mllike/mllike.js - About 3 hrs to fix

Method getTableCellRendererComponent has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

          public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int columnIndex) {
              JComponent c;
              if (columnIndex == 0) {
                    Boolean indep = (Boolean) table.getValueAt(rowIndex, 2);
                    if (indep == null) indep = false;

File SBMLWriterNodeModel.java has 325 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

Function tokenBase has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {
    // Handle scope changes
    if (stream.sol()) {
      if (state.scope.align === null) state.scope.align = false;
      var scopeOffset = state.scope.offset;

Method retrieveParameter has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Parameter retrieveParameter(Row row, Map<String, Integer> columns) {

        // Check first mandatory properties
        final Cell idCell = row.getCell(columns.get("id"));
        if (idCell == null || idCell.getCellTypeEnum() == CellType.BLANK) {

Method loadDBNew has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private MainFrame loadDBNew(MyDBI myDBi, String dbPath, Boolean autoUpdate, boolean openTheGui, boolean beInteractive) {
        MainFrame mf = null;
        MyDBTable myDB = null;
        boolean doUpdates = false;
        try {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/Login.java - About 3 hrs to fix

Method doImportMaciel has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private int[] doImportMaciel(HSSFWorkbook wb, JProgressBar progress, String efsaID) {
        int numSuccess = 0;
        int numFails = 0;
        HSSFSheet businessSheet = wb.getSheet("Business_List");
        HSSFSheet transactionSheet = wb.getSheet("Receivers");

Method performExecute has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  protected PortObject[] performExecute(PortObject[] inObjects, ExecutionContext exec)
      throws Exception {
    convertMetadataToGenericVersion(inObjects);
    PortObject svgImageFromView = null;
Severity
Category
Status
Source
Language