SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

File CreatorNodeModel.java has 689 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 ***************************************************************************************************
 * Copyright (c) 2017 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

Method doLayout has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
Open

    public void doLayout(final Collection<NodeContainer> nodes) {

        int X_STRETCH = 100;
        int Y_STRETCH = 120;

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

    @SuppressWarnings("unchecked")
    public FskPortObject loadFSKPortObject(PortObjectZipInputStream in, PortObjectSpec spec,
        ExecutionMonitor exec) throws IOException, CanceledExecutionException {

      String modelScript = "";

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

File MetadataPackage.java has 681 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata;

import org.eclipse.emf.ecore.EAttribute;

Method run has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
Open

          public void run() {
            try {
                MyLogger.handleMessage("Importing PEX-File: " + filename);
                  if (progress != null) {
                      progress.setVisible(true);

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

    public static Vector<String[]> getPlausibilityRow(MyDBTable table, MyTable myT, int row, String idField) {
        String tablename = myT.getTablename();
        Vector<String[]> result = new Vector<>();
        String idConf;
        if (idField.equalsIgnoreCase("ID")) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 1 day 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 optimize has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
Open

    public void optimize(AtomicInteger progress, int nParameterSpace,
            int nLevenberg, boolean stopWhenSuccessful) {
        List<Double> paramMin = new ArrayList<>();
        List<Integer> paramStepCount = new ArrayList<>();
        List<Double> paramStepSize = new ArrayList<>();

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

File TableReader.java has 665 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 UpdateChecker.java has 665 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/UpdateChecker.java - About 1 day to fix

Method fillHashtable has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
Open

    LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim, final boolean goDeeper,
            final boolean forceUpdate, HashSet<MyTable> alreadyUsed) {
        if (theTable == null) {
            return null;
        }
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - About 1 day 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

File OutportDocumentImpl.java has 662 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

Method doImport has 295 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public String doImport(final String filename, final JProgressBar progress, final boolean showResults) {
        Runnable runnable = new Runnable() {
            public void run() {
                try {
                    if (progress != null) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/GeneralXLSImporter.java - About 1 day to fix

File MyTable.java has 657 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/MyTable.java - About 1 day to fix

Method getNewConc has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
Open

    private Double getNewConc(ValueAndUnit vau, PredictionValues pv, ParametersSetting ps, Double tempVal, Double phVal, Double awVal, Double presVal, double t, String timeUnit, Double lastConc, double stepWidth) {
        Double newVal = vau.getValue();
        boolean isPercent = false;

        PredictorViewNodeDialog pvnd = pv.getPvnd();

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

    @SuppressWarnings("unchecked")
    public FskPortObject loadFSKPortObject(PortObjectZipInputStream in, PortObjectSpec spec,
        ExecutionMonitor exec) throws IOException, CanceledExecutionException {

      String modelScript = "";

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

    public static PmmXmlDoc convertStringLists2TSXmlDoc(Array t, Array tu, Array l, Array lu, Array lot, Array stddevs, Array wdhs, String modelUnit, String timeUnit) {
        PmmXmlDoc tsDoc = new PmmXmlDoc();
        if (t != null) {
            try {
                Object[] toksT = (Object[])t.getArray();

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

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

public class SettingsHelper {

    public static final String DO_NOT_USE = "Do Not Use";
    public static final String OTHER_PARAMETER = "Select Other";
    public static final String SELECT = "Select";

File WriterNodeModel.java has 648 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 ***************************************************************************************************
 * Copyright (c) 2017 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

Method initializePackageContents has 288 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package

Method transformFormat has 288 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void transformFormat(HSSFWorkbook wb, HSSFWorkbook wbNew) {
        HSSFSheet transactionSheet = wb.getSheet("Transactions");
        HSSFSheet businessSheet = wb.getSheet("Business_List");
        int numRows = transactionSheet.getLastRowNum() + 1;
        HSSFSheet transactionSheetNew = wbNew.getSheet("NewTransactions");
Severity
Category
Status
Source
Language