tensorflow/tensorflow

View on GitHub
tensorflow/python/ops/ragged/ragged_where_op_test.py

Summary

Maintainability
F
1 wk
Test Coverage

File ragged_where_op_test.py has 324 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function testRaggedWhereErrors has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def testRaggedWhereErrors(self, condition, error, message, x=None, y=None):
    Severity: Minor
    Found in tensorflow/python/ops/ragged/ragged_where_op_test.py - About 35 mins to fix

      Function testRaggedWhereErrors has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def testRaggedWhereErrors(self, condition, error, message, x=None, y=None):
      Severity: Minor
      Found in tensorflow/python/ops/ragged/ragged_where_op_test.py - About 35 mins to fix

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

              dict(  # shape=[D1, (D2), (D3), (D4)]
                  condition=ragged_factory_ops.constant_value([
                      [[[], [True]]],
                      [[[True, False, True], [False, True]],
                       [[True], [], [False], [False, True, False]]]
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 1 day to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 131..150

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 184.

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

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

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

              dict(  # shape=[D1, (D2), (D3), (D4)]
                  condition=ragged_factory_ops.constant_value([
                      [[[], [True]]],
                      [[[True, False, True], [False, True]],
                       [[True], [], [False], [False, True, False]]]
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 1 day to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 292..311

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 184.

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

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

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

              dict(  # shape=[D1, (D2), D3]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False], [False, True]],
                      [[True, False], [False, False], [True, False], [False, True]]
                  ], ragged_rank=1),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 1 day to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 114..129

        Duplicated Code

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

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

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

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

              dict(  # shape=[D1, (D2), D3]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False], [False, True]],
                      [[True, False], [False, False], [True, False], [False, True]]
                  ], ragged_rank=1),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 1 day to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 275..290

        Duplicated Code

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

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

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

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

              dict(  # shape=[D1, (D2), (D3), (D4)]
                  condition=ragged_factory_ops.constant_value([
                      [[[], [True]]],
                      [[[True, False, True], [False, True]],
                       [[True], [], [False], [False, True, False]]]
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 5 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 241..249

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 89.

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

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

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

              dict(  # shape=[D1, (D2), (D3), (D4)]
                  condition=ragged_factory_ops.constant_value([
                      [[[], [True]]],
                      [[[True, False, True], [False, True]],
                       [[True], [], [False], [False, True, False]]]
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 5 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 80..88

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 89.

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

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

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  x=ragged_factory_ops.constant_value([['A', 'B', 'C'], ['D', 'E']]),
                  y=ragged_factory_ops.constant_value([['a', 'b', 'c'], ['d', 'e']]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 4 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 38..46
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 268..274

        Duplicated Code

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

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

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

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  x=ragged_factory_ops.constant_value([['A', 'B', 'C'], ['D', 'E']]),
                  y=ragged_factory_ops.constant_value([['a', 'b', 'c'], ['d', 'e']]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 4 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 38..46
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 107..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 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

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  x=ragged_factory_ops.constant_value(
                      [['A', 'B', 'C'], ['D', 'E']]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 4 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 107..113
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 268..274

        Duplicated Code

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

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

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

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

              dict(  # shape=[D1, (D2), D3]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False], [False, True]],
                      [[True, False], [False, False], [True, False], [False, True]]
                  ], ragged_rank=1),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 73..79

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 75.

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

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

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

              dict(  # shape=[D1, (D2), D3]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False], [False, True]],
                      [[True, False], [False, False], [True, False], [False, True]]
                  ], ragged_rank=1),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 234..240

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 75.

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

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

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

              dict(  # shape=[D1, (D2), (D3)]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False, True], [False, True]],
                      [[True], [], [False], [False, True, False]]
                  ]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 3 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 66..72

        Duplicated Code

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

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

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

              dict(  # shape=[D1, (D2), (D3)]
                  condition=ragged_factory_ops.constant_value([
                      [[True, False, True], [False, True]],
                      [[True], [], [False], [False, True, False]]
                  ]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 3 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 227..233

        Duplicated Code

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

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

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

              dict(  # shape=[D1, D2]
                  condition=[[True, False], [False, True]],
                  x=[['A', 'B'], ['D', 'E']],
                  y=[['a', 'b'], ['d', 'e']],
                  expected=[[b'A', b'b'], [b'd', b'E']]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 102..106

        Duplicated Code

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

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

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

              dict(  # shape=[D1, D2]
                  condition=[[True, False], [False, True]],
                  x=[['A', 'B'], ['D', 'E']],
                  y=[['a', 'b'], ['d', 'e']],
                  expected=[[b'A', b'b'], [b'd', b'E']]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 263..267

        Duplicated Code

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

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

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  expected=[[0, 0], [0, 2], [1, 1]]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 34..37
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 62..65

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 39.

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

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

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

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

        Refactorings

        Further Reading

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  expected=[[0, 0], [0, 2], [1, 1]]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 34..37
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 223..226

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 39.

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

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

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

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

        Refactorings

        Further Reading

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

              dict(  # shape=[D1, (D2)]
                  condition=ragged_factory_ops.constant_value(
                      [[True, False, True], [False, True]]),
                  expected=[[0, 0], [0, 2], [1, 1]]),
        Severity: Major
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 62..65
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 223..226

        Duplicated Code

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

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

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

              dict(  # shape=[D1]
                  condition=[True, False, True],
                  x=['A', 'B', 'C'],
                  y=['a', 'b', 'c'],
                  expected=[b'A', b'b', b'C']),
        Severity: Minor
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 30 mins to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 258..262

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 32.

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

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

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

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

        Refactorings

        Further Reading

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

              dict(  # shape=[D1]
                  condition=[True, False, True],
                  x=['A', 'B', 'C'],
                  y=['a', 'b', 'c'],
                  expected=[b'A', b'b', b'C']),
        Severity: Minor
        Found in tensorflow/python/ops/ragged/ragged_where_op_test.py and 1 other location - About 30 mins to fix
        tensorflow/python/ops/ragged/ragged_where_op_test.py on lines 97..101

        Duplicated Code

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

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

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