Showing 14,752 of 14,752 total issues
Function getDefaults
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getDefaults() {
return {
tapToDismiss: true,
toastClass: 'toast',
containerId: 'toast-container',
- Create a ticketCreate a ticket
Function init
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(element, options) {
this.$element = $(element);
//since 1.4.1 container do not use data-* directly as they already merged into options.
this.options = $.extend({}, $.fn.editableContainer.defaults, options);
this.splitOptions();
- Create a ticketCreate a ticket
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
//init loader
this.$loading = $($.fn.editableform.loading);
this.$div.empty().append(this.$loading);
- Create a ticketCreate a ticket
Function pack
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.pack = function() {
var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
function pack(d, i) {
var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
return radius;
- Create a ticketCreate a ticket
Function extent
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
brush.extent = function(z) {
var x0, x1, y0, y1, t;
if (!arguments.length) {
if (x) {
if (xExtentDomain) {
- Create a ticketCreate a ticket
Function intersect
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.ui.intersect = (function() {
function isOverAxis( x, reference, size ) {
return ( x >= reference ) && ( x < ( reference + size ) );
}
- Create a ticketCreate a ticket
Function _respectSize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
_respectSize: function( data ) {
var o = this._vBoundaries,
a = this.axis,
ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
- Create a ticketCreate a ticket
Function _optionDatepicker
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
_optionDatepicker: function(target, name, value) {
var settings, date, minDate, maxDate,
inst = this._getInst(target);
if (arguments.length === 2 && typeof name === "string") {
- Create a ticketCreate a ticket
Function close
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
close: function( event ) {
var tooltip,
that = this,
target = $( event ? event.currentTarget : this.element ),
tooltipData = this._find( target );
- Create a ticketCreate a ticket
Function clear
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
TextMarker.prototype.clear = function () {
var this$1 = this;
if (this.explicitlyCleared) { return }
var cm = this.doc.cm, withOp = cm && !cm.curOp
- Create a ticketCreate a ticket
Function clear
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
TextMarker.prototype.clear = function () {
var this$1 = this;
if (this.explicitlyCleared) { return }
var cm = this.doc.cm, withOp = cm && !cm.curOp
- Create a ticketCreate a ticket
Function useCustomRule
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function useCustomRule(rule, schema, parentSchema, it) {
if (self._opts.validateSchema !== false) {
var deps = rule.definition.dependencies;
if (deps && !deps.every(function(keyword) {
return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
- Create a ticketCreate a ticket
Function show
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
- Create a ticketCreate a ticket
Function template
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
_.template = function(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
settings = _.defaults({}, settings, _.templateSettings);
// Combine delimiters into one regular expression via alternation.
- Create a ticketCreate a ticket
Function extractAndCreateUI
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function extractAndCreateUI(modelMetaData, modelscript, visualization){
if (!modelMetaData || modelMetaData == "null" || modelMetaData == "") {
_metadata.generalInformation = {};
_metadata.generalInformation.modelCategory = {};
_metadata.scope = {};
- Create a ticketCreate a ticket
Function createUI
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function createUI(modelscript, visualization) {
$('#modelScriptArea').val(modelscript || _val.modelScript);
$('#visualizationScriptArea').val(visualization || _val.visualizationScript);
$('#readmeArea').val(_val.readme);
- Create a ticketCreate a ticket
Function backdrop
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
static void compare(final Dep obtained, final Dep expected) {
assertThat(obtained.name, equalTo(expected.name));
assertThat(obtained.origname, equalTo(expected.origname));
assertThat(obtained.min, equalTo(expected.min));
assertThat(obtained.max, equalTo(expected.max));
- 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 103.
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
static void compare(final Indep obtained, final Indep expected) {
assertThat(obtained.name, equalTo(expected.name));
assertThat(obtained.origname, equalTo(expected.origname));
assertThat(obtained.min, equalTo(expected.min));
assertThat(obtained.max, equalTo(expected.max));
- 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 103.
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 4 locations. Consider refactoring. Open
if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") {
state.context.align = true;
}
- 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 66.
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