SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method compare has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public int compare(Object o1, Object o2) {
      //System.out.println("MyOtherSorter");
      if (o1 == null && o2 == null) return 0;
      else if (o1 == null) return 1;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/sorter/MyOtherSorter.java - About 35 mins 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 get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

     public Object get(KeyStroke keyStroke) {
         if (disableKeys != null) {
             for(int i=0; i<disableKeys.length; i++) {
                 if(keyStroke.equals(disableKeys[i])) {
                     return null;

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 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void saveSettingsTo(Config c) {
        if (set != null) set.saveConfig(c.addConfig("PredictorSettings"));
        
         modelReaderUi.saveSettingsTo(c.addConfig("ModelReaderUi"));
         mdReaderUi.saveSettingsTo(c.addConfig("MdReaderUi"));

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

    private static String getMissingString(List<Integer> missing) {
        String s = "";

        if (missing.size() <= 10) {
            for (int m : missing) {

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 7 (exceeds 5 allowed). Consider refactoring.
Open

    public String getMetadata() {
        String result = "--------------  " + tableName + "  --------------\n";
        for (int i = 0; i < fieldNames.length; i++) {
            result += fieldNames[i] + "\t" + (fieldComments[i] == null ? fieldNames[i] : fieldComments[i]) + "\t" + fieldTypes[i] + "\n";
        }
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getHash has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private LinkedHashMap<Object, String> getHash(String fieldName) {
        if (fieldName != null && this.getForeignHashs() != null) {
            String[] fn = this.getFieldNames();
            for (int i = 0; i < fn.length; i++) {
                if (fieldName.equals(fn[i])) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getAdd2Select has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private String getAdd2Select(String fieldName, Integer fi) {
        if (fi == null) return "'" + fieldName + "'";
        String result = "";
        boolean isDbl = this.getFieldTypes()[fi].equals("DOUBLE");
        LinkedHashMap<Object, String> hash = this.getHash(fieldName);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getFieldIndex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public Integer getFieldIndex(String fieldName) {
        if (fieldName != null && this.getFieldNames() != null) {
            String[] fn = this.getFieldNames();
            for (int i = 0; i < fn.length; i++) {
                if (fieldName.equals(fn[i])) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getForeignTable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private String getForeignTable(String fieldName, MyTable myT) {
        String result = null;
        String[] tFieldNames = myT.getFieldNames();
        MyTable[] myFs = myT.getForeignFields();
        if (myFs == null) return null;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/GeneralXLSImporter.java - About 35 mins 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 getInsertSql has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private String getInsertSql() {
        String result = "";
        String qms = "";
        String columnName;
        for (int i = 0; i < fieldNames.length; i++) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getForeignTable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private MyTable getForeignTable(String fieldName) {
        if (fieldName != null && this != null && this.getForeignFields() != null) {
            String[] fn = this.getFieldNames();
            for (int i = 0; i < fn.length; i++) {
                if (fieldName.equals(fn[i])) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 35 mins 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 getDefaultSA has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static String getDefaultSA(boolean other) {
        String sa = "";
        // if (debug) return "SA";
        if (other) sa = isKNIME || isKrise ? "defad" : "SA";
        else sa = isKNIME || isKrise ? "SA" : "defad";
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 35 mins 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 deleteOldFiles has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static void deleteOldFiles(String path, String dbKennung) {
        java.io.File f = new java.io.File(path);
        String fileKennung = dbKennung + ".";
        java.io.File[] files = f.listFiles();
        if (files != null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Backup.java - About 35 mins 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 go4Dateispeicher has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private void go4Dateispeicher(final Statement anfrage) {
        try {            
            String sql = "SELECT * FROM " + DBKernel.delimitL("DateiSpeicher") + " ORDER BY " + DBKernel.delimitL("Zeitstempel") + " ASC";
            ResultSet rs = DBKernel.getResultSet(anfrage, sql, false);
                if (rs.first()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - About 35 mins 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 getDefaultSAPass has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static String getDefaultSAPass(boolean other) {
        String pass = "";
        // if (debug) return "";
        if (other) pass = isKNIME || isKrise ? "de6!§5ddy" : "";
        else pass = isKNIME || isKrise ? "" : "de6!§5ddy";
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 35 mins 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 getJSONType has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    static JSTypes getJSONType(final DataType colType) {
        JSTypes type;
        if (colType.isCompatible(SvgValue.class)) {
            type = JSTypes.SVG;
        } else if (colType.isCompatible(PNGImageValue.class)) {

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

    boolean isAdmin() {
        if (dbUsername == null) return false;
        if (conn == null) {
            if (dbUsername.equals(getSA())) return true;
        }
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - About 35 mins 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 deleteOldFiles has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private void deleteOldFiles(String path) {
        java.io.File f = new java.io.File(path);
        String fileKennung = DBKernel.dbKennung + ".";
        java.io.File[] files = f.listFiles();
        if (files != null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - About 35 mins 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 getNumberOfSuffixes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  private static int getNumberOfSuffixes(List<Parameter> params) {

    int maxNumber = 0;
    for (Parameter param : params) {

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

  public static void createDefaultParameterValues(FskSimulation first, FskSimulation second, List<Parameter> parameters ) {

    for (Parameter p : parameters) {

      String p_id = p.getId();  // parameter id with suffix "1" or "2"

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