Showing 6,856 of 14,752 total issues
Method setListVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public MyDBTable setListVisible(boolean visible, MyTable myT2, Object[][] t1Conditions, Object[][] t2Conditions, Integer row) {
gmRow = row;
this.t1Conditions = t1Conditions;
this.t2Conditions = t2Conditions;
splitPane2.getRightComponent().setVisible(visible);
- 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 getAllFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private int[] getAllFilter(TableModel tm, Vector<Integer> vv) {
if (vv == null) {
int numRows = tm.getRowCount();
int arr[] = new int[numRows];
for (int row = 0; row < numRows; row++) {
- 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 handleBool
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean handleBool(PreparedStatement ps, int index, Object val) throws SQLException {
boolean nullVal = true;
if (val instanceof JCheckBox) {
ps.setBoolean(index, ((JCheckBox) val).isSelected());
nullVal = false;
- 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 getKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private String getKey(JComponent comp) {
String key = null;
final Enumeration<String> strEnum = Collections.enumeration(componentMap.keySet());
while(strEnum.hasMoreElements()) {
key = strEnum.nextElement();
- 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 getImageFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private javax.swing.filechooser.FileFilter getImageFilter() {
//System.out.println("FileFilter");
return new javax.swing.filechooser.FileFilter () {
public boolean accept(File f) {
boolean result = f.isDirectory();
- 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 getChildCount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
int getChildCount(boolean filterIsActive) {
if (!filterIsActive) {
return super.getChildCount();
}
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
Method insertNewRow
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean insertNewRow() {
if (DBKernel.isReadOnly()) return false;
boolean allNull = true;
try {
// Geprüft erstmal nicht berücksichtigen, das gibt nur Ärger: dauernd Update der DB,
- 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 foreignFieldExists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private int foreignFieldExists(String fieldName, MyTable myT) {
MyTable[] foreignTs = myT.getForeignFields();
for (int i = 0; i < foreignTs.length; i++) {
if (foreignTs[i] != null) {
if (getDBFieldName(fieldName, foreignTs[i], false) != null) return 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 doImportErlenbacherFW
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private int[] doImportErlenbacherFW(HSSFWorkbook wb, JProgressBar progress, String efsaID) {
int numSuccess = 0;
int numFails = 0;
HSSFSheet businessSheet = wb.getSheet("Business_List");
HSSFSheet transactionSheet = wb.getSheet("Receivers");
- 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 findEnde
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void findEnde(Vector<Integer[]> org_dst, int aktuell, int step, int[] vals, boolean anfang) {
Integer[] int2;
boolean found = false;
for (int i=0;i<org_dst.size();i++) {
int2 = org_dst.get(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 isAdmin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static boolean isAdmin(Connection conn, String un) { // nur der Admin kann überhaupt die Users Tabelle abfragen, daher ist ein Wert <> -1 ein Zeichen für Adminrechte, das kann auch defad sein
if (conn == null) {
if (un.equals(getTempSA(HSHDB_PATH))) {
return true;
}
- 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 getResultSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static ResultSet getResultSet(final String sql, final boolean suppressWarnings) {
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.getResultSet(sql, suppressWarnings);
ResultSet ergebnis = null;
try {
getDBConnection();
- 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 getID
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static Integer getID(final String tablename, final String feldname, final String feldVal) {
Integer result = null;
String sql = "SELECT " + delimitL("ID") + " FROM " + delimitL(tablename) + " WHERE " + delimitL(feldname);
if (feldVal == null) sql += " IS NULL";
else sql += " = '" + feldVal.replace("'", "''") + "'";
- 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 getLastInsertedID
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static Integer getLastInsertedID(final PreparedStatement psmt) {
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.getLastInsertedID(psmt);
Integer lastInsertedID = null;
try {
ResultSet rs = psmt.getGeneratedKeys();
- 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 getLocalConn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static Connection getLocalConn(boolean autoUpdate) {
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.getConn();
try {
if ((localConn == null || localConn.isClosed()) && isKNIME) {
localConn = getInternalKNIMEDB_LoadGui(autoUpdate);
- 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 getResultSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static ResultSet getResultSet(final Connection conn, final String sql, final boolean suppressWarnings) {
if (conn == null) {
return getResultSet(sql, suppressWarnings);
} else {
try {
- 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 saveWindowState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void saveWindowState() {
try {
if (DBKernel.mainFrame != null && DBKernel.mainFrame.getMyList() != null && DBKernel.mainFrame.getMyList().getMyDBTable() != null
&& DBKernel.mainFrame.getMyList().getMyDBTable().getActualTable() != null) {
DBKernel.prefs.put("LAST_SELECTED_TABLE", DBKernel.mainFrame.getMyList().getMyDBTable().getActualTable().getTablename());
- 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 prepareCaching
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private String prepareCaching(ResultSet rs, String cacheTableneme) throws SQLException {
String sql = "CREATE TABLE " + DBKernel.delimitL(cacheTableneme) + " (";
ResultSetMetaData mtd = rs.getMetaData();
for (int i = 1; i <= mtd.getColumnCount(); i++) {
String cn = mtd.getColumnLabel(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 getResultSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
ResultSet getResultSet(final String sql, final boolean suppressWarnings) {
ResultSet ergebnis = null;
if (conn != null) {
try {
Statement anfrage = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
- 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 addData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void addData() {
if (allData != null) {
for (String s : allData.keySet()) {
String delimiter = allData.get(s);
if (delimiter == null) new SQLScriptImporter().doImport(s, null, false);
- 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"