Showing 2,278 of 2,280 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
package org.pdf.forms.gui.properties.object.field;
import static java.util.stream.Collectors.toUnmodifiableList;
import java.awt.event.ActionEvent;
- Read upRead up
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 874.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
package org.pdf.forms.gui.properties.object.field;
import static java.util.stream.Collectors.toUnmodifiableList;
import java.awt.event.ActionEvent;
- Read upRead up
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 874.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Widget
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class Widget implements IWidget {
private final Logger logger = LoggerFactory.getLogger(Widget.class);
private final org.pdf.forms.model.des.Widget widget;
File Widget.java
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.widgets;
import java.awt.*;
import java.awt.font.TextAttribute;
import java.util.Collections;
File VLFrame.java
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.gui;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
File SizeAndPositionPanel.java
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.gui.properties.layout;
import static java.util.stream.Collectors.toUnmodifiableList;
import static org.jdesktop.layout.GroupLayout.BASELINE;
import static org.jdesktop.layout.GroupLayout.DEFAULT_SIZE;
VLFrame
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
public class VLFrame extends JFrame implements IMainFrame {
private final Version version;
private final WidgetFactory widgetFactory;
private final Configuration configuration;
File Writer.java
has 458 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.writer;
import static java.util.stream.Collectors.toUnmodifiableMap;
import java.awt.*;
File FontPropertiesPanel.java
has 442 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.gui.properties.font;
import static java.util.stream.Collectors.toUnmodifiableList;
import static org.jdesktop.layout.GroupLayout.BASELINE;
import static org.jdesktop.layout.GroupLayout.DEFAULT_SIZE;
GroupWidget
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
public class GroupWidget implements IWidget {
private static int groupNextWidgetNumber = 1;
private static final int TYPE = IWidget.GROUP;
IWidget
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
public interface IWidget {
int NONE = -1;
int TEXT_FIELD = 0;
int TEXT = 1;
File Designer.java
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.gui.designer;
import java.awt.*;
import java.util.Collection;
import java.util.HashSet;
Similar blocks of code found in 2 locations. Consider refactoring. Open
package org.pdf.forms.model.des;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
- Read upRead up
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 370.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
package org.pdf.forms.model.des;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
- Read upRead up
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 370.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Designer
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
public class Designer extends PdfDecoder implements IDesigner {
private final Logger logger = LoggerFactory.getLogger(Designer.class);
private final WidgetSelection widgetSelection;
File CDropTargetListener.java
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.gui.hierarchy.tree;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
File WidgetSelection.java
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.widgets.utils;
import static java.util.stream.Collectors.toUnmodifiableSet;
import java.awt.*;
File WidgetParser.java
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.pdf.forms.widgets.utils;
import java.awt.*;
import java.util.Collections;
import java.util.HashSet;
IDesigner
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
public interface IDesigner {
Color BACKGROUND_COLOR = new Color(236, 233, 216);
Color PAGE_COLOR = Color.white;
TestDesginer
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
public class TestDesginer implements IDesigner {
@Override
public void displayPage(final Page page) {
}