Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
if (initParams.containsKey(oldID)) {
newInitParams.put(newID, initParams.get(oldID));
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (miscParams.get(i).equals(element.name)) {
min = element.min;
max = element.max;
unit = element.unit;
break;
- 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
Avoid deeply nested control flow statements. Open
if (hasM2) {
ParametricModel pm2 = new ParametricModel(row, 2, null);
m2EstID = pm2.estModelId;
if (!m2s.containsKey(m2EstID)) {
m2s.put(m2EstID, pm2);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (m1s.containsKey(id)) {
for (String property : hm.keySet()) {
Object[] o = hm.get(property);
if (o != null) setValue(m1s.get(id), property, o[0], o[1]);
}
- 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 rowIndex, int columnIndex) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (unit != null) {
units.put(miscParams.get(i), unit);
categories.put(
miscParams.get(i),
Arrays.asList(Categories.getCategoryByUnit(
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!m1s.containsKey(m1EstID)) {
m1s.put(m1EstID, pm1);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (int i=1;i<this.getRowCount();i++) {
if (i != rowIndex && this.getValueAt(i, 2) != null && (Boolean) this.getValueAt(i, 2)) {
this.setValueAt(false, i, 2);
}
}
- 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
Avoid deeply nested control flow statements. Open
for (PmmXmlElementConvertable el : catModel.getElementSet()) {
if (el instanceof CatalogModelXml) {
cmx = (CatalogModelXml) el;
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!oneStepFitTs.containsKey(m1EstID)) oneStepFitTs.put(m1EstID, new HashSet<Integer>());
- Create a ticketCreate a ticket
Method doLit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void doLit(LiteratureItem oldLi, Boolean isEM) {
MyTable lit = DBKernel.myDBi.getTable("Literatur");
Integer litID = (oldLi != null && (dbuuid != null && dbuuid.equals(oldLi.dbuuid))) ? oldLi.id : null;
Integer newVal = (Integer) DBKernel.mainFrame.openNewWindow(lit, litID, (Object) "Literatur", null, 1, 1, null, true, null, this);
if (newVal != null && newVal instanceof Integer) {
- 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
Avoid deeply nested control flow statements. Open
if (alreadyInsertedGModel.containsKey(gmSchemaID)) {
newGlobalModelId = alreadyInsertedGModel.get(gmSchemaID);
} else {
foreignDbIds = checkID(conn, true, dbuuid, row, gmSchemaID, null, foreignDbIds, row.getString(Model2Schema.ATT_DBUUID));
newGlobalModelId = db.insertGm(row.getInt(Model2Schema.ATT_GLOBAL_MODEL_ID));
- Create a ticketCreate a ticket
Method checkSec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void checkSec(HashMap<ParametricModel, HashMap<String, ParametricModel>> m_secondaryModels, ParametricModel pm) {
boolean idFound = false;
for (HashMap<String, ParametricModel> sm : m_secondaryModels.values()) {
for (String dep : sm.keySet()) {
ParametricModel pms = sm.get(dep);
- 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 (mOut.estModelId == mIn.estModelId) {
Diff diff = javers.compare(mIn, mOut);
if (diff.getChanges().size() > 0) {
System.out.println(mOut.estModelId + "\n" + diff);
for (ValueChange c : diff.getChangesByType(ValueChange.class)) {
- Create a ticketCreate a ticket
Method getColumnClass
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Class<?> getColumnClass(int columnIndex) {
if (columnIndex == 0) return Object.class;
else if (columnIndex == 1) return Object.class;
else if (columnIndex == 2) return Boolean.class;
else if (columnIndex == 3) return Double.class;
- 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 (o != null) setValue(pm, property, o[0], o[1]);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!globalModels.containsKey(newGlobalModelId)) globalModels.put(newGlobalModelId, new HashSet<Integer>());
- Create a ticketCreate a ticket