Bnei-Baruch/mdb

View on GitHub
api/metadata_processor_test.go

Summary

Maintainability
F
3 wks
Test Coverage

File metadata_processor_test.go has 2557 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package api

import (
    "database/sql"
    "encoding/hex"
Severity: Major
Found in api/metadata_processor_test.go - About 6 days to fix

    Method MetadataProcessorSuite.simulateLessonChain has 288 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (suite *MetadataProcessorSuite) simulateLessonChain() map[string]TrimFiles {
        CS_SHA1 := [5]string{}
        DMX_O_SHA1 := [5]string{}
        DMX_P_SHA1 := [5]string{}
        TRM_O_SHA1 := [7]string{}
    Severity: Major
    Found in api/metadata_processor_test.go - About 1 day to fix

      Method MetadataProcessorSuite.simulateSpecialLessonChain has 285 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (suite *MetadataProcessorSuite) simulateSpecialLessonChain() map[string]TrimFiles {
          CS_SHA1 := [2]string{}
          DMX_O_SHA1 := [2]string{}
          DMX_P_SHA1 := [2]string{}
          TRM_O_SHA1 := [13]string{}
      Severity: Major
      Found in api/metadata_processor_test.go - About 1 day to fix

        Method MetadataProcessorSuite.TestDailyLesson has 194 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (suite *MetadataProcessorSuite) TestDailyLesson() {
            likutim, err := SomeLikutim(suite.tx)
            suite.Require().Nil(err)
            likutimUIDs := make([]string, len(likutim))
            for i, l := range likutim {
        Severity: Major
        Found in api/metadata_processor_test.go - About 6 hrs to fix

          Method MetadataProcessorSuite.TestSpecialLesson has 183 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (suite *MetadataProcessorSuite) TestSpecialLesson() {
              chain := suite.simulateSpecialLessonChain()
          
              // send parts
              // send full
          Severity: Major
          Found in api/metadata_processor_test.go - About 6 hrs to fix

            Method MetadataProcessorSuite.TestReplaceProcess has 178 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (suite *MetadataProcessorSuite) TestReplaceProcess() {
                tfMain, WorkflowID := suite.simulateSimpleChain()
                original, proxy := tfMain.Original, tfMain.Proxy
            
                c, err := CreateCollection(suite.tx, common.CT_VIDEO_PROGRAM, nil)
            Severity: Major
            Found in api/metadata_processor_test.go - About 6 hrs to fix

              Method MetadataProcessorSuite.TestEventPartLesson has 145 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (suite *MetadataProcessorSuite) TestEventPartLesson() {
                  chain := suite.simulateLessonChain()
              
                  eventType := common.CT_CONGRESS
                  eventCollection, err := CreateCollection(suite.tx, eventType, nil)
              Severity: Major
              Found in api/metadata_processor_test.go - About 4 hrs to fix

                Method MetadataProcessorSuite.TestDoubleTrimFromOneStart has 124 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func (suite *MetadataProcessorSuite) TestDoubleTrimFromOneStart() {
                    CS_SHA1 := utils.RandomSHA1()
                    DMX_SHA1 := utils.RandomSHA1()
                    TRM_1_SHA1 := utils.RandomSHA1()
                    TRM_2_SHA1 := utils.RandomSHA1()
                Severity: Major
                Found in api/metadata_processor_test.go - About 3 hrs to fix

                  MetadataProcessorSuite has 29 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  type MetadataProcessorSuite struct {
                      suite.Suite
                      utils.TestDBManager
                      tx boil.Transactor
                  }
                  Severity: Minor
                  Found in api/metadata_processor_test.go - About 3 hrs to fix

                    Method MetadataProcessorSuite.simulateLessonChainWithSource has 97 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (suite *MetadataProcessorSuite) simulateLessonChainWithSource() map[string]TrimFiles {
                        trimFiles := suite.simulateLessonChain()
                    
                        CS_SHA1 := [4]string{}
                        DMX_O_SHA1 := [4]string{}
                    Severity: Major
                    Found in api/metadata_processor_test.go - About 2 hrs to fix

                      Method MetadataProcessorSuite.assertContentUnit has 97 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (suite *MetadataProcessorSuite) assertContentUnit(metadata CITMetadata, original, proxy *models.File, isUpdate bool) {
                          // reload unit
                          err := original.L.LoadContentUnit(suite.tx, true, original, nil)
                          suite.Require().Nil(err)
                          cu := original.R.ContentUnit
                      Severity: Major
                      Found in api/metadata_processor_test.go - About 2 hrs to fix

                        Method MetadataProcessorSuite.simulateSimpleChain has 95 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (suite *MetadataProcessorSuite) simulateSimpleChain() (TrimFiles, string) {
                            CS_SHA1 := utils.RandomSHA1()
                            DMX_O_SHA1 := utils.RandomSHA1()
                            DMX_P_SHA1 := utils.RandomSHA1()
                            TRM_O_SHA1 := utils.RandomSHA1()
                        Severity: Major
                        Found in api/metadata_processor_test.go - About 2 hrs to fix

                          Method MetadataProcessorSuite.TestFixUnit has 85 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (suite *MetadataProcessorSuite) TestFixUnit() {
                              chain := suite.simulateSpecialLessonChain()
                              originals := make(map[string]TrimFiles)
                          
                              // send parts
                          Severity: Major
                          Found in api/metadata_processor_test.go - About 2 hrs to fix

                            Method MetadataProcessorSuite.TestDerivedBeforeMain has 82 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (suite *MetadataProcessorSuite) TestDerivedBeforeMain() {
                                chain := suite.simulateLessonChain()
                            
                                // send kitei makor of part 1
                                // send part 1
                            Severity: Major
                            Found in api/metadata_processor_test.go - About 2 hrs to fix

                              Method MetadataProcessorSuite.simulateConvertUpload has 74 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (suite *MetadataProcessorSuite) simulateConvertUpload(original *models.File) map[string]*models.File {
                                  files := make(map[string]*models.File)
                              
                                  originalSha1 := hex.EncodeToString(original.Sha1.Bytes)
                                  for _, lang := range common.ALL_LANGS {
                              Severity: Minor
                              Found in api/metadata_processor_test.go - About 1 hr to fix

                                Method MetadataProcessorSuite.assertContentUnit has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring.
                                Open

                                func (suite *MetadataProcessorSuite) assertContentUnit(metadata CITMetadata, original, proxy *models.File, isUpdate bool) {
                                    // reload unit
                                    err := original.L.LoadContentUnit(suite.tx, true, original, nil)
                                    suite.Require().Nil(err)
                                    cu := original.R.ContentUnit
                                Severity: Minor
                                Found in api/metadata_processor_test.go - About 1 hr to fix

                                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 MetadataProcessorSuite.TestDailyLesson_LikutimsAttachLessonsSeries has 60 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (suite *MetadataProcessorSuite) TestDailyLesson_LikutimsAttachLessonsSeries() {
                                    tf, _ := suite.simulateSimpleChain()
                                    likutim, err := createDummyLikutim(suite.tx)
                                    utils.Must(err)
                                    lUids := make([]string, len(likutim))
                                Severity: Minor
                                Found in api/metadata_processor_test.go - About 1 hr to fix

                                  Method MetadataProcessorSuite.TestReplaceNotPublishedProcess has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func (suite *MetadataProcessorSuite) TestReplaceNotPublishedProcess() {
                                      // Create dummy content unit
                                      cu, err := CreateContentUnit(suite.tx, common.CT_LESSON_PART, nil)
                                      suite.Require().Nil(err)
                                  
                                  
                                  Severity: Minor
                                  Found in api/metadata_processor_test.go - About 1 hr to fix

                                    Method MetadataProcessorSuite.TestDailyLesson_SourcesAttachLessonsSeries has 56 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (suite *MetadataProcessorSuite) TestDailyLesson_SourcesAttachLessonsSeries() {
                                        tf, _ := suite.simulateSimpleChain()
                                        sUids := createDummySources(suite.tx, nil)
                                        metadata := CITMetadata{
                                            ContentType:    common.CT_LESSON_PART,
                                    Severity: Minor
                                    Found in api/metadata_processor_test.go - About 1 hr to fix

                                      Method MetadataProcessorSuite.simulateAdditionalCapture has 56 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (suite *MetadataProcessorSuite) simulateAdditionalCapture() *models.File {
                                          CsSha1 := utils.RandomSHA1()
                                          TrmSSha1 := utils.RandomSHA1()
                                      
                                          // capture_start
                                      Severity: Minor
                                      Found in api/metadata_processor_test.go - About 1 hr to fix

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

                                            for i := 0; i < 4; i++ {
                                                metadata.ContentType = common.CT_LESSON_PART
                                                metadata.Part = null.IntFrom(i)
                                                metadata.ArtifactType = null.StringFrom("kitei_makor")
                                                metadata.WeekDate = nil
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 day to fix
                                        api/metadata_processor_test.go on lines 479..529

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                metadata.ContentType = common.CT_LESSON_PART
                                                metadata.Part = null.IntFrom(i)
                                                metadata.ArtifactType = null.StringFrom("lelo_mikud")
                                                metadata.WeekDate = nil
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 day to fix
                                        api/metadata_processor_test.go on lines 426..476

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

                                        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

                                            for i := 1; i < 4; i++ {
                                                metadata.Part = null.IntFrom(i)
                                                metadata.Sources = suite.someSources()
                                                metadata.Tags = suite.someTags()
                                                tf := chain[fmt.Sprintf("part%d", i)]
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 6 hrs to fix
                                        api/metadata_processor_test.go on lines 361..391

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

                                        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

                                            for i := 1; i < 4; i++ {
                                                metadata.Part = null.IntFrom(i)
                                                metadata.Sources = suite.someSources()
                                                metadata.Tags = suite.someTags()
                                                tf := chain[fmt.Sprintf("part%d", i)]
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 6 hrs to fix
                                        api/metadata_processor_test.go on lines 124..154

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                op, evnts, err = handleTrim(suite.tx, TrimRequest{
                                                    Operation: Operation{
                                                        Station: "Trimmer station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 4 hrs to fix
                                        api/metadata_processor_test.go on lines 2546..2583

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                op, evnts, err = handleTrim(suite.tx, TrimRequest{
                                                    Operation: Operation{
                                                        Station: "Trimmer station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 4 hrs to fix
                                        api/metadata_processor_test.go on lines 2506..2543

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

                                        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

                                            op, evnts, err = handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 2139..2167

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

                                        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

                                            op, evnts, err = handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 2176..2204

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

                                        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

                                            op, evnts, err := handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 2428..2456

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

                                        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

                                            op, evnts, err := handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 2061..2089

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                _, evnts, err := handleCaptureStop(suite.tx, CaptureStopRequest{
                                                    Operation: Operation{
                                                        Station:    "Capture station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 2706..2727

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                _, evnts, err := handleCaptureStop(suite.tx, CaptureStopRequest{
                                                    Operation: Operation{
                                                        Station:    "Capture station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 2 hrs to fix
                                        api/metadata_processor_test.go on lines 1973..1994

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

                                        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

                                            _, evnts, err = handleDemux(suite.tx, DemuxRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 2367..2392

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

                                        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

                                            _, evnts, err = handleDemux(suite.tx, DemuxRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1997..2022

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                                for j := range cu.R.CollectionsContentUnits {
                                                    ccu := cu.R.CollectionsContentUnits[j]
                                                    err = ccu.L.LoadCollection(suite.tx, true, ccu, nil)
                                                    suite.Require().Nil(err)
                                                    switch common.CONTENT_TYPE_REGISTRY.ByID[ccu.R.Collection.TypeID].Name {
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 803..815
                                        api/metadata_processor_test.go on lines 920..932

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            for i := range cu.R.CollectionsContentUnits {
                                                ccu := cu.R.CollectionsContentUnits[i]
                                                err = ccu.L.LoadCollection(suite.tx, true, ccu, nil)
                                                suite.Require().Nil(err)
                                                switch common.CONTENT_TYPE_REGISTRY.ByID[ccu.R.Collection.TypeID].Name {
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 865..877
                                        api/metadata_processor_test.go on lines 920..932

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            for j := range cu.R.CollectionsContentUnits {
                                                ccu := cu.R.CollectionsContentUnits[j]
                                                err = ccu.L.LoadCollection(suite.tx, true, ccu, nil)
                                                suite.Require().Nil(err)
                                                switch common.CONTENT_TYPE_REGISTRY.ByID[ccu.R.Collection.TypeID].Name {
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 803..815
                                        api/metadata_processor_test.go on lines 865..877

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                metadata.ContentType = common.CT_LESSON_PART
                                                metadata.Part = null.IntFrom(i)
                                                metadata.ArtifactType = null.StringFrom("kitei_makor")
                                                metadata.WeekDate = nil
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1011..1021

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                metadata.ContentType = common.CT_LESSON_PART
                                                metadata.Part = null.IntFrom(i)
                                                metadata.ArtifactType = null.StringFrom("lelo_mikud")
                                                metadata.WeekDate = nil
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 998..1008

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                _, evnts, err := handleCaptureStart(suite.tx, CaptureStartRequest{
                                                    Operation: Operation{
                                                        Station:    "Capture station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 2689..2703

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

                                        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

                                            for i := 0; i < 4; i++ {
                                                part := strconv.Itoa(i)
                                                _, evnts, err := handleCaptureStart(suite.tx, CaptureStartRequest{
                                                    Operation: Operation{
                                                        Station:    "Capture station",
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1937..1951

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

                                        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

                                        func (suite *MetadataProcessorSuite) someTags() []string {
                                            items, err := models.Tags(qm.Limit(1 + rand.Intn(10))).All(suite.tx)
                                            suite.Require().Nil(err)
                                            uids := make([]string, len(items))
                                            for i, x := range items {
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 2795..2803

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

                                        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

                                        func (suite *MetadataProcessorSuite) someSources() []string {
                                            items, err := models.Sources(qm.Limit(1 + rand.Intn(10))).All(suite.tx)
                                            suite.Require().Nil(err)
                                            uids := make([]string, len(items))
                                            for i, x := range items {
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 1 other location - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 2805..2813

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            opTrim, _, err := handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1166..1184
                                        api/metadata_processor_test.go on lines 1187..1205

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            op_2, _, err := handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1166..1184
                                        api/metadata_processor_test.go on lines 1290..1308

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            op_1, _, err := handleTrim(suite.tx, TrimRequest{
                                                Operation: Operation{
                                                    Station: "Trimmer station",
                                                    User:    "operator@dev.com",
                                                },
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 1 hr to fix
                                        api/metadata_processor_test.go on lines 1187..1205
                                        api/metadata_processor_test.go on lines 1290..1308

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

                                        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 4 locations. Consider refactoring.
                                        Open

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 3 other locations - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 307..320
                                        api/metadata_processor_test.go on lines 954..967
                                        api/metadata_processor_test.go on lines 1211..1224

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

                                        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 4 locations. Consider refactoring.
                                        Open

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 3 other locations - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 307..320
                                        api/metadata_processor_test.go on lines 954..967
                                        api/metadata_processor_test.go on lines 1065..1078

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

                                        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 4 locations. Consider refactoring.
                                        Open

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 3 other locations - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 307..320
                                        api/metadata_processor_test.go on lines 1065..1078
                                        api/metadata_processor_test.go on lines 1211..1224

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

                                        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

                                            _, evnts, err = handleCaptureStop(suite.tx, CaptureStopRequest{
                                                Operation: Operation{
                                                    Station:    "Capture station",
                                                    User:       "operator@dev.com",
                                                    WorkflowID: "c12356789",
                                        Severity: Minor
                                        Found in api/metadata_processor_test.go and 1 other location - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 1954..1970

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

                                        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 4 locations. Consider refactoring.
                                        Open

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 3 other locations - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 954..967
                                        api/metadata_processor_test.go on lines 1065..1078
                                        api/metadata_processor_test.go on lines 1211..1224

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

                                        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

                                            _, evnts, err = handleCaptureStop(suite.tx, CaptureStopRequest{
                                                Operation: Operation{
                                                    Station:    "Capture station",
                                                    User:       "operator@dev.com",
                                                    WorkflowID: "c12356789",
                                        Severity: Minor
                                        Found in api/metadata_processor_test.go and 1 other location - About 45 mins to fix
                                        api/metadata_processor_test.go on lines 2327..2343

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            _, _, err = handleCaptureStop(suite.tx, CaptureStopRequest{
                                                Operation: Operation{
                                                    Station:    "Capture station",
                                                    User:       "operator@dev.com",
                                                    WorkflowID: WorkflowID,
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 40 mins to fix
                                        api/metadata_processor_test.go on lines 1126..1142
                                        api/metadata_processor_test.go on lines 1821..1837

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            _, evnts, err = handleCaptureStop(suite.tx, CaptureStopRequest{
                                                Operation: Operation{
                                                    Station:    "Capture station",
                                                    User:       "operator@dev.com",
                                                    WorkflowID: WorkflowID,
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 40 mins to fix
                                        api/metadata_processor_test.go on lines 1269..1285
                                        api/metadata_processor_test.go on lines 1821..1837

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

                                        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 3 locations. Consider refactoring.
                                        Open

                                            _, evnts, err = handleCaptureStop(suite.tx, CaptureStopRequest{
                                                Operation: Operation{
                                                    Station:    "Capture station",
                                                    User:       "operator@dev.com",
                                                    WorkflowID: WorkflowID,
                                        Severity: Major
                                        Found in api/metadata_processor_test.go and 2 other locations - About 40 mins to fix
                                        api/metadata_processor_test.go on lines 1126..1142
                                        api/metadata_processor_test.go on lines 1269..1285

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

                                        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

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Minor
                                        Found in api/metadata_processor_test.go and 1 other location - About 40 mins to fix
                                        api/metadata_processor_test.go on lines 1518..1531

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

                                        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

                                            metadata := CITMetadata{
                                                ContentType:    common.CT_LESSON_PART,
                                                AutoName:       "auto_name",
                                                FinalName:      "final_name",
                                                CaptureDate:    Date{time.Now()},
                                        Severity: Minor
                                        Found in api/metadata_processor_test.go and 1 other location - About 40 mins to fix
                                        api/metadata_processor_test.go on lines 1638..1651

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

                                        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

                                        There are no issues that match your filters.

                                        Category
                                        Status