SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

StudySample has 34 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 StudySample {
  @SerializedName("sampleName")
  private String sampleName = null;

Method loadFromXLS has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void loadFromXLS() {
        JFileChooser fileChooser = new JFileChooser();
        FileFilter xlsFilter = new FileFilter() {

            @Override

Method execute has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {

        Bfrdb db = null;
        try {

Function tree has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.tree = function() {
    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
    function tree(d, i) {
      var nodes = hierarchy.call(this, d, i), root = nodes[0];
      function firstWalk(node, previousSibling) {

File test.js has 346 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 () {
    var mode = CodeMirror.getMode({indentUnit: 2}, "clojure");
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/clojure/test.js - About 4 hrs to fix

Method loadSettings has 107 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void loadSettings(NodeSettingsRO settings) {
        try {
            selectedIDs = XmlConverter.xmlToObject(
                    settings.getString(CFG_SELECTEDIDS),
                    new ArrayList<String>());

Method check4Updates_183_184 has 107 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static void check4Updates_183_184() {
        try {
            ResultSet rs = DBKernel.getResultSet(
                    "SELECT MIN(\"Agenzien\".\"Agensname\") AS \"Agensname\", MIN(\"Versuchsbedingungen\") AS \"Versuchsbedingung\" FROM \"Messwerte\"" +
                            " LEFT JOIN \"Versuchsbedingungen\" ON \"Versuchsbedingungen\".\"ID\" = \"Messwerte\".\"Versuchsbedingungen\"" +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/UpdateChecker.java - About 4 hrs to fix

File julia.js has 345 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/julia/julia.js - About 4 hrs to fix

File crystal.js has 344 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/crystal/crystal.js - About 4 hrs to fix

Method createTupleFromTemplate has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

  public static KnimeTuple createTupleFromTemplate(FSMRTemplate template) {
    KnimeTuple tuple = new KnimeTuple(new OpenFSMRSchema());
    
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Severity: Minor
Found in de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/FSMRUtils.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 actionPerformed has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == computeButton) {
            UnitDefinition unit = new UnitDefinition(idField.getText().trim(),
                    LEVEL, VERSION);

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

    void button11ActionPerformed(ActionEvent e) {
        if (isFormVisible()) {
            return;
        }
        if (parentDialog != null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBPanel.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 29 (exceeds 5 allowed). Consider refactoring.
Open

      @SuppressWarnings("unchecked")
    public boolean setTable(final MyTable myT, final Object[][] conditions, String andOrDefault) {
        boolean result = true;
        if (DBKernel.mainFrame != null) {
            DBKernel.mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
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 updateColumnsPanel has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

    private void updateColumnsPanel() {
        if (!fileColumnList.isEmpty()) {
            columnBoxes.clear();
            columnButtons.clear();
            columnUnitBoxes.clear();

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

     private boolean loopInternal(Vector<Integer> vv, int row, String[] mnTable, MyTable[] foreignFields, TableModel tm, String[] findStrings, HashSet<Integer> cols2Search) {
         String res = "";
         for (int col = 0; col < tm.getColumnCount(); col++) {
             if (cols2Search == null || cols2Search.size() == 0 || cols2Search.contains(col)) {
                 boolean isMN = (col > 0 && mnTable != null && mnTable.length > col-1 && mnTable[col-1] != null);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/editoren/MyFilter.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 createChart has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

    public JFreeChart createChart(PCMLDocument pcmlDoc, List<String> usedParameters, String xUnits,
            boolean equidistantProcesses, boolean plotLines, boolean plotPoints) {
        Map<NameAndDbId, Integer> columns = PCMLDataTable.createColumnMap(pcmlDoc);
        Map<String, ProcessNode> processNodes = PCMLDataTable.createProcessNodeMap(pcmlDoc);
        DataTableSpec spec = PCMLDataTable.createOutSpec(columns);

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

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == agentButton) {
            Integer id;

Method createChart has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void createChart() {
        String selectedID = null;

        if (configPanel.isDisplayFocusedRow()) {
            selectedID = selectionPanel.getFocusedID();

Method doImport has 106 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() {
                System.err.println("Importing " + filename);
                logMessages += "Importing " + filename + "\n";

Method getFunctionSamplePointsErrors has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getFunctionSamplePointsErrors(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice) throws ConvertException {
        if (function == null) {
Severity
Category
Status
Source
Language