fremag/MemoScope.Net

View on GitHub

Showing 125 of 126 total issues

Method Setup has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void Setup(ClrDump clrDump)
        {
            ClrDump = clrDump;
            Icon = Properties.Resources.processor_small;
            Name = $"#{clrDump.Id} - Threads";
Severity: Minor
Found in MemoScope/Modules/Threads/ThreadsModule.cs - About 1 hr to fix

    Method Analyse has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            internal static List<StringInformation> Analyse(ClrDump clrDump, MessageBus msgBus)
            {
                var stringType = clrDump.GetClrType(typeof(string).FullName);
                var stringInstances = clrDump.EnumerateInstances(stringType);
                int nbStrings = clrDump.CountInstances(stringType);
    Severity: Minor
    Found in MemoScope/Modules/Strings/StringAnalysis.cs - About 1 hr to fix

      Method Run has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void Run()
              {
                  while (!stopRequested)
                  {
                      SimpleTask task;
      Severity: Minor
      Found in MemoScope/Core/SingleThreadWorker.cs - About 1 hr to fix

        Method AnalyzeRootPath has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static List<RootPathInformation> AnalyzeRootPath(MessageBus msgBus, ClrDumpObject clrDumpObject)
                {
                    ClrDump clrDump = clrDumpObject.ClrDump;
                    ulong address = clrDumpObject.Address;
                    CancellationTokenSource token = new CancellationTokenSource();
        Severity: Minor
        Found in MemoScope/Modules/RootPath/RootPathAnalysis.cs - About 1 hr to fix

          Method tspApplyfilter_Click has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void tspApplyfilter_Click(object sender, EventArgs e)
                  {
                      var triggers = codeTriggersControl.Triggers.Where(trig => trig.Active).ToArray();
                      TypeRegistry reg = new TypeRegistry();
                      reg.RegisterType<DateTime>();
          Severity: Minor
          Found in MemoScope/Modules/Instances/InstancesModule.cs - About 1 hr to fix

            Method HandleMessage has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void HandleMessage(OpenDumpRequest openDumpRequest)
                    {
                        CancellationTokenSource source = new CancellationTokenSource();
                        var token = source.Token;
                        foreach (var fileInfo in openDumpRequest.FileInfos.Where(fi => fi != null))
            Severity: Minor
            Found in MemoScope/Services/DumpLoaderService.cs - About 1 hr to fix

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

              using MemoScope.Core;
              using System.Windows.Forms;
              using WinFwk.UICommands;
              using WinFwk.UIModules;
              
              
              Severity: Major
              Found in MemoScope/Modules/BlockingObjects/BlockingObjectsCommand.cs and 1 other location - About 1 hr to fix
              MemoScope/Modules/Threads/ThreadsCommand.cs on lines 1..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 125.

              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

              using MemoScope.Core;
              using System.Windows.Forms;
              using WinFwk.UICommands;
              using WinFwk.UIModules;
              
              
              Severity: Major
              Found in MemoScope/Modules/Threads/ThreadsCommand.cs and 1 other location - About 1 hr to fix
              MemoScope/Modules/BlockingObjects/BlockingObjectsCommand.cs on lines 1..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 125.

              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 GetSimpleValue has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static object GetSimpleValue(ulong objAddress, ClrType clrType, bool isInterior=false)
                      {
                          if (objAddress == 0)
                              throw new NullReferenceException("ClrObject at is pointing to null address.");
              
              
              Severity: Minor
              Found in MemoScope/Core/Data/SimpleValueHelper.cs - About 1 hr to fix

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

                    public class DelegatesCommand : AbstractDataUICommand<ClrDump>
                    {
                        public DelegatesCommand() : base("Delegate Types", "Display Delegate Types (inherinting MultiCastDelegate type)", "Analysis", Properties.Resources.macro_show_all_actions, Keys.Control | Keys.Shift | Keys.D)
                        {
                
                
                Severity: Major
                Found in MemoScope/Modules/Delegates/Types/DelegateTypesCommand.cs and 1 other location - About 1 hr to fix
                MemoScope/Modules/Disposables/DisposableTypesCommand.cs on lines 8..19

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

                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

                    public class DisposablesCommand : AbstractDataUICommand<ClrDump>
                    {
                        public DisposablesCommand() : base("Disposable Types", "Display Disposable Types (inherinting IDisposable interface)", "Analysis", Properties.Resources.recycle_bag, Keys.Control | Keys.Shift | Keys.B)
                        {
                
                
                Severity: Major
                Found in MemoScope/Modules/Disposables/DisposableTypesCommand.cs and 1 other location - About 1 hr to fix
                MemoScope/Modules/Delegates/Types/DelegateTypesCommand.cs on lines 8..19

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

                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 Run has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public override void Run()
                        {
                            locks = new string[NbThreads];
                            for (int i = 0; i < NbThreads; i++)
                            {
                Severity: Minor
                Found in MemoDummy/LockedThreadScript.cs - About 1 hr to fix

                  Method Run has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public override void Run()
                          {
                              string lockB = "Lock_A";
                              string lockA = "Lock_B";
                              Thread thread = new Thread(() =>
                  Severity: Minor
                  Found in MemoDummy/DeadLockedThreadScript.cs - About 1 hr to fix

                    Method Run has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public override void Run()
                            {
                                for(int i=0; i < N; i++)
                                {
                                    Thread t = new Thread(() => DoSomething(i));
                    Severity: Minor
                    Found in MemoDummy/ThreadsScript.cs - About 1 hr to fix

                      Method GetFuncName has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              internal static string GetFuncName(ClrElementType elementType)
                              {
                                  switch(elementType)
                                  {
                                      case ClrElementType.Boolean:
                      Severity: Minor
                      Found in MemoScope/Modules/Instances/FieldAccessor.cs - About 1 hr to fix

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

                        using MemoScope.Core;
                        using WinFwk.UICommands;
                        using WinFwk.UIModules;
                        
                        namespace MemoScope.Modules.Segments
                        Severity: Major
                        Found in MemoScope/Modules/Segments/SegmentsCommand.cs and 9 other locations - About 1 hr to fix
                        MemoScope/Modules/Arrays/ArraysCommand.cs on lines 1..20
                        MemoScope/Modules/Bookmarks/BookmarkCommand.cs on lines 1..22
                        MemoScope/Modules/ClrRoots/ClrRootsCommand.cs on lines 1..20
                        MemoScope/Modules/Finalizer/FinalizerCommand.cs on lines 1..20
                        MemoScope/Modules/Handles/HandlesCommand.cs on lines 1..20
                        MemoScope/Modules/Modules/ModuleCommand.cs on lines 1..20
                        MemoScope/Modules/Regions/RegionsCommand.cs on lines 1..20
                        MemoScope/Modules/Strings/StringsCommand.cs on lines 1..20
                        MemoScope/Modules/ThreadPool/ThreadPoolCommand.cs on lines 1..20

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

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

                        using MemoScope.Core;
                        using WinFwk.UICommands;
                        using WinFwk.UIModules;
                        
                        namespace MemoScope.Modules.ThreadPool
                        Severity: Major
                        Found in MemoScope/Modules/ThreadPool/ThreadPoolCommand.cs and 9 other locations - About 1 hr to fix
                        MemoScope/Modules/Arrays/ArraysCommand.cs on lines 1..20
                        MemoScope/Modules/Bookmarks/BookmarkCommand.cs on lines 1..22
                        MemoScope/Modules/ClrRoots/ClrRootsCommand.cs on lines 1..20
                        MemoScope/Modules/Finalizer/FinalizerCommand.cs on lines 1..20
                        MemoScope/Modules/Handles/HandlesCommand.cs on lines 1..20
                        MemoScope/Modules/Modules/ModuleCommand.cs on lines 1..20
                        MemoScope/Modules/Regions/RegionsCommand.cs on lines 1..20
                        MemoScope/Modules/Segments/SegmentsCommand.cs on lines 1..20
                        MemoScope/Modules/Strings/StringsCommand.cs on lines 1..20

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

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

                        using MemoScope.Core;
                        using WinFwk.UICommands;
                        using WinFwk.UIModules;
                        
                        namespace MemoScope.Modules.ClrRoots
                        Severity: Major
                        Found in MemoScope/Modules/ClrRoots/ClrRootsCommand.cs and 9 other locations - About 1 hr to fix
                        MemoScope/Modules/Arrays/ArraysCommand.cs on lines 1..20
                        MemoScope/Modules/Bookmarks/BookmarkCommand.cs on lines 1..22
                        MemoScope/Modules/Finalizer/FinalizerCommand.cs on lines 1..20
                        MemoScope/Modules/Handles/HandlesCommand.cs on lines 1..20
                        MemoScope/Modules/Modules/ModuleCommand.cs on lines 1..20
                        MemoScope/Modules/Regions/RegionsCommand.cs on lines 1..20
                        MemoScope/Modules/Segments/SegmentsCommand.cs on lines 1..20
                        MemoScope/Modules/Strings/StringsCommand.cs on lines 1..20
                        MemoScope/Modules/ThreadPool/ThreadPoolCommand.cs on lines 1..20

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

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

                        using MemoScope.Core;
                        using WinFwk.UICommands;
                        using WinFwk.UIModules;
                        
                        namespace MemoScope.Modules.Strings
                        Severity: Major
                        Found in MemoScope/Modules/Strings/StringsCommand.cs and 9 other locations - About 1 hr to fix
                        MemoScope/Modules/Arrays/ArraysCommand.cs on lines 1..20
                        MemoScope/Modules/Bookmarks/BookmarkCommand.cs on lines 1..22
                        MemoScope/Modules/ClrRoots/ClrRootsCommand.cs on lines 1..20
                        MemoScope/Modules/Finalizer/FinalizerCommand.cs on lines 1..20
                        MemoScope/Modules/Handles/HandlesCommand.cs on lines 1..20
                        MemoScope/Modules/Modules/ModuleCommand.cs on lines 1..20
                        MemoScope/Modules/Regions/RegionsCommand.cs on lines 1..20
                        MemoScope/Modules/Segments/SegmentsCommand.cs on lines 1..20
                        MemoScope/Modules/ThreadPool/ThreadPoolCommand.cs on lines 1..20

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

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

                        using MemoScope.Core;
                        using WinFwk.UICommands;
                        using WinFwk.UIModules;
                        
                        namespace MemoScope.Modules.Bookmarks
                        Severity: Major
                        Found in MemoScope/Modules/Bookmarks/BookmarkCommand.cs and 9 other locations - About 1 hr to fix
                        MemoScope/Modules/Arrays/ArraysCommand.cs on lines 1..20
                        MemoScope/Modules/ClrRoots/ClrRootsCommand.cs on lines 1..20
                        MemoScope/Modules/Finalizer/FinalizerCommand.cs on lines 1..20
                        MemoScope/Modules/Handles/HandlesCommand.cs on lines 1..20
                        MemoScope/Modules/Modules/ModuleCommand.cs on lines 1..20
                        MemoScope/Modules/Regions/RegionsCommand.cs on lines 1..20
                        MemoScope/Modules/Segments/SegmentsCommand.cs on lines 1..20
                        MemoScope/Modules/Strings/StringsCommand.cs on lines 1..20
                        MemoScope/Modules/ThreadPool/ThreadPoolCommand.cs on lines 1..20

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

                        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