Showing 172 of 2,280 total issues
Method equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (o instanceof Page) {
final Page page = (Page) o;
return Objects.equals(property, page.property)
- 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 equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (o instanceof ObjectProperties) {
final ObjectProperties that = (ObjectProperties) o;
return Objects.equals(field, that.field)
- 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 a Cognitive Complexity of 7 (exceeds 5 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)
- 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 addCheckBox
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void addCheckBox(
final FormObject formObject,
final Page page,
final String groupName,
final int pageHeight,
- 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 setParagraphProperties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void setParagraphProperties(final int currentlyEditing) {
final SplitComponent textField = (SplitComponent) getBaseComponent();
if (currentlyEditing == IWidget.COMPONENT_BOTH) {
- 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 setFontProperties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void setFontProperties(final int currentlyEditing) {
final SplitComponent textField = (SplitComponent) getBaseComponent();
if (currentlyEditing == IWidget.COMPONENT_BOTH) {
- 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
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return Commands.NONE;
Avoid too many return
statements within this method. Open
return "";
Method sendToBack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static void sendToBack(
final List<IWidget> allWidgets,
final int size,
final Set<IWidget> selectedWidgets) {
final Set<IWidget> newSet = new HashSet<>(Set.copyOf(selectedWidgets));
- 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 updateFont
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void updateFont(
final Set<IWidget> widgets,
final String fontName,
final String fontSize,
final int fontStyle) {
- 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 calculateRectangleToDraw
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Rectangle calculateRectangleToDraw(
final Rectangle rectangle,
final int componentWidth,
final int componentHeight) {
int x = rectangle.x;
- 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 sendBackwards
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void sendBackwards(
final List<IWidget> allWidgets,
final int size,
final Set<IWidget> selectedWidgets) {
final Set<IWidget> copiedSet = Set.copyOf(selectedWidgets);
- 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 getPropertyElement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static Optional<Element> getPropertyElement(
final Element parentElement,
final String propertyName) {
final NodeList properties = parentElement.getElementsByTagName(ELEMENT_PROPERTY);
for (int i = 0; i < properties.getLength(); i++) {
- 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 dragOverWidget
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void dragOverWidget(
final DropTargetDragEvent event,
final DefaultMutableTreeNode targetNode,
final DefaultMutableTreeNode sourceNode,
final Object targetUserObject) {
- 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 addBorder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void addBorder(
final IWidget widget,
final BaseField baseField) {
final Widget model = widget.getWidgetModel();
final Optional<BorderProperties> borderProperties = model.getProperties().getBorder();
- 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 sendBackwards
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static void sendBackwards(
final List<IWidget> allWidgets,
final int size,
final Set<IWidget> selectedWidgets) {
final Set<IWidget> newSet = new HashSet<>(Set.copyOf(selectedWidgets));
- 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 dragOver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void dragOver(final DropTargetDragEvent event) {
// This is where the ghost image is drawn.
// Even if the mouse is not moving, this method is still invoked 10 times per second
final Point point = event.getLocation();
- 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 sendToBack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void sendToBack(
final List<IWidget> allWidgets,
final int size,
final Set<IWidget> selectedWidgets) {
final Set<IWidget> copiedSet = Set.copyOf(selectedWidgets);
- 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 equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (o instanceof Widget) {
final Widget widget = (Widget) o;
return Objects.equals(property, widget.property)
- 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"