Showing 14,752 of 14,752 total issues
Similar blocks of code found in 3 locations. Consider refactoring. Open
if (rs.getObject("Lieferdatum") != null) {
cal.setTimeInMillis(rs.getTimestamp("Lieferdatum").getTime());
sql = "UPDATE " + DBKernel.delimitL("Lieferungen") + " SET " + DBKernel.delimitL("dd_day") + "="
+ (cal.get(Calendar.HOUR_OF_DAY) == 12 ? "NULL" : cal.get(Calendar.DAY_OF_MONTH)) + "," + DBKernel.delimitL("dd_month") + "="
+ (cal.get(Calendar.HOUR_OF_DAY) == 12 && cal.get(Calendar.MONTH) == 0 ? "NULL" : cal.get(Calendar.MONTH) + 1) + "," + DBKernel.delimitL("dd_year")
- 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 210.
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 3 locations. Consider refactoring. Open
if (rs.getObject("Herstellungsdatum") != null) {
cal.setTimeInMillis(rs.getTimestamp("Herstellungsdatum").getTime());
sql = "UPDATE " + DBKernel.delimitL("Chargen") + " SET " + DBKernel.delimitL("pd_day") + "="
+ (cal.get(Calendar.HOUR_OF_DAY) == 12 ? "NULL" : cal.get(Calendar.DAY_OF_MONTH)) + "," + DBKernel.delimitL("pd_month") + "="
+ (cal.get(Calendar.HOUR_OF_DAY) == 12 && cal.get(Calendar.MONTH) == 0 ? "NULL" : cal.get(Calendar.MONTH) + 1) + "," + DBKernel.delimitL("pd_year")
- 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 210.
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 retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(K).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(K).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(L).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method retrieveParameter
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Parameter retrieveParameter(Row row) {
// Check first mandatory properties
if (row.getCell(K).getCellType() == Cell.CELL_TYPE_BLANK) {
throw new IllegalArgumentException("Missing parameter id");
- Create a ticketCreate a ticket
Method initComponents
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
agentLabel = new JLabel();
agentField = new StringTextField(true);
button1 = new JButton();
- Create a ticketCreate a ticket
Function tokenBase
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(stream, state) {
firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);
state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : "";
state.context.line.indent = stream.indentation();
ch = stream.peek();
- Create a ticketCreate a ticket
Function keydown
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
keydown: function(e){
if (this.picker.is(':not(:visible)')){
if (e.keyCode == 27) // allow escape to hide and re-show picker
this.show();
return;
- Create a ticketCreate a ticket
Function updateParameterSliders
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateParameterSliders()
{
var sliderWrapper = document.getElementById("sliderWrapper");
var sliderIds = []; // ids of all sliders that correspond to a constant from the used models
- Create a ticketCreate a ticket
Function 36
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],36:[function(require,module,exports){
'use strict';
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
- Create a ticketCreate a ticket
Identical blocks of code found in 2 locations. Consider refactoring. Open
private HashMap<String, HashMap<String, HashMap<Integer, Integer>>> checkIDs(Connection conn, boolean before, String dbuuid, KnimeTuple row, KnimeTuple ts,
HashMap<String, HashMap<String, HashMap<Integer, Integer>>> foreignDbIds, String[] schemaAttr, String[] dbTablename, String rowuuid, boolean checkAnywayDueToNegativeId)
throws PmmException {
if (checkAnywayDueToNegativeId || rowuuid == null || !rowuuid.equals(dbuuid)) {
if (!foreignDbIds.containsKey(rowuuid)) foreignDbIds.put(rowuuid, new HashMap<String, HashMap<Integer, Integer>>());
- 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 209.
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
private HashMap<String, HashMap<String, HashMap<Integer, Integer>>> checkIDs(Connection conn, boolean before, String dbuuid, KnimeTuple row, KnimeTuple ts,
HashMap<String, HashMap<String, HashMap<Integer, Integer>>> foreignDbIds,
String[] schemaAttr, String[] dbTablename, String rowuuid, boolean checkAnywayDueToNegativeId) throws PmmException {
if (checkAnywayDueToNegativeId || rowuuid == null || !rowuuid.equals(dbuuid)) {
if (!foreignDbIds.containsKey(rowuuid)) foreignDbIds.put(rowuuid, new HashMap<String, HashMap<Integer, Integer>>());
- 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 209.
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