Showing 2,136 of 2,138 total issues
Function each
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
each: function( obj, callback, args ) {
var name,
i = 0,
length = obj.length,
isObj = length === undefined || jQuery.isFunction( obj );
Function attr
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function( elem, name, value, pass ) {
var ret, hooks, notxml,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
Function cleanData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
cleanData: function( elems, /* internal */ acceptData ) {
var data, id, elem, type,
i = 0,
internalKey = jQuery.expando,
cache = jQuery.cache,
Function showHide
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showHide( elements, show ) {
var elem, display,
values = [],
index = 0,
length = elements.length;
Function access
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
var exec,
bulk = key == null,
i = 0,
length = elems.length;
Function addMethods
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addMethods(methods) {
if (arguments.length === 0) addFormMethods();
if (arguments.length === 2) {
var tagName = methods;
Function poll_to_update_student_data_percentages
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.poll_to_update_student_data_percentages = function(options) {
// done if no poll url
if (!options.poll_url) {
if (console) {
Function confirm
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Portal.confirm = function(opts) {
var callback = (opts && opts.callback) || function() { console.log("complete"); };
var message = (opts && opts.message) || "Are you sure?";
var okText = (opts && opts.okText) || "OK";
var cancelText = (opts && opts.okText) || "Cancel";
Function drawCrosshair
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawCrosshair: function(pos) {
var octx = this.octx,
options = this.options,
plotOffset = this.plotOffset,
x = plotOffset.left+pos.relX+0.5,
Function drawCrosshair
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawCrosshair: function(pos) {
var octx = this.octx,
options = this.options,
plotOffset = this.plotOffset,
x = plotOffset.left+pos.relX+0.5,
Method fetch_available_filter_options
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fetch_available_filter_options
results = self.engine.search(self.searchable_models) do |s|
s.facet :subject_areas
s.facet :sensors
s.facet :grade_levels do
Function keyup_checker
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
switch (stroke) {
Method up
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def up
[
"embeddable_data_collectors",
"embeddable_data_tables",
"embeddable_drawing_tools",
Function apiCall
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
apiCall (action: any, options: any) {
const teacherClassesBasePath = "/api/v1/teacher_classes";
const classesBasePath = "/api/v1/classes";
let { clazz, data, onSuccess } = options;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const data = this.props.material;
return (
<div className="mb-material">
<div className="mb-material-thumbnail">
Function handleResponse
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
const handleResponse = (data: any) => {
let newState: any;
queryCache[cacheKey] = data;
const aggs = data.aggregations;
if (fieldName) {
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const materialProperties = this.props.materialProperties;
const sensors = this.props.sensors;
const requirementsOutput = materialProperties.indexOf("Requires download") > -1
? <p>This resource requires Java. You can download Java for free from <a href="http://java.com/" title="Get Java">java.com</a>.<br /><br />Using macOS 10.9 or newer? You'll also need to install our launcher app. <a href="http://static.concord.org/installers/cc_launcher_installer.dmg" title="Download the CCLauncher installer">Download the launcher installer</a>, open the .dmg file, and drag the CCLauncher app to your Applications folder. Then return to this page and launch the resource.</p>
Identical blocks of code found in 2 locations. Consider refactoring. Open
function getUniqueElementID(element) {
if (element === window) return 0;
if (typeof element._prototypeUID === 'undefined')
element._prototypeUID = Element.Storage.UID++;
- Read upRead up
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 62.
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
matchers = [ function( elem, context, xml ) {
return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
(checkContext = context).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
- Read upRead up
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 62.
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
initialize: function() {
this.element = new Element('iframe',{
style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
src: 'javascript:void(0);',
frameborder: 0
- Read upRead up
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 62.
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