<commit_before>using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;

namespace OpenSim.Framework.Types
{
    public class PrimData
    {
        private const uint FULL_MASK_PERMISSIONS = 2147483647;

        public LLUUID OwnerID;
        public byte PCode;
        public ushort PathBegin;
        public ushort PathEnd;
        public byte PathScaleX;
        public byte PathScaleY;
        public byte PathShearX;
        public byte PathShearY;
        public sbyte PathSkew;
        public ushort ProfileBegin;
        public ushort ProfileEnd;
        public LLVector3 Scale;
        public byte PathCurve;
        public byte ProfileCurve;
        public uint ParentID = 0;
        public ushort ProfileHollow;
        public sbyte PathRadiusOffset;
        public byte PathRevolutions;
        public sbyte PathTaperX;
        public sbyte PathTaperY;
        public sbyte PathTwist;
        public sbyte PathTwistBegin;
        public byte[] Texture;
       

        public Int32 CreationDate;
        public uint OwnerMask = FULL_MASK_PERMISSIONS;
        public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
        public uint GroupMask = FULL_MASK_PERMISSIONS;
        public uint EveryoneMask = FULL_MASK_PERMISSIONS;
        public uint BaseMask = FULL_MASK_PERMISSIONS;

        //following only used during prim storage
        public LLVector3 Position;
        public LLQuaternion Rotation = new LLQuaternion(0,1,0,0);
        public uint LocalID;
        public LLUUID FullID;

        public PrimData()
        {

        }

        public PrimData(byte[] data)
        {
            int i =0;

            this.OwnerID = new LLUUID(data, i); i += 16;
            this.PCode = data[i++];
            this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.PathScaleX = data[i++];
            this.PathScaleY = data[i++];
            this.PathShearX = data[i++];
            this.PathShearY = data[i++];
            this.PathSkew = (sbyte)data[i++];
            this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.Scale = new LLVector3(data, i); i += 12;
            this.PathCurve = data[i++];
            this.ProfileCurve = data[i++];
            this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
            this.PathRadiusOffset = (sbyte)data[i++];
            this.PathRevolutions = data[i++];
            this.PathTaperX = (sbyte)data[i++];
            this.PathTaperY =(sbyte) data[i++];
            this.PathTwist = (sbyte) data[i++];
            this.PathTwistBegin = (sbyte) data[i++];
            ushort length = (ushort)(data[i++] + (data[i++] << 8));
            this.Texture = new byte[length];
            Array.Copy(data, i, Texture, 0, length); i += length;
            this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.Position = new LLVector3(data, i); i += 12;
            this.Rotation = new LLQuaternion(data,i, true); i += 12;
            this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.FullID = new LLUUID(data, i); i += 16;

        }

        public byte[] ToBytes()
        {
            int i = 0;
            byte[] bytes = new byte[121 + Texture.Length];
            Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
            bytes[i++] = this.PCode;
            bytes[i++] = (byte)(this.PathBegin % 256);
            bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
            bytes[i++] = (byte)(this.PathEnd % 256);
            bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
            bytes[i++] = this.PathScaleX;
            bytes[i++] = this.PathScaleY;
            bytes[i++] = this.PathShearX;
            bytes[i++] = this.PathShearY;
            bytes[i++] = (byte)this.PathSkew;
            bytes[i++] = (byte)(this.ProfileBegin % 256);
            bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
            bytes[i++] = (byte)(this.ProfileEnd % 256);
            bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);<commit_msg>fix array size<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;

namespace OpenSim.Framework.Types
{
    public class PrimData
    {
        private const uint FULL_MASK_PERMISSIONS = 2147483647;

        public LLUUID OwnerID;
        public byte PCode;
        public ushort PathBegin;
        public ushort PathEnd;
        public byte PathScaleX;
        public byte PathScaleY;
        public byte PathShearX;
        public byte PathShearY;
        public sbyte PathSkew;
        public ushort ProfileBegin;
        public ushort ProfileEnd;
        public LLVector3 Scale;
        public byte PathCurve;
        public byte ProfileCurve;
        public uint ParentID = 0;
        public ushort ProfileHollow;
        public sbyte PathRadiusOffset;
        public byte PathRevolutions;
        public sbyte PathTaperX;
        public sbyte PathTaperY;
        public sbyte PathTwist;
        public sbyte PathTwistBegin;
        public byte[] Texture;
       

        public Int32 CreationDate;
        public uint OwnerMask = FULL_MASK_PERMISSIONS;
        public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
        public uint GroupMask = FULL_MASK_PERMISSIONS;
        public uint EveryoneMask = FULL_MASK_PERMISSIONS;
        public uint BaseMask = FULL_MASK_PERMISSIONS;

        //following only used during prim storage
        public LLVector3 Position;
        public LLQuaternion Rotation = new LLQuaternion(0,1,0,0);
        public uint LocalID;
        public LLUUID FullID;

        public PrimData()
        {

        }

        public PrimData(byte[] data)
        {
            int i =0;

            this.OwnerID = new LLUUID(data, i); i += 16;
            this.PCode = data[i++];
            this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.PathScaleX = data[i++];
            this.PathScaleY = data[i++];
            this.PathShearX = data[i++];
            this.PathShearY = data[i++];
            this.PathSkew = (sbyte)data[i++];
            this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.Scale = new LLVector3(data, i); i += 12;
            this.PathCurve = data[i++];
            this.ProfileCurve = data[i++];
            this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
            this.PathRadiusOffset = (sbyte)data[i++];
            this.PathRevolutions = data[i++];
            this.PathTaperX = (sbyte)data[i++];
            this.PathTaperY =(sbyte) data[i++];
            this.PathTwist = (sbyte) data[i++];
            this.PathTwistBegin = (sbyte) data[i++];
            ushort length = (ushort)(data[i++] + (data[i++] << 8));
            this.Texture = new byte[length];
            Array.Copy(data, i, Texture, 0, length); i += length;
            this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.Position = new LLVector3(data, i); i += 12;
            this.Rotation = new LLQuaternion(data,i, true); i += 12;
            this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.FullID = new LLUUID(data, i); i += 16;

        }

        public byte[] ToBytes()
        {
            int i = 0;
            byte[] bytes = new byte[126 + Texture.Length];
            Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
            bytes[i++] = this.PCode;
            bytes[i++] = (byte)(this.PathBegin % 256);
            bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
            bytes[i++] = (byte)(this.PathEnd % 256);
            bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
            bytes[i++] = this.PathScaleX;
            bytes[i++] = this.PathScaleY;
            bytes[i++] = this.PathShearX;
            bytes[i++] = this.PathShearY;
            bytes[i++] = (byte)this.PathSkew;
            bytes[i++] = (byte)(this.ProfileBegin % 256);
            bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
            bytes[i++] = (byte)(this.ProfileEnd % 256);
            bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
{'fraction_non_alphanumeric': 0.1744529262086514, 'fraction_numerical': 0.024020356234096693, 'mean_word_length': 2.138294474608751, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3812382', 'n_tokens_mistral': 3361, 'n_tokens_neox': 3136, 'n_words': 715}