SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method keyReleased has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        @Override 
        public void keyReleased(KeyEvent event) { 
            if (event.getKeyCode()==KeyEvent.VK_DELETE) {
                cancelEditing(); 
                DefaultTableModel model = (DefaultTableModel) table.getModel();

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

        private void pasteFromClipboard() { 
                int startRow=table.getSelectedRows()[0]; 
                int startCol=table.getSelectedColumns()[0];

                String pasteString = ""; 

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

Avoid deeply nested control flow statements.
Open

                            if (ndp != null && ndp instanceof FoodProcessNodeDialog && ndp.equals(this)) {
                                FoodProcessNodeDialog fpnd = (FoodProcessNodeDialog) ndp;
                                fpnd.loadSettingsFrom((NodeSettingsRO) s, specs);
                                String an = wnci.getNodeAnnotation().getData().getText();
                                if (!an.equals(newAnnotation)) {

Avoid deeply nested control flow statements.
Open

                        if (doc != null) {
                            for (PmmXmlElementConvertable el : doc.getElementSet()) {
                                if (el instanceof CatalogModelXml) {
                                    CatalogModelXml x = (CatalogModelXml) el;
                                    selModelID = ""+x.id;

Avoid deeply nested control flow statements.
Open

                        if (fpVolume == null) fpVolume = 0.0;

Method init has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private void init(final String strDataSet, final String xAxis, final String yAxis, final Double mini, final Double maxi, final double step) {

Method parseString has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private void parseString(final XYSeries series, final String function, final String interval, final Double mini, final Double maxi, final double stepi) {        

Method getTableCellRendererComponent has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

            public Component getTableCellRendererComponent(JTable arg0,
                    Object arg1, boolean arg2, boolean arg3, int arg4, int arg5) {

Method loadEstModelGui has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void loadEstModelGui(final NodeSettingsRO settings) throws InvalidSettingsException {
        try {
            emReaderUiMap = new HashMap<String, EmReaderUi>();
            if (settings.containsKey("EstModelReaderUi")) {
                Config c = settings.getConfig("EstModelReaderUi");

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

Avoid deeply nested control flow statements.
Open

                        if (newAgentMix.containsKey(a)) {
                            if (newAgentMix.get(a).getUnit().equals(vau.getUnit())) { // ppm oder log10 count/g - es kann nur einer überleben!!! D.h. innerhalb eines Workflows muss ein Agent dieselbe Einheitenkategorie haben!!!
                                newFraction = calcNewAgentFraction(vau, newFraction, relation, newAgentMix.get(a).getValue());
                                newAgentMix.remove(a);
                            }

Method setAuthor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public void setAuthor(Contact newAuthor) {
        if (newAuthor != author) {
            NotificationChain msgs = null;
            if (author != null)
                msgs = ((InternalEObject)author).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MetadataPackage.GENERAL_INFORMATION__AUTHOR, null, msgs);

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 8 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null || getClass() != obj.getClass())

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

    public void setStudy(Study newStudy) {
        if (newStudy != study) {
            NotificationChain msgs = null;
            if (study != null)
                msgs = ((InternalEObject)study).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MetadataPackage.DATA_BACKGROUND__STUDY, null, msgs);

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 8 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null || getClass() != obj.getClass())

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

    public void setExposure(Exposure newExposure) {
        if (newExposure != exposure) {
            NotificationChain msgs = null;
            if (exposure != null)
                msgs = ((InternalEObject)exposure).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MetadataPackage.MODEL_MATH__EXPOSURE, null, msgs);

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

    public void setSpatialInformation(SpatialInformation newSpatialInformation) {
        if (newSpatialInformation != spatialInformation) {
            NotificationChain msgs = null;
            if (spatialInformation != null)
                msgs = ((InternalEObject)spatialInformation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MetadataPackage.SCOPE__SPATIAL_INFORMATION, null, msgs);
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/ScopeImpl.java - About 45 mins 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 eIsSet has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case MetadataPackage.MODEL_MATH__FITTING_PROCEDURE:
                return FITTING_PROCEDURE_EDEFAULT == null ? fittingProcedure != null : !FITTING_PROCEDURE_EDEFAULT.equals(fittingProcedure);

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

  @Override
  public int hashCode() {
    int hash = 31;
    if (this.mAuthors != null)
      hash += this.mAuthors.hashCode();

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 8 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      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 equals has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      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

Severity
Category
Status
Source
Language