200ok-ch/organice

View on GitHub

Showing 1,494 of 1,494 total issues

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

          test('relative link to subdir/', () => {
            const elem = getAllByText('subdir/');
            expect(elem.length).toEqual(1);
            expect(elem[0]).toHaveAttribute('href', '/files/dir1/dir2/subdir/');
            expect(elem[0]).toHaveTextContent('subdir/');
Severity: Major
Found in src/components/OrgFile/OrgFile.integration.test.js and 8 other locations - About 2 hrs to fix
src/components/OrgFile/OrgFile.integration.test.js on lines 646..651
src/components/OrgFile/OrgFile.integration.test.js on lines 660..665
src/components/OrgFile/OrgFile.integration.test.js on lines 667..672
src/components/OrgFile/OrgFile.integration.test.js on lines 674..679
src/components/OrgFile/OrgFile.integration.test.js on lines 681..686
src/components/OrgFile/OrgFile.integration.test.js on lines 688..693
src/components/OrgFile/OrgFile.integration.test.js on lines 695..705
src/components/OrgFile/OrgFile.integration.test.js on lines 732..737

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

          test('relative link to subdir', () => {
            const elem = getAllByText('subdir');
            expect(elem.length).toEqual(1);
            expect(elem[0]).toHaveAttribute('href', '/files/dir1/dir2/subdir');
            expect(elem[0]).toHaveTextContent('subdir');
Severity: Major
Found in src/components/OrgFile/OrgFile.integration.test.js and 8 other locations - About 2 hrs to fix
src/components/OrgFile/OrgFile.integration.test.js on lines 653..658
src/components/OrgFile/OrgFile.integration.test.js on lines 660..665
src/components/OrgFile/OrgFile.integration.test.js on lines 667..672
src/components/OrgFile/OrgFile.integration.test.js on lines 674..679
src/components/OrgFile/OrgFile.integration.test.js on lines 681..686
src/components/OrgFile/OrgFile.integration.test.js on lines 688..693
src/components/OrgFile/OrgFile.integration.test.js on lines 695..705
src/components/OrgFile/OrgFile.integration.test.js on lines 732..737

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

          test('relative link to fictitious .org file in a grand-parent directory', () => {
            const elem = getAllByText('a fictitious .org file in a grand-parent directory');
            expect(elem.length).toEqual(1);
            expect(elem[0]).toHaveAttribute('data-target', '/foo.org');
            expect(elem[0]).toHaveTextContent('a fictitious .org file in a grand-parent directory');
Severity: Major
Found in src/components/OrgFile/OrgFile.integration.test.js and 8 other locations - About 2 hrs to fix
src/components/OrgFile/OrgFile.integration.test.js on lines 646..651
src/components/OrgFile/OrgFile.integration.test.js on lines 653..658
src/components/OrgFile/OrgFile.integration.test.js on lines 660..665
src/components/OrgFile/OrgFile.integration.test.js on lines 667..672
src/components/OrgFile/OrgFile.integration.test.js on lines 674..679
src/components/OrgFile/OrgFile.integration.test.js on lines 681..686
src/components/OrgFile/OrgFile.integration.test.js on lines 695..705
src/components/OrgFile/OrgFile.integration.test.js on lines 732..737

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

          test('relative link to fictitious .org file in a too-high ancestor directory', () => {
            const elem = getAllByText('a fictitious .org file in a too-high ancestor directory');
            expect(elem.length).toEqual(1);
            expect(elem[0]).toHaveAttribute(
              'data-target',
Severity: Major
Found in src/components/OrgFile/OrgFile.integration.test.js and 8 other locations - About 2 hrs to fix
src/components/OrgFile/OrgFile.integration.test.js on lines 646..651
src/components/OrgFile/OrgFile.integration.test.js on lines 653..658
src/components/OrgFile/OrgFile.integration.test.js on lines 660..665
src/components/OrgFile/OrgFile.integration.test.js on lines 667..672
src/components/OrgFile/OrgFile.integration.test.js on lines 674..679
src/components/OrgFile/OrgFile.integration.test.js on lines 681..686
src/components/OrgFile/OrgFile.integration.test.js on lines 688..693
src/components/OrgFile/OrgFile.integration.test.js on lines 732..737

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

          test('absolute link to fictitious .org file', () => {
            const elem = getAllByText('a fictitious .org file');
            expect(elem.length).toEqual(1);
            expect(elem[0]).toHaveAttribute('data-target', '/foo/bar/baz.org');
            expect(elem[0]).toHaveTextContent('a fictitious .org file');
Severity: Major
Found in src/components/OrgFile/OrgFile.integration.test.js and 8 other locations - About 2 hrs to fix
src/components/OrgFile/OrgFile.integration.test.js on lines 646..651
src/components/OrgFile/OrgFile.integration.test.js on lines 653..658
src/components/OrgFile/OrgFile.integration.test.js on lines 660..665
src/components/OrgFile/OrgFile.integration.test.js on lines 667..672
src/components/OrgFile/OrgFile.integration.test.js on lines 674..679
src/components/OrgFile/OrgFile.integration.test.js on lines 681..686
src/components/OrgFile/OrgFile.integration.test.js on lines 688..693
src/components/OrgFile/OrgFile.integration.test.js on lines 695..705

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

class HeaderContent extends PureComponent {
  constructor(props) {
    super(props);

    _.bindAll(this, [
Severity: Minor
Found in src/components/OrgFile/components/HeaderContent/index.js - About 2 hrs to fix

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

                        <div className="col-lg-4 mb-5 mb-lg-0">
                          <div className="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4">
                            {/* <i data-feather="check-square"></i> */}
                            <CheckSquare />
                          </div>
    Severity: Major
    Found in src/components/Landing/index.js and 1 other location - About 2 hrs to fix
    src/components/Landing/index.js on lines 212..223

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 80.

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

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

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

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

    Refactorings

    Further Reading

    Function loadContentFromLocalStorage has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    const loadContentFromLocalStorage = (initialState) => {
      persistableFields.forEach((field) => {
        let value = localStorage.getItem(field.name);
    
        if (field.type === 'nullable') {
    Severity: Minor
    Found in src/util/settings_persister.js - About 2 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

        it('should insert as the last child', () => {
          const newHeaders = insertCapture(path, templateNested, false);
          expectOrigFirstHeader(newHeaders);
          expectOrigLastHeader(newHeaders);
          expect(extractTitlesAndNestings(newHeaders)).toEqual([
    Severity: Major
    Found in src/reducers/org.unit.test.js and 1 other location - About 2 hrs to fix
    src/reducers/org.unit.test.js on lines 254..265

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 80.

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

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

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

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

    Refactorings

    Further Reading

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

                        <div className="col-lg-4 mb-5 mb-lg-0">
                          <div className="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4">
                            {/* <i data-feather="calendar"></i> */}
                            <Calendar />
                          </div>
    Severity: Major
    Found in src/components/Landing/index.js and 1 other location - About 2 hrs to fix
    src/components/Landing/index.js on lines 199..210

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 80.

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

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

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

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

    Refactorings

    Further Reading

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

        it('should insert as the first child', () => {
          const newHeaders = insertCapture(path, templateNested, true);
          expectOrigFirstHeader(newHeaders);
          expectOrigLastHeader(newHeaders);
          expect(extractTitlesAndNestings(newHeaders)).toEqual([
    Severity: Major
    Found in src/reducers/org.unit.test.js and 1 other location - About 2 hrs to fix
    src/reducers/org.unit.test.js on lines 267..278

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 80.

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

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

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

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

    Refactorings

    Further Reading

    Function subscribeToChanges has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    export const subscribeToChanges = (store) => {
      if (!localStorageAvailable) {
        return () => {};
      } else {
        return () => {
    Severity: Minor
    Found in src/util/settings_persister.js - About 2 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

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

        beforeEach(() => {
          state = readInitialState();
          state.org.present = state.org.present
            .update('files', (files) => files.set(path, Map()))
            .set('path', path);
    Severity: Major
    Found in src/reducers/org.unit.test.js and 1 other location - About 2 hrs to fix
    src/reducers/org.unit.test.js on lines 2077..2082

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 79.

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

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

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

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

    Refactorings

    Further Reading

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

        beforeEach(() => {
          state = readInitialState();
          state.org.present = state.org.present
            .update('files', (files) => files.set(path, Map()))
            .set('path', path);
    Severity: Major
    Found in src/reducers/org.unit.test.js and 1 other location - About 2 hrs to fix
    src/reducers/org.unit.test.js on lines 1982..1987

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 79.

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

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

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

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

    Refactorings

    Further Reading

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

    class TimestampEditor extends PureComponent {
      constructor(props) {
        super(props);
    
        _.bindAll(this, [

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

      class HeaderBar extends PureComponent {
        constructor(props) {
          super(props);
      
          _.bindAll(this, [
      Severity: Minor
      Found in src/components/HeaderBar/index.js - About 2 hrs to fix

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

          const getFileContents = (path) => {
            if (isEmpty(path)) return Promise.reject('No path given');
            return new Promise((resolve, reject) =>
              getFileContentsAndMetadata(path)
                .then(({ contents }) => resolve(contents))
        Severity: Major
        Found in src/sync_backend_clients/webdav_sync_backend_client.js and 1 other location - About 2 hrs to fix
        src/sync_backend_clients/dropbox_sync_backend_client.js on lines 159..166

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

          const getFileContents = (path) => {
            if (isEmpty(path)) return Promise.reject('No path given');
            return new Promise((resolve, reject) =>
              getFileContentsAndMetadata(path)
                .then(({ contents }) => resolve(contents))
        Severity: Major
        Found in src/sync_backend_clients/dropbox_sync_backend_client.js and 1 other location - About 2 hrs to fix
        src/sync_backend_clients/webdav_sync_backend_client.js on lines 112..119

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

          componentDidUpdate(prevProps) {
            const { header } = this.props;
        
            if (prevProps.header !== header) {
              this.setState(
        Severity: Major
        Found in src/components/OrgFile/components/HeaderContent/index.js and 1 other location - About 2 hrs to fix
        src/components/OrgFile/components/TitleLine/index.js on lines 41..52

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 77.

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

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

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

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

          componentDidUpdate(prevProps) {
            const { header } = this.props;
        
            if (prevProps.header !== header) {
              this.setState(
        Severity: Major
        Found in src/components/OrgFile/components/TitleLine/index.js and 1 other location - About 2 hrs to fix
        src/components/OrgFile/components/HeaderContent/index.js on lines 61..72

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 77.

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

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

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