public void CollectLocalVariablesUsage(SyntaxNodeAnalysisContext context)
            {
                IdentifierNameSyntax identifierNameSyntax = context.GetIdentifierNameSyntax();

                if (identifierNameSyntax == null || this.localVariables.Count == 0 || !this.localVariables.ContainsKey(identifierNameSyntax.Identifier.ValueText))
                {
                    return;
                }
                VariableDeclarationBaseSyntax declarationBaseSyntax;

                this.localVariables.TryGetValue(identifierNameSyntax.Identifier.ValueText, out declarationBaseSyntax);
                NavTypeKind navTypeKind = NavTypeExtensions.GetNavTypeKind(declarationBaseSyntax?.Type.DataType.TypeName.ValueText);
                SyntaxKind  kind        = identifierNameSyntax.Parent.Kind;

                if ((uint)kind <= 233U)
                {
                    switch (kind)
                    {
                    case SyntaxKind.AssignmentStatement:
                        VariableInitializationUsageAnalyzer.AnalyzeAssignmentStatementIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstRecordChangeSyntax, navTypeKind);
                        return;

                    case SyntaxKind.CompoundAssignmentStatement:
                        VariableInitializationUsageAnalyzer.AnalyzeCompoundAssignmentStatementIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax);
                        return;

                    case SyntaxKind.ForStatement:
                        VariableInitializationUsageAnalyzer.AnalyzeForStatementIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax);
                        return;
                    }
                }
                else
                {
                    switch (kind)
                    {
                    case SyntaxKind.ForEachStatement:
                        VariableInitializationUsageAnalyzer.AnalyzeForEachStatementIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax);
                        return;

                    case SyntaxKind.ArrayIndexExpression:
                        if (navTypeKind != NavTypeKind.Code && navTypeKind != NavTypeKind.Text)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeArrayIndexExpressionIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax);
                        return;

                    case SyntaxKind.MemberAccessExpression:
                        if (navTypeKind != NavTypeKind.List && navTypeKind != NavTypeKind.Record)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeMemberAccessIdentifier(identifierNameSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax, (Dictionary <string, IdentifierNameSyntax>) this.lastRecordModifyInvocationSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstRecordChangeSyntax, navTypeKind);
                        return;

                    case SyntaxKind.OptionAccessExpression:
                        return;

                    case SyntaxKind.ArgumentList:
                        VariableInitializationUsageAnalyzer.AnalyzeArgumentListIdentifier(identifierNameSyntax, context, (Dictionary <string, IdentifierNameSyntax>) this.firstInitializerSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstLocalVarUsageSyntax, (Dictionary <string, IdentifierNameSyntax>) this.firstRecordChangeSyntax, navTypeKind);
                        return;
                    }
                }
                this.firstLocalVarUsageSyntax.AddIdentifierIfNotExist(identifierNameSyntax);
            }
        private static void AnalyzeGlobalVarUsage(
            IdentifierNameSyntax identifier,
            Dictionary <string, IdentifierNameSyntax> firstGlobalVarUsageSyntax,
            Dictionary <string, IdentifierNameSyntax> firstGlobalVarInitializerSyntax,
            Dictionary <string, IdentifierNameSyntax> lastRecordModifyInvocationSyntax,
            Dictionary <string, IdentifierNameSyntax> firstRecordChangeSyntax,
            SyntaxNodeAnalysisContext syntaxNodeAnalysisContext,
            Dictionary <string, VariableDeclarationBaseSyntax> globalVariables)
        {
            if (IdentifierUtilities.IdentifierIsLocalVariable(identifier))
            {
                return;
            }
            SyntaxKind kind = identifier.Parent.Kind;

            switch (kind)
            {
            case SyntaxKind.PageField:
            case SyntaxKind.ReportColumn:
                firstGlobalVarInitializerSyntax.AddIdentifierIfNotExist(identifier);
                firstGlobalVarUsageSyntax.AddIdentifierIfNotExist(identifier);
                break;

            default:
                if (globalVariables.Count == 0 || !globalVariables.ContainsKey(identifier.Identifier.ValueText))
                {
                    break;
                }
                // ISSUE: variable of a compiler-generated type
                VariableDeclarationBaseSyntax declarationBaseSyntax;
                globalVariables.TryGetValue(identifier.Identifier.ValueText, out declarationBaseSyntax);
                NavTypeKind navTypeKind = NavTypeExtensions.GetNavTypeKind(declarationBaseSyntax?.Type.DataType.TypeName.ValueText);
                if ((uint)kind <= 233U)
                {
                    switch (kind)
                    {
                    case SyntaxKind.AssignmentStatement:
                        VariableInitializationUsageAnalyzer.AnalyzeAssignmentStatementIdentifier(identifier, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax, firstRecordChangeSyntax, navTypeKind);
                        return;

                    case SyntaxKind.CompoundAssignmentStatement:
                        if (navTypeKind == NavTypeKind.Record)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeCompoundAssignmentStatementIdentifier(identifier, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax);
                        return;

                    case SyntaxKind.ForStatement:
                        if (navTypeKind == NavTypeKind.Record)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeForStatementIdentifier(identifier, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax);
                        return;
                    }
                }
                else if ((uint)kind <= 262U)
                {
                    switch (kind)
                    {
                    case SyntaxKind.ForEachStatement:
                        if (navTypeKind == NavTypeKind.Record)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeForEachStatementIdentifier(identifier, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax);
                        return;

                    case SyntaxKind.ArrayIndexExpression:
                        if (navTypeKind != NavTypeKind.Code && navTypeKind != NavTypeKind.Text)
                        {
                            return;
                        }
                        VariableInitializationUsageAnalyzer.AnalyzeArrayIndexExpressionIdentifier(identifier, firstGlobalVarInitializerSyntax);
                        return;
                    }
                }
                else if (kind != SyntaxKind.MemberAccessExpression)
                {
                    if (kind == SyntaxKind.ArgumentList)
                    {
                        VariableInitializationUsageAnalyzer.AnalyzeArgumentListIdentifier(identifier, syntaxNodeAnalysisContext, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax, firstRecordChangeSyntax, navTypeKind);
                        break;
                    }
                }
                else
                {
                    VariableInitializationUsageAnalyzer.AnalyzeMemberAccessIdentifier(identifier, firstGlobalVarInitializerSyntax, firstGlobalVarUsageSyntax, lastRecordModifyInvocationSyntax, firstRecordChangeSyntax, navTypeKind);
                    break;
                }
                if (navTypeKind == NavTypeKind.Record)
                {
                    break;
                }
                firstGlobalVarUsageSyntax.AddIdentifierIfNotExist(identifier);
                break;
            }
        }