Showing 18 of 32 total issues
Workspace
has 58 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class Workspace extends CssLayout implements PermissionAccessUI {
private Logic logic;
private Float splitPosition = 50f;
FilterPanel
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class FilterPanel extends VerticalLayout {
private ComboBox column;
private TextField text;
private Button add;
private Table table;
MenuNavigator
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class MenuNavigator extends MenuBar implements PermissionAccessUI {
private String identify = "";
private ModifierAccess permissionAccess = ModifierAccess.HIDE;
File Workspace.java
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.github.sah4ez.core.elements;
import com.github.sah4ez.core.data.TreeDataContainer;
import com.github.sah4ez.core.permission.ModifierAccess;
import com.github.sah4ez.core.permission.PermissionAccess;
CrossTable
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class CrossTable extends Workspace {
private DataContainer<? extends Entity> firstContainer;
private DataContainer<? extends Entity> secondContainer;
private String idFirst = "";
File FilterPanel.java
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.github.sah4ez.core.elements;
import com.github.sah4ez.core.data.DataContainer;
import com.github.sah4ez.core.data.TreeDataContainer;
import com.vaadin.data.Container;
DataContainer
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
abstract public class DataContainer<T extends Entity> extends BeanItemContainer<T> {
private final ArrayList<String> headers = new ArrayList<>();
private ArrayList<String> captions = new ArrayList<>();
private ArrayList<Boolean> visible = new ArrayList<>();
Method getContainer
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected DataContainer getContainer() {
DataContainer container = null;
TreeDataContainer treeContainer = null;
if (tableIsNotNull()) {
- 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 createData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void createData(String idFirst, String captionFirst, String idSecond, String captionSecond) {
this.idFirst = idFirst;
this.captionFirst = captionFirst;
this.idSecond = idSecond;
this.captionSecond = captionSecond;
Method loadColumns
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void loadColumns() {
if (table != null) column.addItems(table.getVisibleColumns());
if (filterTable != null) column.addItems(filterTable.getVisibleColumns());
if (filterTreeTable != null) column.addItems(filterTreeTable.getVisibleColumns());
- 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 sortable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void sortable() {
if (sortColumn.size() > 0) {
DataContainer container = getContainer();
boolean[] booleanArray = new boolean[sortAscending.size()];
- 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(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Element element = (Element) o;
- 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 getChildren
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Collection<?> getChildren(Object itemId) {
ArrayList<Object> children = new ArrayList<>();
//TODO: Find new implementation
- 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 rootItemIds
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Collection<?> rootItemIds() {
ArrayList<Object> result = new ArrayList<>();
for (Object candidateId : getItemIds()) {
Object parentRef = 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 multiCellInColumnAction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void multiCellInColumnAction(Item item, Object property){
if (contains(item, property)) {
setPrevValue(item, property);
remove(item, property);
} else if (!selectedCell.containsKey(item) && !selectedCell.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 replacePermissionAccess
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void replacePermissionAccess(Map<String, ModifierAccess> map, String name, ModifierAccess newValue) {
switch (map.get(name)) {
case EDIT: {
if (newValue.equals(ModifierAccess.HIDE) || newValue.equals(ModifierAccess.READ)) break;
map.replace(name, newValue);
- 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 cellStyleGenerator
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private CustomTable.CellStyleGenerator cellStyleGenerator() {
return (CustomTable.CellStyleGenerator) (customTable, itemId, property) -> {
if (customTable == null || itemId == null || property == null) return null;
String result = 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 replacePermissionAccess
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void replacePermissionAccess(PermissionAccessUI component, ModifierAccess newValue) {
switch (component.getModifierAccess()) {
case EDIT: {
if (newValue.equals(ModifierAccess.HIDE) || newValue.equals(ModifierAccess.READ)) break;
component.setModifierAccess(newValue);
- 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"