SysMO-DB/seek

View on GitHub

Showing 1,025 of 1,025 total issues

Method get_remote_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def get_remote_data url, username=nil, password=nil, type=nil, include_data=true
Severity: Minor
Found in lib/jerm/translucent_downloader.rb - About 35 mins to fix

    Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def initialize(v=nil, r=nil, c=nil, f=nil, s=nil)
    Severity: Minor
    Found in lib/seek/data/spreadsheet_explorer_representation.rb - About 35 mins to fix

      Method get_remote_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def get_remote_data url, username=nil, password=nil, type=nil, include_data=true      
      Severity: Minor
      Found in lib/seek/remote_downloader.rb - About 35 mins to fix

        Method extract_as_table has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def extract_as_table treatments_heading_row, sample_col, treatments_first_col,treatments_last_col,sheet
        Severity: Minor
        Found in lib/seek/data/treatments.rb - About 35 mins to fix

          Method cache has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def cache file_obj,data_result,url,username,password
          Severity: Minor
          Found in lib/seek/remote_downloader.rb - About 35 mins to fix

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

                def preview
                element=params[:element]
                event=Event.find_by_id(params[:id])
            
                render :update do |page|
            Severity: Major
            Found in app/controllers/events_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
            
                element=params[:element]
                sample=Sample.find_by_id(params[:id])
            
            
            Severity: Major
            Found in app/controllers/samples_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
            
                element = params[:element]
                presentation = Presentation.find_by_id(params[:id])
            
            
            Severity: Major
            Found in app/controllers/presentations_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
                
                element=params[:element]
                sop=Sop.find_by_id(params[:id])
                
            Severity: Major
            Found in app/controllers/sops_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

              def destroy
                @experimental_condition=ExperimentalCondition.find(params[:id])
                render :update do |page|
                  if @experimental_condition.destroy
                    page.visual_effect :fade, "condition_or_factor_row_#{@experimental_condition.id}"
            Severity: Minor
            Found in app/controllers/experimental_conditions_controller.rb and 1 other location - About 35 mins to fix
            app/controllers/studied_factors_controller.rb on lines 88..95

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
            
                element = params[:element]
                model = Model.find_by_id(params[:id])
            
            
            Severity: Major
            Found in app/controllers/models_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
                element=params[:element]
                data_file=DataFile.find_by_id(params[:id])
                
                render :update do |page|
            Severity: Major
            Found in app/controllers/data_files_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
                element=params[:element]
                workflow=Workflow.find_by_id(params[:id])
            
                render :update do |page|
            Severity: Major
            Found in app/controllers/workflows_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/assays_controller.rb on lines 249..258
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199

            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 36.

            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

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

              def destroy
                @studied_factor=StudiedFactor.find(params[:id])
                render :update do |page|
                  if @studied_factor.destroy
                     page.visual_effect :fade, "condition_or_factor_row_#{@studied_factor.id}"
            Severity: Minor
            Found in app/controllers/studied_factors_controller.rb and 1 other location - About 35 mins to fix
            app/controllers/experimental_conditions_controller.rb on lines 85..92

            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 36.

            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

            Further Reading

            Similar blocks of code found in 8 locations. Consider refactoring.
            Open

              def preview
                element=params[:element]
                assay  =Assay.find_by_id(params[:id])
            
                render :update do |page|
            Severity: Major
            Found in app/controllers/assays_controller.rb and 7 other locations - About 35 mins to fix
            app/controllers/data_files_controller.rb on lines 342..351
            app/controllers/events_controller.rb on lines 96..105
            app/controllers/models_controller.rb on lines 474..484
            app/controllers/presentations_controller.rb on lines 202..212
            app/controllers/samples_controller.rb on lines 214..224
            app/controllers/sops_controller.rb on lines 189..199
            app/controllers/workflows_controller.rb on lines 171..180

            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 36.

            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

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        var last_row = $(this).parent().parent().parent().find("div.row_heading").size();
            Severity: Minor
            Found in app/assets/javascripts/spreadsheet_explorer.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/spreadsheet_explorer.js on lines 228..228

            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 47.

            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

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function getEventTarget(e)
            {
              e = e ? e : window.event;
              return e.target ? e.target : e.srcElement;
            }
            Severity: Minor
            Found in app/assets/javascripts/jws/Resizeable_Textbox/javascript.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 139..143

            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 47.

            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

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function getEventTarget(e)
            {
              e = e ? e : window.event;
              return e.target ? e.target : e.srcElement;
            }
            Severity: Minor
            Found in app/assets/javascripts/jws/Resizeable_Container/javascript.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 139..143

            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 47.

            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

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                var options = select.childElements().select(function(c){return c.selected && c.value==project_id})
            Severity: Minor
            Found in app/assets/javascripts/people.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/people.js on lines 287..287

            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 47.

            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

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                var options = select.childElements().select(function(c){return c.selected && c.value==project_id});
            Severity: Minor
            Found in app/assets/javascripts/people.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/people.js on lines 235..235

            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 47.

            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

            Further Reading

            Severity
            Category
            Status
            Source
            Language