SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method getCachedTable has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private ResultSet getCachedTable(String cacheTable, String selectSQL, String whereSQL, String cacheWhereSQL, String[] relevantTables) throws SQLException {
        boolean dropCacheFirst = false;
        long lastCaching = DBKernel.getLastCache(conn, cacheTable);
        //System.err.println(selectSQL + whereSQL);
        //long ttt = System.currentTimeMillis();

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method execute has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
      throws Exception {

    FskPortObject portObject = (FskPortObject) inData[0];

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method writeFSKObject has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  public static void writeFSKObject(FskPortObject fskObj, CombineArchive archive, String filePrefix,
      Map<String, URI> URIS) throws Exception {

    addVersion(archive);
   

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method resolveParameterNamesConflict has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  public void resolveParameterNamesConflict(FskPortObject fskPort1, FskPortObject fskPort2) {
    for (Parameter firstParam : SwaggerUtil.getParameter(fskPort1.modelMetadata)) {
      for (Parameter secondParam : SwaggerUtil.getParameter(fskPort2.modelMetadata)) {
        if (secondParam.getId().equals(firstParam.getId())) {
          firstParam.setName(firstParam.getId() + suffix);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method readEObjectList has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

        @SuppressWarnings("unchecked")
        private <T> List<T> readEObjectList(PortObjectZipInputStream zipStream, Class<T> valueType)
                throws IOException, InvalidSettingsException {
            List<JoinRelation> joinerRelation = new ArrayList<>();
            String jsonStr = IOUtils.toString(zipStream, "UTF-8");

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveSettingsTo has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected void saveSettingsTo(final NodeSettingsWO settings) {
    m_repositoryLocationSettings.saveSettingsTo(settings);
    m_SandwichListSettings.saveSettingsTo(settings);
    m_TitleSettings.saveSettingsTo(settings);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method writeFSKObject has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  public static void writeFSKObject(FskPortObject fskObj, CombineArchive archive, String filePrefix,
      Map<String, URI> URIS, ScriptHandler scriptHandler) throws Exception {

    
    addVersion(archive);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method adaptRelationNames has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  private static void adaptRelationNames(CombinedFskPortObject portObject, String suffix, int suffixInsertionIndex,
      Map<String, String> old_new_pramsMap) {
    Map<String, String> mapInversed = old_new_pramsMap.entrySet().stream()
        .collect(Collectors.toMap(Map.Entry::getValue, Map.Entry::getKey,
            // choose the second value in the case of key duplication

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveOutputParameters has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public void saveOutputParameters(FskPortObject fskObj, Path workingDirectory)
      throws VariableNotGlobalException, IOException {
    StringBuilder script = new StringBuilder();

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveInputParameters has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public void saveInputParameters(FskPortObject fskObj, Path workingDirectory) throws Exception {
    String path = workingDirectory.toString() + File.separator + JSON_FILE_NAME;
    parameterJson = new ParameterJson(new File(path));
    String modelId = SwaggerUtil.getModelId(fskObj.modelMetadata);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveOutputParameters has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public void saveOutputParameters(FskPortObject fskObj, Path workingDirectory)
      throws VariableNotGlobalException, IOException, ParameterJsonConversionException,
      URISyntaxException {
    // create script to store variables in hdf5 file

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method addModificationDate has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  public static void addModificationDate(Model modelMetadata) {
    Date dateJavaFormat = new Date();
    LocalDate dateThreeTenFormat = Instant.ofEpochMilli(dateJavaFormat.getTime()).atZone(ZoneId.systemDefault()).toLocalDate();
    String modelType = modelMetadata.getModelType();
      if(modelType.equalsIgnoreCase( "genericModel")) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method getAllChoices has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public List<Map<String, Integer>> getAllChoices() {
        List<Map<String, Integer>> choices = new ArrayList<>();
        List<String> argList = new ArrayList<>(functionArguments.keySet());
        List<Integer> choice = new ArrayList<>(Collections.nCopies(
                argList.size(), 0));

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method saveChartAs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public static void saveChartAs(JFreeChart chart, String fileName,
            int width, int height) {
        if (fileName.toLowerCase().endsWith(".png")) {
            try {
                org.jfree.chart.ChartUtilities.writeChartAsPNG(

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method modelNameEnabled has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean modelNameEnabled(final String name) {
        for (JCheckBox box : modelBoxSetPrim.values()) {
            if (box.getText().equals(name)) return true;        
            if (box.getText().startsWith(name) && box.getText().lastIndexOf(" (") == name.length())  return true;
        }

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method conforms has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean conforms( KnimeSchema other ) {
        
        int i, j;
        boolean found;
        

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method findPackagedR has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private static void findPackagedR() {

        if (!Platform.OS_WIN32.equals(Platform.getOS()))
            return;

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method initR has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  private void initR() throws RException {
    try {
      String rHome = PreferenceInitializer.getR3Provider().getRHome();

      // FIXME: Workaround for Linux server in BfR. If R home is not configure then

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method retrieveBackground has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public GenericModelDataBackground retrieveBackground(Sheet sheet) {

        GenericModelDataBackground background = new GenericModelDataBackground();

        try {

Method retrieveBackground has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public GenericModelDataBackground retrieveBackground(Sheet sheet) {

        GenericModelDataBackground background = new GenericModelDataBackground();

        try {
Severity
Category
Status
Source
Language