r4fterman/pdf.forms

View on GitHub

Showing 282 of 2,280 total issues

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

package org.pdf.forms.readers.configuration;

import java.util.ArrayList;
import java.util.List;

src/main/java/org/pdf/forms/readers/configuration/MenuConfigurationBuilder.java on lines 1..23

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

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 (widgets != null
                && value != null
                && !value.equals("mixed")) {
            widgets.forEach(widget -> widget.getWidgetModel().getProperties().getObject().getField()
                    .setMaxChars(value));
src/main/java/org/pdf/forms/gui/properties/object/value/SimpleValuePanel.java on lines 132..137

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

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 configureSplitPaneCaptionTop(final JSplitPane splitPane) {
        splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);

        splitPane.setTopComponent(captionPanel);
        splitPane.setBottomComponent(valuePanel);
src/main/java/org/pdf/forms/widgets/components/SplitComponent.java on lines 139..148

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

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 configureSplitPaneCaptionRight(final JSplitPane splitPane) {
        splitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);

        splitPane.setRightComponent(captionPanel);
        splitPane.setLeftComponent(valuePanel);
src/main/java/org/pdf/forms/widgets/components/SplitComponent.java on lines 108..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 52.

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 PdfDecoder getDecoder(final String pdfPath) throws PdfException {
        final PdfDecoder decoder = new PdfDecoder();
        if (pdfPath.startsWith("http:") || pdfPath.startsWith("file:")) {
            decoder.openPdfFileFromURL(pdfPath);
        } else {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/commands/ImportPdfCommand.java and 1 other location - About 40 mins to fix
src/main/java/org/pdf/forms/gui/commands/PDFImportWorker.java on lines 237..245

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

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 (widgets != null
                && defaultText != null
                && !defaultText.equals("mixed")) {
            widgets.forEach(widget -> widget.getWidgetModel().getProperties().getObject().getValue()
                    .setDefault(defaultText));
src/main/java/org/pdf/forms/gui/properties/object/field/TextFieldFieldPanel.java on lines 167..172

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

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 PdfDecoder getDecoder(final String pdfPath) throws PdfException {
        final PdfDecoder decoder = new PdfDecoder();
        if (pdfPath.startsWith("http:") || pdfPath.startsWith("file:")) {
            decoder.openPdfFileFromURL(pdfPath);
        } else {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/commands/PDFImportWorker.java and 1 other location - About 40 mins to fix
src/main/java/org/pdf/forms/gui/commands/ImportPdfCommand.java on lines 107..115

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

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

package org.pdf.forms.readers.configuration;

import java.util.ArrayList;
import java.util.List;

src/main/java/org/pdf/forms/readers/configuration/WindowConfigurationBuilder.java on lines 1..23

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

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 ("top".equals(alignment)) {
            component.setVerticalAlignment(SwingConstants.TOP);
        } else if ("bottom".equals(alignment)) {
            component.setVerticalAlignment(SwingConstants.BOTTOM);
        } else {
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/Widget.java and 1 other location - About 40 mins to fix
src/main/java/org/pdf/forms/widgets/Widget.java on lines 492..498

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

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

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

    private void setItemQuietly(
            final JComboBox<String> comboBox,
            final Object item) {
        final ActionListener[] listeners = comboBox.getActionListeners();
        Arrays.stream(listeners).forEach(comboBox::removeActionListener);
src/main/java/org/pdf/forms/gui/toolbars/WidgetPropertiesToolBar.java on lines 378..385

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

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

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

Severity
Category
Status
Source
Language