Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
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
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
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
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
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
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
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
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
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
Avoid deeply nested control flow statements. Open
Open
if (progress != null) {
lfd++;
progress.setValue(lfd);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (codesI = 0; codesI < codeSql1.size(); codesI++) {
psCodes[codesI].clearParameters();
doCode[codesI] = false;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (row.getRowNum() > 0) {
lfdCol = 0;
codesI = 0;
Object[] kzVal = new Object[numCols];
for (int j = 0; j < numCols; j++) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (newDBTable.getRowCount() == 0) {
o = null;
}
else {
break;
- Create a ticketCreate a ticket
Method readDB
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void readDB(final LinkedHashMap<String, DefaultMutableTreeNode> myCodes, final int codeSystemNum, final DefaultMutableTreeNode root, final String sql, final String tablename_codeSystem, int[] cutSystem) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (i2 != null) {
o = new Object[1][2];
o[0][0] = "ID";
o[0][1] = dbTable.getValueAt(row, i2 + 1);
newDBTable.setTable(theNewTable, o);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (tok.hasMoreTokens()) {
tok.nextToken();// Zutat
if (tok.hasMoreTokens()) {
o = new Object[1][2];
o[0][0] = tok.nextToken(); // Empfänger
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (s2.indexOf("_") >= 0 && s2.indexOf(".") < 0) {
if (!ser.isEmpty()) ser += "\n";
ser += s2;
} else {
if (!cqr.isEmpty()) cqr += "\n";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (myTLeft != null && !myTLeft.getTablename().equals("DoubleKennzahlen") && (theNewTable.getMNTable() == null || theNewTable.getMNTable()[i] == null)) {
for (int j = 0; j < myT.getForeignFields().length; j++) {
MyTable myTOrigin = myT.getForeignFields()[j];
if (myTOrigin != null && myTLeft.equals(myTOrigin) && (myT.getMNTable() == null || myT.getMNTable()[j] == null)) {
Object[][] o1 = new Object[1][2];
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (zero_ncs.equals("1/mL") && KE_ncs.equals("log10(1)")) {
calcZeroV = Math.log10(zeroVal);
calcUnit = "log10(count/ml)";
}
else if (zero_ncs.equals("1/mL") && KE_ncs.equals("log10(1/mL)")) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (bibitem.getField("fulltext") != null || bibitem.getField("pdf") != null) {
String strURL = (bibitem.getField("pdf") != null) ? bibitem.getField("pdf") : bibitem.getField("fulltext");
URL myUrl = getMyURL(strURL);
if (strURL != null) {
MyLogger.handleMessage(myUrl.getProtocol() + "\t" + myUrl.getHost() + ":" + myUrl.getPath());
- Create a ticketCreate a ticket