Showing 375 of 375 total issues
Function loadStructure
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var loadStructure = function(tables, sqls) {
if (tables.length === 0) {
$("#findRowsWithTheValueDialog").modal("hide");
anyQueryExecuteService.showAndExecuteQueryPanel(
sqls.join(";\n"),
Identical blocks of code found in 2 locations. Consider refactoring. Open
chrome.storage.local.set({favorites: favorites}, function() {
$rootScope.$broadcast(Events.FAVORITES_CHANGED, favorites);
deferred.resolve();
});
- 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 57.
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
chrome.storage.local.set({favorites: favorites}, function() {
$rootScope.$broadcast(Events.FAVORITES_CHANGED, favorites);
deferred.resolve();
});
- 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 57.
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 EUCJPEncoder
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function EUCJPEncoder(options) {
var fatal = options.fatal;
/**
* @param {ByteOutputStream} output_byte_stream Output byte stream.
* @param {CodePointInputStream} code_point_pointer Input stream.
Function getBasicPositionCalculator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getBasicPositionCalculator = function(model) {
return (function(model) {
var startX = 30;
var startY = 30;
var offsetX = startX;
Function createSelectedQueryResultBlob
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createSelectedQueryResultBlob = function() {
var lines = [];
var queryResult = querySelectionService.getQueryResult();
var columnDefinitions = queryResult.result.columnDefinitions;
var resultsetRows = queryResult.result.resultsetRows;
Function createInsertStatement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
createInsertStatement: function(table, values, valueTypes) {
var targetColumns = [];
var targetValues = [];
angular.forEach(values, function(value, columnName) {
var valueType = valueTypes[columnName];
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (typeService.isString($scope.type)) {
sql += "CHARACTER SET " + $scope.characterSet + " ";
sql += "COLLATE " + $scope.collation + " ";
if ($scope.binary) {
sql += "BINARY ";
- 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 56.
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
if (typeService.isString($scope.type)) {
if ($scope.binary) {
sql += "BINARY ";
}
sql += "CHARACTER SET " + $scope.characterSet + " ";
- 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 56.
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
mySQLQueryService.showFullColumns(tableName).then(function(result) {
deferred.resolve({
columnDefinitions: result.columnDefinitions,
resultsetRows: result.resultsetRows
});
- 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 56.
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
mySQLQueryService.showTables().then(function(result) {
deferred.resolve({
columnDefinitions: result.columnDefinitions,
resultsetRows: result.resultsetRows
});
- 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 56.
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 copyRow
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
copyRow: function(queryResult, row) {
var columnDefinitions = queryResult.columnDefinitions;
var resultsetRows = queryResult.resultsetRows;
var values = [];
angular.forEach(columnDefinitions, function(column, index) {
Function assignEventHandlers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var assignEventHandlers = function() {
$scope.$on(Events.CONNECTION_CHANGED, function(event, data) {
onConnectionChanged();
});
$scope.$on(Events.DATABASE_CHANGED, function(event, database) {
Function cps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var cps = (/** @return {Array.<number>} Code points. */function() {
/** @type {Array.<number>} */
var cps = [];
// Based on http://www.w3.org/TR/WebIDL/#idl-DOMString
var i = 0, n = string.length;
Function EUCKREncoder
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function EUCKREncoder(options) {
var fatal = options.fatal;
/**
* @param {ByteOutputStream} output_byte_stream Output byte stream.
* @param {CodePointInputStream} code_point_pointer Input stream.
Function doShowQueryResult
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var doShowQueryResult = function(index) {
resetQueryResultGrid();
var queryResult = $scope.queryResults[index];
querySelectionService.setQueryResult(queryResult);
$scope.selectedQuery = queryResult.query;
Function UTF16Encoder
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function UTF16Encoder(utf16_be, options) {
var fatal = options.fatal;
/**
* @param {ByteOutputStream} output_byte_stream Output byte stream.
* @param {CodePointInputStream} code_point_pointer Input stream.
Function encode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.encode = function(output_byte_stream, code_point_pointer) {
var code_point = code_point_pointer.get();
if (code_point === EOF_code_point) {
return EOF_byte;
}
Function assignEventHandlers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var assignEventHandlers = function() {
$scope.$on(Events.CONNECTION_CHANGED, function(event, data) {
onConnectionChanged();
});
$scope.$on(Events.MODE_CHANGED, function(event, mode) {
Function doOpen
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var doOpen = function(activeTab) {
configurationService.getDatabaseInfoAutoUpdateSpan().then(function(span) {
$scope.databaseInfoAutoUpdateSpan = span / 1000;
return configurationService.getRowCountPerPageInRowsPanel();
}).then(function(rowCount) {