SiLeBAT/FSK-Lab

View on GitHub
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java

Summary

Maintainability
F
1 wk
Test Coverage

Method getPlausibilityRow has 372 lines of code (exceeds 25 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: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 1 day to fix

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

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

Method checkPlausibleDBL has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    @SuppressWarnings("unused")
    private static String checkPlausibleDBL(Object kzID, String tname, String spaltenname, Integer tableID) {
        String ergebnis = null;        
        if (kzID != null) {
            String msg = GuiMessages.getString("Wenn die Anzahl der Wiederholungen = 1 ist, dann sollte ein Einzelwert eingetragen werden! Anzahl Wiederholungen < 1 machen keinen Sinn!");
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.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 checkPlausibleDBL has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings("unused")
    private static String checkPlausibleDBL(Object kzID, String tname, String spaltenname, Integer tableID) {
        String ergebnis = null;        
        if (kzID != null) {
            String msg = GuiMessages.getString("Wenn die Anzahl der Wiederholungen = 1 ist, dann sollte ein Einzelwert eingetragen werden! Anzahl Wiederholungen < 1 machen keinen Sinn!");
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 2 hrs to fix

Method getDKValuePlausible has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static void getDKValuePlausible(MyTable myT, Vector<String[]> result, String idConf) {
          MyTable[] foreignFields = myT.getForeignFields();
          if (foreignFields != null) {
              for (int i=0;i<foreignFields.length;i++) {
                if (foreignFields[i] != null && foreignFields[i].getTablename().equals("DoubleKennzahlen")) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 2 hrs to fix

Method getDKValuePlausible has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    private static void getDKValuePlausible(MyTable myT, Vector<String[]> result, String idConf) {
          MyTable[] foreignFields = myT.getForeignFields();
          if (foreignFields != null) {
              for (int i=0;i<foreignFields.length;i++) {
                if (foreignFields[i] != null && foreignFields[i].getTablename().equals("DoubleKennzahlen")) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 1 hr 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 getValuePlausible has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static String[] getValuePlausible(String tablename, String fieldname, Object newValue) {
        String[] result = null;
        if (tablename.equals("Literatur")) {
            if (fieldname.equals("Jahr")) {
                Integer jahr = 0;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 1 hr 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 getDKSQL has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private static String getDKSQL(String tablename, String fieldname, int min, int max, String idConf) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java - About 35 mins to fix

Refactor this method to reduce its Cognitive Complexity from 76 to the 15 allowed.
Open

    public static Vector<String[]> getPlausibilityRow(MyDBTable table, MyTable myT, int row, String idField) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Refactor this method to reduce its Cognitive Complexity from 21 to the 15 allowed.
Open

    private static String checkPlausibleDBL(Object kzID, String tname, String spaltenname, Integer tableID) {

Cognitive Complexity is a measure of how hard the control flow of a method is to understand. Methods with high Cognitive Complexity will be difficult to maintain.

See

Define a constant instead of duplicating this literal "Referenz" 4 times.
Open

                        " WHERE " + DBKernel.delimitL("Referenz") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NULL" 44 times.
Open

                        " WHERE " + DBKernel.delimitL("Matrixname") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Wiederholungen" 6 times.
Open

                                    DBKernel.delimitL("Wiederholungen") + " <= 1",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Eine Referenz sollte angegeben werden!" 3 times.
Open

                        GuiMessages.getString("Eine Referenz sollte angegeben werden!")

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "SELECT " 56 times.
Open

        String sql = "SELECT " + idConf +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Standardabweichung" 3 times.
Open

            DBKernel.delimitL("Standardabweichung") + " < " + min + " OR " + DBKernel.delimitL("Standardabweichung") + " > " + max + " OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NULL)" 4 times.
Open

                                    DBKernel.delimitL("LD50_Aufnahmeroute") + " IS NULL)" +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Wert_typ" 6 times.
Open

                                    DBKernel.delimitL("Wert") + " IS NOT NULL AND (" + DBKernel.delimitL("Wert_typ") + " IS NULL OR " + DBKernel.delimitL("Wert_typ") + " = 1)",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NULL AND " 6 times.
Open

                                " OR " + DBKernel.delimitL("Inkubationszeit") + " IS NULL AND " + DBKernel.delimitL("IZ_Einheit") + " IS NOT NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "UCL95" 4 times.
Open

                                    DBKernel.delimitL("UCL95") + " IS NOT NULL OR " + DBKernel.delimitL("LCL95") + " IS NOT NULL OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NOT NULL OR " 9 times.
Open

                                    DBKernel.delimitL("UCL95") + " IS NOT NULL OR " + DBKernel.delimitL("LCL95") + " IS NOT NULL OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " AND " 5 times.
Open

                    " WHERE " + DBKernel.delimitL("Delta") + " AND " + DBKernel.delimitL("Zeit") + " = 0",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NULL AND (" 4 times.
Open

                                    DBKernel.delimitL("Wiederholungen") + " IS NULL AND (" +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " WHERE " 54 times.
Open

                        " WHERE " + DBKernel.delimitL("Matrixname") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NULL OR " 17 times.
Open

                                    DBKernel.delimitL("Wert") + " IS NOT NULL AND (" + DBKernel.delimitL("Wert_typ") + " IS NULL OR " + DBKernel.delimitL("Wert_typ") + " = 1)",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "ZeitEinheit" 3 times.
Open

                    " WHERE " + DBKernel.delimitL("ZeitEinheit") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NOT NULL" 4 times.
Open

                                " OR " + DBKernel.delimitL("Inkubationszeit") + " IS NULL AND " + DBKernel.delimitL("IZ_Einheit") + " IS NOT NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " FROM " 57 times.
Open

            result = "SELECT COUNT(*)," + cols + " FROM " + DBKernel.delimitL(myT.getTablename()) + " GROUP BY " + cols + " HAVING COUNT(*) > 1";

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Die Kosten und deren Einheit sollte eingetragen werden!" 3 times.
Open

                        GuiMessages.getString("Die Kosten und deren Einheit sollte eingetragen werden!")

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " (ID=" 5 times.
Open

                                ergebnis += tablename + " (ID=" + id + "): " + res[1] + "\n";

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NOT NULL)" 4 times.
Open

                                    DBKernel.delimitL("Verteilung") + " IS NOT NULL)",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NOT NULL AND (" 7 times.
Open

                                    DBKernel.delimitL("Wert") + " IS NOT NULL AND (" + DBKernel.delimitL("Wert_typ") + " IS NULL OR " + DBKernel.delimitL("Wert_typ") + " = 1)",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Kosten" 4 times.
Open

                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NOT NULL AND " + DBKernel.delimitL("KostenEinheit") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "DoubleKennzahlen" 9 times.
Open

            DBKernel.delimitL("DoubleKennzahlen") + " ON " + DBKernel.delimitL(tablename) + "." + DBKernel.delimitL(fieldname) +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " IS NOT NULL AND " 17 times.
Open

            DBKernel.delimitL("Exponent") + " IS NOT NULL AND " + DBKernel.delimitL("Exponent") + " != 0 OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Minimum" 3 times.
Open

            DBKernel.delimitL("Minimum") + " < " + min + " OR " + DBKernel.delimitL("Minimum") + " > " + max + " OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Agens" 3 times.
Open

                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) + " WHERE " + DBKernel.delimitL("Agens") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal " != 0 OR " 5 times.
Open

            DBKernel.delimitL("Exponent") + " IS NOT NULL AND " + DBKernel.delimitL("Exponent") + " != 0 OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Maximum" 3 times.
Open

            DBKernel.delimitL("Maximum") + " < " + min + " OR " + DBKernel.delimitL("Maximum") + " > " + max + " OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "LCL95" 4 times.
Open

                                    DBKernel.delimitL("UCL95") + " IS NOT NULL OR " + DBKernel.delimitL("LCL95") + " IS NOT NULL OR " +

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "KostenEinheit" 4 times.
Open

                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NOT NULL AND " + DBKernel.delimitL("KostenEinheit") + " IS NULL",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Letalitaetsdosis100") + " IS NOT NULL AND (" +
                                    DBKernel.delimitL("LD100_Einheit") + " IS NULL OR " + DBKernel.delimitL("LD100_Organismus") + " IS NULL OR " +
                                    DBKernel.delimitL("LD100_Aufnahmeroute") + " IS NULL)" +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 2 hrs to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 276..286

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 144.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Letalitaetsdosis50") + " IS NOT NULL AND (" +
                                    DBKernel.delimitL("LD50_Einheit") + " IS NULL OR " + DBKernel.delimitL("LD50_Organismus") + " IS NULL OR " +
                                    DBKernel.delimitL("LD50_Aufnahmeroute") + " IS NULL)" +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 2 hrs to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 287..297

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 144.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Inkubationszeit") + " IS NOT NULL AND " + DBKernel.delimitL("IZ_Einheit") + " IS NULL" +
                                " OR " + DBKernel.delimitL("Inkubationszeit") + " IS NULL AND " + DBKernel.delimitL("IZ_Einheit") + " IS NOT NULL",
                        GuiMessages.getString("Bei Dateneingabe in \"Inkubationszeit\" muss Dateneingabe in \"IZ_Einheit\" erfolgen; " +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 2 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 262..268
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 269..275

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Symptomdauer") + " IS NOT NULL AND " + DBKernel.delimitL("SD_Einheit") + " IS NULL" +
                                " OR " + DBKernel.delimitL("Symptomdauer") + " IS NULL AND " + DBKernel.delimitL("SD_Einheit") + " IS NOT NULL",
                        GuiMessages.getString("Bei Dateneingabe in \"Symptomdauer\" muss Dateneingabe in \"SD_Einheit\" erfolgen; " +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 2 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 255..261
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 269..275

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Infektionsdosis") + " IS NOT NULL AND " + DBKernel.delimitL("ID_Einheit") + " IS NULL" +
                                " OR " + DBKernel.delimitL("Infektionsdosis") + " IS NULL AND " + DBKernel.delimitL("ID_Einheit") + " IS NOT NULL",
                        GuiMessages.getString("Bei Dateneingabe in \"Infektionsdosis\" muss Dateneingabe in \"ID_Einheit\" erfolgen; " +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 2 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 255..261
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 262..268

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            sql = "SELECT " + DBKernel.delimitL("ID") + " FROM " + DBKernel.delimitL("DoubleKennzahlen") +
            " WHERE " + DBKernel.delimitL("ID") + "=" + kzID + " AND " +
            DBKernel.delimitL("Wiederholungen") + " IS NULL AND (" +
            DBKernel.delimitL("Wert") + " IS NOT NULL AND " + DBKernel.delimitL("Wert_typ") + " IS NOT NULL AND " + DBKernel.delimitL("Wert_typ") + " > 1 OR " +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 613..616

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            sql = "SELECT " + DBKernel.delimitL("ID") + " FROM " + DBKernel.delimitL("DoubleKennzahlen") +
            " WHERE " + DBKernel.delimitL("ID") + "=" + kzID + " AND " +
            DBKernel.delimitL("Wiederholungen") + " > 1 AND " +
            DBKernel.delimitL("Wert") + " IS NOT NULL AND (" + DBKernel.delimitL("Wert_typ") + " IS NULL OR " + DBKernel.delimitL("Wert_typ") + " = 1)";
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 598..601

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        String sql = "SELECT " + idConf +
            " FROM " + DBKernel.delimitL(tablename) + " LEFT JOIN " +
            DBKernel.delimitL("DoubleKennzahlen") + " ON " + DBKernel.delimitL(tablename) + "." + DBKernel.delimitL(fieldname) +
            " = " + DBKernel.delimitL("DoubleKennzahlen") + "." + DBKernel.delimitL("ID") +
            " WHERE (" + where + ")";
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 145..149

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        String sql = "SELECT " + idConf +
            " FROM " + DBKernel.delimitL(tablename) + " LEFT JOIN " +
            DBKernel.delimitL("DoubleKennzahlen") + " ON " + DBKernel.delimitL(tablename) + "." + DBKernel.delimitL(fieldname) +
            " = " + DBKernel.delimitL("DoubleKennzahlen") + "." + DBKernel.delimitL("ID") +
            " WHERE (" + DBKernel.delimitL("Wert") + " < " + min + " OR " + DBKernel.delimitL("Wert") + " > " + max + " OR " +
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 73..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    result.add(new String[] {
                            getDKSQL2(myT.getTablename(),
                                    fieldname,
                                    DBKernel.delimitL("Wiederholungen") + " > 1 AND " +
                                    DBKernel.delimitL("Wert") + " IS NOT NULL AND (" + DBKernel.delimitL("Wert_typ") + " IS NULL OR " + DBKernel.delimitL("Wert_typ") + " = 1)",
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 112..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    result.add(new String[] {
                            getDKSQL2(myT.getTablename(),
                                    fieldname,
                                    DBKernel.delimitL("Wiederholungen") + " IS NULL AND (" +
                                    //DBKernel.delimitL("Wert") + " IS NOT NULL AND " + DBKernel.delimitL("Wert_typ") + " IS NOT NULL AND " + DBKernel.delimitL("Wert_typ") + " > 1 OR " + es gibt leider viele Mittelwertangaben ohne die Anzahl der Wiederholungen
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 1 other location - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 123..130

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Erstautor") + " IS NULL OR " + DBKernel.delimitL("Jahr") + " IS NULL OR " + DBKernel.delimitL("Titel") + " IS NULL",
                        GuiMessages.getString("Erstautor, Jahr, Titel sollten angegeben werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 539..543
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 443..447
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 563..567

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 76.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("ZertifikatNr") + " IS NOT NULL AND (" + DBKernel.delimitL("Gueltigkeit") + " IS NULL OR " + DBKernel.delimitL("Zertifizierungssystem") + " IS NULL)",
                        GuiMessages.getString("Wenn die ZertifikatNummer angegeben ist, dann sollte auch deren Gültigkeit und das Zertifizierungssystem angegeben sein!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 443..447
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 225..229
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 563..567

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 76.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Guetescore") + " IS NOT NULL AND (" + DBKernel.delimitL("Kommentar") + " IS NULL OR LENGTH(LTRIM(" + DBKernel.delimitL("Kommentar") + "))=0)",
                        GuiMessages.getString("Wenn die Ampel geschaltet ist, MUSS ein Kommentar dazu abgegeben werden!")
                        });                
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 539..543
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 443..447
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 225..229

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 76.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("ZertifikatNr") + " IS NOT NULL AND (" + DBKernel.delimitL("Gueltigkeit") + " IS NULL OR " + DBKernel.delimitL("Zertifizierungssystem") + " IS NULL)",
                        GuiMessages.getString("Wenn die ZertifikatNummer angegeben ist, dann sollte auch deren Gültigkeit und das Zertifizierungssystem angegeben sein!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 539..543
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 225..229
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 563..567

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 76.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            try {
                if (rs != null && rs.first()) {
                    ergebnis += tname + " (ID=" + tableID + ", " + spaltenname + "): " + msg + "\n";
                }
            }
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 590..595
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 605..610
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 632..637

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            try {
                if (rs != null && rs.first()) {
                    ergebnis += tname + " (ID=" + tableID + ", " + spaltenname + "): " + msg + "\n";
                }
            }
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 590..595
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 618..623
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 632..637

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            try {
                if (rs != null && rs.first()) {
                    ergebnis += tname + " (ID=" + tableID + ", " + spaltenname + "): " + msg + "\n";
                }
            }
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 605..610
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 618..623
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 632..637

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

            try {
                if (rs != null && rs.first()) {
                    ergebnis += tname + " (ID=" + tableID + ", " + spaltenname + "): " + msg + "\n";
                }
            }
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 1 hr to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 590..595
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 605..610
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 618..623

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Dauer") + " IS NULL OR " + DBKernel.delimitL("DauerEinheit") + " IS NULL",
                        GuiMessages.getString("Die Dauer und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Testanbieter") + " IS NULL OR " + DBKernel.delimitL("AnbieterAngebot") + " IS NULL",
                        GuiMessages.getString("Einen Testanbieter und ein AnbieterAngebot sollte es immer geben! Wenn es ein InHouse Kit ist, dann sollte als Kontakt die eigene Adresse angegeben werden und als Angebot interne Informationen")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Personalressourcen") + " IS NOT NULL AND " + DBKernel.delimitL("ZeitEinheit") + " IS NULL",
                        GuiMessages.getString("Die Zeiteinheit für die Personalressourcen sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Dauer") + " IS NULL OR " + DBKernel.delimitL("DauerEinheit") + " IS NULL",
                        GuiMessages.getString("Die Dauer und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Durchsatz") + " IS NOT NULL AND " + DBKernel.delimitL("DurchsatzEinheit") + " IS NULL",
                        GuiMessages.getString("Die Einheit für den Durchsatz sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NULL OR " + DBKernel.delimitL("KostenEinheit") + " IS NULL",
                        GuiMessages.getString("Die Kosten und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NULL OR " + DBKernel.delimitL("KostenEinheit") + " IS NULL",
                        GuiMessages.getString("Die Kosten und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NULL OR " + DBKernel.delimitL("KostenEinheit") + " IS NULL",
                        GuiMessages.getString("Die Kosten und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                    result.add(new String[]{
                            "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                            " WHERE " + DBKernel.delimitL("EMail") + " IS NULL OR " + DBKernel.delimitL("Telefon") + " IS NULL",
                            GuiMessages.getString("Eine E-Mail Adresse oder eine Telefonnummer sollte angegeben werden!")
                            });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Krankheitsverlauf") + " IS NOT NULL AND " + DBKernel.delimitL("Zielpopulation") + " IS NULL",
                        GuiMessages.getString("Bei Dateneingabe in \"Krankheitsverlauf\" muss Dateneingabe in \"Zielpopulation\" vorhanden sein")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Nachweisgrenze") + " IS NOT NULL AND " + DBKernel.delimitL("NG_Einheit") + " IS NULL",
                        GuiMessages.getString("Die Einheit für die Nachweisgrenze sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Personalressourcen") + " IS NOT NULL AND " + DBKernel.delimitL("ZeitEinheit") + " IS NULL",
                        GuiMessages.getString("Die Zeiteinheit für die Personalressourcen sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Kosten") + " IS NOT NULL AND " + DBKernel.delimitL("KostenEinheit") + " IS NULL",
                        GuiMessages.getString("Die Einheit für die Kosten sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

            result.add(new String[]{
                    "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                    " WHERE " + DBKernel.delimitL("Delta") + " AND " + DBKernel.delimitL("Zeit") + " = 0",
                    GuiMessages.getString("Für den Zeitpunkt 0 kann das Delta Feld nicht angehakt sein!")
                    });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        else if (tablename.equals("Zertifizierungssysteme")) {
            if (table == null) {
                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Anbieter") + " IS NULL",
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 315..323
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 184..192
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 175..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        else if (tablename.equals("Labore")) {
            if (table == null) {
                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Kontakt") + " IS NULL",
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 306..314
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 184..192
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 175..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        else if (tablename.equals("Agenzien")) {
            if (table == null) {
                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Agensname") + " IS NULL",
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 315..323
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 306..314
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 175..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        if (tablename.equals("Matrices")) {
            if (table == null) {
                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Matrixname") + " IS NULL",
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 3 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 315..323
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 306..314
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 184..192

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status