Showing 6,856 of 14,752 total issues
Avoid deeply nested control flow statements. Open
Open
if (key != null && foreignDbIds.containsKey(key)) {
if (before) {
mx2DB.id = foreignDbIds.get(key); // schemaTuple.addValue(attr,
// foreignDbIds.get(key));
fromToXmlDB.set(i, mx2DB);
- Create a ticketCreate a ticket
Method createChart
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public JFreeChart createChart(DataTable table, List<String> usedParameters, String xUnits,
boolean equidistantProcesses, boolean plotLines, boolean plotPoints) {
- Create a ticketCreate a ticket
Method monitoredAssign
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
void monitoredAssign(String symbol, BufferedDataTable value, ExecutionMonitor exec, int batchSize,
String type, boolean sendRowNames)
- Create a ticketCreate a ticket
Method value
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public double[] value(double[] point) throws IllegalArgumentException {
double[] retValue = new double[targetValues.length];
for (int i = 0; i < parameters.length; i++) {
- 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 (!paramCell.isMissing()) {
Double val = ((DoubleCell) paramCell).getDoubleValue();
if (param2Cumulate && !newP) {
if (timeSeries.containsKey(time))
timeSeries.put(time, val + timeSeries.get(time));
- Create a ticketCreate a ticket
Method createChart
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public JFreeChart createChart(PCMLDocument pcmlDoc, List<String> usedParameters, String xUnits,
boolean equidistantProcesses, boolean plotLines, boolean plotPoints) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (timeColumn == null || !timeColumn.equals(column))
rowData.put(column, cursor.getTextValue());
else
curTime = (cursor.getTextValue() != null && !cursor.getTextValue().equalsIgnoreCase("null"))
? Double.valueOf(cursor.getTextValue()) : 0.0;
- Create a ticketCreate a ticket
Method keyPressed
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public void keyPressed(KeyEvent event) {
JTextField textField = (JTextField) event.getComponent();
String query = textField.getText();
- 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 monitoredAssign
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void monitoredAssign(final String name, final BufferedDataTable table,
final ExecutionMonitor exec, final int batchSize, final String rType,
final boolean sendRowNames) throws RException, CanceledExecutionException {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (state.context.kind) {
state.localStates.pop();
var localState = last(state.localStates);
if (localState.mode.indent) {
state.indent -= localState.mode.indent(localState.state, "", "");
- Create a ticketCreate a ticket
Method addToken
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void addToken(final char[] array, final int start, final int end, final int tokenType,
final int startOffset, final boolean hyperlink) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (localState.mode.indent) {
state.indent += localState.mode.indent(localState.state, "", "");
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if(typeof state.sExprQuote == "number") state.sExprQuote++;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
} else if (stream.match(rx_footnote_ref)) {
change(state, to_normal);
token = 'quote';
} else if (stream.match(rx_citation_ref)) {
change(state, to_normal);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (modeCfg.highlightFormatting) state.formatting = "code-block";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
return getType(state);
} else { // Not surrounded by spaces, back up pointer
stream.backUp(2);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (stream.eol()) {
change(state, to_normal);
} else {
stream.skipToEnd();
change(state, to_comment);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (stream.eatWhile(/[A-Za-z0-9+\/=]/)) {
return null;
} else {
stream.next();
return "error";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if(apps.indexOf(cur) !== -1){
return "def strong";
}
- Create a ticketCreate a ticket