Refactor a legacy application to a less-unwieldy state Follow-up posted here: Refactor this method to a cleaner state (continued)

I am refactoring a legacy application. I DO NOT have the ability to change the Permissions, CustomerReport or the ListItems classes. They are in external dlls that are given to me. I realize that the ref usage is dumb and it makes NO SENSE. I am going to work with my peers to follow better practices.

This whole class looks ugly and mind you I have refactored some of it out into methods but it still is too large and unwieldy:

public class ReportService : IReportService
{
    private readonly Permissions _Permissions;


    public ReportService()
    {
        _Permissions = new Permissions();
    }

    public IList&lt;Node&gt; GetFor(string userGroup)
    {
        var nodes = new List&lt;Node&gt;();
        var ListItems = new List&lt;ListItem&gt;();

        //Yes this is silly since statusReturn is never used
        var statusReturn = _Permissions.GetReportsForUserGroupName(userGroup, ref ListItems);

        if (ListItems.Any())
        {
            var initialReportType = ListItems[0].value;
            var initialCrs = ListItems[0].key;
            var parent = AssembleNode(initialReportType);
            var child = AssembleNode(initialCrs, parent);
            foreach (var item in ListItems)
            {
                var customerReport = (CustomerReport)item.dataObject;
                var grandChild = AssembleGrandChild(child, customerReport);
                if (item.value.Equals(initialReportType))
                    if (item.key.Equals(initialCrs))
                        child.Children.Add(grandChild);
                    else
                    {
                        initialCrs = item.key;
                        parent.Children.Add(child);
                        child = AssembleNode(item.key, parent);
                        child.Children.Add(grandChild);
                    }
                else
                {
                    initialReportType = item.value;
                    initialCrs = item.key;
                    parent.Children.Add(child);
                    nodes.Add(parent);
                    parent = AssembleNode(item.value);
                    child = AssembleNode(item.key, parent);
                    grandChild = AssembleGrandChild(child, customerReport);
                    child.Children.Add(grandChild);
                }
            }
            parent.Children.Add(child);
            nodes.Add(parent);
        }
        return nodes;
    }



    private static Node AssembleNode(string value, Node parent = null)
    {
        //This is an extension method on object that was used at my last dev shop.
        //I got used to using it so out of habit it is here
        return parent.IsNotNull() ? 
            new Node(parent){ Text = value, Value = value } : 
            new Node { Text = value, Value = value };
    }

    private static Node AssembleGrandChild(Node child, CustomerReport customerReport)
    {
        return new Node(child)
        {
            Text = customerReport.FileName,
            Value = customerReport.ReportKey.ToString(),
            Title = customerReport.Description
        };
    }
}


I really want to refactor this to a better state; any suggestions?
I would put:   

var ListItems = new List&lt;ListItem&gt;();
//Yes this is silly since statusReturn is never used
var statusReturn = _Permissions.GetReportsForUserGroupName(userGroup, ref ListItems);


in a method that just returns the list. So you are isolating the madness a bit.

I'm not a C# programmer, but wouldn't listItems be better than ListItems?

I honestly did not understand what the code is doing.  Maybe you could explain it a little bit in your post.  

It seems that you have a tree structure in there.  So why transform a list which originally seems to contain a tree to another list, which should also be a tree?