Showing 14,752 of 14,752 total issues
ProcessModelScope
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class ProcessModelScope {
@SerializedName("product")
private List<Product> product = new ArrayList<Product>();
- Create a ticketCreate a ticket
HealthModelScope
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class HealthModelScope {
@SerializedName("hazard")
private List<Hazard> hazard = new ArrayList<Hazard>();
- Create a ticketCreate a ticket
ConsumptionModelScope
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class ConsumptionModelScope {
@SerializedName("product")
private List<Product> product = new ArrayList<Product>();
- Create a ticketCreate a ticket
JsM12Schema
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@JsonAutoDetect
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public class JsM12Schema implements ViewValue {
static final String ATT_MODEL2 = "Model2";
- Create a ticketCreate a ticket
MyDBTablesNew
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class MyDBTablesNew extends MyDBI {
private static int SystemTabellen_LIST = 0;
private static int BasisTabellen_LIST = 1;
private static int Tenazitaet_LIST = 2;
- Create a ticketCreate a ticket
MathUtilities
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class MathUtilities {
public static double EPSILON = 0.00001;
private static Random random = null;
- Create a ticketCreate a ticket
UIUtils
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class UIUtils {
private UIUtils() {
}
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||
span.from == null && lineNo$$1 != from.line ||
span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&
(!filter || filter(span.marker)))
{ found.push(span.marker.parent || span.marker); }
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
span.from == null && lineNo != from.line ||
span.from != null && lineNo == to.line && span.from >= to.ch) &&
(!filter || filter(span.marker)))
{ found.push(span.marker.parent || span.marker) }
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
span.from == null && lineNo != from.line ||
span.from != null && lineNo == to.line && span.from >= to.ch) &&
(!filter || filter(span.marker)))
{ found.push(span.marker.parent || span.marker) }
- Create a ticketCreate a ticket
Identical blocks of code found in 2 locations. Consider refactoring. Open
for (PmmXmlElementConvertable el : params.getElementSet()) {
ParamXml element = (ParamXml) el;
if (primaryGuesses.containsKey(element.name)) {
Point2D.Double guess = primaryGuesses.get(element
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 150.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
for (PmmXmlElementConvertable el : secParams.getElementSet()) {
ParamXml element = (ParamXml) el;
if (secGuesses.containsKey(element.name)) {
Point2D.Double guess = secGuesses
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 150.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(X).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(X).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(M).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(W).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(M).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(W).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(W).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket
Method retrieveHazard
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Hazard retrieveHazard(Row row) {
// Check mandatory properties
if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Hazard name is missing");
}
- Create a ticketCreate a ticket