id
int64
1
889
project_id
stringclasses
17 values
bug_id
stringclasses
163 values
class
dict
method
dict
tests
listlengths
1
84
1
Chart
1
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 1247553218442497391L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private CategoryPlot plot;", "type": "CategoryPlot", ...
{ "body": "public LegendItemCollection getLegendItems() {\r\n LegendItemCollection result = new LegendItemCollection();\r\n if (this.plot == null) {\r\n return result;\r\n }\r\n int index = this.plot.getIndexOf(this);\r\n CategoryDataset dataset = this.plot.getDataset(ind...
[ { "covered_lines": 7, "line_coverage": 0.35, "name": "org.jfree.chart.renderer.category.junit.AbstractCategoryItemRendererTests::test2947660", "total_lines": 20 } ]
2
Chart
2
{ "fields": [], "file": "source/org/jfree/data/general/DatasetUtilities.java", "identifier": "DatasetUtilities", "interfaces": "", "superclass": "" }
{ "body": "public static Range iterateDomainBounds(XYDataset dataset,\r\n boolean includeInterval) {\r\n if (dataset == null) {\r\n throw new IllegalArgumentException(\"Null 'dataset' argument.\");\r\n }\r\n double minimum = Double.POSITIVE_IN...
[ { "covered_lines": 16, "line_coverage": 0.5714, "name": "org.jfree.data.general.junit.DatasetUtilitiesTests::testBug2849731_2", "total_lines": 28 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.general.junit.DatasetUtilitiesTests::testBug2849731_3", "total_li...
3
Chart
2
{ "fields": [], "file": "source/org/jfree/data/general/DatasetUtilities.java", "identifier": "DatasetUtilities", "interfaces": "", "superclass": "" }
{ "body": "public static Range iterateRangeBounds(XYDataset dataset,\r\n boolean includeInterval) {\r\n double minimum = Double.POSITIVE_INFINITY;\r\n double maximum = Double.NEGATIVE_INFINITY;\r\n int seriesCount = dataset.getSeriesCount();\r\n\r\n // handle three cases by data...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.general.junit.DatasetUtilitiesTests::testBug2849731_2", "total_lines": 37 }, { "covered_lines": 15, "line_coverage": 0.4054, "name": "org.jfree.data.general.junit.DatasetUtilitiesTests::testBug2849731_3", "total_li...
4
Chart
4
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 7044148245716569264L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final Stroke DEFAULT_GRIDLINE_STROKE = new Basi...
{ "body": "public Range getDataRange(ValueAxis axis) {\r\n\r\n Range result = null;\r\n List mappedDatasets = new ArrayList();\r\n List includedAnnotations = new ArrayList();\r\n boolean isDomainAxis = true;\r\n\r\n // is it a domain axis?\r\n int domainIndex = getDomainAxisI...
[ { "covered_lines": 23, "line_coverage": 0.4035, "name": "org.jfree.chart.axis.junit.LogAxisTests::testXYAutoRange1", "total_lines": 57 }, { "covered_lines": 23, "line_coverage": 0.4035, "name": "org.jfree.chart.axis.junit.LogAxisTests::testXYAutoRange2", "total_lines": 57 }, ...
5
Chart
5
{ "fields": [ { "modifier": "", "original_string": "static final long serialVersionUID = -5908509288197150436L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "protected List data;", "type": "List", "var_name": "data...
{ "body": "public XYDataItem addOrUpdate(Number x, Number y) {\r\n if (x == null) {\r\n throw new IllegalArgumentException(\"Null 'x' argument.\");\r\n }\r\n if (this.allowDuplicateXValues) {\r\n add(x, y);\r\n return null;\r\n }\r\n\r\n // if we get...
[ { "covered_lines": 9, "line_coverage": 0.4737, "name": "org.jfree.data.xy.junit.XYSeriesTests::testBug1955483", "total_lines": 19 } ]
6
Chart
6
{ "fields": [], "file": "source/org/jfree/chart/util/ShapeList.java", "identifier": "ShapeList", "interfaces": "", "superclass": "AbstractObjectList" }
{ "body": "public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n if (!(obj instanceof ShapeList)) {\n return false;\n }\n ShapeList that = (ShapeList) obj;\n int listSize = size();\n for (int i = 0; i < listSize; i++) {\n...
[ { "covered_lines": 3, "line_coverage": 0.6, "name": "org.jfree.chart.util.junit.ShapeListTests::testSerialization", "total_lines": 5 }, { "covered_lines": 3, "line_coverage": 0.6, "name": "org.jfree.chart.util.junit.ShapeListTests::testEquals", "total_lines": 5 } ]
7
Chart
7
{ "fields": [ { "modifier": "", "original_string": "static final long serialVersionUID = -2210593619794989709L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "protected static final String DEFAULT_DOMAIN_DESCRIPTION = \"Time\";...
{ "body": "private void updateBounds(TimePeriod period, int index) {\r\n \r\n long start = period.getStart().getTime();\r\n long end = period.getEnd().getTime();\r\n long middle = start + ((end - start) / 2);\r\n\r\n if (this.minStartIndex >= 0) {\r\n long minStart = getD...
[ { "covered_lines": 52, "line_coverage": 1, "name": "org.jfree.data.time.junit.TimePeriodValuesTests::testGetMaxMiddleIndex", "total_lines": 52 } ]
8
Chart
9
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -5032960206869675528L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "protected static final String DEFAULT_DOMAIN_DESCRIPTION = \...
{ "body": "public TimeSeries createCopy(RegularTimePeriod start, RegularTimePeriod end)\r\n throws CloneNotSupportedException {\r\n\r\n if (start == null) {\r\n throw new IllegalArgumentException(\"Null 'start' argument.\");\r\n }\r\n if (end == null) {\r\n throw new ...
[ { "covered_lines": 15, "line_coverage": 0.6522, "name": "org.jfree.data.time.junit.TimeSeriesTests::testBug1864222", "total_lines": 23 } ]
9
Chart
10
{ "fields": [], "file": "source/org/jfree/chart/imagemap/StandardToolTipTagFragmentGenerator.java", "identifier": "StandardToolTipTagFragmentGenerator", "interfaces": "ToolTipTagFragmentGenerator", "superclass": "" }
{ "body": "public String generateToolTipFragment(String toolTipText) {\r\n return \" title=\\\"\" + ImageMapUtilities.htmlEscape(toolTipText) \r\n + \"\\\" alt=\\\"\\\"\";\r\n }", "class_method_signature": "StandardToolTipTagFragmentGenerator.generateToolTipFragment(String toolTipText)", "con...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.jfree.chart.imagemap.junit.StandardToolTipTagFragmentGeneratorTests::testGenerateURLFragment", "total_lines": 1 } ]
10
Chart
13
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 506071142274883745L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private Block centerBlock;", "type": "Block", "var...
{ "body": "protected Size2D arrangeFF(BlockContainer container, Graphics2D g2,\r\n RectangleConstraint constraint) {\r\n double[] w = new double[5];\r\n double[] h = new double[5];\r\n w[0] = constraint.getWidth();\r\n if (this.topBlock != null) {\r\n ...
[ { "covered_lines": 32, "line_coverage": 0.7619, "name": "org.jfree.chart.block.junit.BorderArrangementTests::testSizingWithWidthConstraint", "total_lines": 42 } ]
11
Chart
14
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -3537691700434728188L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE...
{ "body": "public boolean removeDomainMarker(int index, Marker marker, Layer layer,\r\n \t\tboolean notify) {\r\n ArrayList markers;\r\n if (layer == Layer.FOREGROUND) {\r\n markers = (ArrayList) this.foregroundDomainMarkers.get(new Integer(\r\n index));\r\n }\r\n...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveRangeMarker", "total_lines": 1 }, { "covered_lines": 1, "line_coverage": 1, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveDomainMarker", "total_lines": 1 ...
12
Chart
14
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -3537691700434728188L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE...
{ "body": "public boolean removeRangeMarker(int index, Marker marker, Layer layer,\r\n \t\tboolean notify) {\r\n if (marker == null) {\r\n throw new IllegalArgumentException(\"Null 'marker' argument.\");\r\n }\r\n ArrayList markers;\r\n if (layer == Layer.FOREGROUND) {\r\n ...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveRangeMarker", "total_lines": 1 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveDomainMarker", "total_lines": 1 ...
13
Chart
14
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 7044148245716569264L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final Stroke DEFAULT_GRIDLINE_STROKE = new Basi...
{ "body": "public boolean removeDomainMarker(int index, Marker marker, Layer layer,\r\n \t\tboolean notify) {\r\n ArrayList markers;\r\n if (layer == Layer.FOREGROUND) {\r\n markers = (ArrayList) this.foregroundDomainMarkers.get(new Integer(\r\n index));\r\n }\r\n...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveRangeMarker", "total_lines": 1 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveDomainMarker", "total_lines": 1 ...
14
Chart
14
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 7044148245716569264L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final Stroke DEFAULT_GRIDLINE_STROKE = new Basi...
{ "body": "public boolean removeRangeMarker(int index, Marker marker, Layer layer,\r\n \t\tboolean notify) {\r\n if (marker == null) {\r\n throw new IllegalArgumentException(\"Null 'marker' argument.\");\r\n }\r\n ArrayList markers;\r\n if (layer == Layer.FOREGROUND) {\r\n ...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveRangeMarker", "total_lines": 1 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testRemoveDomainMarker", "total_lines": 1 ...
15
Chart
15
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -795612466005590431L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final double DEFAULT_INTERIOR_GAP = 0.08;", ...
{ "body": "public PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,\r\n PiePlot plot, Integer index, PlotRenderingInfo info) {\r\n \r\n PiePlotState state = new PiePlotState(info);\r\n state.setPassesRequired(2);\r\n if (this.dataset != null) {\r\n state.setTo...
[ { "covered_lines": 4, "line_coverage": 0.6667, "name": "org.jfree.chart.plot.junit.PiePlot3DTests::testDrawWithNullDataset", "total_lines": 6 } ]
16
Chart
16
{ "fields": [ { "modifier": "", "original_string": "private Comparable[] seriesKeys;", "type": "Comparable[]", "var_name": "seriesKeys" }, { "modifier": "", "original_string": "private Comparable[] categoryKeys;", "type": "Comparable[]", "var_name": "categor...
{ "body": "public void setCategoryKeys(Comparable[] categoryKeys) {\r\n if (categoryKeys == null) {\r\n throw new IllegalArgumentException(\"Null 'categoryKeys' argument.\");\r\n }\r\n if (categoryKeys.length != getCategoryCount()) {\r\n throw new IllegalArgumentException(\r...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.category.junit.DefaultIntervalCategoryDatasetTests::testGetCategoryIndex", "total_lines": 10 }, { "covered_lines": 2, "line_coverage": 0.2, "name": "org.jfree.data.category.junit.DefaultIntervalCategoryDatasetTests::te...
17
Chart
17
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -5032960206869675528L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "protected static final String DEFAULT_DOMAIN_DESCRIPTION = \...
{ "body": "public Object clone() throws CloneNotSupportedException {\r\n TimeSeries clone = (TimeSeries) super.clone();\r\n clone.data = (List) ObjectUtilities.deepClone(this.data);\r\n return clone;\r\n }", "class_method_signature": "TimeSeries.clone()", "constructor": false, "full_sign...
[ { "covered_lines": 1, "line_coverage": 0.5, "name": "org.jfree.data.time.junit.TimeSeriesTests::testBug1832432", "total_lines": 2 } ]
18
Chart
18
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 8468154364608194797L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private ArrayList keys;", "type": "ArrayList", "v...
{ "body": "public void removeValue(Comparable key) {\n int index = getIndex(key);\n if (index < 0) {\n throw new UnknownKeyException(\"The key (\" + key \n + \") is not recognised.\");\n }\n removeValue(index);\n }", "class_method_signature": "DefaultKeye...
[ { "covered_lines": 5, "line_coverage": 1, "name": "org.jfree.data.category.junit.DefaultCategoryDatasetTests::testBug1835955", "total_lines": 5 }, { "covered_lines": 5, "line_coverage": 1, "name": "org.jfree.data.junit.DefaultKeyedValues2DTests::testRemoveColumnByKey", "total_lin...
19
Chart
18
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 8468154364608194797L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private ArrayList keys;", "type": "ArrayList", "v...
{ "body": "public void removeValue(int index) {\n this.keys.remove(index);\n this.values.remove(index);\n rebuildIndex();\n }", "class_method_signature": "DefaultKeyedValues.removeValue(int index)", "constructor": false, "full_signature": "public void removeValue(int index)", "identifi...
[ { "covered_lines": 5, "line_coverage": 1, "name": "org.jfree.data.category.junit.DefaultCategoryDatasetTests::testBug1835955", "total_lines": 5 }, { "covered_lines": 5, "line_coverage": 1, "name": "org.jfree.data.junit.DefaultKeyedValues2DTests::testRemoveColumnByKey", "total_lin...
20
Chart
18
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -5514169970951994748L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private List rowKeys;", "type": "List", "var_nam...
{ "body": "public void removeColumn(Comparable columnKey) {\r\n \tif (columnKey == null) {\r\n \t\tthrow new IllegalArgumentException(\"Null 'columnKey' argument.\");\r\n \t}\r\n \tif (!this.columnKeys.contains(columnKey)) {\r\n \t\tthrow new UnknownKeyException(\"Unknown key: \" + columnKey);\r\n \...
[ { "covered_lines": 7, "line_coverage": 1, "name": "org.jfree.data.category.junit.DefaultCategoryDatasetTests::testBug1835955", "total_lines": 7 }, { "covered_lines": 7, "line_coverage": 1, "name": "org.jfree.data.junit.DefaultKeyedValues2DTests::testRemoveColumnByKey", "total_lin...
21
Chart
19
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -3537691700434728188L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE...
{ "body": "public int getDomainAxisIndex(CategoryAxis axis) {\r\n if (axis == null) {\r\n throw new IllegalArgumentException(\"Null 'axis' argument.\");\r\n }\r\n return this.domainAxes.indexOf(axis);\r\n }", "class_method_signature": "CategoryPlot.getDomainAxisIndex(CategoryAxis ...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testGetRangeAxisIndex", "total_lines": 1 }, { "covered_lines": 1, "line_coverage": 1, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testGetDomainAxisIndex", "total_lines": 1 ...
22
Chart
19
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -3537691700434728188L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE...
{ "body": "public int getRangeAxisIndex(ValueAxis axis) {\r\n if (axis == null) {\r\n throw new IllegalArgumentException(\"Null 'axis' argument.\");\r\n }\r\n int result = this.rangeAxes.indexOf(axis);\r\n if (result < 0) { // try the parent plot\r\n Plot parent = get...
[ { "covered_lines": 5, "line_coverage": 0.7143, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testGetRangeAxisIndex", "total_lines": 7 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.plot.junit.CategoryPlotTests::testGetDomainAxisIndex", "total_lines...
23
Chart
21
{ "fields": [ { "modifier": "", "original_string": "protected KeyedObjects2D data;", "type": "KeyedObjects2D", "var_name": "data" }, { "modifier": "", "original_string": "private double minimumRangeValue;", "type": "double", "var_name": "minimumRangeValue" ...
{ "body": "public void add(BoxAndWhiskerItem item, Comparable rowKey, \r\n Comparable columnKey) {\r\n\r\n this.data.addObject(item, rowKey, columnKey);\r\n \r\n // update cached min and max values\r\n int r = this.data.getRowIndex(rowKey);\r\n int c = this.data.getColumn...
[ { "covered_lines": 27, "line_coverage": 0.9, "name": "org.jfree.data.statistics.junit.DefaultBoxAndWhiskerCategoryDatasetTests::testGetRangeBounds", "total_lines": 30 } ]
24
Chart
21
{ "fields": [ { "modifier": "", "original_string": "protected KeyedObjects2D data;", "type": "KeyedObjects2D", "var_name": "data" }, { "modifier": "", "original_string": "private double minimumRangeValue;", "type": "double", "var_name": "minimumRangeValue" ...
{ "body": "private void updateBounds() {\r\n this.minimumRangeValue = Double.NaN;\r\n this.minimumRangeValueRow = -1;\r\n this.minimumRangeValueColumn = -1;\r\n this.maximumRangeValue = Double.NaN;\r\n this.maximumRangeValueRow = -1;\r\n this.maximumRangeValueColumn = -1;\r\n...
[ { "covered_lines": 3, "line_coverage": 1, "name": "org.jfree.data.statistics.junit.DefaultBoxAndWhiskerCategoryDatasetTests::testGetRangeBounds", "total_lines": 3 } ]
25
Chart
22
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -1015873563138522374L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private List rowKeys;", "type": "List", "var_nam...
{ "body": "public Object getObject(Comparable rowKey, Comparable columnKey) {\r\n if (rowKey == null) {\r\n throw new IllegalArgumentException(\"Null 'rowKey' argument.\");\r\n }\r\n if (columnKey == null) {\r\n throw new IllegalArgumentException(\"Null 'columnKey' argument....
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveColumnByKey", "total_lines": 14 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveValue", "total_lines": 14 }, { ...
26
Chart
22
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -1015873563138522374L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private List rowKeys;", "type": "List", "var_nam...
{ "body": "public void removeColumn(Comparable columnKey) {\r\n int index = getColumnIndex(columnKey);\r\n if (index < 0) {\r\n throw new UnknownKeyException(\"Column key (\" + columnKey \r\n + \") not recognised.\");\r\n }\r\n Iterator iterator = this.rows.it...
[ { "covered_lines": 6, "line_coverage": 0.6, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveColumnByKey", "total_lines": 10 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveValue", "total_lines": 10 }, { ...
27
Chart
22
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -1015873563138522374L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private List rowKeys;", "type": "List", "var_nam...
{ "body": "public void removeObject(Comparable rowKey, Comparable columnKey) {\r\n setObject(null, rowKey, columnKey);\r\n \r\n // 1. check whether the row is now empty.\r\n boolean allNull = true;\r\n int rowIndex = getRowIndex(rowKey);\r\n KeyedObjects row = (KeyedObjects) ...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveColumnByKey", "total_lines": 13 }, { "covered_lines": 11, "line_coverage": 0.8462, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveValue", "total_lines": 13 }, ...
28
Chart
22
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -1015873563138522374L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private List rowKeys;", "type": "List", "var_nam...
{ "body": "public void removeRow(Comparable rowKey) {\r\n int index = getRowIndex(rowKey);\r\n if (index < 0) {\r\n throw new UnknownKeyException(\"Row key (\" + rowKey \r\n + \") not recognised.\");\r\n }\r\n removeRow(index);\r\n }", "class_method_signa...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveColumnByKey", "total_lines": 3 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.data.junit.KeyedObjects2DTests::testRemoveValue", "total_lines": 3 }, { "c...
29
Chart
24
{ "fields": [ { "modifier": "", "original_string": "private double lowerBound;", "type": "double", "var_name": "lowerBound" }, { "modifier": "", "original_string": "private double upperBound;", "type": "double", "var_name": "upperBound" } ], "file": ...
{ "body": "public Paint getPaint(double value) {\r\n double v = Math.max(value, this.lowerBound);\r\n v = Math.min(v, this.upperBound);\r\n int g = (int) ((v - this.lowerBound) / (this.upperBound \r\n - this.lowerBound) * 255.0);\r\n return new Color(g, g, g);\r\n }", "...
[ { "covered_lines": 4, "line_coverage": 1, "name": "org.jfree.chart.renderer.junit.GrayPaintScaleTests::testGetPaint", "total_lines": 4 } ]
30
Chart
25
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -4986038395414039117L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private transient Paint errorIndicatorPaint;", "type":...
{ "body": "protected void drawHorizontalItem(Graphics2D g2,\r\n CategoryItemRendererState state,\r\n Rectangle2D dataArea,\r\n CategoryPlot plot,\r\n CategoryAxis domainA...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.renderer.category.junit.StatisticalBarRendererTests::testDrawWithNullMeanVertical", "total_lines": 67 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.jfree.chart.renderer.category.junit.StatisticalBarRendere...
31
Chart
25
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = -4986038395414039117L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private transient Paint errorIndicatorPaint;", "type":...
{ "body": "protected void drawVerticalItem(Graphics2D g2,\r\n CategoryItemRendererState state,\r\n Rectangle2D dataArea,\r\n CategoryPlot plot,\r\n CategoryAxis domainAxis,\r\n ...
[ { "covered_lines": 46, "line_coverage": 0.6765, "name": "org.jfree.chart.renderer.category.junit.StatisticalBarRendererTests::testDrawWithNullMeanVertical", "total_lines": 68 }, { "covered_lines": 46, "line_coverage": 0.6765, "name": "org.jfree.chart.renderer.category.junit.Statistic...
32
Chart
26
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 7719289504573298271L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "public static final boolean DEFAULT_AXIS_VISIBLE = true;", ...
{ "body": "protected AxisState drawLabel(String label, Graphics2D g2, \r\n Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge, \r\n AxisState state, PlotRenderingInfo plotState) {\r\n\r\n // it is unlikely that 'state' will be null, but check anyway...\r\n if (state == ...
[ { "covered_lines": 28, "line_coverage": 0.3457, "name": "org.jfree.chart.junit.AreaChartTests::testDrawWithNullInfo", "total_lines": 81 }, { "covered_lines": 28, "line_coverage": 0.3457, "name": "org.jfree.chart.junit.BarChart3DTests::testDrawWithNullInfo", "total_lines": 81 },...
33
Cli
1
{ "fields": [ { "modifier": "", "original_string": "private List args = new LinkedList();", "type": "List", "var_name": "args" }, { "modifier": "", "original_string": "private Set options = new HashSet();", "type": "Set", "var_name": "options" } ], "...
{ "body": "void addOption(Option opt)\n {\n options.add(opt);\n }", "class_method_signature": "CommandLine.addOption(Option opt)", "constructor": false, "full_signature": "void addOption(Option opt)", "identifier": "addOption", "invocations": [ "add" ], "modifiers": "", "parameters": ...
[ { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.bug.BugCLI13Test::testCLI13", "total_lines": 7 } ]
34
Cli
1
{ "fields": [ { "modifier": "", "original_string": "private List args = new LinkedList();", "type": "List", "var_name": "args" }, { "modifier": "", "original_string": "private Set options = new HashSet();", "type": "Set", "var_name": "options" } ], "...
{ "body": "public String[] getOptionValues(String opt)\n {\n Option key = resolveOption( opt );\n\n if (options.contains(key))\n {\n return key.getValues();\n }\n\n return null;\n }", "class_method_signature": "CommandLine.getOptionValues(String opt)", "cons...
[ { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.bug.BugCLI13Test::testCLI13", "total_lines": 7 } ]
35
Cli
1
{ "fields": [ { "modifier": "", "original_string": "private List args = new LinkedList();", "type": "List", "var_name": "args" }, { "modifier": "", "original_string": "private Set options = new HashSet();", "type": "Set", "var_name": "options" } ], "...
{ "body": "public boolean hasOption(String opt)\n {\n return options.contains( resolveOption(opt));\n }", "class_method_signature": "CommandLine.hasOption(String opt)", "constructor": false, "full_signature": "public boolean hasOption(String opt)", "identifier": "hasOption", "invocations": [ ...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI13Test::testCLI13", "total_lines": 1 } ]
36
Cli
2
{ "fields": [ { "modifier": "", "original_string": "private ArrayList tokens = new ArrayList();", "type": "ArrayList", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" ...
{ "body": "protected void burstToken(String token, boolean stopAtNonOption)\n {\n int tokenLength = token.length();\n\n for (int i = 1; i < tokenLength; i++)\n {\n String ch = String.valueOf(token.charAt(i));\n boolean hasOption = options.hasOption(ch);\n\n if ...
[ { "covered_lines": 13, "line_coverage": 0.9286, "name": "org.apache.commons.cli.bug.BugCLI51Test::test", "total_lines": 14 } ]
37
Cli
3
{ "fields": [], "file": "src/java/org/apache/commons/cli/TypeHandler.java", "identifier": "TypeHandler", "interfaces": "", "superclass": "" }
{ "body": "public static Number createNumber(String str)\n {\n try\n {\n if( str != null )\n {\n if( str.indexOf('.') != -1 )\n {\n return Double.valueOf(str);\n }\n else\n {\n ...
[ { "covered_lines": 1, "line_coverage": 0.25, "name": "org.apache.commons.cli.PatternOptionBuilderTest::testSimplePattern", "total_lines": 4 } ]
38
Cli
4
{ "fields": [ { "modifier": "", "original_string": "private CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "private Options options;", "type": "Options", "var_name": "options" }, { "modifier"...
{ "body": "private void checkRequiredOptions()\n throws MissingOptionException\n {\n // if there are required options that have not been\n // processsed\n if (requiredOptions.size() > 0)\n {\n Iterator iter = requiredOptions.iterator();\n StringBuffer buff =...
[ { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.OptionsTest::testMissingOptionsException", "total_lines": 7 }, { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.OptionsTest::testMissingOptionException", "total_lines": 7 ...
39
Cli
5
{ "fields": [], "file": "src/java/org/apache/commons/cli/Util.java", "identifier": "Util", "interfaces": "", "superclass": "" }
{ "body": "static String stripLeadingHyphens(String str)\n {\n if (str == null) {\n return null;\n }\n if (str.startsWith(\"--\"))\n {\n return str.substring(2, str.length());\n }\n else if (str.startsWith(\"-\"))\n {\n return str.su...
[ { "covered_lines": 4, "line_coverage": 0.8, "name": "org.apache.commons.cli.UtilTest::testStripLeadingHyphens", "total_lines": 5 }, { "covered_lines": 1, "line_coverage": 0.2, "name": "org.apache.commons.cli.bug.BugCLI133Test::testOrder", "total_lines": 5 } ]
40
Cli
8
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "protected StringBuffer renderWrappedText(StringBuffer sb, int width, \n int nextLineTabStop, String text)\n {\n int pos = findWrapPos(text, width, 0);\n\n if (pos == -1)\n {\n sb.append(rtrim(text));\n\n return sb;\n ...
[ { "covered_lines": 9, "line_coverage": 0.75, "name": "org.apache.commons.cli.HelpFormatterTest::testPrintWrapped", "total_lines": 12 } ]
41
Cli
9
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "private Options options;", "type": "Options", "var_name": "options" }, { "modifie...
{ "body": "protected void checkRequiredOptions()\n throws MissingOptionException\n {\n // if there are required options that have not been\n // processsed\n if (getRequiredOptions().size() > 0)\n {\n Iterator iter = getRequiredOptions().iterator();\n StringB...
[ { "covered_lines": 8, "line_coverage": 0.8889, "name": "org.apache.commons.cli.OptionsTest::testMissingOptionsException", "total_lines": 9 }, { "covered_lines": 8, "line_coverage": 0.8889, "name": "org.apache.commons.cli.ParseRequiredTest::testMissingRequiredOptions", "total_line...
42
Cli
10
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "private Options options;", "type": "Options", "var_name": "options" }, { "modifie...
{ "body": "protected void setOptions(final Options options) {\n this.options = options;\n this.requiredOptions = new ArrayList(options.getRequiredOptions());\n }", "class_method_signature": "Parser.setOptions(final Options options)", "constructor": false, "full_signature": "protected void setOp...
[ { "covered_lines": 3, "line_coverage": 1, "name": "org.apache.commons.cli.ParseRequiredTest::testReuseOptionsTwice", "total_lines": 3 } ]
43
Cli
11
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "private static void appendOption(final StringBuffer buff, \n final Option option, \n final boolean required)\n {\n if (!required)\n {\n buff.append(\"[\");\n }\n\n if (option.getOpt() != null)\...
[ { "covered_lines": 7, "line_coverage": 0.7, "name": "org.apache.commons.cli.HelpFormatterTest::testPrintOptionWithEmptyArgNameUsage", "total_lines": 10 } ]
44
Cli
12
{ "fields": [], "file": "src/java/org/apache/commons/cli/GnuParser.java", "identifier": "GnuParser", "interfaces": "", "superclass": "Parser" }
{ "body": "protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)\n {\n List tokens = new ArrayList();\n\n boolean eatTheRest = false;\n\n for (int i = 0; i < arguments.length; i++)\n {\n String arg = arguments[i];\n\n if (\"--\".e...
[ { "covered_lines": 15, "line_coverage": 0.625, "name": "org.apache.commons.cli.GnuParserTest::testShortWithEqual", "total_lines": 24 }, { "covered_lines": 15, "line_coverage": 0.625, "name": "org.apache.commons.cli.GnuParserTest::testLongWithEqualSingleDash", "total_lines": 24 ...
45
Cli
13
{ "fields": [ { "modifier": "", "original_string": "private static final char NUL = '\\0';", "type": "char", "var_name": "NUL" }, { "modifier": "", "original_string": "public static final char DEFAULT_INITIAL_SEPARATOR = NUL;", "type": "char", "var_name": "D...
{ "body": "public void processValues(final WriteableCommandLine commandLine,\n final ListIterator arguments,\n final Option option)\n throws OptionException {\n // count of arguments processed for this option.\n int argumentCount = command...
[ { "covered_lines": 11, "line_coverage": 0.3793, "name": "org.apache.commons.cli2.bug.BugLoopingOptionLookAlikeTest::testLoopingOptionLookAlike2", "total_lines": 29 } ]
46
Cli
14
{ "fields": [ { "modifier": "", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "modifier": "", "original_string": "private final String description;", "type": "String", "var_name": "description" }, { ...
{ "body": "public void validate(final WriteableCommandLine commandLine)\n throws OptionException {\n // number of options found\n int present = 0;\n\n // reference to first unexpected option\n Option unexpected = null;\n\n for (final Iterator i = options.iterator(); i.hasNext...
[ { "covered_lines": 10, "line_coverage": 0.4348, "name": "org.apache.commons.cli2.bug.BugCLI144Test::testFileValidator", "total_lines": 23 } ]
47
Cli
15
{ "fields": [ { "modifier": "", "original_string": "private final Map optionToProperties = new HashMap();", "type": "Map", "var_name": "optionToProperties" }, { "modifier": "", "original_string": "private final List options = new ArrayList();", "type": "List", ...
{ "body": "public List getValues(final Option option,\n List defaultValues) {\n // initialize the return list\n List valueList = (List) values.get(option);\n\n // grab the correct default values\n if (defaultValues == null || defaultValues.isEmpty()) {\n ...
[ { "covered_lines": 4, "line_coverage": 0.6667, "name": "org.apache.commons.cli2.bug.BugCLI158Test::testSingleOptionSingleArgument", "total_lines": 6 }, { "covered_lines": 4, "line_coverage": 0.6667, "name": "org.apache.commons.cli2.bug.BugCLI158Test::testSingleOptionMaximumNumberOfAr...
48
Cli
16
{ "fields": [ { "modifier": "", "original_string": "private final Map optionToProperties = new HashMap();", "type": "Map", "var_name": "optionToProperties" }, { "modifier": "", "original_string": "private final List options = new ArrayList();", "type": "List", ...
{ "body": "public void addOption(Option option) {\n options.add(option);\n nameToOption.put(option.getPreferredName(), option);\n\n for (Iterator i = option.getTriggers().iterator(); i.hasNext();) {\n nameToOption.put(i.next(), option);\n }\n\n // ensure that all parent o...
[ { "covered_lines": 5, "line_coverage": 1, "name": "org.apache.commons.cli2.bug.BugCLI123Test::testMultipleChildOptions", "total_lines": 5 }, { "covered_lines": 5, "line_coverage": 1, "name": "org.apache.commons.cli2.bug.BugCLI123Test::testParentOptionAndChildOption", "total_lines...
49
Cli
17
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "protected void burstToken(String token, boolean stopAtNonOption)\n {\n for (int i = 1; i < token.length(); i++)\n {\n String ch = String.valueOf(token.charAt(i));\n\n if (options.hasOption(ch))\n {\n tokens.add(\"-\" + ch);\n c...
[ { "covered_lines": 9, "line_coverage": 0.6923, "name": "org.apache.commons.cli.PosixParserTest::testStopBursting", "total_lines": 13 } ]
50
Cli
18
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)\n {\n init();\n this.options = options;\n\n // an iterator for the command line tokens\n Iterator iter = Arrays.asList(arguments).iterator();\n\n // process each command line token...
[ { "covered_lines": 13, "line_coverage": 0.5417, "name": "org.apache.commons.cli.PosixParserTest::testStop2", "total_lines": 24 } ]
51
Cli
18
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "private void processOptionToken(String token, boolean stopAtNonOption)\n {\n if (options.hasOption(token))\n {\n currentOption = options.getOption(token);\n tokens.add(token);\n }\n else if (stopAtNonOption)\n {\n eatTheRest = true;\n ...
[ { "covered_lines": 4, "line_coverage": 0.6667, "name": "org.apache.commons.cli.PosixParserTest::testStop2", "total_lines": 6 } ]
52
Cli
19
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "private void processOptionToken(String token, boolean stopAtNonOption)\n {\n if (options.hasOption(token))\n {\n currentOption = options.getOption(token);\n }\n else if (stopAtNonOption)\n {\n eatTheRest = true;\n }\n\n tokens.add(to...
[ { "covered_lines": 3, "line_coverage": 0.4286, "name": "org.apache.commons.cli.PosixParserTest::testUnrecognizedOption2", "total_lines": 7 } ]
53
Cli
20
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)\n {\n init();\n this.options = options;\n\n // an iterator for the command line tokens\n Iterator iter = Arrays.asList(arguments).iterator();\n\n // process each command line token...
[ { "covered_lines": 17, "line_coverage": 0.7083, "name": "org.apache.commons.cli.PosixParserTest::testStop3", "total_lines": 24 } ]
54
Cli
21
{ "fields": [ { "modifier": "", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "modifier": "", "original_string": "private final String description;", "type": "String", "var_name": "description" }, { ...
{ "body": "private boolean looksLikeOption(final WriteableCommandLine commandLine,\n final String trigger) {\n Option oldOption = commandLine.getCurrentOption();\n try {\n commandLine.setCurrentOption(this);\n return commandLine.looksLikeOption(trigger);\n } final...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.apache.commons.cli2.bug.BugCLI150Test::testNegativeNumber", "total_lines": 1 } ]
55
Cli
21
{ "fields": [ { "modifier": "", "original_string": "private final Map optionToProperties = new HashMap();", "type": "Map", "var_name": "optionToProperties" }, { "modifier": "", "original_string": "private final List options = new ArrayList();", "type": "List", ...
{ "body": "public boolean looksLikeOption(final String trigger)\n {\n if (checkForOption != null)\n {\n // this is a reentrant call\n return !checkForOption.equals(trigger);\n }\n\n checkForOption = trigger;\n try\n {\n for (final Iterator ...
[ { "covered_lines": 5, "line_coverage": 0.8333, "name": "org.apache.commons.cli2.bug.BugCLI150Test::testNegativeNumber", "total_lines": 6 } ]
56
Cli
22
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)\n {\n init();\n this.options = options;\n\n // an iterator for the command line tokens\n Iterator iter = Arrays.asList(arguments).iterator();\n\n // process each command line token...
[ { "covered_lines": 15, "line_coverage": 0.5769, "name": "org.apache.commons.cli.ApplicationTest::testGroovy", "total_lines": 26 }, { "covered_lines": 15, "line_coverage": 0.5769, "name": "org.apache.commons.cli.PosixParserTest::testStopAtExpectedArg", "total_lines": 26 } ]
57
Cli
22
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "private void processNonOptionToken(String value, boolean stopAtNonOption)\n {\n if (stopAtNonOption && (currentOption == null || !currentOption.hasArg()))\n {\n eatTheRest = true;\n tokens.add(\"--\");\n }\n\n tokens.add(value);\n }", "class_method_...
[ { "covered_lines": 4, "line_coverage": 1, "name": "org.apache.commons.cli.ApplicationTest::testGroovy", "total_lines": 4 }, { "covered_lines": 4, "line_coverage": 1, "name": "org.apache.commons.cli.PosixParserTest::testStopAtExpectedArg", "total_lines": 4 } ]
58
Cli
22
{ "fields": [ { "modifier": "", "original_string": "private List tokens = new ArrayList();", "type": "List", "var_name": "tokens" }, { "modifier": "", "original_string": "private boolean eatTheRest;", "type": "boolean", "var_name": "eatTheRest" }, { ...
{ "body": "private void processOptionToken(String token, boolean stopAtNonOption)\n {\n if (stopAtNonOption && !options.hasOption(token))\n {\n eatTheRest = true;\n }\n\n if (options.hasOption(token))\n {\n currentOption = options.getOption(token);\n ...
[ { "covered_lines": 3, "line_coverage": 0.75, "name": "org.apache.commons.cli.ApplicationTest::testGroovy", "total_lines": 4 }, { "covered_lines": 3, "line_coverage": 0.75, "name": "org.apache.commons.cli.PosixParserTest::testStopAtExpectedArg", "total_lines": 4 } ]
59
Cli
23
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "protected StringBuffer renderWrappedText(StringBuffer sb, int width, \n int nextLineTabStop, String text)\n {\n int pos = findWrapPos(text, width, 0);\n\n if (pos == -1)\n {\n sb.append(rtrim(text));\n\n return sb;\n ...
[ { "covered_lines": 14, "line_coverage": 0.875, "name": "org.apache.commons.cli.bug.BugCLI162Test::testInfiniteLoop", "total_lines": 16 }, { "covered_lines": 16, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI162Test::testPrintHelpLongLines", "total_lines": 16 } ]
60
Cli
24
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "protected StringBuffer renderWrappedText(StringBuffer sb, int width, \n int nextLineTabStop, String text)\n {\n int pos = findWrapPos(text, width, 0);\n\n if (pos == -1)\n {\n sb.append(rtrim(text));\n\n return sb;\n ...
[ { "covered_lines": 16, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI162Test::testLongLineChunkingIndentIgnored", "total_lines": 16 } ]
61
Cli
25
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "protected StringBuffer renderWrappedText(StringBuffer sb, int width, \n int nextLineTabStop, String text)\n {\n int pos = findWrapPos(text, width, 0);\n\n if (pos == -1)\n {\n sb.append(rtrim(text));\n\n return sb;\n ...
[ { "covered_lines": 16, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI162Test::testLongLineChunkingIndentIgnored", "total_lines": 16 } ]
62
Cli
26
{ "fields": [ { "modifier": "", "original_string": "private static String longopt;", "type": "String", "var_name": "longopt" }, { "modifier": "", "original_string": "private static String description;", "type": "String", "var_name": "description" }, ...
{ "body": "public static Option create(String opt) throws IllegalArgumentException\n {\n Option option = null;\n try {\n // create the option\n option = new Option(opt, description);\n\n // set the option properties\n option.setLongOpt(longopt);\n ...
[ { "covered_lines": 10, "line_coverage": 1, "name": "org.apache.commons.cli.OptionBuilderTest::testBuilderIsResettedAlways", "total_lines": 10 } ]
63
Cli
27
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private Map optionMap = new HashMap();", "type": "Map", "var_name":...
{ "body": "public void setSelected(Option option) throws AlreadySelectedException\n {\n if (option == null)\n {\n // reset the option previously selected\n selected = null;\n return;\n }\n \n // if no option has already been selected or the \n ...
[ { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.BasicParserTest::testOptionGroupLong", "total_lines": 7 }, { "covered_lines": 6, "line_coverage": 0.8571, "name": "org.apache.commons.cli.GnuParserTest::testOptionGroupLong", "total_lines": 7 }, { ...
64
Cli
28
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "private Options options;", "type": "Options", "var_name": "options" }, { "modifie...
{ "body": "protected void processProperties(Properties properties)\n {\n if (properties == null)\n {\n return;\n }\n\n for (Enumeration e = properties.propertyNames(); e.hasMoreElements();)\n {\n String option = e.nextElement().toString();\n\n if ...
[ { "covered_lines": 18, "line_coverage": 0.9474, "name": "org.apache.commons.cli.ValueTest::testPropertyOptionFlags", "total_lines": 19 } ]
65
Cli
29
{ "fields": [], "file": "src/java/org/apache/commons/cli/Util.java", "identifier": "Util", "interfaces": "", "superclass": "" }
{ "body": "static String stripLeadingAndTrailingQuotes(String str)\n {\n int length = str.length();\n if (length > 1 && str.startsWith(\"\\\"\") && str.endsWith(\"\\\"\") && str.substring(1, length - 1).indexOf('\"') == -1)\n {\n str = str.substring(1, length - 1);\n }\n ...
[ { "covered_lines": 6, "line_coverage": 1, "name": "org.apache.commons.cli.UtilTest::testStripLeadingAndTrailingQuotes", "total_lines": 6 } ]
66
Cli
30
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "protected Options options;", "type": "Options", "var_name": "options" }, { "modif...
{ "body": "private void handleProperties(Properties properties) throws ParseException\n {\n if (properties == null)\n {\n return;\n }\n \n for (Enumeration e = properties.propertyNames(); e.hasMoreElements();)\n {\n String option = e.nextElement().toS...
[ { "covered_lines": 0, "line_coverage": 0, "name": "org.apache.commons.cli.BasicParserTest::testPropertyOptionGroup", "total_lines": 18 }, { "covered_lines": 0, "line_coverage": 0, "name": "org.apache.commons.cli.BasicParserTest::testPropertyOptionUnexpected", "total_lines": 18 ...
67
Cli
30
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "private Options options;", "type": "Options", "var_name": "options" }, { "modifie...
{ "body": "protected void processProperties(Properties properties) throws ParseException\n {\n if (properties == null)\n {\n return;\n }\n\n for (Enumeration e = properties.propertyNames(); e.hasMoreElements();)\n {\n String option = e.nextElement().toString...
[ { "covered_lines": 12, "line_coverage": 0.6, "name": "org.apache.commons.cli.BasicParserTest::testPropertyOptionGroup", "total_lines": 20 }, { "covered_lines": 7, "line_coverage": 0.35, "name": "org.apache.commons.cli.BasicParserTest::testPropertyOptionUnexpected", "total_lines":...
68
Cli
31
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "private void appendOption(final StringBuffer buff, final Option option, final boolean required)\n {\n if (!required)\n {\n buff.append(\"[\");\n }\n\n if (option.getOpt() != null)\n {\n buff.append(\"-\").append(option.getOpt());\n }\n ...
[ { "covered_lines": 8, "line_coverage": 0.7273, "name": "org.apache.commons.cli.HelpFormatterTest::testDefaultArgName", "total_lines": 11 } ]
69
Cli
31
{ "fields": [ { "modifier": "", "original_string": "private static String longopt;", "type": "String", "var_name": "longopt" }, { "modifier": "", "original_string": "private static String description;", "type": "String", "var_name": "description" }, ...
{ "body": "private static void reset()\n {\n description = null;\n argName = null;\n longopt = null;\n type = null;\n required = false;\n numberOfArgs = Option.UNINITIALIZED;\n optionalArg = false;\n valuesep = (char) 0;\n }", "class_method_signature": "...
[ { "covered_lines": 9, "line_coverage": 1, "name": "org.apache.commons.cli.HelpFormatterTest::testDefaultArgName", "total_lines": 9 } ]
70
Cli
32
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "protected int findWrapPos(String text, int width, int startPos)\n {\n int pos;\n \n // the line ends before the max wrap pos or a new line char found\n if (((pos = text.indexOf('\\n', startPos)) != -1 && pos <= width)\n || ((pos = text.indexOf('\\t', startPos))...
[ { "covered_lines": 10, "line_coverage": 0.7143, "name": "org.apache.commons.cli.HelpFormatterTest::testRenderWrappedTextWordCut", "total_lines": 14 }, { "covered_lines": 13, "line_coverage": 0.9286, "name": "org.apache.commons.cli.HelpFormatterTest::testFindWrapPos", "total_lines...
71
Cli
33
{ "fields": [ { "modifier": "", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "modifier": "", "original_string": "public static final int DEFAULT_LEFT_PAD = 1;", "type": "int", "var_name": "...
{ "body": "public void printWrapped(PrintWriter pw, int width, int nextLineTabStop, String text)\n {\n StringBuffer sb = new StringBuffer(text.length());\n\n renderWrappedTextBlock(sb, width, nextLineTabStop, text);\n pw.println(sb.toString());\n }", "class_method_signature": "HelpFormatt...
[ { "covered_lines": 2, "line_coverage": 1, "name": "org.apache.commons.cli.HelpFormatterTest::testIndentedHeaderAndFooter", "total_lines": 2 } ]
72
Cli
34
{ "fields": [ { "modifier": "", "original_string": "private static String longopt;", "type": "String", "var_name": "longopt" }, { "modifier": "", "original_string": "private static String description;", "type": "String", "var_name": "description" }, ...
{ "body": "private static void reset()\n {\n description = null;\n argName = null;\n longopt = null;\n type = String.class;\n required = false;\n numberOfArgs = Option.UNINITIALIZED;\n optionalArg = false;\n valuesep = (char) 0;\n }", "class_method_signa...
[ { "covered_lines": 9, "line_coverage": 1, "name": "org.apache.commons.cli.CommandLineTest::testGetParsedOptionValue", "total_lines": 9 }, { "covered_lines": 9, "line_coverage": 1, "name": "org.apache.commons.cli.OptionBuilderTest::testTwoCompleteOptions", "total_lines": 9 } ]
73
Cli
35
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private final Map<String, Option> shortOpts = new LinkedHashMap<String, Option>...
{ "body": "public List<String> getMatchingOptions(String opt)\n {\n opt = Util.stripLeadingHyphens(opt);\n \n List<String> matchingOpts = new ArrayList<String>();\n\n // for a perfect match return the single option only\n if(longOpts.keySet().contains(opt)) {\n return ...
[ { "covered_lines": 7, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI252Test::testExactOptionNameMatch", "total_lines": 7 } ]
74
Cli
37
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "protected Options options;", "type": "Options", "var_name": "options" }, { "modif...
{ "body": "private boolean isShortOption(String token)\n {\n // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)\n if (!token.startsWith(\"-\") || token.length() == 1)\n {\n return false;\n }\n\n // remove leading \"-\" and \"=value\"\n int pos = token.indexOf(\"=\...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.apache.commons.cli.bug.BugCLI265Test::shouldParseShortOptionWithoutValue", "total_lines": 1 } ]
75
Cli
38
{ "fields": [ { "modifier": "", "original_string": "protected CommandLine cmd;", "type": "CommandLine", "var_name": "cmd" }, { "modifier": "", "original_string": "protected Options options;", "type": "Options", "var_name": "options" }, { "modif...
{ "body": "private boolean isShortOption(String token)\n {\n // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)\n if (!token.startsWith(\"-\") || token.length() == 1)\n {\n return false;\n }\n\n // remove leading \"-\" and \"=value\"\n int pos = token.indexOf(\"=\...
[ { "covered_lines": 4, "line_coverage": 0.8, "name": "org.apache.commons.cli.bug.BugCLI265Test::shouldParseConcatenatedShortOptions", "total_lines": 5 } ]
76
Cli
39
{ "fields": [], "file": "src/main/java/org/apache/commons/cli/TypeHandler.java", "identifier": "TypeHandler", "interfaces": "", "superclass": "" }
{ "body": "public static Object createValue(final String str, final Class<?> clazz) throws ParseException\n {\n if (PatternOptionBuilder.STRING_VALUE == clazz)\n {\n return str;\n }\n else if (PatternOptionBuilder.OBJECT_VALUE == clazz)\n {\n return createOb...
[ { "covered_lines": 1, "line_coverage": 1, "name": "org.apache.commons.cli.PatternOptionBuilderTest::testExistingFilePattern", "total_lines": 1 }, { "covered_lines": 1, "line_coverage": 1, "name": "org.apache.commons.cli.PatternOptionBuilderTest::testExistingFilePatternFileNotExist", ...
77
Closure
1
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private final CodingConvention codingConvention;", "type": "CodingConvention"...
{ "body": "private void removeUnreferencedFunctionArgs(Scope fnScope) {\n // Notice that removing unreferenced function args breaks\n // Function.prototype.length. In advanced mode, we don't really care\n // about this: we consider \"length\" the equivalent of reflecting on\n // the function's lexical sou...
[ { "covered_lines": 14, "line_coverage": 0.8235, "name": "com.google.javascript.jscomp.CommandLineRunnerTest::testSimpleModeLeavesUnusedParams", "total_lines": 17 }, { "covered_lines": 14, "line_coverage": 0.8235, "name": "com.google.javascript.jscomp.CommandLineRunnerTest::testForwar...
78
Closure
2
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType UNEXPECTED_TOKEN = DiagnosticType.error(\n \"JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN\",\n \"Internal Error: Don't know how to handle {0}\");", "type": "DiagnosticType", "var_name": "UNEXPECTED_TOKEN" ...
{ "body": "private void checkInterfaceConflictProperties(NodeTraversal t, Node n,\n String functionName, HashMap<String, ObjectType> properties,\n HashMap<String, ObjectType> currentProperties,\n ObjectType interfaceType) {\n ObjectType implicitProto = interfaceType.getImplicitPrototype();\n Set<...
[ { "covered_lines": 2, "line_coverage": 0.1176, "name": "com.google.javascript.jscomp.TypeCheckTest::testBadInterfaceExtendsNonExistentInterfaces", "total_lines": 17 } ]
79
Closure
3
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private final Set<Var> inlinedNewDependencies = Sets.newHashSet();", "type": ...
{ "body": "@Override\n public void enterScope(NodeTraversal t) {\n\n if (t.inGlobalScope()) {\n return; // Don't even brother. All global variables are likely escaped.\n }\n\n if (LiveVariablesAnalysis.MAX_VARIABLES_TO_ANALYZE <\n t.getScope().getVarCount()) {\n return;\n }\n\n // Com...
[ { "covered_lines": 22, "line_coverage": 0.9565, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testDoNotInlineCatchExpression1a", "total_lines": 23 }, { "covered_lines": 22, "line_coverage": 0.9565, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVar...
80
Closure
4
{ "fields": [ { "modifier": "", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "modifier": "", "original_string": "private final String reference;", "type": "String", "var_name": "re...
{ "body": "@Override\n JSType resolveInternal(ErrorReporter t, StaticScope<JSType> enclosing) {\n // TODO(user): Investigate whether it is really necessary to keep two\n // different mechanisms for resolving named types, and if so, which order\n // makes more sense. Now, resolution via registry is first in ...
[ { "covered_lines": 7, "line_coverage": 0.4375, "name": "com.google.javascript.jscomp.TypeCheckTest::testImplementsExtendsLoop", "total_lines": 16 }, { "covered_lines": 7, "line_coverage": 0.4375, "name": "com.google.javascript.jscomp.TypeCheckTest::testImplementsLoop", "total_lin...
81
Closure
6
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private final JSTypeRegistry typeRegistry;", "type": "JSTypeRegistry", ...
{ "body": "boolean expectCanAssignTo(NodeTraversal t, Node n, JSType rightType,\n JSType leftType, String msg) {\n if (!rightType.canAssignTo(leftType)) {\n mismatch(t, n, msg, rightType, leftType);\n return false;\n }\n return true;\n }", "class_method_signature": "TypeValidator.expectCanA...
[ { "covered_lines": 2, "line_coverage": 0.3333, "name": "com.google.javascript.jscomp.LooseTypeCheckTest::testTypeRedefinition", "total_lines": 6 }, { "covered_lines": 4, "line_coverage": 0.6667, "name": "com.google.javascript.jscomp.TypeCheckTest::testIssue635b", "total_lines": 6...
82
Closure
6
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private final JSTypeRegistry typeRegistry;", "type": "JSTypeRegistry", ...
{ "body": "boolean expectCanAssignToPropertyOf(NodeTraversal t, Node n, JSType rightType,\n JSType leftType, Node owner, String propName) {\n // The NoType check is a hack to make typedefs work OK.\n if (!leftType.isNoType() && !rightType.canAssignTo(leftType)) {\n // Do not type-check interface metho...
[ { "covered_lines": 5, "line_coverage": 0.3846, "name": "com.google.javascript.jscomp.LooseTypeCheckTest::testTypeRedefinition", "total_lines": 13 }, { "covered_lines": 2, "line_coverage": 0.1538, "name": "com.google.javascript.jscomp.TypeCheckTest::testIssue635b", "total_lines": ...
83
Closure
9
{ "fields": [ { "modifier": "", "original_string": "private static final String MODULE_SLASH = \"/\";", "type": "String", "var_name": "MODULE_SLASH" }, { "modifier": "", "original_string": "public static final String DEFAULT_FILENAME_PREFIX = \".\" + MODULE_SLASH;", ...
{ "body": "private String normalizeSourceName(String filename) {\n // The DOS command shell will normalize \"/\" to \"\\\", so we have to\n // wrestle it back.\n filename = filename.replace(\"\\\\\", \"/\");\n\n if (filename.indexOf(filenamePrefix) == 0) {\n filename = filename.substring(filenamePref...
[ { "covered_lines": 3, "line_coverage": 1, "name": "com.google.javascript.jscomp.ProcessCommonJSModulesTest::testGuessModuleName", "total_lines": 3 } ]
84
Closure
10
{ "fields": [ { "modifier": "", "original_string": "static final long MAX_POSITIVE_INTEGER_NUMBER = (long) Math.pow(2, 53);", "type": "long", "var_name": "MAX_POSITIVE_INTEGER_NUMBER" }, { "modifier": "", "original_string": "static final String JSC_PROPERTY_NAME_FN = \"...
{ "body": "static boolean mayBeString(Node n, boolean recurse) {\n if (recurse) {\n return anyResultsMatch(n, MAY_BE_STRING_PREDICATE);\n } else {\n return mayBeStringHelper(n);\n }\n }", "class_method_signature": "NodeUtil.mayBeString(Node n, boolean recurse)", "constructor": false, "full_s...
[ { "covered_lines": 3, "line_coverage": 1, "name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testIssue821", "total_lines": 3 } ]
85
Closure
11
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType UNEXPECTED_TOKEN = DiagnosticType.error(\n \"JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN\",\n \"Internal Error: Don't know how to handle {0}\");", "type": "DiagnosticType", "var_name": "UNEXPECTED_TOKEN" ...
{ "body": "private void visitGetProp(NodeTraversal t, Node n, Node parent) {\n // obj.prop or obj.method()\n // Lots of types can appear on the left, a call to a void function can\n // never be on the left. getPropertyType will decide what is acceptable\n // and what isn't.\n Node property = n.getLastC...
[ { "covered_lines": 11, "line_coverage": 0.9167, "name": "com.google.javascript.jscomp.TypeCheckTest::testGetprop4", "total_lines": 12 }, { "covered_lines": 11, "line_coverage": 0.9167, "name": "com.google.javascript.jscomp.TypeCheckTest::testIssue810", "total_lines": 12 } ]
86
Closure
12
{ "fields": [ { "modifier": "", "original_string": "private final Scope jsScope;", "type": "Scope", "var_name": "jsScope" }, { "modifier": "", "original_string": "private final Set<Var> escaped;", "type": "Set<Var>", "var_name": "escaped" } ], "file"...
{ "body": "private boolean hasExceptionHandler(Node cfgNode) {\n List<DiGraphEdge<Node, Branch>> branchEdges = getCfg().getOutEdges(cfgNode);\n for (DiGraphEdge<Node, Branch> edge : branchEdges) {\n if (edge.getValue() == Branch.ON_EX) {\n return true;\n }\n }\n return false;\n }", "cl...
[ { "covered_lines": 1, "line_coverage": 1, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testIssue794b", "total_lines": 1 } ]
87
Closure
13
{ "fields": [ { "modifier": "", "original_string": "private AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private final AbstractPeepholeOptimization[] peepholeOptimizations;", "type": "Abst...
{ "body": "private void traverse(Node node) {\n // The goal here is to avoid retraversing\n // the entire AST to catch newly created opportunities.\n // So we track whether a \"unit of code\" has changed,\n // and revisit immediately.\n if (!shouldVisit(node)) {\n return;\n }\n\n int visits ...
[ { "covered_lines": 15, "line_coverage": 1, "name": "com.google.javascript.jscomp.IntegrationTest::testIssue787", "total_lines": 15 } ]
88
Closure
14
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private ControlFlowGraph<Node> cfg;", "type": "ControlFlowGraph<Node>", ...
{ "body": "private static Node computeFollowNode(\n Node fromNode, Node node, ControlFlowAnalysis cfa) {\n /*\n * This is the case where:\n *\n * 1. Parent is null implies that we are transferring control to the end of\n * the script.\n *\n * 2. Parent is a function implies that we are...
[ { "covered_lines": 19, "line_coverage": 0.5278, "name": "com.google.javascript.jscomp.CheckMissingReturnTest::testIssue779", "total_lines": 36 }, { "covered_lines": 20, "line_coverage": 0.5556, "name": "com.google.javascript.jscomp.ControlFlowAnalysisTest::testDeepNestedFinally", ...
89
Closure
18
{ "fields": [ { "modifier": "", "original_string": "static final String SINGLETON_MODULE_NAME = \"[singleton]\";", "type": "String", "var_name": "SINGLETON_MODULE_NAME" }, { "modifier": "", "original_string": "static final DiagnosticType MODULE_DEPENDENCY_ERROR =\n ...
{ "body": "Node parseInputs() {\n boolean devMode = options.devMode != DevMode.OFF;\n\n // If old roots exist (we are parsing a second time), detach each of the\n // individual file parse trees.\n if (externsRoot != null) {\n externsRoot.detachChildren();\n }\n if (jsRoot != null) {\n jsRo...
[ { "covered_lines": 32, "line_coverage": 0.4706, "name": "com.google.javascript.jscomp.IntegrationTest::testDependencySorting", "total_lines": 68 } ]
90
Closure
19
{ "fields": [ { "modifier": "", "original_string": "protected final CodingConvention convention;", "type": "CodingConvention", "var_name": "convention" }, { "modifier": "", "original_string": "final JSTypeRegistry typeRegistry;", "type": "JSTypeRegistry", "v...
{ "body": "protected void declareNameInScope(FlowScope scope, Node node, JSType type) {\n switch (node.getType()) {\n case Token.NAME:\n scope.inferSlotType(node.getString(), type);\n break;\n\n case Token.GETPROP:\n String qualifiedName = node.getQualifiedName();\n Preconditi...
[ { "covered_lines": 3, "line_coverage": 0.25, "name": "com.google.javascript.jscomp.TypeInferenceTest::testNoThisInference", "total_lines": 12 } ]
91
Closure
20
{ "fields": [ { "modifier": "", "original_string": "private static final int AND_PRECEDENCE = NodeUtil.precedence(Token.AND);", "type": "int", "var_name": "AND_PRECEDENCE" }, { "modifier": "", "original_string": "private static final int OR_PRECEDENCE = NodeUtil.precede...
{ "body": "private Node tryFoldSimpleFunctionCall(Node n) {\n Preconditions.checkState(n.isCall());\n Node callTarget = n.getFirstChild();\n if (callTarget != null && callTarget.isName() &&\n callTarget.getString().equals(\"String\")) {\n // Fold String(a) to '' + (a) on immutable literals,\n ...
[ { "covered_lines": 13, "line_coverage": 1, "name": "com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest::testSimpleFunctionCall", "total_lines": 13 } ]
92
Closure
21
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType USELESS_CODE_ERROR = DiagnosticType.warning(\n \"JSC_USELESS_CODE\",\n \"Suspicious code. {0}\");", "type": "DiagnosticType", "var_name": "USELESS_CODE_ERROR" }, { "modifier": "", ...
{ "body": "@Override\n public void visit(NodeTraversal t, Node n, Node parent) {\n // VOID nodes appear when there are extra semicolons at the BLOCK level.\n // I've been unable to think of any cases where this indicates a bug,\n // and apparently some people like keeping these semicolons around,\n // so...
[ { "covered_lines": 33, "line_coverage": 0.9706, "name": "com.google.javascript.jscomp.CheckSideEffectsTest::testUselessCode", "total_lines": 34 } ]
93
Closure
22
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType USELESS_CODE_ERROR = DiagnosticType.warning(\n \"JSC_USELESS_CODE\",\n \"Suspicious code. {0}\");", "type": "DiagnosticType", "var_name": "USELESS_CODE_ERROR" }, { "modifier": "", ...
{ "body": "@Override\n public void visit(NodeTraversal t, Node n, Node parent) {\n // VOID nodes appear when there are extra semicolons at the BLOCK level.\n // I've been unable to think of any cases where this indicates a bug,\n // and apparently some people like keeping these semicolons around,\n // so...
[ { "covered_lines": 34, "line_coverage": 0.8718, "name": "com.google.javascript.jscomp.CheckSideEffectsTest::testUselessCode", "total_lines": 39 } ]
94
Closure
23
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType INVALID_GETELEM_INDEX_ERROR =\n DiagnosticType.error(\n \"JSC_INVALID_GETELEM_INDEX_ERROR\",\n \"Array index not integer: {0}\");", "type": "DiagnosticType", "var_name": "INVALID_GETELEM_...
{ "body": "private Node tryFoldArrayAccess(Node n, Node left, Node right) {\n Node parent = n.getParent();\n // If GETPROP/GETELEM is used as assignment target the array literal is\n // acting as a temporary we can't fold it here:\n // \"[][0] += 1\"\n if (isAssignmentTarget(n)) {\n return n;\n...
[ { "covered_lines": 13, "line_coverage": 0.4815, "name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldGetElem", "total_lines": 27 } ]
95
Closure
25
{ "fields": [ { "modifier": "", "original_string": "static final DiagnosticType TEMPLATE_TYPE_NOT_OBJECT_TYPE =\n DiagnosticType.warning(\n \"JSC_TEMPLATE_TYPE_NOT_OBJECT_TYPE\",\n \"The template type must be an object type.\\nActual: {0}\");", "type": "DiagnosticType", "var...
{ "body": "private FlowScope traverseNew(Node n, FlowScope scope) {\n scope = traverseChildren(n, scope);\n\n Node constructor = n.getFirstChild();\n JSType constructorType = constructor.getJSType();\n JSType type = null;\n if (constructorType != null) {\n constructorType = constructorType.restric...
[ { "covered_lines": 15, "line_coverage": 0.8824, "name": "com.google.javascript.jscomp.TypeInferenceTest::testBackwardsInferenceNew", "total_lines": 17 } ]
96
Closure
27
{ "fields": [], "file": "src/com/google/javascript/rhino/IR.java", "identifier": "IR", "interfaces": "", "superclass": "" }
{ "body": "public static Node tryCatch(Node tryBody, Node catchNode) {\n Preconditions.checkState(tryBody.isBlock());\n Preconditions.checkState(catchNode.isCatch());\n Node catchBody = blockUnchecked(catchNode).copyInformationFrom(catchNode);\n return new Node(Token.TRY, tryBody, catchBody);\n }", "cl...
[ { "covered_lines": 0, "line_coverage": 0, "name": "com.google.javascript.rhino.IRTest::testIssue727_1", "total_lines": 4 }, { "covered_lines": 3, "line_coverage": 0.75, "name": "com.google.javascript.rhino.IRTest::testIssue727_2", "total_lines": 4 }, { "covered_lines": 3,...
97
Closure
27
{ "fields": [], "file": "src/com/google/javascript/rhino/IR.java", "identifier": "IR", "interfaces": "", "superclass": "" }
{ "body": "public static Node tryFinally(Node tryBody, Node finallyBody) {\n Preconditions.checkState(tryBody.isBlock());\n Preconditions.checkState(finallyBody.isBlock());\n Node catchBody = block().copyInformationFrom(tryBody);\n return new Node(Token.TRY, tryBody, catchBody, finallyBody);\n }", "cla...
[ { "covered_lines": 1, "line_coverage": 0.25, "name": "com.google.javascript.rhino.IRTest::testIssue727_1", "total_lines": 4 }, { "covered_lines": 0, "line_coverage": 0, "name": "com.google.javascript.rhino.IRTest::testIssue727_2", "total_lines": 4 }, { "covered_lines": 0,...
98
Closure
30
{ "fields": [ { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" }, { "modifier": "", "original_string": "private ControlFlowGraph<Node> cfg;", "type": "ControlFlowGraph<Node>", ...
{ "body": "@Override\n public void process(Node externs, Node root) {\n (new NodeTraversal(compiler, this)).traverseRoots(externs, root);\n }", "class_method_signature": "FlowSensitiveInlineVariables.process(Node externs, Node root)", "constructor": false, "full_signature": "@Override\n public void proces...
[ { "covered_lines": 2, "line_coverage": 1, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testInlineAcrossSideEffect1", "total_lines": 2 }, { "covered_lines": 2, "line_coverage": 1, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testCa...
99
Closure
30
{ "fields": [ { "modifier": "", "original_string": "private final Scope jsScope;", "type": "Scope", "var_name": "jsScope" }, { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" ...
{ "body": "private void computeDependence(final Definition def, Node rValue) {\n NodeTraversal.traverse(compiler, rValue,\n new AbstractCfgNodeTraversalCallback() {\n @Override\n public void visit(NodeTraversal t, Node n, Node parent) {\n if (n.isName()) {\n Var dep = jsScope.getVa...
[ { "covered_lines": 2, "line_coverage": 1, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testInlineAcrossSideEffect1", "total_lines": 2 }, { "covered_lines": 2, "line_coverage": 1, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testCa...
100
Closure
30
{ "fields": [ { "modifier": "", "original_string": "private final Scope jsScope;", "type": "Scope", "var_name": "jsScope" }, { "modifier": "", "original_string": "private final AbstractCompiler compiler;", "type": "AbstractCompiler", "var_name": "compiler" ...
{ "body": "boolean dependsOnOuterScopeVars(String name, Node useNode) {\n Preconditions.checkArgument(getCfg().hasNode(useNode));\n GraphNode<Node, Branch> n = getCfg().getNode(useNode);\n FlowState<MustDef> state = n.getAnnotation();\n Definition def = state.getIn().reachingDef.get(jsScope.getVar(name));...
[ { "covered_lines": 8, "line_coverage": 0.8889, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testInlineAcrossSideEffect1", "total_lines": 9 }, { "covered_lines": 8, "line_coverage": 0.8889, "name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTe...