objectionary/eo

View on GitHub

Showing 118 of 187 total issues

Method take has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

@Override
public Phi take(final String name) {
final String fqn = String.join(".", this.pkg, name);
final Phi taken;
if (name.equals(Attr.RHO)) {
Severity: Minor
Found in eo-runtime/src/main/java/org/eolang/PhPackage.java - About 1 hr to fix

Method parsed has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public XML parsed() throws IOException {
final List<Text> lines = this.lines();
final GeneralErrors spy = new GeneralErrors(lines);
final EoLexer lexer = new EoIndentLexer(this.normalize());
lexer.removeErrorListeners();
Severity: Minor
Found in eo-parser/src/main/java/org/eolang/parser/EoSyntax.java - About 1 hr to fix

    Method take has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    @SuppressWarnings("PMD.PreserveStackTrace")
    public byte[] take() {
    try {
    return this.phi.delta();
    } catch (final EOerror.ExError ex) {
    Severity: Minor
    Found in eo-runtime/src/main/java/org/eolang/Dataized.java - About 1 hr to fix

      Method take has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      @Override
      public Phi take(final String name) {
      PhDefault.NESTING.set(PhDefault.NESTING.get() + 1);
      final Phi object;
      if (this.attrs.containsKey(name)) {
      Severity: Minor
      Found in eo-runtime/src/main/java/org/eolang/PhDefault.java - About 1 hr to fix

        Method accept has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        @Override
        public void accept(final Dependency dep, final Path path) {
        try {
        MojoExecutor.executeMojo(
        MojoExecutor.plugin(
        Severity: Minor
        Found in eo-maven-plugin/src/main/java/org/eolang/maven/Central.java - About 1 hr to fix

          Method file has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          private Path file(final Dep dep) {
          try {
          final Dependency dpndncy = dep.get();
          final String name = DpsDepgraph.fileName(dpndncy);
          MojoExecutor.executeMojo(
          Severity: Minor
          Found in eo-maven-plugin/src/main/java/org/eolang/maven/DpsDepgraph.java - About 1 hr to fix

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

            @SuppressWarnings("PMD.PreserveStackTrace")
            private Phi loadPhi(final String fqn) {
            final String target = new JavaPath(fqn).toString();
            Phi loaded;
            try {
            Severity: Minor
            Found in eo-runtime/src/main/java/org/eolang/PhPackage.java - About 1 hr to fix

              Method exitError has 32 lines of code (exceeds 25 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

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

                @Override
                public Phi lambda() {
                final Path path = Paths.get(
                new Dataized(
                this.take(Attr.RHO).take("file").take("path")
                Severity: Minor
                Found in eo-runtime/src/main/java/EOorg/EOeolang/EOfs/EOdir$EOwalk.java - About 1 hr to fix

                  Method execWithTimeout has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  @SuppressWarnings("PMD.CloseResource")
                  private void execWithTimeout() throws ExecutionException, TimeoutException {
                  final ExecutorService service = Executors.newSingleThreadExecutor();
                  try {
                  service.submit(
                  Severity: Minor
                  Found in eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java - About 1 hr to fix

                    Method jvms has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    private static Collection<String> jvms(final Path file) {
                    return new Xnav(file)
                    .element("program")
                    .elements(Filter.withName("metas"))
                    .findFirst()
                    Severity: Minor
                    Found in eo-maven-plugin/src/main/java/org/eolang/maven/DpsDefault.java - About 1 hr to fix

                      Method translate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      private int translate(final Path xmir, final int position, final int total)
                      throws Exception {
                      final long start = System.currentTimeMillis();
                      Logger.debug(
                      this,
                      Severity: Minor
                      Found in eo-maven-plugin/src/main/java/org/eolang/maven/PhiMojo.java - About 1 hr to fix

                        Method iterator has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        @Override
                        public Iterator<Dep> iterator() {
                        final Collection<TjForeign> list = this.tojos.dependencies();
                        Logger.debug(
                        this, "%d suitable tojo(s) found out of %d",
                        Severity: Minor
                        Found in eo-maven-plugin/src/main/java/org/eolang/maven/DpsDefault.java - About 1 hr to fix

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

                        @Override
                        public void exec() {
                        final long begin = System.currentTimeMillis();
                        String before = this.scopedTojos().status();
                        int cycle = 0;
                        Severity: Minor
                        Found in eo-maven-plugin/src/main/java/org/eolang/maven/AssembleMojo.java - About 1 hr to fix

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

                          @Override
                          public Iterator<Dep> iterator() {
                          final Collection<Dep> deps = new ListOf<>(this.delegate.iterator());
                          final Map<String, Set<String>> conflicts = deps
                          .stream()

                            Method reset has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            private static XML reset(final XML xml, final Path tmp) {
                            final Optional<String> location = new Xnav(xml.inner())
                            .element("program")
                            .attribute("xsi:noNamespaceSchemaLocation")
                            .text();
                            Severity: Minor
                            Found in eo-parser/src/main/java/org/eolang/parser/StrictXmir.java - About 1 hr to fix

                              Method parsed has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              @Override
                              public XML parsed() throws IOException {
                              final XePhiListener xel = new XePhiListener(this.name);
                              final GeneralErrors spy = new GeneralErrors(this.input);
                              final PhiLexer lexer = new PhiLexer(
                              Severity: Minor
                              Found in eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java - About 1 hr to fix

                                Method get has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                @Override
                                public String get() {
                                final String result;
                                switch (this.data.length) {
                                case 0:
                                Severity: Minor
                                Found in eo-runtime/src/main/java/org/eolang/VerboseBytesAsString.java - About 1 hr to fix

                                  Method keepThem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  @SuppressWarnings("PMD.AvoidAccessToStaticMembersViaThis")
                                  private int keepThem(final Iterable<? extends TjPlaced> tojos) throws IOException {
                                  int deleted = 0;
                                  int remained = 0;
                                  for (final TjPlaced tojo : tojos) {
                                  Severity: Minor
                                  Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnplaceMojo.java - About 1 hr to fix

                                    Method value has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    @Override
                                    public Path value() throws IOException {
                                    final long bytes;
                                    try {
                                    if (this.target.toFile().getParentFile().mkdirs()) {
                                    Severity: Minor
                                    Found in eo-maven-plugin/src/main/java/org/eolang/maven/Saved.java - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language