wkdhkr/dedupper

View on GitHub

Showing 303 of 303 total issues

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

              landmark: {
                mouth_upper_lip_left_contour2: {
                  y: 210,
                  x: 238
                },
Severity: Major
Found in __tests__/services/db/FacePPDbService.test.js and 1 other location - About 1 wk to fix
__tests__/services/db/FacePPDbService.test.js on lines 553..886

Duplicated Code

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

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

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

Tuning

This issue has a mass of 1334.

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

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

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

            landmark: {
              mouth_upper_lip_left_contour2: {
                y: 210,
                x: 238
              },
Severity: Major
Found in __tests__/services/db/FacePPDbService.test.js and 1 other location - About 1 wk to fix
__tests__/services/db/FacePPDbService.test.js on lines 25..358

Duplicated Code

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

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

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

Tuning

This issue has a mass of 1334.

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

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

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 insert has 459 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      const insert = async filePath => {
        config.path = filePath;
        const fs = new FileService(config);
        const subject = new Subject(config);
        const fileInfo = await fs.collectFileInfo();
Severity: Major
Found in __tests__/services/db/FacePPDbService.test.js - About 2 days to fix

    File FacePPDbService.test.js has 899 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /** @flow */
    import { default as Subject } from "../../../src/services/db/FacePPDbService";
    import FileService from "../../../src/services/fs/FileService";
    import TestHelper from "../../../src/helpers/TestHelper";
    import DeepLearningHelper from "../../../src/helpers/DeepLearningHelper";
    Severity: Major
    Found in __tests__/services/db/FacePPDbService.test.js - About 2 days to fix

      File FacePPDbService.js has 873 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable no-plusplus */
      /* eslint-disable camelcase */
      // @flow
      import typeof { Logger } from "log4js";
      import { STATE_ACCEPTED, STATE_KEEPING } from "../../types/FileStates";
      Severity: Major
      Found in src/services/db/FacePPDbService.js - About 2 days to fix

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

          deleteByHash({ hash: $hash }: FileInfo): Promise<?NsfwJsHashRow> {
            return new Promise((resolve, reject) => {
              if (!$hash) {
                resolve();
                return;
        Severity: Major
        Found in src/services/db/NsfwJsDbService.js and 1 other location - About 1 day to fix
        src/services/db/FacePPDbService.js on lines 178..211

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 280.

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

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

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

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

        Refactorings

        Further Reading

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

          deleteByHash({ hash: $hash }: FileInfo): Promise<?FacePPRow> {
            return new Promise((resolve, reject) => {
              if (!$hash) {
                resolve();
                return;
        Severity: Major
        Found in src/services/db/FacePPDbService.js and 1 other location - About 1 day to fix
        src/services/db/NsfwJsDbService.js on lines 98..131

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 280.

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

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

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

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

        Refactorings

        Further Reading

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

          deleteById($id: string): Promise<?any> {
            return new Promise((resolve, reject) => {
              if (!$id) {
                resolve();
                return;
        Severity: Major
        Found in src/services/db/ChannelDbService.js and 1 other location - About 1 day to fix
        src/services/db/TagDbService.js on lines 36..68

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 253.

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

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

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

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

          deleteByHash($hash: string): Promise<?any> {
            return new Promise((resolve, reject) => {
              if (!$hash) {
                resolve();
                return;
        Severity: Major
        Found in src/services/db/TagDbService.js and 1 other location - About 1 day to fix
        src/services/db/ChannelDbService.js on lines 39..71

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 253.

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

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

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

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

          it("video isLowResolution, isLowFileSize", async () => {
            const fileInfo = await createFileInfo(
              TestHelper.sampleFile.video.mkv.default
            );
            const subject = new Subject(config);
        Severity: Major
        Found in __tests__/services/judgment/ContentsLogic.test.js and 1 other location - About 1 day to fix
        __tests__/services/judgment/ContentsLogic.test.js on lines 52..68

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 252.

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

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

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

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

          it("image isLowResolution isLowFileSize", async () => {
            const fileInfo = await createFileInfo(
              TestHelper.sampleFile.image.jpg.default
            );
            const subject = new Subject(config);
        Severity: Major
        Found in __tests__/services/judgment/ContentsLogic.test.js and 1 other location - About 1 day to fix
        __tests__/services/judgment/ContentsLogic.test.js on lines 34..50

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 252.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 defaultConfig.js has 604 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // @flow
        import path from "path";
        import os from "os";
        
        import EnvironmentHelper from "./helpers/EnvironmentHelper";
        Severity: Major
        Found in src/defaultConfig.js - About 1 day to fix

          File DbService.js has 548 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // @flow
          import fs from "fs-extra";
          import path from "path";
          
          import typeof { Logger } from "log4js";
          Severity: Major
          Found in src/services/db/DbService.js - About 1 day to fix

            File ACDService.js has 528 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // @flow
            // import sleep from "await-sleep";
            import pLimit from "p-limit";
            import { wrapper } from "axios-cookiejar-support";
            import FormData from "form-data";
            Severity: Major
            Found in src/services/amazon/ACDService.js - About 1 day to fix

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

                ) => Promise<any> = async (
                  image: any,
                  internalResolution: number
                ): Promise<any> => {
                  const multiPersonSegmentation = null;
              Severity: Major
              Found in src/services/deepLearning/bodyPix/BodyPixService.js and 1 other location - About 1 day to fix
              src/services/deepLearning/bodyPix/BodyPixService.js on lines 158..184

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 207.

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

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

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

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

                ) => Promise<null> = async (image: any, internalResolution: number) => {
                  const multiPersonPartSegmentation = null;
                  switch (guiState.algorithm) {
                    case "multi-person-instance":
                      return net.segmentMultiPersonParts(image, {
              Severity: Major
              Found in src/services/deepLearning/bodyPix/BodyPixService.js and 1 other location - About 1 day to fix
              src/services/deepLearning/bodyPix/BodyPixService.js on lines 124..153

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 207.

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

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

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

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

                queryByHash($hash: string): Promise<?any> {
                  return new Promise((resolve, reject) => {
                    if (!$hash) {
                      resolve();
                      return;
              Severity: Major
              Found in src/services/db/TagDbService.js and 1 other location - About 1 day to fix
              src/services/db/ChannelDbService.js on lines 99..120

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 199.

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

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

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

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

                queryById($id: string): Promise<?any> {
                  return new Promise((resolve, reject) => {
                    if (!$id) {
                      resolve();
                      return;
              Severity: Major
              Found in src/services/db/ChannelDbService.js and 1 other location - About 1 day to fix
              src/services/db/TagDbService.js on lines 70..91

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 199.

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

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

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 ProcessService.js has 495 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // @flow
              import maxListenersExceededWarning from "max-listeners-exceeded-warning";
              import events from "events";
              import typeof { Logger } from "log4js";
              import pLimit from "p-limit";
              Severity: Minor
              Found in src/services/ProcessService.js - About 7 hrs to fix

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

                  all: (type: ClassifyType) => Promise<Array<HashRow>> = (
                    type: ClassifyType
                  ): Promise<HashRow[]> =>
                    new Promise((resolve, reject) => {
                      const db = this.ss.spawn<HashRow>(this.ss.detectDbFilePath(type));
                Severity: Major
                Found in src/services/db/DbService.js and 1 other location - About 7 hrs to fix
                src/services/db/ChannelDbService.js on lines 73..97

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 178.

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

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

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