tensorflow/models

View on GitHub
research/object_detection/core/target_assigner_test.py

Summary

Maintainability
F
2 mos
Test Coverage

File target_assigner_test.py has 2412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in research/object_detection/core/target_assigner_test.py - About 6 days to fix

    Function graph_fn has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def graph_fn(anchor_means, groundtruth_boxlist1, groundtruth_boxlist2,
    Severity: Minor
    Found in research/object_detection/core/target_assigner_test.py - About 45 mins to fix

      Function graph_fn has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def graph_fn(anchor_means, groundtruth_boxlist1, groundtruth_boxlist2,
      Severity: Minor
      Found in research/object_detection/core/target_assigner_test.py - About 45 mins to fix

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

          def test_assign_agnostic_with_keypoints(self):
        
            def graph_fn(anchor_means, groundtruth_box_corners,
                         groundtruth_keypoints):
              similarity_calc = region_similarity_calculator.IouSimilarity()
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 4 days to fix
        research/object_detection/core/target_assigner_test.py on lines 169..222

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

          def test_assign_class_agnostic_with_keypoints_and_ignored_matches(self):
            # Note: test is very similar to above. The third box matched with an IOU
            # of 0.35, which is between the matched and unmatched threshold. This means
            # That like above the expected classification targets are [1, 1, 0].
            # Unlike above, the third target is ignored and therefore expected
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 4 days to fix
        research/object_detection/core/target_assigner_test.py on lines 118..167

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

          def test_assign_agnostic(self):
            def graph_fn(anchor_means, groundtruth_box_corners):
              similarity_calc = region_similarity_calculator.IouSimilarity()
              matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5,
                                                     unmatched_threshold=0.5)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 days to fix
        research/object_detection/core/target_assigner_test.py on lines 75..116

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

          def test_assign_class_agnostic_with_ignored_matches(self):
            # Note: test is very similar to above. The third box matched with an IOU
            # of 0.35, which is between the matched and unmatched threshold. This means
            # That like above the expected classification targets are [1, 1, 0].
            # Unlike above, the third target is ignored and therefore expected
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 days to fix
        research/object_detection/core/target_assigner_test.py on lines 35..73

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            def graph1_fn():
              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_center]),
                  tf.constant([self._box_center_small]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 7 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1330..1344

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            def graph_fn():
              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_center]),
                  tf.constant([self._box_center_small]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 7 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1391..1405

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

        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

            exp_cls_targets = [[[[0., 1., 1.],
                                 [1., 1., 0.]],
                                [[0., 0., 0.],
                                 [0., 0., 0.]],
                                [[0., 0., 0.],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 6 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 747..762

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

        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

            exp_cls_weights = [[[[1., 1., 1.],
                                 [1., 1., 1.]],
                                [[1., 1., 1.],
                                 [1., 1., 1.]],
                                [[1., 1., 1.],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 6 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 731..746

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

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

          def setUp(self):
            super(CenterNetCenterHeatmapTargetAssignerTest, self).setUp()
        
            self._box_center = [0.0, 0.0, 1.0, 1.0]
            self._box_center_small = [0.25, 0.25, 0.75, 0.75]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1509..1515
        research/object_detection/core/target_assigner_test.py on lines 1683..1690
        research/object_detection/core/target_assigner_test.py on lines 2312..2318

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

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

          def setUp(self):
            super(CenterNetIOUTargetAssignerTest, self).setUp()
        
            self._box_center = [0.0, 0.0, 1.0, 1.0]
            self._box_center_small = [0.25, 0.25, 0.75, 0.75]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1242..1249
        research/object_detection/core/target_assigner_test.py on lines 1509..1515
        research/object_detection/core/target_assigner_test.py on lines 2312..2318

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

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

          def setUp(self):
            super(CenterNetBoxTargetAssignerTest, self).setUp()
            self._box_center = [0.0, 0.0, 1.0, 1.0]
            self._box_center_small = [0.25, 0.25, 0.75, 0.75]
            self._box_lower_left = [0.5, 0.0, 1.0, 0.5]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1242..1249
        research/object_detection/core/target_assigner_test.py on lines 1683..1690
        research/object_detection/core/target_assigner_test.py on lines 2312..2318

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

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

          def setUp(self):
            super(CenterNetTrackTargetAssignerTest, self).setUp()
            self._box_center = [0.0, 0.0, 1.0, 1.0]
            self._box_center_small = [0.25, 0.25, 0.75, 0.75]
            self._box_lower_left = [0.5, 0.0, 1.0, 0.5]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1242..1249
        research/object_detection/core/target_assigner_test.py on lines 1509..1515
        research/object_detection/core/target_assigner_test.py on lines 1683..1690

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

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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, float('nan'), 0.9, 1.0],
                                [0.4, 0.1, 0.4, 0.2, 0.1],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1811..1817
        research/object_detection/core/target_assigner_test.py on lines 1959..1965
        research/object_detection/core/target_assigner_test.py on lines 2019..2025
        research/object_detection/core/target_assigner_test.py on lines 2059..2065

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1748..1754
        research/object_detection/core/target_assigner_test.py on lines 1959..1965
        research/object_detection/core/target_assigner_test.py on lines 2019..2025
        research/object_detection/core/target_assigner_test.py on lines 2059..2065

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1748..1754
        research/object_detection/core/target_assigner_test.py on lines 1811..1817
        research/object_detection/core/target_assigner_test.py on lines 2019..2025
        research/object_detection/core/target_assigner_test.py on lines 2059..2065

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1748..1754
        research/object_detection/core/target_assigner_test.py on lines 1811..1817
        research/object_detection/core/target_assigner_test.py on lines 1959..1965
        research/object_detection/core/target_assigner_test.py on lines 2059..2065

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 4 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1748..1754
        research/object_detection/core/target_assigner_test.py on lines 1811..1817
        research/object_detection/core/target_assigner_test.py on lines 1959..1965
        research/object_detection/core/target_assigner_test.py on lines 2019..2025

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            def graph2_fn():
              box_batch = [tf.constant([self._box_center])]
              classes = [
                  tf.one_hot([0], depth=2),
              ]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1446..1455
        research/object_detection/core/target_assigner_test.py on lines 1472..1481

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

        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

            def graph3_fn():
              box_batch = [tf.constant([self._box_center])]
              classes = [
                  tf.one_hot([0], depth=2),
              ]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1446..1455
        research/object_detection/core/target_assigner_test.py on lines 1459..1468

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

        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

            def graph1_fn():
              box_batch = [tf.constant([self._box_center])]
              classes = [
                  tf.one_hot([0], depth=2),
              ]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1459..1468
        research/object_detection/core/target_assigner_test.py on lines 1472..1481

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            def graph_fn():
              box_batch = [tf.constant([self._box_center, self._box_lower_left])]
              classes = [
                  tf.one_hot([0, 1], depth=4),
              ]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1374..1383

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            def graph_fn():
              box_batch = [tf.constant([self._box_center, self._box_center_small])]
        
              classes = [
                  tf.one_hot([0, 1], depth=4),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1253..1261

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

        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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, 0.7, 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1844..1850

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

        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

              coordinates = tf.expand_dims(
                  tf.constant(
                      np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                                [float('nan'), 0.7, 0.7, 0.9, 0.4],
                                [0.4, 0.1, 0.4, 0.2, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1901..1907

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

        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

                  tf.constant(
                      [[[0.11, 0.2, 0.3, 0.4],  # Box 0.
                        [0.6, 0.4, 0.1, 0.0],
                        [0.0, 0.0, 0.0, 0.0]],
                       [[0.0, 0.0, 0.0, 0.0],  # Box 1.
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 3 hrs to fix
        research/object_detection/metrics/coco_evaluation_test.py on lines 741..749

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

        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

              depths = tf.constant(
                  np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                            [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                            [0.4, 0.1, 0.4, 0.2, 0.0],
                            [0.5, 0.0, 7.0, 0.7, 0.4]]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1910..1915

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

        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

              depths = tf.constant(
                  np.array([[0.1, 0.2, 0.3, 0.4, 0.5],
                            [float('nan'), 0.7, float('nan'), 0.9, 0.4],
                            [0.4, 0.1, 0.4, 0.2, 0.0],
                            [0.5, 0.0, 7.0, 0.7, 0.4]]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1853..1858

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

        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

              gt_classes_list = [
                  # Example 0.
                  tf.constant([[1., 0., 0.],
                               [0., 1., 0.],
                               [1., 0., 0.]], dtype=tf.float32),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 2227..2234

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 59.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              gt_dp_part_ids_list = [
                  # Example 0.
                  tf.constant([[1, 6, 0],
                               [0, 0, 0],
                               [0, 2, 3]], dtype=tf.int32),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 2149..2156

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 59.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_weights = [[[1, 1, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5]],
                               [[0.5, 0.5, 0.5, 0.5],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_targets = [[[0, 1, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0]],
                               [[1, 0, 0, 0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_weights = [[[1, 1, 1, 1],
                                [1, 1, 1, 1],
                                [1, 1, 1, 1],
                                [1, 1, 1, 1]],
                               [[1, 1, 1, 1],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_targets = [[[0, 1, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0]],
                               [[1, 0, 0, 0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_targets = [[[0, 1, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0]],
                               [[1, 0, 0, 0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_targets = [[[0, 1, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0],
                                [1, 0, 0, 0]],
                               [[1, 0, 0, 0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_reg_targets = [[[0, 0, -0.5, -0.5],
                                [0, 0, 0, 0],
                                [0, 0, 0, 0,],
                                [0, 0, 0, 0,],],
                               [[0, 0, 0, 0,],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_weights = [[[1, 1, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5],
                                [0.5, 0.5, 0.5, 0.5]],
                               [[0.5, 0.5, 0.5, 0.5],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 591..598
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            exp_cls_weights = [[[1, 1, 1, 1],
                                [1, 1, 1, 1],
                                [1, 1, 1, 1],
                                [1, 1, 1, 1]],
                               [[1, 1, 1, 1],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 23 other locations - About 2 hrs to fix
        official/vision/dataloaders/tf_example_decoder_test.py on lines 103..110
        official/vision/dataloaders/tf_example_decoder_test.py on lines 225..232
        official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 106..113
        research/object_detection/core/batch_multiclass_nms_test.py on lines 453..460
        research/object_detection/core/batch_multiclass_nms_test.py on lines 528..535
        research/object_detection/core/target_assigner_test.py on lines 534..541
        research/object_detection/core/target_assigner_test.py on lines 583..590
        research/object_detection/core/target_assigner_test.py on lines 599..606
        research/object_detection/core/target_assigner_test.py on lines 658..665
        research/object_detection/core/target_assigner_test.py on lines 666..673
        research/object_detection/core/target_assigner_test.py on lines 674..681
        research/object_detection/core/target_assigner_test.py on lines 763..770
        research/object_detection/core/target_assigner_test.py on lines 970..977
        research/object_detection/core/target_assigner_test.py on lines 1025..1032
        research/object_detection/core/target_assigner_test.py on lines 1033..1040
        research/object_detection/core/target_assigner_test.py on lines 1041..1048
        research/object_detection/core/target_assigner_test.py on lines 1107..1114
        research/object_detection/core/target_assigner_test.py on lines 1115..1122
        research/object_detection/core/target_assigner_test.py on lines 1123..1130
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1069..1072
        research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1159..1162
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 251..254
        research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 290..301

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 58.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              gt_keypoint_depth_weights = tf.constant(
                  np.array([[1.0, 1.0, 1.0, 1.0, 1.0],
                            [float('nan'), 0.0, 1.0, 0.0, 0.0],
                            [1.0, 1.0, 1.0, 1.0, 1.0],
                            [1.0, 1.0, 0.5, 1.0, 1.0]]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1918..1923

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

        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

              gt_keypoint_depth_weights = tf.constant(
                  np.array([[1.0, 1.0, 1.0, 1.0, 1.0],
                            [float('nan'), 0.0, 1.0, 0.0, 0.0],
                            [1.0, 1.0, 1.0, 1.0, 1.0],
                            [1.0, 1.0, 0.5, 1.0, 1.0]]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1861..1866

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

        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

          def _get_target_assigner(self):
            similarity_calc = region_similarity_calculator.IouSimilarity()
            matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5,
                                                   unmatched_threshold=0.5)
            box_coder = mean_stddev_box_coder.MeanStddevBoxCoder(stddev=0.1)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 883..888

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

        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

          def _get_target_assigner(self):
            similarity_calc = region_similarity_calculator.IouSimilarity()
            matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5,
                                                   unmatched_threshold=0.5)
            box_coder = mean_stddev_box_coder.MeanStddevBoxCoder(stddev=0.1)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 499..504

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

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

            np.testing.assert_array_almost_equal([
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0
            ], weights)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1885..1889
        research/object_detection/core/target_assigner_test.py on lines 1943..1947
        research/object_detection/core/target_assigner_test.py on lines 2089..2093

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

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

            np.testing.assert_array_almost_equal([
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5, 0.5
            ], weights)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1943..1947
        research/object_detection/core/target_assigner_test.py on lines 1989..1993
        research/object_detection/core/target_assigner_test.py on lines 2089..2093

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

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

            np.testing.assert_array_almost_equal([
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0
            ], weights)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1885..1889
        research/object_detection/core/target_assigner_test.py on lines 1943..1947
        research/object_detection/core/target_assigner_test.py on lines 1989..1993

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

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

            np.testing.assert_array_almost_equal([
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5, 0.5
            ], weights)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1885..1889
        research/object_detection/core/target_assigner_test.py on lines 1989..1993
        research/object_detection/core/target_assigner_test.py on lines 2089..2093

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

        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

              gt_boxes_list = [
                  tf.constant(
                      np.array([[0.0, 0.0, 0.3, 0.3],
                                [0.0, 0.0, 0.5, 0.5],
                                [0.0, 0.0, 0.5, 0.5],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 2008..2014
        research/object_detection/core/target_assigner_test.py on lines 2048..2054

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

        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

              gt_boxes_list = [
                  tf.constant(
                      np.array([[0.0, 0.0, 0.0, 0.0],
                                [0.0, 0.0, 0.0, 0.0],
                                [0.0, 0.0, 0.0, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1757..1763
        research/object_detection/core/target_assigner_test.py on lines 2048..2054

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

        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

              gt_boxes_list = [
                  tf.constant(
                      np.array([[0.0, 0.0, 0.0, 0.0],
                                [0.0, 0.0, 0.0, 0.0],
                                [0.0, 0.0, 0.0, 0.0],
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 2 hrs to fix
        research/object_detection/core/target_assigner_test.py on lines 1757..1763
        research/object_detection/core/target_assigner_test.py on lines 2008..2014

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

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

            np.testing.assert_array_equal(track_ids,
                                          [[[1, 0, 0], [0, 1, 0]],
                                           [[0, 1, 0], [1, 0, 0]],
                                           [[1, 0, 0], [0, 0, 1]]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2351..2354
        research/object_detection/core/target_assigner_test.py on lines 2398..2401
        research/object_detection/core/target_assigner_test.py on lines 2402..2405

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

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

            np.testing.assert_array_equal(indices,
                                          [[[0, 10, 10], [0, 15, 5]],
                                           [[1, 15, 5], [1, 10, 10]],
                                           [[2, 10, 10], [2, 7, 11]]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2351..2354
        research/object_detection/core/target_assigner_test.py on lines 2355..2358
        research/object_detection/core/target_assigner_test.py on lines 2402..2405

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

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

            np.testing.assert_array_equal(track_ids,
                                          [[[1, 0, 0], [0, 1, 0]],
                                           [[0, 1, 0], [1, 0, 0]],
                                           [[1, 0, 0], [0, 0, 1]]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2351..2354
        research/object_detection/core/target_assigner_test.py on lines 2355..2358
        research/object_detection/core/target_assigner_test.py on lines 2398..2401

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

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

            np.testing.assert_array_equal(indices,
                                          [[[0, 10, 10], [0, 15, 5]],
                                           [[1, 15, 5], [1, 10, 10]],
                                           [[2, 10, 10], [2, 7, 11]]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2355..2358
        research/object_detection/core/target_assigner_test.py on lines 2398..2401
        research/object_detection/core/target_assigner_test.py on lines 2402..2405

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

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

            self.assertAllClose(corner_offsets[1, :, :, 1],
                                [[0, -1, 0, 0],
                                 [0, -1, -1, -2],
                                 [0, 0, -1, -2],
                                 [0, 0, -1, -2]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 1],
                                [[0, 0, 0, 0],
                                 [0, -1, -2, 0],
                                 [0, -1, -2, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[1, :, :, 2],
                                [[1, 1, 0, 0],
                                 [0, 0, 3, 3],
                                 [0, 2, 2, 2],
                                 [0, 1, 1, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 2],
                                [[4, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 0],
                                [[0, 0, 0, 0],
                                 [0, -1, -1, 0],
                                 [0, -2, -2, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 0],
                                [[0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, -3]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 3],
                                [[4, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 2],
                                [[0, 0, 0, 0],
                                 [0, 3, 3, 0],
                                 [0, 2, 2, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[1, :, :, 0],
                                [[0, 0, 0, 0],
                                 [-1, -1, 0, 0],
                                 [0, -1, -1, -1],
                                 [0, -2, -2, -2]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[1, :, :, 3],
                                [[1, 0, 0, 0],
                                 [1, 0, 2, 1],
                                 [0, 3, 2, 1],
                                 [0, 3, 2, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562

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

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

            self.assertAllClose(corner_offsets[0, :, :, 1],
                                [[0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, -3]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2485..2489
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

            self.assertAllClose(corner_offsets[0, :, :, 3],
                                [[0, 0, 0, 0],
                                 [0, 3, 2, 0],
                                 [0, 3, 2, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 11 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2470..2474
        research/object_detection/core/target_assigner_test.py on lines 2475..2479
        research/object_detection/core/target_assigner_test.py on lines 2480..2484
        research/object_detection/core/target_assigner_test.py on lines 2521..2525
        research/object_detection/core/target_assigner_test.py on lines 2526..2530
        research/object_detection/core/target_assigner_test.py on lines 2531..2535
        research/object_detection/core/target_assigner_test.py on lines 2536..2540
        research/object_detection/core/target_assigner_test.py on lines 2548..2552
        research/object_detection/core/target_assigner_test.py on lines 2553..2557
        research/object_detection/core/target_assigner_test.py on lines 2558..2562
        research/object_detection/core/target_assigner_test.py on lines 2563..2567

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_lower_left, self._box_center_small]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2323..2326
        research/object_detection/core/target_assigner_test.py on lines 2364..2367

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_lower_left, self._box_center_small]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1593..1596
        research/object_detection/core/target_assigner_test.py on lines 2323..2326

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_lower_left, self._box_center_small]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1593..1596
        research/object_detection/core/target_assigner_test.py on lines 2364..2367

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

        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

            def graph_fn(batch_match, groundtruth_tensors_list,
                         groundtruth_weights_list, unmatched_value, unmatched_weight):
              targets, weights = targetassigner.batch_get_targets(
                  batch_match, tf.unstack(groundtruth_tensors_list),
                  tf.unstack(groundtruth_weights_list),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 863..869

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

        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

            def graph_fn(batch_match, groundtruth_tensors_list,
                         groundtruth_weights_list, unmatched_value, unmatched_weight):
              targets, weights = targetassigner.batch_get_targets(
                  batch_match, tf.unstack(groundtruth_tensors_list),
                  tf.unstack(groundtruth_weights_list),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 835..841

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

        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

            exp_cls_targets = [[[0, 1], [1, 0]],
                               [[1, 0], [0, 1]],
                               [[0, 0], [0, 0]],
                               [[0, 1], [1, .5]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 369..372

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

        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

            exp_cls_weights = [[[1, 1], [1, 1]],
                               [[1, 1], [1, 1]],
                               [[1, 1], [1, 1]],
                               [[1, 1], [1, 1]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 365..368

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

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

              offset_batch = [
                  tf.constant([self._offset_center, self._offset_lower_left]),
                  tf.constant([self._offset_center_offset]),
                  tf.constant([self._offset_center_small, self._offset_odd_coord]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1566..1569
        research/object_detection/core/target_assigner_test.py on lines 2627..2630
        research/object_detection/core/target_assigner_test.py on lines 2664..2667
        research/object_detection/core/target_assigner_test.py on lines 2670..2673

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_center_offset]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2627..2630
        research/object_detection/core/target_assigner_test.py on lines 2633..2636
        research/object_detection/core/target_assigner_test.py on lines 2664..2667
        research/object_detection/core/target_assigner_test.py on lines 2670..2673

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

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

              offset_batch = [
                  tf.constant([self._offset_center, self._offset_lower_left]),
                  tf.constant([self._offset_center_offset]),
                  tf.constant([self._offset_center_small, self._offset_odd_coord]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1566..1569
        research/object_detection/core/target_assigner_test.py on lines 2627..2630
        research/object_detection/core/target_assigner_test.py on lines 2633..2636
        research/object_detection/core/target_assigner_test.py on lines 2664..2667

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_center_offset]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1566..1569
        research/object_detection/core/target_assigner_test.py on lines 2633..2636
        research/object_detection/core/target_assigner_test.py on lines 2664..2667
        research/object_detection/core/target_assigner_test.py on lines 2670..2673

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

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

              box_batch = [
                  tf.constant([self._box_center, self._box_lower_left]),
                  tf.constant([self._box_center_offset]),
                  tf.constant([self._box_center_small, self._box_odd_coordinates]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1566..1569
        research/object_detection/core/target_assigner_test.py on lines 2627..2630
        research/object_detection/core/target_assigner_test.py on lines 2633..2636
        research/object_detection/core/target_assigner_test.py on lines 2670..2673

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

        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

            groundtruth_labels = np.array([[0, 1, 0, 0, 0, 0, 0],
                                           [0, 0, 0, 0, 0, 1, 0],
                                           [0, 0, 0, 1, 0, 0, 0]], dtype=np.float32)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 312..314

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

        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

            groundtruth_labels = np.array([[0, 1, 0, 0, 0, 0, 0],
                                           [0, 0, 0, 0, 0, 1, 0],
                                           [0, 0, 0, 1, 0, 0, 0]], dtype=np.float32)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 252..254

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

        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

            exp_cls_weights = [[1, 1, 1, 1, 1, 1, 1],
                               [1, 1, 1, 1, 1, 1, 1],
                               [1, 1, 1, 1, 1, 1, 1],
                               [1, 1, 1, 1, 1, 1, 1]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 256..259
        research/object_detection/core/target_assigner_test.py on lines 318..321

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

        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

            exp_cls_weights = [[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
                               [0, 0, 0, 0, 0, 0, 0],
                               [1, 1, 1, 1, 1, 1, 1],
                               [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 256..259
        research/object_detection/core/target_assigner_test.py on lines 260..263

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

        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

            exp_cls_targets = [[0, 1, 0, 0, 0, 0, 0],
                               [0, 0, 0, 0, 0, 1, 0],
                               [1, 0, 0, 0, 0, 0, 0],
                               [0, 0, 0, 1, 0, 0, 0]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 260..263
        research/object_detection/core/target_assigner_test.py on lines 318..321

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

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

            self.assertAllClose(masks[2],
                                [[0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2432..2436
        research/object_detection/core/target_assigner_test.py on lines 2437..2441
        research/object_detection/core/target_assigner_test.py on lines 2464..2468
        research/object_detection/core/target_assigner_test.py on lines 2515..2519
        research/object_detection/core/target_assigner_test.py on lines 2542..2546

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

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

            self.assertAllClose(foreground[0],
                                [[1, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2432..2436
        research/object_detection/core/target_assigner_test.py on lines 2437..2441
        research/object_detection/core/target_assigner_test.py on lines 2443..2447
        research/object_detection/core/target_assigner_test.py on lines 2464..2468
        research/object_detection/core/target_assigner_test.py on lines 2542..2546

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

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

            self.assertAllClose(foreground[0],
                                [[0, 0, 0, 0],
                                 [0, 1, 1, 0],
                                 [0, 1, 1, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2432..2436
        research/object_detection/core/target_assigner_test.py on lines 2437..2441
        research/object_detection/core/target_assigner_test.py on lines 2443..2447
        research/object_detection/core/target_assigner_test.py on lines 2515..2519
        research/object_detection/core/target_assigner_test.py on lines 2542..2546

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

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

            self.assertAllClose(masks[0],
                                [[1, 1, 0, 0],
                                 [1, 1, 0, 0],
                                 [0, 0, 0, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2437..2441
        research/object_detection/core/target_assigner_test.py on lines 2443..2447
        research/object_detection/core/target_assigner_test.py on lines 2464..2468
        research/object_detection/core/target_assigner_test.py on lines 2515..2519
        research/object_detection/core/target_assigner_test.py on lines 2542..2546

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

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

            self.assertAllClose(masks[1],
                                [[0, 0, 1, 0],
                                 [0, 0, 1, 0],
                                 [1, 1, 1, 0],
                                 [0, 0, 0, 0]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2432..2436
        research/object_detection/core/target_assigner_test.py on lines 2443..2447
        research/object_detection/core/target_assigner_test.py on lines 2464..2468
        research/object_detection/core/target_assigner_test.py on lines 2515..2519
        research/object_detection/core/target_assigner_test.py on lines 2542..2546

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

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

            self.assertAllClose(foreground[1],
                                [[1, 1, 0, 0],
                                 [1, 1, 1, 1],
                                 [0, 1, 1, 1],
                                 [0, 1, 1, 1]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 5 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2432..2436
        research/object_detection/core/target_assigner_test.py on lines 2437..2441
        research/object_detection/core/target_assigner_test.py on lines 2443..2447
        research/object_detection/core/target_assigner_test.py on lines 2464..2468
        research/object_detection/core/target_assigner_test.py on lines 2515..2519

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

        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

              gt_dp_num_points_list = [
                  # Example 0.
                  tf.constant([2, 0, 3], dtype=tf.int32),
                  # Example 1.
                  tf.constant([1, 1], dtype=tf.int32),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2167..2171
        research/object_detection/core/target_assigner_test.py on lines 2259..2263

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

        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

              gt_weights_list = [
                  # Example 0.
                  tf.constant([1.0, 1.0, 0.5], dtype=tf.float32),
                  # Example 1.
                  tf.constant([0.0, 1.0], dtype=tf.float32),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2167..2171
        research/object_detection/core/target_assigner_test.py on lines 2221..2225

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

        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

              gt_mask_weights_list = [
                  # Example 0.
                  tf.constant([0.0, 1.0, 1.0], dtype=tf.float32),
                  # Example 1.
                  tf.constant([1.0, 1.0], dtype=tf.float32)
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2221..2225
        research/object_detection/core/target_assigner_test.py on lines 2259..2263

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

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

            np.testing.assert_array_equal(
                indices,
                [[0, 10, 10], [0, 15, 5], [1, 11, 10], [2, 10, 10], [2, 7, 11]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 2653..2655
        research/object_detection/core/target_assigner_test.py on lines 2696..2698

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

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

            np.testing.assert_array_equal(
                indices,
                [[0, 10, 10], [0, 15, 5], [1, 11, 10], [2, 10, 10], [2, 7, 11]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1581..1583
        research/object_detection/core/target_assigner_test.py on lines 2696..2698

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

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

            np.testing.assert_array_equal(
                indices,
                [[0, 10, 10], [0, 15, 5], [1, 11, 10], [2, 10, 10], [2, 7, 11]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1581..1583
        research/object_detection/core/target_assigner_test.py on lines 2653..2655

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

        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

            xmax2 = width + max_dist * np.cos(rng.uniform(0, 2 * np.pi))
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1545..1545

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

        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

            ymax2 = height + max_dist * np.sin(rng.uniform(0, 2 * np.pi))
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 1 hr to fix
        research/object_detection/core/target_assigner_test.py on lines 1544..1544

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

        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

            np.testing.assert_array_equal(
                yx_offset, [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0.25, 0.75]])
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 55 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1616..1617

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

        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

            np.testing.assert_array_equal(
                hw, [[20, 20], [10, 10], [10, 10], [10, 10], [10, 10], [8, 15]])
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 55 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1618..1619

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

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

            prior_means = tf.constant([[0.0, 0.0, 0.5, 0.5],
                                       [0.5, 0.5, 1.0, 0.8],
                                       [0, 0.5, .5, 1.0],
                                       [.75, 0, 1.0, .25]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 4 other locations - About 50 mins to fix
        official/legacy/transformer/transformer_forward_test.py on lines 119..120
        research/object_detection/metrics/oid_challenge_evaluation_utils_test.py on lines 63..63
        research/object_detection/metrics/oid_challenge_evaluation_utils_test.py on lines 66..66
        research/object_detection/metrics/oid_challenge_evaluation_utils_test.py on lines 69..69

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 36.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              weights_batch = [
                  tf.constant([0.0, 1.0]),
                  tf.constant([1.0, 1.0]),
                  tf.constant([0.0, 0.0])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 50 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1600..1603
        research/object_detection/core/target_assigner_test.py on lines 2328..2331
        research/object_detection/core/target_assigner_test.py on lines 2369..2372

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 36.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              weights_batch = [
                  tf.constant([0.0, 1.0]),
                  tf.constant([1.0, 1.0]),
                  tf.constant([0.0, 0.0])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 50 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 2328..2331
        research/object_detection/core/target_assigner_test.py on lines 2369..2372
        research/object_detection/core/target_assigner_test.py on lines 2374..2377

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 36.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              track_id_batch = [
                  tf.constant([0, 1]),
                  tf.constant([1, 0]),
                  tf.constant([0, 2]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 50 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1600..1603
        research/object_detection/core/target_assigner_test.py on lines 2328..2331
        research/object_detection/core/target_assigner_test.py on lines 2374..2377

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 36.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              track_id_batch = [
                  tf.constant([0, 1]),
                  tf.constant([1, 0]),
                  tf.constant([0, 2]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 50 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1600..1603
        research/object_detection/core/target_assigner_test.py on lines 2369..2372
        research/object_detection/core/target_assigner_test.py on lines 2374..2377

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 36.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              weights_batch = [
                  tf.constant([1.0, 0.0]),
                  tf.constant([1.0]),
                  tf.constant([1.0, 1.0])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 45 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 2639..2642
        research/object_detection/core/target_assigner_test.py on lines 2676..2679

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

        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

              match_flag_batch = [
                  tf.constant([0.0, 1.0]),
                  tf.constant([1.0]),
                  tf.constant([1.0, 1.0]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 45 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 2639..2642
        research/object_detection/core/target_assigner_test.py on lines 2683..2686

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

        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

              match_flag_batch = [
                  tf.constant([1.0, 1.0]),
                  tf.constant([1.0]),
                  tf.constant([1.0, 1.0]),
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 2 other locations - About 45 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 2676..2679
        research/object_detection/core/target_assigner_test.py on lines 2683..2686

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

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

            exp_cls_weights = [[[1], [1], [1], [1]],
                               [[1], [1], [1], [1]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 530..531
        research/object_detection/core/target_assigner_test.py on lines 966..967
        research/object_detection/core/target_assigner_test.py on lines 968..969

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

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

            exp_cls_targets = [[[1], [0], [0], [0]],
                               [[0], [1], [1], [0]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 532..533
        research/object_detection/core/target_assigner_test.py on lines 966..967
        research/object_detection/core/target_assigner_test.py on lines 968..969

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

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

            exp_cls_weights = [[[1], [0.5], [0.5], [0.5]],
                               [[0.5], [1], [1], [0.5]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 530..531
        research/object_detection/core/target_assigner_test.py on lines 532..533
        research/object_detection/core/target_assigner_test.py on lines 966..967

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

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

            exp_cls_targets = [[[1], [0], [0], [0]],
                               [[0], [1], [1], [0]]]
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 530..531
        research/object_detection/core/target_assigner_test.py on lines 532..533
        research/object_detection/core/target_assigner_test.py on lines 968..969

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

        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

              box_batch = [tf.constant([self._box_center, self._box_lower_left]),
                           tf.constant([self._box_lower_left, self._box_center])]
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1719..1720

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

        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

              box_batch = [tf.constant([self._box_center, self._box_lower_left]),
                           tf.constant([self._box_lower_left, self._box_center])]
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 40 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1695..1696

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

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

            np.testing.assert_array_almost_equal(
                temporal_offset,
                [[0.5, 0.4], [-0.1, 0.1], [0.4, 0.3], [0.1, 0.1], [0.125, -0.125]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 35 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1584..1585
        research/object_detection/core/target_assigner_test.py on lines 1586..1587
        research/object_detection/core/target_assigner_test.py on lines 2656..2658

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

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

            np.testing.assert_array_almost_equal(
                temporal_offset,
                [[0.5, 0.4], [-0.1, 0.1], [0.4, 0.3], [0.1, 0.1], [0.125, -0.125]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 35 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1584..1585
        research/object_detection/core/target_assigner_test.py on lines 1586..1587
        research/object_detection/core/target_assigner_test.py on lines 2699..2701

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

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

            np.testing.assert_array_equal(
                hw, [[20, 20], [10, 10], [18, 19], [10, 10], [8, 15]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 35 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1586..1587
        research/object_detection/core/target_assigner_test.py on lines 2656..2658
        research/object_detection/core/target_assigner_test.py on lines 2699..2701

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

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

            np.testing.assert_array_equal(
                yx_offset, [[0, 0], [0, 0], [0, 0.5], [0, 0], [0.25, 0.75]])
        Severity: Major
        Found in research/object_detection/core/target_assigner_test.py and 3 other locations - About 35 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1584..1585
        research/object_detection/core/target_assigner_test.py on lines 2656..2658
        research/object_detection/core/target_assigner_test.py on lines 2699..2701

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

        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

              (indices, depths, weights) = cn_assigner.assign_keypoints_depth_targets(
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 30 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1874..1874

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

        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

              (indices, depths, weights) = cn_assigner.assign_keypoints_depth_targets(
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 30 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1932..1932

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

        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

            ymin2 = max_dist * np.sin(rng.uniform(0, 2 * np.pi))
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 30 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1542..1542

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

        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

            xmin2 = max_dist * np.cos(rng.uniform(0, 2 * np.pi))
        Severity: Minor
        Found in research/object_detection/core/target_assigner_test.py and 1 other location - About 30 mins to fix
        research/object_detection/core/target_assigner_test.py on lines 1543..1543

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

        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