SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

            function applyNearbyYear(year, threshold){
                if (threshold === true)
                    threshold = 10;

                // if year is 2 digits or less, than the user most likely is trying to get a recent century
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/bootstrap-datepicker/1_6_4/debug/js/bootstrap-datepicker.js on lines 1887..1901

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 86.

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

  view.getSVG = function () {
    if (!_paper) return null;
    _paper.svg.setAttribute("width", $('#viewContent').width());
    _paper.svg.setAttribute("height", 500);
    return (new XMLSerializer()).serializeToString(_paper.svg);
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/v1.9/joiner/joiner.js on lines 87..92

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 86.

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

    synchronized (getLock()) {

      final String connectedNodeId = getTableId(0);
      
      if (value.isEmpty()) {
de.bund.bfr.knime.fsklab.nodes/src/de/bund/bfr/knime/fsklab/v2_0/editor/FSKEditorJSNodeModel.java on lines 235..263

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 162.

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

    synchronized (getLock()) {

      final String connectedNodeId = getTableId(0);
      
      if (value.isEmpty()) {
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/v1_9/editor/FSKEditorJSNodeModel.java on lines 98..126

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 162.

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

                    if (successful) {
                        parameterValues = optimizer.getParameterValues();
                        parameterErrors = optimizer
                                .getParameterStandardErrors();
                        parameterTValues = optimizer.getParameterTValues();
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/modelestimation/SecondaryEstimationThread.java on lines 291..310

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 162.

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

                    if (successful) {
                        parameterValues = optimizer.getParameterValues();
                        parameterErrors = optimizer
                                .getParameterStandardErrors();
                        parameterTValues = optimizer.getParameterTValues();
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/modelestimation/OneStepEstimationThread.java on lines 317..336

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 162.

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

    private void selectMatrixButtonActionPerformed(ActionEvent e) {
        MyTable mat = DBKernel.myDBi.getTable("Matrices");
        Integer matrixID = null;
        try {matrixID = Integer.parseInt(matrixIDField.getText());}
        catch (Exception e1) {}
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/timeseriesreader/MdReaderUi.java on lines 399..422

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 162.

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

    private void selectAgensButtonActionPerformed(ActionEvent e) {
        MyTable age = DBKernel.myDBi.getTable("Agenzien");
        Integer agensID = null;
        try {agensID = Integer.parseInt(agensIDField.getText());}
        catch (Exception e1) {}
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/timeseriesreader/MdReaderUi.java on lines 373..396

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 162.

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

Method initComponents has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        scrollPane2 = new JScrollPane();
        panel1 = new JPanel();
        button = new JButton();

Method getNewConc has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private Double getNewConc(ValueAndUnit vau, PredictionValues pv, ParametersSetting ps, Double tempVal, Double phVal, Double awVal, Double presVal, double t, String timeUnit, Double lastConc, double stepWidth) {
        Double newVal = vau.getValue();
        boolean isPercent = false;

        PredictorViewNodeDialog pvnd = pv.getPvnd();

Method updateMatrixPanel has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void updateMatrixPanel() {
        List<String> items = new ArrayList<>();

        items.add(SettingsHelper.DO_NOT_USE);
        items.add(SettingsHelper.OTHER_PARAMETER);

Method updateAgentPanel has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void updateAgentPanel() {
        List<String> items = new ArrayList<>();

        items.add(SettingsHelper.DO_NOT_USE);
        items.add(SettingsHelper.OTHER_PARAMETER);

Method createBufferedDataTable has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public BufferedDataTable createBufferedDataTable(final ExecutionContext exec) {
        DataTableSpec spec = m_spec.createDataTableSpec();
        BufferedDataContainer container = exec.createDataContainer(spec);
        for (JSONDataTableRow row : m_rows) {
            DataCell[] dataCells = new DataCell[row.getData().length];

Method getValueAt has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public Object getValueAt(int row, int column) {
            switch (column) {
            case 0:
                return ids.get(row);

Method testLoadSettings has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testLoadSettings() {

        NodeSettings settings = new NodeSettings("identifier");
        settings.addString("SelectedIDs", XmlConverter.objectToXml(exampleSelectedIds));

Method testSaveSettings has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testSaveSettings() throws InvalidSettingsException {
        
        SettingsHelper helper = new SettingsHelper();
        helper.setSelectedIDs(exampleSelectedIds);

Function token has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    token: function(stream, state) {
      var ch, funcName;
      if (stream.eatSpace()) {
        return null;
      }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/apl/apl.js - About 2 hrs to fix

Function token has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    token: function(stream, state) {
      if (!stream.column())
        state.context = 0;

      if (stream.eatSpace())
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/z80/z80.js - About 2 hrs to fix

Function init has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  ContentEditableInput.prototype.init = function (display) {
      var this$1 = this;

    var input = this, cm = input.cm;
    var div = input.div = display.lineDiv;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

Function _getModelHandler has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    async _getModelHandler ( modelMetadata, modelId ) {
        let O = this;
        _log( 'MODAL DETAILS / _getModelHandler' );

        let modelHandler = null;
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.mt.details.js - About 2 hrs to fix
Severity
Category
Status
Source
Language