SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File joiner.js has 516 lines of code (exceeds 250 allowed). Consider refactoring.
Open

joiner = function () {

  // Dimension utility functions.
  // Returns the windows width minus the left and right padding.
  const getChartWidth = () => window.innerWidth - 32;

Method createPackageContents has 209 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features

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

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        ResourceBundle bundle = ResourceBundle.getBundle("org.hsh.bfr.db.gui.PanelProps_" + DBKernel.getLanguage());
        button12 = new JButton();
        panel1 = new JPanel();
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBPanel.java - About 1 day to fix

Parameter has 58 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:56:22.998Z")
public class Parameter {
  @SerializedName("id")
  private String id = null;

SettingsHelper has 58 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SettingsHelper {

    private static final String CFG_SELECTEDID = "SelectedID";
    private static final String CFG_CURRENTPARAMX = "CurrentParamX";
    private static final String CFG_PARAMXVALUES = "ParamXValues";

ChartCreator has 58 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ChartCreator extends ChartPanel {

    private static final long serialVersionUID = 1L;

    private List<ZoomListener> zoomListeners;

File FskPortObject.java has 511 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.fsklab.v1_9;
/*
 ***************************************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *

File FskPortObject.java has 511 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.fsklab.v2_0;
/*
 ***************************************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *

Method doImportNewFormat has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
Open

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

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

    private List<JsM12DataSchema> codeM12DataSchema(List<KnimeTuple> tuples) {

        // sort tuples according to primary models
        // combined model = (Model1Schema + TimeSeriesSchema) + n x Model2Schema
        Map<Integer, List<KnimeTuple>> tertiaryModelMap = new HashMap<>();

File ReaderNodeUtil.java has 509 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.fsklab.v2_0.reader;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;

Bfrdb has 57 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Bfrdb {

    public static final String ATT_AGENTDETAIL = "AgensDetail";
    public static final String ATT_AGENTID = "Agens";
    public static final String ATT_AGENTNAME = "Agensname";

OutportImpl has 57 methods (exceeds 20 allowed). Consider refactoring.
Open

    public static class OutportImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements de.bund.bfr.pcml10.OutportDocument.Outport
    {
        private static final long serialVersionUID = 1L;
        
        public OutportImpl(org.apache.xmlbeans.SchemaType sType)

Outport has 57 methods (exceeds 20 allowed). Consider refactoring.
Open

    public interface Outport extends org.apache.xmlbeans.XmlObject
    {
        public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
            org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Outport.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s121DA543B1FCBC764F9DFAF30A6E9DAF").resolveHandle("outportb54aelemtype");
        

File pug.js has 506 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: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/pug/pug.js - About 1 day to fix

Function inlineNormal has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function inlineNormal(stream, state) {
    var style = state.text(stream, state);
    if (typeof style !== 'undefined')
      return style;

Function force has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.force = function() {
    var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, nodes = [], links = [], distances, strengths, charges;
    function repulse(node) {
      return function(quad, x1, _, x2) {
        if (quad.point !== node) {

Function _create has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _create: function() {
        // Some browsers only repeat keydown events, not keypress events,
        // so we use the suppressKeyPress flag to determine if we've already
        // handled the keydown event. #7269
        // Unfortunately the code for & in keypress is the same as the up arrow,

Function inlineNormal has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function inlineNormal(stream, state) {
    var style = state.text(stream, state);
    if (typeof style !== 'undefined')
      return style;

File PlausibleAction.java has 504 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: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.java - About 1 day to fix
Severity
Category
Status
Source
Language