Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
if(currentUnit.equalsIgnoreCase(previousConcUnit)) {
value = previousConcValues.get(previousConcUnit);
}else {
Category cat = Categories.getCategoryByUnit(currentUnit);
Double convertedValue = null;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!fixedValue.equals(values.get(i))) {
usedPoints.set(i, false);
}
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table,
Object color, boolean isSelected, boolean hasFocus, int row,
int column) {
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table,
Object color, boolean isSelected, boolean hasFocus, int row,
int column) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (points != null) {
for (int i = 0; i < points[0].length; i++) {
if (isValid(points[0][i])) {
usedMinX = Math.min(usedMinX,
points[0][i]);
- Create a ticketCreate a ticket
Method getPoints
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public double[][] getPoints(String paramX, String paramY, String unitX,
String unitY, String transformX, String transformY)
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
- Create a ticketCreate a ticket
Method addIndepVar
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addIndepVar(final String varName, final Double min, final Double max, String category, String unit,
String description) {
- Create a ticketCreate a ticket
Method addParam
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addParam(final String paramName, final Boolean isStartParam, final Double value, final Double error,
final Double min, final Double max) {
- Create a ticketCreate a ticket
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table,
Object color, boolean isSelected, boolean hasFocus, int row,
int column) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!hasSameValue(param, value, misc)) {
warnings.add("Variable conditions cannot be imported: " + "Only first value for "
+ column + " is used");
}
- Create a ticketCreate a ticket
Method addMisc
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addMisc(int attrID, String attribute, String description, Double value, List<String> categories, String unit) throws PmmException {
- Create a ticketCreate a ticket
Method toXmlElement
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Element toXmlElement() {
Element ret = new Element(ELEMENT_TIMESERIES);
try {
if (getCondId() != 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 getAllButBoundaryCondition
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static String getAllButBoundaryCondition(String formula) {
String cond = getBoundaryCondition(formula);
if (cond != null) {
String f = formula.replace("*(((((" + cond + ")))))", "");
- 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 getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
- Create a ticketCreate a ticket
Method setSettings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setSettings(Config c) throws InvalidSettingsException {
setLevel(c.getInt(ModelReaderUi.PARAM_LEVEL, 1));
setModelClass(c.getString(ModelReaderUi.PARAM_MODELCLASS));
setModelFilterEnabled(c.getBoolean( ModelReaderUi.PARAM_MODELFILTERENABLED ));
if (c.containsKey(PARAM_MODELLISTINT)) enableModelList(c.getIntArray(ModelReaderUi.PARAM_MODELLISTINT));
- 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 (mx.name.equalsIgnoreCase(mx2Add.name)) {
paramFound = true;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!var.equals(AttributeUtilities.TIME)) {
variableValues.get(var).add(miscValues.get(var));
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (modelNameEnabled(cmx.name)) return true;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (miscs.get(var).get(i) == null) {
isNull = true;
break;
}
- Create a ticketCreate a ticket