tensorflow/tensorflow

View on GitHub
tensorflow/python/feature_column/feature_column_v2_test.py

Summary

Maintainability
F
8 mos
Test Coverage

File feature_column_v2_test.py has 5284 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    OldLinearModelTest has 41 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class OldLinearModelTest(test.TestCase):
    
      def test_raises_if_empty_feature_columns(self):
        with self.assertRaisesRegex(ValueError,
                                    'feature_columns must not be empty'):
    Severity: Minor
    Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 5 hrs to fix

      VocabularyFileCategoricalColumnTest has 29 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class VocabularyFileCategoricalColumnTest(test.TestCase):
      
        _FILE_FORMAT = None
        _VOCABULARY_SIZE_ERROR = (errors.OpError, 'Invalid vocab_size')
      
      
      Severity: Minor
      Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 3 hrs to fix

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

        class VocabularyListCategoricalColumnTest(test.TestCase):
        
          def test_defaults_string(self):
            column = fc.categorical_column_with_vocabulary_list(
                key='aaa', vocabulary_list=('omar', 'stringer', 'marlo'))
        Severity: Minor
        Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 3 hrs to fix

          FunctionalInputLayerTest has 24 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class FunctionalInputLayerTest(test.TestCase):
          
            def test_raises_if_empty_feature_columns(self):
              with self.assertRaisesRegex(ValueError,
                                          'feature_columns must not be empty'):
          Severity: Minor
          Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 2 hrs to fix

            IdentityCategoricalColumnTest has 22 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class IdentityCategoricalColumnTest(test.TestCase):
            
              def test_constructor(self):
                column = fc.categorical_column_with_identity(key='aaa', num_buckets=3)
                self.assertEqual('aaa', column.name)
            Severity: Minor
            Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 2 hrs to fix

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

              class CrossedColumnTest(test.TestCase):
              
                def test_keys_empty(self):
                  with self.assertRaisesRegex(ValueError,
                                              'keys must be a list with length > 1'):
              Severity: Minor
              Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 2 hrs to fix

                Function test_get_dense_tensor has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def test_get_dense_tensor(self, use_safe_embedding_lookup,
                                            partition_variables):
                    # SharedEmbeddingColumns are graph-only
                    with ops.Graph().as_default():
                      # Inputs.
                Severity: Minor
                Found in tensorflow/python/feature_column/feature_column_v2_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 create_variable has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def create_variable(self,
                Severity: Major
                Found in tensorflow/python/feature_column/feature_column_v2_test.py - About 50 mins to fix

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

                    def test_old_linear_model_old_categorical(self):
                      # Inputs.
                      batch_size = 4
                      vocabulary_size = 3
                      sparse_input = sparse_tensor.SparseTensorValue(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5221..5301

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 502.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model(self):
                      # Inputs.
                      batch_size = 4
                      vocabulary_size = 3
                      sparse_input = sparse_tensor.SparseTensorValue(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5303..5383

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 502.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fills_cols_to_vars_shared_embedding(self):
                      # Provide 5 DenseColumn's to input_layer: a NumericColumn, a
                      # BucketizedColumn, an EmbeddingColumn, two SharedEmbeddingColumns. The
                      # EmbeddingColumn creates a Variable and the two SharedEmbeddingColumns
                      # shared one variable.
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2813..2867

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 496.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      with ops.Graph().as_default():
                        price = fc.numeric_column('price')
                        price_buckets = fc.bucketized_column(
                            price, boundaries=[
                                0.,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1873..1920

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 401.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fills_cols_to_vars_partitioned_variables(self):
                      price1 = fc.numeric_column('price1')
                      dense_feature = fc.numeric_column('dense_feature')
                      dense_feature_bucketized = fc.bucketized_column(
                          dense_feature, boundaries=[0.])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2869..2900

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 356.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model(self):
                      """Tests linear_model.
                  
                      Uses data from test_get_sparse_tensors_simple.
                      """
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1331..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 342.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_old_numeric(self):
                      """Tests linear_model.
                  
                      Uses data from test_get_sparse_tensors_simple.
                      """
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1221..1250

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 342.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_column_order(self):
                      price_a = fc.numeric_column('price_a')
                      price_b = fc.numeric_column('price_b')
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default() as g:
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1740..1774

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 328.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_two_input_values(self):
                      """Tests linear_model() for input with shape=[2]."""
                      price = fc.numeric_column('price', shape=[2])
                      bucketized_price = fc.bucketized_column(price, boundaries=[0, 2, 4, 6])
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 557..584

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 311.

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

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

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

                      with ops.Graph().as_default():
                        price = fc.numeric_column('price')
                        price_buckets = fc.bucketized_column(
                            price, boundaries=[
                                0.,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1836..1871

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 309.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_one_input_value(self):
                      """Tests linear_model() for input with shape=[1]."""
                      price = fc.numeric_column('price', shape=[1])
                      bucketized_price = fc.bucketized_column(price, boundaries=[0, 2, 4, 6])
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 529..555
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 716..742

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 303.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_one_input_value_old_numeric(self):
                      """Tests linear_model() for input with shape=[1]."""
                      price = fc_old._numeric_column('price', shape=[1])
                      bucketized_price = fc.bucketized_column(price, boundaries=[0, 2, 4, 6])
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 529..555
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 659..685

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 303.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_multiple_linear_models(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default():
                        features1 = {'price': [[1.], [5.]]}
                        features2 = {'price': [[2.], [10.]]}
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1947..1966

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 299.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model(self):
                      column = fc.weighted_categorical_column(
                          categorical_column=fc.categorical_column_with_identity(
                              key='ids', num_buckets=3),
                          weight_feature_key='values')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6356..6387

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 290.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_old_categorical(self):
                      column = fc.weighted_categorical_column(
                          categorical_column=fc_old._categorical_column_with_identity(
                              key='ids', num_buckets=3),
                          weight_feature_key='values')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6249..6280

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 290.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_multi_column(self):
                      price1 = fc.numeric_column('price1', shape=2)
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {'price1': [[1., 2.], [5., 6.]], 'price2': [[3.], [4.]]}
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1580..1600

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 284.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_linear_model_v1_shared_embedding_all_other_v2(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        price = fc.numeric_column('price')  # v2
                        some_sparse_column = fc.categorical_column_with_hash_bucket(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2175..2213
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2215..2253

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 280.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_linear_model_v1_shared_embedding_with_v2_cat_all_other_v2(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        price = fc.numeric_column('price')  # v2
                        some_sparse_column = fc.categorical_column_with_hash_bucket(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2135..2173
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2215..2253

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 280.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_linear_model_v1_v2_mix(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        price = fc.numeric_column('price')  # v2
                        some_sparse_column = fc.categorical_column_with_hash_bucket(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2135..2173
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2175..2213

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 280.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=('omar', 'stringer', 'marlo'))
                      a_weighted = fc.weighted_categorical_column(a, weight_feature_key='weights')
                      data = example_pb2.Example(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6339..6369

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 280.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fills_cols_to_vars(self):
                      # Provide three _DenseColumn's to input_layer: a _NumericColumn, a
                      # _BucketizedColumn, and an _EmbeddingColumn.  Only the _EmbeddingColumn
                      # creates a Variable.
                      price1 = fc.numeric_column('price1')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2784..2811

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 278.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      categorical_column = fc.categorical_column_with_identity(
                          key='aaa', num_buckets=3)
                      embedding_dimension = 2
                      original = fc.embedding_column(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4806..4837

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 254.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_multi_output(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default():
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar', 'stringer', 'marlo'],  # hashed to = [2, 0, 3]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1449..1469

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 251.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_multi_rank(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default():
                        wire_tensor = array_ops.sparse_placeholder(dtypes.string)
                        wire_value = sparse_tensor.SparseTensorValue(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1482..1501

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_dense_and_sparse_bias(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default():
                        wire_tensor = sparse_tensor.SparseTensor(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1362..1379

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 233.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_bias(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default():
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar', 'stringer', 'marlo'],  # hashed to = [2, 0, 3]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1343..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 231.

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

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

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

                      with ops.Graph().as_default():
                        predictions = fc_old.linear_model({
                            wire_column.name:
                                sparse_tensor.SparseTensorValue(
                                    indices=((0, 0), (1, 0), (1, 1)),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 961..981
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3469..3489

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 229.

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

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

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

                      with ops.Graph().as_default():
                        predictions = fc_old.linear_model({
                            wire_column.name:
                                sparse_tensor.SparseTensorValue(
                                    indices=((0, 0), (1, 0), (1, 1)),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 961..981
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3918..3938

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 229.

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

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

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

                      with ops.Graph().as_default():
                        predictions = fc_old.linear_model({
                            wire_column.name:
                                sparse_tensor.SparseTensorValue(
                                    indices=((0, 0), (1, 0), (1, 1)),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3469..3489
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3918..3938

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 229.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_old_categorical(self):
                      animal = fc.indicator_column(
                          fc_old._categorical_column_with_identity('animal', num_buckets=4))
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4527..4547

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 229.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model(self):
                      animal = fc.indicator_column(
                          fc.categorical_column_with_identity('animal', num_buckets=4))
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 days to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4549..4569

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 229.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fills_cols_to_output_tensors(self):
                      # Provide three _DenseColumn's to input_layer: a _NumericColumn, a
                      # _BucketizedColumn, and an _EmbeddingColumn.  Only the _EmbeddingColumn
                      # creates a Variable.
                      apple_numeric_column = fc.numeric_column('apple_numeric_column')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1639..1671

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 215.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_multi_dimension_multi_output(self):
                      price = fc.numeric_column('price', shape=2)
                      with ops.Graph().as_default():
                        features = {'price': [[1., 2.], [5., 6.]]}
                        predictions = fc_old.linear_model(features, [price], units=3)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1542..1555

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 214.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_combiner_with_negative_weights(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      wire_cast_weights = fc.weighted_categorical_column(wire_cast, 'weights')
                  
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1520..1540

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 214.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_reshaping(self):
                      price = fc.numeric_column('price', shape=[1, 2])
                      with ops.Graph().as_default():
                        features = {'price': [[[1., 2.]], [[5., 6.]]]}
                        predictions = fc_old.linear_model(features, [price])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1566..1578

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 205.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_multi_output(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default():
                        features = {'price': [[1.], [5.]]}
                        predictions = fc_old.linear_model(features, [price], units=3)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1434..1447

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 203.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_combiner(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default():
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar', 'stringer', 'marlo'],  # hashed to = [2, 0, 3]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1503..1518

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 188.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=('omar', 'stringer', 'marlo'))
                      a_embedded = fc.embedding_column(a, dimension=2)
                      data = example_pb2.Example(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4846..4865

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 187.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default():
                        features = {'price': [[1.], [5.]]}
                        predictions = fc_old.linear_model(features, [price])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 344..356

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 186.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_with_rank_0_feature(self):
                      # price has 1 dimension in input_layer
                      price = fc.numeric_column('price')
                      features = {
                          'price': constant_op.constant(0),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2090..2112

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=('omar', 'stringer', 'marlo'))
                      a_indicator = fc.indicator_column(a)
                      data = example_pb2.Example(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4622..4641

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_with_rank_0_feature(self):
                      price = fc.numeric_column('price')
                      features = {
                          'price': constant_op.constant(0),
                      }
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2845..2868

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_parse_example_string(self):
                      a = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=('omar', 'stringer', 'marlo'))
                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3923..3941

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 172.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fills_cols_to_vars(self):
                      price1 = fc.numeric_column('price1', shape=2)
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {'price1': [[1., 2.], [5., 6.]], 'price2': [[3.], [4.]]}
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1602..1614

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 172.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_vocabulary_file(
                          key='aaa', vocabulary_file='path_to_file', vocabulary_size=3)
                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3488..3506

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 171.

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

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

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

                      with ops.Graph().as_default():
                        sp_tensor = sparse_tensor.SparseTensor(
                            values=['omar', 'stringer', 'marlo'],
                            indices=[[0, 0], [1, 0], [1, 1]],
                            dense_shape=[2, 2])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1418..1432

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 168.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_identity(key='aaa', num_buckets=30)
                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                              feature={
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4241..4258

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 168.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example(self):
                      a = fc.categorical_column_with_hash_bucket('aaa', 10)
                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                              feature={
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 695..712

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 164.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_mismatched_dense_values(self):
                      column = fc.weighted_categorical_column(
                          categorical_column=fc.categorical_column_with_identity(
                              key='ids', num_buckets=3),
                          weight_feature_key='values')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6608..6631

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 164.

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

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

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

                      with ops.Graph().as_default():
                        with self.assertRaisesRegex(
                            ValueError,
                            'crossed_column does not support weight_tensor.*{}'.format(t.name)):
                          fc_old.linear_model({
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1145..1162

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 163.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_bias(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default():
                        features = {'price': [[1.], [5.]]}
                        predictions = fc_old.linear_model(features, [price])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1330..1341

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 160.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_example_int(self):
                      a = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=(11, 21, 31))
                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3943..3960

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 160.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_multiple_layers_with_same_embedding_column(self):
                      some_sparse_column = fc.categorical_column_with_hash_bucket(
                          'sparse_feature', hash_bucket_size=5)
                      some_embedding_column = fc.embedding_column(
                          some_sparse_column, dimension=10)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2986..3008

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 153.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_multi_dimension(self):
                      price = fc.numeric_column('price', shape=2)
                      with ops.Graph().as_default():
                        features = {'price': [[1., 2.], [5., 6.]]}
                        predictions = fc_old.linear_model(features, [price])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1471..1480

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 150.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_old_linear_model_mismatched_shape(self):
                      column = fc.weighted_categorical_column(
                          categorical_column=fc.categorical_column_with_identity(
                              key='ids', num_buckets=3),
                          weight_feature_key='values')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6589..6606

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 147.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_input_layer(self):
                      animal = fc.indicator_column(
                          fc.categorical_column_with_identity('animal', num_buckets=4))
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4587..4601

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 140.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_input_layer_old_categorical(self):
                      animal = fc.indicator_column(
                          fc_old._categorical_column_with_identity('animal', num_buckets=4))
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4571..4585

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 140.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_runtime_batch_size_matches(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1819..1833
                  tensorflow/python/feature_column/feature_column_test.py on lines 2969..2983
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1982..1996

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 139.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_runtime_batch_size_matches(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1819..1833
                  tensorflow/python/feature_column/feature_column_test.py on lines 2969..2983
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2686..2700

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 139.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_runtime_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1804..1817
                  tensorflow/python/feature_column/feature_column_test.py on lines 2955..2967
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1967..1980

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 137.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_runtime_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1804..1817
                  tensorflow/python/feature_column/feature_column_test.py on lines 2955..2967
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2672..2684

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 137.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_collection(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default() as g:
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar'], indices=[[0, 0]], dense_shape=[1, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1684..1696

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 135.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_sparse_trainable_default(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default() as g:
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar'], indices=[[0, 0]], dense_shape=[1, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1709..1720

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 133.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_multiple_features_dict(self):
                      """parse_spc for one column is a dict with length > 1."""
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3297..3314

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 131.

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

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

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

                        transformation_cache = fc.FeatureTransformationCache({
                            'a':
                                constant_op.constant(((-1., .5), (.5, 1.))),
                            'c':
                                sparse_tensor.SparseTensor(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1022..1039

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 128.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_weighted_categorical_column_ok(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        categorical_column_a = fc.categorical_column_with_identity(
                            key='aaa', num_buckets=3)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5663..5678

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 128.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def create_variable(self,
                                        feature_column,
                                        name,
                                        shape,
                                        dtype=None,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/tpu/feature_column_v2_test.py on lines 48..70

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 125.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  def _assert_sparse_tensor_value(test_case, expected, actual):
                    test_case.assertEqual(np.int64, np.array(actual.indices).dtype)
                    test_case.assertAllEqual(expected.indices, actual.indices)
                  
                    test_case.assertEqual(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3317..3326

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 124.

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

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

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 _initialized_session():
                          _assert_sparse_tensor_value(
                              self,
                              sparse_tensor.SparseTensorValue(
                                  indices=np.array(((0, 0), (1, 0), (1, 1)), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4429..4439

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 test_deep_copy(self):
                      a = fc.numeric_column('a', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed1 = fc.crossed_column(['d1', 'd2'], 10)
                      crossed2 = fc.crossed_column([b, 'c', crossed1], 15, hash_key=5)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 day to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 958..966

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 test_default_value_type_check(self):
                      fc.numeric_column(
                          'aaa', shape=[2], default_value=[1, 2.], dtype=dtypes.float32)
                      fc.numeric_column(
                          'aaa', shape=[2], default_value=[1, 2], dtype=dtypes.int32)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 222..232

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 121.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_invalid_boundaries(self):
                      a = fc.numeric_column('aaa')
                      with self.assertRaisesRegex(ValueError, 'boundaries must not be empty'):
                        fc.bucketized_column(a, boundaries=None)
                      with self.assertRaisesRegex(ValueError, 'boundaries must be a sorted list'):
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 388..397

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 119.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_subset_of_static_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      price3 = fc.numeric_column('price3')
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1789..1802
                  tensorflow/python/feature_column/feature_column_test.py on lines 2940..2953
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1952..1965

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 116.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_subset_of_static_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      price3 = fc.numeric_column('price3')
                      with ops.Graph().as_default():
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1789..1802
                  tensorflow/python/feature_column/feature_column_test.py on lines 2940..2953
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2657..2670

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 116.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_collection(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default() as g:
                        features = {'price': [[1.], [5.]]}
                        fc_old.linear_model(features, [price], weight_collections=['my-vars'])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1673..1682

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_sparse_trainable_false(self):
                      wire_cast = fc.categorical_column_with_hash_bucket('wire_cast', 4)
                      with ops.Graph().as_default() as g:
                        wire_tensor = sparse_tensor.SparseTensor(
                            values=['omar'], indices=[[0, 0]], dense_shape=[1, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1730..1738

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 111.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_trainable_default(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default() as g:
                        features = {'price': [[1.], [5.]]}
                        fc_old.linear_model(features, [price])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 7 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1698..1707

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 110.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      """Tests deepcopy of categorical_column_with_hash_bucket."""
                      original = fc.weighted_categorical_column(
                          categorical_column=fc.categorical_column_with_identity(
                              key='ids', num_buckets=3),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6277..6289

                  Duplicated Code

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

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

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                    def test_multi_hot(self):
                      animal = fc.indicator_column(
                          fc.categorical_column_with_identity('animal', num_buckets=4))
                  
                      transformation_cache = fc.FeatureTransformationCache({
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4412..4422

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 106.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_name(self):
                      a = fc.numeric_column('a', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed1 = fc.crossed_column(['d1', 'd2'], 10)
                      self.assertTrue(crossed1._is_v2_column)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1041..1049

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 106.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_multi_hot2(self):
                      animal = fc.indicator_column(
                          fc.categorical_column_with_identity('animal', num_buckets=4))
                      transformation_cache = fc.FeatureTransformationCache({
                          'animal':
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4399..4410

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 106.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_is_v2_column(self):
                      a = fc_old._numeric_column('a', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed1 = fc.crossed_column(['d1', 'd2'], 10)
                      self.assertTrue(crossed1._is_v2_column)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1031..1039

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 106.

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

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

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

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

                  Refactorings

                  Further Reading

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

                        with _initialized_session() as sess:
                          id_weight_pair = bucketized_price.get_sparse_tensors(
                              transformation_cache, None)
                          self.assertIsNone(id_weight_pair.weight_tensor)
                          id_tensor_value = sess.run(id_weight_pair.id_tensor)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 628..638

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 105.

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

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

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

                        with _initialized_session() as sess:
                          id_weight_pair = bucketized_price.get_sparse_tensors(
                              transformation_cache, None)
                          self.assertIsNone(id_weight_pair.weight_tensor)
                          id_tensor_value = sess.run(id_weight_pair.id_tensor)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 610..618

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 105.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_two_feature_columns(self):
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                      key2 = 'key2'
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3265..3274

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 104.

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

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

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

                        def _initializer(shape, dtype, partition_info=None):
                          self.assertEqual(dtypes.float32, dtype)
                          if partition_variables:
                            assert partition_info is not None
                            self.assertEqual([vocabulary_size, embedding_dimension],
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4926..4939
                  tensorflow/python/feature_column/feature_column_test.py on lines 5793..5806

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 102.

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

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

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

                      if not context.executing_eagerly():
                        global_vars = ops.get_collection(ops.GraphKeys.GLOBAL_VARIABLES)
                        self.assertCountEqual(('embedding_weights:0',),
                                              tuple([v.name for v in global_vars]))
                  
                  
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4866..4874
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4998..5006
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5144..5152

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 101.

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

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

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

                      if not context.executing_eagerly():
                        global_vars = ops.get_collection(ops.GraphKeys.GLOBAL_VARIABLES)
                        self.assertCountEqual(('embedding_weights:0',),
                                              tuple([v.name for v in global_vars]))
                  
                  
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4930..4938
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4998..5006
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5144..5152

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 101.

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

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

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

                      if not context.executing_eagerly():
                        global_vars = ops.get_collection(ops.GraphKeys.GLOBAL_VARIABLES)
                        self.assertCountEqual(('embedding_weights:0',),
                                              tuple([v.name for v in global_vars]))
                  
                  
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4866..4874
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4930..4938
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5144..5152

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 101.

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

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

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

                      if not context.executing_eagerly():
                        global_vars = ops.get_collection(ops.GraphKeys.GLOBAL_VARIABLES)
                        self.assertCountEqual(('embedding_weights:0',),
                                              tuple([v.name for v in global_vars]))
                  
                  
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4866..4874
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4930..4938
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4998..5006

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 101.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_parse_spec(self):
                      a = fc.numeric_column('a', shape=[2], dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed = fc.crossed_column([b, 'c'], 10)
                      self.assertEqual({
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 6 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 943..950

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 101.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      original = fc.categorical_column_with_vocabulary_file(
                          key='aaa',
                          vocabulary_file='path_to_file',
                          vocabulary_size=3,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3372..3384

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 96.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_fails_for_categorical_column(self):
                      animal = fc.categorical_column_with_identity('animal', num_buckets=4)
                      with ops.Graph().as_default():
                        features = {
                            'animal':
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2916..2925

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 94.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_incompatible_column_type(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        categorical_column_a = fc.categorical_column_with_identity(
                            key='aaa', num_buckets=3)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5648..5660

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 94.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      a = fc.numeric_column('aaa', shape=[2])
                      a_bucketized = fc.bucketized_column(a, boundaries=[0, 1])
                      a_bucketized_copy = copy.deepcopy(a_bucketized)
                      self.assertEqual(a_bucketized_copy.name, 'aaa_bucketized')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 521..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 94.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      original = fc.categorical_column_with_vocabulary_list(
                          key='aaa', vocabulary_list=(12, 24, 36), dtype=dtypes.int32)
                      for column in (original, copy.deepcopy(original)):
                        self.assertEqual('aaa', column.name)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3835..3843

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 94.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_static_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1776..1787

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 92.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_equal_keys_different_parse_spec(self):
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                      parse_spec2 = parsing_ops.VarLenFeature(dtype=dtypes.string)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3276..3286

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 92.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_static_batch_size_mismatch(self):
                      price1 = fc.numeric_column('price1')
                      price2 = fc.numeric_column('price2')
                      with ops.Graph().as_default():
                        features = {
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2927..2938

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 92.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_dense_trainable_false(self):
                      price = fc.numeric_column('price')
                      with ops.Graph().as_default() as g:
                        features = {'price': [[1.], [5.]]}
                        fc_old.linear_model(features, [price], trainable=False)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1722..1728

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 88.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_name_ordered_alphabetically(self):
                      """Tests that the name does not depend on the order of given columns."""
                      a = fc.numeric_column('a', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed1 = fc.crossed_column(['d1', 'd2'], 10)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 917..924
                  tensorflow/python/feature_column/feature_column_test.py on lines 926..933
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1060..1067

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 87.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_name_leaf_keys_ordered_alphabetically(self):
                      """Tests that the name does not depend on the order of given columns."""
                      a = fc.numeric_column('a', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed1 = fc.crossed_column(['d2', 'c'], 10)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 917..924
                  tensorflow/python/feature_column/feature_column_test.py on lines 926..933
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1051..1058

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 87.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      a = fc.numeric_column('aaa', shape=[1, 2], default_value=[[3., 2.]])
                      a_copy = copy.deepcopy(a)
                      self.assertEqual(a_copy.name, 'aaa')
                      self.assertEqual(a_copy.shape, (1, 2))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 5 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 332..337

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 87.

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

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

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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(
                            ((0, 0), (0, 1), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),
                             (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (1, 11), (1, 12), (1, 13),
                             (1, 14), (1, 15)), id_tensor_eval.indices)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1044..1048

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 85.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      original = fc.categorical_column_with_identity(key='aaa', num_buckets=3)
                      for column in (original, copy.deepcopy(original)):
                        self.assertEqual('aaa', column.name)
                        self.assertEqual(3, column.num_buckets)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4205..4212

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 85.

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

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

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

                        if partition_variables:
                          self.assertCountEqual(('vars/aaa_bbb_shared_embedding/part_0:0',
                                                 'vars/aaa_bbb_shared_embedding/part_1:0'),
                                                tuple([v.name for v in global_vars]))
                          embedding_var = array_ops.concat(global_vars, axis=0)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5852..5860

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      original = fc.categorical_column_with_hash_bucket('aaa', 10)
                      for column in (original, copy.deepcopy(original)):
                        self.assertEqual('aaa', column.name)
                        self.assertEqual(10, column.hash_bucket_size)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 675..681

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 83.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_equal_keys_equal_parse_spec(self):
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                      actual = fc.make_parse_example_spec_v2((self._TestFeatureColumn({
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3288..3295

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 82.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_deep_copy(self):
                      a = fc.categorical_column_with_hash_bucket('a', 4)
                      column = fc.indicator_column(a)
                      column_copy = copy.deepcopy(column)
                      self.assertEqual(column_copy.categorical_column.name, 'a')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4614..4620

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 81.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_invalid_initializer(self):
                      # SharedEmbeddingColumns are graph-only
                      with ops.Graph().as_default():
                        categorical_column_a = fc.categorical_column_with_identity(
                            key='aaa', num_buckets=3)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5636..5644

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 80.

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

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

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

                        features = {
                            'aaa':
                                sparse_tensor.SparseTensor(
                                    indices=((0, 0), (1, 0), (1, 1)),
                                    values=(0, 1, 0),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3021..3031
                  tensorflow/python/feature_column/feature_column_test.py on lines 3055..3065
                  tensorflow/python/feature_column/feature_column_test.py on lines 3073..3083
                  tensorflow/python/feature_column/feature_column_test.py on lines 5726..5736

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 79.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    def test_default_value_saved_as_tuple(self):
                      a = fc.numeric_column('aaa', default_value=4.)
                      self.assertEqual((4.,), a.default_value)
                      a = fc.numeric_column('aaa', shape=[1, 2], default_value=[[3, 2.]])
                      self.assertEqual(((3., 2.),), a.default_value)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 203..207

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 78.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_parse_spec(self):
                      a = fc.numeric_column('aaa', shape=[2], dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      self.assertEqual({
                          'aaa': parsing_ops.FixedLenFeature((2,), dtype=dtypes.int32)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 4 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 409..414

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 76.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_num_buckets(self):
                      a = fc.numeric_column('a', shape=[2], dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      crossed = fc.crossed_column([b, 'c'], 15)
                      self.assertEqual(15, crossed.num_buckets)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 952..956

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                    def test_raises_if_shape_mismatch(self):
                      price = fc.numeric_column('price', shape=2)
                      with ops.Graph().as_default():
                        features = {'price': [[1.], [5.]]}
                        with self.assertRaisesRegex(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1557..1564
                  tensorflow/python/feature_column/feature_column_test.py on lines 2755..2762
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2465..2472

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 72.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_raises_if_shape_mismatch(self):
                      price = fc.numeric_column('price', shape=2)
                      with ops.Graph().as_default():
                        features = {'price': [[1.], [5.]]}
                        with self.assertRaisesRegex(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1557..1564
                  tensorflow/python/feature_column/feature_column_test.py on lines 2755..2762
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1720..1727

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 72.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                        with _initialized_session() as sess:
                  
                          # Each row is formed by concatenating `embedded_body_style`,
                          # `one_hot_body_style`, and `price` in order.
                          self.assertAllEqual(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3193..3204

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 71.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 setUp(self):
                      super(VocabularyFileCategoricalColumnTest, self).setUp()
                  
                      # Contains ints, Golden State Warriors jersey numbers: 30, 35, 11, 23, 22
                      self._warriors_vocabulary_file_name = test.test_src_dir_path(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3523..3537

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 71.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_one_feature_column(self):
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                      actual = fc.make_parse_example_spec_v2((self._TestFeatureColumn({
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3257..3263

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 71.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 setUp(self):
                      super(VocabularyTfrecordGzipFileCategoricalColumnTest, self).setUp()
                  
                      # Contains ints, Golden State Warriors jersey numbers: 30, 35, 11, 23, 22
                      self._warriors_vocabulary_file_name = test.test_src_dir_path(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3001..3015

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 71.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_all_constructor_args(self):
                      column = fc.categorical_column_with_vocabulary_list(
                          key='aaa',
                          vocabulary_list=(12, 24, 36),
                          dtype=dtypes.int32,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3824..3833

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 70.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_all_constructor_args(self):
                      column = fc.categorical_column_with_vocabulary_file(
                          key='aaa',
                          vocabulary_file='path_to_file',
                          vocabulary_size=3,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3360..3370

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 69.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                              values=np.array((2, default_value, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3878..3883

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                              values=np.array((2, default_value, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3427..3432

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_type(self):
                      key1 = 'key1'
                      parse_spec1 = parsing_ops.FixedLenFeature(
                          shape=(2,), dtype=dtypes.float32, default_value=0.)
                      with self.assertRaisesRegex(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3247..3255

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 67.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_key_type_unsupported(self):
                      with self.assertRaisesRegex(ValueError, 'Unsupported key type'):
                        fc.crossed_column(['a', fc.numeric_column('c')], 10)
                  
                      with self.assertRaisesRegex(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 888..895

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 67.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_vocabulary_size(self):
                      with self.assertRaisesRegex(ValueError, 'Invalid vocabulary_size'):
                        fc.categorical_column_with_vocabulary_file(
                            key='aaa',
                            vocabulary_file=self._wire_vocabulary_file_name,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3409..3418

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 66.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                        data = example_pb2.Example(
                            features=feature_pb2.Features(
                                feature={
                                    'aaa':
                                        feature_pb2.Feature(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5689..5699

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 65.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      data = example_pb2.Example(
                          features=feature_pb2.Features(
                              feature={
                                  'price':
                                      feature_pb2.Feature(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 972..979

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 65.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_is_v2_column_old_numeric(self):
                      a = fc_old._numeric_column('aaa', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      self.assertFalse(b._is_v2_column)
                      self.assertEqual('aaa_bucketized', b.name)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 500..504

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 64.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                        predictions = fc_old.linear_model({
                            'ids':
                                sparse_tensor.SparseTensorValue(
                                    indices=((0, 0), (1, 0), (1, 1)),
                                    values=(0, 2, 1),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6639..6645

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 64.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_name(self):
                      a = fc.numeric_column('aaa', dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      self.assertTrue(b._is_v2_column)
                      self.assertEqual('aaa_bucketized', b.name)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 506..510

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 64.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1)),
                              values=np.array((0, 1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3293..3298
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3775..3780

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 63.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1)),
                              values=np.array((2, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3293..3298
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4087..4092

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 63.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1)),
                              values=np.array((2, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 3 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3775..3780
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4087..4092

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 63.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 5 locations. Consider refactoring.
                  Open

                        if use_safe_embedding_lookup:
                          self.assertIn(
                              'SparseFillEmptyRows',
                              [x.type for x in ops.get_default_graph().get_operations()])
                        else:
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4990..4997
                  tensorflow/python/feature_column/feature_column_test.py on lines 5869..5876
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5840..5847
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5930..5937

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 5 locations. Consider refactoring.
                  Open

                        if use_safe_embedding_lookup:
                          self.assertIn(
                              'SparseFillEmptyRows',
                              [x.type for x in ops.get_default_graph().get_operations()])
                        else:
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4990..4997
                  tensorflow/python/feature_column/feature_column_test.py on lines 5869..5876
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5930..5937
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6005..6012

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 5 locations. Consider refactoring.
                  Open

                        if use_safe_embedding_lookup:
                          self.assertIn(
                              'SparseFillEmptyRows',
                              [x.type for x in ops.get_default_graph().get_operations()])
                        else:
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4990..4997
                  tensorflow/python/feature_column/feature_column_test.py on lines 5869..5876
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5840..5847
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6005..6012

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1)),
                              values=np.array((0, 1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6418..6423
                  tensorflow/python/feature_column/feature_column_test.py on lines 6452..6457
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6242..6247

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=((0, 0), (1, 0), (1, 1)),
                              values=np.array((.5, 1., .1), dtype=np.float32),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6418..6423
                  tensorflow/python/feature_column/feature_column_test.py on lines 6452..6457
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6208..6213

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_variable_shape(self):
                      a = fc.numeric_column('aaa', shape=[2], dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      # Column 'aaa` has shape [2] times three buckets -> variable_shape=[2, 3].
                      self.assertAllEqual((2, 3), b.variable_shape)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 416..420

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      features = {
                          'price':
                              constant_op.constant([[1., 2.], [5., 6.]]),
                          'wire':
                              sparse_tensor.SparseTensor(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1000..1005

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_parse_spec(self):
                      a = fc.numeric_column('aaa', shape=[2, 3], dtype=dtypes.int32)
                      self.assertEqual({
                          'aaa': parsing_ops.FixedLenFeature((2, 3), dtype=dtypes.int32)
                      }, a.parse_example_spec)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 257..261

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                    def test_shape_must_be_positive_integer(self):
                      with self.assertRaisesRegex(TypeError, 'shape dimensions must be integer'):
                        fc.numeric_column(
                            'aaa', shape=[
                                1.0,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 234..244
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 663..669

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 58.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_num_buckets(self):
                      a = fc.numeric_column('aaa', shape=[2], dtype=dtypes.int32)
                      b = fc.bucketized_column(a, boundaries=[0, 1])
                      # Column 'aaa` has shape [2] times three buckets -> num_buckets=6.
                      self.assertEqual(6, b.num_buckets)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 422..426

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 58.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      features = {
                          'price':
                              constant_op.constant([
                                  11.,
                                  12.,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3120..3127

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 57.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                          values=np.array((11, 100, 30, 22), dtype=np.int32),
                          dense_shape=(3, 3))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4077..4080

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 56.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          # example 0, ids [2]
                          # example 1, ids [0, 1]
                          # example 2, ids []
                          # example 3, ids [1]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5003..5010

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 55.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_numpy_default_value(self):
                      a = fc.numeric_column(
                          'aaa', shape=[1, 2], default_value=np.array([[3., 2.]]))
                      self.assertEqual(a.default_value, ((3., 2.),))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 339..342

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 55.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      expected_lookups = (
                          # example 0, ids [[2], []], embedding = [[7, 11, 2], [0, 0, 0]]
                          ((7., 11., 2.), (0., 0., 0.)),
                          # example 1, ids [[], [0, 1]], embedding
                          # = mean([[], [1, 2, 4] + [3, 5, 1]]) = [[0, 0, 0], [2, 3.5, 2.5]]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5028..5037

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 54.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_raises_if_duplicate_name(self):
                      with self.assertRaisesRegex(
                          ValueError, 'Duplicate feature column name found for columns'):
                        fc_old.linear_model(
                            features={'a': [[0]]},
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1322..1328
                  tensorflow/python/feature_column/feature_column_test.py on lines 2731..2737
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2435..2441

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 54.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_raises_if_duplicate_name(self):
                      with self.assertRaisesRegex(
                          ValueError, 'Duplicate feature column name found for columns'):
                        fc_old.input_layer(
                            features={'a': [[0]]},
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1322..1328
                  tensorflow/python/feature_column/feature_column_test.py on lines 2731..2737
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1456..1462

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 54.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                        predictions = fc_old.linear_model({
                            column.name:
                                sparse_tensor.SparseTensorValue(
                                    indices=((0, 0), (1, 0), (1, 1)),
                                    values=(0, 2, 1),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4446..4451

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 54.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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.assertAllClose(
                            # One-hot tensor.
                            [[[1., 0., 0., 0., 0.]], [[0., 1., 0., 0., 0.]],
                             [[0., 0., 0., 1., 0.]], [[0., 0., 0., 0., 1.]]],
                            self.evaluate(bucketized_price_tensor))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 458..462

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 33, 0, 62), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3346..3352
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3402..3408
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3454..3460
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3852..3858
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3904..3910

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 60, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3346..3352
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3402..3408
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3826..3832
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3852..3858
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3904..3910

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, -1, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3346..3352
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3402..3408
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3454..3460
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3826..3832
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3904..3910

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, -1, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3346..3352
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3454..3460
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3826..3832
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3852..3858
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3904..3910

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 60, 0, 4), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3346..3352
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3402..3408
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3454..3460
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3826..3832
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3852..3858

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 33, 0, 62), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 5 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3402..3408
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3454..3460
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3826..3832
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3852..3858
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3904..3910

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                        features = {
                            'price': [[-1.], [5.]],
                            'wire':
                                sparse_tensor.SparseTensor(
                                    values=['omar', 'stringer', 'marlo'],
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4495..4501

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 52.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 2, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((0, 1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((-1, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((1, 3, 3), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, -1, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3319..3325
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array((2, 2, 0), dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3224..3230
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3248..3254
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3375..3381
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3734..3740
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3800..3806
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4050..4056
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4200..4206

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                      transformation_cache = fc.FeatureTransformationCache(
                          features={
                              'a':
                                  sparse_tensor.SparseTensor(
                                      indices=np.reshape(np.array([], dtype=np.int64), (0, 1)),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 172..175

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                      wire_tensor = sparse_tensor.SparseTensor(
                          values=constant_op.constant([101, 201, 301], dtype=dtypes.int32),
                          indices=[[0, 0], [1, 0], [1, 1]],
                          dense_shape=[2, 2])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 785..788

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                    def test_invalid_source_column_shape(self):
                      a = fc.numeric_column('aaa', shape=[2, 3])
                      with self.assertRaisesRegex(ValueError,
                                                  'source_column must be one-dimensional column'):
                        fc.bucketized_column(a, boundaries=[0, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 382..386

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  def _initialized_session(config=None):
                    sess = session.Session(config=config)
                    sess.run(variables_lib.global_variables_initializer())
                    sess.run(lookup_ops.tables_initializer())
                    return sess
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 54..58
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 38..42

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 50.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_scalar_default_value_fills_the_shape(self):
                      a = fc.numeric_column('aaa', shape=[2, 3], default_value=2.)
                      self.assertEqual(((2., 2., 2.), (2., 2., 2.)), a.default_value)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 2 hrs to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 253..255

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 50.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 5 locations. Consider refactoring.
                  Open

                    def test_does_not_support_dict_columns(self):
                      with self.assertRaisesRegex(
                          ValueError, 'Expected feature_columns to be iterable, found dict.'):
                        fc_old.input_layer(
                            features={'a': [[0]]}, feature_columns={'a': fc.numeric_column('a')})
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1316..1320
                  tensorflow/python/feature_column/feature_column_test.py on lines 2001..2005
                  tensorflow/python/feature_column/feature_column_test.py on lines 2710..2714
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1450..1454

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 5 locations. Consider refactoring.
                  Open

                    def test_does_not_support_dict_columns(self):
                      with self.assertRaisesRegex(
                          ValueError, 'Expected feature_columns to be iterable, found dict.'):
                        fc_old.linear_model(
                            features={'a': [[0]]}, feature_columns={'a': fc.numeric_column('a')})
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 4 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1316..1320
                  tensorflow/python/feature_column/feature_column_test.py on lines 2001..2005
                  tensorflow/python/feature_column/feature_column_test.py on lines 2710..2714
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2408..2412

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                        self.assertAllClose(
                            # One-hot tensor.
                            [[[1., 0., 0., 0., 0.], [0., 1., 0., 0., 0.]],
                             [[0., 0., 0., 1., 0.], [0., 0., 0., 0., 1.]]],
                            self.evaluate(bucketized_price_tensor))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 472..476

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 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 2 locations. Consider refactoring.
                  Open

                    def test_invalid_initializer(self):
                      categorical_column = fc.categorical_column_with_identity(
                          key='aaa', num_buckets=3)
                      with self.assertRaisesRegex(ValueError, 'initializer must be callable'):
                        fc.embedding_column(categorical_column, dimension=2, initializer='not_fn')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4839..4843

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                    def test_invalid_source_column_type(self):
                      a = fc.categorical_column_with_hash_bucket('aaa', hash_bucket_size=10)
                      with self.assertRaisesRegex(
                          ValueError,
                          'source_column must be a column generated with numeric_column'):
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 375..380

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_parse_spec_int(self):
                      a = fc.categorical_column_with_hash_bucket('aaa', 10, dtype=dtypes.int32)
                      self.assertEqual({
                          'aaa': parsing_ops.VarLenFeature(dtypes.int32)
                      }, a.parse_example_spec)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 689..693

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_should_be_dense_column(self):
                      with self.assertRaisesRegex(ValueError, 'must be a _DenseColumn'):
                        fc_old.input_layer(
                            features={'a': [[0]]},
                            feature_columns=[
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 2702..2707

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 48.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                      def _initializer(shape, dtype, partition_info=None):
                        self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                        self.assertEqual(dtypes.float32, dtype)
                        self.assertIsNone(partition_info)
                        return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                      def _initializer(shape, dtype, partition_info=None):
                        self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                        self.assertEqual(dtypes.float32, dtype)
                        self.assertIsNone(partition_info)
                        return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                      def _initializer(shape, dtype, partition_info=None):
                        self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                        self.assertEqual(dtypes.float32, dtype)
                        self.assertIsNone(partition_info)
                        return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                      def _initializer(shape, dtype, partition_info=None):
                        self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                        self.assertEqual(dtypes.float32, dtype)
                        self.assertIsNone(partition_info)
                        return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                        def _initializer(shape, dtype, partition_info=None):
                          self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                          self.assertEqual(dtypes.float32, dtype)
                          self.assertIsNone(partition_info)
                          return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                        def _initializer(shape, dtype, partition_info=None):
                          self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                          self.assertEqual(dtypes.float32, dtype)
                          self.assertIsNone(partition_info)
                          return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5881..5885
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 8 locations. Consider refactoring.
                  Open

                        def _initializer(shape, dtype, partition_info=None):
                          self.assertAllEqual((vocabulary_size, embedding_dimension), shape)
                          self.assertEqual(dtypes.float32, dtype)
                          self.assertIsNone(partition_info)
                          return embedding_values
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4831..4835
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4897..4901
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4962..4966
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5032..5036
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5175..5179
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5983..5987
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 378..382

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array(inputs.values, dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6390..6395
                  tensorflow/python/feature_column/feature_column_test.py on lines 6396..6401
                  tensorflow/python/feature_column/feature_column_test.py on lines 6424..6429
                  tensorflow/python/feature_column/feature_column_test.py on lines 6446..6451
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6184..6189
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6214..6219
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6236..6241

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=inputs.indices,
                              values=np.array(inputs.values, dtype=np.int64),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6390..6395
                  tensorflow/python/feature_column/feature_column_test.py on lines 6396..6401
                  tensorflow/python/feature_column/feature_column_test.py on lines 6424..6429
                  tensorflow/python/feature_column/feature_column_test.py on lines 6446..6451
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6178..6183
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6184..6189
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6214..6219

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=weights.indices,
                              values=np.array(weights.values, dtype=np.float32),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6390..6395
                  tensorflow/python/feature_column/feature_column_test.py on lines 6396..6401
                  tensorflow/python/feature_column/feature_column_test.py on lines 6424..6429
                  tensorflow/python/feature_column/feature_column_test.py on lines 6446..6451
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6178..6183
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6214..6219
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6236..6241

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 8 locations. Consider refactoring.
                  Open

                      _assert_sparse_tensor_value(
                          self,
                          sparse_tensor.SparseTensorValue(
                              indices=weights.indices,
                              values=np.array(weights.values, dtype=np.float32),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 7 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6390..6395
                  tensorflow/python/feature_column/feature_column_test.py on lines 6396..6401
                  tensorflow/python/feature_column/feature_column_test.py on lines 6424..6429
                  tensorflow/python/feature_column/feature_column_test.py on lines 6446..6451
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6178..6183
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6184..6189
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6236..6241

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_shape_saved_as_tuple(self):
                      a = fc.numeric_column('aaa', shape=[1, 2], default_value=[[3, 2.]])
                      self.assertEqual((1, 2), a.shape)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 199..201

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_dtype_string(self):
                      with self.assertRaisesRegex(ValueError, 'is not convertible to float'):
                        fc.weighted_categorical_column(
                            categorical_column=fc.categorical_column_with_identity(
                                key='ids', num_buckets=3),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6299..6305

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      class Transformer(BaseFeatureColumnForTests):
                  
                        @property
                        def _is_v2_column(self):
                          return True
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 171..184

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 46.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                        original_a, _ = fc.shared_embedding_columns_v2(
                            [categorical_column_a, categorical_column_b],
                            dimension=embedding_dimension,
                            combiner='my_combiner',
                            initializer=lambda: 'my_initializer',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5553..5557
                  tensorflow/python/feature_column/feature_column_test.py on lines 5604..5608
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5538..5542

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 46.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      class Transformer(BaseFeatureColumnForTests):
                  
                        @property
                        def _is_v2_column(self):
                          return True
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 146..159

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 46.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                        embedding_column_a, embedding_column_b = fc.shared_embedding_columns_v2(
                            [categorical_column_a, categorical_column_b],
                            dimension=embedding_dimension,
                            combiner='my_combiner',
                            initializer=lambda: 'my_initializer',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5553..5557
                  tensorflow/python/feature_column/feature_column_test.py on lines 5604..5608
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5573..5577

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 46.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_column_name_collision(self):
                      with self.assertRaisesRegex(ValueError, r'Parse config.*already exists'):
                        fc.weighted_categorical_column(
                            categorical_column=fc.categorical_column_with_identity(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6319..6322

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 46.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_dtype_none(self):
                      with self.assertRaisesRegex(ValueError, 'is not convertible to float'):
                        fc.weighted_categorical_column(
                            categorical_column=fc.categorical_column_with_identity(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 6291..6294

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 45.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 27 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (0, 0), (1, 1), (1, 2)),
                          values=(-9, 0, -6, 1),
                          dense_shape=(2, 4))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          # example 0, ids [2]
                          # example 1, ids [0, 1]
                          # example 2, ids []
                          # example 3, ids [1]
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                        sparse_input = sparse_tensor.SparseTensorValue(
                            # example 0, ids [2]
                            # example 1, ids [0, 1]
                            # example 2, ids []
                            # example 3, ids [1]
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                          values=(11, 100, 30, 22),
                          dense_shape=(3, 3))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          # example 0, ids [2]
                          # example 1, ids [0, 1]
                          # example 2, ids []
                          # example 3, ids [1]
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          # example 0, ids [2]
                          # example 1, ids [0, 1]
                          # example 2, ids []
                          # example 3, ids [1]
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                          values=(11, 100, 30, 22),
                          dense_shape=(3, 3))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (2, 2)),
                          values=(11, 100, 30, 22),
                          dense_shape=(3, 3))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4814..4821
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 27 locations. Consider refactoring.
                  Open

                      sparse_input = sparse_tensor.SparseTensorValue(
                          # example 0, ids [2]
                          # example 1, ids [0, 1]
                          # example 2, ids []
                          # example 3, ids [1]
                  tensorflow/python/feature_column/feature_column_test.py on lines 3680..3683
                  tensorflow/python/feature_column/feature_column_test.py on lines 3726..3729
                  tensorflow/python/feature_column/feature_column_test.py on lines 4122..4125
                  tensorflow/python/feature_column/feature_column_test.py on lines 4366..4369
                  tensorflow/python/feature_column/feature_column_test.py on lines 4908..4915
                  tensorflow/python/feature_column/feature_column_test.py on lines 5062..5069
                  tensorflow/python/feature_column/feature_column_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_test.py on lines 5166..5173
                  tensorflow/python/feature_column/feature_column_test.py on lines 5381..5388
                  tensorflow/python/feature_column/feature_column_test.py on lines 5442..5449
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3389..3392
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3441..3444
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3891..3894
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4097..4100
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4880..4887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5015..5022
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5094..5101
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 5158..5165
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 385..392
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 393..400
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 490..499
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 504..513
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 624..633
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 832..841
                  tensorflow/python/ops/ragged/ragged_map_fn_op_test.py on lines 303..306
                  tensorflow/python/tpu/feature_column_test.py on lines 106..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (1, 2)),
                          values=('marlo', 'skywalker', 'omar', 'heisenberg'),
                          dense_shape=(2, 3))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3634..3637
                  tensorflow/python/feature_column/feature_column_test.py on lines 4056..4059
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3813..3816

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1), (1, 2)),
                          values=('marlo', 'skywalker', 'omar', 'heisenberg'),
                          dense_shape=(2, 3))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3634..3637
                  tensorflow/python/feature_column/feature_column_test.py on lines 4056..4059
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3333..3336

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_invalid_buckets_and_default_value(self):
                      with self.assertRaisesRegex(ValueError,
                                                  'both num_oov_buckets and default_value'):
                        fc.categorical_column_with_vocabulary_file(
                            key='aaa',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3452..3458

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                      with self.assertRaisesRegex(ValueError, 'The shape of default_value'):
                        fc.numeric_column(
                            'aaa', shape=[3, 3], default_value=[[2, 3], [1, 2], [2, 3.]])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 215..217
                  tensorflow/python/feature_column/feature_column_test.py on lines 218..220
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 291..293

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                      features = {
                          'aaa':
                              sparse_tensor.SparseTensor(
                                  indices=((0, 0), (1, 0), (1, 1)),
                                  values=(0, 1, 0),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4871..4875

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                      features = {
                          'aaa':
                              sparse_tensor.SparseTensorValue(
                                  indices=((0, 0), (1, 0), (1, 1)),
                                  values=('marlo', 'skywalker', 'omar'),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4648..4652

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                      with self.assertRaisesRegex(ValueError, 'The shape of default_value'):
                        fc.numeric_column(
                            'aaa', shape=[3, 1], default_value=[[2, 3], [1, 2], [2, 3.]])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 215..217
                  tensorflow/python/feature_column/feature_column_test.py on lines 218..220
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 294..296

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                  def get_linear_model_column_var(column, name='linear_model'):
                    return ops.get_collection(ops.GraphKeys.GLOBAL_VARIABLES,
                                              name + '/' + column.name)[0]
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1260..1262

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                  Open

                    @parameterized.named_parameters(
                        {
                            'testcase_name': 'use_safe_embedding_lookup',
                            'use_safe_embedding_lookup': True,
                            'partition_variables': False,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4884..4900
                  tensorflow/python/feature_column/feature_column_test.py on lines 5749..5765

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 42.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_parse_spec_string(self):
                      a = fc.categorical_column_with_hash_bucket('aaa', 10)
                      self.assertEqual({
                          'aaa': parsing_ops.VarLenFeature(dtypes.string)
                      }, a.parse_example_spec)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 683..687

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 42.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      column = fc.categorical_column_with_vocabulary_list(
                          key='aaa',
                          vocabulary_list=np.array((30, 35, 11, 23, 22), dtype=np.int32),
                          dtype=dtypes.int32,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4095..4098

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 42.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      column = fc.categorical_column_with_vocabulary_list(
                          key='aaa',
                          vocabulary_list=np.array((30, 35, 11, 23, 22), dtype=np.int32),
                          dtype=dtypes.int32,
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4117..4120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 42.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_buckets_and_default_value(self):
                      with self.assertRaisesRegex(ValueError,
                                                  'both num_oov_buckets and default_value'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3894..3899

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 41.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                        with variable_scope.variable_scope(
                            'linear',
                            partitioner=partitioned_variables.fixed_size_partitioner(2, axis=0)):
                          fc_old.linear_model(
                              features, [price1, price2], cols_to_vars=cols_to_vars)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1625..1628

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 41.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                        def _embedding_column_initializer(shape, dtype, partition_info=None):
                          del shape  # unused
                          del dtype  # unused
                          del partition_info  # unused
                          embedding_values = (
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2358..2366

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                        def _embedding_column_initializer(shape, dtype, partition_info=None):
                          del shape  # unused
                          del dtype  # unused
                          del partition_info  # unused
                          embedding_values = (
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 2313..2321

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                    def test_invalid_dtype(self):
                      with self.assertRaisesRegex(ValueError, 'dtype must be string or integer'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa',
                            vocabulary_list=('omar', 'stringer', 'marlo'),
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3845..3850
                  tensorflow/python/feature_column/feature_column_test.py on lines 3858..3864
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3603..3609

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                    def test_mismatched_int_dtype(self):
                      with self.assertRaisesRegex(ValueError,
                                                  r'dtype.*and vocabulary dtype.*do not match'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3845..3850
                  tensorflow/python/feature_column/feature_column_test.py on lines 3858..3864
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3590..3595

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                  Open

                    def test_mismatched_string_dtype(self):
                      with self.assertRaisesRegex(ValueError,
                                                  r'dtype.*and vocabulary dtype.*do not match'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa', vocabulary_list=(12, 24, 36), dtype=dtypes.string)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3866..3870

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('omar', 'stringer', 'marlo'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('omar', 'stringer', 'marlo'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('omar', 'stringer', 'marlo'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('marlo', 'skywalker', 'omar'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      strings = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('omar', 'stringer', 'marlo'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6117..6120

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 30 locations. Consider refactoring.
                  Open

                      inputs = sparse_tensor.SparseTensorValue(
                          indices=((0, 0), (1, 0), (1, 1)),
                          values=('omar', 'stringer', 'marlo'),
                          dense_shape=(2, 2))
                  tensorflow/python/feature_column/feature_column_test.py on lines 3400..3403
                  tensorflow/python/feature_column/feature_column_test.py on lines 3427..3430
                  tensorflow/python/feature_column/feature_column_test.py on lines 3481..3484
                  tensorflow/python/feature_column/feature_column_test.py on lines 3514..3517
                  tensorflow/python/feature_column/feature_column_test.py on lines 3533..3536
                  tensorflow/python/feature_column/feature_column_test.py on lines 3554..3557
                  tensorflow/python/feature_column/feature_column_test.py on lines 3612..3615
                  tensorflow/python/feature_column/feature_column_test.py on lines 3658..3661
                  tensorflow/python/feature_column/feature_column_test.py on lines 3916..3919
                  tensorflow/python/feature_column/feature_column_test.py on lines 3966..3969
                  tensorflow/python/feature_column/feature_column_test.py on lines 3985..3988
                  tensorflow/python/feature_column/feature_column_test.py on lines 4035..4038
                  tensorflow/python/feature_column/feature_column_test.py on lines 4234..4237
                  tensorflow/python/feature_column/feature_column_test.py on lines 6312..6315
                  tensorflow/python/feature_column/feature_column_test.py on lines 6331..6334
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3086..3089
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3114..3117
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3173..3176
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3211..3214
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3235..3238
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3261..3264
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3306..3309
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3362..3365
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3664..3667
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3721..3724
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3745..3748
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3787..3790
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 4006..4009
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 6095..6098

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      transformation_cache = fc.FeatureTransformationCache({
                          'price':
                              sparse_tensor.SparseTensor(
                                  indices=[[0, 0]], values=[0.3], dense_shape=[1, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 643..646

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      transformation_cache = fc.FeatureTransformationCache({
                          'price':
                              sparse_tensor.SparseTensor(
                                  indices=[[0, 0]], values=[0.3], dense_shape=[1, 1])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 411..414

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                        self.assertAllEqual([[0., 0., 1., 11., 12., 13., 14., 15., 11.],
                                             [1., 0., 0., 1., 2., 3., 4., 5., 12.]],
                                            self.evaluate(net))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3136..3143

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      wire_tensor = sparse_tensor.SparseTensor(
                          values=[101, 201, 301],
                          indices=[[0, 0], [1, 0], [1, 1]],
                          dense_shape=[2, 2])
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 771..774

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      transformation_cache = fc.FeatureTransformationCache({
                          'wire':
                              sparse_tensor.SparseTensor(
                                  values=['omar', 'stringer', 'marlo'],
                                  indices=[[0, 0], [1, 0], [1, 1]],
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 797..802

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_should_be_feature_column(self):
                      with self.assertRaisesRegex(ValueError, 'must be a _FeatureColumn'):
                        fc_old.linear_model(features={'a': [[0]]}, feature_columns='NotSupported')
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1292..1294

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      column = fc.categorical_column_with_vocabulary_list(
                          key='aaa',
                          vocabulary_list=np.array((30, 35, 11, 23, 22), dtype=np.int32),
                          dtype=dtypes.int32)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4073..4076

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_dtype(self):
                      with self.assertRaisesRegex(ValueError, 'dtype must be string or integer'):
                        fc.categorical_column_with_vocabulary_file(
                            key='aaa',
                            vocabulary_file='path',
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3444..3450

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 39.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_invalid_num_oov_buckets(self):
                      with self.assertRaisesRegex(ValueError, 'Invalid num_oov_buckets'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa', vocabulary_list=(12, 24, 36), num_oov_buckets=-1)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 1 hr to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3889..3892

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      features = {
                          'ids': constant_op.constant([['c', 'b', 'a', 'c']]),
                          'weights': constant_op.constant([[2., 4., 6., 1.]])
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4667..4669

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                      self.assertAllEqual([[0, 0], [0, 1], [1, 0], [1, 1], [1, 2], [1, 3]],
                                          output_val.indices)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1010..1011
                  tensorflow/python/feature_column/feature_column_test.py on lines 1074..1076
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1213..1214

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                  Open

                        self.assertAllEqual(((0, 0), (0, 1), (1, 0), (1, 1), (1, 2), (1, 3)),
                                            id_tensor_eval.indices)
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1010..1011
                  tensorflow/python/feature_column/feature_column_test.py on lines 1074..1076
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1144..1145

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_invalid_num_oov_buckets(self):
                      with self.assertRaisesRegex(ValueError, 'Invalid num_oov_buckets'):
                        fc.categorical_column_with_vocabulary_file(
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3436..3438

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_key_should_be_string(self):
                      with self.assertRaisesRegex(ValueError, 'key must be a string.'):
                        fc.categorical_column_with_vocabulary_list(
                            key=('aaa',), vocabulary_list=('omar', 'stringer', 'marlo'))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3808..3811

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      with self.assertRaisesRegex(
                          ValueError, 'must be either a _DenseColumn or _CategoricalColumn'):
                        fc_old.linear_model(
                            features={'a': [[0]]}, feature_columns=[NotSupportedColumn()])
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 55 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 1311..1314

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    def test_key_should_be_string(self):
                      with self.assertRaisesRegex(ValueError, 'key must be a string.'):
                        fc.categorical_column_with_vocabulary_file(
                            key=('aaa',), vocabulary_file='path_to_file', vocabulary_size=3)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 50 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3355..3358

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 36.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_duplicate_mapping(self):
                      with self.assertRaisesRegex(ValueError, 'Duplicate keys'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa', vocabulary_list=(12, 24, 12))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3852..3856
                  tensorflow/python/feature_column/feature_column_test.py on lines 3884..3887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3597..3601

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_invalid_mapping_dtype(self):
                      with self.assertRaisesRegex(ValueError,
                                                  r'vocabulary dtype must be string or integer'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa', vocabulary_list=(12., 24., 36.))
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3852..3856
                  tensorflow/python/feature_column/feature_column_test.py on lines 3884..3887
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3629..3632

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      features = {
                          'ids': constant_op.constant([['c', 'b', 'unknown']]),
                          'weights': constant_op.constant([[2., 4., 6.]])
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4682..4684

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_empty_mapping(self):
                      with self.assertRaisesRegex(ValueError,
                                                  r'vocabulary_list.*must be non-empty'):
                        fc.categorical_column_with_vocabulary_list(
                            key='aaa', vocabulary_list=tuple([]))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3878..3882

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      if name in self._all_variables[feature_column]:
                        return self._all_variables[feature_column][name]
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_v2.py on lines 270..271

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      features = parsing_ops.parse_example(
                          serialized=[data.SerializeToString(),
                                      no_data.SerializeToString()],
                          features=fc.make_parse_example_spec_v2([price]))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 45 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 292..295

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_invalid_default_value_too_big(self):
                      with self.assertRaisesRegex(ValueError, 'default_value 3 not in range'):
                        fc.categorical_column_with_identity(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4222..4224
                  tensorflow/python/feature_column/feature_column_test.py on lines 4227..4229
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3994..3996

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      transformation_cache = fc.FeatureTransformationCache({
                          'animal':
                              sparse_tensor.SparseTensor(
                                  indices=[[0, 0], [1, 0]],
                                  values=['fox', 'fox'],
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4577..4582

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      with self.assertRaisesRegex(*self._VOCABULARY_SIZE_ERROR):
                        column.get_sparse_tensors(
                            fc.FeatureTransformationCache({
                                'aaa': inputs
                            }), None)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3090..3095

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                    def test_invalid_default_value_too_small(self):
                      with self.assertRaisesRegex(ValueError, 'default_value -1 not in range'):
                        fc.categorical_column_with_identity(
                  Severity: Major
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 3 other locations - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4222..4224
                  tensorflow/python/feature_column/feature_column_test.py on lines 4227..4229
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3999..4001

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      self.assertAllEqual(
                          np.reshape(np.array([], dtype=np.int64), (0, 2)), spv.indices)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 179..180

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      with self.assertRaisesRegex(errors.OpError, 'file_does_not_exist'):
                        column.get_sparse_tensors(
                            fc.FeatureTransformationCache({
                                'aaa': inputs
                            }), None)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 3118..3123

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_vocabulary_file_empty_string(self):
                      with self.assertRaisesRegex(ValueError, 'Missing vocabulary_file'):
                        fc.categorical_column_with_vocabulary_file(
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3391..3393

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_vocabulary_file_none(self):
                      with self.assertRaisesRegex(ValueError, 'Missing vocabulary_file'):
                        fc.categorical_column_with_vocabulary_file(
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 40 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 3386..3388

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 34.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                          fc.FeatureTransformationCache({
                              'aaa':
                                  np.array(((11, -1, -1), (100, 30, -1), (-1, -1, 22)),
                                           dtype=np.int32)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 35 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4101..4104

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 33.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    def test_key_should_be_string(self):
                      with self.assertRaisesRegex(ValueError, 'key must be a string.'):
                        fc.categorical_column_with_identity(key=('aaa',), num_buckets=3)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 35 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 4201..4203

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 33.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                          self.assertAllEqual(
                              expected_lookups,
                              embedding_lookup.eval(
                                  feed_dict={
                                      input_indices: sparse_input.indices,
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 30 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 5155..5159

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 32.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                        self.assertAllEqual([[0.]], self.evaluate(cols_to_vars[price1][0]))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 30 mins to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1797..1797
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1801..1801

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 32.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                    def test_dtype_is_convertible_to_float(self):
                      with self.assertRaisesRegex(ValueError,
                                                  'dtype must be convertible to float'):
                        fc.numeric_column('aaa', dtype=dtypes.string)
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 30 mins to fix
                  tensorflow/python/feature_column/feature_column_test.py on lines 248..251
                  tensorflow/python/feature_column/sequence_feature_column_test.py on lines 671..674

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 32.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                        self.assertAllEqual([[0.]], self.evaluate(cols_to_vars[price2][1]))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 30 mins to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1796..1796
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1797..1797

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 32.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                        self.assertAllEqual([[0.]], self.evaluate(cols_to_vars[price1][1]))
                  Severity: Minor
                  Found in tensorflow/python/feature_column/feature_column_v2_test.py and 2 other locations - About 30 mins to fix
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1796..1796
                  tensorflow/python/feature_column/feature_column_v2_test.py on lines 1801..1801

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 32.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  There are no issues that match your filters.

                  Category
                  Status