groupdocs-total/GroupDocs.Total-for-Java-Spring

View on GitHub

Showing 22 of 22 total issues

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

    public String[] getPosibleConversions(String extension)
    {
        switch (extension)
        {
            default:

    Method loadFiles has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public List<FileDescriptionEntity> loadFiles(FileTreeRequest fileTreeRequest) {
            final String path = fileTreeRequest.getPath();
            final File filesDirectory = new File(Path.combine(comparisonConfiguration.getFilesDirectory(), path));
    
    

      Method fillStamp has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void fillStamp(List<StampLine> innerLines, List<StampLine> outerLines) {
              for (int i = 0; i < stampData.size(); i++) {
                  StampXmlEntity stampXmlEntity = stampData.get(i);
                  String text = "";
                  for (int j = 0; j < stampXmlEntity.getTextRepeat(); j++) {
      Severity: Minor
      Found in src/main/java/com/groupdocs/ui/signature/signer/StampSigner.java - About 1 hr to fix

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            private String[] tsvTypes = { "ods", "xls", "xlsx", "xlsm", "xlsb", "csv", "xls2003", "xltx", "xltm", "tsv", "tiff", "tif", "jpeg", "jpg", "png", "gif", "bmp", "ico", "psd", "webp", "jp2", "pdf", "epub", "xps", "ppt", "pps", "pptx", "ppsx", "odp", "otp", "potx", "potm", "pptm", "ppsm", "doc", "docm", "docx", "dot", "dotm", "dotx", "rtf", "txt", "odt", "ott", "html", };
        src/main/java/com/groupdocs/ui/conversion/DestinationTypesFilter.java on lines 5..5

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 96.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            private String[] csvTypes = { "ods", "xls", "xlsx", "xlsm", "xlsb", "csv", "xls2003", "xltx", "xltm", "tsv", "tiff", "tif", "jpeg", "jpg", "png", "gif", "bmp", "ico", "psd", "webp", "jp2", "pdf", "epub", "xps", "ppt", "pps", "pptx", "ppsx", "odp", "otp", "potx", "potm", "pptm", "ppsm", "doc", "docm", "docx", "dot", "dotm", "dotx", "rtf", "txt", "odt", "ott", "html", };
        src/main/java/com/groupdocs/ui/conversion/DestinationTypesFilter.java on lines 9..9

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 96.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            private String[] imageTypes = { "ods", "xls", "xlsx", "xlsm", "xlsb", "xls2003", "xltx", "xltm", "tiff", "tif", "jpeg", "jpg", "png", "gif", "bmp", "ico", "psd", "svg", "webp", "jp2", "pdf", "epub", "xps", "ppt", "pps", "pptx", "ppsx", "odp", "otp", "potx", "potm", "pptm", "ppsm", "doc", "docm", "docx", "dot", "dotm", "dotx", "rtf", "odt", "ott", "html", };
        src/main/java/com/groupdocs/ui/conversion/DestinationTypesFilter.java on lines 10..10

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 92.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            private String[] webpTypes = { "ods", "xls", "xlsx", "xlsm", "xlsb", "xls2003", "xltx", "xltm", "tiff", "tif", "jpeg", "jpg", "png", "gif", "bmp", "ico", "psd", "svg", "webp", "jp2", "pdf", "epub", "xps", "ppt", "pps", "pptx", "ppsx", "odp", "otp", "potx", "potm", "pptm", "ppsm", "doc", "docm", "docx", "dot", "dotm", "dotx", "rtf", "odt", "ott", "html", };
        src/main/java/com/groupdocs/ui/conversion/DestinationTypesFilter.java on lines 8..8

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 92.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            @Override
            public AnnotatedDocumentEntity getDocumentDescription(LoadDocumentRequest loadDocumentRequest) {
                try {
                    // get/set parameters
                    String documentGuid = loadDocumentRequest.getGuid();

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

              public ResponseEntity download(String path) throws IOException {
                  if(path != null && !path.isEmpty()){
          
                      String destinationPath = FilenameUtils.concat(conversionConfiguration.getResultDirectory(),path);
                      String ext = FilenameUtils.getExtension(destinationPath);

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

                public static Annotator createAnnotator(AnnotationDataEntity annotationData, PageData pageData) {
                    switch (annotationData.getType()) {
                        case "text":
                            return new TextAnnotator(annotationData, pageData);
                        case "area":

              Method uploadFile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static String uploadFile(String documentStoragePath, MultipartFile content, String url, Boolean rewrite) {
                      String filePath;
                      try {
                          String fileName;
                          // save from file content
              Severity: Minor
              Found in src/main/java/com/groupdocs/ui/util/Utils.java - About 1 hr to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                            && !file.isHidden()) {
                                FileDescriptionEntity fileDescription = new FileDescriptionEntity();
                                fileDescription.setGuid(file.getCanonicalFile().getAbsolutePath());
                                fileDescription.setName(file.getName());
                                // set is directory true/false
                src/main/java/com/groupdocs/ui/comparison/ComparisonServiceImpl.java on lines 99..113

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 70.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                if (!(file.getName().equals(comparisonConfiguration.getFilesDirectory())) && !(file.getName().equals(comparisonConfiguration.getResultDirectory())) && !file.getName().startsWith(".") && !file.isHidden() && !TEMP_DIRECTORY_NAME.equals(file.getName())) {
                                    FileDescriptionEntity fileDescription = new FileDescriptionEntity();
                                    fileDescription.setGuid(file.getCanonicalFile().getAbsolutePath());
                                    fileDescription.setName(file.getName());
                                    // set is directory true/false
                src/main/java/com/groupdocs/ui/viewer/service/ViewerServiceImpl.java on lines 113..127

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 70.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            Collections.sort(filesList, new Comparator<FileDescriptionEntity>() {
                                @Override
                                public int compare(FileDescriptionEntity o1, FileDescriptionEntity o2) {
                                    if (o1.isIsDirectory() && !o2.isIsDirectory()) {
                                        return -1;
                src/main/java/com/groupdocs/ui/comparison/ComparisonServiceImpl.java on lines 117..128

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 69.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            Collections.sort(filesList, new Comparator<FileDescriptionEntity>() {
                                @Override
                                public int compare(FileDescriptionEntity o1, FileDescriptionEntity o2) {
                                    if (o1.isIsDirectory() && !o2.isIsDirectory()) {
                                        return -1;
                src/main/java/com/groupdocs/ui/viewer/service/ViewerServiceImpl.java on lines 86..97

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 69.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Method newLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public Line newLine(String line, double x, double y, double width, double height, List<Word> words) {

                  Method newPage has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public Page newPage(int number, String name, boolean visible, int width, int height, List<Line> lines) {

                    Method newWord has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public Word newWord(String word, double x, double y, double width, double height, List<Character> characters) {

                      Method newPage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public Page newPage(int number, boolean visible, int width, int height, List<Line> lines) {

                        Method newCharacter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public Character newCharacter(char character, double x, double y, double width, double height) {
                          Severity
                          Category
                          Status
                          Source
                          Language