r4fterman/pdf.forms

View on GitHub

Showing 172 of 2,280 total issues

Method getNextArrayNumberForName has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public int getNextArrayNumberForName(
            final String name,
            final IWidget widget) {

Severity: Minor
Found in src/main/java/org/pdf/forms/gui/VLFrame.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method equals has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean equals(final Object o) {
        if (o instanceof FontProperties) {
            final FontProperties that = (FontProperties) o;
            return Objects.equals(valueFontName, that.valueFontName)
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/properties/font/FontProperties.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method removeEmptyGroupFromParent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void removeEmptyGroupFromParent(
            final Object[] sourceObjectPath,
            final List<IWidget> sourceWidgetList,
            final List<IWidget> targetWidgetList) {
        /*
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

            final int pageHeight,
            final int cropHeight,
            final int cropX,
            final int cropY,
            final List<IWidget> widgetsOnPage,
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 45 mins to fix

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

                final JTree tree,
                final Object value,
                final boolean isSelected,
                final boolean expanded,
                final boolean leaf,

      Method autoscroll has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          @Override
          public void autoscroll(final Point pt) {
              // Figure out which row we're on.
              int nRow = getRowForLocation(pt.x, pt.y);
      
      
      Severity: Minor
      Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CTree.java - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

                  final int pageHeight,
                  final int cropHeight,
                  final int cropX,
                  final int cropY,
                  final List<IWidget> widgetsOnPage,
      Severity: Minor
      Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 45 mins to fix

        Method equals has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public boolean equals(final Object o) {
                if (o instanceof Properties) {
                    final Properties that = (Properties) o;
                    return Objects.equals(font, that.font)
        Severity: Minor
        Found in src/main/java/org/pdf/forms/model/des/Properties.java - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

                    final int pageHeight,
                    final int cropHeight,
                    final int cropX,
                    final int cropY,
                    final List<IWidget> widgetsOnPage,
        Severity: Minor
        Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 45 mins to fix

          Method handleChoiceField has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              private void handleChoiceField(
                      final FormObject formObject,
                      final IWidget widget) {
                  final ObjectProperties objectProperties = widget.getWidgetModel().getProperties().getObject();
          
          
          Severity: Minor
          Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          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

            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

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

                          final Set<IWidget> selectedWidgets,
                          final IDesigner designerPanel,
                          final int mouseX,
                          final int mouseY,
                          final int resizeType) {
              Severity: Minor
              Found in src/main/java/org/pdf/forms/widgets/utils/WidgetSelection.java - About 35 mins to fix

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

                            final IWidget widget,
                            final Rectangle pageSize,
                            final int currentPage,
                            final PdfWriter writer,
                            final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
                Severity: Minor
                Found in src/main/java/org/pdf/forms/writer/PdfCheckBoxWriter.java - About 35 mins to fix

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

                              final IWidget widget,
                              final Rectangle pageSize,
                              final int currentPage,
                              final PdfWriter writer,
                              final GlobalPdfWriter globalPdfWriter) {
                  Severity: Minor
                  Found in src/main/java/org/pdf/forms/writer/PdfImageWriter.java - About 35 mins to fix

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

                                IWidget widget,
                                Rectangle pageSize,
                                int currentPage,
                                PdfWriter writer,
                                GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException;
                    Severity: Minor
                    Found in src/main/java/org/pdf/forms/writer/PdfComponentWriter.java - About 35 mins to fix

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

                                      final JList<? extends String> list,
                                      final String value,
                                      final int index,
                                      final boolean isSelected,
                                      final boolean cellHasFocus) {
                      Severity: Minor
                      Found in src/main/java/org/pdf/forms/gui/library/LibraryPanel.java - About 35 mins to fix

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

                                    final IWidget widget,
                                    final Rectangle pageSize,
                                    final int currentPage,
                                    final PdfWriter writer,
                                    final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
                        Severity: Minor
                        Found in src/main/java/org/pdf/forms/writer/PdfTextFieldWriter.java - About 35 mins to fix

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

                                      final PdfWriter writer,
                                      final List<IWidget> widgets,
                                      final Rectangle pageSize,
                                      final int currentPage,
                                      final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
                          Severity: Minor
                          Found in src/main/java/org/pdf/forms/writer/Writer.java - About 35 mins to fix

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

                                        final FormObject formObject,
                                        final int pageHeight,
                                        final int cropHeight,
                                        final int cropX,
                                        final int cropY) {
                            Severity: Minor
                            Found in src/main/java/org/pdf/forms/widgets/utils/WidgetParser.java - About 35 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language