SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function _generatePosition has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _generatePosition: function( event, constrainPosition ) {

        var containment, co, top, left,
            o = this.options,
            scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),

File SettingsHelper.java has 276 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 createPanel has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public JComponent createPanel(String assignments) {
        Map<String, Map<String, String>> assignmentsMap = XmlConverter
                .xmlToObject(assignments,
                        new LinkedHashMap<String, Map<String, String>>());

Method readValues has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void readValues() {
        textField1.setText(""); textField1_exp.setText(""); checkBox1.setSelected(false);
        comboBox2.setSelectedIndex(0);
        textField3.setText(""); checkBox3.setSelected(false);
        textField4.setText(""); textField4_exp.setText(""); checkBox4.setSelected(false);

Method fillWithData has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void fillWithData(String tablename, int row) {
        String sql= "SELECT * FROM " + DBKernel.delimitL(tablename);
        ResultSet rs = DBKernel.getResultSet(sql, false);
        try {
            if (rs != null && rs.absolute(row)) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.java - About 2 hrs to fix

Method doExport has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void doExport(final String filename, final MyDBTable myDB, final JProgressBar progress, final boolean exportFulltext, final String zeilen2Do) {
        //filename = "C:/Users/Armin/Documents/private/freelance/BfR/Data/100716/Matrices_BLS-Liste.xls";
      Runnable runnable = new Runnable() {
      public void run() {
            try {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/exports/ExcelExport.java - About 2 hrs to fix

Method insertEm has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Integer insertEm(final ParametricModel pm, Integer workflowID, final ParametricModel ppm) { // , HashMap<String, String> hm
        Integer estModelId = null;

        Double rms = pm.getRms();
        Double r2 = pm.getRsquared();

Method runFskPortObject has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public FskPortObject runFskPortObject(ScriptHandler handler, FskPortObject fskObj, LinkedHashMap<String,String> originalOutputParameters,
      ExecutionContext exec) throws Exception {
    LOGGER.info("Running Model: " + fskObj);
    
    

Method generateJoinerRelationAdvanced has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public static List<JoinRelationAdvanced> generateJoinerRelationAdvanced(FskPortObject portObject,
      LinkedHashMap<String, Object[]> originalNamesMap, List<Parameter> topLevelJoinedModelParams, List<JoinRelation> joinRelations,
       AtomicInteger index, List<JoinRelationAdvanced> joinRelationList, LinkedHashMap<String, String> ModelsToSuffixMap, List<JoinRelation> foundRelation) {
    if (joinRelationList == null) {
      joinRelationList = new ArrayList<>();

File dylan.js has 275 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/dylan/dylan.js - About 2 hrs to fix

Function init has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  TextareaInput.prototype.init = function (display) {
      var this$1 = this;

    var input = this, cm = this.cm;
    this.createField(display);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

File app.editable.mt.details.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*

version: 1.0.0
author: Ahmad Swaid
date: 17.12.2020
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.details.js - About 2 hrs to fix

Function initSort has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initSort = function () {
        var that = this,
            name = this.options.sortName,
            order = this.options.sortOrder === 'desc' ? -1 : 1,
            index = $.inArray(this.options.sortName, this.header.fields),

Function resetBinaryFormulaBindings has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function resetBinaryFormulaBindings(model) {
        
        // not necessary for data points
        if(model.fnType == 'points')
            return;

Method retrieveGeneralInformation has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public DataModelGeneralInformation retrieveGeneralInformation(Sheet sheet) {

        DataModelGeneralInformation information = new DataModelGeneralInformation();

        Cell nameCell = sheet.getRow(GENERAL_INFORMATION__NAME).getCell(J);

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

    @Override
    protected void saveSettingsTo(NodeSettingsWO settings) throws InvalidSettingsException {
        if (!temperatureField.isValueValid()) {
            throw new InvalidSettingsException("Invalid Value");
        }

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

    private List<KnimeTuple> decodeM2Schemas(List<JsM2Schema> schemas) {

        List<KnimeTuple> tuples = new ArrayList<>(schemas.size());

        KnimeSchema knimeSchema = SchemaFactory.createM2Schema();

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

    private Map<String, String> getInvalidIds(List<String> selectedIDs)
            throws ConvertException {
        Map<String, String> invalid = new LinkedHashMap<>();
        Set<String> nonVariables = new LinkedHashSet<>();

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

    private void doBuf(KnimeTuple tupleM1, PmmTimeSeries tstuple, List<KnimeTuple> rowSec, BufferedDataContainer buf, KnimeSchema ks) {
        if (tupleM1 != null) {
            // Set primary variable names to TimeSeriesSchema.TIME and TimeSeriesSchema.LOGC
            PmmXmlDoc modelXml = tupleM1.getPmmXml(Model1Schema.ATT_MODELCATALOG);
            String formula = ((CatalogModelXml) modelXml.get(0)).formula;

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

    public PmmXmlDoc listToDoc() throws InvalidSettingsException {
        if (listModel == null || listModel.size() == 0) {
            if (m_mmcts != null && m_mmcts.getCondId() != null) getPM().condId = m_mmcts.getCondId();
            return toDoc();
        }

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

Severity
Category
Status
Source
Language