Showing 6,856 of 14,752 total issues
Avoid deeply nested control flow statements. Open
if (foreignFields[i] != null) {
c = this.getColumn(i+1);
c.setReadOnly(true);
String[] mnTable = actualTable.getMNTable();
if (mnTable != null && i < mnTable.length && mnTable[i] != null && mnTable[i].length() > 0) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (rs != null && rs.first()) {
do {
Integer oldfID = rs.getInt("ID");
MyTable myfT = DBKernel.myDBi.getTable(fTablename);
System.out.println(tablename + "-" + fTablename + " - oldfID: " + oldfID + "\toldID = " + oldID);
- Create a ticketCreate a ticket
Method getMyMNT
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private String getMyMNT(String key) {
if (key != null) {
String[] myFields = myT.getFieldNames();
int i=0;
for (;i<myFields.length;i++) {
- 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 (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) DBKernel.myDBi.setSA_P(newSA, newPass);
else DBKernel.removeAdminInfo(DBKernel.HSHDB_PATH);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (int j=0;j<this.getColumnCount();j++) {
if (this.getColumn(j).getColumnName().equals(filterConditions[i][0])) {
this.setValueAt(filterConditions[i][1], newSelRow, j);
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (el instanceof EstModelXml) {
EstModelXml emx = (EstModelXml) el;
labelText += emx.id + " -> " + emx.name + "<br>";
break;
}
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column) {
- Create a ticketCreate a ticket
Method valueChanged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void valueChanged(TreeSelectionEvent event) {
if (catchEvent) { // !event.getValueIsAdjusting()
DefaultMutableTreeNode selectedTreeNode = (DefaultMutableTreeNode) event.getPath().getLastPathComponent();
/*
- 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 updateConfigPanel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void updateConfigPanel() {
if (configPanel != null) {
remove(configPanel);
}
- 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 saveValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void saveValue(final PreparedStatement ps, final int index, final String tfText, 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
for (int i=2;i<=rs.getMetaData().getColumnCount();i++) {
vals += ", " + rs.getString(i);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (lookIn && myDBTable1.hashBox[col-1].get(o) != null) res += "\n" + myDBTable1.hashBox[col-1].get(o).toString();
else res += "\n" + o.toString();
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
- Create a ticketCreate a ticket
Method getMNVals
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void getMNVals(JTextArea textArea, String firstTablename, String mnTablename, String secondTablename, int id, String fields) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (resRowFirst[fieldnames.length+2+i] == null || resRowFirst[fieldnames.length+2+i].isEmpty()) resRowFirst[fieldnames.length+2+i] = rs3.getString(otherTableDesires[i]);
else resRowFirst[fieldnames.length+2+i] += "," + rs3.getString(otherTableDesires[i]);
- Create a ticketCreate a ticket
Method getMyFT
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private MyTable getMyFT(String key) {
if (key != null) {
String[] myFields = myT.getFieldNames();
int i=0;
for (;i<myFields.length;i++) {
- 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 createDTMN
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void createDTMN(String codeVec, MyTable myT, int lfd, int[] cutSystem) {
boolean doIt = (showOnly == null);
if (!doIt) {
for (int j=0;j<showOnly.length;j++) {
if (showOnly[j] != null && showOnly[j].equals(codeVec)) {
- 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 (int ii = 0; ii < vs.size(); ii++) {
ssql1 += "," + DBKernel.delimitL(fieldNames[vs.get(ii)]);
ssql2 += ",?";
ssql3 += "," + DBKernel.delimitL(fieldNames[vs.get(ii)]) + "=?";
}
- Create a ticketCreate a ticket
Method openNewWindow
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final String mnTable, final String mnID, final MyDBForm dbForm) {
- Create a ticketCreate a ticket