Showing 375 of 375 total issues
Function drawConnection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var drawConnection = function(connection, element) {
var canvas = getCanvas(element);
var source = connection.getSource();
var sourceBorderLayer = canvas.getLayer(
source.getEntity().getName() + "-border");
Function exportAllDatabases
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var exportAllDatabases = function() {
var now = $filter("date")(new Date(), "yyyyMMddHHmmss");
var filename = "dump_" + now + ".sql";
var options = {
type: "saveFile",
Function encode
has 30 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 login
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
login: function(hostName, portNumber, userName, password) {
$rootScope.showMainStatusMessage("Logging in to MySQL server...");
$rootScope.showProgressBar();
var deferred = $q.defer();
$rootScope.notifyExecutingQuery("Logging in to MySQL server.");
Function exportAllDatabases
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
exportAllDatabases: function() {
var deferred = $q.defer();
var header = createHeader();
var footer = createFooter();
getDatabases().then(function(databases) {
Similar blocks of code found in 3 locations. Consider refactoring. Open
$scope.canTruncate = function() {
var table = targetObjectService.getTable();
if (table) {
return table.type === TableTypes.BASE_TABLE;
} else {
- 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 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 (tables.length === 0) {
$("#findRowsWithTheValueDialog").modal("hide");
anyQueryExecuteService.showAndExecuteQueryPanel(
sqls.join(";\n"),
$scope.removeEmptyResult === "true");
- 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 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 (tables.length === 0) {
$("#findSameRowsDialog").modal("hide");
anyQueryExecuteService.showAndExecuteQueryPanel(
sqls.join(";\n"),
$scope.removeEmptyResult === "true");
- 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 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 3 locations. Consider refactoring. Open
$scope.isTable = function() {
var table = targetObjectService.getTable();
if (table) {
return table.type === TableTypes.BASE_TABLE;
} else {
- 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 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 3 locations. Consider refactoring. Open
$scope.isTable = function() {
var table = targetObjectService.getTable();
if (table) {
return table.type === TableTypes.BASE_TABLE;
} else {
- 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 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 encode
has 29 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 ShiftJISEncoder
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ShiftJISEncoder(options) {
var fatal = options.fatal;
/**
* @param {ByteOutputStream} output_byte_stream Output byte stream.
* @param {CodePointInputStream} code_point_pointer Input stream.
Function getStoredPositionCalculator
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getStoredPositionCalculator = function(dimensions) {
return (function(dimensions) {
var offsetX = 30;
var offsetY = 30;
var existsPosition = false;
Function doTestConnectToMySQL
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var doTestConnectToMySQL = function(hostName, portNumber) {
if (isUseSSLConnection()) {
mySQLClientService.loginWithSSL(
hostName,
Number(portNumber),
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($scope.type === "SET" || $scope.type === "ENUM") {
if ($scope.setEnumValues.length === 0) {
$scope.errorMessage = "SET/ENUM type column must have one or more values.";
return;
}
- 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 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
if ($scope.type === "SET" || $scope.type === "ENUM") {
if ($scope.setEnumValues.length === 0) {
$scope.errorMessage = "SET/ENUM type column must have one or more values.";
return;
}
- 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 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 initializeRowsGrid
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var initializeRowsGrid = function() {
$scope.sortOptions = {
fields: [],
directions: [],
columns: []
Function onShowDialog
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var onShowDialog = function() {
resetErrorMessage();
$scope.columnType = ONLY_SAME_COLUMN_TYPE;
$scope.removeEmptyResult = "true";
$scope.matchingRule = MATCHING_RULE_FULL;
Function getShortPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getShortPosition = function(source, target) {
var source1 = source.x;
var source2 = source.x + source.width;
var target1 = target.x;
var target2 = target.x + target.width;
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"),