Showing 6,856 of 14,752 total issues
Method refreshHashbox
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
void refreshHashbox() {
MyTable[] foreignFields = actualTable.getForeignFields();
String[] mnTable = actualTable.getMNTable();
if (foreignFields != null) {
DBKernel.refreshHashTables();
- Read upRead up
- Create a ticketCreate a ticket
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 sorterChanged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void sorterChanged(final RowSorterEvent e) {
if (e == null || e.getType() == RowSorterEvent.Type.SORT_ORDER_CHANGED) {
if (this.getTable().getCellEditor() != null) {
this.getTable().getCellEditor().stopCellEditing();
- Read upRead up
- Create a ticketCreate a ticket
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
for (MyTable myFT : ffTs) {
if (myFT != null && myFT.getTablename().equals(tablename)) {
tname = myT.getForeignFields()[i].getFieldNames()[ii];
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (sorter != null) {
sorter.setComparator(i+2, new MyOtherSorter());
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (foreignHashs[i] != null) {
c = this.getColumn(i+1);
c.setUserCellEditor(new MyComboBoxEditor(foreignHashs[i], false)); c.setUserCellRenderer(new MyComboBoxEditor(foreignHashs[i], true));
}
- Create a ticketCreate a ticket
Method gotoFind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void gotoFind(int increment) {
if (isFormVisible()) {
return;
}
- Read upRead up
- Create a ticketCreate a ticket
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 go4Table
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void go4Table(final String tn, final Vector<String> result, final int id1, final int id2, final MyTable myT, final boolean showOnlyDataFromCurrentUser) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (selectedFile != null) {
doTheImport(mi, selectedFile, false);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) DBKernel.myDBi.establishDBConnection(newSA, newPass);
else DBKernel.mainFrame.getMyList().getMyDBTable().initConn(newSA, newPass);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (comboBox11.getItemAt(i).equals(comboVal)) {
comboBox11.setSelectedIndex(i);
break;
}
- Create a ticketCreate a ticket
Method initCs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void initCs() {
componentMap = new HashMap<>();
componentMap.put("ID", textField1);
componentMap.put("Referenz", textField2);
componentMap.put("Agens", textField3);
- Read upRead up
- Create a ticketCreate a ticket
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 (rs.getObject(1) != null) {
Integer oldfID = rs.getInt(1);
ResultSet rs2 = DBKernel.getResultSet("SELECT * FROM " + DBKernel.delimitL("DoubleKennzahlen") +
" WHERE " + DBKernel.delimitL("ID") + "=" + oldfID, false);
if (rs2 != null && rs2.first()) {
- Create a ticketCreate a ticket
Method setValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setValue(Object value) {
if (value != null && !value.equals("")) {
if (cellType == WWW) {
this.setText("WWW-Code");
}
- Read upRead up
- Create a ticketCreate a ticket
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 getChildAt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
TreeNode getChildAt(int index, boolean filterIsActive) {
if (!filterIsActive) {
return super.getChildAt(index);
}
if (children == null) {
- Read upRead up
- Create a ticketCreate a ticket
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 (vals4 != null) showAndFilterVals("Lieferungen", vals4, 0, v1 + v2 + v3, total);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (vals.length() > 0) {
vals = vals.substring(1);
result.add(tn + " hat " + rs.getString(1) + " Datensätze mit denselben Werten: (" + vals + ")"); // Duplikate
}
- Create a ticketCreate a ticket
Method tableChanged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void tableChanged(TableModelEvent e)
{
System.out.println("tableChanged");
// A cell has been updated
- Read upRead up
- Create a ticketCreate a ticket
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 readValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void readValue(final ResultSet rs, final JLabel jl, final JTextField tf, final JTextField tf_exp, final JCheckBox cb, final boolean isString) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (rs2 != null && rs2.first()) {
do {
matchingIDs += "," + rs2.getInt("Basis");
} while (rs2.next());
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (rs != null && rs.first()) {
do {
Integer id = rs.getInt(1);
String tn2 = tn;
if (tn2.equals("Literatur") && id <= 231 || tn2.equals("Methoden") && id <= 1481 ||
- Create a ticketCreate a ticket