Thibau/datalift-datacubeviz

View on GitHub
datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizController.java

Summary

Maintainability
C
1 day
Test Coverage

Method getDataSetsNew has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @GET
    @Path("/ws/datasetsnew")
    @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
    public Response getDataSetsNew(@QueryParam("project") java.net.URI projectId) {
        Project p = this.getProject(projectId);

    File DatacubeVizController.java has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright / LIRMM 2013
     * Contributor(s) : T. Colas, T. Marmin
     *
     * Contact: thibaut.marmin@etud.univ-montp2.fr

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

          @Override
          public UriDesc canHandle(Project p) {
              UriDesc projectPage = null;
              // The project can be handled if it has at least one datacube
              // source.

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

          @GET
          @Path("/ws/datasetsnew")
          @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
          public Response getDataSetsNew(@QueryParam("project") java.net.URI projectId) {
              Project p = this.getProject(projectId);
      Severity: Minor
      Found in datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizController.java - About 55 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 getDataSets has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          @GET
          @Path("/ws/datasets")
          @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
          public Response getDataSets(@QueryParam("project") java.net.URI projectId) {
      
      
      Severity: Minor
      Found in datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizController.java - About 35 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

      There are no issues that match your filters.

      Category
      Status