Innovimax-SARL/QuiXDM

View on GitHub
src/main/java/innovimax/quixproc/datamodel/generator/AGenerator.java

Summary

Maintainability
C
1 day
Test Coverage

AGenerator has 25 methods (exceeds 20 allowed). Consider refactoring.
Open

public abstract class AGenerator {

    public enum FileExtension {
        XML, HTML, JSON, YAML, RDF, CSV
    }
Severity: Minor
Found in src/main/java/innovimax/quixproc/datamodel/generator/AGenerator.java - About 2 hrs to fix

    File AGenerator.java has 270 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * QuiXProc: efficient evaluation of XProc Pipelines.
     * Copyright (C) 2011-2018 Innovimax
     * All rights reserved.
     *  Licensed under the Apache License, Version 2.0 (the "License");
    Severity: Minor
    Found in src/main/java/innovimax/quixproc/datamodel/generator/AGenerator.java - About 2 hrs to fix

      Method read has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

              @Override
              public int read(final byte[] b, final int off, final int len) {
                  // System.out.println("READ : off : "+off+" ; len : "+len+" :
                  // "+display(b));
                  if (b == null) {

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

              @Override
              public int read(final byte[] b, final int off, final int len) {
                  // System.out.println("READ : off : "+off+" ; len : "+len+" :
                  // "+display(b));
                  if (b == null) {

        Avoid too many return statements within this method.
        Open

                    return c;
        Severity: Major
        Found in src/main/java/innovimax/quixproc/datamodel/generator/AGenerator.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return total;
          Severity: Major
          Found in src/main/java/innovimax/quixproc/datamodel/generator/AGenerator.java - About 30 mins to fix

            There are no issues that match your filters.

            Category
            Status