spolnik/JAlgoArena-UI

View on GitHub

Showing 386 of 386 total issues

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

unionBy<T>(
iteratee: ValueOnlyIteratee<T>
): ((a1: Array<T>) => (a2: Array<T>) => Array<T>) &
((a1: Array<T>, a2: Array<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1759..1762
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1889..1892
flow-typed/npm/lodash_v4.x.x.js on lines 1916..1919
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1951..1954
flow-typed/npm/lodash_v4.x.x.js on lines 1973..1976

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

unionWith<T>(
comparator: Comparator<T>
): ((a1: Array<T>) => (a2: Array<T>) => Array<T>) &
((a1: Array<T>, a2: Array<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1759..1762
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1876..1879
flow-typed/npm/lodash_v4.x.x.js on lines 1916..1919
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1951..1954
flow-typed/npm/lodash_v4.x.x.js on lines 1973..1976

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

xorBy<T>(
iteratee: ValueOnlyIteratee<T>
): ((a1: Array<T>) => (a2: Array<T>) => Array<T>) &
((a1: Array<T>, a2: Array<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1759..1762
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1876..1879
flow-typed/npm/lodash_v4.x.x.js on lines 1889..1892
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1951..1954
flow-typed/npm/lodash_v4.x.x.js on lines 1973..1976

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

symmetricDifferenceWith<T>(
comparator: Comparator<T>
): ((a1: Array<T>) => (a2: Array<T>) => Array<T>) &
((a1: Array<T>, a2: Array<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1759..1762
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1876..1879
flow-typed/npm/lodash_v4.x.x.js on lines 1889..1892
flow-typed/npm/lodash_v4.x.x.js on lines 1916..1919
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1973..1976

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

intersectionWith<T>(
comparator: Comparator<T>
): ((a1: Array<T>) => (a2: Array<T>) => Array<T>) &
((a1: Array<T>, a2: Array<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1876..1879
flow-typed/npm/lodash_v4.x.x.js on lines 1889..1892
flow-typed/npm/lodash_v4.x.x.js on lines 1916..1919
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1951..1954
flow-typed/npm/lodash_v4.x.x.js on lines 1973..1976

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

zipWith<T>(
iteratee: Iteratee<T>
): ((a1: NestedArray<T>) => (a2: NestedArray<T>) => Array<T>) &
((a1: NestedArray<T>, a2: NestedArray<T>) => Array<T>);
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 9 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1746..1749
flow-typed/npm/lodash_v4.x.x.js on lines 1759..1762
flow-typed/npm/lodash_v4.x.x.js on lines 1792..1795
flow-typed/npm/lodash_v4.x.x.js on lines 1876..1879
flow-typed/npm/lodash_v4.x.x.js on lines 1889..1892
flow-typed/npm/lodash_v4.x.x.js on lines 1916..1919
flow-typed/npm/lodash_v4.x.x.js on lines 1929..1932
flow-typed/npm/lodash_v4.x.x.js on lines 1942..1945
flow-typed/npm/lodash_v4.x.x.js on lines 1951..1954

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

assignWith<T: Object, A: Object, B: Object>(
object: T,
s1: A,
s2: B,
customizer?: (
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 951..962
flow-typed/npm/lodash_v4.x.x.js on lines 1068..1079
flow-typed/npm/lodash_v4.x.x.js on lines 1172..1183

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

extendWith<T: Object, A: Object, B: Object>(
object: T,
s1: A,
s2: B,
customizer?: (
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 951..962
flow-typed/npm/lodash_v4.x.x.js on lines 1002..1013
flow-typed/npm/lodash_v4.x.x.js on lines 1172..1183

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

assignInWith<T: Object, A: Object, B: Object>(
object: T,
s1: A,
s2: B,
customizer?: (
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 1002..1013
flow-typed/npm/lodash_v4.x.x.js on lines 1068..1079
flow-typed/npm/lodash_v4.x.x.js on lines 1172..1183

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

mergeWith<T: Object, A: Object, B: Object>(
object: T,
s1: A,
s2: B,
customizer?: (
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 3 hrs to fix
flow-typed/npm/lodash_v4.x.x.js on lines 951..962
flow-typed/npm/lodash_v4.x.x.js on lines 1002..1013
flow-typed/npm/lodash_v4.x.x.js on lines 1068..1079

Function render has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

render() {
if (!this.props.problem) {
return null;
}
 
 
Severity: Major
Found in src/client/problems/pages/problem.tsx - About 3 hrs to fix

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

    differenceWith<T>(
    values: $ReadOnlyArray<T>
    ): ((comparator: Comparator<T>) => (array: $ReadOnlyArray<T>) => T[]) &
    ((comparator: Comparator<T>, array: $ReadOnlyArray<T>) => T[]);
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 3 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1635..1638

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

    differenceBy<T>(
    iteratee: ValueOnlyIteratee<T>
    ): ((values: $ReadOnlyArray<T>) => (array: $ReadOnlyArray<T>) => T[]) &
    ((values: $ReadOnlyArray<T>, array: $ReadOnlyArray<T>) => T[]);
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 3 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1648..1651

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

    intersectionBy<T>(
    a1?: ?Array<T>,
    a2?: ?Array<T>,
    a3?: ?Array<T>,
    a4?: ?Array<T>,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 3 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 299..305

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

    intersectionWith<T>(
    a1?: ?Array<T>,
    a2?: ?Array<T>,
    a3?: ?Array<T>,
    a4?: ?Array<T>,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 3 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 279..285

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

    if (this.props.auth.error === "Access Denied") {
    if (!this.state.isUsernameFieldIncorrect) {
    let newState = Object.assign({}, this.state, {isUsernameFieldIncorrect: true});
    this.setState(newState);
    }
    Severity: Major
    Found in src/client/users/pages/login.tsx and 2 other locations - About 2 hrs to fix
    src/client/users/pages/signup.tsx on lines 80..86
    src/client/users/pages/signup.tsx on lines 88..94

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

    if (this.props.auth.error === "Email is already used") {
    if(!this.state.isEmailFieldIncorrect){
    let newState = Object.assign({}, this.state, {isEmailFieldIncorrect: true});
    this.setState(newState);
    }
    Severity: Major
    Found in src/client/users/pages/signup.tsx and 2 other locations - About 2 hrs to fix
    src/client/users/pages/login.tsx on lines 58..64
    src/client/users/pages/signup.tsx on lines 80..86

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

    if (this.props.auth.error === 'User name is already used') {
    if(!this.state.isUserNameFieldIncorrect){
    let newState = Object.assign({}, this.state, {isUserNameFieldIncorrect: true});
    this.setState(newState);
    }
    Severity: Major
    Found in src/client/users/pages/signup.tsx and 2 other locations - About 2 hrs to fix
    src/client/users/pages/login.tsx on lines 58..64
    src/client/users/pages/signup.tsx on lines 88..94

    Function render has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    render() {
    const {
    problems,
    problemsFilter,
    submissions,
    Severity: Major
    Found in src/client/problems/pages/problems.tsx - About 2 hrs to fix

      File problem.tsx has 285 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import * as React from 'react';
      import {Grid, Button, Row} from 'react-bootstrap';
      import {connect} from 'react-redux';
       
      import {store} from '../../common';
      Severity: Minor
      Found in src/client/problems/pages/problem.tsx - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language