Showing 262 of 262 total issues
Function changeRoster
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
WSSocialProvider.prototype.changeRoster = function(id, stat) {
var newStatus, result = {
userId: id,
clientId: id,
lastUpdated: (this.clients.hasOwnProperty(id)) ? this.clients[id].lastUpdated: (new Date()).getTime(),
- Create a ticketCreate a ticket
Function start
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function start(LogClient) {
var logClient = new LogClient(),
input = document.getElementById('msg-input');
input.focus();
- Create a ticketCreate a ticket
Function negotiateState
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var negotiateState = function (text, button, channel) {
var state = {at: 0, text: text, button: button, channel: channel};
button.innerText = 'CreateOffer';
channel.on('ice', function (ice) {
state.text.value += '\n' + ice;
- Create a ticketCreate a ticket
Function deregisterFlow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Module.prototype.deregisterFlow = function (flow, internal) {
var key,
map = internal ? this.internalPortMap : this.externalPortMap;
// TODO: this is inefficient, but seems less confusing than a 3rd
// reverse lookup map.
- Create a ticketCreate a ticket
Function layout
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
User.prototype.layout = function () {
if (this.phase !== 'entered') {
return this.el;
}
var idx = uqueue.indexOf(this),
- Create a ticketCreate a ticket
Function exports
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
'use strict';
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (msg.data.src && msg.data.src !== 'out') {
this.emitMessage(msg.data.flow, msg.data.message);
}
- 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 59.
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
if (msg.data.src && msg.data.src !== 'in') {
this.emitMessage(msg.data.flow, msg.data.message);
}
- 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 59.
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
Function _handleData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
WebRTCTransportProvider.prototype._handleData = function(tag, buffer) {
var currentTag;
if (tag in this._chunks) {
currentTag = this._chunks[tag];
currentTag.buffers.push(buffer);
- Create a ticketCreate a ticket
Function remove
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
IndexedDBStorageProvider.prototype.remove = function (key, continuation) {
if (this.handle.initializing) {
this.pushQueue("remove", key, null, continuation);
return;
} else if (this.handle.db === null) {
- Create a ticketCreate a ticket
Function add
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Policy.prototype.add = function(port, policy) {
var runtime = {
manager: port,
modules: []
};
- Create a ticketCreate a ticket
Function getCore
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Api.prototype.getCore = function(name, from) {
return new PromiseCompat(function(resolve, reject) {
if (this.apis[name]) {
if (this.providers[name]) {
var args = {};
- Create a ticketCreate a ticket
Function checkWin
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Board.prototype.checkWin = function () {
'use strict';
var sets = ["012", "345", "678", "036", "147", "258", "048", "246"],
s,
set,
- Create a ticketCreate a ticket
Function sendMessage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
SocialTransport.prototype.sendMessage = function (to, tag, msg) {
if (!this.clients.hasOwnProperty(to)) {
return this.createReject('SEND_INVALIDDESTINATION');
} else if (this.clients[to].status === this.STATUS.OFFLINE) {
return this.createReject('OFFLINE');
- Create a ticketCreate a ticket
Identical blocks of code found in 2 locations. Consider refactoring. Open
for (r3x = r3y, x = 0; x < width; x++, r3x++) {
if (r3x === 3) r3x = 0;
if (!r3x && !isMasked(x, y)) {
frameBuffer[x + y * width] ^= 1;
- 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 58.
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
for (j = 0; j < neccBlock2; j++) {
eccBuffer[y++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];
}
- 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 58.
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
for (j = 0; j < neccBlock2; j++) {
eccBuffer[y++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];
}
- 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 58.
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
for (r3x = 0, x = 0; x < width; x++, r3x++) {
if (r3x === 3) r3x = 0;
if (!r3x && !isMasked(x, y)) {
frameBuffer[x + y * width] ^= 1;
- 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 58.
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
Function format
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Debug.prototype.format = function (severity, source, args) {
var i, alist = [], argarr;
if (typeof args === "string" && source) {
try {
argarr = JSON.parse(args);
- Create a ticketCreate a ticket
Function XhrProvider
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var XhrProvider = function(cap, dispatchEvent) {
"use strict";
if (typeof window !== "undefined" &&
typeof window.XMLHttpRequest !== "undefined" &&
XhrClass === null) { // freedom
- Create a ticketCreate a ticket