SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method getForeignVal has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    private String getForeignVal(String tablename, int id, String fields) {
        String result = "";
        String sql= "SELECT " + fields + " FROM " + DBKernel.delimitL(tablename) + " WHERE " + DBKernel.delimitL("ID") + "=" + id;
        ResultSet rs = DBKernel.getResultSet(sql, false);
        try {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.java - About 2 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 parametersNeedUpdate has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

  public static boolean parametersNeedUpdate(List<Parameter> params, String firstSuffix,
      String secondSuffix) {
    boolean needsUpdate = false;

    if (params != null && !params.isEmpty()) {

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

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

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

  private static void writeArchive(File archiveFile, FskPortObject portObject,
      ExecutionContext exec) throws Exception {

    Map<String, URI> URIS = FSKML.getURIS(1, 0, 12);

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

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

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

  private void saveGeneratedResources(FskPortObject fskPortObject, File workingDirectory,
      ExecutionContext exec)
      throws ResourceFileNotFoundException, JsonFileNotFoundException, VariableNotGlobalException {

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

  private void resetParameterIdForObjectsFromJSON(FskPortObject outObj1, int suffixIndex) {
    String modelName = SwaggerUtil.getModelName(outObj1.modelMetadata);
    if (outObj1 instanceof CombinedFskPortObject) {
      ++suffixIndex;
      if (fskID_to_fskObject.containsKey(modelName) && suffixIndex > 1) {

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

    public double[][] getInverseFunctionSamplePoints(String paramX,
            String paramY, String unitX, String unitY, String transformX,
            String transformY, double minX, double maxX, double minY,
            double maxY, Map<String, Integer> choice, List<String> warnings)
            throws ConvertException {

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

    public void setDataPoints(Map<String, double[][]> points) {
        String timeColumnName = table.getTimeColumnName();
        List<Double> timeValues = getTimeValues();

        Map<String, Map<Double, Double>> cValues = new LinkedHashMap<>();

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

    public Map<String, List<Double>> getParamsX() {
        Map<String, List<Double>> valueLists = new LinkedHashMap<>();

        if (type == PARAMETER_FIELDS) {
            for (int i = 0; i < parameterFields.size(); i++) {

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

        private void updateCheckBoxes() {
            boolean allVisualizationSelected = true;
            boolean allMiscellaneousSelected = true;
            boolean allQualitySelected = true;
            boolean allConditionsSelected = 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 install has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

  public synchronized void install(final List<String> packages)
      throws RException, REXPMismatchException, NoInternetException {
    
    if (Platform.isLinux() || Platform.isMac()) {
      // Install missing packages

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 LayoutManager.java has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package de.bund.bfr.knime.foodprocess.ui;

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *

File Study.java has 280 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

Method fire has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void fire(final int triggerType, final String triggerName, final String tableName, final Object rowBefore[], final Object rowAfter[]) {
        try {
            if (triggerType == Trigger.INSERT_BEFORE_ROW || triggerType == Trigger.UPDATE_BEFORE_ROW || triggerType == Trigger.DELETE_BEFORE_ROW) {
                if (tableName.equals("Users")) {
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTrigger.java - About 2 hrs to fix

Method createSBML has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private static SBMLDocument createSBML(FskPortObject fskObj, CombineArchive archive,
      String ModelId, Map<String, URI> URIS, String filePrefix) throws IOException {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    SBMLDocument doc = new SBMLDocument(3, 1);
    doc.addDeclaredNamespace("xmlns:fsk",

Method createSBML has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private static SBMLDocument createSBML(FskPortObject fskObj, CombineArchive archive,
      String ModelId, Map<String, URI> URIS, String filePrefix) throws IOException {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    SBMLDocument doc = new SBMLDocument(3, 1);
    doc.addDeclaredNamespace("xmlns:fsk",

Method testConstructors has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testConstructors() {

        // Test fully parameterized constructor
        final LiteratureItem item0 = new LiteratureItem(Type.M, "author", 0, "title", "abstractText", "journal", "volume",

Method testConstructors has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testConstructors() {

        // Test fully parameterized constructor
        final LiteratureItem item0 = new LiteratureItem("author", 0, "title", "abstractText", "journal", "volume", "issue", 0,

Function basicToken has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function basicToken(stream,state){
    var cur = '';
    var ch = stream.next();
    // comment
    if (state.blockComment) {
Severity
Category
Status
Source
Language