Showing 14,752 of 14,752 total issues
Method retrieveReference
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Reference retrieveReference(Row row) {
// Check mandatory properties and throw exception if missing
if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Missing Is reference description?");
- Create a ticketCreate a ticket
Method retrieveReference
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Reference retrieveReference(Row row) {
// Check mandatory properties and throw exception if missing
if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Missing Is reference description?");
- Create a ticketCreate a ticket
Method retrieveReference
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Reference retrieveReference(Row row) {
// Check mandatory properties and throw exception if missing
if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
throw new IllegalArgumentException("Missing Is reference description?");
- Create a ticketCreate a ticket
Method saveToNodeSettings
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void saveToNodeSettings(final NodeSettingsWO settings) {
settings.addString(MODEL_NAME, template.isSetModelName() ? template.getModelName() : null);
settings.addString(MODEL_ID, template.isSetModelId() ? template.getModelId() : null);
settings.addString(MODEL_LINK,
template.isSetModelLink() ? template.getModelLink().toString() : null);
- Create a ticketCreate a ticket
Method checkIfInputIsValid
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void checkIfInputIsValid() {
Map<String, JComboBox<String>> depVarBoxes = new LinkedHashMap<>();
isValid = true;
for (String model : comboBoxes.keySet()) {
- Create a ticketCreate a ticket
Method retrieveGeneralInformation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
static GeneralInformation retrieveGeneralInformation(String[][] values) {
GeneralInformation generalInformation = MetadataFactory.eINSTANCE.createGeneralInformation();
String name = values[RakipRow.GENERAL_INFORMATION__NAME.num][RakipColumn.I.ordinal()];
- Create a ticketCreate a ticket
Method retrieveGeneralInformation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
static GeneralInformation retrieveGeneralInformation(String[][] values) {
GeneralInformation generalInformation = MetadataFactory.eINSTANCE.createGeneralInformation();
String name = values[RakipRow.GENERAL_INFORMATION__NAME.num][RakipColumn.I.ordinal()];
- Create a ticketCreate a ticket
Method retrieveGeneralInformation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
static GeneralInformation retrieveGeneralInformation(String[][] values) {
GeneralInformation generalInformation = MetadataFactory.eINSTANCE.createGeneralInformation();
String name = values[RakipRow.GENERAL_INFORMATION__NAME.num][RakipColumn.I.ordinal()];
- Create a ticketCreate a ticket
Method updateDialog
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void updateDialog(ModelType modelType, String readmeFile,
EnvironmentManager environment) {
modelTypeComboBoxModel.setSelectedItem(modelType);
m_readmePanel.setSelectedFile(readmeFile);
clearEnvironmentPanel();
- Create a ticketCreate a ticket
Method test
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Test
public void test() throws Exception {
Sheet sheet0;
final Path path = Paths.get("files/Duarte_MetaData.xlsx");
- Create a ticketCreate a ticket
Function tokenBase
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(stream, state, prev) {
if (stream.sol()) state.indented = stream.indentation()
if (stream.eatSpace()) return null
var ch = stream.peek()
- Create a ticketCreate a ticket
Function tokenBase
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(stream, state) {
var ch = stream.next();
if (hooks[ch]) {
var result = hooks[ch](stream, state);
if (result !== false) return result;
- Create a ticketCreate a ticket
Function drawShadow
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawShadow: function () {
var o = this.options,
c = this.$cache,
is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min),
- Create a ticketCreate a ticket
Function _setOption
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setOption: function( key, value ) {
var isDraggable, isResizable,
uiDialog = this.uiDialog;
if ( key === "dialogClass" ) {
- Create a ticketCreate a ticket
Function initUI
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initUI() {
function createMetadataList(parameter) {
const formatProperty = (name, value) => value ? `<li><b>${name}</b>: ${value}</li>` : '';
- Create a ticketCreate a ticket
Function 42
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],42:[function(require,module,exports){
'use strict';
module.exports = function (data, opts) {
if (!opts) opts = {};
- Create a ticketCreate a ticket
Function serialize
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function serialize(components) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
var uriTokens = [];
- Create a ticketCreate a ticket
Function wrapper
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wrapper() {
// Avoid `arguments` object use disqualifying optimizations by
// converting it to an array before providing it to other functions.
var length = arguments.length,
index = length,
- Create a ticketCreate a ticket
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (state.waitProperty) {
state.waitProperty = false;
if (stream.match(/\b(\w+)\b/)) {
state.waitDot = true; // A property can be followed by another property
state.waitPipe = true; // A property can be followed by a filter
- 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 74.
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 (state.waitProperty) {
state.waitProperty = false;
if (stream.match(/\b(\w+)\b/)) {
state.waitDot = true; // A property can be followed by another property
state.waitPipe = true; // A property can be followed by a filter
- 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 74.
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