tensorflow/tensorflow

View on GitHub
tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py

Summary

Maintainability
F
3 wks
Test Coverage

File sql_dataset_test.py has 469 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Minor
Found in tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py - About 7 hrs to fix

    SqlDatasetTest has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SqlDatasetTest(SqlDatasetTestBase, parameterized.TestCase):
    
      # Test that SqlDataset can read from a database table.
      @combinations.generate(test_base.default_test_combinations())
      def testReadResultSet(self):
    Severity: Minor
    Found in tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py - About 4 hrs to fix

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetFloat64(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name, victories FROM townspeople "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 540..556
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 562..574

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 117.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetFloat64OverlyPrecise(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name, accolades FROM townspeople "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 524..535
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 562..574

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 117.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetFloat64LargestConsecutiveWholeNumbersNotEqual(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name, triumphs FROM townspeople "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 524..535
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 540..556

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 117.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt64(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, desk_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetUInt16(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, desk_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetUInt8MinAndMaxValues(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, brownie_points FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt16(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, desk_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt64NegativeAndZero(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, income FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt32MaxValues(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, favorite_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt16MaxValues(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, favorite_medium_sized_number "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt32NegativeAndZero(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, income FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt32VarCharColumnAsInt(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, school_id FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetUInt16MinAndMaxValues(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, account_balance FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt8(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, desk_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetUInt8(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, desk_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 419..431
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 13 locations. Consider refactoring.
      Open

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt64MaxValues(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, favorite_big_number FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 248..258
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 291..301
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 319..331
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 347..357
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 361..373
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 377..387
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 391..401
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 405..415
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 435..445
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 449..461
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 465..475
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 479..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 112.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetBoolNotZeroOrOne(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, favorite_medium_sized_number "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 496..506

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 112.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetBool(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, registration_complete FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 510..520

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 112.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt8NegativeAndZero(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, income, favorite_negative_number "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 305..315

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 95.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetInt16NegativeAndZero(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, income, favorite_negative_number "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 262..272

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 95.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetWithInvalidColumnName(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name, fake_column FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 177..185
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 210..218
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 222..230
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 236..244

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetOfQueryWithSyntaxError(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELEmispellECT first_name, last_name, motto FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 177..185
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 199..207
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 222..230
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 236..244

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetWithMismatchBetweenColumnsAndOutputTypes(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 177..185
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 199..207
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 210..218
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 236..244

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadResultSetOfInsertQuery(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="INSERT INTO students (first_name, last_name, motto) "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 177..185
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 199..207
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 210..218
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 222..230

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

        @combinations.generate(test_base.default_test_combinations())
        def testReadEmptyResultSet(self):
          get_next = self.getNext(
              self._createSqlDataset(
                  query="SELECT first_name, last_name, motto FROM students "
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 199..207
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 210..218
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 222..230
      tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py on lines 236..244

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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