SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method getTableCellRendererComponent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
      
      JLabel comp = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

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

    private boolean checkTables4Id(Integer stationId)  {
        String sql = "SELECT " + DBKernel.delimitL("Artikelnummer") + "," + DBKernel.delimitL("Bezeichnung") + "," + DBKernel.delimitL("ChargenNr") + "," +
                DBKernel.delimitL("MHD_day") + "," + DBKernel.delimitL("MHD_month") + "," + DBKernel.delimitL("MHD_year") + "," +
                DBKernel.delimitL("pd_day") + "," + DBKernel.delimitL("pd_month") + "," + DBKernel.delimitL("pd_year") + "," +
                DBKernel.delimitL("dd_day") + "," + DBKernel.delimitL("dd_month") + "," + DBKernel.delimitL("dd_year") + "," +
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/actions/PlausibleAction.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 filter has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

     public int[] filter(TableModel tm) {
         int[] result = null;
         Vector<Integer> vv = new Vector<>();
         try {
             int numRows = tm.getRowCount();

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

    private void readValue(final ResultSet rs, final JLabel jl, final JTextField tf, final JTextField tf_exp, final JCheckBox cb, final boolean isString) {
        try {
            String kz = jl.getText();
            String str = rs.getString(kz);
            if (str != null) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method scrollBar1AdjustmentValueChanged has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private void scrollBar1AdjustmentValueChanged(AdjustmentEvent e) {
        if (initVal > 0 && !e.getValueIsAdjusting()) {
            if (initVal > 1) { // Änderungen abspeichern!
                if (newDS()) insertNewRow();
                else updateRow();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.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 handleStr has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean handleStr(PreparedStatement ps, int index, JComponent c) throws SQLException {
        boolean nullVal = true;
        String val = null;
        if (c instanceof JTextField) val = ((JTextField) c).getText();
        else if (c instanceof JComboBox) val = ((JComboBox) c).getSelectedItem() == null ? null : ((JComboBox) c).getSelectedItem().toString();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.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 isEdited has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  private boolean isEdited(int row, int col) {
      boolean result = false;
      Object o = null;
      try {
          o = myDBTable.getValueAt(row, 0);

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

    public void setSelectedID(int id) {
        String sql= "SELECT " + DBKernel.delimitL("ID") + " FROM " + DBKernel.delimitL(myT.getTablename());
        ResultSet rs = DBKernel.getResultSet(sql, false);
        try {
            int index = 1;
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.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 checkUnsavedStuff has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    void checkUnsavedStuff(final boolean saveProps) {
        //if (actualTable == null || actualTable.isReadOnly()) System.err.println(" readonly, but saved??? " + actualTable);
        // eigentlich würde es genügen, wenn man nur this.save() ausführt. this.save() hat selbst eine Routine, die checkt, ob was geändert wurde oder nicht, d.h. es wird nicht in jedem Fall abgespeichert
        if (theFilter != null) return;
        if (this.getEditingColumn() >= 0 && this.getEditingRow() >= 0) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.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 getTreeNode has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    DefaultMutableTreeNode getTreeNode(final int id, final int codeSystemNum) {
        DefaultMutableTreeNode result = null;
        LinkedHashMap<Integer, DefaultMutableTreeNode>[] theIDs = (filter.length() > 0) ? myFilterIDs : myIDs;
        if (codeSystemNum >= 0 && codeSystemNum < theIDs.length) {
            result = theIDs[codeSystemNum].get(id);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtree/MyDBTreeModel.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 getType has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private String getType(String fieldName, MyTable myT, boolean takecareofID) {
        if (takecareofID && fieldName.equalsIgnoreCase("id")) return "INTEGER";
        String result = null;
        String[] tFieldNames = myT.getFieldNames();
        String[] tFieldTypes = myT.getFieldTypes();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/imports/GeneralXLSImporter.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 getMNSql has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public String getMNSql(int selectedColumn) {
        if (mnSQL == null) mnSQL = new String[mnTable.length];
        if (mnSQL[selectedColumn] != null && !mnSQL[selectedColumn].isEmpty()) return mnSQL[selectedColumn];

        String sql = "";
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.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 copyFiles2NewKennung has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static void copyFiles2NewKennung(String path, String oldKennung, String newKennung, boolean doMove) throws IOException {
        java.io.File f = new java.io.File(path);
        String fileKennung = oldKennung + ".";
        java.io.File[] files = f.listFiles();
        if (files != null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.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 equals has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

        @Override
        public boolean equals(final Object obj) {
            if (this == obj) {
                return true;
            }

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method insertEstParamCorrs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private void insertEstParamCorrs(int modelId, int estModelId, final int paramId, HashMap<String, Double> hm) {
        try {
            PreparedStatement ps = conn.prepareStatement("INSERT INTO \"GeschaetzteParameterCovCor\" (\"param1\", \"param2\", \"GeschaetztesModell\", \"cor\", \"Wert\") VALUES(?, ?, ?, ?, ?)");
            Integer estParamId = DBKernel.getID("GeschaetzteParameter", new String[] { "GeschaetztesModell", "Parameter" }, new String[] { estModelId + "", paramId + "" });
            ps.setInt(1, estParamId);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveSettingsTo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected void saveSettingsTo(NodeSettingsWO settings) throws InvalidSettingsException {

    m_readmePanel.addToHistory();

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

  @Override
  public FSKEditorJSViewValue getViewValue() {

    FSKEditorJSViewValue value = super.getViewValue();

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

    @Override
    protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
            throws InvalidSettingsException, IOException, InvalidFormatException, NoInternetException {

        FskPortObject portObj = new FskPortObject();

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

  private FskPortObject runSnippet(ScriptHandler handler, final FskPortObject fskObj,
      final FskSimulation simulation, final ExecutionContext exec) throws Exception {

    handler.runSnippet(fskObj, simulation, exec, LOGGER, internalSettings.imageFile);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language