Showing 14,752 of 14,752 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
function tokenLiteral(quote) {
return function(stream, state) {
var escaped = false, ch;
while ((ch = stream.next()) != null) {
if (ch == quote && !escaped) {
- 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 100.
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 RunnerNodeModel.java
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
***************************************************************************************************
* Copyright (c) 2017 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
- Create a ticketCreate a ticket
File app.utils.js
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** Temporary workaround for some metadata glitches. */
var metadataFix = (metadata) => {
// Ignore temporarily publication type
// TODO: publicationType takes the abbreviation instead of the full string
// used in the Reference dialog. Since KNIME runs getComponentValue twice,
- Create a ticketCreate a ticket
Method handleConditions
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String handleConditions(final Integer condId, final PmmXmlDoc misc, PmmTimeSeries ts) {
String result = "";
PreparedStatement ps;
try {
ps = conn.prepareStatement("DELETE FROM \"Versuchsbedingungen_Sonstiges\" WHERE \"Versuchsbedingungen\" = " + condId);
- Create a ticketCreate a ticket
Function normal
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normal(source, setState) {
if (source.eatWhile(whiteCharRE)) {
return null;
}
- Create a ticketCreate a ticket
Function drawSelectionRange
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawSelectionRange(cm, range$$1, output) {
var display = cm.display, doc = cm.doc;
var fragment = document.createDocumentFragment();
var padding = paddingH(cm.display), leftSide = padding.left;
var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
- Create a ticketCreate a ticket
Function create
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
create(id, title, formData, port) {
let O = this;
// modal body
let form = $( '<form class="form-striped" no-immidiate-submit></form>' )
formData.forEach(prop => {
- Create a ticketCreate a ticket
Function drawSelectionRange
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawSelectionRange(cm, range, output) {
var display = cm.display, doc = cm.doc
var fragment = document.createDocumentFragment()
var padding = paddingH(cm.display), leftSide = padding.left
var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right
- Create a ticketCreate a ticket
Function drawSelectionRange
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawSelectionRange(cm, range, output) {
var display = cm.display, doc = cm.doc
var fragment = document.createDocumentFragment()
var padding = paddingH(cm.display), leftSide = padding.left
var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right
- Create a ticketCreate a ticket
Function generate_uniqueItems
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
- Create a ticketCreate a ticket
Identical blocks of code found in 3 locations. Consider refactoring. Open
private ExposureModelScope retrieveScope(Sheet sheet) {
ExposureModelScope scope = new ExposureModelScope();
for (int numrow = this.SCOPE_PRODHAZPOP_ROW; numrow <= (this.SCOPE_PRODHAZPOP_ROW + 11); numrow++) {
- 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 204.
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 3 locations. Consider refactoring. Open
private ExposureModelScope retrieveScope(Sheet sheet) {
ExposureModelScope scope = new ExposureModelScope();
for (int numrow = this.SCOPE_PRODHAZPOP_ROW; numrow <= (this.SCOPE_PRODHAZPOP_ROW + 11); numrow++) {
- 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 204.
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 3 locations. Consider refactoring. Open
private ExposureModelScope retrieveScope(Sheet sheet) {
ExposureModelScope scope = new ExposureModelScope();
for (int numrow = this.SCOPE_PRODHAZPOP_ROW; numrow <= (this.SCOPE_PRODHAZPOP_ROW + 11); numrow++) {
- 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 204.
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 ConversionUtils.java
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
package metadata;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
- Create a ticketCreate a ticket
File ProductImpl.java
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
*/
package metadata.impl;
import java.util.Date;
- Create a ticketCreate a ticket
Method performExecute
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected PortObject[] performExecute(PortObject[] inObjects,
ExecutionContext exec) throws Exception {
BufferedDataTable table = (BufferedDataTable)inObjects[0];
- Create a ticketCreate a ticket
Method openNewWindow
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Object openNewWindow(final MyTable theNewTable, final Object value, final Object headerValue, final String mnTable, final String mnID, final MyDBForm dbForm, final JDialog owner) {
Object result = null;
String titel = (headerValue == null) ? theNewTable.getTablename() : (DBKernel.getLanguage().equals("en") ? "Choose " + GuiMessages.getString((String) headerValue) + "..." : headerValue + " auswählen...");
//JDialog f = new JDialog(DBKernel.mainFrame, titel, dbForm != null);
JDialog f = new JDialog(owner == null ? DBKernel.mainFrame : owner, titel);
- Create a ticketCreate a ticket
Method fillHashtable
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static 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 (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) return DBKernel.myDBi.fillHashtable(theTable, startDelim, delimiter, endDelim, goDeeper, forceUpdate,
alreadyUsed);
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) {
- Create a ticketCreate a ticket
Method updateParamValues
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void updateParamValues(List<KnimeTuple> tuples,
Map<KnimeTuple, List<KnimeTuple>> tupleCombinations) {
Map<Integer, Map<String, Double>> paramSums = new LinkedHashMap<>();
Map<Integer, Map<String, Integer>> paramCounts = new LinkedHashMap<>();
Map<Integer, Map<String, Double>> paramValues = new LinkedHashMap<>();
- Create a ticketCreate a ticket
Function tokenBase
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(stream, state) {
if (stream.eatSpace()) {
return null;
}
- Create a ticketCreate a ticket