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

var basicToDigit = function basicToDigit(codePoint) {
    if (codePoint - 0x30 < 0x0A) {
        return codePoint - 0x16;
    }
    if (codePoint - 0x41 < 0x1A) {
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/nodes/joiner/emfbundle/punycode.js on lines 182..193

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

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

    container.on('select', function () {
      if (!container.isOpen()) {
        return;
      }

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 1146..1156

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

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

    function basicToDigit(codePoint) {
        if (codePoint - 48 < 10) {
            return codePoint - 22;
        }
        if (codePoint - 65 < 26) {
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/nodes/joiner/emfbundle/ajv.min.js on lines 5595..5606

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

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

    @Test
    public void testLoadFromNodeSettings() {
        final NodeSettings settings = new NodeSettings("irrelevantKey");
        settings.addString("name", indep.name);
        settings.addString("origname", indep.origname);
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/DepTest.java on lines 55..69

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

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

    @Test
    public void testLoadFromNodeSettings() {
        final NodeSettings settings = new NodeSettings("irrelevantKey");
        settings.addString("name", dep.name);
        settings.addString("origname", dep.origname);
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/IndepTest.java on lines 54..68

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

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

package de.bund.bfr.knime.pmm.extendedtable;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
de.bund.bfr.knime.pmm.common.tests/src/de/bund/bfr/knime/pmm/extendedtable/Model2MetadataTest.java on lines 1..41

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

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

package de.bund.bfr.knime.pmm.extendedtable;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
de.bund.bfr.knime.pmm.common.tests/src/de/bund/bfr/knime/pmm/extendedtable/Model1MetadataTest.java on lines 1..41

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

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 setNodeAnnotation has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void setNodeAnnotation(String newAnnotation, NodeSettingsWO s) {
        long ttt = System.currentTimeMillis();
        Collection<NodeContainer> ncs = WorkflowManager.ROOT.getNodeContainers();
        for (NodeContainer nc : ncs) {
            if (nc instanceof WorkflowManager) {

Method setSettings has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void setSettings(Config c, double[] volumeDef, String[] volumeUnitDef) {
        panel1.removeAll();
        l1.clear();
        lmat.clear();
        lage.clear();

Method createDoc has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private PCMLDocument createDoc() {
        PCMLDocument pcmlDoc = PCMLUtil.create();
        
        PCML pcml = pcmlDoc.getPCML();
        ProcessChain pChain = pcml.addNewProcessChain();

Method retrieveStudySample has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static StudySample retrieveStudySample(Row row, Map<String, Integer> columns) {

        // Check mandatory properties
        final Cell sampleNameCell = row.getCell(columns.get("sample"));
        if (sampleNameCell.getCellTypeEnum() == CellType.BLANK) {

Method execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected PortObject[] execute(PortObject[] inObjects, ExecutionContext exec)
            throws Exception {
        BufferedDataTable table = (BufferedDataTable) inObjects[0];
        TableReader reader = new TableReader(table,

Method decodeM2Schemas has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private List<KnimeTuple> decodeM2Schemas(List<JsM2Schema> schemas) {

        List<KnimeTuple> tuples = new ArrayList<>(schemas.size());

        KnimeSchema knimeSchema = SchemaFactory.createM2Schema();

Method doBuf has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void doBuf(KnimeTuple tupleM1, PmmTimeSeries tstuple, List<KnimeTuple> rowSec, BufferedDataContainer buf, KnimeSchema ks) {
        if (tupleM1 != null) {
            // Set primary variable names to TimeSeriesSchema.TIME and TimeSeriesSchema.LOGC
            PmmXmlDoc modelXml = tupleM1.getPmmXml(Model1Schema.ATT_MODELCATALOG);
            String formula = ((CatalogModelXml) modelXml.get(0)).formula;

Method configure has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
            throws InvalidSettingsException {
        KnimeSchema outSchema = null;
        boolean conformsPrimary = SchemaFactory.conformsM1Schema(inSpecs[0])

Method createMainComponent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private ChartAllPanel createMainComponent() {
        if (set.isStandardVisibleColumns()) {
            set.setVisibleColumns(reader.getStandardVisibleColumns());
        }

Method readModelTable has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void readModelTable() {
        Set<Integer> ids = new LinkedHashSet<>();
        Set<Integer> estIDs = new LinkedHashSet<>();
        KnimeRelationReader reader = new KnimeRelationReader(
                SchemaFactory.createM1Schema(), modelTable);

Method itemStateChanged has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void itemStateChanged(ItemEvent e) {
        if (e.getSource() == rmseBox) {
            rmse = (String) rmseBox.getSelectedItem();
        } else if (e.getSource() == r2Box) {

Method merging has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void merging() {
        int oldID = this.getSelectedID();
        String msg = "Bitte die ID des Datensatzes eingeben, der ID '" + oldID + "' ersetzen soll (" + oldID + " -> ?):";
        String titel = "ID '" + oldID + "' ersetzen durch andere ID!";
        if (DBKernel.getLanguage().equalsIgnoreCase("en")) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 1 hr to fix

Method getCopyOfInternalDB has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static File getCopyOfInternalDB() {
        File temp = null;
        try {
            Bundle bundle = null;
            try {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 1 hr to fix
Severity
Category
Status
Source
Language