LearnPAd/learnpad

View on GitHub
lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java

Summary

Maintainability
F
6 days
Test Coverage

File PNMapping.java has 348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * LearnPAd - Verification Component - Deadlock Check Plugin
 * 
 *  Copyright (C) 2015 Unicam
 *  This program is free software: you can redistribute it and/or modify

    Method processElement has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        public GeneratedElements processElement(ProcessedElement element) throws Exception{
            if(element==null)
                throw new Exception("ERROR: parameter element is null");
            GeneratedElements ret = new GeneratedElements();
            

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

        public GeneratedElements processElement(ProcessedElement element) throws Exception{
            if(element==null)
                throw new Exception("ERROR: parameter element is null");
            GeneratedElements ret = new GeneratedElements();
            

      Method processRelation has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public GeneratedElements processRelation(String relationId, String relationType, String elementFromId, String elementToId) throws Exception{
              if(relationId==null || relationId.isEmpty() || relationType==null || relationType.isEmpty() || elementFromId==null || elementFromId.isEmpty() || elementToId==null || elementToId.isEmpty())
                  throw new Exception("ERROR: incorrect data provided for processing relation:\nrelationId: "+relationId+"\nrelationType: " +relationType+"\nelementFromId: "+elementFromId+"\nelementToId: "+elementToId);
              
              GeneratedElements ret = new GeneratedElements();

        Method addMapping has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            public void addMapping(String mappingFormula) throws Exception{
                /*
                 *  Formula Syntax: 
                 *  Formula = MapRules ";" InputRelations ";" OutputRelations
                 *  MapRules = elementTypeList ":" RuleList

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

            public void addMapping(String mappingFormula) throws Exception{
                /*
                 *  Formula Syntax: 
                 *  Formula = MapRules ";" InputRelations ";" OutputRelations
                 *  MapRules = elementTypeList ":" RuleList

          Consider simplifying this complex logical expression.
          Open

                  if(relationId==null || relationId.isEmpty() || relationType==null || relationType.isEmpty() || elementFromId==null || elementFromId.isEmpty() || elementToId==null || elementToId.isEmpty())
                      throw new Exception("ERROR: incorrect data provided for processing relation:\nrelationId: "+relationId+"\nrelationType: " +relationType+"\nelementFromId: "+elementFromId+"\nelementToId: "+elementToId);

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

                public GeneratedElements processRelation(String relationId, String relationType, String elementFromId, String elementToId) throws Exception{
                    if(relationId==null || relationId.isEmpty() || relationType==null || relationType.isEmpty() || elementFromId==null || elementFromId.isEmpty() || elementToId==null || elementToId.isEmpty())
                        throw new Exception("ERROR: incorrect data provided for processing relation:\nrelationId: "+relationId+"\nrelationType: " +relationType+"\nelementFromId: "+elementFromId+"\nelementToId: "+elementToId);
                    
                    GeneratedElements ret = new GeneratedElements();

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

                public MapElement getMapElement(String type) throws Exception{
                    if(type==null || type.isEmpty())
                        throw new Exception("ERROR: parameter type is empty");
                    for(MapElement element:mapElementList)
                        for(String typeEl: element.typeList)

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

                public boolean existMapElement(String type) throws Exception{
                    if(type==null || type.isEmpty())
                        throw new Exception("ERROR: parameter type is empty");
                    for(MapElement element:mapElementList)
                        for(String typeEl: element.typeList)

            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 processElement has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public GeneratedElements processElement(String elementId, String elementType, String elementDescription, float x, float y) throws Exception{

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

                          if(mapToElementName.toLowerCase().startsWith("p")){
                              PL from = petriNet.getPlace(mapFromElementName);
                              PL to = petriNet.getPlace(mapToElementName);
                              TR intermediate = petriNet.addTransition("t" + relationId);
                              PT conn1 = petriNet.connect(from, intermediate);
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 394..412

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

              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

                          } else {
                              TR from = petriNet.getTransition(mapFromElementName);
                              TR to = petriNet.getTransition(mapToElementName);
                              PL intermediate = petriNet.addPlace("p" + relationId);
                              TP conn1 = petriNet.connect(from, intermediate);
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 360..378

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

              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(!petriNet.existPlace(fromName)){
                                  from = petriNet.addPlace(fromName, rule.placeToken);
                                  from.description = element.elementDescription;
                                  from.x = element.x+"";
                                  from.y = (element.y+(Float.valueOf(from.h)+20)*index) + "";
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 301..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 136.

              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(!petriNet.existPlace(toName)){
                                      to = petriNet.addPlace(toName, rule.placeToken);
                                      to.description = element.elementDescription;
                                      to.x = element.x+"";
                                      to.y = (element.y+(Float.valueOf(to.h)+20)*index) + "";
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 255..264

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

              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(!petriNet.existTransition(toName)){
                                      to = petriNet.addTransition(toName);
                                      to.description = element.elementDescription;
                                      to.x = element.x+"";
                                      to.y = (element.y+(Float.valueOf(to.h)+20)*index) + "";
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 288..297

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

              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(!petriNet.existTransition(fromName)){
                                  from = petriNet.addTransition(fromName);
                                  from.description = element.elementDescription;
                                  from.x = element.x+"";
                                  from.y = (element.y+(Float.valueOf(from.h)+20)*index) + "";
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 269..278

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

              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(String relElRow: inRelElRowList){
                          RelationElement relationElement = new RelationElement();
                          if(relElRow.split("=").length!=2)
                              throw new Exception("ERROR: Formula Syntax Error; Expected 1 \"=\" in the formula: " + relElRow);
                          relationElement.relationType = relElRow.split("=")[0];
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 205..212

              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

                      for(String relElRow: outRelElRowList){
                          RelationElement relationElement = new RelationElement();
                          if(relElRow.split("=").length!=2)
                              throw new Exception("ERROR: Formula Syntax Error; Expected 1 \"=\" in the formula: " + relElRow);
                          relationElement.relationType = relElRow.split("=")[0];
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 190..197

              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

                              if(fromTo.to.contains("(")){
                                  fromTo.placeToken = Integer.parseInt(fromTo.to.substring(fromTo.to.indexOf("(")+1, fromTo.to.indexOf(")")));
                                  fromTo.to = fromTo.to.split("\\(")[0];
                              }
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 169..172

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

              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(fromTo.from.contains("(")){
                              fromTo.placeToken = Integer.parseInt(fromTo.from.substring(fromTo.from.indexOf("(")+1, fromTo.from.indexOf(")")));
                              fromTo.from = fromTo.from.split("\\(")[0];
                          }
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 175..178

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

              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

                          if(mapToElementName.toLowerCase().startsWith("p")){
                              TR from = petriNet.getTransition(mapFromElementName);
                              PL to = petriNet.getPlace(mapToElementName);
                              TP conn = petriNet.connect(from, to);
                              conn.addInfo("relationType", relationType);
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 378..385

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

              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

                          } else {
                              PL from = petriNet.getPlace(mapFromElementName);
                              TR to = petriNet.getTransition(mapToElementName);
                              PT conn = petriNet.connect(from, to);
                              conn.addInfo("relationType", relationType);
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 387..394

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

              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 6 locations. Consider refactoring.
              Open

                      public ProcessedElement(String elementId, String elementType, String elementDescription, float x, float y){
                          this.elementId = elementId; this.elementType = elementType; this.elementDescription = elementDescription; this.x = x; this.y = y;
                      } 
              lp-core-platform/lp-cp-apis/src/main/java/eu/learnpad/ca/rest/data/Annotation.java on lines 37..43
              lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/coverage/Activity.java on lines 17..23
              lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/coverage/Bpmn.java on lines 46..52
              lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/coverage/Learner.java on lines 12..18
              lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/coverage/Path.java on lines 42..48

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

              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

                      public String getInRelationElement(String relationType) throws Exception{
                          for(RelationElement relationElement: inRelationElementList)
                              if(relationElement.relationType.equals(relationType))
                                  return relationElement.element;
                          throw new Exception("ERROR: input relation of type " + relationType + " not defined for element of type " + getTypes());
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 48..53

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

              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

                      public String getOutRelationElement(String relationType) throws Exception{
                          for(RelationElement relationElement: outRelationElementList)
                              if(relationElement.relationType.equals(relationType))
                                  return relationElement.element;
                          throw new Exception("ERROR: output relation of type " + relationType + " not defined for element of type " + getTypes());
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 42..47

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

              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 3 locations. Consider refactoring.
              Open

                      if(formulaSentenceList[0].split(":").length>1)
                          ruleList = formulaSentenceList[0].split(":")[1].split(",");
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 188..189
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 203..204

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

              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 3 locations. Consider refactoring.
              Open

                      if(formulaSentenceList[2].split(":").length>1)
                          outRelElRowList = formulaSentenceList[2].split(":")[1].split(",");
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 162..163
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 188..189

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

              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 3 locations. Consider refactoring.
              Open

                      if(formulaSentenceList[1].split(":").length>1)
                          inRelElRowList = formulaSentenceList[1].split(":")[1].split(",");
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 162..163
              lp-model-verification/verification-component-deadlock-plugin/src/main/java/eu/learnpad/verification/plugin/pn/impexp/PNMapping.java on lines 203..204

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

              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

              There are no issues that match your filters.

              Category
              Status