Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
if (!b) {
if (feldVals[i] != null && !feldVals[i].equalsIgnoreCase("null")) {
if (sql.endsWith(")")) sql += ",";
if (isStringType != null && isStringType[i]) sql += DBKernel.delimitL(feldnames[i]) + "=CASEWHEN(" + DBKernel.delimitL(feldnames[i]) + "='"
+ feldVals[i] + "' OR INSTR(" + DBKernel.delimitL(feldnames[i]) + ",'\n" + feldVals[i] + "')>0," + DBKernel.delimitL(feldnames[i])
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (is1SurelyNewer(cBack[3], c[3])) {
//System.err.println("- Dates not in temporal order, dateOut < dateIn!!! Serial: " + serial + "; PreviousSerial: " + backS);
String msg = "Dates not in temporal order, dateOut < dateIn!!! Serial: " + serial + "; PreviousSerial: " + backS;
System.err.println(msg);
logMessages += msg + "\n";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (rs != null && rs.first()) {
do {
if (rs.getObject(1) != null) {
Integer dkzID = rs.getInt(1);
if (hash.containsKey(dkzID)) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (myDB.getActualTable() != null) {
myDB.getActualTable().restoreProperties(myDB);
}
- Create a ticketCreate a ticket
Method fillHashtable
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim,
final boolean goDeeper, final boolean forceUpdate) {
- Create a ticketCreate a ticket
Method insertDBL
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static Object insertDBL(final String tablename, final String fieldname, final Integer tableID, Object kzID, String kz, Object value) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (rs.next()) {
if (i==0) DBKernel.insertBLOB("Prozessdaten", "Workflow", xmlFile, rs.getInt(1));
index_ProzessdatenID.put(key, rs.getInt(1));
importedCarverIDs.add(value);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (indexReihenfolgeNewEnde.get(j) == indexReihenfolge.get(k)) {
if (k == indexReihenfolge.size()-1) errorMessage += "Ups, 2.Ende... hier ist was schiefgelaufen!\nBitte die Carver Datei (*.pex,*.xml) an Armin senden!\n";
System.err.println(indexReihenfolgeNewEnde.get(j));
for (int l=1;j+l < indexReihenfolgeNewEnde.size();l++) {
- Create a ticketCreate a ticket
Method getItemListMisc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static String[] getItemListMisc(Connection conn) {
HashSet<String> hs = new HashSet<>();
try {
ResultSet rs = null;
String sql = "SELECT " + DBKernel.delimitL("Parameter") + " FROM " + DBKernel.delimitL("SonstigeParameter");
- 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 (result != null && result.first()) {
newID = result.getInt(1);
result.close();
}
- Create a ticketCreate a ticket
Method insertEm2
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void insertEm2(final Integer secID, final List<Integer> primIDs, Integer gmId) {
try {
PreparedStatement ps = conn.prepareStatement("INSERT INTO \"Sekundaermodelle_Primaermodelle\" (\"GeschaetztesPrimaermodell\", \"GeschaetztesSekundaermodell\", \"GlobalModel\")VALUES(?,?,?)");
for (Integer id : primIDs) {
if (id != null && id >= 0) {
- 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 (paramID == null) {
try {
if (n != null && d != null && !n.isEmpty() && !d.isEmpty()) {
ps = conn.prepareStatement("INSERT INTO \"SonstigeParameter\" (\"Parameter\", \"Beschreibung\") VALUES (?, ?)", Statement.RETURN_GENERATED_KEYS);
ps.setString(1, n);
- Create a ticketCreate a ticket
Method createNodeModel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public NodeModel createNodeModel() {
PortType[] inputTypes = {};
PortType[] outputTypes = { BufferedDataTable.TYPE };
- 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 getValueType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static DataType getValueType(final String value) {
if (value.startsWith("c(") && value.endsWith(")")) {
return DataType.array;
} 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 insertData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void insertData(final int condId, final int timeId, final int lognId, String timeUnit, String concUnit, String concUnitObjectType) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (paramID != null) {
//System.err.println("handleConditions:\t" + after + "\t" + dbl + "\t" + unit + "\t" + paramID + "\t" + (condIDs == null ? condIDs : condIDs.get(i)));
try {
ps = conn.prepareStatement("INSERT INTO \"Versuchsbedingungen_Sonstiges\" (\"Versuchsbedingungen\", \"SonstigeParameter\", \"Wert\", \"Einheit\", \"Ja_Nein\") VALUES (?,?,?,?,?)");
ps.setInt(1, condId);
- Create a ticketCreate a ticket
Method saveToNodeSettings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void saveToNodeSettings(NodeSettingsWO settings) {
if (firstModelParameters != null && firstModelParameters.length > 0) {
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
Avoid deeply nested control flow statements. Open
if (commandNode != null
&& commandNode.hasAttr(NodeUtils.METADATA_COMMAND_VALUE)) {
command = commandNode.getAttrValue(NodeUtils.METADATA_COMMAND_VALUE);
}
- Create a ticketCreate a ticket
Method createExtSubModel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static ExternalModelDefinition createExtSubModel(SBMLDocument doc, String externalFileName,
String filePrefix, CompSBMLDocumentPlugin compDoc, CompModelPlugin compMainModel,
String subModelName) throws IOException, SBMLException, XMLStreamException {
- Create a ticketCreate a ticket
Method performExecuteCreatePortObjects
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected PortObject[] performExecuteCreatePortObjects(PortObject svgImageFromView,
PortObject[] inObjects, ExecutionContext exec) throws Exception {
CombinedFskPortObject outObj = new CombinedFskPortObject(Optional.empty(), new ArrayList<>(),
- 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"