Showing 14,752 of 14,752 total issues
Function inVariable
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inVariable (stream, state) {
// Attempt to match a dot that precedes a property
if (state.waitDot) {
state.waitDot = false;
- Create a ticketCreate a ticket
Function token
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
token: function (stream, state) {
if (!stream) return;
//check for state changes
if (state.stack.length === 0) {
- Create a ticketCreate a ticket
Function hull
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.geom.hull = function(vertices) {
var x = d3_svg_lineX, y = d3_svg_lineY;
if (arguments.length) return hull(vertices);
function hull(data) {
if (data.length < 3) return [];
- Create a ticketCreate a ticket
Function quadtree
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function quadtree(data) {
var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
if (x1 != null) {
x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
} else {
- Create a ticketCreate a ticket
Function initLayout
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initLayout()
{
/*
* body
*/
- Create a ticketCreate a ticket
Function _contactContainers
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
_contactContainers: function(event) {
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
innermostContainer = null,
innermostIndex = null;
- Create a ticketCreate a ticket
Function d3_svg_area
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_svg_area(projection) {
var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
function area(data) {
var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
return x;
- Create a ticketCreate a ticket
Function _processTabs
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
_processTabs: function() {
var that = this,
prevTabs = this.tabs,
prevAnchors = this.anchors,
prevPanels = this.panels;
- Create a ticketCreate a ticket
Function encode
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
- Create a ticketCreate a ticket
Function 17
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],17:[function(require,module,exports){
'use strict';
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
- Create a ticketCreate a ticket
MetadataSwitch
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public class MetadataSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- Create a ticketCreate a ticket
QualityMeasures
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-26T06:49:42.862Z")
public class QualityMeasures {
@SerializedName("sse")
private BigDecimal sse = null;
- Create a ticketCreate a ticket
DietaryAssessmentMethod
has 25 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 DietaryAssessmentMethod {
@SerializedName("collectionTool")
private String collectionTool = null;
- Create a ticketCreate a ticket
FSKEditorJSConfig
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class FSKEditorJSConfig {
private static final ObjectMapper MAPPER = FskPluginObjectMapper.MAPPER104;
private static final String METADATA = "ModelMetaData";
- Create a ticketCreate a ticket
RunnerNodeModel
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public class RunnerNodeModel extends ExtToolOutputNodeModel implements PortObjectHolder {
private static final NodeLogger LOGGER = NodeLogger.getLogger("Fskx Runner Node Model");
/** Output spec for an FSK object. */
- Create a ticketCreate a ticket
XmlConverter
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public class XmlConverter {
private XmlConverter() {
}
- Create a ticketCreate a ticket
IRController
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public interface IRController extends AutoCloseable {
/**
* Marker class for exceptions during R configuration or execution.
*
- Create a ticketCreate a ticket
PCMLImpl
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public static class PCMLImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements de.bund.bfr.pcml10.PCMLDocument.PCML
{
private static final long serialVersionUID = 1L;
public PCMLImpl(org.apache.xmlbeans.SchemaType sType)
- Create a ticketCreate a ticket
PCML
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public interface PCML extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PCML.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s121DA543B1FCBC764F9DFAF30A6E9DAF").resolveHandle("pcml1f76elemtype");
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
private ProcessModelScope retrieveScope(Sheet sheet) {
ProcessModelScope scope = new ProcessModelScope();
for (int numrow = this.SCOPE_PRODHAZPOP_ROW; numrow <= (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 180.
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