r4fterman/pdf.forms

View on GitHub

Showing 172 of 2,280 total issues

Method drawMulitipleSelectionBox has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void drawMulitipleSelectionBox(
            final Graphics2D g2,
            final Set<IWidget> selectedWidgets,
            final boolean drawNodes) {

Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/utils/WidgetSelection.java - About 25 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 dropWidget has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void dropWidget(
            final DefaultMutableTreeNode sourceNode,
            final IWidget sourceUserObject,
            final DefaultMutableTreeNode targetNode,
            final IWidget targetUserObject) {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 25 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 dropPage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void dropPage(
            final IMainFrame mainFrame,
            final DefaultMutableTreeNode sourceNode,
            final DefaultMutableTreeNode targetNode,
            final Object targetUserObject) {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 25 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 dropTransferable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean dropTransferable(
            final Transferable transferable,
            final DataFlavor flavor,
            final DropTargetDropEvent event) {
        try {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 25 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 getTargetIndex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private int getTargetIndex(
            final IWidget targetUserObject,
            final List<IWidget> sourceWidgetList,
            final List<IWidget> targetWidgetList,
            final int sourceIndex) {
Severity: Minor
Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 25 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 paintComponent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void paintComponent(final Graphics graphics) {
        super.paintComponent(graphics);

        final String text = getText();
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfButton.java - About 25 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 underlineWord has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void underlineWord(
            final Graphics graphics,
            final String text,
            final FontMetrics f,
            final int x,
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfCaption.java - About 25 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 setSplitPaneDividerColor has a Cognitive Complexity of 6 (exceeds 5 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 25 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 paintComponent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void paintComponent(final Graphics graphics) {
        super.paintComponent(graphics);

        final String text = getText();
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfTextField.java - About 25 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 underlineWord has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void underlineWord(
            final Graphics graphics,
            final String text,
            final FontMetrics fontMetrics,
            final int x,
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfButton.java - About 25 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 paintComponent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void paintComponent(final Graphics graphics) {
        super.paintComponent(graphics);

        final String text = getText();
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfCaption.java - About 25 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 underlineWord has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void underlineWord(
            final Graphics graphics,
            final String text,
            final FontMetrics f,
            final int x,
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/components/PdfTextField.java - About 25 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

Severity
Category
Status
Source
Language