{"record":{"id":"f382dcf45305d626","repo":"dotnet/machinelearning","slug":"null-f382dc","errorCode":null,"errorMessage":"null","messagePattern":"null","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.Data.Analysis/DataFrameColumns/StringDataFrameColumn.cs","lineNumber":43,"sourceCode":"        public StringDataFrameColumn(string name, long length = 0) : base(name, length, typeof(string))\n        {\n            int numberOfBuffersRequired = (int)(length / MaxCapacity + 1);\n            for (int i = 0; i < numberOfBuffersRequired; i++)\n            {\n                long bufferLen = length - _stringBuffers.Count * MaxCapacity;\n                List<string> buffer = new List<string>((int)Math.Min(MaxCapacity, bufferLen));\n                _stringBuffers.Add(buffer);\n                for (int j = 0; j < bufferLen; j++)\n                {\n                    buffer.Add(default);\n                }\n            }\n            _nullCount = length;\n        }\n\n        public StringDataFrameColumn(string name, IEnumerable<string> values) : base(name, 0, typeof(string))\n        {\n            values = values ?? throw new ArgumentNullException(nameof(values));\n            if (_stringBuffers.Count == 0)\n            {\n                _stringBuffers.Add(new List<string>());\n            }\n            foreach (var value in values)\n            {\n                Append(value);\n            }\n        }\n\n        private long _nullCount;\n        public override long NullCount => _nullCount;\n\n        protected internal override void Resize(long length)\n        {\n            if (length < Length)\n                throw new ArgumentException(Strings.CannotResizeDown, nameof(length));\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/dotnet/machinelearning/blob/7b76e69cf964daeca3f1377af6bc5543284d56c6/src/Microsoft.Data.Analysis/DataFrameColumns/StringDataFrameColumn.cs#L25-L61","documentation":"Guard in the StringDataFrameColumn(string name, long length) constructor path when a required input is null. The constructor allocates length-bounded string buffers and fills them with default (null) entries; a null argument (for example a null name passed down to the base DataFrameColumn constructor, or later null-related operations on the pre-filled null slots) is rejected with a standard ArgumentNullException-style guard.","triggerScenarios":"Thrown at src/Microsoft.Data.Analysis/DataFrameColumns/StringDataFrameColumn.cs:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null column name when constructing StringDataFrameColumn","If the value can legitimately be absent, supply string.Empty instead of null","Validate inputs before constructing the column in data-loading code"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76e69cf964daeca3f1377af6bc5543284d56c6","analyzedAt":"2026-09-11T12:35:38.930Z","contentChangedAt":"2026-09-11T12:35:38.930Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}