<commit_before>var armyc2 = armyc2 || {};
armyc2.c2sd = armyc2.c2sd || {};
armyc2.c2sd.JavaRendererServer = armyc2.c2sd.JavaRendererServer || {};
armyc2.c2sd.JavaRendererServer.RenderMultipoints = armyc2.c2sd.JavaRendererServer.RenderMultipoints || {};
armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF = {
    BuildDummyShapeSpec: function() {
        var shape = new armyc2.c2sd.renderer.utilities.ShapeInfo(null);
        try {
            var tx = new armyc2.c2sd.graphics2d.AffineTransform();
            tx.setToIdentity();
            var gp = new armyc2.c2sd.graphics2d.GeneralPath();
            shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.WHITE);
            shape.setFillColor(null);
            shape.setStroke(new armyc2.c2sd.graphics2d.BasicStroke());
            shape.setTexturePaint(null);
            gp.moveTo(-1000, -1000);
            gp.lineTo(-1001, -1001);
            shape.setShape(gp);
            shape.setAffineTransform(tx);
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "BuidDummyShapeSpec", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside BuildDummyShapeSpec", exc));
            }
            else {
                throw exc;
            }
        }
        return shape;
    },
    isValidShapeSpec: function(shape) {
        if (shape === null)
            return false;
        if (shape.getLineColor() === null && shape.getFillColor() === null)
            return false;
        if (shape.getShape() === null)
            return false;
        if (shape.getStroke() === null)
            return false;
        if (shape.getAffineTransform() === null)
            return false;
        return true;
    },
    SetLCColor: function(tg, shape) {
        try {
            var affiliation = tg.get_Affiliation();
            if (affiliation.equals("H")) {
                if (shape.getLineColor() === armyc2.c2sd.renderer.utilities.Color.RED)
                    shape.setLineColor(tg.get_LineColor());
                else
                    shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.RED);
            } else {
                if (shape.getLineColor() !== armyc2.c2sd.renderer.utilities.Color.RED)
                    shape.setLineColor(tg.get_LineColor());
                else
                    shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.RED);
            }
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "SetLCColor", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside SetLCColor", exc));
            } else {
                throw exc;
            }
        }
    },
    ValidateShapeSpecs: function(originalShapes, clipRect) {
        var shapes = null;
        try {
            var shape = null;
            if (originalShapes === null || originalShapes.length === 0) {
                shapes = new Array(0);
            } else {
                var j = 0;
                var newShapes = new java.util.ArrayList();
                for (j = 0; j < originalShapes.length; j++) {
                    shape = originalShapes[j];
                    if (armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF.isValidShapeSpec(shape) === true)
                        newShapes.add(shape);
                }
                if (newShapes.size() > 0) {
                    shapes = new Array(newShapes.size());
                    shapes = newShapes.toArray(shapes);
                } else {
                    shape = armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF.BuildDummyShapeSpec();
                    shapes = new Array(1);
                    shapes[0] = shape;
                }
            }
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "ValidateShapeSpecs", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside ValidateShapeSpecs", exc));
            } else {
                throw exc;
            }
        }
        return shapes;
    },
    PointLatLongToPixels: function(ptLatLong, converter) {
        var pt = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2();
        try {
            var x = ptLatLong.x;
            var y = ptLatLong.y;
            var pt2dGeo = armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityGE.setPoint2D(x, y);
            var ptPixels = converter.GeoToPixels(pt2dGeo);
            pt.x = ptPixels.getX();
            pt.y = ptPixels.getY();
            pt.style = ptLatLong.style;
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "PointLatLongToPixels", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside PointLatLongToPixels", exc));
            } else {
                throw exc;
            }
        }
        return pt;
    },
    GetNumericFields: function(tg, lineType, radius, width, length, attitude) {
        try {
            if (lineType === 243111001)
                return;
            var dist = 0;
            var a12 = new armyc2.c2sd.JavaLineArray.ref();
            var a21 = new armyc2.c2sd.JavaLineArray.ref();
            var pt0 = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2(0, 0);
            var pt1 = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2(0, 0);
            radius.value = Clazz.newArray(1, 0);
            width.value = Clazz.newArray(1, 0);
            attitude.value = Clazz.newArray(1, 0);
            length.value = Clazz.newArray(1, 0);
            switch (lineType) {
                case 15000002:
                case 24312000:
                case 24321300:
                case 24323300:
                case 24324300:
                case 24325300:
                case 24326200:
                case 24331300:
                case 24332300:
                case 24333300:
                case 24334300:
                case 24335300:
                case 24336300:
                case 24337300:
                case 24338300:
                case 24339300:
                case 24322300:
                case 24353000:
                case 24363000:
                    radius.value[0] = Double.parseDouble(tg.get_T1());
                    break;
                case 24311000:
                    length.value[0] = Double.parseDouble(tg.get_T1());
                    width.value[0] = Double.parseDouble(tg.get_H());
                    attitude.value[0] = Double.parseDouble(tg.get_H2()) * (0.05625);
                    break;
                case 24326101:
                case 24321200:
                case 24323200:
                case 24322200:
                case 24324200:
                case 24325200:
                case 24331200:
                case 24332200:
                case 24333200:
                case 24334200:
                case 24335200:
                case 24336200:
                case 24337200:
                case 24338200:
                case 24339200:
                case 24352000:
                case 24362000:
                    if (tg.LatLongs.size() >= 2) {<commit_msg>Implement Rev C for AN value for Rectangular Target (value in degrees, not mils)<commit_after>var armyc2 = armyc2 || {};
armyc2.c2sd = armyc2.c2sd || {};
armyc2.c2sd.JavaRendererServer = armyc2.c2sd.JavaRendererServer || {};
armyc2.c2sd.JavaRendererServer.RenderMultipoints = armyc2.c2sd.JavaRendererServer.RenderMultipoints || {};
armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF = {
    BuildDummyShapeSpec: function() {
        var shape = new armyc2.c2sd.renderer.utilities.ShapeInfo(null);
        try {
            var tx = new armyc2.c2sd.graphics2d.AffineTransform();
            tx.setToIdentity();
            var gp = new armyc2.c2sd.graphics2d.GeneralPath();
            shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.WHITE);
            shape.setFillColor(null);
            shape.setStroke(new armyc2.c2sd.graphics2d.BasicStroke());
            shape.setTexturePaint(null);
            gp.moveTo(-1000, -1000);
            gp.lineTo(-1001, -1001);
            shape.setShape(gp);
            shape.setAffineTransform(tx);
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "BuidDummyShapeSpec", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside BuildDummyShapeSpec", exc));
            }
            else {
                throw exc;
            }
        }
        return shape;
    },
    isValidShapeSpec: function(shape) {
        if (shape === null)
            return false;
        if (shape.getLineColor() === null && shape.getFillColor() === null)
            return false;
        if (shape.getShape() === null)
            return false;
        if (shape.getStroke() === null)
            return false;
        if (shape.getAffineTransform() === null)
            return false;
        return true;
    },
    SetLCColor: function(tg, shape) {
        try {
            var affiliation = tg.get_Affiliation();
            if (affiliation.equals("H")) {
                if (shape.getLineColor() === armyc2.c2sd.renderer.utilities.Color.RED)
                    shape.setLineColor(tg.get_LineColor());
                else
                    shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.RED);
            } else {
                if (shape.getLineColor() !== armyc2.c2sd.renderer.utilities.Color.RED)
                    shape.setLineColor(tg.get_LineColor());
                else
                    shape.setLineColor(armyc2.c2sd.renderer.utilities.Color.RED);
            }
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "SetLCColor", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside SetLCColor", exc));
            } else {
                throw exc;
            }
        }
    },
    ValidateShapeSpecs: function(originalShapes, clipRect) {
        var shapes = null;
        try {
            var shape = null;
            if (originalShapes === null || originalShapes.length === 0) {
                shapes = new Array(0);
            } else {
                var j = 0;
                var newShapes = new java.util.ArrayList();
                for (j = 0; j < originalShapes.length; j++) {
                    shape = originalShapes[j];
                    if (armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF.isValidShapeSpec(shape) === true)
                        newShapes.add(shape);
                }
                if (newShapes.size() > 0) {
                    shapes = new Array(newShapes.size());
                    shapes = newShapes.toArray(shapes);
                } else {
                    shape = armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF.BuildDummyShapeSpec();
                    shapes = new Array(1);
                    shapes[0] = shape;
                }
            }
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "ValidateShapeSpecs", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside ValidateShapeSpecs", exc));
            } else {
                throw exc;
            }
        }
        return shapes;
    },
    PointLatLongToPixels: function(ptLatLong, converter) {
        var pt = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2();
        try {
            var x = ptLatLong.x;
            var y = ptLatLong.y;
            var pt2dGeo = armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityGE.setPoint2D(x, y);
            var ptPixels = converter.GeoToPixels(pt2dGeo);
            pt.x = ptPixels.getX();
            pt.y = ptPixels.getY();
            pt.style = ptLatLong.style;
        } catch (exc) {
            if (Clazz.instanceOf(exc)) {
                armyc2.c2sd.renderer.utilities.ErrorLogger.LogException(armyc2.c2sd.JavaRendererServer.RenderMultipoints.clsUtilityCPOF._className, "PointLatLongToPixels", new armyc2.c2sd.renderer.utilities.RendererException("Failed inside PointLatLongToPixels", exc));
            } else {
                throw exc;
            }
        }
        return pt;
    },
    GetNumericFields: function(tg, lineType, radius, width, length, attitude) {
        try {
            if (lineType === 243111001)
                return;
            var dist = 0;
            var a12 = new armyc2.c2sd.JavaLineArray.ref();
            var a21 = new armyc2.c2sd.JavaLineArray.ref();
            var pt0 = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2(0, 0);
            var pt1 = armyc2.c2sd.JavaLineArray.lineutility.setPOINT2(0, 0);
            radius.value = Clazz.newArray(1, 0);
            width.value = Clazz.newArray(1, 0);
            attitude.value = Clazz.newArray(1, 0);
            length.value = Clazz.newArray(1, 0);
            switch (lineType) {
                case 15000002:
                case 24312000:
                case 24321300:
                case 24323300:
                case 24324300:
                case 24325300:
                case 24326200:
                case 24331300:
                case 24332300:
                case 24333300:
                case 24334300:
                case 24335300:
                case 24336300:
                case 24337300:
                case 24338300:
                case 24339300:
                case 24322300:
                case 24353000:
                case 24363000:
                    radius.value[0] = Double.parseDouble(tg.get_T1());
                    break;
                case 24311000:
                    length.value[0] = Double.parseDouble(tg.get_T1());
                    width.value[0] = Double.parseDouble(tg.get_H());
                    //value passed in mils
                    attitude.value[0] = Double.parseDouble(tg.get_H2()) * (0.05625);
                    var std = armyc2.c2sd.renderer.utilities.RendererSettings.getInstance().getSymbologyStandard();
                    if(std===armyc2.c2sd.renderer.utilities.RendererSettings.Symbology_2525C)//value passed in degrees
                        attitude.value[0] = Double.parseDouble(tg.get_H2());
                    break;
                case 24326101:
                case 24321200:
                case 24323200:
                case 24322200:
                case 24324200:
                case 24325200:
                case 24331200:
                case 24332200:
                case 24333200:
                case 24334200:
                case 24335200:
                case 24336200:
                case 24337200:
                case 24338200:
                case 24339200:
                case 24352000:
                case 24362000:
                    if (tg.LatLongs.size() >= 2) {
{'fraction_non_alphanumeric': 0.10146228835300154, 'fraction_numerical': 0.05759363776295536, 'mean_word_length': 1.6079611975246697, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '682135', 'n_tokens_mistral': 5142, 'n_tokens_neox': 4544, 'n_words': 756}