Showing 118 of 209 total issues

Method exec has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    @SuppressWarnings("PMD.CognitiveComplexity")
    public void exec() throws IOException {
        if (this.hash == null) {
            this.hash = new ChCached(
Severity: Major
Found in eo-maven-plugin/src/main/java/org/eolang/maven/ProbeMojo.java - About 2 hrs to fix

    Method toPhi has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            @SuppressWarnings("PMD.CognitiveComplexity")
            private static Phi toPhi(final Object obj) {
                final Phi phi;
                final Phi eolang = Phi.Φ.take("org").take("eolang");
                if (obj instanceof Boolean) {
    Severity: Minor
    Found in eo-runtime/src/main/java/org/eolang/Data.java - About 2 hrs to fix

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

          @Override
          @SuppressWarnings("PMD.CognitiveComplexity")
          public void exec() throws IOException {
              if (this.hash == null) {
                  this.hash = new ChCached(
      Severity: Minor
      Found in eo-maven-plugin/src/main/java/org/eolang/maven/ProbeMojo.java - About 1 hr 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 killThem has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          @SuppressWarnings("PMD.CognitiveComplexity")
          private int killThem(final Iterable<PlacedTojo> all) throws IOException {
              int unplaced = 0;
              for (final PlacedTojo tojo : all) {
                  final String related = tojo.related();
      Severity: Minor
      Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnplaceMojo.java - About 1 hr 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 killThem has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @SuppressWarnings("PMD.CognitiveComplexity")
          private int killThem(final Iterable<PlacedTojo> all) throws IOException {
              int unplaced = 0;
              for (final PlacedTojo tojo : all) {
                  final String related = tojo.related();
      Severity: Minor
      Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnplaceMojo.java - About 1 hr to fix

        Method validateComment has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private void validateComment(
                final ParserRuleContext ctx,
                final List<EoParser.CommentContext> comments
            ) {
                if(this.tests || comments.isEmpty()) {
        Severity: Minor
        Found in eo-parser/src/main/java/org/eolang/parser/XeEoListener.java - About 1 hr to fix

          Method execute has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              @SuppressWarnings("PMD.CognitiveComplexity")
              public final void execute() throws MojoFailureException {
                  StaticLoggerBinder.getSingleton().setMavenLog(this.getLog());
                  if (this.skip) {
          Severity: Minor
          Found in eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java - About 1 hr to fix

            Method exitError has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                private void exitError(final String msg, final Throwable exp)
                    throws MojoFailureException {
                    if (!this.unrollExitError) {
                        return;
                    }
            Severity: Minor
            Found in eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java - About 1 hr 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 exec has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                @Override
                public void exec() throws IOException {
                    if (this.generateGraphFiles && !this.generateXemblyFiles) {
                        throw new IllegalStateException(
                            "Setting generateGraphFiles and not setting generateXemblyFiles has no effect because .graph files require .xe files"
            Severity: Minor
            Found in eo-maven-plugin/src/main/java/org/eolang/maven/SodgMojo.java - About 1 hr 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 exec has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public void exec() {
                    if (this.sourcesDir == null) {
                        throw new IllegalArgumentException(
                            String.format("sourcesDir is null. Please specify a valid sourcesDir for %s", this)
            Severity: Minor
            Found in eo-maven-plugin/src/main/java/org/eolang/maven/RegisterMojo.java - About 1 hr to fix

              Method exec has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public void exec() throws IOException {
                      if (this.offline) {
                          Logger.info(
                              this,
              Severity: Minor
              Found in eo-maven-plugin/src/main/java/org/eolang/maven/PullMojo.java - About 1 hr to fix

                Method exec has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Override
                    public void exec() {
                        if (this.central == null) {
                            this.central = new Central(this.project, this.session, this.manager);
                        }
                Severity: Minor
                Found in eo-maven-plugin/src/main/java/org/eolang/maven/ResolveMojo.java - About 1 hr to fix

                  Method lambda has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Override
                      public Phi lambda() throws Exception {
                          final Phi match = this.take(Attr.RHO);
                          final InputStream bais = new ByteArrayInputStream(
                              new Dataized(match.take(Attr.RHO).take("serialized")).take()

                    Method run has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private static void run(final List<String> opts) throws Exception {
                            final String obj = opts.get(0);
                            if (obj.isEmpty()) {
                                throw new IllegalArgumentException(
                                    "The name of the object is an empty string, why?"
                    Severity: Minor
                    Found in eo-runtime/src/main/java/org/eolang/Main.java - About 1 hr to fix

                      Method iterator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          @Override
                          public Iterator<Dependency> iterator() {
                              final Collection<ForeignTojo> list = this.tojos.dependencies();
                              Logger.debug(
                                  this, "%d suitable tojo(s) found out of %d",

                        Method lambda has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            @Override
                            public Phi lambda() throws Exception {
                                final String format = new Dataized(this.take("format")).asString();
                                final Phi args = this.take("args");
                                final Phi retriever = args.take("at");
                        Severity: Minor
                        Found in eo-runtime/src/main/java/EOorg/EOeolang/EOtxt/EOsprintf.java - About 1 hr to fix

                          Method exec has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              @Override
                              void exec() throws IOException {
                                  final Home home = new HmBase(this.printOutputDir);
                                  final int total = new SumOf(
                                      new Threads<>(
                          Severity: Minor
                          Found in eo-maven-plugin/src/main/java/org/eolang/maven/PrintMojo.java - About 1 hr to fix

                            Method write has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                void write(final int identifier, final int offset, final byte[] data) {
                                    synchronized (this.blocks) {
                                        if (!this.blocks.containsKey(identifier)) {
                                            throw new ExFailure(
                                                String.format(
                            Severity: Minor
                            Found in eo-runtime/src/main/java/EOorg/EOeolang/Heaps.java - About 1 hr to fix

                              Method exec has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  @Override
                                  public void exec() {
                                      if (this.central == null) {
                                          this.central = new Central(this.project, this.session, this.manager);
                                      }
                              Severity: Minor
                              Found in eo-maven-plugin/src/main/java/org/eolang/maven/AssembleMojo.java - About 1 hr to fix

                                Method iterator has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        @Override
                                        public Iterator<Dependency> iterator() {
                                            try {
                                                final Collection<Dependency> all = new ArrayList<>(0);
                                                if (Files.exists(this.file)) {
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language