Showing 6,856 of 14,752 total issues
Method toDoc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private PmmXmlDoc toDoc() throws InvalidSettingsException {
PmmXmlDoc doc = new PmmXmlDoc();
ParametricModel pm = finalizePM(-1);
- 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 (row == 0) {
pm.setDepCategory(categoryStr);
pm.setDepUnit(unit);
} else if (isIndep != null && isIndep instanceof Boolean && ((Boolean) isIndep)) {
pm.setIndepCategory(param, categoryStr);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (diff.getChanges().size() == 0) {
doc.remove(pxecL);
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (el instanceof CatalogModelXml) {
cmx = (CatalogModelXml) el;
break;
}
- Create a ticketCreate a ticket
Method readDataTable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void readDataTable() {
dependentParameters = new LinkedHashMap<>();
primaryModelNames = new LinkedHashMap<>();
independentParameterCategories = new LinkedHashMap<>();
- 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 (primaryModelNames.get(id).equals(modelName)) {
modelID = id;
break;
}
- Create a ticketCreate a ticket
Method condSplit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private List<String> condSplit(final String misc) {
if (misc == null) {
return null;
}
List<String> result = 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"
Further reading
Avoid deeply nested control flow statements. Open
if (tslist.containsKey(condID)) tss.put(condID, tslist.get(condID));
else tss.put(condID, ts);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!CellIO.getNameList(params).contains(
newDepVarSecName)) {
continue;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (PmmXmlElementConvertable el : miscs
.getElementSet()) {
MiscXml element = (MiscXml) el;
if (paramsConvertTo.containsKey(element.name)) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!Double.isNaN(guess.y)) {
maxGuessValues.add(guess.y);
} else {
maxGuessValues.add(null);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. 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
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
for (String param : miscParams) {
miscs.get(param).remove(i);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. 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
if (el instanceof CatalogModelXml) {
cmx = (CatalogModelXml) el;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. 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
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
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
private static TwoStepTertiaryModel parse(List<List<KnimeTuple>> tupleList, boolean isPMFX, int modelNum,
String mdName, Metadata metadata, String notes) {
- Create a ticketCreate a ticket