ilyalehchylin/educats-xamarin

View on GitHub

Showing 251 of 326 total issues

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

Method speechToText has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected async Task speechToText()
        {
            try {
                if (string.IsNullOrEmpty(NewsTitle) && string.IsNullOrEmpty(NewsBody)) {
                    return;

    Method createRightLabelLayout has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            Label createRightLabelLayout(
                string title, string bindingProperty = null, NamedSize namedSize = NamedSize.Medium)
            {
                var color = Color.FromHex(Theme.Current.AboutTextColor);
    
    
    Severity: Minor
    Found in source/EduCATS/Pages/Settings/About/Views/AboutPageView.cs - About 1 hr to fix

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

                  {
                      var dateforLectures = dateLecturesPicker();
                      resultsListView = new RoundedListView(typeof(VisitingPageViewCell))
                      {
                          IsPullToRefreshEnabled = false,
      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 153..173

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

      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

                  {
                      var dateforPractice = datePractPicker();
                      resultsListView = new RoundedListView(typeof(VisitingPageViewCell))
                      {
                          IsPullToRefreshEnabled = false,
      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 107..127

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

      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

      Method createMascotImage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              RelativeLayout createMascotImage()
              {
                  var relativeLayout = new RelativeLayout();
      
                  _mascotTailImage = new CachedImage
      Severity: Minor
      Found in source/EduCATS/Pages/Login/Views/LoginPageView.cs - About 1 hr to fix

        Method OnBindingContextChanged has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                protected override void OnBindingContextChanged()
                {
                    base.OnBindingContextChanged();
        
                    if (!(BindingContext is ConceptModel)) {
        Severity: Minor
        Found in source/EduCATS/Pages/Eemc/Views/ViewCell/EemcPageViewCell.cs - About 1 hr to fix

          Method createLoginForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  StackLayout createLoginForm()
                  {
                      var mascotImage = createMascotImage();
                      var entryStyle = getEntryStyle();
                      var usernameEntry = createUsernameEntry(entryStyle);
          Severity: Minor
          Found in source/EduCATS/Pages/Login/Views/LoginPageView.cs - About 1 hr to fix

            Method addResources has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    void addResources()
                    {
                        var visualState = new VisualState {
                            Name = "Selected",
                            Setters = {

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

                      Entry createNewPasswordEntry(Style style)
                      {
                          var password = new Entry
                          {
                              Style = style,
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 219..233
              source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 248..262
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 230..244
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 246..260

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

              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

                      Entry createConfirmPasswordEntry(Style style)
                      {
                          var password = new Entry
                          {
                              Style = style,
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 152..166
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 219..233
              source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 248..262
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 230..244

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

              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

                      Entry createPasswordEntry(Style style)
                      {
                          var password = new Entry
                          {
                              Style = style,
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 152..166
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 219..233
              source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 248..262
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 246..260

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

              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

                      Entry createConfirmPasswordEntry(Style style)
                      {
                          var password = new Entry
                          {
                              Style = style,
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 152..166
              source/EduCATS/Pages/Login/Views/LoginPageView.cs on lines 248..262
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 230..244
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 246..260

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

              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

                      Entry createPasswordEntry(Style style)
                      {
                          var password = new Entry
                          {
                              Style = style,
              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 152..166
              source/EduCATS/Pages/ForgotPassword/Views/ForgotPasswordPageView.cs on lines 219..233
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 230..244
              source/EduCATS/Pages/Registration/Views/RegistrationPageView.cs on lines 246..260

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

              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

              Method RegistrationPostAsync has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public async Task<KeyValuePair<string, HttpStatusCode>> RegistrationPostAsync(string username, string name, string surname, string patronymic, string password, string confirmPassword,
                                      int group, int questionId, string answerToSecretQuestion)

                Method calendarPositionChangedEvent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        protected void calendarPositionChangedEvent(CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
                        {
                            try
                            {
                                selectTodayDateWithoutSelectedFlag();
                Severity: Minor
                Found in source/EduCATS/Pages/Today/Base/ViewModels/TodayPageViewModel.cs - About 1 hr to fix

                  Method createLecturesVisitingPage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          void createLecturesVisitingPage(VisitingLecturesList statistics)
                          {
                              _currentLecturesVisitingMarks = new List<VisitingPageModel>();
                              LecturesMarks = new List<VisitingPageModel>();
                              Date = new List<string>();
                  Severity: Minor
                  Found in source/EduCATS/Pages/SaveMarks/ViewModels/SaveMarksPageViewModel.cs - About 1 hr to fix

                    Method createSummary has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            Frame createSummary()
                            {
                                var summaryLabel = new Label
                                {
                                    Style = AppStyles.GetLabelStyle(NamedSize.Large),

                      Method GetDemoResponse has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public KeyValuePair<string, HttpStatusCode> GetDemoResponse(AppDemoType type)
                              {
                                  if (type == AppDemoType.None) {
                                      return GetInvalidResponse();
                                  }
                      Severity: Minor
                      Found in source/EduCATS/Demo/AppDemo.cs - About 1 hr to fix

                        Method createHeaderView has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                StackLayout createHeaderView()
                                {
                                    var groupsPicker = new GroupsPickerView();
                                    var searchBar = createSearchBar();
                                    var addMarks = createAddMarksButton();
                        Severity: Minor
                        Found in source/EduCATS/Pages/Statistics/Students/Views/StudentsPageView.cs - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language