mrksbrg/ImpRec

View on GitHub

Showing 20 of 33 total issues

Method InitializeComponent has 252 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImpRecGUI));
            this.txtInput = new System.Windows.Forms.TextBox();
            this.btnImpact = new System.Windows.Forms.Button();
Severity: Major
Found in UI/ImpRecGUI.Designer.cs - About 1 day to fix

    File KnowlParser.cs has 348 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    Severity: Minor
    Found in Logic/KnowlParser.cs - About 4 hrs to fix

      Method txtImpact_Click has 102 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void txtImpact_Click(object sender, EventArgs e)
              {
                  // Remove help text
                  lstRelated.Visible = true;
                  lstImpacted.Visible = true;
      Severity: Major
      Found in UI/ImpRecGUI.cs - About 4 hrs to fix

        File SessionInfo.cs has 328 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Text;
        using System.Threading.Tasks;
        Severity: Minor
        Found in Logic/SessionInfo.cs - About 3 hrs to fix

          Method StartTextElement has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void StartTextElement(string strText)
                  {
                      if (nodeMode == 1) // Tracker case
                      {
                          if (currentTrackerCase == null)
          Severity: Major
          Found in Logic/KnowlParser.cs - About 3 hrs to fix

            File ImpRecGUI.cs has 310 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            using System;
            using System.Collections.Generic;
            using System.ComponentModel;
            using System.Data;
            using System.Drawing;
            Severity: Minor
            Found in UI/ImpRecGUI.cs - About 3 hrs to fix

              File ImpRecGUI.Designer.cs has 299 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              namespace ImpRec
              {
                  partial class ImpRecGUI
                  {
                      /// <summary>
              Severity: Minor
              Found in UI/ImpRecGUI.Designer.cs - About 3 hrs to fix

                Method StartElement has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void StartElement(string strURI, string strName, string strName_2, Hashtable attributes)
                        {
                            if (strName == "TrackerCase")
                            {
                                nodeMode = 1;
                Severity: Major
                Found in Logic/KnowlParser.cs - About 2 hrs to fix

                  Method ToString has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              public override String ToString()
                              {
                                  StringBuilder tmpString = new StringBuilder();
                                  if (feedbackType == 1)
                                  {
                  Severity: Minor
                  Found in Logic/SessionInfo.cs - About 1 hr to fix

                    Method FindImpact has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public LinkedList<ImpactItem> FindImpact(LinkedList<ImpactItem> impactList, double level, double startSimilarity)
                            {
                                if (Visited)
                                {
                                    return impactList;
                    Severity: Minor
                    Found in Logic/TrackerCase.cs - About 1 hr to fix

                      Method ParseImpactAnalyses has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public void ParseImpactAnalyses()
                              {
                                  string line;
                      
                                  // Read the file line by line
                      Severity: Minor
                      Found in Logic/KnowlParser.cs - About 1 hr to fix

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

                                public void ParseSemNet()
                                {
                                    try
                                    {
                                        XDocument doc = XDocument.Parse(ImpRec.Properties.Resources.semanticNetwork);
                        Severity: Minor
                        Found in Logic/KnowlParser.cs - About 1 hr to fix

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

                                  public void ParseIssueText()
                                  {
                                      int lineType = 1; // 1 = id, 2 = title, 3 = desc, 4 = blank
                                      string line;
                                      TrackerCase tmpCase = null;
                          Severity: Minor
                          Found in Logic/KnowlParser.cs - About 1 hr to fix

                            Method GetAllLinks has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public LinkedList<ImpactItem> GetAllLinks()
                                    {
                                        LinkedList<ImpactItem> mergedList = new LinkedList<ImpactItem>();
                            
                                        foreach (ImpactItem ii in needsUpdateLinks)
                            Severity: Minor
                            Found in Logic/TrackerCase.cs - About 1 hr to fix

                              Method lstRelated_SelectedIndexChanged has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      private void lstRelated_SelectedIndexChanged(object sender, EventArgs e)
                                      {
                                          // Reset all selections in lstImpacted
                                          for (int k = 0; k < lstImpacted.Items.Count; k++)
                                          {
                              Severity: Minor
                              Found in UI/ImpRecGUI.cs - About 1 hr to fix

                                Method StartTextElement has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                                Open

                                        private void StartTextElement(string strText)
                                        {
                                            if (nodeMode == 1) // Tracker case
                                            {
                                                if (currentTrackerCase == null)
                                Severity: Minor
                                Found in Logic/KnowlParser.cs - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Avoid deeply nested control flow statements.
                                Open

                                                            if (ii.ArtifactID.Equals(lstImpacted.Items[j].SubItems[2].Text))
                                                            {
                                                                lstImpacted.Items[j].BackColor = Color.LightBlue;
                                
                                                                if (j < posOfHighest)
                                Severity: Major
                                Found in UI/ImpRecGUI.cs - About 45 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if (line.Length == 27 && Char.IsDigit(line[17]) && Char.IsDigit(line[18]) && Char.IsDigit(line[19]) && 
                                                      Char.IsDigit(line[20]) && Char.IsDigit(line[21]))
                                                  {
                                                      currentTrackerCase = kb.GetTrackerCase(line.Substring(17, 5), false);
                                                      currentIAReport = "";
                                  Severity: Major
                                  Found in Logic/KnowlParser.cs - About 40 mins to fix

                                    Method lstRelated_SelectedIndexChanged has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
                                    Open

                                            private void lstRelated_SelectedIndexChanged(object sender, EventArgs e)
                                            {
                                                // Reset all selections in lstImpacted
                                                for (int k = 0; k < lstImpacted.Items.Count; k++)
                                                {
                                    Severity: Minor
                                    Found in UI/ImpRecGUI.cs - About 35 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Method ParseImpactAnalyses has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                    Open

                                            public void ParseImpactAnalyses()
                                            {
                                                string line;
                                    
                                                // Read the file line by line
                                    Severity: Minor
                                    Found in Logic/KnowlParser.cs - About 25 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language