Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

Function getAllChallenges has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        vm.getAllChallenges = function(parameters, counter){
            parameters.callback = {
                onSuccess: function(response) {
                    var status = response.status;
                    var details = response.data;
Severity: Minor
Found in frontend/src/js/controllers/dashCtrl.js - About 1 hr to fix

    Function editChallengeTitle has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      editChallengeTitle() {
        const SELF = this;
    
        SELF.apiCall = (params) => {
          const BODY = JSON.stringify(params);

      Function addMembersToTeam has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          const addMembersToTeam = (team) => {
            SELF.apiCall = (params) => {
              const BODY = JSON.stringify(params);
              let apiPath = SELF.endpointsService.participantTeamInviteURL(team);
              if (SELF.isHost) {

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

                    onSuccess: function (response) {
                        var status = response.status;
                        var data = response.data;
                        if (status == 200) {
                            vm.user.name = data.username;
        Severity: Major
        Found in frontend/src/js/directives/directives.js and 1 other location - About 1 hr to fix
        frontend/src/js/controllers/mainCtrl.js on lines 49..55

        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 63.

        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

                            onSuccess: function(response) {
                                var status = response.status;
                                var details = response.data;
                                if (status == 200) {
                                    vm.user.name = details.username;
        Severity: Major
        Found in frontend/src/js/controllers/mainCtrl.js and 1 other location - About 1 hr to fix
        frontend/src/js/directives/directives.js on lines 101..107

        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 63.

        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

              SELF.apiService
                .patchFileUrl(
                  SELF.endpointsService.editChallengeDetailsURL(SELF.challenge.creator.id, SELF.challenge.id),
                  FORM_DATA
                )
        frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1161..1177

        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 63.

        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

                  (data) => {
                    for (const attrname of Object.keys(data)) {
                      SELF.selectedPhase[attrname] = data[attrname];
                    }
                    SELF.globalService.showToast('success', 'The challenge phase details are successfully updated!');
        frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 575..580

        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 63.

        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

                  (data) => {
                    for (const attrname of Object.keys(data)) {
                      SELF.selectedPhase[attrname] = data[attrname];
                    }
                    SELF.globalService.showToast('success', 'Challenge phase description updated successfully!');
        frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 974..979

        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 63.

        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

        export class PartnersComponent implements OnInit {
          /**
           * Component constructor
           */
          constructor() {}
        frontend_v2/src/app/components/not-found/not-found.component.ts on lines 11..21

        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 63.

        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

        export class NotFoundComponent implements OnInit {
          /**
           * Constructor.
           */
          constructor() {}
        frontend_v2/src/app/components/home/partners/partners.component.ts on lines 11..21

        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 63.

        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 update_failed_jobs_and_send_logs has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def update_failed_jobs_and_send_logs(
        Severity: Major
        Found in scripts/workers/code_upload_submission_worker.py - About 1 hr to fix

          Function cleanup_submission has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def cleanup_submission(
          Severity: Major
          Found in scripts/workers/code_upload_submission_worker.py - About 1 hr to fix

            Function onSuccess has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            onSuccess: function(response) {
                                var details = response.data;
                                vm.submissionResult = details;
            
                                if (vm.submissionResult.count === 0) {
            Severity: Minor
            Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

              Function createTeamSubmit has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                createTeamSubmit(isvalidForm) {
                  if (isvalidForm) {
                    const API_PATH = 'participants/participant_team';
                    const url = this.create_team['team_url'];
                    let TEAM_BODY: any = {

                Function deleteChallenge has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  deleteChallenge() {
                    const SELF = this;
                    const redirectTo = '/dashboard';
                
                    SELF.apiCall = () => {

                  Function createTeamSubmit has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    createTeamSubmit(isvalidForm) {
                      if (isvalidForm) {
                        const API_PATH = this.createTeamsPath;
                        const url = this.create_team['team_url'];
                        let TEAM_BODY: any = {

                    Function countDownTimer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      countDownTimer(SELF, eachPhase) {
                        if (!SELF.isClockStarted) {
                          SELF.remainingTime = parseInt(eachPhase.limits.remaining_time, 10);
                        }
                        SELF.days = Math.floor(SELF.remainingTime / 24 / 60 / 60);

                      Function editForumURL has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        editForumURL() {
                          const SELF = this;
                          SELF.apiCall = (params) => {
                            const BODY = JSON.stringify(params);
                            SELF.apiService

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

                          beforeEach(async(() => {
                            TestBed.configureTestingModule({
                              declarations: [AboutComponent, HeaderStaticComponent, FooterComponent],
                              providers: [GlobalService, AuthService, ApiService, EndpointsService],
                              imports: [RouterTestingModule, HttpClientModule],
                        frontend_v2/src/app/components/get-involved/get-involved.component.spec.ts on lines 22..28
                        frontend_v2/src/app/components/privacy-policy/privacy-policy.component.spec.ts on lines 30..36

                        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 62.

                        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

                          beforeEach(async(() => {
                            TestBed.configureTestingModule({
                              declarations: [GetInvolvedComponent, HeaderStaticComponent, FooterComponent],
                              providers: [GlobalService, AuthService, ApiService, EndpointsService],
                              imports: [RouterTestingModule, HttpClientModule],
                        frontend_v2/src/app/components/about/about.component.spec.ts on lines 19..25
                        frontend_v2/src/app/components/privacy-policy/privacy-policy.component.spec.ts on lines 30..36

                        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 62.

                        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