r4fterman/pdf.forms

View on GitHub

Showing 2,278 of 2,280 total issues

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

    private void setSplitPaneDividerColor(final JSplitPane splitPane) {
        final SplitPaneUI splitUI = splitPane.getUI();
        if (splitUI instanceof BasicSplitPaneUI) {
            // obviously this will not work if the ui does not extend Basic...
            final int dividerSize = splitPane.getDividerSize();
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/SplitComponent.java - About 1 hr to fix

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

        private void setHeight(final String heightToUse) {
            if (heightToUse == null) {
                return;
            }
    
    
    src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 394..406

    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 72.

    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

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

        private void setWidth(final String widthToUse) {
            if (widthToUse == null) {
                return;
            }
    
    
    src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 408..420

    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 72.

    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

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        private Optional<File> selectImageFile() {
            final JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            chooser.addChoosableFileFilter(new ImageFileFilter());
    
    
    src/main/java/org/pdf/forms/gui/commands/ImportPdfCommand.java on lines 54..64
    src/main/java/org/pdf/forms/gui/commands/OpenDesignerFileCommand.java on lines 64..73

    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 71.

    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

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        private Optional<File> selectPdfImportFile() {
            final JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            chooser.addChoosableFileFilter(new PdfFileFilter());
    
    
    src/main/java/org/pdf/forms/gui/commands/AddImageFileCommand.java on lines 41..51
    src/main/java/org/pdf/forms/gui/commands/OpenDesignerFileCommand.java on lines 64..73

    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 71.

    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

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        private Optional<File> selectDesignerFile() {
            final JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            chooser.addChoosableFileFilter(new DesFileFilter());
            final int state = chooser.showOpenDialog((Component) mainFrame);
    src/main/java/org/pdf/forms/gui/commands/AddImageFileCommand.java on lines 41..51
    src/main/java/org/pdf/forms/gui/commands/ImportPdfCommand.java on lines 54..64

    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 71.

    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

    Consider simplifying this complex logical expression.
    Open

            if (o instanceof JavaScriptContent) {
                final JavaScriptContent that = (JavaScriptContent) o;
                return Objects.equals(initialize, that.initialize)
                        && Objects.equals(mouseEnter, that.mouseEnter)
                        && Objects.equals(mouseExit, that.mouseExit)
    Severity: Major
    Found in src/main/java/org/pdf/forms/model/des/JavaScriptContent.java - About 1 hr to fix

      Method addCheckBox has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                  final FormObject formObject,
                  final Page page,
                  final String groupName,
                  final int pageHeight,
                  final int cropHeight,
      Severity: Major
      Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 1 hr to fix

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

            private String getBorderStyle(final Set<IWidget> widgets) {
                final List<String> borderStyles = widgets.stream()
                        .map(widget -> widget.getWidgetModel().getProperties().getBorder())
                        .filter(Optional::isPresent)
                        .map(Optional::get)
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 322..332
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 334..344
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 346..356
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 358..368

        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

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

            private String getBackgroundStyle(final Set<IWidget> widgets) {
                final List<String> styles = widgets.stream()
                        .map(widget -> widget.getWidgetModel().getProperties().getBorder())
                        .filter(Optional::isPresent)
                        .map(Optional::get)
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 310..320
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 322..332
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 334..344
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 358..368

        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

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

            private String getBorderColor(final Set<IWidget> widgets) {
                final List<String> borderColors = widgets.stream()
                        .map(widget -> widget.getWidgetModel().getProperties().getBorder())
                        .filter(Optional::isPresent)
                        .map(Optional::get)
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 310..320
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 322..332
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 346..356
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 358..368

        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

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

            private String getBorderWidth(final Set<IWidget> widgets) {
                final List<String> borderWidth = widgets.stream()
                        .map(widget -> widget.getWidgetModel().getProperties().getBorder())
                        .filter(Optional::isPresent)
                        .map(Optional::get)
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 310..320
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 334..344
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 346..356
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 358..368

        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

                for (int i = 0; i < size; i++) {
                    final IWidget widget = allWidgets.get(i);
                    if (newSet.remove(widget)) {
                        allWidgets.add(i + 1, allWidgets.remove(i));
                        i = -1;
        src/main/java/org/pdf/forms/widgets/utils/WidgetAlignmentAndOrder.java on lines 127..133

        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

                for (int i = 0; i < size; i++) {
                    final IWidget widget = allWidgets.get(i);
                    if (newSet.remove(widget)) {
                        allWidgets.add(i + 1, allWidgets.remove(i));
                        i = -1;
        src/main/java/org/pdf/forms/gui/commands/BringForwardCommand.java on lines 52..58

        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

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

                } else {
                    if (mouseX >= widgetX && mouseX <= widgetX + getWidth()
                            && mouseY > (widgetY + dividorLocation) - 3
                            && mouseY < (widgetY + dividorLocation + 3)) {
        
        
        Severity: Major
        Found in src/main/java/org/pdf/forms/widgets/Widget.java and 1 other location - About 1 hr to fix
        src/main/java/org/pdf/forms/widgets/Widget.java on lines 186..193

        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

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

                if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
                    if (mouseY >= widgetY && mouseY <= widgetY + getHeight()
                            && mouseX > (widgetX + dividorLocation) - 3
                            && mouseX < (widgetX + dividorLocation + 3)) {
        
        
        Severity: Major
        Found in src/main/java/org/pdf/forms/widgets/Widget.java and 1 other location - About 1 hr to fix
        src/main/java/org/pdf/forms/widgets/Widget.java on lines 193..200

        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

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

            private String getBackgroundColor(final Set<IWidget> widgets) {
                final List<String> backgroundColors = widgets.stream()
                        .map(widget -> widget.getWidgetModel().getProperties().getBorder())
                        .filter(Optional::isPresent)
                        .map(Optional::get)
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 310..320
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 322..332
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 334..344
        src/main/java/org/pdf/forms/gui/properties/border/BorderPropertiesPanel.java on lines 346..356

        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 4 locations. Consider refactoring.
        Open

            @Override
            public void execute() {
                final IDesigner designerPanel = mainFrame.getDesigner();
                final Set<IWidget> selectedWidgets = designerPanel.getSelectedWidgets();
                changeOrderOfSelectedWidgets(designerPanel.getWidgets(), selectedWidgets);
        src/main/java/org/pdf/forms/gui/commands/BringForwardCommand.java on lines 20..33
        src/main/java/org/pdf/forms/gui/commands/BringToFrontCommand.java on lines 20..33
        src/main/java/org/pdf/forms/gui/commands/SendBackwardCommand.java on lines 20..33

        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

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            private Optional<File> choosePdfFile() {
                final JFileChooser chooser = new JFileChooser();
                chooser.addChoosableFileFilter(new PdfFileFilter());
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        
        
        src/main/java/org/pdf/forms/gui/commands/SaveDesignerFileAsCommand.java on lines 71..80
        src/main/java/org/pdf/forms/gui/commands/SaveDesignerFileCommand.java on lines 83..92

        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 4 locations. Consider refactoring.
        Open

            @Override
            public void execute() {
                final IDesigner designerPanel = mainFrame.getDesigner();
                final Set<IWidget> selectedWidgets = designerPanel.getSelectedWidgets();
                changeOrderOfSelectedWidgets(designerPanel.getWidgets(), selectedWidgets);
        src/main/java/org/pdf/forms/gui/commands/BringForwardCommand.java on lines 20..33
        src/main/java/org/pdf/forms/gui/commands/SendBackwardCommand.java on lines 20..33
        src/main/java/org/pdf/forms/gui/commands/SendToBackCommand.java on lines 20..33

        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

        Severity
        Category
        Status
        Source
        Language