r4fterman/pdf.forms

View on GitHub

Showing 2,278 of 2,280 total issues

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

    private void setComboValue(
            final JComboBox<String> comboBox,
            final Object value) {
        final ActionListener[] listeners = comboBox.getActionListeners();
        Arrays.stream(listeners).forEach(comboBox::removeActionListener);
src/main/java/org/pdf/forms/gui/properties/object/page/PagePanel.java on lines 256..265

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

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 Properties) {
            final Properties that = (Properties) o;
            return Objects.equals(font, that.font)
                    && Objects.equals(object, that.object)
                    && Objects.equals(layout, that.layout)
Severity: Major
Found in src/main/java/org/pdf/forms/model/des/Properties.java - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (o instanceof FontProperties) {
                final FontProperties that = (FontProperties) o;
                return Objects.equals(valueFontName, that.valueFontName)
                        && Objects.equals(valueFontSize, that.valueFontSize)
                        && Objects.equals(valueFontStyle, that.valueFontStyle)
    Severity: Major
    Found in src/main/java/org/pdf/forms/gui/properties/font/FontProperties.java - About 40 mins to fix

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof BorderProperties) {
                  final BorderProperties that = (BorderProperties) o;
                  return Objects.equals(borders, that.borders)
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/des/BorderProperties.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof FontProperties) {
                  final FontProperties that = (FontProperties) o;
                  return Objects.equals(fontCaption, that.fontCaption)
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/des/FontProperties.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof Property) {
                  final Property that = (Property) o;
                  return Objects.equals(name, that.name) && Objects.equals(value, that.value);
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/des/Property.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof CustomComponent) {
                  final CustomComponent that = (CustomComponent) o;
                  return Objects.equals(property, that.property) && Objects.equals(widget, that.widget);
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof ParagraphProperties) {
                  final ParagraphProperties that = (ParagraphProperties) o;
                  return Objects.equals(paragraphCaption, that.paragraphCaption)
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/des/ParagraphProperties.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof Item) {
                  final Item item = (Item) o;
                  return Objects.equals(value, item.value)
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/des/Item.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52
      src/main/java/org/pdf/forms/model/properties/Font.java on lines 53..61

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

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

          @Override
          public boolean equals(final Object o) {
              if (o instanceof Font) {
                  final Font font = (Font) o;
                  return Objects.equals(name, font.name)
      Severity: Major
      Found in src/main/java/org/pdf/forms/model/properties/Font.java and 6 other locations - About 40 mins to fix
      src/main/java/org/pdf/forms/model/components/CustomComponent.java on lines 40..47
      src/main/java/org/pdf/forms/model/des/BorderProperties.java on lines 40..48
      src/main/java/org/pdf/forms/model/des/FontProperties.java on lines 43..51
      src/main/java/org/pdf/forms/model/des/Item.java on lines 56..64
      src/main/java/org/pdf/forms/model/des/ParagraphProperties.java on lines 37..45
      src/main/java/org/pdf/forms/model/des/Property.java on lines 45..52

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

      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 (widget.isComponentSplit()) {
                  final LayoutProperties layoutProperties = widget.getWidgetModel().getProperties().getLayout();
                  final String location = layoutProperties.getCaption().getPosition().orElse("None");
                  if (location.equals("None")) {
                      return;
      Severity: Minor
      Found in src/main/java/org/pdf/forms/writer/PdfListBoxWriter.java and 1 other location - About 40 mins to fix
      src/main/java/org/pdf/forms/writer/PdfComboBoxWriter.java on lines 111..117

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

      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 (widget.isComponentSplit()) {
                  final LayoutProperties layoutProperties = widget.getWidgetModel().getProperties().getLayout();
                  final String location = layoutProperties.getCaption().getPosition().orElse("None");
                  if (location.equals("None")) {
                      return;
      Severity: Minor
      Found in src/main/java/org/pdf/forms/writer/PdfComboBoxWriter.java and 1 other location - About 40 mins to fix
      src/main/java/org/pdf/forms/writer/PdfListBoxWriter.java on lines 117..123

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

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

          private JToggleButton createAlignHorizontalLeftButton() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Left.gif")));
              button.setToolTipText("Horizontal Align Left");
              button.setName("left");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 133..140
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 151..158
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 169..176
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 178..185
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 187..194

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

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

          private JToggleButton createAlignVerticalBottomButton() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Bottom.gif")));
              button.setToolTipText("Vertical Align Bottom");
              button.setName("bottom");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 133..140
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 160..167
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 169..176
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 178..185
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 187..194

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

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

          private JToggleButton createAlignHorizontalJustify() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Justify.gif")));
              button.setToolTipText("Horizontal Align Justify");
              button.setName("justify");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 133..140
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 151..158
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 160..167
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 169..176
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 178..185

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

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

          private JToggleButton createAlignVerticalTopButton() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Top.gif")));
              button.setToolTipText("Vertical Align Top");
              button.setName("top");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 151..158
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 160..167
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 169..176
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 178..185
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 187..194

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

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

          private JToggleButton createAlignHorizontalCenterButton() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Center.gif")));
              button.setToolTipText("Horizontal Align Center");
              button.setName("center");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 133..140
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 151..158
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 160..167
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 178..185
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 187..194

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

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

          private JToggleButton createAlignHorizontalRightButton() {
              final JToggleButton button = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Paragraph Align Right.gif")));
              button.setToolTipText("Horizontal Align Right");
              button.setName("right");
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 133..140
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 142..149
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 151..158
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 160..167
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 169..176
      src/main/java/org/pdf/forms/gui/properties/paragraph/ParagraphPropertiesPanel.java on lines 187..194

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

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

          private JToggleButton createRotate0DegreeButton() {
              final JToggleButton rotateButton = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Anchor Rotation 0.png")));
              rotateButton.setEnabled(false);
              rotateButton.setName("0");
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 204..211
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 213..220
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 222..229

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

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

          private JToggleButton createRotate180DegreeButton() {
              final JToggleButton rotateButton = new JToggleButton(new ImageIcon(getClass()
                      .getResource("/org/pdf/forms/res/Anchor Rotation 180.png")));
              rotateButton.setEnabled(false);
              rotateButton.setName("180");
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 204..211
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 222..229
      src/main/java/org/pdf/forms/gui/properties/layout/SizeAndPositionPanel.java on lines 231..238

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

      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