SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

        if (SchemaFactory.createDataSchema().conforms(table)) {
            reader = new TableReader(table, true);

            if (Collections.max(reader.getColorCounts()) == 0) {
                reader = new TableReader(table, false);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarymodelanddataview/SecondaryModelAndDataViewNodeDialog.java on lines 86..98

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

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

                } else if (entryName.equals("library.list")) {
                    List<String> libNames = IOUtils.readLines(in, "UTF-8");

                    if (!libNames.isEmpty()) {

de.bund.bfr.knime.fsklab.deprecatednodes/src-prerakip/de/bund/bfr/knime/fsklab/nodes/port/FskPortObject.java on lines 217..234

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

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

    try (ScriptHandler singleScriptHandler = ScriptHandler
        .createHandler(SwaggerUtil.getLanguageWrittenIn(sfskObj.modelMetadata), sfskObj.packages)) {

      if (sfskObj instanceof CombinedFskPortObject) {
        writeCombinedObject((CombinedFskPortObject) sfskObj, archive, URIS, filePrefix,
de.bund.bfr.knime.fsklab.nodes/src/de/bund/bfr/knime/fsklab/v2_0/writer/WriterNodeModel.java on lines 318..331

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

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

            for (PmmXmlElementConvertable el : indepXml.getElementSet()) {
                IndepXml element = (IndepXml) el;

                if (element.name.equals(AttributeUtilities.TIME)) {
                    variables.put(element.name,
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/primarymodelviewandselect/TableReader.java on lines 245..255

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

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

  @Override
  void setIndependentVariableData() {

    List<VariableData> variables = new LinkedList<>();

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

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec)
            throws Exception {
        Bfrdb db = null;
        /*

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

    private void readModelTable() {
        models = new ArrayList<>();
        modelNames = new LinkedHashMap<>();
        modelFormulas = new LinkedHashMap<>();
        dependentVariables = new LinkedHashMap<>();

Method cellValueChanged has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Object cellValueChanged(int row, int col, Object oldValue, Object newValue) {
        //System.out.println(row + "\t" + col + "\t" + oldValue + "\t" + newValue);
        try {
            if (theTable.getMyCellPropertiesModel() instanceof MyCellPropertiesModel) {
                if (theTable.getColumn(col-1).getColumnName().equals("Geprueft") && oldValue == null && newValue != null && 

Method button8ActionPerformed has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void button8ActionPerformed(ActionEvent e) {
        //myDBTable1.myPrint();
          String tt = "";
          tt += "ID\t" + GuiMessages.getString("Benutzer") + "\t" + GuiMessages.getString("Letzte Aenderung") + "\n"; 
          tt += "-----------------------------\n\n"; 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBPanel.java - About 1 hr to fix

Method checkeDoppeltVergebeneDKZs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void checkeDoppeltVergebeneDKZs(final Statement anfrage) {
        System.err.println("checkeDoppeltVergebeneDKZs - Start");
        LinkedHashMap<String, MyTable> myTables = DBKernel.myDBi.getAllTables();
        Hashtable<Integer, String> hash = new Hashtable<>();
        for(String key : myTables.keySet()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - About 1 hr to fix

Method loadOther4Gui has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void loadOther4Gui() {
        // knownCodeSysteme
        knownCodeSysteme = new LinkedHashMap<>();
          // TOP
          knownCodeSysteme.put("Agenzien_TOP", new int[]{2,4}); // 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBTablesNew.java - About 1 hr to fix

Method createUI has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void createUI() {

      FPanel simulationPanel = new FPanel();
      simulationPanel.setLayout(new BorderLayout());
      JScrollPane parametersPane = new JScrollPane(

Method loadPortObject has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public FskPortObject loadPortObject(PortObjectZipInputStream in, PortObjectSpec spec, ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {

            FskPortObject portObj = new FskPortObject();

Method createUI has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void createUI() {

      FPanel simulationPanel = new FPanel();
      simulationPanel.setLayout(new BorderLayout());
      JScrollPane parametersPane = new JScrollPane(

Method getParameter has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public DataArray getParameter() {
    try {
      if (isOutputClosed) {
        // open Json file stream if it isn't already open
        if (isInputClosed) {

Method manageColor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      private void manageColor() {
          Color fg = Color.BLACK;
          Color bg = Color.WHITE;
          if (object != null) {
              String param = object.toString();

Method loadSettingsFrom has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void loadSettingsFrom(NodeSettingsRO settings,
            PortObject[] inObjects) throws NotConfigurableException { 
        PCMLPortObject pcmlPortObject = (PCMLPortObject) inObjects[0];
        PCMLDocument pcmlDoc = pcmlPortObject.getPcmlDoc();

Method waitWhile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected void waitWhile(final NodeContainer nc,
            final Hold hold) throws Exception {
        if (!hold.shouldHold()) {
            return;
        }
Severity: Minor
Found in de.bund.bfr.knime.testflows/src/WorkflowTestCase.java - About 1 hr to fix

Function x86 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function x86(_parserConfig) {
    lineCommentStartSymbol = "#";

    registers.ax  = "variable";
    registers.eax = "variable-2";
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/gas/gas.js - About 1 hr to fix

Function tokenBase has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {
    var ch = stream.next();

    if (/[\d\.]/.test(ch)) {
      if (ch == ".") {
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/fcl/fcl.js - About 1 hr to fix
Severity
Category
Status
Source
Language