OpenHPS/openhps-rdf

View on GitHub

Showing 207 of 207 total issues

File engine-minimal.js has 1061 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const df_419_2 = new (require('@comunica/logger-void').LoggerVoid)();
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__2_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({
  'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus'
});
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__2_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({
Severity: Major
Found in src/service/engine-minimal.js - About 2 days to fix

    File engine-default.js has 1061 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const df_419_2 = new (require('@comunica/logger-void').LoggerVoid)();
    const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__2_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({
      'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus'
    });
    const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__2_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({
    Severity: Major
    Found in src/service/engine-default.js - About 2 days to fix

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

      const urn_comunica_default_init_actors_query = new (require('@comunica/actor-init-query').ActorInitQuery)({
        'mediatorOptimizeQueryOperation': urn_comunica_default_optimize_query_operation_mediators_main,
        'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,
        'mediatorQueryParse': urn_comunica_default_query_parse_mediators_main,
        'mediatorQueryResultSerialize': urn_comunica_default_query_result_serialize_mediators_serialize,
      Severity: Major
      Found in src/service/engine-default.js and 1 other location - About 1 day to fix
      src/service/engine-minimal.js on lines 625..640

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 221.

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

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

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

      const urn_comunica_default_init_actors_query = new (require('@comunica/actor-init-query').ActorInitQuery)({
        'mediatorOptimizeQueryOperation': urn_comunica_default_optimize_query_operation_mediators_main,
        'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,
        'mediatorQueryParse': urn_comunica_default_query_parse_mediators_main,
        'mediatorQueryResultSerialize': urn_comunica_default_query_result_serialize_mediators_serialize,
      Severity: Major
      Found in src/service/engine-minimal.js and 1 other location - About 1 day to fix
      src/service/engine-default.js on lines 625..640

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 221.

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

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

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

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

      Refactorings

      Further Reading

      File SPARQLGenerator.ts has 553 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
          ArrayTypeDescriptor,
          DataSerializerUtils,
          FilterQuery,
          MapTypeDescriptor,
      Severity: Major
      Found in src/service/SPARQLGenerator.ts - About 1 day to fix

        Function generateComponent has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            protected generateComponent(
                key: string,
                query: any,
                dataType: Serializable<any>,
                subject: Quad_Subject = DataFactory.variable('subject'),
        Severity: Minor
        Found in src/service/SPARQLGenerator.ts - About 7 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function generateComponent has 173 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected generateComponent(
                key: string,
                query: any,
                dataType: Serializable<any>,
                subject: Quad_Subject = DataFactory.variable('subject'),
        Severity: Major
        Found in src/service/SPARQLGenerator.ts - About 6 hrs to fix

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

          const urn_comunica_default_dereference_rdf_actors_parse = new (require('@comunica/actor-dereference-rdf-parse').ActorDereferenceRdfParse)({
            'mediatorDereference': urn_comunica_default_dereference_mediators_main,
            'mediatorParse': urn_comunica_default_rdf_parse_mediators_parse,
            'mediatorParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,
            'mediaMappings': {"htm":"text/html","html":"text/html","json":"application/json","jsonld":"application/ld+json","n3":"text/n3","nq":"application/n-quads","nquads":"application/n-quads","nt":"application/n-triples","ntriples":"application/n-triples","owl":"application/rdf+xml","rdf":"application/rdf+xml","rdfxml":"application/rdf+xml","shaclc":"text/shaclc","shaclce":"text/shaclc-ext","shc":"text/shaclc","shce":"text/shaclc-ext","svg":"image/svg+xml","svgz":"image/svg+xml","trig":"application/trig","ttl":"text/turtle","turtle":"text/turtle","xht":"application/xhtml+xml","xhtml":"application/xhtml+xml","xml":"application/xml"},
          Severity: Major
          Found in src/service/engine-default.js and 1 other location - About 6 hrs to fix
          src/service/engine-minimal.js on lines 706..713

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 171.

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

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

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

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

          Refactorings

          Further Reading

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

          const urn_comunica_default_dereference_rdf_actors_parse = new (require('@comunica/actor-dereference-rdf-parse').ActorDereferenceRdfParse)({
            'mediatorDereference': urn_comunica_default_dereference_mediators_main,
            'mediatorParse': urn_comunica_default_rdf_parse_mediators_parse,
            'mediatorParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,
            'mediaMappings': {"htm":"text/html","html":"text/html","json":"application/json","jsonld":"application/ld+json","n3":"text/n3","nq":"application/n-quads","nquads":"application/n-quads","nt":"application/n-triples","ntriples":"application/n-triples","owl":"application/rdf+xml","rdf":"application/rdf+xml","rdfxml":"application/rdf+xml","shaclc":"text/shaclc","shaclce":"text/shaclc-ext","shc":"text/shaclc","shce":"text/shaclc-ext","svg":"image/svg+xml","svgz":"image/svg+xml","trig":"application/trig","ttl":"text/turtle","turtle":"text/turtle","xht":"application/xhtml+xml","xhtml":"application/xhtml+xml","xml":"application/xml"},
          Severity: Major
          Found in src/service/engine-minimal.js and 1 other location - About 6 hrs to fix
          src/service/engine-default.js on lines 706..713

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 171.

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

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

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

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

          Refactorings

          Further Reading

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

          SerializableMember({
              rdf: {
                  predicate: poso.yAxisValue,
                  serializer: (value: number, object: SensorValue) => {
                      return RDFBuilder.blankNode()
          Severity: Major
          Found in src/mapping/SensorValue.ts and 2 other locations - About 6 hrs to fix
          src/mapping/SensorValue.ts on lines 64..78
          src/mapping/SensorValue.ts on lines 94..108

          Duplicated Code

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

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

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

          SerializableMember({
              rdf: {
                  predicate: poso.xAxisValue,
                  serializer: (value: number, object: SensorValue) => {
                      return RDFBuilder.blankNode()
          Severity: Major
          Found in src/mapping/SensorValue.ts and 2 other locations - About 6 hrs to fix
          src/mapping/SensorValue.ts on lines 79..93
          src/mapping/SensorValue.ts on lines 94..108

          Duplicated Code

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

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

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

          SerializableMember({
              rdf: {
                  predicate: poso.zAxisValue,
                  serializer: (value: number, object: SensorValue) => {
                      return RDFBuilder.blankNode()
          Severity: Major
          Found in src/mapping/SensorValue.ts and 2 other locations - About 6 hrs to fix
          src/mapping/SensorValue.ts on lines 64..78
          src/mapping/SensorValue.ts on lines 79..93

          Duplicated Code

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

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

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

          File InternalRDFDeserializer.ts has 438 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import {
              ArrayTypeDescriptor,
              DataSerializerUtils,
              Deserializer,
              DeserializerFn,
          Severity: Minor
          Found in src/rdf/InternalRDFDeserializer.ts - About 6 hrs to fix

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

                        if (thing.predicates[poso.yaw] && thing.predicates[poso.pitch] && thing.predicates[poso.roll]) {
                            // Euler
                            yaw = Number(thing.predicates[poso.yaw][0].value);
                            pitch = Number(thing.predicates[poso.pitch][0].value);
                            roll = Number(thing.predicates[poso.roll][0].value);
            Severity: Major
            Found in src/mapping/Orientation.ts and 1 other location - About 5 hrs to fix
            src/mapping/RelativeOrientation.ts on lines 27..34

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 152.

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

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

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

                        if (thing.predicates[poso.yaw] && thing.predicates[poso.pitch] && thing.predicates[poso.roll]) {
                            // Euler
                            yaw = Number(thing.predicates[poso.yaw][0].value);
                            pitch = Number(thing.predicates[poso.pitch][0].value);
                            roll = Number(thing.predicates[poso.roll][0].value);
            Severity: Major
            Found in src/mapping/RelativeOrientation.ts and 1 other location - About 5 hrs to fix
            src/mapping/Orientation.ts on lines 27..34

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 152.

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

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

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

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

            Refactorings

            Further Reading

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

            SerializableMember({
                rdf: {
                    predicate: ogc.sfWithin,
                    serializer: (uid: string, _, options: MemberSerializerOptions) => {
                        return DataFactory.namedNode(`${options.baseUri}${uid}`);
            Severity: Major
            Found in src/mapping/DataObject.ts and 1 other location - About 5 hrs to fix
            src/mapping/geospatial/SymbolicSpace.ts on lines 46..56

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 152.

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

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

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

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

            Refactorings

            Further Reading

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

            SerializableMember({
                rdf: {
                    predicate: ogc.sfWithin,
                    serializer: (uid: string, _, options: MemberSerializerOptions) => {
                        return DataFactory.namedNode(`${options.baseUri}${uid}`);
            Severity: Major
            Found in src/mapping/geospatial/SymbolicSpace.ts and 1 other location - About 5 hrs to fix
            src/mapping/DataObject.ts on lines 191..201

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 152.

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

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

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

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

            Refactorings

            Further Reading

            Function bundle has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
            Open

            const bundle = (env, module, entry = 'index', suffix = '') => {
              const filename = `${PROJECT_NAME}${suffix}${module ? ".es" : ""}${env.prod ? ".min" : ""}`;
              return {
                name: PROJECT_NAME,
                entry: `./dist/esm5/${entry}.js`,
            Severity: Minor
            Found in webpack.config.js - About 5 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

                deserializationStrategy = new Map<Serializable<any>, DeserializerFn<any, TypeDescriptor, any>>([
                    [Number, this.deserializeLiteral.bind(this)],
                    [String, this.deserializeLiteral.bind(this)],
                    [Boolean, this.deserializeLiteral.bind(this)],
                    [Date, this.deserializeLiteral.bind(this)],
            Severity: Major
            Found in src/rdf/InternalRDFDeserializer.ts and 1 other location - About 5 hrs to fix
            src/rdf/InternalRDFSerializer.ts on lines 19..27

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 143.

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

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

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

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

            Refactorings

            Further Reading

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

                serializationStrategy = new Map<Serializable<any>, SerializerFn<any, TypeDescriptor, any>>([
                    [Number, this.serializeLiteral.bind(this)],
                    [String, this.serializeLiteral.bind(this)],
                    [Boolean, this.serializeLiteral.bind(this)],
                    [Date, this.serializeDate.bind(this)],
            Severity: Major
            Found in src/rdf/InternalRDFSerializer.ts and 1 other location - About 5 hrs to fix
            src/rdf/InternalRDFDeserializer.ts on lines 20..28

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 143.

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

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

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

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

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language