Showing 14,752 of 14,752 total issues
Identical blocks of code found in 3 locations. Consider refactoring. Open
public ExposureModelScope retrieveScope(Sheet sheet) {
ExposureModelScope scope = new ExposureModelScope();
- 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 192.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
private void setMatrixAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
PmmXmlDoc matrixXmlDoc = getMatrix();
if (matrixXmlDoc == null) matrixXmlDoc = new PmmXmlDoc();
MatrixXml mx = null;
for (PmmXmlElementConvertable el : matrixXmlDoc.getElementSet()) {
- 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 191.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
private void setAgentAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
PmmXmlDoc agentXmlDoc = getAgent();
if (agentXmlDoc == null) agentXmlDoc = new PmmXmlDoc();
AgentXml ax = null;
for (PmmXmlElementConvertable el : agentXmlDoc.getElementSet()) {
- 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 191.
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
File PredictorViewNodeModel.java
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*******************************************************************************
* Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- Create a ticketCreate a ticket
FoodProcessNodeModel
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
public class FoodProcessNodeModel extends NodeModel {
public static final int N_PORT_IN = 4;
public static final int N_PORT_OUT = 4;
public static String defaultBacterialUnit = "log10(count/g)";
private static boolean doModelsOut = false;
- Create a ticketCreate a ticket
StudySampleImpl
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
public class StudySampleImpl extends MinimalEObjectImpl.Container implements StudySample {
/**
* The default value of the '{@link #getSampleName() <em>Sample Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- Create a ticketCreate a ticket
ExposureModelScope
has 26 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 ExposureModelScope {
@SerializedName("product")
private List<Product> product = new ArrayList<Product>();
- Create a ticketCreate a ticket
OtherModelScope
has 26 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 OtherModelScope {
@SerializedName("product")
private List<Product> product = null;
- Create a ticketCreate a ticket
DoseResponseModelModelMath
has 26 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 DoseResponseModelModelMath {
@SerializedName("parameter")
private List<Parameter> parameter = new ArrayList<Parameter>();
- Create a ticketCreate a ticket
GenericModelScope
has 26 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 GenericModelScope {
@SerializedName("product")
private List<Product> product = null;
- Create a ticketCreate a ticket
ModelPlotterNodeModel
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
public final class ModelPlotterNodeModel
extends AbstractSVGWizardNodeModel<ModelPlotterViewRepresentation, ModelPlotterViewValue> {
enum MODEL_TYPE {
M12, M1, M2
- Create a ticketCreate a ticket
Method createPanel
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
private JComponent createPanel() {
JPanel panel = new JPanel();
JPanel rangePanel = new JPanel();
minimumFields = new LinkedHashMap<>();
- Create a ticketCreate a ticket
Method createMainComponent
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
private JComponent createMainComponent() {
if (set.isStandardVisibleColumns()) {
set.setVisibleColumns(reader.getStandardVisibleColumns());
}
- Create a ticketCreate a ticket
Method execute
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec)
throws Exception {
KnimeTuple modelTuple = new KnimeTuple(set.getModelTuple().getSchema(),
set.getModelTuple().getSchema().createSpec(), set.getModelTuple());
- Create a ticketCreate a ticket
LieferkettenImporterEFSA
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings("unused")
public class LieferkettenImporterEFSA extends FileFilter implements MyImporter {
/**
* This is the one of the methods that is declared in the abstract class
*/
- Create a ticketCreate a ticket
Method fillHashtable
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim, final boolean goDeeper,
final boolean forceUpdate, HashSet<MyTable> alreadyUsed) {
if (theTable == null) {
return null;
}
- Create a ticketCreate a ticket
RTokenMaker
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {
/**
* This character denotes the end of file
- Create a ticketCreate a ticket
RTokenMaker
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {
/**
* This character denotes the end of file
- Create a ticketCreate a ticket
RTokenMaker
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {
/**
* This character denotes the end of file
- Create a ticketCreate a ticket
APPSimulation
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class APPSimulation {
constructor ( settings, $container ) {
let O = this;
// defaults maintable simulations modal
O._$container = $container;
- Create a ticketCreate a ticket