Showing 172 of 2,280 total issues
Method dropData
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private boolean dropData(
final JComponent srcComponent,
final Transferable transferable,
final DataFlavor[] flavors) {
// Ok, now try to display the content of the drop.
- Read upRead up
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 handleButtonGroups
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private void handleButtonGroups(
final PdfWriter writer,
final List<IWidget> widgets,
final Rectangle pageSize,
final int currentPage,
- Read upRead up
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 handleBorder
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void handleBorder(
final FormObject formObject,
final IWidget widget) {
final Map<String, String> border = Optional.ofNullable(formObject.getBorder())
.map(map -> (Map<String, String>) map)
Method writeOutCaption
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeOutCaption(
final IWidget widget,
final Rectangle pageSize,
final int currentPage,
final GlobalPdfWriter globalPdfWriter) {
Method writeOutCaption
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeOutCaption(
final IWidget widget,
final Rectangle pageSize,
final int currentPage,
final GlobalPdfWriter globalPdfWriter) {
Method writeOutCaption
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeOutCaption(
final IWidget widget,
final Rectangle pageSize,
final int currentPage,
final GlobalPdfWriter globalPdfWriter) {
Method writeOutCaption
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeOutCaption(
final IWidget widget,
final Rectangle pageSize,
final int currentPage,
final GlobalPdfWriter globalPdfWriter) {
Method drawMulitipleSelectionBox
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void drawMulitipleSelectionBox(
final Graphics2D g2,
final Set<IWidget> selectedWidgets,
final boolean drawNodes) {
Method initComponents
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void initComponents() {
final JPanel panel = createBordersPanel();
final JPanel backgroundPanel = createBackgroundPanel();
final GroupLayout layout = new GroupLayout(this);
Method write
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public PdfFormField write(
final IWidget widget,
final Rectangle pageSize,
final int currentPage,
Method getResizeType
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public int getResizeType(
final int mouseX,
final int mouseY,
final Set<IWidget> selectedWidgets) {
if (selectionBoxBounds == null || selectedWidgets.isEmpty()) {
- Read upRead up
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 openFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void openFile(
final String filePath,
final Component component) {
if (filePath == null) {
return;
- Read upRead up
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 dropData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean dropData(
final JComponent srcComponent,
final Transferable transferable,
final DataFlavor[] flavors) {
// Ok, now try to display the content of the drop.
Method setupDockingPanes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void setupDockingPanes() {
desk.addDockable(designerPanel);
dockableNames.put("Designer", designerPanel);
final WindowConfiguration windowConfiguration = windowConfigurationFile.getWindowConfiguration();
Method executeCommand
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void executeCommand(final int type) {
switch (type) {
case FIRSTPAGE:
designer.displayPreviewPage(1);
Method executeCommand
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void executeCommand(final int type) {
switch (type) {
case FIRSTPAGE:
designer.displayDesignerPage(1);
Method writeExternalPDFPagesToPDF
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeExternalPDFPagesToPDF(
final File fileToWriteTo,
final Map<Integer, List<IWidget>> widgetsByPageNumber,
final List<org.pdf.forms.model.des.Page> pages,
final Optional<String> javaScript,
Method setVerticalAlignment
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void setVerticalAlignment(final int alignment) {
if (alignment == SwingConstants.CENTER) {
setUI(new BasicTextFieldUI());
return;
Method writeModelToPDF
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void writeModelToPDF(
final File fileToWriteTo,
final Map<Integer, List<IWidget>> widgetsByPageNumber,
final List<org.pdf.forms.model.des.Page> pages,
final Optional<String> javaScript) {
Method addCheckBox
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addCheckBox(
final FormObject formObject,
final Page page,
final String groupName,
final int pageHeight,