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();
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;
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;
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;
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)
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;
File ImpRecGUI.Designer.cs
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
namespace ImpRec
{
partial class ImpRecGUI
{
/// <summary>
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;
Method ToString
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public override String ToString()
{
StringBuilder tmpString = new StringBuilder();
if (feedbackType == 1)
{
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;
Method ParseImpactAnalyses
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void ParseImpactAnalyses()
{
string line;
// Read the file line by line
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);
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;
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)
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++)
{
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)
- Read upRead up
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)
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 = "";
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++)
{
- Read upRead up
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
- Read upRead up
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"