Showing 6,856 of 14,752 total issues
Avoid deeply nested control flow statements. 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
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
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
for (index2 = index - 1; index2 >= 0 && val.charAt(index2) != '('; index2--) {
;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. 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
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
@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
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
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
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
private int getNumDBSuccesses(boolean conform, int level, String dbuuid, DataRow row, DataTableSpec outSpec,
Connection conn) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!globalIds.containsKey(id)) {
globalIds.put(id,
MathUtilities.getRandomNegativeInt());
}
- Create a ticketCreate a ticket
Method loadValidatedSettingsFrom
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
/*
* filename = settings.getString( PARAM_FILENAME ); login =
* settings.getString( PARAM_LOGIN ); passwd = settings.getString(
- 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 (agentID != id) return false;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (indep.unit != null) {
units.put(indep.name, indep.unit);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (misc.unit != null && !misc.unit.equals(unit)) {
Category cat = Categories.getCategoryByUnit(misc.unit);
try {
misc.value = cat.convert(misc.value, misc.unit, unit);
- Create a ticketCreate a ticket
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static OneStepTertiaryModel parse(List<List<KnimeTuple>> tupleList, boolean isPMFX, String mdName,
int mdNum, Metadata metadata, String notes) {
- Create a ticketCreate a ticket
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static ManualTertiaryModel parse(List<KnimeTuple> tupleList, boolean isPMFX, String mdName,
int modelNum, Metadata metadata, String notes) {
- Create a ticketCreate a ticket
Method getPrimParamsFromCategory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private List<String> getPrimParamsFromCategory(String category) {
List<String> params = new ArrayList<>();
for (String param : primaryParameterCategories.keySet()) {
String paramCat = primaryParameterCategories.get(param);
- 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 (!m1s.containsKey(m1EstID)) {
if (mlist.containsKey(m1EstID)) m1s.put(m1EstID, mlist.get(m1EstID));
else m1s.put(m1EstID, pm1);
}
- Create a ticketCreate a ticket