tensorflow/tensorflow

View on GitHub
tensorflow/python/training/input_test.py

Summary

Maintainability
F
1 mo
Test Coverage

File input_test.py has 2078 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2015 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/training/input_test.py - About 5 days to fix

    BatchTest has 32 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BatchTest(test_lib.TestCase):
    
      def _testOneThreadHelper(self, use_dict):
        with ops.Graph().as_default(), self.cached_session():
          batch_size = 10
    Severity: Minor
    Found in tensorflow/python/training/input_test.py - About 4 hrs to fix

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

      class BatchJoinTest(test_lib.TestCase):
      
        def _testTwoThreadsHelper(self, use_dict):
          with ops.Graph().as_default(), self.cached_session():
            # Two threads, the first generates (0..69, "a").
      Severity: Minor
      Found in tensorflow/python/training/input_test.py - About 2 hrs to fix

        ShuffleBatchTest has 21 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class ShuffleBatchTest(test_lib.TestCase):
        
          def _testOneThreadHelper(self, use_dict):
            with ops.Graph().as_default(), self.cached_session():
              batch_size = 10
        Severity: Minor
        Found in tensorflow/python/training/input_test.py - About 2 hrs to fix

          Function testTwoThreadsDynamicPadSmallerBatch has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

            def testTwoThreadsDynamicPadSmallerBatch(self):
              with ops.Graph().as_default(), self.cached_session():
                extra_elements = 2
                # Two threads, the first generates (0..69, ["a"] * 1..70).
                num_a = 70 + extra_elements
          Severity: Minor
          Found in tensorflow/python/training/input_test.py - About 2 hrs 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 testTwoThreadsDynamicPad has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

            def testTwoThreadsDynamicPad(self):
              with ops.Graph().as_default(), self.cached_session():
                # Two threads, the first generates (0..69, ["a"] * 1..70).
                num_a = 70
                zero64 = constant_op.constant(0, dtype=dtypes.int64)
          Severity: Minor
          Found in tensorflow/python/training/input_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 _testTwoThreadsHelper has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

            def _testTwoThreadsHelper(self, use_dict):
              with ops.Graph().as_default(), self.cached_session():
                # Two threads, the first generates (0..69, "a").
                num_a = 70
                zero64 = constant_op.constant(0, dtype=dtypes.int64)
          Severity: Minor
          Found in tensorflow/python/training/input_test.py - About 45 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

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

            def _testTwoThreadsHelper(self, use_dict):
              with ops.Graph().as_default(), self.cached_session():
                # Two threads, the first generates (0..24, "a").
                num_a = 25
                zero64 = constant_op.constant(0, dtype=dtypes.int64)
          Severity: Minor
          Found in tensorflow/python/training/input_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

          Function testTwoThreadsSmallerBatch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            def testTwoThreadsSmallerBatch(self):
              with ops.Graph().as_default(), self.cached_session():
                extra_elements = 2
                # Two threads, the first generates (0..69, "a").
                num_a = 70 + extra_elements
          Severity: Minor
          Found in tensorflow/python/training/input_test.py - About 25 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

          Function testTwoThreadsSmallerBatch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            def testTwoThreadsSmallerBatch(self):
              with ops.Graph().as_default(), self.cached_session():
                # Two threads, the first generates (0..26, "a").
                extra_elements = 2
                num_a = 25 + extra_elements
          Severity: Minor
          Found in tensorflow/python/training/input_test.py - About 25 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

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  self.assertEqual(len(results[2]), batch_size)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 3 days to fix
          tensorflow/python/training/input_test.py on lines 2222..2240

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

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

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

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

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

          Refactorings

          Further Reading

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  self.assertEqual(len(results[2]), batch_size)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 3 days to fix
          tensorflow/python/training/input_test.py on lines 1254..1272

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

          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(num_batches):
                  results = self.evaluate(batched)
                  self.assertAllEqual(results[0],
                                      np.arange(i * batch_size, (i + 1) * batch_size))
                  self.assertAllEqual(
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 days to fix
          tensorflow/python/training/input_test.py on lines 477..491

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

          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(num_batches):
                  results = self.evaluate(batched_fetch)
                  self.assertAllEqual(results[0],
                                      np.arange(i * batch_size, (i + 1) * batch_size))
                  self.assertAllEqual(
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 days to fix
          tensorflow/python/training/input_test.py on lines 659..673

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

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

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

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

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

          Refactorings

          Further Reading

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  self.assertAllEqual(results[0], results[1].values)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 718..728

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

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

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

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

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

          Refactorings

          Further Reading

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  self.assertAllEqual(results[0], results[1].values)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 618..628

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

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

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

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

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

          Refactorings

          Further Reading

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  all_counts.extend(results[0])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 1829..1839

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

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

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

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

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

          Refactorings

          Further Reading

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

                for i in range(num_batches):
                  results = self.evaluate(batched)
                  tf_logging.info("Batch %d: %s", i, results[0])
                  self.assertEqual(len(results[0]), batch_size)
                  all_counts.extend(results[0])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 1778..1788

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

          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(num_batches):
                  results = self.evaluate(batched_fetch)
                  self.assertEqual(len(results[0]), batch_size)
                  all_counts.extend(results[0])
                  self.assertAllEqual(
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 1724..1733

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

          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 _ in range(num_batches):
                  results = self.evaluate(batched_fetch)
                  self.assertEqual(len(results[0]), batch_size)
                  all_counts.extend(results[0])
                  self.assertAllEqual(
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 1668..1677

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

          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 testUint64DataTypes(self):
              with ops.Graph().as_default():
                values = constant_op.constant([0, 1, 2, 3, 4, 5], dtype=dtypes.uint64)
                batched = inp.batch([values], batch_size=2)
                with self.cached_session() as sess:
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 505..515

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

          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 testUint32DataTypes(self):
              with ops.Graph().as_default():
                values = constant_op.constant([0, 1, 2, 3, 4, 5], dtype=dtypes.uint32)
                batched = inp.batch([values], batch_size=2)
                with self.cached_session() as sess:
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 day to fix
          tensorflow/python/training/input_test.py on lines 517..527

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

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

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

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

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

          Refactorings

          Further Reading

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

                for _ in range(num_batches):
                  results = self.evaluate(batched)
                  self.assertAllEqual([0] * batch_size, np.mod(results[0], 2))
                  self.assertAllEqual([0] * batch_size, np.mod(results[1].values, 2))
                  self.assertAllEqual([b"string"] * batch_size, results[2])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 6 hrs to fix
          tensorflow/python/training/input_test.py on lines 1467..1475
          tensorflow/python/training/input_test.py on lines 1910..1914
          tensorflow/python/training/input_test.py on lines 2345..2349

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

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

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

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

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

          Refactorings

          Further Reading

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

                for _ in range(num_batches):
                  results = self.evaluate(batched)
                  self.assertAllEqual([0] * batch_size, np.mod(results[0], 2))
                  self.assertAllEqual([0] * batch_size, np.mod(results[1].values, 2))
                  self.assertAllEqual([b"string"] * batch_size, results[2])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 6 hrs to fix
          tensorflow/python/training/input_test.py on lines 842..846
          tensorflow/python/training/input_test.py on lines 1467..1475
          tensorflow/python/training/input_test.py on lines 2345..2349

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

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

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

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

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

          Refactorings

          Further Reading

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

                for _ in range(num_batches):
                  results = self.evaluate(batched)
                  self.assertAllEqual(
                      [0] * batch_size,
                      np.mod(results[0], 2),)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 6 hrs to fix
          tensorflow/python/training/input_test.py on lines 842..846
          tensorflow/python/training/input_test.py on lines 1910..1914
          tensorflow/python/training/input_test.py on lines 2345..2349

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

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

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

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

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

          Refactorings

          Further Reading

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

                for _ in range(num_batches):
                  results = self.evaluate(batched)
                  self.assertAllEqual([0] * batch_size, np.mod(results[0], 2))
                  self.assertAllEqual([0] * batch_size, np.mod(results[1].values, 2))
                  self.assertAllEqual([b"string"] * batch_size, results[2])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 6 hrs to fix
          tensorflow/python/training/input_test.py on lines 842..846
          tensorflow/python/training/input_test.py on lines 1467..1475
          tensorflow/python/training/input_test.py on lines 1910..1914

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

          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

                  for s in results[1]:
                    if s[0] == b"b":
                      self.assertAllEqual(s, [b"b"] * 99)
                    else:
                      count_string_a.append(sum(x == b"a" for x in s))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 4 hrs to fix
          tensorflow/python/training/input_test.py on lines 1172..1176
          tensorflow/python/training/input_test.py on lines 1376..1380

          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

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

                  for s in results[1]:
                    if s[0] == b"b":
                      self.assertAllEqual(s, [b"b"] * 99)
                    else:
                      count_string_a.append(sum(x == b"a" for x in s))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 4 hrs to fix
          tensorflow/python/training/input_test.py on lines 1356..1360
          tensorflow/python/training/input_test.py on lines 1376..1380

          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

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

                for s in results[1]:
                  if s[0] == b"b":
                    self.assertAllEqual(s, [b"b"] * 99)
                  else:
                    count_string_a.append(sum(x == b"a" for x in s))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 4 hrs to fix
          tensorflow/python/training/input_test.py on lines 1172..1176
          tensorflow/python/training/input_test.py on lines 1356..1360

          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

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(
                        array_ops_stack.stack([zero64, zero64 + 1]), [2, 1]),
                    values=math_ops.cast(
                        array_ops_stack.stack([counter, -counter]), dtypes.float32),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 3 hrs to fix
          tensorflow/python/training/input_test.py on lines 454..459

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

          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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(
                        array_ops_stack.stack([zero64, zero64 + 1]), [2, 1]),
                    values=math_ops.cast(
                        array_ops_stack.stack([counter, -counter]), dtypes.float32),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 3 hrs to fix
          tensorflow/python/training/input_test.py on lines 645..650

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

          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

                with self.cached_session():
                  coord = coordinator.Coordinator()
                  threads = queue_runner_impl.start_queue_runners(coord=coord)
          
                  batched_np = self.evaluate(batched)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 985..993

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

          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

                with self.cached_session():
                  coord = coordinator.Coordinator()
                  threads = queue_runner_impl.start_queue_runners(coord=coord)
          
                  batched_np = self.evaluate(batched)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1614..1622

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

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

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

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

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

          Refactorings

          Further Reading

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.zeros(
                        [1, 1], dtype=dtypes.int64),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1447..1452
          tensorflow/python/training/input_test.py on lines 1887..1892
          tensorflow/python/training/input_test.py on lines 2323..2328

          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

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.zeros(
                        [1, 1], dtype=dtypes.int64),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 821..826
          tensorflow/python/training/input_test.py on lines 1887..1892
          tensorflow/python/training/input_test.py on lines 2323..2328

          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

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.zeros(
                        [1, 1], dtype=dtypes.int64),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 821..826
          tensorflow/python/training/input_test.py on lines 1447..1452
          tensorflow/python/training/input_test.py on lines 2323..2328

          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

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.zeros(
                        [1, 1], dtype=dtypes.int64),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 821..826
          tensorflow/python/training/input_test.py on lines 1447..1452
          tensorflow/python/training/input_test.py on lines 1887..1892

          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

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

                self.assertAllEqual(results[1].indices,
                                    np.vstack((np.arange(2 * extra_elements),
                                               np.zeros(2 * extra_elements))).T)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1280..1282

          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

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

                self.assertAllEqual(results[1].indices,
                                    np.vstack((np.arange(2 * extra_elements),
                                               np.zeros(2 * extra_elements))).T)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 2248..2250

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

                deltas = [
                    all_counts[i + 1] - all_counts[i] for i in range(len(all_counts) - 1)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1742..1743
          tensorflow/python/training/input_test.py on lines 1790..1791
          tensorflow/python/training/input_test.py on lines 1849..1850
          tensorflow/python/training/input_test.py on lines 2153..2153
          tensorflow/python/training/input_test.py on lines 2264..2264

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

          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

                deltas = [
                    all_counts[i + 1] - all_counts[i] for i in range(len(all_counts) - 1)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1679..1680
          tensorflow/python/training/input_test.py on lines 1742..1743
          tensorflow/python/training/input_test.py on lines 1849..1850
          tensorflow/python/training/input_test.py on lines 2153..2153
          tensorflow/python/training/input_test.py on lines 2264..2264

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

          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

                deltas = [all_a[i + 1] - all_a[i] for i in range(len(all_a) - 1)]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1679..1680
          tensorflow/python/training/input_test.py on lines 1742..1743
          tensorflow/python/training/input_test.py on lines 1790..1791
          tensorflow/python/training/input_test.py on lines 1849..1850
          tensorflow/python/training/input_test.py on lines 2153..2153

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

          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

                deltas = [
                    all_counts[i + 1] - all_counts[i] for i in range(len(all_counts) - 1)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1679..1680
          tensorflow/python/training/input_test.py on lines 1742..1743
          tensorflow/python/training/input_test.py on lines 1790..1791
          tensorflow/python/training/input_test.py on lines 2153..2153
          tensorflow/python/training/input_test.py on lines 2264..2264

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

          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

                deltas = [all_a[i + 1] - all_a[i] for i in range(len(all_a) - 1)]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1679..1680
          tensorflow/python/training/input_test.py on lines 1742..1743
          tensorflow/python/training/input_test.py on lines 1790..1791
          tensorflow/python/training/input_test.py on lines 1849..1850
          tensorflow/python/training/input_test.py on lines 2264..2264

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

          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

                deltas = [
                    all_counts[i + 1] - all_counts[i] for i in range(len(all_counts) - 1)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 2 hrs to fix
          tensorflow/python/training/input_test.py on lines 1679..1680
          tensorflow/python/training/input_test.py on lines 1790..1791
          tensorflow/python/training/input_test.py on lines 1849..1850
          tensorflow/python/training/input_test.py on lines 2153..2153
          tensorflow/python/training/input_test.py on lines 2264..2264

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

          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

                for key in expected:
                  value = frequency[key]
                  self.assertGreater(value, expected_frequency - margin)
                  self.assertLess(value, expected_frequency + margin)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 317..320
          tensorflow/python/training/input_test.py on lines 396..399

          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

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

                for key in expected:
                  value = frequency[key]
                  self.assertGreater(value, expected_frequency - margin)
                  self.assertLess(value, expected_frequency + margin)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 201..204
          tensorflow/python/training/input_test.py on lines 396..399

          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

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

                for key in expected:
                  value = frequency[key]
                  self.assertGreater(value, expected_frequency - margin)
                  self.assertLess(value, expected_frequency + margin)
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 2 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 201..204
          tensorflow/python/training/input_test.py on lines 317..320

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_ninety_nine = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(ninety_nine, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_ninety_nine = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(ninety_nine, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_ninety_nine = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(ninety_nine, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_ninety_nine = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(ninety_nine, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 604..608
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse_counter = sparse_tensor.SparseTensor(
                    indices=array_ops.reshape(zero64, [1, 1]),
                    values=array_ops_stack.stack(
                        [math_ops.cast(counter, dtypes.float32)]),
                    dense_shape=[1])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 14 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 567..571
          tensorflow/python/training/input_test.py on lines 703..707
          tensorflow/python/training/input_test.py on lines 1009..1013
          tensorflow/python/training/input_test.py on lines 1020..1024
          tensorflow/python/training/input_test.py on lines 1212..1216
          tensorflow/python/training/input_test.py on lines 1223..1227
          tensorflow/python/training/input_test.py on lines 1638..1642
          tensorflow/python/training/input_test.py on lines 1706..1710
          tensorflow/python/training/input_test.py on lines 1761..1765
          tensorflow/python/training/input_test.py on lines 1811..1815
          tensorflow/python/training/input_test.py on lines 2063..2067
          tensorflow/python/training/input_test.py on lines 2074..2078
          tensorflow/python/training/input_test.py on lines 2177..2181
          tensorflow/python/training/input_test.py on lines 2188..2192

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

                sparse = sparse_tensor.SparseTensor(
                    indices=[[0, 1], [0, 2], [1, 0], [1, 3]],
                    dense_shape=[2, 4],
                    values=[5, 4, 7, 2])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 975..978

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

          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

                sparse_t = sparse_tensor.SparseTensor(
                    indices=[[0, 1], [0, 2], [1, 0], [1, 3]],
                    dense_shape=[2, 4],
                    values=[5, 4, 7, 2])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 1 other location - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1604..1607

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2463..2466
          tensorflow/python/training/input_test.py on lines 2478..2481

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

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

                sparse = sparse_tensor.SparseTensor(
                    indices=array_ops.placeholder(dtypes.int64),
                    values=array_ops.placeholder(dtypes.float32),
                    dense_shape=array_ops.placeholder(dtypes.int64))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 13 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 791..794
          tensorflow/python/training/input_test.py on lines 801..804
          tensorflow/python/training/input_test.py on lines 939..942
          tensorflow/python/training/input_test.py on lines 949..952
          tensorflow/python/training/input_test.py on lines 962..965
          tensorflow/python/training/input_test.py on lines 1568..1571
          tensorflow/python/training/input_test.py on lines 1578..1581
          tensorflow/python/training/input_test.py on lines 1591..1594
          tensorflow/python/training/input_test.py on lines 2016..2019
          tensorflow/python/training/input_test.py on lines 2026..2029
          tensorflow/python/training/input_test.py on lines 2041..2044
          tensorflow/python/training/input_test.py on lines 2453..2456
          tensorflow/python/training/input_test.py on lines 2478..2481

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

          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

                which_b = [i for i, s in enumerate(results[1]) if s[0] == b"b"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1177..1177
          tensorflow/python/training/input_test.py on lines 1178..1178
          tensorflow/python/training/input_test.py on lines 1361..1361
          tensorflow/python/training/input_test.py on lines 1362..1362
          tensorflow/python/training/input_test.py on lines 1381..1381

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

          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

                  which_b = [i for i, s in enumerate(results[1]) if s[0] == b"b"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1177..1177
          tensorflow/python/training/input_test.py on lines 1361..1361
          tensorflow/python/training/input_test.py on lines 1362..1362
          tensorflow/python/training/input_test.py on lines 1381..1381
          tensorflow/python/training/input_test.py on lines 1382..1382

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

          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

                  which_a = [i for i, s in enumerate(results[1]) if s[0] == b"a"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1177..1177
          tensorflow/python/training/input_test.py on lines 1178..1178
          tensorflow/python/training/input_test.py on lines 1362..1362
          tensorflow/python/training/input_test.py on lines 1381..1381
          tensorflow/python/training/input_test.py on lines 1382..1382

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

          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

                  which_b = [i for i, s in enumerate(results[1]) if s[0] == b"b"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1177..1177
          tensorflow/python/training/input_test.py on lines 1178..1178
          tensorflow/python/training/input_test.py on lines 1361..1361
          tensorflow/python/training/input_test.py on lines 1381..1381
          tensorflow/python/training/input_test.py on lines 1382..1382

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

          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

                  which_a = [i for i, s in enumerate(results[1]) if s[0] == b"a"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1178..1178
          tensorflow/python/training/input_test.py on lines 1361..1361
          tensorflow/python/training/input_test.py on lines 1362..1362
          tensorflow/python/training/input_test.py on lines 1381..1381
          tensorflow/python/training/input_test.py on lines 1382..1382

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

          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

                which_a = [i for i, s in enumerate(results[1]) if s[0] == b"a"]
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1177..1177
          tensorflow/python/training/input_test.py on lines 1178..1178
          tensorflow/python/training/input_test.py on lines 1361..1361
          tensorflow/python/training/input_test.py on lines 1362..1362
          tensorflow/python/training/input_test.py on lines 1382..1382

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

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

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

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

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

          Refactorings

          Further Reading

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

                self.assertProtoEquals(
                    "s: 'SHARED_NAME_XYZ'",
                    batched[0].op.inputs[0].op.node_def.attr["shared_name"])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 1425..1427
          tensorflow/python/training/input_test.py on lines 1876..1878
          tensorflow/python/training/input_test.py on lines 2312..2314

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

                self.assertProtoEquals(
                    "s: 'SHARED_NAME_XYZ'",
                    batched[0].op.inputs[0].op.node_def.attr["shared_name"])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 763..765
          tensorflow/python/training/input_test.py on lines 1425..1427
          tensorflow/python/training/input_test.py on lines 1876..1878

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

                self.assertProtoEquals(
                    "s: 'SHARED_NAME_XYZ'",
                    batched[0].op.inputs[0].op.node_def.attr["shared_name"])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 763..765
          tensorflow/python/training/input_test.py on lines 1425..1427
          tensorflow/python/training/input_test.py on lines 2312..2314

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

                self.assertProtoEquals(
                    "s: 'SHARED_NAME_XYZ'",
                    batched[0].op.inputs[0].op.node_def.attr["shared_name"])
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 3 other locations - About 1 hr to fix
          tensorflow/python/training/input_test.py on lines 763..765
          tensorflow/python/training/input_test.py on lines 1876..1878
          tensorflow/python/training/input_test.py on lines 2312..2314

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

                a = array_ops.tile(
                    ["a"],
                    math_ops.cast(array_ops_stack.stack([counter + 1]), dtypes.int32))
          Severity: Minor
          Found in tensorflow/python/training/input_test.py and 1 other location - About 55 mins to fix
          tensorflow/python/training/input_test.py on lines 1141..1143

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

                a = array_ops.tile(
                    ["a"],
                    math_ops.cast(array_ops_stack.stack([counter + 1]), dtypes.int32))
          Severity: Minor
          Found in tensorflow/python/training/input_test.py and 1 other location - About 55 mins to fix
          tensorflow/python/training/input_test.py on lines 1324..1326

          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

              additional = [
                  os.path.join(self.get_temp_dir(), "match_filenames.%d" % i)
                  for i in range(3)
          Severity: Minor
          Found in tensorflow/python/training/input_test.py and 1 other location - About 50 mins to fix
          tensorflow/python/data/kernel_tests/ignore_errors_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 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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1682..1682
          tensorflow/python/training/input_test.py on lines 1793..1793
          tensorflow/python/training/input_test.py on lines 1852..1852
          tensorflow/python/training/input_test.py on lines 2154..2154
          tensorflow/python/training/input_test.py on lines 2265..2265

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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1682..1682
          tensorflow/python/training/input_test.py on lines 1745..1745
          tensorflow/python/training/input_test.py on lines 1793..1793
          tensorflow/python/training/input_test.py on lines 1852..1852
          tensorflow/python/training/input_test.py on lines 2154..2154

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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1745..1745
          tensorflow/python/training/input_test.py on lines 1793..1793
          tensorflow/python/training/input_test.py on lines 1852..1852
          tensorflow/python/training/input_test.py on lines 2154..2154
          tensorflow/python/training/input_test.py on lines 2265..2265

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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1682..1682
          tensorflow/python/training/input_test.py on lines 1745..1745
          tensorflow/python/training/input_test.py on lines 1852..1852
          tensorflow/python/training/input_test.py on lines 2154..2154
          tensorflow/python/training/input_test.py on lines 2265..2265

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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1682..1682
          tensorflow/python/training/input_test.py on lines 1745..1745
          tensorflow/python/training/input_test.py on lines 1793..1793
          tensorflow/python/training/input_test.py on lines 1852..1852
          tensorflow/python/training/input_test.py on lines 2265..2265

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

                self.assertFalse(all(d == deltas[0] for d in deltas))
          Severity: Major
          Found in tensorflow/python/training/input_test.py and 5 other locations - About 35 mins to fix
          tensorflow/python/training/input_test.py on lines 1682..1682
          tensorflow/python/training/input_test.py on lines 1745..1745
          tensorflow/python/training/input_test.py on lines 1793..1793
          tensorflow/python/training/input_test.py on lines 2154..2154
          tensorflow/python/training/input_test.py on lines 2265..2265

          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

          There are no issues that match your filters.

          Category
          Status