ilyalehchylin/educats-xamarin

View on GitHub

Showing 139 of 319 total issues

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

                    foreach (var labs in fullMarksLabs.Students.Where(v => v.FullName == studentName))
                    {
                        save.studentId = labs.StudentId;
                        save.showForStudent = ShowForStud;
                        save.mark = Mark;
source/EduCATS/Pages/SaveLabsAndPracticeMarks/ViewModels/SaveSingleStudentMarkPageViewModel.cs on lines 76..87

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

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

        double calculateAvgPractMarks(List<PracticialMarks> practicalsMarks)
        {
            if (practicalsMarks == null)
            {
                return 0;
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 657..683
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 685..707

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

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

        double calculateAvgLabsMarkTest(List<LabMarks> marks)
        {
            if (marks == null)
            {
                return 0;
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 596..622
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 685..707

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

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

        double calculateAvgLabsMark(IList<StatsMarkModel> marks)
        {
            if (marks == null) {
                return 0;
            }
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 596..622
source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs on lines 657..683

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

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

        Button createResetPasswordButton()
        {
            var chekInButton = new Button
            {
                Text = CrossLocalization.Translate("reset_password"),
source/EduCATS/Pages/Parental/FindGroup/Views/FindGroupPageView.cs on lines 145..160
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 306..320

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

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

        Button createFindButton()
        {
            var findButton = new Button
            {
                Text = CrossLocalization.Translate("parental_get_statistics"),
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 235..249
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 306..320

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

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

        Button createCheckInButton()
        {
            var chekInButton = new Button
            {
                Text = CrossLocalization.Translate("chek_In"),
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 235..249
source/EduCATS/Pages/Parental/FindGroup/Views/FindGroupPageView.cs on lines 145..160

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

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 5 locations. Consider refactoring.
Open

        CachedImage createShowConfirmPasswordImage()
        {
            var showPasswordImage = new CachedImage
           {
                HeightRequest = _showPasswordIconSize,
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 168..184
source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 343..359
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 181..197
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 212..228

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

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 5 locations. Consider refactoring.
Open

        CachedImage createShowPasswordImage()
        {
            var showPasswordImage = new CachedImage
            {
                HeightRequest = _showPasswordIconSize,
Severity: Major
Found in source/EduCATS/Pages/Login/Views/LoginPageView.cs and 4 other locations - About 1 hr to fix
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 168..184
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 200..216
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 181..197
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 212..228

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

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 5 locations. Consider refactoring.
Open

        CachedImage createShowPasswordImage()
        {
            var showPasswordImage = new CachedImage
            {
                HeightRequest = _showPasswordIconSize,
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 168..184
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 200..216
source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 343..359
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 212..228

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

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 5 locations. Consider refactoring.
Open

        CachedImage createShowConfirmPasswordImage()
        {
            var showPasswordImage = new CachedImage
            {
                HeightRequest = _showPasswordIconSize,
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 168..184
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 200..216
source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 343..359
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 181..197

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

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 5 locations. Consider refactoring.
Open

        CachedImage createShowNewPasswordImage()
        {
            var showPasswordImage = new CachedImage
            {
                HeightRequest = _showPasswordIconSize,
source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 200..216
source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 343..359
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 181..197
source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 212..228

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

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

        public static Style GetEntryStyle(NamedSize size = NamedSize.Medium, bool bold = false)
        {
            return new Style(typeof(Entry)) {
                Setters = {
                    getSetter(Entry.FontSizeProperty, FontSizeController.GetSize(size, typeof(Entry))),
Severity: Major
Found in source/EduCATS/Helpers/Forms/Styles/AppStyles.cs and 2 other locations - About 1 hr to fix
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 19..28
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 30..39

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

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

        public static Style GetButtonStyle(NamedSize size = NamedSize.Medium, bool bold = false)
        {
            return new Style(typeof(Button)) {
                Setters = {
                    getSetter(Button.FontSizeProperty, FontSizeController.GetSize(size, typeof(Button))),
Severity: Major
Found in source/EduCATS/Helpers/Forms/Styles/AppStyles.cs and 2 other locations - About 1 hr to fix
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 8..17
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 30..39

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

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

        public static Style GetLabelStyle(NamedSize size = NamedSize.Medium, bool bold = false)
        {
            return new Style(typeof(Label)) {
                Setters = {
                    getSetter(Label.FontSizeProperty, FontSizeController.GetSize(size, typeof(Label))),
Severity: Major
Found in source/EduCATS/Helpers/Forms/Styles/AppStyles.cs and 2 other locations - About 1 hr to fix
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 8..17
source/EduCATS/Helpers/Forms/Styles/AppStyles.cs on lines 19..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 118.

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

        protected void chooseGroup()
        {
            try {
                if (CurrentGroups == null) {
                    return;
Severity: Major
Found in source/EduCATS/Pages/Pickers/GroupsViewModel.cs and 1 other location - About 1 hr to fix
source/EduCATS/Pages/Pickers/SubjectsViewModel.cs on lines 63..80

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

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

        protected void chooseSubject()
        {
            try {
                if (CurrentSubjects == null) {
                    return;
Severity: Major
Found in source/EduCATS/Pages/Pickers/SubjectsViewModel.cs and 1 other location - About 1 hr to fix
source/EduCATS/Pages/Pickers/GroupsViewModel.cs on lines 114..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 117.

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

            {
                string link = Links.GetLabsCalendarData + "subjectId=" + subjectId + "&groupId=" + groupId;
                var obj = requestDataAsync(link, httpContent);
                labsVisitingList = JsonConvert.DeserializeObject<LabsVisitingList>(obj.Result.ToString());
                BindingContext = new SaveMarksPageViewModel(new PlatformServices(), subjectId, labsVisitingList, groupId, title);
Severity: Major
Found in source/EduCATS/Pages/SaveMarks/Views/SaveMarksPageView.cs and 1 other location - About 1 hr to fix
source/EduCATS/Pages/SaveMarks/Views/SaveMarksPageView.cs on lines 46..51

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

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

        protected virtual async Task<List<StatsStudentModel>> getStatistics()
        {
            if (CurrentGroup == null) {
                return null;
            }
source/EduCATS/Pages/Parental/Statistics/StudentListPage/ViewModels/ParentalStudentsPageViewModel.cs on lines 65..80

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

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

            {
                string link = Links.GetLecturesCalendarData + "subjectId=" + subjectId + "&groupId=" + groupId;
                var obj = requestDataAsync(link, httpContent);
                groupData = JsonConvert.DeserializeObject<VisitingLecturesList>(obj.Result.ToString());
                BindingContext = new SaveMarksPageViewModel(new PlatformServices(), subjectId, groupData, groupId, title);
Severity: Major
Found in source/EduCATS/Pages/SaveMarks/Views/SaveMarksPageView.cs and 1 other location - About 1 hr to fix
source/EduCATS/Pages/SaveMarks/Views/SaveMarksPageView.cs on lines 53..58

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

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