tensorflow/tensorflow

View on GitHub
tensorflow/python/data/kernel_tests/snapshot_test.py

Summary

Maintainability
F
2 wks
Test Coverage

File snapshot_test.py has 1020 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2019 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 tensorflow/python/data/kernel_tests/snapshot_test.py - About 2 days to fix

    LegacySnapshotTest has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class LegacySnapshotTest(tf_record_test_base.TFRecordTestBase,
                             parameterized.TestCase):
    
      def setUp(self):
        super(LegacySnapshotTest, self).setUp()
    Severity: Minor
    Found in tensorflow/python/data/kernel_tests/snapshot_test.py - About 3 hrs to fix

      SnapshotTest has 25 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class SnapshotTest(tf_record_test_base.TFRecordTestBase,
                         parameterized.TestCase):
      
        def setUp(self):
          super(SnapshotTest, self).setUp()
      Severity: Minor
      Found in tensorflow/python/data/kernel_tests/snapshot_test.py - About 2 hrs to fix

        Function assertSnapshotDirectoryContains has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

          def assertSnapshotDirectoryContains(self, directory, num_fingerprints,
                                              num_runs_per_fingerprint,
                                              num_snapshot_shards_per_run):
        
            # Ignore the graphdef pbtxts we write for debugging purposes and temporary
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function testCheckpointBeforeOneEpochThenRunFewStepsSmallShardMultiThread has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

          def testCheckpointBeforeOneEpochThenRunFewStepsSmallShardMultiThread(
              self, pending_snapshot_expiry_seconds):
            ds_fn = self._build_snapshot_dataset(
                pending_snapshot_expiry_seconds=pending_snapshot_expiry_seconds,
                shard_size_bytes=100)
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function assertSnapshotDirectoryContains has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          def assertSnapshotDirectoryContains(self, directory, num_fingerprints,
                                              num_runs_per_fp, num_snapshot_files):
            # Ignore the graphdef pbtxts we write for debugging purposes and temporary
            # files that are an artifact of how TF writes files.
            dirlist = listdir_and_filter(
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py - About 35 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

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

          @combinations.generate(test_base.default_test_combinations())
          def testWriteSnapshotDatasetMultipleFingerprints(self):
            dataset1 = dataset_ops.Dataset.range(1000)
            dataset1 = dataset1.snapshot(path=self._snapshot_dir)
            self.assertDatasetProduces(dataset1, list(range(1000)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 day to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 294..307

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

        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

          @combinations.generate(test_base.default_test_combinations())
          def testWriteSnapshotDatasetSameFingerprintMultipleCompleteRuns(self):
            dataset1 = dataset_ops.Dataset.range(1000)
            dataset1 = dataset1.snapshot(path=self._snapshot_dir)
            self.assertDatasetProduces(dataset1, list(range(1000)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 day to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 278..292

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

        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

          @combinations.generate(test_base.default_test_combinations())
          def testForceWriteMode(self):
            tmpdir = self.snapshot_dir
        
            dataset = dataset_ops.Dataset.range(10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 621..631

        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

          @combinations.generate(test_base.default_test_combinations())
          def testForcePassthroughMode(self):
            tmpdir = self.snapshot_dir
        
            dataset = dataset_ops.Dataset.range(10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 633..643

        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

          @combinations.generate(test_base.default_test_combinations())
          def testCheckpointBeforeOneEpochThenRunAFewSteps(self):
            ds_fn = self._build_snapshot_dataset(repeat=False)
            outputs = self.gen_outputs(
                ds_fn, [10], 20, verify_exhausted=False, save_checkpoint_at_end=False)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1206..1225

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

        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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(pending_snapshot_expiry_seconds=[None, 1])))
          def testCheckpointBeforeOneEpochThenRunFewSteps(
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1065..1075

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

        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

          @combinations.generate(test_base.default_test_combinations())
          def testCheckpointBeforeEpochEndNoRepeat(self):
            ds_fn = self._build_snapshot_dataset(repeat=False)
            outputs = self.gen_outputs(ds_fn, [], 50, verify_exhausted=False)
            self.assertSequenceEqual(outputs, range(50))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1147..1159

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

        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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(pending_snapshot_expiry_seconds=[None, 1])))
          def testSnapshotBeforeEpochEnd(self, pending_snapshot_expiry_seconds):
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1039..1046

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

        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

            self.assertSequenceEqual(
                outputs,
                list(range(100)) + list(range(10)) + list(range(10, 100)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1107..1109

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 47.

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

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

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

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

        Refactorings

        Further Reading

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

            self.assertSequenceEqual(
                outputs,
                list(range(100)) + list(range(10)) + list(range(10, 100)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1089..1091

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 47.

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

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

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

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

        Refactorings

        Further Reading

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

            for i in range(500, 1000):
              self.assertEqual(i, self.evaluate(next1()))
              self.assertEqual(i, self.evaluate(next2()))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 515..517

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 47.

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

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

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

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

        Refactorings

        Further Reading

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

            for i in range(0, 1000):
              self.assertEqual(i, self.evaluate(next1()))
              self.assertEqual(i, self.evaluate(next2()))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 323..325

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 47.

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

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

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

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

        Refactorings

        Further Reading

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

            self.assertSequenceEqual(
                outputs, (list(range(1000)) + list(range(100)) + list(range(900))))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1267..1269
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1288..1290

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

            self.assertSequenceEqual(
                outputs,
                list(range(1000)) + list(range(100)) + list(range(900)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1288..1290
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1296..1297

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

            self.assertSequenceEqual(
                outputs,
                list(range(1000)) + list(range(100)) + list(range(100)))
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1267..1269
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1296..1297

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 100)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 50)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 50)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 100)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 100)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 100)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

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

            expected_after = [
                b"cord %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 10)
                for r in range(0, 10)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 814..817
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994

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

            expected = [
                b"Record %d of file %d" % (r, f)  # pylint:disable=g-complex-comprehension
                for f in range(0, 5)
                for r in range(0, 500)
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 11 other locations - About 55 mins to fix
        tensorflow/python/data/experimental/kernel_tests/service/dynamic_sharding_test.py on lines 440..443
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 133..136
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 157..160
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 176..179
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 202..205
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 703..706
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 728..731
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 764..767
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 861..864
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 991..994
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1009..1012

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 559..564
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 577..582
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 692..697
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 803..808
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 960..965

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 542..547
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 577..582
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 692..697
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 803..808
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 960..965

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 542..547
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 559..564
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 577..582
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 803..808
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 960..965

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 542..547
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 559..564
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 577..582
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 692..697
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 803..808

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 542..547
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 559..564
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 577..582
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 692..697
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 960..965

        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

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

          @combinations.generate(
              combinations.times(
                  test_base.default_test_combinations(),
                  combinations.combine(compression=[
                      snapshot.COMPRESSION_NONE, snapshot.COMPRESSION_GZIP,
        Severity: Major
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 5 other locations - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 542..547
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 559..564
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 692..697
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 803..808
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 960..965

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 36.

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

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

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

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

        Refactorings

        Further Reading

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

          def setUpTFRecord(self, num_files=10, num_records=10):
            self._num_files = num_files
            self._num_records = num_records
            self._filenames = self._createFiles()
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 65..68

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 36.

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

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

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

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

        Refactorings

        Further Reading

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

            dataset = dataset.apply(
                snapshot.legacy_snapshot(
                    tmpdir,
                    shard_size_bytes=1024 * 1024,
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 836..839

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 36.

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

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

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

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

        Refactorings

        Further Reading

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

            dataset2 = dataset2.apply(
                snapshot.legacy_snapshot(
                    tmpdir,
                    shard_size_bytes=1024 * 1024,
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 822..825

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 36.

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

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

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

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

        Refactorings

        Further Reading

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

          def createTFRecords(self, num_files=10, num_records=100):
            self._num_files = num_files
            self._num_records = num_records
            self._filenames = self._createFiles()
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 50 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 455..458

        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

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

            dirlist = listdir_and_filter(
                directory, lambda p: not (is_graphdef_file(p) or is_temp_file(p)))
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 35 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 93..94

        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

            dirlist = listdir_and_filter(
                directory, lambda p: not (is_graphdef_file(p) or is_temp_file(p)))
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 1 other location - About 35 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 467..468

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

            self.assertSequenceEqual(outputs, list(range(1000)) + list(range(100)))
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 30 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1083..1083
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1100..1100

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

            self.assertSequenceEqual(outputs, list(range(100)) + list(range(20)))
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 30 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1083..1083
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1260..1260

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

            self.assertSequenceEqual(outputs, list(range(100)) + list(range(10)))
        Severity: Minor
        Found in tensorflow/python/data/kernel_tests/snapshot_test.py and 2 other locations - About 30 mins to fix
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1100..1100
        tensorflow/python/data/kernel_tests/snapshot_test.py on lines 1260..1260

        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