CORE-POS/IS4C

View on GitHub
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs

Summary

Maintainability
F
1 wk
Test Coverage

File JToken.cs has 1399 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq.JsonPath;
#if !(NET35 || NET20 || PORTABLE40)
using System.Dynamic;

    Class JToken has 56 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public abstract class JToken : IJEnumerable<JToken>, IJsonLineInfo
    #if !(NETFX_CORE || PORTABLE40 || PORTABLE)
            , ICloneable
    #endif
    #if !(NET35 || NET20 || PORTABLE40)

      Method ToObject has 103 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public object ToObject(Type objectType)
              {
                  if (JsonConvert.DefaultSettings == null)
                  {
                      bool isEnum;

        Method ReadFrom has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static JToken ReadFrom(JsonReader reader)
                {
                    ValidationUtils.ArgumentNotNull(reader, "reader");
        
                    if (reader.TokenType == JsonToken.None)

          Method RemoveAnnotations has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public void RemoveAnnotations(Type type)
                  {
                      if (type == null)
                          throw new ArgumentNullException("type");
          
          

            Method RemoveAnnotations has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void RemoveAnnotations<T>() where T : class
                    {
                        if (_annotations != null)
                        {
                            object[] annotations = _annotations as object[];

              Method RemoveAnnotations has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring.
              Open

                      public void RemoveAnnotations(Type type)
                      {
                          if (type == null)
                              throw new ArgumentNullException("type");
              
              

              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

              Method RemoveAnnotations has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
              Open

                      public void RemoveAnnotations<T>() where T : class
                      {
                          if (_annotations != null)
                          {
                              object[] annotations = _annotations as object[];

              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

              Method AddAnnotation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public void AddAnnotation(object annotation)
                      {
                          if (annotation == null)
                              throw new ArgumentNullException("annotation");
              
              

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

                        [CLSCompliant(false)]
                        public static explicit operator ulong?(JToken value)
                        {
                            if (value == null)
                                return null;
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 823..839
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 868..884
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 973..989

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 167.

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

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

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

                See codeclimate-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

                        [CLSCompliant(false)]
                        public static explicit operator sbyte?(JToken value)
                        {
                            if (value == null)
                                return null;
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 823..839
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 973..989
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 996..1012

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 167.

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

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

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

                See codeclimate-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

                        [CLSCompliant(false)]
                        public static explicit operator uint?(JToken value)
                        {
                            if (value == null)
                                return null;
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 823..839
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 868..884
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 996..1012

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 167.

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

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

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

                See codeclimate-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

                        [CLSCompliant(false)]
                        public static explicit operator ushort?(JToken value)
                        {
                            if (value == null)
                                return null;
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 868..884
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 973..989
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 996..1012

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 167.

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

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

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

                See codeclimate-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

                        public static explicit operator decimal?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator float?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator char?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator short?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator byte?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator int?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator double?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        public static explicit operator long?(JToken value)
                        {
                            if (value == null)
                                return null;
                
                
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 157.

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

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

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

                See codeclimate-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

                        [CLSCompliant(false)]
                        public static explicit operator ulong(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 700..713
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 720..733
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 759..772
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1083..1096

                Duplicated Code

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

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

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

                        [CLSCompliant(false)]
                        public static explicit operator char(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, CharTypes, false))
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 700..713
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 759..772
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1083..1096
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1103..1116

                Duplicated Code

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

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

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

                        [CLSCompliant(false)]
                        public static explicit operator ushort(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 720..733
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 759..772
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1083..1096
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1103..1116

                Duplicated Code

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

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

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

                        [CLSCompliant(false)]
                        public static explicit operator sbyte(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 700..713
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 720..733
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1083..1096
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1103..1116

                Duplicated Code

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

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

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

                        [CLSCompliant(false)]
                        public static explicit operator uint(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 700..713
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 720..733
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 759..772
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1103..1116

                Duplicated Code

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

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

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

                        public static explicit operator long(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Int64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator int(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Int32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator byte(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Byte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator decimal(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Decimal.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator double(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Double.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator short(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Int16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1038..1050

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

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

                Refactorings

                Further Reading

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

                        public static explicit operator float(JToken value)
                        {
                            JValue v = EnsureValue(value);
                            if (v == null || !ValidateToken(v, NumberTypes, false))
                                throw new ArgumentException("Can not convert {0} to Single.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 530..542
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 662..674
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 681..693
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 740..752
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 954..966
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 1019..1031

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 127.

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

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

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

                See codeclimate-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

                        public static JToken Parse(string json)
                        {
                            using (JsonReader reader = new JsonTextReader(new StringReader(json)))
                            {
                                JToken t = Load(reader);
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JArray.cs on lines 145..156
                pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JObject.cs on lines 360..371

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 93.

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

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

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