driver733/VK-Uploader

View on GitHub

Showing 10 of 51 total issues

Method upload has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private List<AbstractQueryBuilder<AudioAddQuery, Integer>> upload(final Path audio)
        throws Exception {
        final List<AbstractQueryBuilder<AudioAddQuery, Integer>> result;
        if (
            this.properties.property(

    Method postsQueries has 86 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public List<ExecuteBatchQuery> postsQueries() throws Exception {
            int left = this.count;
            final List<ExecuteBatchQuery> result =
                new ArrayList<>(
                    left

      Method postsQueries has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @SuppressWarnings("PMD.OptimizableToArrayCall")
          public List<ExecuteBatchQuery> postsQueries() throws Exception {
              final Iterator<Path> audio = this.audios
                  .files()
                  .iterator();

        Method construct has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public WallPostQuery construct() throws Exception {
                final Mp3File file;
                try {
                    file = new Mp3File(
                        this.audios.get(0)

          Method postsBatch has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @SuppressWarnings({"PMD.AvoidInstantiatingObjectsInLoops",
                  "PMD.OptimizableToArrayCall"
                  })
              private ExecuteBatchQuery postsBatch(
                  final List<Path> audios

            Method postsBatch has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @SuppressWarnings({"PMD.AvoidInstantiatingObjectsInLoops",
                    "PMD.OptimizableToArrayCall"
                    })
                private ExecuteBatchQuery postsBatch(final List<Path> photos) throws
                    Exception {

              Method postsQueries has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
              Open

                  @SuppressWarnings("PMD.OptimizableToArrayCall")
                  public List<ExecuteBatchQuery> postsQueries() throws Exception {
                      final Iterator<Path> audio = this.audios
                          .files()
                          .iterator();

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

                  public List<ExecuteBatchQuery> postsQueries() throws Exception {
                      int left = this.count;
                      final List<ExecuteBatchQuery> result =
                          new ArrayList<>(
                              left

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

                  @Override
                  @SuppressWarnings("PMD.AvoidDuplicateLiterals")
                  public String attachmentString() throws IOException {
                      final String formatted;
                      final JsonObject object;

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

                  private List<AbstractQueryBuilder<AudioAddQuery, Integer>> upload(final Path audio)
                      throws Exception {
                      final List<AbstractQueryBuilder<AudioAddQuery, Integer>> result;
                      if (
                          this.properties.property(

              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

              Severity
              Category
              Status
              Source
              Language