LearnPAd/learnpad

View on GitHub
lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java

Summary

Maintainability
F
1 wk
Test Coverage

File H2Controller.java has 671 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package eu.learnpad.simulator.mon.storage;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

    H2Controller has 51 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class H2Controller implements DBController {
         
         private static Connection conn;
         private Properties connectionProp;
         private PreparedStatement preparedStmt;

      Method updateBpmnLearnerScores has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public void updateBpmnLearnerScores(String learnerID, String idBPMN, float learnerBPScore,
                  float learnerRelativeBPScore, float learnerCoverage) {
              String query;
              try {

        Method getOrSetLearners has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @Override
            public Vector<Learner> getOrSetLearners(List<String> learnersIDs) {
                Vector<Learner> learners = new Vector<Learner>();
                String query;
                Learner aLearner;

          Method updateLearnerScores has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              public void updateLearnerScores(String learnerID, float learnerGlobalScore, 
                      float learnerRelativeGlobalScore, float learnerAbsoluteGLobalScore) {
                  String query;
                  Learner aLearner;

            Method setLearnerSessionScore has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public int setLearnerSessionScore(String idLearner, String idPath, String idBPMN, float sessionScore, java.sql.Date scoreUpdatingDate) {

              Method updateBpmnLearnerScores has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public void updateBpmnLearnerScores(String learnerID, String idBPMN, float learnerBPScore,
                          float learnerRelativeBPScore, float learnerCoverage) {

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

                    @Override
                    public Vector<Learner> getOrSetLearners(List<String> learnersIDs) {
                        Vector<Learner> learners = new Vector<Learner>();
                        String query;
                        Learner aLearner;
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 414..446

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

                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

                    @Override
                    public Vector<Float> getMaxSessionScores(String learnerID, String idBPMN) {
                        
                        String query = "SELECT max(session_score)"
                                + " FROM glimpse.path_learner"
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 625..649

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

                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

                    @Override
                    public Vector<Path> getBPMNPaths(String idBPMN) {
                        String query = "select * from glimpse.path where id_bpmn = \'"+idBPMN+"';";
                        Vector<Path> retrievedPath = new Vector<Path>();
                        
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 85..109

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

                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

                    @Override
                    public Learner getLearner(String idLearner) {
                        String query = "select * from glimpse.learner where id_learner = \'"+idLearner+"';";
                        Learner theLearnerGathered = null;
                        
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 231..253

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

                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

                    @Override
                    public int saveBPMN(Bpmn theBPMN) {
                
                          String query = " insert into glimpse.bpmn (id_bpmn, extraction_date, id_category, absolute_bp_score, paths_cardinality)"
                                    + " values (?, ?, ?, ?, ?) ";
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 155..179

                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

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

                    @Override
                    public int saveLearnerProfile(Learner theLearner) {
                        String query = "insert into glimpse.learner"
                                + "(id_learner, id_role, global_score, relative_global_score, absolute_global_score)"
                                + " values (?, ?, ?, ?, ?)";
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 205..229

                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

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

                    @Override
                    public Vector<Float> getLearnerBPMNScores(String learnerID) {
                        String query = "SELECT bp_score " + " FROM glimpse.bpmn_learner"
                                + " where id_learner = \'" + learnerID + "';";
                        Vector<Float> retrievedScores = new Vector<Float>();
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 557..577
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 579..600
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 537..554
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 580..600
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 602..623

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

                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

                    @Override
                    public Vector<Float> getLearnerRelativeBPScores(String learnerID) {
                        String query = "SELECT relative_bp_score "
                                + " FROM glimpse.bpmn_learner" 
                                + " where id_learner = '" + learnerID +
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 514..531
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 579..600
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 537..554
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 580..600
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 602..623

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

                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

                    @Override
                    public Vector<Float> getBPMNScoresExecutedByLearner(String learnerID) {
                        String query = "SELECT bpmn_learner.bp_score"
                                + " FROM glimpse.bpmn, glimpse.bpmn_learner" + " where bpmn_learner.id_learner = '" + learnerID + "'";
                
                
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 514..531
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 557..577
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 537..554
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 580..600
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 602..623

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

                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

                    @Override
                    public int setLearnerSessionScore(String idLearner, String idPath, String idBPMN, float sessionScore, java.sql.Date scoreUpdatingDate) {
                          String query = " insert into glimpse.path_learner (id_learner, id_path, id_bpmn, session_score, execution_date)"
                                    + " values (?, ?, ?, ?, ?) ";
                        try {
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 131..153

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

                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

                    @Override
                    public int getBPMNPathsCardinality(String idBPMN) {
                        String query = "SELECT COUNT(*) FROM glimpse.path where id_bpmn = \'"+idBPMN+"';";
                        int result = 0;
                
                
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 755..776

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

                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

                    @Override
                    public int setLearnerBPScore(String idLearner, String idBPMN, float BPScore) {
                         String query = " insert into glimpse.bpmn_learner (id_learner, id_bpmn, bp_score, relative_bp_score, bp_coverage)"
                                    + " values (?, ?, ?, ?. ?)";
                             
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 377..400

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

                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

                    @Override
                    public boolean checkIfBPHasBeenAlreadyExtracted(String idBPMN) {
                        String query = "select * from glimpse.path where id_bpmn = \'"+idBPMN+"';";
                            
                        try {
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 332..351

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

                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

                    @Override
                    public void setLearnerGlobalScore(String learnerID, float learnerGlobalScore) {
                         String query = " update glimpse.learner set global_score = "+
                                             learnerGlobalScore + ";";
                             
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 484..503

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

                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 {
                                             query = " insert into glimpse.bpmn_learner (id_learner, id_bpmn, bp_score, relative_bp_score, bp_coverage)"
                                                        + " values (?, ?, ?, ?, ?)";
                                                preparedStmt = conn.prepareStatement(query);
                
                
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 734..747

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

                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 (resultsSet.first()) {
                                            
                                            query = "update glimpse.bpmn_learner set bp_score = "+
                                            learnerBPScore + ",  relative_bp_score = "+
                                                    learnerRelativeBPScore + ", bp_coverage = "+
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 665..682

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

                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 (resultsSet.first()) {
                                            
                                            query = "update glimpse.learner set global_score = "+
                                            learnerGlobalScore + ",  relative_global_score = "+
                                                    learnerRelativeGlobalScore + ", absolute_global_score = "+
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 703..719

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

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

                    @Override
                    public void setLearnerAbsoluteGlobalScore(String learnerID, float absoluteGlobalScore) {
                         String query = " update glimpse.learner set absolute_global_score = "+
                                 absoluteGlobalScore + ";";
                     
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 482..496
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 505..519
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 521..535

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

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

                    @Override
                    public void setLearnerRelativeGlobalScore(String learnerID, float learnerRelativeGlobalScore) {
                         String query = " update glimpse.learner set relative_global_score = "+
                                 learnerRelativeGlobalScore + ";";
                     
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/H2Controller.java on lines 498..512
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 505..519
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 521..535

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

                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

                    @Override
                    public Vector<Path> savePathsForBPMN(Vector<Path> vector) {
                
                        for (int i = 0; i<vector.size(); i++) {
                            savePath(vector.get(i));
                lp-simulation-environment/monitoring/src/main/java/eu/learnpad/simulator/mon/storage/MySqlController.java on lines 448..455

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

                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