Showing 4,841 of 7,782 total issues
Method onChildAdded
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void onChildAdded(Component child) {
super.onChildAdded(child);
if (_disabled) {
if (child instanceof Radio) {
- 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 deeply nested control flow statements. Open
if (k >= len) { //no ending /
k = -1;
break;
}
Avoid deeply nested control flow statements. Open
if (cc == '/') {
hasEndingSlash = true;
break; //ending / found
}
Method setPageSize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setPageSize(int size) throws WrongValueException {
if (size < 0) {
throw new WrongValueException("page size should >= 0");
}
- 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 doSelectionChanged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void doSelectionChanged() {
final Selectable<Object> smodel = getSelectableModel();
if (smodel.isSelectionEmpty()) {
if (_jsel >= 0)
setSelectedItem(null);
- 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 newScale
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public DialModelScale newScale(double lowerBound, double upperBound, double startAngle, double extent,
double majorTickInterval, int minorTickCount) {
Method retainAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean retainAll(Collection<?> c) {
if (_set == c || this == c) { //special case
return false;
}
//bug #1819318 Problem while using SortedSet with Databinding
- 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 setScale
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void setScale(double lowerBound, double upperBound, double startAngle, double extent,
double majorTickInterval, int minorTickCount) {
Avoid deeply nested control flow statements. Open
if (offset > 0) {
List groupsInfos = groupsListModel.getGroupsInfos();
gindex += getGroupIndex(groupsInfos, offset) + 1;
}
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static Button show(String message, String title, Button[] buttons, String icon, Button focus,
EventListener<ClickEvent> listener) {
Avoid deeply nested control flow statements. Open
if (cc == '\\')
++k; //skip one
Method setSelectedIndex
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setSelectedIndex(int jsel) {
if (jsel < 0)
jsel = -1;
if (_jsel != jsel) {
if (jsel < 0) {
- 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 getGroupsInfoAt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
/*package*/ int[] getGroupsInfoAt(int index, boolean isGroup) {
for (Iterator<int[]> it = _groupsInfo.iterator(); it.hasNext();) {
int[] g = it.next();
if (isGroup) {
if (index == g[0])
- 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 show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(String message, String title, int buttons, String icon, int focus,
EventListener<Event> listener) {
Avoid deeply nested control flow statements. Open
if (realIndex >= 0 && realIndex < getChildren().size())
removeChild(getChildren().get(realIndex));
Method setVisible
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean setVisible(boolean visible) {
if (isVisible() == visible)
return visible;
final boolean result = super.setVisible(visible);
- 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 deeply nested control flow statements. Open
if (actpg > maxPageIndex) {
p.setActivePage(maxPageIndex);
}
Method fixClone
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void fixClone() {
if (_sortAsc instanceof TreeitemComparator) {
final TreeitemComparator c = (TreeitemComparator) _sortAsc;
if (c.getTreecol() == this && c.isAscending())
_sortAsc = new TreeitemComparator(this, true, c.shallIgnoreCase());
- 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 show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(int messageCode, Object[] args, int titleCode, int buttons, String icon, int focus) {
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(int messageCode, Object arg, int titleCode, int buttons, String icon, int focus) {