Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
Open
for (PmmXmlElementConvertable el : estModel.getElementSet()) {
if (el instanceof EstModelXml) {
emx = (EstModelXml) el;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (param.equals(element.name)) {
paramValue = element.value;
miscUnitMaps.get(id).put(param, element.unit);
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (String param : miscParams) {
miscs.get(param).remove(i);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (int i = 0; i < set.getSelectedValuesX().get(param)
.size(); i++) {
if (set.getSelectedValuesX().get(param).get(i)) {
usedValues.add(valuesList.get(i));
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (el instanceof CatalogModelXml) {
cmx = (CatalogModelXml) el;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (!replace.containsKey(iv.name)) {
error = true;
break;
}
- Create a ticketCreate a ticket
Method sortGlobalModels
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static Map<Integer, Map<Integer, List<KnimeTuple>>> sortGlobalModels(List<KnimeTuple> tuples) {
// Sort tertiary models
Map<Integer, Map<Integer, List<KnimeTuple>>> gms = new HashMap<>();
for (KnimeTuple tuple : tuples) {
Integer gmID = tuple.getInt(Model2Schema.ATT_GLOBAL_MODEL_ID);
- 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
if (miscValues.containsKey(indepVars.get(i))) {
parameters.put(indepVars.get(i),
miscValues.get(indepVars.get(i)));
}
- Create a ticketCreate a ticket
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static TwoStepTertiaryModel parse(List<List<KnimeTuple>> tupleList, boolean isPMFX, int modelNum,
String mdName, Metadata metadata, String notes) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (mx.name.equalsIgnoreCase(par)) {
if (mx.value == null) {
paramFound = true;
break;
}
- Create a ticketCreate a ticket
Method fillWithDefaults
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void fillWithDefaults(Integer defAgent, Integer defMatrix, Double defTemp, Double defPh, Double defAw, LinkedHashMap<String, DoubleTextField[]> params) throws InvalidSettingsException {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (categories.containsKey(element.name)
&& categories.get(element.name) == null) {
categories.put(element.name, Categories
.getCategoryByUnit(element.unit)
.getName());
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (index2 = index - 1; index2 >= 0 && val.charAt(index2) != '('; index2--) {
;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (!addWarningMsg.isEmpty()) this.setWarningMessage(this.getWarningMessage() + addWarningMsg);
- Create a ticketCreate a ticket
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static ManualSecondaryModel parse(KnimeTuple tuple, boolean isPMFX, String mdName, int mdNum,
Metadata metadata, String notes) {
- Create a ticketCreate a ticket
Method execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
protected PortObject[] execute(PortObject[] inObjects, ExecutionContext exec)
throws Exception {
BufferedDataTable table = (BufferedDataTable) inObjects[0];
TableReader reader = new TableReader(table,
- 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
if (miscParams.get(i).equals(element.name)) {
value = element.value;
unit = element.unit;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (hasM2) {
ParametricModel pm2 = new ParametricModel(row, 2, null);
m2EstID = pm2.estModelId;
if (!m2s.containsKey(m2EstID)) {
if (mlist.containsKey(m2EstID)) m2s.put(m2EstID, mlist.get(m2EstID));
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (model.getIndependent().size() > 0) {
if (tupleM1 != null) {
if (hasEditFeature && tstuples != null && tstuples.size() > 1) {
for (PmmTimeSeries tst : tstuples) {
doBuf(tupleM1, tst, rowSec, buf, ks);
- Create a ticketCreate a ticket
Method getNumDBSuccesses
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private int getNumDBSuccesses(boolean conform, int level, String dbuuid, DataRow row, DataTableSpec outSpec,
Connection conn) {
- Create a ticketCreate a ticket