SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File ModelReaderUi.java has 337 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

File AgentDocumentImpl.java has 337 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * An XML document type.
 * Localname: Agent
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.AgentDocument

File MatrixDocumentImpl.java has 337 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * An XML document type.
 * Localname: Matrix
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.MatrixDocument

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

    public void loadSettings(NodeSettingsRO settings) {
        try {
            selectedID = settings.getString(CFG_SELECTEDID);
        } catch (InvalidSettingsException e) {
        }

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

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == fittingBox) {
            initGUI();
        } else if (e.getSource() == expertBox) {

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

    @Override
    protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
            throws InvalidSettingsException {
        KnimeSchema outSchema = null;
        boolean conformsPrimary = SchemaFactory.conformsM1Schema(inSpecs[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 keyPressed has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void keyPressed(final KeyEvent keyEvent) {
      //System.out.println(keyEvent.getKeyCode() + "\t" + keyEvent.getKeyChar() + "\t" + KeyEvent.VK_F + "\t" + keyEvent.isControlDown());
    if (keyEvent.isControlDown() && keyEvent.getKeyCode() == KeyEvent.VK_LEFT) { //Ctrl+<-, Aussredem geht auch F8
        keyEvent.consume();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 4 hrs to fix

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

      @SuppressWarnings("unchecked")
    private void setTable(final MyTable myT) {
        if (myT != null) {
            root = new DefaultMutableTreeNode(new MyDBTreeNode(0, "", "Codes", false, -1));            
        // Erst die Codetypen
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtree/MyDBTreeModel.java - About 4 hrs to fix

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

    private void readDB(final LinkedHashMap<String, DefaultMutableTreeNode> myCodes, final int codeSystemNum, final DefaultMutableTreeNode root, final String sql, final String tablename_codeSystem, int[] cutSystem) {
        myIDs[codeSystemNum].clear(); myCodes.clear();
        try {
              ResultSet rs = DBKernel.getResultSet(sql, false);
              if (rs.first()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtree/MyDBTreeModel.java - About 4 hrs to fix

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

    private int insertEstModel(String name, final int condId, final int modelId, final Double rms, final Double rsquared, final Double aic, final Double bic, final int responseId,
            Integer qualityScore, Boolean isChecked, Integer workflowID, String comment) {
        int ret = -1;
        try {
            PreparedStatement ps = conn.prepareStatement(

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

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

    Model model = doc.getModel();

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

    private void plotFunctionSample(XYPlot plot, Plotable plotable, String id,
            Color defaultColor, Shape defaultShape, double minX, double maxX,
            List<String> warnings) throws ConvertException {
        double[][] functionPoints = plotable.getFunctionPoints(paramX, paramY,
                unitX, unitY, transformX, transformY, minX, maxX,

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

    private void plotBoth(XYPlot plot, Plotable plotable, String id,
            Color defaultColor, Shape defaultShape, double minX, double maxX)
            throws ConvertException {
        double[][] modelPoints = plotable.getFunctionPoints(paramX, paramY,
                unitX, unitY, transformX, transformY, minX, maxX,

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

Function edit has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

        edit(index, originalData, dialog) {
            let O = this;
            let keys = [];
            $.each(O.panelTable.opts.cols,function(index,key){
                keys.push(key.field);
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js - About 4 hrs to fix

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 initComponents has 102 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());
        toolBar1 = new JToolBar();
        button7 = new JButton();
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/MainFrame.java - About 4 hrs to fix

Method saveFSKPortObject has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void saveFSKPortObject(FskPortObject portObject, final PortObjectZipOutputStream out,
                final ExecutionMonitor exec) throws IOException {

            // First FSK Object
            // model entry (file with model script)

Method drawAxisLine has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void drawAxisLine(Graphics2D g2, double cursor,
            Rectangle2D dataArea, RectangleEdge edge) {
        Line2D axisLine = null;
        if (edge == RectangleEdge.TOP) {

Function quadtree has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.geom.quadtree = function(points, x1, y1, x2, y2) {
    var x = d3_svg_lineX, y = d3_svg_lineY, compat;
    if (compat = arguments.length) {
      x = d3_geom_quadtreeCompatX;
      y = d3_geom_quadtreeCompatY;

Function addMetaData has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function addMetaData(modelObject) 
    {
        
        /*
         * Accordion needs a header followed by a div. We add a paragraph per parameter.

Function _process_options has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _process_options: function(opts){
            // Store raw options for reference
            this._o = $.extend({}, this._o, opts);
            // Processed options
            var o = this.o = $.extend({}, this._o);
Severity
Category
Status
Source
Language