Showing 14,752 of 14,752 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
- 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 114.
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
else if(modelNode.get("version") != null) {
GenericModel gm = new GenericModel();
gm.setModelType("genericModel");
gm.setGeneralInformation(SwaggerUtil.convert(MAPPER103.treeToValue(modelNode.get("generalInformation"), metadata.GeneralInformation.class)));
gm.setScope(SwaggerUtil.convert(MAPPER103.treeToValue(modelNode.get("scope"), metadata.Scope.class)));
- 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 114.
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 (int i = 0; i < indepVars.length; i++) {
final Variable variable = new Variable();
variable.name = indepVars[i].trim();
variable.unit = indepVarUnits[i].trim();
variable.min = mins[i].trim();
- 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 114.
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
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
- 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 114.
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
if (set.getColumnMappings().get(column) instanceof MiscXml) {
MiscXml condition = (MiscXml) set.getColumnMappings().get(column);
List<String> allUnits = new ArrayList<>();
for (String cat : condition.categories) {
- 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 114.
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 convertProduct
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Product convertProduct(JsonNode node) {
Product product = new Product();
if (node.has("productName")) {
- Create a ticketCreate a ticket
Method convertReference
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Reference convertReference(JsonNode node) {
Reference reference = new Reference();
reference.setIsReferenceDescription(
node.has("isReferenceDescription") ? node.get("isReferenceDescription").asBoolean() : false);
- Create a ticketCreate a ticket
Method retrieveReference
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static Reference retrieveReference(Row row, Map<String, Integer> columns) {
// Check mandatory properties and throw exception if missing
if (row.getCell(columns.get("referenceDescription")).getCellTypeEnum() != CellType.STRING) {
throw new IllegalArgumentException("Missing Is reference description?");
- Create a ticketCreate a ticket
Method loadSettings
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void loadSettings(NodeSettingsRO settings) {
try {
literature = XmlConverter.xmlToObject(
settings.getString(CFGKEY_LITERATURE),
new ArrayList<LiteratureItem>());
- Create a ticketCreate a ticket
Method setMetaDataFromAnnotation
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
void setMetaDataFromAnnotation(final Annotation annotation) {
Metadata metadata = new MetadataAnnotation(annotation).getMetadata();
if (metadata.isSetGivenName())
template.setCreator(metadata.getGivenName());
- Create a ticketCreate a ticket
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
final ExecutionContext exec) throws Exception {
BufferedDataTable table = inData[0];
DataTableSpec inSpec = table.getSpec();
- Create a ticketCreate a ticket
Method setPM
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void setPM(ParametricModel pm) {
if (pm != null) {
if (pm.getLevel() == 2) {
if (!radioButton2.isSelected()) {
radioButton2.setSelected(true);
- Create a ticketCreate a ticket
Method createUnitFromDB
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static PMFUnitDefinition createUnitFromDB(String unit) throws XMLStreamException {
if (!DBUnits.getDBUnits().containsKey(unit)) {
return null;
}
- Create a ticketCreate a ticket
Method keyPressed
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void keyPressed(final KeyEvent keyEvent) {
//System.out.println(keyEvent.getKeyCode() + "\t" + keyEvent.getKeyChar() + "\t" + KeyEvent.VK_F + "\t" + keyEvent.isControlDown());
if (keyEvent.isControlDown() && keyEvent.getKeyCode() == KeyEvent.VK_LEFT) { //Ctrl+<-, Aussredem geht auch F8
keyEvent.consume();
- Create a ticketCreate a ticket
Method loadSettingsFrom
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException {
set = new SettingsHelper();
set.loadSettings(settings);
- Create a ticketCreate a ticket
Method createTable
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void createTable() {
String fieldDefs = DBKernel.delimitL("ID") + " INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY";
if (tableName.equals("ChangeLog")) {
fieldDefs = DBKernel.delimitL("ID") + " INTEGER GENERATED BY DEFAULT AS SEQUENCE " + DBKernel.delimitL("ChangeLogSEQ") + " PRIMARY KEY";
}
- Create a ticketCreate a ticket
Method doImportErlenbacherFW
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private int[] doImportErlenbacherFW(HSSFWorkbook wb, JProgressBar progress, String efsaID) {
int numSuccess = 0;
int numFails = 0;
HSSFSheet businessSheet = wb.getSheet("Business_List");
HSSFSheet transactionSheet = wb.getSheet("Receivers");
- Create a ticketCreate a ticket
Method getSecModelById
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public KnimeTuple getSecModelById(int id) throws SQLException {
KnimeTuple tuple = null;
PreparedStatement stat = conn.prepareStatement(queryModelView + " WHERE \"" + ATT_LEVEL + "\"=2 AND \"Modellkatalog\".\"ID\"=?");
try {
stat.setInt(1, id);
- Create a ticketCreate a ticket
Method retrieveParameter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
static metadata.Parameter retrieveParameter(String[][] values, int row) {
// Check mandatory properties
if (values[row][RakipColumn.L.ordinal()].isEmpty()) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
static metadata.Parameter retrieveParameter(String[][] values, int row) {
// Check mandatory properties
if (values[row][RakipColumn.L.ordinal()].isEmpty()) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket