test_class_signature stringlengths 21 105 | function stringlengths 268 12.2k | prompt_complete_with_comment stringlengths 1.66k 9.91k | location stringlengths 46 115 | be_test_import_context stringlengths 44 2.77k | be_test_class_function_signature_context stringlengths 60 22.9k | end int64 44 7.03k | function_name stringlengths 8 51 | prompt_chat_with_comment stringlengths 1.56k 9.41k | start int64 28 7.02k | prompt_complete stringlengths 1.75k 10.3k | comment stringlengths 128 2.81k | bug_id int64 1 112 | be_test_class_long_name stringlengths 24 92 | source_dir stringclasses 4
values | prompt_chat stringlengths 1.66k 9.83k | be_test_class_signature stringlengths 17 234 | test_import_context stringlengths 39 2.03k | test_class_function_signature_context stringlengths 169 69.8k | task_id stringlengths 64 64 | testmethods list | be_test_class_field_context stringlengths 0 8.55k | function_signature stringlengths 23 151 | test_class_field_context stringlengths 0 4.05k | project stringclasses 12
values | source stringlengths 3.4k 445k | indent stringclasses 2
values | classmethods list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public class Base64Test | @Test
public void testDecodeWithInnerPad() {
final String content = "SGVsbG8gV29ybGQ=SGVsbG8gV29ybGQ=";
final byte[] result = Base64.decodeBase64(content);
final byte[] shouldBe = StringUtils.getBytesUtf8("Hello World");
assertTrue("decode should halt at pad (=)", Arrays.equals(r... | // public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
// public boolean isUrlSafe();
// @Override
// void encode(final byte[] in, int inPos, final int inAvail, final Context context);
// @Override
// void decode(final byte[] in, int inPos, final int inAvail, ... | src/test/java/org/apache/commons/codec/binary/Base64Test.java | package org.apache.commons.codec.binary;
import java.math.BigInteger;
| public Base64();
public Base64(final boolean urlSafe);
public Base64(final int lineLength);
public Base64(final int lineLength, final byte[] lineSeparator);
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void ... | 156 | testDecodeWithInnerPad | ```java
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void encode(final byte[] in, int inPos, final int inAvail, final Context context);
@Override
void decode(final byte[] in, int inPos, final int inAvail, final Cont... | 150 | // public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
// public boolean isUrlSafe();
// @Override
// void encode(final byte[] in, int inPos, final int inAvail, final Context context);
// @Override
// void decode(final byte[] in, int inPos, final int inAvail, ... | /**
* Test our decode with pad character in the middle. (Our current
* implementation: halt decode and return what we've got so far).
*
* The point of this test is not to say
* "this is the correct way to decode base64." The point is simply to keep
* us aware of the current logic since... | 18 | org.apache.commons.codec.binary.Base64 | src/test/java | ```java
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void encode(final byte[] in, int inPos, final int inAvail, final Context context);
@Override
void decode(final byte[] in, int inPos, final int inAvail, final Cont... | public class Base64 extends BaseNCodec | package org.apache.commons.codec.binary;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.math.BigInteger;
import java.nio.charset.Charset;
i... | public Random getRandom();
@Test
public void testIsStringBase64();
@Test
public void testBase64();
@Test
public void testBase64AtBufferStart();
@Test
public void testBase64AtBufferEnd();
@Test
public void testBase64AtBufferMiddle();
private void testBase64InBuffer(int sta... | 0b0ae06d5d6d2ef79e2adc1c4cd60655cf9a3f9ac634e45f30d1c1c6faff2c22 | [
"org.apache.commons.codec.binary.Base64Test::testDecodeWithInnerPad"
] | private static final int BITS_PER_ENCODED_BYTE = 6;
private static final int BYTES_PER_UNENCODED_BLOCK = 3;
private static final int BYTES_PER_ENCODED_BLOCK = 4;
static final byte[] CHUNK_SEPARATOR = {'\r', '\n'};
private static final byte[] STANDARD_ENCODE_TABLE = {
'A', 'B', 'C', 'D', ... | @Test
public void testDecodeWithInnerPad() | private static final Charset CHARSET_UTF8 = Charsets.UTF_8;
private final Random random = new Random(); | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/binary/Base64.java",
"be_test_class_name": "org.apache.commons.codec.binary.Base64",
"be_test_function_name": "decode",
"be_test_function_signature": "([BIILorg/apache/commons/codec/binary/BaseNCodec$Context;)V",
"line_numbers": [
"431",
... | |
public class QuarterTests extends TestCase | public void testDateConstructor1() {
TimeZone zone = TimeZone.getTimeZone("GMT");
Calendar c = new GregorianCalendar(zone);
Quarter q1 = new Quarter(new Date(1017619199999L), zone,
Locale.getDefault());
Quarter q2 = new Quarter(new Date(1017619200000L), zone,
L... | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Calendar;
// import java.util.Date;
// import java.util.Locale;
// import java.util.TimeZone;
//
//
//
// public class Quarter extends RegularTimePeriod implements Serializable {
// private s... | tests/org/jfree/data/time/junit/QuarterTests.java | package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
| public Quarter();
public Quarter(int quarter, int year);
public Quarter(int quarter, Year year);
public Quarter(Date time);
public Quarter(Date time, TimeZone zone);
public Quarter(Date time, TimeZone zone, Locale locale);
public int getQuarter();
public Year getYear();
public int ge... | 150 | testDateConstructor1 | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class Quarter extends RegularTimePeriod implements Serializable {
private static final long serialVersionU... | 135 | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Calendar;
// import java.util.Date;
// import java.util.Locale;
// import java.util.TimeZone;
//
//
//
// public class Quarter extends RegularTimePeriod implements Serializable {
// private s... | /**
* In GMT, the end of Q1 2002 is java.util.Date(1017619199999L). Use this
* to check the quarter constructor.
*/ | 1 | org.jfree.data.time.Quarter | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class Quarter extends RegularTimePeriod implements Serializable {
private static final long serialVersionU... | public class Quarter extends RegularTimePeriod implements Serializable | package org.jfree.data.time.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalenda... | public static Test suite();
public QuarterTests(String name);
protected void setUp();
public void testEqualsSelf();
public void testEquals();
public void testDateConstructor1();
public void testDateConstructor2();
public void testQ1Y1900Previous();
public void testQ1Y1900Next();
... | 0ba02ff7fd0493e77215bb8e0fc7275134751165c747cc7762e387d2e1b0e719 | [
"org.jfree.data.time.junit.QuarterTests::testDateConstructor1"
] | private static final long serialVersionUID = 3810061714380888671L;
public static final int FIRST_QUARTER = 1;
public static final int LAST_QUARTER = 4;
public static final int[] FIRST_MONTH_IN_QUARTER = {
0, MonthConstants.JANUARY, MonthConstants.APRIL, MonthConstants.JULY,
MonthConstant... | public void testDateConstructor1() | private Quarter q1Y1900;
private Quarter q2Y1900;
private Quarter q3Y9999;
private Quarter q4Y9999; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/time/Quarter.java",
"be_test_class_name": "org.jfree.data.time.Quarter",
"be_test_function_name": "getFirstMillisecond",
"be_test_function_signature": "(Ljava/util/Calendar;)J",
"line_numbers": [
"421",
"422",
"423",
"426"
],
... | |
public class TimePeriodValuesCollectionTests extends TestCase | public void testGetDomainBoundsWithInterval() {
// check empty dataset
TimePeriodValuesCollection dataset = new TimePeriodValuesCollection();
Range r = dataset.getDomainBounds(true);
assertNull(r);
// check dataset with one time period
TimePeriodValues s1 = n... | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Iterator;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.data.DomainInfo;
// import org.jfree.data.Ra... | tests/org/jfree/data/time/junit/TimePeriodValuesCollectionTests.java | package org.jfree.data.time;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.Range;
import org.jfree.data.xy.AbstractIntervalXYDataset;
imp... | public TimePeriodValuesCollection();
public TimePeriodValuesCollection(TimePeriodValues series);
public TimePeriodAnchor getXPosition();
public void setXPosition(TimePeriodAnchor position);
public int getSeriesCount();
public TimePeriodValues getSeries(int series);
public Comparable getSerie... | 252 | testGetDomainBoundsWithInterval | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.Range;
import org.jfree.... | 221 | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Iterator;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.data.DomainInfo;
// import org.jfree.data.Ra... | /**
* Some more checks for the getDomainBounds() method.
*
* @see #testGetDomainBoundsWithoutInterval()
*/ | 1 | org.jfree.data.time.TimePeriodValuesCollection | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.Range;
import org.jfree.... | public class TimePeriodValuesCollection extends AbstractIntervalXYDataset
implements IntervalXYDataset, DomainInfo, Serializable | package org.jfree.data.time.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framewor... | public static Test suite();
public TimePeriodValuesCollectionTests(String name);
protected void setUp();
public void test1161340();
public void testEquals();
public void testSerialization();
public void testGetSeries();
public void testGetDomainBoundsWithoutInterval();
public void te... | 0bcba3f18197f9fb514670eac8301174c25863bf6adafed26dc96ad0936cda1c | [
"org.jfree.data.time.junit.TimePeriodValuesCollectionTests::testGetDomainBoundsWithInterval"
] | private static final long serialVersionUID = -3077934065236454199L;
private List data;
private TimePeriodAnchor xPosition; | public void testGetDomainBoundsWithInterval() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/time/TimePeriodValuesCollection.java",
"be_test_class_name": "org.jfree.data.time.TimePeriodValuesCollection",
"be_test_function_name": "addSeries",
"be_test_function_signature": "(Lorg/jfree/data/time/TimePeriodValues;)V",
"line_numbers": [
"179",
... | |
public class TestJavaType
extends BaseMapTest
| public void testLocalType728() throws Exception
{
TypeFactory tf = TypeFactory.defaultInstance();
Method m = Issue728.class.getMethod("method", CharSequence.class);
assertNotNull(m);
// Start with return type
// first type-erased
JavaType t = tf.constructType(m.g... | // // Abstract Java Tested Class
// package com.fasterxml.jackson.databind;
//
// import java.lang.reflect.Modifier;
// import java.util.List;
// import com.fasterxml.jackson.core.type.ResolvedType;
// import com.fasterxml.jackson.databind.type.TypeBindings;
// import com.fasterxml.jackson.databind.type.TypeFactory;
/... | src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java | package com.fasterxml.jackson.databind;
import java.lang.reflect.Modifier;
import java.util.List;
import com.fasterxml.jackson.core.type.ResolvedType;
import com.fasterxml.jackson.databind.type.TypeBindings;
import com.fasterxml.jackson.databind.type.TypeFactory;
| protected JavaType(Class<?> raw, int additionalHash,
Object valueHandler, Object typeHandler, boolean asStatic);
protected JavaType(JavaType base);
public abstract JavaType withTypeHandler(Object h);
public abstract JavaType withContentTypeHandler(Object h);
public abstract JavaType with... | 66 | testLocalType728 | ```java
// Abstract Java Tested Class
package com.fasterxml.jackson.databind;
import java.lang.reflect.Modifier;
import java.util.List;
import com.fasterxml.jackson.core.type.ResolvedType;
import com.fasterxml.jackson.databind.type.TypeBindings;
import com.fasterxml.jackson.databind.type.TypeFactory;
public abstrac... | 47 | // // Abstract Java Tested Class
// package com.fasterxml.jackson.databind;
//
// import java.lang.reflect.Modifier;
// import java.util.List;
// import com.fasterxml.jackson.core.type.ResolvedType;
// import com.fasterxml.jackson.databind.type.TypeBindings;
// import com.fasterxml.jackson.databind.type.TypeFactory;
/... | /*
/**********************************************************
/* Test methods
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.JavaType | src/test/java | ```java
// Abstract Java Tested Class
package com.fasterxml.jackson.databind;
import java.lang.reflect.Modifier;
import java.util.List;
import com.fasterxml.jackson.core.type.ResolvedType;
import com.fasterxml.jackson.databind.type.TypeBindings;
import com.fasterxml.jackson.databind.type.TypeFactory;
public abstrac... | public abstract class JavaType
extends ResolvedType
implements java.io.Serializable, // 2.1
java.lang.reflect.Type // 2.2
| package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Method;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.JavaType;
| public void testLocalType728() throws Exception;
public void testSimpleClass();
@SuppressWarnings("deprecation")
public void testDeprecated();
public void testArrayType();
public void testMapType();
public void testEnumType();
public void testClassKey();
public void testJavaTypeAsJLR... | 0d676cbccbd37177e90a562c831ea69a6dead74601d4b96dc0ab27c91142eafa | [
"com.fasterxml.jackson.databind.type.TestJavaType::testLocalType728"
] | private static final long serialVersionUID = 1;
protected final Class<?> _class;
protected final int _hash;
protected final Object _valueHandler;
protected final Object _typeHandler;
protected final boolean _asStatic; | public void testLocalType728() throws Exception
| JacksonDatabind | package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Method;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.JavaType;
/**
* Simple tests to verify that {@link JavaType} types work to
*... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/JavaType.java",
"be_test_class_name": "com.fasterxml.jackson.databind.JavaType",
"be_test_function_name": "getRawClass",
"be_test_function_signature": "()Ljava/lang/Class;",
"line_numbers": [
"227"
],
"method_line_rate": 1
}... | ||
public class TestTypeFactory
extends BaseMapTest
| public void testCollections()
{
// Ok, first: let's test what happens when we pass 'raw' Collection:
TypeFactory tf = TypeFactory.defaultInstance();
JavaType t = tf.constructType(ArrayList.class);
assertEquals(CollectionType.class, t.getClass());
assertSame(ArrayList.clas... | // private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType)
// throws IllegalArgumentException;
// private boolean _verifyAndResolvePlaceholders(JavaType exp, JavaType act);
// public JavaType constructGeneralizedType(JavaType baseType, Class<?> superClass);
// public Ja... | src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactory.java | package com.fasterxml.jackson.databind.type;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.lang.reflect.*;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.util.ArrayBuilders;
import com.fas... | private TypeFactory();
protected TypeFactory(LRUMap<Object,JavaType> typeCache);
protected TypeFactory(LRUMap<Object,JavaType> typeCache, TypeParser p,
TypeModifier[] mods, ClassLoader classLoader);
public TypeFactory withModifier(TypeModifier mod);
public TypeFactory withClassLoader(Cla... | 299 | testCollections | ```java
private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType)
throws IllegalArgumentException;
private boolean _verifyAndResolvePlaceholders(JavaType exp, JavaType act);
public JavaType constructGeneralizedType(JavaType baseType, Class<?> superClass);
public JavaType ... | 277 | // private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType)
// throws IllegalArgumentException;
// private boolean _verifyAndResolvePlaceholders(JavaType exp, JavaType act);
// public JavaType constructGeneralizedType(JavaType baseType, Class<?> superClass);
// public Ja... | /*
/**********************************************************
/* Unit tests: collection type parameter resolution
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.type.TypeFactory | src/test/java | ```java
private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType)
throws IllegalArgumentException;
private boolean _verifyAndResolvePlaceholders(JavaType exp, JavaType act);
public JavaType constructGeneralizedType(JavaType baseType, Class<?> superClass);
public JavaType ... | @SuppressWarnings({"rawtypes" })
public final class TypeFactory
implements java.io.Serializable
| package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
| public void testSimpleTypes();
public void testArrays();
public void testProperties();
public void testIterator();
@SuppressWarnings("deprecation")
public void testParametricTypes();
public void testCanonicalNames();
@SuppressWarnings("serial")
public void testCanonicalWithSpaces();
... | 0e619b558937c405b63e04fd631da036fb5cd8d44a8650a8c38261b2582b00c5 | [
"com.fasterxml.jackson.databind.type.TestTypeFactory::testCollections"
] | private static final long serialVersionUID = 1L;
private final static JavaType[] NO_TYPES = new JavaType[0];
protected final static TypeFactory instance = new TypeFactory();
protected final static TypeBindings EMPTY_BINDINGS = TypeBindings.emptyBindings();
private final static Class<?> CLS_STRING = ... | public void testCollections()
| JacksonDatabind | package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
/**
* Simple tests to verify that the {@link TypeFactory} constructs
* ... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/type/TypeFactory.java",
"be_test_class_name": "com.fasterxml.jackson.databind.type.TypeFactory",
"be_test_function_name": "_collectionType",
"be_test_function_signature": "(Ljava/lang/Class;Lcom/fasterxml/jackson/databind/type/TypeBindings;Lcom... | ||
public class ChartPanelTests extends TestCase
implements ChartChangeListener, ChartMouseListener | public void test2502355_zoomInRange() {
DefaultXYDataset dataset = new DefaultXYDataset();
JFreeChart chart = ChartFactory.createXYLineChart("TestChart", "X",
"Y", dataset, false);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setRangeAxis(1, new NumberAxis("X2"));
... | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | tests/org/jfree/chart/junit/ChartPanelTests.java | package org.jfree.chart;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.aw... | public ChartPanel(JFreeChart chart);
public ChartPanel(JFreeChart chart, boolean useBuffer);
public ChartPanel(JFreeChart chart,
boolean properties,
boolean save,
boolean print,
boolean zoom,
boolea... | 266 | test2502355_zoomInRange | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | 255 | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | /**
* Checks that a call to the zoomInRange() method, for a plot with more
* than one range axis, generates just one ChartChangeEvent.
*/ | 1 | org.jfree.chart.ChartPanel | tests | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | public class ChartPanel extends JPanel implements ChartChangeListener,
ChartProgressListener, ActionListener, MouseListener,
MouseMotionListener, OverlayChangeListener, RenderingSource,
Printable, Serializable | package org.jfree.chart.junit;
import java.awt.geom.Rectangle2D;
import java.util.EventListener;
import java.util.List;
import javax.swing.event.CaretListener;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.Cha... | public void chartChanged(ChartChangeEvent event);
public static Test suite();
public ChartPanelTests(String name);
public void testConstructor1();
public void testSetChart();
public void testGetListeners();
public void chartMouseClicked(ChartMouseEvent event);
public void chartMouseMoved... | 11b55f009809888b81eff828ca5211becfbc7b51c16f6aae6bdaa569fae9d1f3 | [
"org.jfree.chart.junit.ChartPanelTests::test2502355_zoomInRange"
] | private static final long serialVersionUID = 6046366297214274674L;
public static final boolean DEFAULT_BUFFER_USED = true;
public static final int DEFAULT_WIDTH = 680;
public static final int DEFAULT_HEIGHT = 420;
public static final int DEFAULT_MINIMUM_DRAW_WIDTH = 300;
public static final int ... | public void test2502355_zoomInRange() | private List chartChangeEvents = new java.util.ArrayList(); | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/ChartPanel.java",
"be_test_class_name": "org.jfree.chart.ChartPanel",
"be_test_function_name": "chartChanged",
"be_test_function_signature": "(Lorg/jfree/chart/event/ChartChangeEvent;)V",
"line_numbers": [
"1746",
"1747",
"1748",
"... | |
public class YIntervalSeriesCollectionTests extends TestCase | public void test1170825() {
YIntervalSeries s1 = new YIntervalSeries("Series1");
YIntervalSeriesCollection dataset = new YIntervalSeriesCollection();
dataset.addSeries(s1);
try {
/* XYSeries s = */ dataset.getSeries(1);
}
catch (IllegalArgumentException e)... | // // Abstract Java Tested Class
// package org.jfree.data.xy;
//
// import java.io.Serializable;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.PublicCloneable;
// import org.jfree.data.event.DatasetChangeEven... | tests/org/jfree/data/xy/junit/YIntervalSeriesCollectionTests.java | package org.jfree.data.xy;
import java.io.Serializable;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.event.DatasetChangeEvent;
| public YIntervalSeriesCollection();
public void addSeries(YIntervalSeries series);
public int getSeriesCount();
public YIntervalSeries getSeries(int series);
public Comparable getSeriesKey(int series);
public int getItemCount(int series);
public Number getX(int series, int item);
public ... | 212 | test1170825 | ```java
// Abstract Java Tested Class
package org.jfree.data.xy;
import java.io.Serializable;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.event.DatasetChangeEvent;
public class ... | 199 | // // Abstract Java Tested Class
// package org.jfree.data.xy;
//
// import java.io.Serializable;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.PublicCloneable;
// import org.jfree.data.event.DatasetChangeEven... | /**
* A test for bug report 1170825 (originally affected XYSeriesCollection,
* this test is just copied over).
*/ | 1 | org.jfree.data.xy.YIntervalSeriesCollection | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.xy;
import java.io.Serializable;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.event.DatasetChangeEvent;
public class ... | public class YIntervalSeriesCollection extends AbstractIntervalXYDataset
implements IntervalXYDataset, PublicCloneable, Serializable | package org.jfree.data.xy.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.... | public static Test suite();
public YIntervalSeriesCollectionTests(String name);
public void testEquals();
public void testCloning();
public void testPublicCloneable();
public void testSerialization();
public void testRemoveSeries();
public void test1170825(); | 11f55f2a23b466fce112f6edd9f5e153e0c77a813e297e5bc5a1566da3f6f57e | [
"org.jfree.data.xy.junit.YIntervalSeriesCollectionTests::test1170825"
] | private List data; | public void test1170825() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/xy/YIntervalSeriesCollection.java",
"be_test_class_name": "org.jfree.data.xy.YIntervalSeriesCollection",
"be_test_function_name": "addSeries",
"be_test_function_signature": "(Lorg/jfree/data/xy/YIntervalSeries;)V",
"line_numbers": [
"84",
"85",... | ||
public class ChartPanelTests extends TestCase
implements ChartChangeListener, ChartMouseListener | public void test2502355_restoreAutoDomainBounds() {
DefaultXYDataset dataset = new DefaultXYDataset();
JFreeChart chart = ChartFactory.createXYLineChart("TestChart", "X",
"Y", dataset, false);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setDomainAxis(1, new NumberAxi... | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | tests/org/jfree/chart/junit/ChartPanelTests.java | package org.jfree.chart;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.aw... | public ChartPanel(JFreeChart chart);
public ChartPanel(JFreeChart chart, boolean useBuffer);
public ChartPanel(JFreeChart chart,
boolean properties,
boolean save,
boolean print,
boolean zoom,
boolea... | 317 | test2502355_restoreAutoDomainBounds | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | 306 | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | /**
* Checks that a call to the restoreAutoDomainBounds() method, for a plot
* with more than one range axis, generates just one ChartChangeEvent.
*/ | 1 | org.jfree.chart.ChartPanel | tests | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | public class ChartPanel extends JPanel implements ChartChangeListener,
ChartProgressListener, ActionListener, MouseListener,
MouseMotionListener, OverlayChangeListener, RenderingSource,
Printable, Serializable | package org.jfree.chart.junit;
import java.awt.geom.Rectangle2D;
import java.util.EventListener;
import java.util.List;
import javax.swing.event.CaretListener;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.Cha... | public void chartChanged(ChartChangeEvent event);
public static Test suite();
public ChartPanelTests(String name);
public void testConstructor1();
public void testSetChart();
public void testGetListeners();
public void chartMouseClicked(ChartMouseEvent event);
public void chartMouseMoved... | 120d4c313dabe9b92188839845983799ef35cdb6332a5452875330a3a399de04 | [
"org.jfree.chart.junit.ChartPanelTests::test2502355_restoreAutoDomainBounds"
] | private static final long serialVersionUID = 6046366297214274674L;
public static final boolean DEFAULT_BUFFER_USED = true;
public static final int DEFAULT_WIDTH = 680;
public static final int DEFAULT_HEIGHT = 420;
public static final int DEFAULT_MINIMUM_DRAW_WIDTH = 300;
public static final int ... | public void test2502355_restoreAutoDomainBounds() | private List chartChangeEvents = new java.util.ArrayList(); | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/ChartPanel.java",
"be_test_class_name": "org.jfree.chart.ChartPanel",
"be_test_function_name": "chartChanged",
"be_test_function_signature": "(Lorg/jfree/chart/event/ChartChangeEvent;)V",
"line_numbers": [
"1746",
"1747",
"1748",
"... | |
public class FixedOrderComparatorTest extends AbstractComparatorTest<String> | @Test
public void testConstructorPlusAdd() {
final FixedOrderComparator<String> comparator = new FixedOrderComparator<String>();
for (final String topCitie : topCities) {
comparator.add(topCitie);
}
final String[] keys = topCities.clone();
assertComparatorYiel... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.comparators;
//
// import java.io.Serializable;
// import java.util.Comparator;
// import java.util.HashMap;
// import java.util.List;
// import java.util.Map;
//
//
//
// public class FixedOrderComparator<T> implements Comparator<T>, Seria... | src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java | package org.apache.commons.collections4.comparators;
import java.io.Serializable;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
| public FixedOrderComparator();
public FixedOrderComparator(final T... items);
public FixedOrderComparator(final List<T> items);
public boolean isLocked();
protected void checkLocked();
public UnknownObjectBehavior getUnknownObjectBehavior();
public void setUnknownObjectBehavior(final Unknown... | 96 | testConstructorPlusAdd | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.comparators;
import java.io.Serializable;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
private stati... | 88 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.comparators;
//
// import java.io.Serializable;
// import java.util.Comparator;
// import java.util.HashMap;
// import java.util.List;
// import java.util.Map;
//
//
//
// public class FixedOrderComparator<T> implements Comparator<T>, Seria... | /**
* Tests that the constructor plus add method compares items properly.
*/
//
// The tests
//
// }
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/FixedOrderComparator.version4.obj");
// public void testCreate() throws Exception { | 28 | org.apache.commons.collections4.comparators.FixedOrderComparator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.comparators;
import java.io.Serializable;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
private stati... | public class FixedOrderComparator<T> implements Comparator<T>, Serializable | package org.apache.commons.collections4.comparators;
import java.util.Arrays;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import org.junit.Test;
| public FixedOrderComparatorTest(final String name);
@Override
public Comparator<String> makeObject();
@Override
public List<String> getComparableObjectsOrdered();
@Override
public String getCompatibilityVersion();
@Test
public void testConstructorPlusAdd();
@Test
public void ... | 125461b8ca4f4385e5689b7f74c4b9eca78c4101611bd7e99a12547ead401f84 | [
"org.apache.commons.collections4.comparators.FixedOrderComparatorTest::testConstructorPlusAdd"
] | private static final long serialVersionUID = 82794675842863201L;
private final Map<T, Integer> map = new HashMap<T, Integer>();
private int counter = 0;
private boolean isLocked = false;
private UnknownObjectBehavior unknownObjectBehavior = UnknownObjectBehavior.EXCEPTION; | @Test
public void testConstructorPlusAdd() | private static final String topCities[] = new String[] {
"Tokyo",
"Mexico City",
"Mumbai",
"Sao Paulo",
"New York",
"Shanghai",
"Lagos",
"Los Angeles",
"Calcutta",
"Buenos Aires"
}; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/collections4/comparators/FixedOrderComparator.java",
"be_test_class_name": "org.apache.commons.collections4.comparators.FixedOrderComparator",
"be_test_function_name": "add",
"be_test_function_signature": "(Ljava/lang/Object;)Z",
"line_numbers": [
... | |
public class SegmentedTimelineTests extends TestCase | public void testFifteenMinSegmentedTimeline() {
assertEquals(SegmentedTimeline.FIFTEEN_MINUTE_SEGMENT_SIZE,
this.fifteenMinTimeline.getSegmentSize());
assertEquals(SegmentedTimeline.FIRST_MONDAY_AFTER_1900 + 36
* this.fifteenMinTimeline.getSegmentSize(),
... | // "2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
// "2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
// "2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
// "2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-0... | tests/org/jfree/chart/axis/junit/SegmentedTimelineTests.java | package org.jfree.chart.axis;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.SimpleTimeZone;
import j... | public SegmentedTimeline(long segmentSize,
int segmentsIncluded,
int segmentsExcluded);
public static long firstMondayAfter1900();
public static SegmentedTimeline newMondayThroughFridayTimeline();
public static SegmentedTimeline newFifteenMinuteT... | 348 | testFifteenMinSegmentedTimeline | ```java
"2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
"2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
"2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
"2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-04",
... | 340 | // "2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
// "2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
// "2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
// "2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-0... | /**
* Tests that the factory method that creates a 15-min 9:00 AM 4:00 PM
* segmented axis does so correctly.
*/ | 1 | org.jfree.chart.axis.SegmentedTimeline | tests | ```java
"2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
"2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
"2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
"2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-04",
... | public class SegmentedTimeline implements Timeline, Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.Format;
import java.text.NumberFormat;
import java.text.ParseExce... | public static Test suite();
public SegmentedTimelineTests(String name);
protected void setUp() throws Exception;
protected void tearDown() throws Exception;
public void testMsSegmentedTimeline();
public void testMs2SegmentedTimeline();
public void testMondayThroughFridaySegmentedTimeline();
... | 14576b2f5539d56a91243e003b1fcd7a08b0e68b102633cc35665aaf8189ae49 | [
"org.jfree.chart.axis.junit.SegmentedTimelineTests::testFifteenMinSegmentedTimeline"
] | private static final long serialVersionUID = 1093779862539903110L;
public static final long DAY_SEGMENT_SIZE = 24 * 60 * 60 * 1000;
public static final long HOUR_SEGMENT_SIZE = 60 * 60 * 1000;
public static final long FIFTEEN_MINUTE_SEGMENT_SIZE = 15 * 60 * 1000;
public static final long MINUTE_SEGM... | public void testFifteenMinSegmentedTimeline() | private static final int TEST_CYCLE_START = 0;
private static final int TEST_CYCLE_END = 1000;
private static final int TEST_CYCLE_INC = 55;
private static final long FIVE_YEARS = 5 * 365
* SegmentedTimeline.DAY_SEGMENT_SIZE;
private static final NumberFormat NUMBER_FORMAT
... | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/SegmentedTimeline.java",
"be_test_class_name": "org.jfree.chart.axis.SegmentedTimeline",
"be_test_function_name": "firstMondayAfter1900",
"be_test_function_signature": "()J",
"line_numbers": [
"354",
"355",
"359",
"360",
... | |
public class ToStringBuilderTest | @Test
public void testReflectionArrayAndObjectCycle() throws Exception {
final Object[] objects = new Object[1];
final SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture(objects);
objects[0] = simple;
assertEquals(
this.toBaseString(objects)
... | // public ToStringBuilder appendSuper(final String superToString);
// public ToStringBuilder appendToString(final String toString);
// public Object getObject();
// public StringBuffer getStringBuffer();
// public ToStringStyle getStyle();
// @Override
// public String toString();
// @Ov... | src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java | package org.apache.commons.lang3.builder;
import org.apache.commons.lang3.ObjectUtils;
| public static ToStringStyle getDefaultStyle();
public static void setDefaultStyle(final ToStringStyle style);
public static String reflectionToString(final Object object);
public static String reflectionToString(final Object object, final ToStringStyle style);
public static String reflectionToString... | 604 | testReflectionArrayAndObjectCycle | ```java
public ToStringBuilder appendSuper(final String superToString);
public ToStringBuilder appendToString(final String toString);
public Object getObject();
public StringBuffer getStringBuffer();
public ToStringStyle getStyle();
@Override
public String toString();
@Override
publi... | 584 | // public ToStringBuilder appendSuper(final String superToString);
// public ToStringBuilder appendToString(final String toString);
// public Object getObject();
// public StringBuffer getStringBuffer();
// public ToStringStyle getStyle();
// @Override
// public String toString();
// @Ov... | /**
* Test a nasty combination of arrays and Objects pointing to each other.
* objects[0] -> SimpleReflectionTestFixture[ o -> objects ]
*
* @throws Exception
*/ | 1 | org.apache.commons.lang3.builder.ToStringBuilder | src/test/java | ```java
public ToStringBuilder appendSuper(final String superToString);
public ToStringBuilder appendToString(final String toString);
public Object getObject();
public StringBuffer getStringBuffer();
public ToStringStyle getStyle();
@Override
public String toString();
@Override
publi... | public class ToStringBuilder implements Builder<String> | package org.apache.commons.lang3.builder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.SystemUtils;
im... | @After
public void after();
@Test
public void testConstructorEx1();
@Test
public void testConstructorEx2();
@Test
public void testConstructorEx3();
@Test
public void testGetSetDefault();
@Test(expected=IllegalArgumentException.class)
public void testSetDefaultEx();
@T... | 1487d3b5aad2c5f87b433a24464ffcd2e1a84b7382296593cd691a5ae77c3a41 | [
"org.apache.commons.lang3.builder.ToStringBuilderTest::testReflectionArrayAndObjectCycle"
] | private static volatile ToStringStyle defaultStyle = ToStringStyle.DEFAULT_STYLE;
private final StringBuffer buffer;
private final Object object;
private final ToStringStyle style; | @Test
public void testReflectionArrayAndObjectCycle() throws Exception | private final Integer base = Integer.valueOf(5);
private final String baseStr = base.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(base)); | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/builder/ToStringBuilder.java",
"be_test_class_name": "org.apache.commons.lang3.builder.ToStringBuilder",
"be_test_function_name": "append",
"be_test_function_signature": "(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/commons/lang3/builder/ToStrin... | |
public class ErfTest | @Test
public void testTwoArgumentErf() {
double[] xi = new double[]{-2.0, -1.0, -0.9, -0.1, 0.0, 0.1, 0.9, 1.0, 2.0};
for(double x1 : xi) {
for(double x2 : xi) {
double a = Erf.erf(x1, x2);
double b = Erf.erf(x2) - Erf.erf(x1);
double c... | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | src/test/java/org/apache/commons/math3/special/ErfTest.java | package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
| private Erf();
public static double erf(double x);
public static double erfc(double x);
public static double erf(double x1, double x2);
public static double erfInv(final double x);
public static double erfcInv(final double x); | 214 | testTwoArgumentErf | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | 202 | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | /**
* Test the implementation of Erf.erf(double, double) for consistency with results
* obtained from Erf.erf(double) and Erf.erfc(double).
*/ | 1 | org.apache.commons.math3.special.Erf | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | public class Erf | package org.apache.commons.math3.special;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testErf0();
@Test
public void testErf1960();
@Test
public void testErf2576();
@Test
public void testErf2807();
@Test
public void testErf3291();
@Test
public void testLargeValues();
@Test
public void testErfGnu();
@Test
public void testErf... | 14f3799e2a95d80d2a4d0f74df01159641f615ff0cf80022d7513ef5290f542e | [
"org.apache.commons.math3.special.ErfTest::testTwoArgumentErf"
] | private static final double X_CRIT = 0.4769362762044697; | @Test
public void testTwoArgumentErf() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you ... | [
{
"be_test_class_file": "org/apache/commons/math3/special/Erf.java",
"be_test_class_name": "org.apache.commons.math3.special.Erf",
"be_test_function_name": "erf",
"be_test_function_signature": "(D)D",
"line_numbers": [
"67",
"68",
"70",
"71"
],
"method_line_rate":... | ||
public class BinaryCodecTest | @Test
public void testDecodeObjectException() {
try {
this.instance.decode(new Object());
} catch (final DecoderException e) {
// all is well.
return;
}
fail("Expected DecoderException");
} | // // Abstract Java Tested Class
// package org.apache.commons.codec.binary;
//
// import org.apache.commons.codec.BinaryDecoder;
// import org.apache.commons.codec.BinaryEncoder;
// import org.apache.commons.codec.DecoderException;
// import org.apache.commons.codec.EncoderException;
//
//
//
// public class Binar... | src/test/java/org/apache/commons/codec/binary/BinaryCodecTest.java | package org.apache.commons.codec.binary;
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.EncoderException;
| @Override
public byte[] encode(final byte[] raw);
@Override
public Object encode(final Object raw) throws EncoderException;
@Override
public Object decode(final Object ascii) throws DecoderException;
@Override
public byte[] decode(final byte[] ascii);
public byte[] toByteArray(final ... | 94 | testDecodeObjectException | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.binary;
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.EncoderException;
public class BinaryCodec implements BinaryD... | 85 | // // Abstract Java Tested Class
// package org.apache.commons.codec.binary;
//
// import org.apache.commons.codec.BinaryDecoder;
// import org.apache.commons.codec.BinaryEncoder;
// import org.apache.commons.codec.DecoderException;
// import org.apache.commons.codec.EncoderException;
//
//
//
// public class Binar... | /**
* Tests for Object decode(Object)
*/
// ------------------------------------------------------------------------
//
// Test decode(Object)
//
// ------------------------------------------------------------------------ | 18 | org.apache.commons.codec.binary.BinaryCodec | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.binary;
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.EncoderException;
public class BinaryCodec implements BinaryD... | public class BinaryCodec implements BinaryDecoder, BinaryEncoder | package org.apache.commons.codec.binary;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.nio.charset.Charset;
import org.apache.commons.codec.Charsets;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.EncoderException;
import org.junit.Afte... | @Before
public void setUp() throws Exception;
@After
public void tearDown() throws Exception;
@Test
public void testDecodeObjectException();
@Test
public void testDecodeObject() throws Exception;
void assertDecodeObject(final byte[] bits, final String encodeMe) throws DecoderExceptio... | 15bc9189bd259ea7f3210c38187cd56a761daf8889c0262f05da18f313a964fd | [
"org.apache.commons.codec.binary.BinaryCodecTest::testDecodeObjectException"
] | private static final char[] EMPTY_CHAR_ARRAY = new char[0];
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
private static final int BIT_0 = 1;
private static final int BIT_1 = 0x02;
private static final int BIT_2 = 0x04;
private static final int BIT_3 = 0x08;
private static fina... | @Test
public void testDecodeObjectException() | private static final Charset CHARSET_UTF8 = Charsets.UTF_8;
private static final int BIT_0 = 0x01;
private static final int BIT_1 = 0x02;
private static final int BIT_2 = 0x04;
private static final int BIT_3 = 0x08;
private static final int BIT_4 = 0x10;
private static final int BIT_5 = 0x20... | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/binary/BinaryCodec.java",
"be_test_class_name": "org.apache.commons.codec.binary.BinaryCodec",
"be_test_function_name": "decode",
"be_test_function_signature": "(Ljava/lang/Object;)Ljava/lang/Object;",
"line_numbers": [
"116",
"117",
... | |
@SuppressWarnings("serial")
public class TestJacksonAnnotationIntrospector
extends BaseMapTest
| public void testSerializeDeserializeWithJaxbAnnotations() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
mapper.enable(SerializationFeature.INDENT_OUTPUT);
JacksonExample ex = new JacksonExample();
QName qname = new QName("urn:hi", "hello");
ex.setQname(qnam... | // public void findAndAddVirtualProperties(MapperConfig<?> config, AnnotatedClass ac,
// List<BeanPropertyWriter> properties);
// protected BeanPropertyWriter _constructVirtualProperty(JsonAppend.Attr attr,
// MapperConfig<?> config, AnnotatedClass ac, JavaType type);
// protected Be... | src/test/java/com/fasterxml/jackson/databind/introspect/TestJacksonAnnotationIntrospector.java | package com.fasterxml.jackson.databind.introspect;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.... | public JacksonAnnotationIntrospector();
@Override
public Version version();
protected Object readResolve();
public JacksonAnnotationIntrospector setConstructorPropertiesImpliesCreator(boolean b);
@Override
public boolean isAnnotationBundle(Annotation ann);
@Override
@Deprecated // si... | 181 | testSerializeDeserializeWithJaxbAnnotations | ```java
public void findAndAddVirtualProperties(MapperConfig<?> config, AnnotatedClass ac,
List<BeanPropertyWriter> properties);
protected BeanPropertyWriter _constructVirtualProperty(JsonAppend.Attr attr,
MapperConfig<?> config, AnnotatedClass ac, JavaType type);
protected BeanPrope... | 157 | // public void findAndAddVirtualProperties(MapperConfig<?> config, AnnotatedClass ac,
// List<BeanPropertyWriter> properties);
// protected BeanPropertyWriter _constructVirtualProperty(JsonAppend.Attr attr,
// MapperConfig<?> config, AnnotatedClass ac, JavaType type);
// protected Be... | /**
* tests getting serializer/deserializer instances.
*/
/*
/**********************************************************
/* Unit tests
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector | src/test/java | ```java
public void findAndAddVirtualProperties(MapperConfig<?> config, AnnotatedClass ac,
List<BeanPropertyWriter> properties);
protected BeanPropertyWriter _constructVirtualProperty(JsonAppend.Attr attr,
MapperConfig<?> config, AnnotatedClass ac, JavaType type);
protected BeanPrope... | public class JacksonAnnotationIntrospector
extends AnnotationIntrospector
implements java.io.Serializable
| package com.fasterxml.jackson.databind.introspect;
import java.io.IOException;
import java.io.StringWriter;
import java.util.*;
import javax.xml.namespace.QName;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxm... | public void testSerializeDeserializeWithJaxbAnnotations() throws Exception;
public void testJsonTypeResolver() throws Exception;
public void testEnumHandling() throws Exception;
@JsonSerialize(using=QNameSerializer.class)
public QName getQname();
@JsonDeserialize(using=QNameDeserializer.clas... | 17f40e9ddf88afc944a8b22771a4fd730762b2c8752c40f079b4a90848fb8bdc | [
"com.fasterxml.jackson.databind.introspect.TestJacksonAnnotationIntrospector::testSerializeDeserializeWithJaxbAnnotations"
] | private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
private final static Class<? extends Annotation>[] ANNOTATIONS_TO_INFER_SER = (Class<? extends Annotation>[])
new Class<?>[] {
JsonSerialize.class,
JsonView.class,
JsonFormat.class,
Js... | public void testSerializeDeserializeWithJaxbAnnotations() throws Exception
| JacksonDatabind | package com.fasterxml.jackson.databind.introspect;
import java.io.IOException;
import java.io.StringWriter;
import java.util.*;
import javax.xml.namespace.QName;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.faster... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector.java",
"be_test_class_name": "com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector",
"be_test_function_name": "_classIfExplicit",
"be_test_function_signature": "(Ljava/lang/Class;)Ljav... | ||
public class ObjectMapperTest extends BaseMapTest
| public void testProps()
{
ObjectMapper m = new ObjectMapper();
// should have default factory
assertNotNull(m.getNodeFactory());
JsonNodeFactory nf = new JsonNodeFactory(true);
m.setNodeFactory(nf);
assertNull(m.getInjectableValues());
assertSame(nf, m.get... | // throws IOException;
// protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException;
// protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt,
// DeserializationConfig config,
// JavaType rootType, JsonDeserializer<Object> deser)
// ... | src/test/java/com/fasterxml/jackson/databind/ObjectMapperTest.java | package com.fasterxml.jackson.databind;
import java.io.*;
import java.lang.reflect.Type;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.DateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.... | public ObjectMapper();
public ObjectMapper(JsonFactory jf);
protected ObjectMapper(ObjectMapper src);
public ObjectMapper(JsonFactory jf,
DefaultSerializerProvider sp, DefaultDeserializationContext dc);
protected ClassIntrospector defaultClassIntrospector();
public ObjectMapper copy(... | 214 | testProps | ```java
throws IOException;
protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException;
protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt,
DeserializationConfig config,
JavaType rootType, JsonDeserializer<Object> deser)
throws I... | 205 | // throws IOException;
// protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException;
// protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt,
// DeserializationConfig config,
// JavaType rootType, JsonDeserializer<Object> deser)
// ... | /*
/**********************************************************
/* Test methods, other
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.ObjectMapper | src/test/java | ```java
throws IOException;
protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException;
protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt,
DeserializationConfig config,
JavaType rootType, JsonDeserializer<Object> deser)
throws I... | public class ObjectMapper
extends ObjectCodec
implements Versioned,
java.io.Serializable // as of 2.1
| package com.fasterxml.jackson.databind;
import java.io.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.j... | public void testFactorFeatures();
public void testGeneratorFeatures();
public void testParserFeatures();
public void testCopy() throws Exception;
public void testCopyOfConfigOverrides() throws Exception;
public void testFailedCopy() throws Exception;
public void testAnnotationIntrospectorCop... | 1966ffe18b03fc647d571dbfb1adc1a18385a5d567bf4f449e107993d8879e08 | [
"com.fasterxml.jackson.databind.ObjectMapperTest::testProps"
] | private static final long serialVersionUID = 2L;
private final static JavaType JSON_NODE_TYPE =
SimpleType.constructUnsafe(JsonNode.class);
protected final static AnnotationIntrospector DEFAULT_ANNOTATION_INTROSPECTOR = new JacksonAnnotationIntrospector();
protected final static BaseSettings... | public void testProps()
| final ObjectMapper MAPPER = new ObjectMapper(); | JacksonDatabind | package com.fasterxml.jackson.databind;
import java.io.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/ObjectMapper.java",
"be_test_class_name": "com.fasterxml.jackson.databind.ObjectMapper",
"be_test_function_name": "defaultClassIntrospector",
"be_test_function_signature": "()Lcom/fasterxml/jackson/databind/introspect/ClassIntrospector;",
"... | |
public class StringEscapeUtilsTest | @Test
public void testEscapeHtmlHighUnicode() throws java.io.UnsupportedEncodingException {
// this is the utf8 representation of the character:
// COUNTING ROD UNIT DIGIT THREE
// in Unicode
// codepoint: U+1D362
final byte[] data = new byte[] { (byte)0xF0, (byte)0x9D, (... | // public static final CharSequenceTranslator UNESCAPE_HTML3 =
// new AggregateTranslator(
// new LookupTranslator(EntityArrays.BASIC_UNESCAPE()),
// new LookupTranslator(EntityArrays.ISO8859_1_UNESCAPE()),
// new NumericEntityUnescaper()
// );
// public stat... | src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java | package org.apache.commons.lang3;
import java.io.IOException;
import java.io.Writer;
import org.apache.commons.lang3.text.translate.AggregateTranslator;
import org.apache.commons.lang3.text.translate.CharSequenceTranslator;
import org.apache.commons.lang3.text.translate.EntityArrays;
import org.apache.commons.lang3.te... | public StringEscapeUtils();
public static final String escapeJava(final String input);
public static final String escapeEcmaScript(final String input);
public static final String escapeJson(final String input);
public static final String unescapeJava(final String input);
public static final Stri... | 488 | testEscapeHtmlHighUnicode | ```java
public static final CharSequenceTranslator UNESCAPE_HTML3 =
new AggregateTranslator(
new LookupTranslator(EntityArrays.BASIC_UNESCAPE()),
new LookupTranslator(EntityArrays.ISO8859_1_UNESCAPE()),
new NumericEntityUnescaper()
);
public static final Char... | 469 | // public static final CharSequenceTranslator UNESCAPE_HTML3 =
// new AggregateTranslator(
// new LookupTranslator(EntityArrays.BASIC_UNESCAPE()),
// new LookupTranslator(EntityArrays.ISO8859_1_UNESCAPE()),
// new NumericEntityUnescaper()
// );
// public stat... | /**
* Tests // https://issues.apache.org/jira/browse/LANG-480
*
* @throws java.io.UnsupportedEncodingException
*/ | 1 | org.apache.commons.lang3.StringEscapeUtils | src/test/java | ```java
public static final CharSequenceTranslator UNESCAPE_HTML3 =
new AggregateTranslator(
new LookupTranslator(EntityArrays.BASIC_UNESCAPE()),
new LookupTranslator(EntityArrays.ISO8859_1_UNESCAPE()),
new NumericEntityUnescaper()
);
public static final Char... | public class StringEscapeUtils | package org.apache.commons.lang3;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.FileInputStream;
import java.io.IOException;
import jav... | @Test
public void testConstructor();
@Test
public void testEscapeJava() throws IOException;
@Test
public void testEscapeJavaWithSlash();
private void assertEscapeJava(final String escaped, final String original) throws IOException;
private void assertEscapeJava(String message, final Stri... | 19d86d33e834bfe9cd6be4a4cfc09c55dedd0105e4618f30bc05e773c3d2f69f | [
"org.apache.commons.lang3.StringEscapeUtilsTest::testEscapeHtmlHighUnicode"
] | public static final CharSequenceTranslator ESCAPE_JAVA =
new LookupTranslator(
new String[][] {
{"\"", "\\\""},
{"\\", "\\\\"},
}).with(
new LookupTranslator(EntityArrays.JAVA_CTRL_CHARS_ESCAPE())
).with(
JavaUnicodeEsca... | @Test
public void testEscapeHtmlHighUnicode() throws java.io.UnsupportedEncodingException | private final static String FOO = "foo";
private static final String[][] HTML_ESCAPES = {
{"no escaping", "plain text", "plain text"},
{"no escaping", "plain text", "plain text"},
{"empty string", "", ""},
{"null", null, null},
{"ampersand", "bread & butter", "bread &... | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/StringEscapeUtils.java",
"be_test_class_name": "org.apache.commons.lang3.StringEscapeUtils",
"be_test_function_name": "escapeHtml4",
"be_test_function_signature": "(Ljava/lang/String;)Ljava/lang/String;",
"line_numbers": [
"511"
],
... | |
public class DatasetUtilitiesTests extends TestCase | public void testCreateCategoryDataset2() {
boolean pass = false;
String[] rowKeys = {"R1", "R2", "R3"};
String[] columnKeys = {"C1", "C2"};
double[][] data = new double[2][];
data[0] = new double[] {1.1, 1.2, 1.3};
data[1] = new double[] {2.1, 2.2, 2.3};
Categ... | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | tests/org/jfree/data/general/junit/DatasetUtilitiesTests.java | package org.jfree.data.general;
import org.jfree.data.pie.PieDataset;
import org.jfree.data.pie.DefaultPieDataset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.util.ArrayUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.KeyToGroupMap;
import org.... | private DatasetUtilities();
public static double calculatePieDatasetTotal(PieDataset dataset);
public static PieDataset createPieDatasetForRow(CategoryDataset dataset,
Comparable rowKey);
public static PieDataset createPieDatasetForRow(CategoryDataset ... | 656 | testCreateCategoryDataset2 | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | 639 | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | /**
* Test the creation of a dataset from an array. This time is should fail
* because the array dimensions are around the wrong way.
*/ | 1 | org.jfree.data.general.DatasetUtilities | tests | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | public final class DatasetUtilities | package org.jfree.data.general.junit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.data.KeyToGroupMap;
import org.jfree.data.Range;
import org.jfree.dat... | public static Test suite();
public DatasetUtilitiesTests(String name);
public void testJava();
public void testCalculatePieDatasetTotal();
public void testFindDomainBounds();
public void testFindDomainBounds2();
public void testFindDomainBounds3();
public void testFindDomainBounds_NaN();... | 1be764d63e8890e41a257a35eb429bce26ef4a7756de4b96eb4895b9f2f1f35b | [
"org.jfree.data.general.junit.DatasetUtilitiesTests::testCreateCategoryDataset2"
] | public void testCreateCategoryDataset2() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/general/DatasetUtilities.java",
"be_test_class_name": "org.jfree.data.general.DatasetUtilities",
"be_test_function_name": "createCategoryDataset",
"be_test_function_signature": "([Ljava/lang/Comparable;[Ljava/lang/Comparable;[[D)Lorg/jfree/data/category/Catego... | ||
public class ErfTest | @Test
public void testErfcGnu() {
final double tol = 1E-15;
final double[] gnuValues = new double[] { 2, 2, 2, 2, 2,
2, 2, 2, 1.9999999999999999785,
1.9999999999999926422, 1.9999999999984625402, 1.9999999998033839558, 1.9999999845827420998,
1.9999992569016276586,... | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | src/test/java/org/apache/commons/math3/special/ErfTest.java | package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
| private Erf();
public static double erf(double x);
public static double erfc(double x);
public static double erf(double x1, double x2);
public static double erfInv(final double x);
public static double erfcInv(final double x); | 164 | testErfcGnu | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | 146 | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | /**
* Compare Erf.erfc against reference values computed using GCC 4.2.1 (Apple OSX packaged version)
* erfcl (extended precision erfc).
*/ | 1 | org.apache.commons.math3.special.Erf | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | public class Erf | package org.apache.commons.math3.special;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testErf0();
@Test
public void testErf1960();
@Test
public void testErf2576();
@Test
public void testErf2807();
@Test
public void testErf3291();
@Test
public void testLargeValues();
@Test
public void testErfGnu();
@Test
public void testErf... | 1ce03a6dccbc35426ff9c5d6d50393795d0d1c53f1831a8c7f4867e1c8cc1676 | [
"org.apache.commons.math3.special.ErfTest::testErfcGnu"
] | private static final double X_CRIT = 0.4769362762044697; | @Test
public void testErfcGnu() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you ... | [
{
"be_test_class_file": "org/apache/commons/math3/special/Erf.java",
"be_test_class_name": "org.apache.commons.math3.special.Erf",
"be_test_function_name": "erfc",
"be_test_function_signature": "(D)D",
"line_numbers": [
"98",
"99",
"101",
"102"
],
"method_line_rat... | ||
public class ErfTest | @Test
public void testErfcMaple() {
double[][] ref = new double[][]
{{0.1, 4.60172162722971e-01},
{1.2, 1.15069670221708e-01},
{2.3, 1.07241100216758e-02},
{3.4, 3.36929265676881e-04},
... | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | src/test/java/org/apache/commons/math3/special/ErfTest.java | package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
| private Erf();
public static double erf(double x);
public static double erfc(double x);
public static double erf(double x1, double x2);
public static double erfInv(final double x);
public static double erfcInv(final double x); | 196 | testErfcMaple | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | 171 | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | /**
* Tests erfc against reference data computed using Maple reported in Marsaglia, G,,
* "Evaluating the Normal Distribution," Journal of Statistical Software, July, 2004.
* http//www.jstatsoft.org/v11/a05/paper
*/ | 1 | org.apache.commons.math3.special.Erf | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | public class Erf | package org.apache.commons.math3.special;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testErf0();
@Test
public void testErf1960();
@Test
public void testErf2576();
@Test
public void testErf2807();
@Test
public void testErf3291();
@Test
public void testLargeValues();
@Test
public void testErfGnu();
@Test
public void testErf... | 1d5422bec6d9d04b2264f34d1a8e9c728e957b1a1dddb8107e74fc70ac540ec1 | [
"org.apache.commons.math3.special.ErfTest::testErfcMaple"
] | private static final double X_CRIT = 0.4769362762044697; | @Test
public void testErfcMaple() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you ... | [
{
"be_test_class_file": "org/apache/commons/math3/special/Erf.java",
"be_test_class_name": "org.apache.commons.math3.special.Erf",
"be_test_function_name": "erfc",
"be_test_function_signature": "(D)D",
"line_numbers": [
"98",
"99",
"101",
"102"
],
"method_line_rat... | ||
public class DateAxisTests extends TestCase | public void testPreviousStandardDateDayB() {
MyDateAxis axis = new MyDateAxis("Day");
Day apr12007 = new Day(1, 4, 2007);
Day apr22007 = new Day(2, 4, 2007);
// five dates to check...
Date d0 = new Date(apr12007.getFirstMillisecond());
Date d1 = new Date(apr12007.get... | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | tests/org/jfree/chart/axis/junit/DateAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import ja... | public DateAxis();
public DateAxis(String label);
public DateAxis(String label, TimeZone zone);
public DateAxis(String label, TimeZone zone, Locale locale);
public TimeZone getTimeZone();
public void setTimeZone(TimeZone zone);
public Timeline getTimeline();
public void setTimeline(Timel... | 767 | testPreviousStandardDateDayB | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | 700 | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | /**
* A basic check for the testPreviousStandardDate() method when the
* tick unit is 7 days (just for the sake of having a multiple).
*/ | 1 | org.jfree.chart.axis.DateAxis | tests | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | public class DateAxis extends ValueAxis implements Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.Obj... | public static Test suite();
public DateAxisTests(String name);
public void testEquals();
public void test1472942();
public void testHashCode();
public void testCloning();
public void testSetRange();
public void testSetMaximumDate();
public void testSetMinimumDate();
private boole... | 1e3fd2d1040fd49c89176743f3aeb7abb35748a04d47a78ef7e81d6ceaa6efe4 | [
"org.jfree.chart.axis.junit.DateAxisTests::testPreviousStandardDateDayB"
] | private static final long serialVersionUID = -1013460999649007604L;
public static final DateRange DEFAULT_DATE_RANGE = new DateRange();
public static final double
DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS = 2.0;
public static final DateTickUnit DEFAULT_DATE_TICK_UNIT
= new ... | public void testPreviousStandardDateDayB() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/DateAxis.java",
"be_test_class_name": "org.jfree.chart.axis.DateAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"1277",
"1279",
"1280",
"1283",
"1284",
"128... | ||
public class CheckPathsBetweenNodesTest extends TestCase | public void testCycles2() {
DiGraph<String, String> g = LinkedDirectedGraph.create();
g.createDirectedGraphNode("a");
g.createDirectedGraphNode("b");
g.createDirectedGraphNode("c");
g.createDirectedGraphNode("d");
g.connect("a", "-", "b");
g.connect("b", "-", "c");
g.connect("c", "-",... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Predicate;
// import com.google.javascript.jscomp.graph.Annotation;
// import com.google.javascript.jscomp.graph.DiGraph;
// import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
// import com.google.... | test/com/google/javascript/jscomp/CheckPathsBetweenNodesTest.java | package com.google.javascript.jscomp;
import com.google.common.base.Predicate;
import com.google.javascript.jscomp.graph.Annotation;
import com.google.javascript.jscomp.graph.DiGraph;
import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
import com.google.javascript.jscomp.graph.DiGraph.DiGraphNode;
| CheckPathsBetweenNodes(DiGraph<N, E> graph, DiGraphNode<N, E> a,
DiGraphNode<N, E> b, Predicate<N> nodePredicate,
Predicate<DiGraphEdge<N, E>> edgePredicate, boolean inclusive);
CheckPathsBetweenNodes(DiGraph<N, E> graph, DiGraphNode<N, E> a,
DiGraphNode<N, E> b, Predicate<N> nodePredicate,
... | 168 | testCycles2 | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Predicate;
import com.google.javascript.jscomp.graph.Annotation;
import com.google.javascript.jscomp.graph.DiGraph;
import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
import com.google.javascript.jscom... | 154 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Predicate;
// import com.google.javascript.jscomp.graph.Annotation;
// import com.google.javascript.jscomp.graph.DiGraph;
// import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
// import com.google.... | /**
* Tests another graph with cycles. The topology of this graph was inspired
* by a control flow graph that was being incorrectly analyzed by an early
* version of CheckPathsBetweenNodes.
*/ | 107 | com.google.javascript.jscomp.CheckPathsBetweenNodes | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Predicate;
import com.google.javascript.jscomp.graph.Annotation;
import com.google.javascript.jscomp.graph.DiGraph;
import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
import com.google.javascript.jscom... | class CheckPathsBetweenNodes<N, E> | package com.google.javascript.jscomp;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.javascript.jscomp.graph.LinkedDirectedGraph;
import com.google.javascript.jscomp.graph.DiGraph;
import com.google.javascript.jscomp.graph.DiGraph.DiGraphEdge;
import junit.framewor... | public void testSimple();
public void testSomeValidPaths();
public void testManyValidPaths();
public void testCycles1();
public void testCycles2();
public void testCycles3();
public void testSomePath1();
public void testSomePath2();
public void testSomePathRevisiting();
public void testNonInclusive(... | 1fb2d18fae6a0aa62d08f0ab5d8dd4ed07fe9035cc05ea0de08b092746ea6225 | [
"com.google.javascript.jscomp.CheckPathsBetweenNodesTest::testCycles2"
] | private final Predicate<N> nodePredicate;
private final Predicate<DiGraphEdge<N, E>> edgePredicate;
private final boolean inclusive;
private static final Annotation BACK_EDGE = new Annotation() {};
private static final Annotation VISITED_EDGE = new Annotation() {};
private static final Annotation WHITE = nu... | public void testCycles2() | private static final Predicate<String> FALSE = Predicates.alwaysFalse();
private static final Predicate<DiGraphEdge<String, String>> ALL_EDGE =
Predicates.alwaysTrue();
private static final Predicate<DiGraphEdge<String, String>> NO_EDGE =
Predicates.alwaysFalse(); | Closure | /*
* Copyright 2008 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/CheckPathsBetweenNodes.java",
"be_test_class_name": "com.google.javascript.jscomp.CheckPathsBetweenNodes",
"be_test_function_name": "allPathsSatisfyPredicate",
"be_test_function_signature": "()Z",
"line_numbers": [
"111",
"112",
... | |
public class Base64Test | @Test
public void testRfc4648Section10Decode() {
assertEquals("", StringUtils.newStringUsAscii(Base64.decodeBase64("")));
assertEquals("f", StringUtils.newStringUsAscii(Base64.decodeBase64("Zg==")));
assertEquals("fo", StringUtils.newStringUsAscii(Base64.decodeBase64("Zm8=")));
a... | // public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
// public boolean isUrlSafe();
// @Override
// void encode(final byte[] in, int inPos, final int inAvail, final Context context);
// @Override
// void decode(final byte[] in, int inPos, final int inAvail, ... | src/test/java/org/apache/commons/codec/binary/Base64Test.java | package org.apache.commons.codec.binary;
import java.math.BigInteger;
| public Base64();
public Base64(final boolean urlSafe);
public Base64(final int lineLength);
public Base64(final int lineLength, final byte[] lineSeparator);
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void ... | 643 | testRfc4648Section10Decode | ```java
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void encode(final byte[] in, int inPos, final int inAvail, final Context context);
@Override
void decode(final byte[] in, int inPos, final int inAvail, final Cont... | 634 | // public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
// public boolean isUrlSafe();
// @Override
// void encode(final byte[] in, int inPos, final int inAvail, final Context context);
// @Override
// void decode(final byte[] in, int inPos, final int inAvail, ... | /**
* Tests RFC 4648 section 10 test vectors.
* <ul>
* <li>BASE64("") = ""</li>
* <li>BASE64("f") = "Zg=="</li>
* <li>BASE64("fo") = "Zm8="</li>
* <li>BASE64("foo") = "Zm9v"</li>
* <li>BASE64("foob") = "Zm9vYg=="</li>
* <li>BASE64("fooba") = "Zm9vYmE="</li>
* <li>BASE64(... | 18 | org.apache.commons.codec.binary.Base64 | src/test/java | ```java
public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe);
public boolean isUrlSafe();
@Override
void encode(final byte[] in, int inPos, final int inAvail, final Context context);
@Override
void decode(final byte[] in, int inPos, final int inAvail, final Cont... | public class Base64 extends BaseNCodec | package org.apache.commons.codec.binary;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.math.BigInteger;
import java.nio.charset.Charset;
i... | public Random getRandom();
@Test
public void testIsStringBase64();
@Test
public void testBase64();
@Test
public void testBase64AtBufferStart();
@Test
public void testBase64AtBufferEnd();
@Test
public void testBase64AtBufferMiddle();
private void testBase64InBuffer(int sta... | 22e3f50d98d5262c58fa65b13854885b1974ed7a1133aa37e94d225fc5b905ae | [
"org.apache.commons.codec.binary.Base64Test::testRfc4648Section10Decode"
] | private static final int BITS_PER_ENCODED_BYTE = 6;
private static final int BYTES_PER_UNENCODED_BLOCK = 3;
private static final int BYTES_PER_ENCODED_BLOCK = 4;
static final byte[] CHUNK_SEPARATOR = {'\r', '\n'};
private static final byte[] STANDARD_ENCODE_TABLE = {
'A', 'B', 'C', 'D', ... | @Test
public void testRfc4648Section10Decode() | private static final Charset CHARSET_UTF8 = Charsets.UTF_8;
private final Random random = new Random(); | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/binary/Base64.java",
"be_test_class_name": "org.apache.commons.codec.binary.Base64",
"be_test_function_name": "decode",
"be_test_function_signature": "([BIILorg/apache/commons/codec/binary/BaseNCodec$Context;)V",
"line_numbers": [
"431",
... | |
public class ChartPanelTests extends TestCase
implements ChartChangeListener, ChartMouseListener | public void test2502355_zoomInDomain() {
DefaultXYDataset dataset = new DefaultXYDataset();
JFreeChart chart = ChartFactory.createXYLineChart("TestChart", "X",
"Y", dataset, false);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setDomainAxis(1, new NumberAxis("X2"));
... | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | tests/org/jfree/chart/junit/ChartPanelTests.java | package org.jfree.chart;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.aw... | public ChartPanel(JFreeChart chart);
public ChartPanel(JFreeChart chart, boolean useBuffer);
public ChartPanel(JFreeChart chart,
boolean properties,
boolean save,
boolean print,
boolean zoom,
boolea... | 249 | test2502355_zoomInDomain | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | 238 | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | /**
* Checks that a call to the zoomInDomain() method, for a plot with more
* than one domain axis, generates just one ChartChangeEvent.
*/ | 1 | org.jfree.chart.ChartPanel | tests | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | public class ChartPanel extends JPanel implements ChartChangeListener,
ChartProgressListener, ActionListener, MouseListener,
MouseMotionListener, OverlayChangeListener, RenderingSource,
Printable, Serializable | package org.jfree.chart.junit;
import java.awt.geom.Rectangle2D;
import java.util.EventListener;
import java.util.List;
import javax.swing.event.CaretListener;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.Cha... | public void chartChanged(ChartChangeEvent event);
public static Test suite();
public ChartPanelTests(String name);
public void testConstructor1();
public void testSetChart();
public void testGetListeners();
public void chartMouseClicked(ChartMouseEvent event);
public void chartMouseMoved... | 235e41814ee0b5bf9259a5f39af6841f636cc3cc01cd7650b84b0d80d586df88 | [
"org.jfree.chart.junit.ChartPanelTests::test2502355_zoomInDomain"
] | private static final long serialVersionUID = 6046366297214274674L;
public static final boolean DEFAULT_BUFFER_USED = true;
public static final int DEFAULT_WIDTH = 680;
public static final int DEFAULT_HEIGHT = 420;
public static final int DEFAULT_MINIMUM_DRAW_WIDTH = 300;
public static final int ... | public void test2502355_zoomInDomain() | private List chartChangeEvents = new java.util.ArrayList(); | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/ChartPanel.java",
"be_test_class_name": "org.jfree.chart.ChartPanel",
"be_test_function_name": "chartChanged",
"be_test_function_signature": "(Lorg/jfree/chart/event/ChartChangeEvent;)V",
"line_numbers": [
"1746",
"1747",
"1748",
"... | |
@SuppressWarnings("boxing")
public class OpenIntToDoubleHashMapTest | @Test
public void testPutKeysWithCollision2() {
OpenIntToDoubleHashMap map = new OpenIntToDoubleHashMap();
int key1 = 837989881;
double value1 = 1.0;
map.put(key1, value1);
int key2 = 476463321;
map.put(key2, value1);
Assert.assertEquals(2, map.size());
... | // // Abstract Java Tested Class
// package org.apache.commons.math3.util;
//
// import java.io.IOException;
// import java.io.ObjectInputStream;
// import java.io.Serializable;
// import java.util.ConcurrentModificationException;
// import java.util.NoSuchElementException;
//
//
//
// public class OpenIntToDoubleH... | src/test/java/org/apache/commons/math3/util/OpenIntToDoubleHashMapTest.java | package org.apache.commons.math3.util;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.ConcurrentModificationException;
import java.util.NoSuchElementException;
| public OpenIntToDoubleHashMap();
public OpenIntToDoubleHashMap(final double missingEntries);
public OpenIntToDoubleHashMap(final int expectedSize);
public OpenIntToDoubleHashMap(final int expectedSize,
final double missingEntries);
public OpenIntToDoubleHashMap(fina... | 322 | testPutKeysWithCollision2 | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.util;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.ConcurrentModificationException;
import java.util.NoSuchElementException;
public class OpenIntToDoubleHashMap implements Serializab... | 306 | // // Abstract Java Tested Class
// package org.apache.commons.math3.util;
//
// import java.io.IOException;
// import java.io.ObjectInputStream;
// import java.io.Serializable;
// import java.util.ConcurrentModificationException;
// import java.util.NoSuchElementException;
//
//
//
// public class OpenIntToDoubleH... | /**
* Similar to testPutKeysWithCollisions() but exercises the codepaths in a slightly
* different manner.
*/ | 1 | org.apache.commons.math3.util.OpenIntToDoubleHashMap | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.util;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.ConcurrentModificationException;
import java.util.NoSuchElementException;
public class OpenIntToDoubleHashMap implements Serializab... | public class OpenIntToDoubleHashMap implements Serializable | package org.apache.commons.math3.util;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Random;
import java.util.Set;
import org.junit.Assert;
import org.junit.Before;
import org.junit.T... | @Before
public void setUp() throws Exception;
private Map<Integer, Double> generate();
private OpenIntToDoubleHashMap createFromJavaMap();
@Test
public void testPutAndGetWith0ExpectedSize();
@Test
public void testPutAndGetWithExpectedSize();
@Test
public void testPutAndGet();
... | 23c0372c3aac6bc58c044096c6c7f9a7c849bbde32498ab8d95778db55f63af0 | [
"org.apache.commons.math3.util.OpenIntToDoubleHashMapTest::testPutKeysWithCollision2"
] | protected static final byte FREE = 0;
protected static final byte FULL = 1;
protected static final byte REMOVED = 2;
private static final long serialVersionUID = -3646337053166149105L;
private static final float LOAD_FACTOR = 0.5f;
private static final int DEFAULT_EXPECTED_SIZE = 16;
p... | @Test
public void testPutKeysWithCollision2() | private Map<Integer, Double> javaMap = new HashMap<Integer, Double>(); | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/util/OpenIntToDoubleHashMap.java",
"be_test_class_name": "org.apache.commons.math3.util.OpenIntToDoubleHashMap",
"be_test_function_name": "changeIndexSign",
"be_test_function_signature": "(I)I",
"line_numbers": [
"332"
],
"method_li... | |
public class DefaultTableXYDatasetTests extends TestCase | public void testAddSeries() {
DefaultTableXYDataset d1 = new DefaultTableXYDataset();
d1.setAutoWidth(true);
XYSeries s1 = new XYSeries("Series 1", true, false);
s1.add(3.0, 1.1);
s1.add(7.0, 2.2);
d1.addSeries(s1);
assertEquals(3.0, d1.getXValue(0, 0), EPSILO... | // // Abstract Java Tested Class
// package org.jfree.data.xy;
//
// import java.util.ArrayList;
// import java.util.HashSet;
// import java.util.Iterator;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.PublicC... | tests/org/jfree/data/xy/junit/DefaultTableXYDatasetTests.java | package org.jfree.data.xy;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.DomainInfo;
import org.jfree... | public DefaultTableXYDataset();
public DefaultTableXYDataset(boolean autoPrune);
public boolean isAutoPrune();
public void addSeries(XYSeries series);
private void updateXPoints(XYSeries series);
public void updateXPoints();
public int getSeriesCount();
public int getItemCount();
pub... | 217 | testAddSeries | ```java
// Abstract Java Tested Class
package org.jfree.data.xy;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.j... | 182 | // // Abstract Java Tested Class
// package org.jfree.data.xy;
//
// import java.util.ArrayList;
// import java.util.HashSet;
// import java.util.Iterator;
// import java.util.List;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.PublicC... | /**
* This is a test for bug 1312066 - adding a new series should trigger a
* recalculation of the interval width, if it is being automatically
* calculated.
*/ | 1 | org.jfree.data.xy.DefaultTableXYDataset | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.xy;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.j... | public class DefaultTableXYDataset extends AbstractIntervalXYDataset
implements TableXYDataset, IntervalXYDataset, DomainInfo,
PublicCloneable | package org.jfree.data.xy.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.... | public static Test suite();
public DefaultTableXYDatasetTests(String name);
public void testEquals();
public void testCloning();
public void testPublicCloneable();
public void testSerialization();
public void testAddSeries();
public void testGetSeries(); | 265a5d4ec881ad36b6e99b2f701f71a00dca442ce6bcc1b19915ea81e9343cf7 | [
"org.jfree.data.xy.junit.DefaultTableXYDatasetTests::testAddSeries"
] | private List data = null;
private HashSet xPoints = null;
private boolean propagateEvents = true;
private boolean autoPrune = false;
private IntervalXYDelegate intervalDelegate; | public void testAddSeries() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/xy/DefaultTableXYDataset.java",
"be_test_class_name": "org.jfree.data.xy.DefaultTableXYDataset",
"be_test_function_name": "addSeries",
"be_test_function_signature": "(Lorg/jfree/data/xy/XYSeries;)V",
"line_numbers": [
"146",
"147",
"149",... | |
public class MultiBackgroundInitializerTest | @Test(expected = NoSuchElementException.class)
public void testResultIsExceptionUnknown() throws ConcurrentException {
final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
res.isException("unknown");
} | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java | package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
| public MultiBackgroundInitializer();
public MultiBackgroundInitializer(final ExecutorService exec);
public void addInitializer(final String name, final BackgroundInitializer<?> init);
@Override
protected int getTaskCount();
@Override
protected MultiBackgroundInitializerResults initialize() t... | 236 | testResultIsExceptionUnknown | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | 232 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | /**
* Tries to query the exception flag of an unknown child initializer from
* the results object. This should cause an exception.
*/ | 1 | org.apache.commons.lang3.concurrent.MultiBackgroundInitializer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | public class MultiBackgroundInitializer
extends
BackgroundInitializer<MultiBackgroundInitializer.MultiBackgroundInitializerResults> | package org.apache.commons.lang3.concurrent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Iterator;
import java.util.NoSuchElementExcep... | @Before
public void setUp() throws Exception;
private void checkChild(final BackgroundInitializer<?> child,
final ExecutorService expExec) throws ConcurrentException;
@Test(expected = IllegalArgumentException.class)
public void testAddInitializerNullName();
@Test(expected = IllegalAr... | 27e129a9ab16dddff74de0cd8e2675bd9f7dd7ad97180d2f9cd3ee99adeec189 | [
"org.apache.commons.lang3.concurrent.MultiBackgroundInitializerTest::testResultIsExceptionUnknown"
] | private final Map<String, BackgroundInitializer<?>> childInitializers =
new HashMap<String, BackgroundInitializer<?>>(); | @Test(expected = NoSuchElementException.class)
public void testResultIsExceptionUnknown() throws ConcurrentException | private static final String CHILD_INIT = "childInitializer";
private MultiBackgroundInitializer initializer; | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java",
"be_test_class_name": "org.apache.commons.lang3.concurrent.MultiBackgroundInitializer",
"be_test_function_name": "addInitializer",
"be_test_function_signature": "(Ljava/lang/String;Lorg/apache/commons/lang... | |
public final class PolynomialFunctionTest | @Test
public void testfirstDerivativeComparison() {
double[] f_coeff = { 3, 6, -2, 1 };
double[] g_coeff = { 6, -4, 3 };
double[] h_coeff = { -4, 6 };
PolynomialFunction f = new PolynomialFunction(f_coeff);
PolynomialFunction g = new PolynomialFunction(g_coeff);
... | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.polynomials;
//
// import java.io.Serializable;
// import java.util.Arrays;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.... | src/test/java/org/apache/commons/math3/analysis/polynomials/PolynomialFunctionTest.java | package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.com... | public PolynomialFunction(double c[])
throws NullArgumentException, NoDataException;
public double value(double x);
public int degree();
public double[] getCoefficients();
protected static double evaluate(double[] coefficients, double argument)
throws NullArgumentException, NoDataExc... | 154 | testfirstDerivativeComparison | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullAr... | 134 | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.polynomials;
//
// import java.io.Serializable;
// import java.util.Arrays;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.... | /**
* tests the firstDerivative function by comparison
*
* <p>This will test the functions
* <tt>f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6</tt>
* and <tt>h(x) = 6x - 4</tt>
*/ | 1 | org.apache.commons.math3.analysis.polynomials.PolynomialFunction | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullAr... | public class PolynomialFunction implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction, Serializable | package org.apache.commons.math3.analysis.polynomials;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testConstants();
@Test
public void testLinear();
@Test
public void testQuadratic();
@Test
public void testQuintic();
@Test
public void testfirstDerivativeComparison();
@Test
public void testString();
@Test
public void testAddition();
@Test
... | 298121d9bcb9a87b99fdf5663d80802e2b15a1036cc84e4510599ee183b46ba2 | [
"org.apache.commons.math3.analysis.polynomials.PolynomialFunctionTest::testfirstDerivativeComparison"
] | private static final long serialVersionUID = -7726511984200295583L;
private final double coefficients[]; | @Test
public void testfirstDerivativeComparison() | protected double tolerance = 1e-12; | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/analysis/polynomials/PolynomialFunction.java",
"be_test_class_name": "org.apache.commons.math3.analysis.polynomials.PolynomialFunction",
"be_test_function_name": "derivative",
"be_test_function_signature": "()Lorg/apache/commons/math3/analysis/Univar... | |
public class ComplexTest | @Test
public void testNthRoot_normal_fourthRoot() {
// The complex number we want to compute all third-roots for.
Complex z = new Complex(5,-2);
// The List holding all fourth roots
Complex[] fourthRootsOfZ = z.nthRoot(4).toArray(new Complex[0]);
// Returned Collection mu... | // public void testScalarAdd();
// @Test
// public void testScalarAddNaN();
// @Test
// public void testScalarAddInf();
// @Test
// public void testConjugate();
// @Test
// public void testConjugateNaN();
// @Test
// public void testConjugateInfiinite();
// @Test
// public ... | src/test/java/org/apache/commons/math3/complex/ComplexTest.java | package org.apache.commons.math3.complex;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.FieldElement;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.comm... | public Complex(double real);
public Complex(double real, double imaginary);
public double abs();
public Complex add(Complex addend) throws NullArgumentException;
public Complex add(double addend);
public Complex conjugate();
public Complex divide(Complex divisor)
throws NullArgumentE... | 1,135 | testNthRoot_normal_fourthRoot | ```java
public void testScalarAdd();
@Test
public void testScalarAddNaN();
@Test
public void testScalarAddInf();
@Test
public void testConjugate();
@Test
public void testConjugateNaN();
@Test
public void testConjugateInfiinite();
@Test
public void testDivide();
@Test
... | 1,115 | // public void testScalarAdd();
// @Test
// public void testScalarAddNaN();
// @Test
// public void testScalarAddInf();
// @Test
// public void testConjugate();
// @Test
// public void testConjugateNaN();
// @Test
// public void testConjugateInfiinite();
// @Test
// public ... | /**
* Test: computing <b>fourth roots</b> of z.
* <pre>
* <code>
* <b>z = 5 - 2 * i</b>
* => z_0 = 1.5164 - 0.1446 * i
* => z_1 = 0.1446 + 1.5164 * i
* => z_2 = -1.5164 + 0.1446 * i
* => z_3 = -1.5164 - 0.1446 * i
* </code>
* </pre>
*/ | 1 | org.apache.commons.math3.complex.Complex | src/test/java | ```java
public void testScalarAdd();
@Test
public void testScalarAddNaN();
@Test
public void testScalarAddInf();
@Test
public void testConjugate();
@Test
public void testConjugateNaN();
@Test
public void testConjugateInfiinite();
@Test
public void testDivide();
@Test
... | public class Complex implements FieldElement<Complex>, Serializable | package org.apache.commons.math3.complex;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.util.FastMath;
import org.junit.Assert;
import org.junit.Test;
import java.util.List;
| @Test
public void testConstructor();
@Test
public void testConstructorNaN();
@Test
public void testAbs();
@Test
public void testAbsNaN();
@Test
public void testAbsInfinite();
@Test
public void testAdd();
@Test
public void testAddNaN();
@Test
public void testAddInf... | 29cbcca886b70f129fc901148556390f202fc2d5777a88d5eb7c83b20885610d | [
"org.apache.commons.math3.complex.ComplexTest::testNthRoot_normal_fourthRoot"
] | public static final Complex I = new Complex(0.0, 1.0);
public static final Complex NaN = new Complex(Double.NaN, Double.NaN);
public static final Complex INF = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
public static final Complex ONE = new Complex(1.0, 0.0);
public static fina... | @Test
public void testNthRoot_normal_fourthRoot() | private double inf = Double.POSITIVE_INFINITY;
private double neginf = Double.NEGATIVE_INFINITY;
private double nan = Double.NaN;
private double pi = FastMath.PI;
private Complex oneInf = new Complex(1, inf);
private Complex oneNegInf = new Complex(1, neginf);
private Complex infOne = new Complex(i... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/complex/Complex.java",
"be_test_class_name": "org.apache.commons.math3.complex.Complex",
"be_test_function_name": "abs",
"be_test_function_signature": "()D",
"line_numbers": [
"116",
"117",
"119",
"120",
"122",
... | |
public class BoundedIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testRemoveUnsupported() {
Iterator<E> mockIterator = new AbstractIteratorDecorator<E>(testList.iterator()) {
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
Iterator<E> iter = new Boun... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
| public BoundedIterator(final Iterator<? extends E> iterator, final long offset, final long max);
private void init();
@Override
public boolean hasNext();
private boolean checkBounds();
@Override
public E next();
@Override
public void remove(); | 369 | testRemoveUnsupported | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | 352 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | /**
* Test the case if the decorated iterator does not support the
* <code>remove()</code> method and throws an {@link UnsupportedOperationException}.
*/ | 28 | org.apache.commons.collections4.iterators.BoundedIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | public class BoundedIterator<E> implements Iterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public BoundedIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testBounded();
@Test
pu... | 29f36cde95782c74a87f5e3d990cc2d1a5c29b424f4dc369b7a66b33153b1fe9 | [
"org.apache.commons.collections4.iterators.BoundedIteratorTest::testRemoveUnsupported"
] | private final Iterator<? extends E> iterator;
private final long offset;
private final long max;
private long pos; | @Test
public void testRemoveUnsupported() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/BoundedIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.BoundedIterator",
"be_test_function_name": "checkBounds",
"be_test_function_signature": "()Z",
"line_numbers": [
"106",
"107",
... | |
public class PearsonsCorrelationTest | @Test
public void testCovarianceConsistency() {
RealMatrix matrix = createRealMatrix(longleyData, 16, 7);
PearsonsCorrelation corrInstance = new PearsonsCorrelation(matrix);
Covariance covInstance = new Covariance(matrix);
PearsonsCorrelation corrFromCovInstance = new PearsonsCor... | // 61187,89.5,284599,3351,1650,110929,1950,
// 63221,96.2,328975,2099,3099,112075,1951,
// 63639,98.1,346999,1932,3594,113270,1952,
// 64989,99.0,365385,1870,3547,115094,1953,
// 63761,100.0,363112,3578,3350,116219,1954,
// 66019,101.2,397469,2904,... | src/test/java/org/apache/commons/math3/stat/correlation/PearsonsCorrelationTest.java | package org.apache.commons.math3.stat.correlation;
import org.apache.commons.math3.distribution.TDistribution;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.exception.NullArgumentException;
import... | public PearsonsCorrelation();
public PearsonsCorrelation(double[][] data);
public PearsonsCorrelation(RealMatrix matrix);
public PearsonsCorrelation(Covariance covariance);
public PearsonsCorrelation(RealMatrix covarianceMatrix, int numberOfObservations);
public RealMatrix getCorrelationMatrix()... | 268 | testCovarianceConsistency | ```java
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,1951,
63639,98.1,346999,1932,3594,113270,1952,
64989,99.0,365385,1870,3547,115094,1953,
63761,100.0,363112,3578,3350,116219,1954,
66019,101.2,397469,2904,3048,11738... | 247 | // 61187,89.5,284599,3351,1650,110929,1950,
// 63221,96.2,328975,2099,3099,112075,1951,
// 63639,98.1,346999,1932,3594,113270,1952,
// 64989,99.0,365385,1870,3547,115094,1953,
// 63761,100.0,363112,3578,3350,116219,1954,
// 66019,101.2,397469,2904,... | /**
* Verify that creating correlation from covariance gives same results as
* direct computation from the original matrix
*/ | 1 | org.apache.commons.math3.stat.correlation.PearsonsCorrelation | src/test/java | ```java
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,1951,
63639,98.1,346999,1932,3594,113270,1952,
64989,99.0,365385,1870,3547,115094,1953,
63761,100.0,363112,3578,3350,116219,1954,
66019,101.2,397469,2904,3048,11738... | public class PearsonsCorrelation | package org.apache.commons.math3.stat.correlation;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.distribution.TDistribution;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.linear.BlockRealMatrix;
import org.apache.commons.math3.util.FastMath;
import org.... | @Test
public void testLongly();
@Test
public void testSwissFertility();
@Test
public void testPValueNearZero();
@Test
public void testConstant();
@Test
public void testInsufficientData();
@Test
public void testStdErrorConsistency();
@Test
public void testCovarianc... | 2bb7201a73970cc331c82e1cdf9d80272ab9c6b3fe6a01ee57b3a862bbc5a22a | [
"org.apache.commons.math3.stat.correlation.PearsonsCorrelationTest::testCovarianceConsistency"
] | private final RealMatrix correlationMatrix;
private final int nObs; | @Test
public void testCovarianceConsistency() | protected final double[] longleyData = new double[] {
60323,83.0,234289,2356,1590,107608,1947,
61122,88.5,259426,2325,1456,108632,1948,
60171,88.2,258054,3682,1616,109773,1949,
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,195... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/stat/correlation/PearsonsCorrelation.java",
"be_test_class_name": "org.apache.commons.math3.stat.correlation.PearsonsCorrelation",
"be_test_function_name": "checkSufficientData",
"be_test_function_signature": "(Lorg/apache/commons/math3/linear/RealMa... | |
public class PeriodAxisTests extends TestCase implements AxisChangeListener | public void testEqualsWithLocale() {
PeriodAxis a1 = new PeriodAxis("Test", new Year(2000), new Year(2009),
TimeZone.getDefault(), Locale.JAPAN);
PeriodAxis a2 = new PeriodAxis("Test", new Year(2000), new Year(2009),
TimeZone.getDefault(), Locale.JAPAN);
asser... | // private transient Paint minorTickMarkPaint = Color.black;
// private PeriodAxisLabelInfo[] labelInfo;
//
// public PeriodAxis(String label);
// public PeriodAxis(String label,
// RegularTimePeriod first, RegularTimePeriod last);
// public PeriodAxis(String label, RegularTim... | tests/org/jfree/chart/axis/junit/PeriodAxisTests.java | package org.jfree.chart.axis;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import j... | public PeriodAxis(String label);
public PeriodAxis(String label,
RegularTimePeriod first, RegularTimePeriod last);
public PeriodAxis(String label, RegularTimePeriod first,
RegularTimePeriod last, TimeZone timeZone, Locale locale);
public RegularTimePeriod getFirst();
... | 196 | testEqualsWithLocale | ```java
private transient Paint minorTickMarkPaint = Color.black;
private PeriodAxisLabelInfo[] labelInfo;
public PeriodAxis(String label);
public PeriodAxis(String label,
RegularTimePeriod first, RegularTimePeriod last);
public PeriodAxis(String label, RegularTimePeriod first... | 182 | // private transient Paint minorTickMarkPaint = Color.black;
// private PeriodAxisLabelInfo[] labelInfo;
//
// public PeriodAxis(String label);
// public PeriodAxis(String label,
// RegularTimePeriod first, RegularTimePeriod last);
// public PeriodAxis(String label, RegularTim... | /**
* Confirm that the equals() method can distinguish the locale field (which
* is new in version 1.0.13).
*/ | 1 | org.jfree.chart.axis.PeriodAxis | tests | ```java
private transient Paint minorTickMarkPaint = Color.black;
private PeriodAxisLabelInfo[] labelInfo;
public PeriodAxis(String label);
public PeriodAxis(String label,
RegularTimePeriod first, RegularTimePeriod last);
public PeriodAxis(String label, RegularTimePeriod first... | public class PeriodAxis extends ValueAxis
implements Cloneable, PublicCloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Stroke;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import... | public void axisChanged(AxisChangeEvent event);
public static Test suite();
public PeriodAxisTests(String name);
public void testEquals();
public void testEqualsWithLocale();
public void testHashCode();
public void testCloning();
public void testSerialization();
public void test19321... | 2c126ecaf8dabcc6e3a68f65218eb7f6ac2a6fdff68518c2923d09addfe6458d | [
"org.jfree.chart.axis.junit.PeriodAxisTests::testEqualsWithLocale"
] | private static final long serialVersionUID = 8353295532075872069L;
private RegularTimePeriod first;
private RegularTimePeriod last;
private TimeZone timeZone;
private Locale locale;
private Calendar calendar;
private Class autoRangeTimePeriodClass;
private Class majorTickTimePeriodClass;... | public void testEqualsWithLocale() | private AxisChangeEvent lastEvent;
private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/PeriodAxis.java",
"be_test_class_name": "org.jfree.chart.axis.PeriodAxis",
"be_test_function_name": "class$",
"be_test_function_signature": "(Ljava/lang/String;)Ljava/lang/Class;",
"line_numbers": [
"239"
],
"method_line_rate": 1
},
... | |
public final class PolynomialFunctionTest | @Test
public void testMath341() {
double[] f_coeff = { 3, 6, -2, 1 };
double[] g_coeff = { 6, -4, 3 };
double[] h_coeff = { -4, 6 };
PolynomialFunction f = new PolynomialFunction(f_coeff);
PolynomialFunction g = new PolynomialFunction(g_coeff);
PolynomialFunction... | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.polynomials;
//
// import java.io.Serializable;
// import java.util.Arrays;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.... | src/test/java/org/apache/commons/math3/analysis/polynomials/PolynomialFunctionTest.java | package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.com... | public PolynomialFunction(double c[])
throws NullArgumentException, NoDataException;
public double value(double x);
public int degree();
public double[] getCoefficients();
protected static double evaluate(double[] coefficients, double argument)
throws NullArgumentException, NoDataExc... | 253 | testMath341 | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullAr... | 233 | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.polynomials;
//
// import java.io.Serializable;
// import java.util.Arrays;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.... | /**
* tests the firstDerivative function by comparison
*
* <p>This will test the functions
* <tt>f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6</tt>
* and <tt>h(x) = 6x - 4</tt>
*/ | 1 | org.apache.commons.math3.analysis.polynomials.PolynomialFunction | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.polynomials;
import java.io.Serializable;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NullAr... | public class PolynomialFunction implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction, Serializable | package org.apache.commons.math3.analysis.polynomials;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testConstants();
@Test
public void testLinear();
@Test
public void testQuadratic();
@Test
public void testQuintic();
@Test
public void testfirstDerivativeComparison();
@Test
public void testString();
@Test
public void testAddition();
@Test
... | 2d1e6580f3cb65ff9ca4cca98fda4c6e51a25228ef9c54cbc9e6a5b85e14ce56 | [
"org.apache.commons.math3.analysis.polynomials.PolynomialFunctionTest::testMath341"
] | private static final long serialVersionUID = -7726511984200295583L;
private final double coefficients[]; | @Test
public void testMath341() | protected double tolerance = 1e-12; | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/analysis/polynomials/PolynomialFunction.java",
"be_test_class_name": "org.apache.commons.math3.analysis.polynomials.PolynomialFunction",
"be_test_function_name": "derivative",
"be_test_function_signature": "()Lorg/apache/commons/math3/analysis/Univar... | |
public final class BrentOptimizerTest | @Test
public void testKeepInitIfBest() {
final double minSin = 3 * Math.PI / 2;
final double offset = 1e-8;
final double delta = 1e-7;
final UnivariateFunction f1 = new Sin();
final UnivariateFunction f2 = new StepFunction(new double[] { minSin, minSin + offset, minSin + ... | // // Abstract Java Tested Class
// package org.apache.commons.math3.optimization.univariate;
//
// import org.apache.commons.math3.util.Precision;
// import org.apache.commons.math3.util.FastMath;
// import org.apache.commons.math3.exception.NumberIsTooSmallException;
// import org.apache.commons.math3.exception.NotS... | src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java | package org.apache.commons.math3.optimization.univariate;
import org.apache.commons.math3.util.Precision;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons... | public BrentOptimizer(double rel,
double abs,
ConvergenceChecker<UnivariatePointValuePair> checker);
public BrentOptimizer(double rel,
double abs);
@Override
protected UnivariatePointValuePair doOptimize();
private Univari... | 221 | testKeepInitIfBest | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optimization.univariate;
import org.apache.commons.math3.util.Precision;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.exception.NotStrictlyPositi... | 191 | // // Abstract Java Tested Class
// package org.apache.commons.math3.optimization.univariate;
//
// import org.apache.commons.math3.util.Precision;
// import org.apache.commons.math3.util.FastMath;
// import org.apache.commons.math3.exception.NumberIsTooSmallException;
// import org.apache.commons.math3.exception.NotS... | /**
* Contrived example showing that prior to the resolution of MATH-855
* (second revision), the algorithm would not return the best point if
* it happened to be the initial guess.
*/ | 1 | org.apache.commons.math3.optimization.univariate.BrentOptimizer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optimization.univariate;
import org.apache.commons.math3.util.Precision;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.exception.NotStrictlyPositi... | @Deprecated
public class BrentOptimizer extends BaseAbstractUnivariateOptimizer | package org.apache.commons.math3.optimization.univariate;
import org.apache.commons.math3.analysis.QuinticFunction;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.function.Sin;
import org.apache.commons.math3.analysis.function.StepFunction;
import org.apache.commo... | @Test
public void testSinMin();
@Test
public void testSinMinWithValueChecker();
@Test
public void testBoundaries();
@Test
public void testQuinticMin();
@Test
public void testQuinticMinStatistics();
@Test
public void testQuinticMax();
@Test
public void testMinEndpo... | 2f5c317817bcc5ec95056a3b9cbcdf64785309ecec8765ad59f75ddb6fea05f7 | [
"org.apache.commons.math3.optimization.univariate.BrentOptimizerTest::testKeepInitIfBest"
] | private static final double GOLDEN_SECTION = 0.5 * (3 - FastMath.sqrt(5));
private static final double MIN_RELATIVE_TOLERANCE = 2 * FastMath.ulp(1d);
private final double relativeThreshold;
private final double absoluteThreshold; | @Test
public void testKeepInitIfBest() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/optimization/univariate/BrentOptimizer.java",
"be_test_class_name": "org.apache.commons.math3.optimization.univariate.BrentOptimizer",
"be_test_function_name": "best",
"be_test_function_signature": "(Lorg/apache/commons/math3/optimization/univariate/... | ||
public final class FastFourierTransformerTest | @Test
public void testAdHocData() {
FastFourierTransformer transformer;
transformer = new FastFourierTransformer(DftNormalization.STANDARD);
Complex result[]; double tolerance = 1E-12;
double x[] = {1.3, 2.4, 1.7, 4.1, 2.9, 1.7, 5.1, 2.7};
Complex y[] = {
new... | // , -0x1.921fb544387bap-18, -0x1.921fb544403c1p-19, -0x1.921fb544422c2p-20, -0x1.921fb54442a83p-21
// , -0x1.921fb54442c73p-22, -0x1.921fb54442cefp-23, -0x1.921fb54442d0ep-24, -0x1.921fb54442d15p-25
// , -0x1.921fb54442d17p-26, -0x1.921fb54442d18p-27, -0x1.921fb54442d18p-28, -0x1.92... | src/test/java/org/apache/commons/math3/transform/FastFourierTransformerTest.java | package org.apache.commons.math3.transform;
import java.io.Serializable;
import java.lang.reflect.Array;
import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.complex.Complex;
import org.apache.commons.math3.exception.Dimens... | public FastFourierTransformer(final DftNormalization normalization);
private static void bitReversalShuffle2(double[] a, double[] b);
private static void normalizeTransformedData(final double[][] dataRI,
final DftNormalization normalization, final TransformType type);
public static void transfor... | 447 | testAdHocData | ```java
, -0x1.921fb544387bap-18, -0x1.921fb544403c1p-19, -0x1.921fb544422c2p-20, -0x1.921fb54442a83p-21
, -0x1.921fb54442c73p-22, -0x1.921fb54442cefp-23, -0x1.921fb54442d0ep-24, -0x1.921fb54442d15p-25
, -0x1.921fb54442d17p-26, -0x1.921fb54442d18p-27, -0x1.921fb54442d18p-28, -0x1.921... | 402 | // , -0x1.921fb544387bap-18, -0x1.921fb544403c1p-19, -0x1.921fb544422c2p-20, -0x1.921fb54442a83p-21
// , -0x1.921fb54442c73p-22, -0x1.921fb54442cefp-23, -0x1.921fb54442d0ep-24, -0x1.921fb54442d15p-25
// , -0x1.921fb54442d17p-26, -0x1.921fb54442d18p-27, -0x1.921fb54442d18p-28, -0x1.92... | /**
* Test of transformer for the ad hoc data taken from Mathematica.
*/
/*
* Additional tests for 1D data.
*/ | 1 | org.apache.commons.math3.transform.FastFourierTransformer | src/test/java | ```java
, -0x1.921fb544387bap-18, -0x1.921fb544403c1p-19, -0x1.921fb544422c2p-20, -0x1.921fb54442a83p-21
, -0x1.921fb54442c73p-22, -0x1.921fb54442cefp-23, -0x1.921fb54442d0ep-24, -0x1.921fb54442d15p-25
, -0x1.921fb54442d17p-26, -0x1.921fb54442d18p-27, -0x1.921fb54442d18p-28, -0x1.921... | public class FastFourierTransformer implements Serializable | package org.apache.commons.math3.transform;
import java.util.Random;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.function.Sin;
import org.apache.commons.math3.analysis.function.Sinc;
import org.apache.commons.math3.complex.Complex;
import org.apache.commons.mat... | @Test
public void testTransformComplexSizeNotAPowerOfTwo();
@Test
public void testTransformRealSizeNotAPowerOfTwo();
@Test
public void testTransformFunctionSizeNotAPowerOfTwo();
@Test
public void testTransformFunctionNotStrictlyPositiveNumberOfSamples();
@Test
public void testTra... | 30728b1eef14a40f01252c336e18d0b6d5483ca7baef9f6a5d2526a70811ba75 | [
"org.apache.commons.math3.transform.FastFourierTransformerTest::testAdHocData"
] | static final long serialVersionUID = 20120210L;
private static final double[] W_SUB_N_R =
{ 0x1.0p0, -0x1.0p0, 0x1.1a62633145c07p-54, 0x1.6a09e667f3bcdp-1
, 0x1.d906bcf328d46p-1, 0x1.f6297cff75cbp-1, 0x1.fd88da3d12526p-1, 0x1.ff621e3796d7ep-1
, 0x1.ffd886084cd0dp-1, 0x1.fff6... | @Test
public void testAdHocData() | private final static long SEED = 20110111L; | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/transform/FastFourierTransformer.java",
"be_test_class_name": "org.apache.commons.math3.transform.FastFourierTransformer",
"be_test_function_name": "bitReversalShuffle2",
"be_test_function_signature": "([D[D)V",
"line_numbers": [
"130",
... | |
public class LogAxisTests extends TestCase | public void testAutoRange1() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.setValue(100.0, "Row 1", "Column 1");
dataset.setValue(200.0, "Row 1", "Column 2");
JFreeChart chart = ChartFactory.createBarChart("Test", "Categories",
"Value", data... | // // Abstract Java Tested Class
// package org.jfree.chart.axis;
//
// import java.awt.Font;
// import java.awt.FontMetrics;
// import java.awt.Graphics2D;
// import java.awt.font.FontRenderContext;
// import java.awt.font.LineMetrics;
// import java.awt.geom.Rectangle2D;
// import java.text.DecimalFormat;
// import ... | tests/org/jfree/chart/axis/junit/LogAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java... | public LogAxis();
public LogAxis(String label);
public double getBase();
public void setBase(double base);
public double getSmallestValue();
public void setSmallestValue(double value);
public NumberTickUnit getTickUnit();
public void setTickUnit(NumberTickUnit unit);
public void setTickUnit(N... | 211 | testAutoRange1 | ```java
// Abstract Java Tested Class
package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.NumberFormat;
i... | 200 | // // Abstract Java Tested Class
// package org.jfree.chart.axis;
//
// import java.awt.Font;
// import java.awt.FontMetrics;
// import java.awt.Graphics2D;
// import java.awt.font.FontRenderContext;
// import java.awt.font.LineMetrics;
// import java.awt.geom.Rectangle2D;
// import java.text.DecimalFormat;
// import ... | /**
* A simple test for the auto-range calculation looking at a
* LogAxis used as the range axis for a CategoryPlot.
*/ | 1 | org.jfree.chart.axis.LogAxis | tests | ```java
// Abstract Java Tested Class
package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.NumberFormat;
i... | public class LogAxis extends ValueAxis | package org.jfree.chart.axis.junit;
import java.awt.geom.Rectangle2D;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.framework.Test;
import junit.framew... | public static Test suite();
public LogAxisTests(String name);
public void testCloning();
public void testEquals();
public void testHashCode();
public void testTranslateJava2DToValue();
public void testSerialization();
public void testAutoRange1();
public void testAutoRange3();
pu... | 31e9439cef5bdaf00b651c1ad3303f4caada39587cfda758f80fe21e8a1687ea | [
"org.jfree.chart.axis.junit.LogAxisTests::testAutoRange1"
] | private double base = 10.0;
private double baseLog = Math.log(10.0);
private double smallestValue = 1E-100;
private NumberTickUnit tickUnit;
private NumberFormat numberFormatOverride; | public void testAutoRange1() | private static final double EPSILON = 0.0000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/LogAxis.java",
"be_test_class_name": "org.jfree.chart.axis.LogAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"385",
"386",
"387",
"390",
"391",
"393",
... | |
public class TypeCheckTest extends CompilerTypeTestCase | public void testBug901455() throws Exception {
testTypes("/** @return {(number,undefined)} */ function a() { return 3; }" +
"var b = undefined === a()");
testTypes("/** @return {(number,undefined)} */ function a() { return 3; }" +
"var b = a() === undefined");
} | // public void testLends3() throws Exception;
// public void testLends4() throws Exception;
// public void testLends5() throws Exception;
// public void testLends6() throws Exception;
// public void testLends7() throws Exception;
// public void testLends8() throws Exception;
// public void testLends9() th... | test/com/google/javascript/jscomp/TypeCheckTest.java | package com.google.javascript.jscomp;
import static com.google.javascript.rhino.jstype.JSTypeNative.ARRAY_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNative.BOOLEAN_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNative.NULL_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNat... | public TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter reverseInterpreter,
JSTypeRegistry typeRegistry,
Scope topScope,
MemoizedScopeCreator scopeCreator,
CheckLevel reportMissingOverride);
public TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter rev... | 6,991 | testBug901455 | ```java
public void testLends3() throws Exception;
public void testLends4() throws Exception;
public void testLends5() throws Exception;
public void testLends6() throws Exception;
public void testLends7() throws Exception;
public void testLends8() throws Exception;
public void testLends9() throws Exceptio... | 6,986 | // public void testLends3() throws Exception;
// public void testLends4() throws Exception;
// public void testLends5() throws Exception;
// public void testLends6() throws Exception;
// public void testLends7() throws Exception;
// public void testLends8() throws Exception;
// public void testLends9() th... | /**
* Tests that undefined can be compared shallowly to a value of type
* (number,undefined) regardless of the side on which the undefined
* value is.
*/ | 107 | com.google.javascript.jscomp.TypeCheck | test | ```java
public void testLends3() throws Exception;
public void testLends4() throws Exception;
public void testLends5() throws Exception;
public void testLends6() throws Exception;
public void testLends7() throws Exception;
public void testLends8() throws Exception;
public void testLends9() throws Exceptio... | public class TypeCheck implements NodeTraversal.Callback, CompilerPass | package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.Scope.Var;
import com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter;
import com.google.javascript.jscomp.type.... | @Override
public void setUp() throws Exception;
public void testInitialTypingScope();
public void testPrivateType() throws Exception;
public void testTypeCheck1() throws Exception;
public void testTypeCheck2() throws Exception;
public void testTypeCheck4() throws Exception;
public void testTypeCheck5() ... | 341ed57aae7c9a0b6f9da1a1cebd4cc9384c852b748a6520815972bb0f626ae7 | [
"com.google.javascript.jscomp.TypeCheckTest::testBug901455"
] | static final DiagnosticType UNEXPECTED_TOKEN = DiagnosticType.error(
"JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN",
"Internal Error: Don't know how to handle {0}");
protected static final String OVERRIDING_PROTOTYPE_WITH_NON_OBJECT =
"overriding prototype with non-object";
static final DiagnosticType DE... | public void testBug901455() throws Exception | private CheckLevel reportMissingOverrides = CheckLevel.WARNING;
private static final String SUGGESTION_CLASS =
"/** @constructor\n */\n" +
"function Suggest() {}\n" +
"Suggest.prototype.a = 1;\n" +
"Suggest.prototype.veryPossible = 1;\n" +
"Suggest.prototype.veryPossible2 = 1;\n"; | Closure | /*
* Copyright 2006 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/TypeCheck.java",
"be_test_class_name": "com.google.javascript.jscomp.TypeCheck",
"be_test_function_name": "check",
"be_test_function_signature": "(Lcom/google/javascript/rhino/Node;Z)V",
"line_numbers": [
"418",
"420",
"421"... | |
public class MultiBackgroundInitializerTest | @Test(expected = NoSuchElementException.class)
public void testResultGetExceptionUnknown() throws ConcurrentException {
final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
res.getException("unknown");
} | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java | package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
| public MultiBackgroundInitializer();
public MultiBackgroundInitializer(final ExecutorService exec);
public void addInitializer(final String name, final BackgroundInitializer<?> init);
@Override
protected int getTaskCount();
@Override
protected MultiBackgroundInitializerResults initialize() t... | 226 | testResultGetExceptionUnknown | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | 222 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | /**
* Tries to query the exception of an unknown child initializer from the
* results object. This should cause an exception.
*/ | 1 | org.apache.commons.lang3.concurrent.MultiBackgroundInitializer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | public class MultiBackgroundInitializer
extends
BackgroundInitializer<MultiBackgroundInitializer.MultiBackgroundInitializerResults> | package org.apache.commons.lang3.concurrent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Iterator;
import java.util.NoSuchElementExcep... | @Before
public void setUp() throws Exception;
private void checkChild(final BackgroundInitializer<?> child,
final ExecutorService expExec) throws ConcurrentException;
@Test(expected = IllegalArgumentException.class)
public void testAddInitializerNullName();
@Test(expected = IllegalAr... | 346b6ee4e7c90bb9d91861d23abd027845062b2df5c686d39d5fdf593b3fd985 | [
"org.apache.commons.lang3.concurrent.MultiBackgroundInitializerTest::testResultGetExceptionUnknown"
] | private final Map<String, BackgroundInitializer<?>> childInitializers =
new HashMap<String, BackgroundInitializer<?>>(); | @Test(expected = NoSuchElementException.class)
public void testResultGetExceptionUnknown() throws ConcurrentException | private static final String CHILD_INIT = "childInitializer";
private MultiBackgroundInitializer initializer; | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java",
"be_test_class_name": "org.apache.commons.lang3.concurrent.MultiBackgroundInitializer",
"be_test_function_name": "addInitializer",
"be_test_function_signature": "(Ljava/lang/String;Lorg/apache/commons/lang... | |
public class DepsFileParserTest extends TestCase | public void testGoodParse() {
final String CONTENTS = "/*"
+ "goog.addDependency('no1', [], []);*//*\n"
+ "goog.addDependency('no2', [ ], [ ]);\n"
+ "*/goog.addDependency('yes1', [], []);\n"
+ "/* blah */goog.addDependency(\"yes2\", [], [])/* blah*/\n"
+ "goog.addDependency... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp.deps;
//
// import com.google.common.base.CharMatcher;
// import com.google.common.base.Function;
// import com.google.common.base.Functions;
// import com.google.common.collect.Lists;
// import com.google.javascript.jscomp.ErrorManager;
// impor... | test/com/google/javascript/jscomp/deps/DepsFileParserTest.java | package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.FileReader;
import java.io.IOException;
import ... | public DepsFileParser(ErrorManager errorManager);
public DepsFileParser(Function<String, String> pathTranslator,
ErrorManager errorManager);
public List<DependencyInfo> parseFile(String filePath) throws IOException;
public List<DependencyInfo> parseFile(String filePath, String fileContents);
public List... | 79 | testGoodParse | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.FileReade... | 56 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp.deps;
//
// import com.google.common.base.CharMatcher;
// import com.google.common.base.Function;
// import com.google.common.base.Functions;
// import com.google.common.collect.Lists;
// import com.google.javascript.jscomp.ErrorManager;
// impor... | /**
* Tests:
* -Parsing of comments,
* -Parsing of different styles of quotes,
* -Parsing of empty arrays,
* -Parsing of non-empty arrays,
* -Correct recording of what was parsed.
*/ | 107 | com.google.javascript.jscomp.deps.DepsFileParser | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.FileReade... | public class DepsFileParser extends JsFileLineParser | package com.google.javascript.jscomp.deps;
import com.google.common.collect.ImmutableList;
import com.google.javascript.jscomp.deps.DependencyInfo;
import com.google.javascript.jscomp.deps.DepsFileParser;
import com.google.javascript.jscomp.ErrorManager;
import com.google.javascript.jscomp.PrintStreamErrorManager;
imp... | @Override
public void setUp();
public void testGoodParse();
public void testTooFewArgs();
public void testTooManyArgs();
public void testShortcutMode();
public void testNoShortcutMode(); | 36c4b95a3ef3ecdc4089df9892dfe9773f935c7fb691db6041477a11b2799246 | [
"com.google.javascript.jscomp.deps.DepsFileParserTest::testGoodParse"
] | private static Logger logger = Logger.getLogger(DepsFileParser.class.getName());
private final Matcher depMatcher =
Pattern.compile("\\s*goog.addDependency\\((.*)\\);?\\s*").matcher("");
private final Matcher depArgsMatch =
Pattern.compile("\\s*([^,]*), (\\[[^\\]]*\\]), (\\[[^\\]]*\\])\\s*").matcher("... | public void testGoodParse() | private DepsFileParser parser;
private ErrorManager errorManager;
private static final String SRC_PATH = "/path/1.js";
private final List<String> EMPTY = Collections.emptyList(); | Closure | /*
* Copyright 2008 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/deps/DepsFileParser.java",
"be_test_class_name": "com.google.javascript.jscomp.deps.DepsFileParser",
"be_test_function_name": "parseFile",
"be_test_function_signature": "(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;",
"line_numbers":... | |
public class SoundexTest extends StringEncoderAbstractTest<Soundex> | @Test
public void testUsMappingOWithDiaeresis() {
Assert.assertEquals("O000", this.getStringEncoder().encode("o"));
if (Character.isLetter('\u00f6')) { // o-umlaut
try {
// uppercase O-umlaut
Assert.assertEquals("\u00d6000", this.getStringEncod... | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
// import org.apache.commons.codec.EncoderException;
// import org.apache.commons.codec.StringEncoder;
//
//
//
// public class Soundex implements StringEncoder {
// public static final String US_ENGLISH_MAPPING_STRING = "0123012... | src/test/java/org/apache/commons/codec/language/SoundexTest.java | package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
| public Soundex();
public Soundex(final char[] mapping);
public Soundex(final String mapping);
public int difference(final String s1, final String s2) throws EncoderException;
@Override
public Object encode(final Object obj) throws EncoderException;
@Override
public String encode(final St... | 391 | testUsMappingOWithDiaeresis | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
public class Soundex implements StringEncoder {
public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
... | 377 | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
// import org.apache.commons.codec.EncoderException;
// import org.apache.commons.codec.StringEncoder;
//
//
//
// public class Soundex implements StringEncoder {
// public static final String US_ENGLISH_MAPPING_STRING = "0123012... | /**
* Fancy characters are not mapped by the default US mapping.
*
* http://issues.apache.org/bugzilla/show_bug.cgi?id=29080
*/ | 18 | org.apache.commons.codec.language.Soundex | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
public class Soundex implements StringEncoder {
public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
... | public class Soundex implements StringEncoder | package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoderAbstractTest;
import org.junit.Assert;
import org.junit.Test;
| @Override
protected Soundex createStringEncoder();
@Test
public void testB650() throws EncoderException;
@Test
public void testBadCharacters();
@Test
public void testDifference() throws EncoderException;
@Test
public void testEncodeBasic();
@Test
public void testEncodeBat... | 382a60fdf3637716d7ed295fa0c01dde7c322745b32ac5aae3c3352fed29d11d | [
"org.apache.commons.codec.language.SoundexTest::testUsMappingOWithDiaeresis"
] | public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
public static final Soundex US_ENGLISH = new Soundex();
@Deprecated
private int maxLength = 4;
private final char[] sound... | @Test
public void testUsMappingOWithDiaeresis() | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/language/Soundex.java",
"be_test_class_name": "org.apache.commons.codec.language.Soundex",
"be_test_function_name": "encode",
"be_test_function_signature": "(Ljava/lang/String;)Ljava/lang/String;",
"line_numbers": [
"167"
],
"method... | ||
public final class MicrosphereInterpolatorTest | @Test
public void testParaboloid2D() {
MultivariateFunction f = new MultivariateFunction() {
public double value(double[] x) {
if (x.length != 2) {
throw new IllegalArgumentException();
}
return 2 * x[0] ... | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.interpolation;
//
// import org.apache.commons.math3.analysis.MultivariateFunction;
// import org.apache.commons.math3.exception.NotPositiveException;
// import org.apache.commons.math3.exception.NotStrictlyPositiveException;
// import org.a... | src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java | package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.analysis.MultivariateFunction;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NoDataException;
impo... | public MicrosphereInterpolator();
public MicrosphereInterpolator(final int elements,
final int exponent)
throws NotPositiveException,
NotStrictlyPositiveException;
public MultivariateFunction interpolate(final double[][] xval,
... | 130 | testParaboloid2D | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.analysis.MultivariateFunction;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons... | 86 | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.interpolation;
//
// import org.apache.commons.math3.analysis.MultivariateFunction;
// import org.apache.commons.math3.exception.NotPositiveException;
// import org.apache.commons.math3.exception.NotStrictlyPositiveException;
// import org.a... | /**
* Test of interpolator for a quadratic function.
* <p>
* y = 2 x<sub>1</sub><sup>2</sup> - 3 x<sub>2</sub><sup>2</sup>
* + 4 x<sub>1</sub> x<sub>2</sub> - 5
*/ | 1 | org.apache.commons.math3.analysis.interpolation.MicrosphereInterpolator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.analysis.MultivariateFunction;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons... | public class MicrosphereInterpolator
implements MultivariateInterpolator | package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.analysis.MultivariateFunction;
import org.apache.commons.math3.util.FastMath;
import org.junit.Assert;
import org.junit.Test;
| @Test
public void testLinearFunction2D();
@Test
public void testParaboloid2D();
public double value(double[] x);
public double value(double[] x); | 3b1e1ce49c398277d4da07b37ad478ef597c33fff64cc4cb24ba16446bd98cb3 | [
"org.apache.commons.math3.analysis.interpolation.MicrosphereInterpolatorTest::testParaboloid2D"
] | public static final int DEFAULT_MICROSPHERE_ELEMENTS = 2000;
public static final int DEFAULT_BRIGHTNESS_EXPONENT = 2;
private final int microsphereElements;
private final int brightnessExponent; | @Test
public void testParaboloid2D() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolator.java",
"be_test_class_name": "org.apache.commons.math3.analysis.interpolation.MicrosphereInterpolator",
"be_test_function_name": "interpolate",
"be_test_function_signature": "([[D[D)Lorg/apache/commons/m... | ||
public class LevenbergMarquardtOptimizerTest extends AbstractLeastSquaresOptimizerAbstractTest | @Test
public void testBevington() {
final double[][] dataPoints = {
// column 1 = times
{ 15, 30, 45, 60, 75, 90, 105, 120, 135, 150,
165, 180, 195, 210, 225, 240, 255, 270, 285, 300,
315, 330, 345, 360, 375, 390, 405, 420, 435, 450,
465,... | // // Abstract Java Tested Class
// package org.apache.commons.math3.optimization.general;
//
// import java.util.Arrays;
// import org.apache.commons.math3.exception.ConvergenceException;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.optimization.PointVectorVal... | src/test/java/org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizerTest.java | package org.apache.commons.math3.optimization.general;
import java.util.Arrays;
import org.apache.commons.math3.exception.ConvergenceException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.optimization.PointVectorValuePair;
import org.apache.commons.math3.optimizatio... | public LevenbergMarquardtOptimizer();
public LevenbergMarquardtOptimizer(ConvergenceChecker<PointVectorValuePair> checker);
public LevenbergMarquardtOptimizer(double initialStepBoundFactor,
ConvergenceChecker<PointVectorValuePair> checker,
... | 259 | testBevington | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optimization.general;
import java.util.Arrays;
import org.apache.commons.math3.exception.ConvergenceException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.optimization.PointVectorValuePair;
impor... | 192 | // // Abstract Java Tested Class
// package org.apache.commons.math3.optimization.general;
//
// import java.util.Arrays;
// import org.apache.commons.math3.exception.ConvergenceException;
// import org.apache.commons.math3.exception.util.LocalizedFormats;
// import org.apache.commons.math3.optimization.PointVectorVal... | /**
* Non-linear test case: fitting of decay curve (from Chapter 8 of
* Bevington's textbook, "Data reduction and analysis for the physical sciences").
* XXX The expected ("reference") values may not be accurate and the tolerance too
* relaxed for this test to be currently really useful (the iss... | 1 | org.apache.commons.math3.optimization.general.LevenbergMarquardtOptimizer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optimization.general;
import java.util.Arrays;
import org.apache.commons.math3.exception.ConvergenceException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.optimization.PointVectorValuePair;
impor... | @Deprecated
public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer | package org.apache.commons.math3.optimization.general;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.MultivariateDifferentiableVectorFunction;
import ... | @Override
public AbstractLeastSquaresOptimizer createOptimizer();
@Override
@Test(expected=SingularMatrixException.class)
public void testNonInvertible();
@Test
public void testControlParameters();
private void checkEstimate(MultivariateDifferentiableVectorFunction problem,
... | 3b5cd1037557885b2982e66a0cf63e86f5d031b5e6dd7f75eb234208bc60a80a | [
"org.apache.commons.math3.optimization.general.LevenbergMarquardtOptimizerTest::testBevington"
] | private int solvedCols;
private double[] diagR;
private double[] jacNorm;
private double[] beta;
private int[] permutation;
private int rank;
private double lmPar;
private double[] lmDir;
private final double initialStepBoundFactor;
private final double costRelativeTolerance;
... | @Test
public void testBevington() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/optimization/general/LevenbergMarquardtOptimizer.java",
"be_test_class_name": "org.apache.commons.math3.optimization.general.LevenbergMarquardtOptimizer",
"be_test_function_name": "determineLMParameter",
"be_test_function_signature": "([DD[D[D[D[D)V"... | ||
public class LocaleUtilsTest | @Test
public void testAvailableLocaleSet() {
final Set<Locale> set = LocaleUtils.availableLocaleSet();
final Set<Locale> set2 = LocaleUtils.availableLocaleSet();
assertNotNull(set);
assertSame(set, set2);
assertUnmodifiableCollection(set);
final Locale[] ... | // // Abstract Java Tested Class
// package org.apache.commons.lang3;
//
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.util.Collections;
// import java.util.HashSet;
// import java.util.List;
// import java.util.Locale;
// import java.util.Set;
// import java.util.concurrent.ConcurrentHashM... | src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java | package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
| public LocaleUtils();
public static Locale toLocale(final String str);
public static List<Locale> localeLookupList(final Locale locale);
public static List<Locale> localeLookupList(final Locale locale, final Locale defaultLocale);
public static List<Locale> availableLocaleList();
public static S... | 360 | testAvailableLocaleSet | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.conc... | 348 | // // Abstract Java Tested Class
// package org.apache.commons.lang3;
//
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.util.Collections;
// import java.util.HashSet;
// import java.util.List;
// import java.util.Locale;
// import java.util.Set;
// import java.util.concurrent.ConcurrentHashM... | /**
* Test availableLocaleSet() method.
*/
//----------------------------------------------------------------------- | 1 | org.apache.commons.lang3.LocaleUtils | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.conc... | public class LocaleUtils | package org.apache.commons.lang3;
import static org.apache.commons.lang3.JavaVersion.JAVA_1_4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
imp... | @Before
public void setUp() throws Exception;
@Test
public void testConstructor();
private void assertValidToLocale(final String language);
private void assertValidToLocale(final String localeString, final String language, final String country);
private void assertValidToLocale(
... | 3cde3d3816ae5a3b58e97c68f027e7ad040b24460d2eba97af5544c57a9b0a2a | [
"org.apache.commons.lang3.LocaleUtilsTest::testAvailableLocaleSet"
] | private static final ConcurrentMap<String, List<Locale>> cLanguagesByCountry =
new ConcurrentHashMap<String, List<Locale>>();
private static final ConcurrentMap<String, List<Locale>> cCountriesByLanguage =
new ConcurrentHashMap<String, List<Locale>>(); | @Test
public void testAvailableLocaleSet() | private static final Locale LOCALE_EN = new Locale("en", "");
private static final Locale LOCALE_EN_US = new Locale("en", "US");
private static final Locale LOCALE_EN_US_ZZZZ = new Locale("en", "US", "ZZZZ");
private static final Locale LOCALE_FR = new Locale("fr", "");
private static final Locale L... | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/LocaleUtils.java",
"be_test_class_name": "org.apache.commons.lang3.LocaleUtils",
"be_test_function_name": "availableLocaleList",
"be_test_function_signature": "()Ljava/util/List;",
"line_numbers": [
"216"
],
"method_line_rate": 1
... | |
public class DateAxisTests extends TestCase | public void testPreviousStandardDateHourB() {
MyDateAxis axis = new MyDateAxis("Hour");
Hour h0 = new Hour(12, 1, 4, 2007);
Hour h1 = new Hour(13, 1, 4, 2007);
// five dates to check...
Date d0 = new Date(h0.getFirstMillisecond());
Date d1 = new Date(h0.getFirstMilli... | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | tests/org/jfree/chart/axis/junit/DateAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import ja... | public DateAxis();
public DateAxis(String label);
public DateAxis(String label, TimeZone zone);
public DateAxis(String label, TimeZone zone, Locale locale);
public TimeZone getTimeZone();
public void setTimeZone(TimeZone zone);
public Timeline getTimeline();
public void setTimeline(Timel... | 913 | testPreviousStandardDateHourB | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | 846 | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | /**
* A basic check for the testPreviousStandardDate() method when the
* tick unit is 6 hours (just for the sake of having a multiple).
*/ | 1 | org.jfree.chart.axis.DateAxis | tests | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | public class DateAxis extends ValueAxis implements Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.Obj... | public static Test suite();
public DateAxisTests(String name);
public void testEquals();
public void test1472942();
public void testHashCode();
public void testCloning();
public void testSetRange();
public void testSetMaximumDate();
public void testSetMinimumDate();
private boole... | 3f7248025a9a73f48577694f0a1106b85457446457d73570cbd9c203127d3664 | [
"org.jfree.chart.axis.junit.DateAxisTests::testPreviousStandardDateHourB"
] | private static final long serialVersionUID = -1013460999649007604L;
public static final DateRange DEFAULT_DATE_RANGE = new DateRange();
public static final double
DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS = 2.0;
public static final DateTickUnit DEFAULT_DATE_TICK_UNIT
= new ... | public void testPreviousStandardDateHourB() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/DateAxis.java",
"be_test_class_name": "org.jfree.chart.axis.DateAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"1277",
"1279",
"1280",
"1283",
"1284",
"128... | ||
public class TestUnsupportedDateTimeField extends TestCase | public void testMethodsThatShouldAlwaysReturnNull() {
DateTimeField fieldOne = UnsupportedDateTimeField.getInstance(
dateTimeFieldTypeOne, UnsupportedDurationField
.getInstance(weeks));
assertNull(fieldOne.getLeapDurationField());
assertNull(fieldOne.... | // // Abstract Java Tested Class
// package org.joda.time.field;
//
// import java.io.Serializable;
// import java.util.HashMap;
// import java.util.Locale;
// import org.joda.time.DateTimeField;
// import org.joda.time.DateTimeFieldType;
// import org.joda.time.DurationField;
// import org.joda.time.ReadablePartial;
... | src/test/java/org/joda/time/field/TestUnsupportedDateTimeField.java | package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
| public static synchronized UnsupportedDateTimeField getInstance(
DateTimeFieldType type, DurationField durationField);
private UnsupportedDateTimeField(DateTimeFieldType type, DurationField durationField);
public DateTimeFieldType getType();
public String getName();
public boolean isSupp... | 142 | testMethodsThatShouldAlwaysReturnNull | ```java
// Abstract Java Tested Class
package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
public final class ... | 135 | // // Abstract Java Tested Class
// package org.joda.time.field;
//
// import java.io.Serializable;
// import java.util.HashMap;
// import java.util.Locale;
// import org.joda.time.DateTimeField;
// import org.joda.time.DateTimeFieldType;
// import org.joda.time.DurationField;
// import org.joda.time.ReadablePartial;
... | /**
* According to the JavaDocs, there are two methods that should always
* return null. * getRangeDurationField() * getLeapDurationField()
*
* Ensure that these are in fact null.
*/ | 1 | org.joda.time.field.UnsupportedDateTimeField | src/test/java | ```java
// Abstract Java Tested Class
package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
public final class ... | public final class UnsupportedDateTimeField extends DateTimeField implements Serializable | package org.joda.time.field;
import java.util.Locale;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationFieldType;
import org.joda.time.LocalTime;
import org.joda.time.ReadablePartial;
| public static TestSuite suite();
protected void setUp() throws Exception;
public void testNullValuesToGetInstanceThrowsException();
public void testDifferentDurationReturnDifferentObjects();
public void testPublicGetNameMethod();
public void testAlwaysFalseReturnTypes();
public void testMeth... | 43574150aa7148738872674a3119217cb6ba3d3d3f597542813990170d0a8bfd | [
"org.joda.time.field.TestUnsupportedDateTimeField::testMethodsThatShouldAlwaysReturnNull"
] | private static final long serialVersionUID = -1934618396111902255L;
private static HashMap<DateTimeFieldType, UnsupportedDateTimeField> cCache;
private final DateTimeFieldType iType;
private final DurationField iDurationField; | public void testMethodsThatShouldAlwaysReturnNull() | private DurationFieldType weeks;
private DurationFieldType months;
private DateTimeFieldType dateTimeFieldTypeOne;
private ReadablePartial localTime; | Time | /*
* Copyright 2001-2006 Stephen Colebourne
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "org/joda/time/field/UnsupportedDateTimeField.java",
"be_test_class_name": "org.joda.time.field.UnsupportedDateTimeField",
"be_test_function_name": "getInstance",
"be_test_function_signature": "(Lorg/joda/time/DateTimeFieldType;Lorg/joda/time/DurationField;)Lorg/joda/time/fie... | |
public class DateAxisTests extends TestCase | public void testPreviousStandardDateYearB() {
MyDateAxis axis = new MyDateAxis("Year");
Year y2006 = new Year(2006);
Year y2007 = new Year(2007);
// five dates to check...
Date d0 = new Date(y2006.getFirstMillisecond());
Date d1 = new Date(y2006.getFirstMillisecond()... | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | tests/org/jfree/chart/axis/junit/DateAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import ja... | public DateAxis();
public DateAxis(String label);
public DateAxis(String label, TimeZone zone);
public DateAxis(String label, TimeZone zone, Locale locale);
public TimeZone getTimeZone();
public void setTimeZone(TimeZone zone);
public Timeline getTimeline();
public void setTimeline(Timel... | 475 | testPreviousStandardDateYearB | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | 408 | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | /**
* A basic check for the testPreviousStandardDate() method when the
* tick unit is 10 years (just for the sake of having a multiple).
*/ | 1 | org.jfree.chart.axis.DateAxis | tests | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | public class DateAxis extends ValueAxis implements Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.Obj... | public static Test suite();
public DateAxisTests(String name);
public void testEquals();
public void test1472942();
public void testHashCode();
public void testCloning();
public void testSetRange();
public void testSetMaximumDate();
public void testSetMinimumDate();
private boole... | 4541c57a40feadb2fb093169566e918480e1a1c79beb501a9c76afe971a25e40 | [
"org.jfree.chart.axis.junit.DateAxisTests::testPreviousStandardDateYearB"
] | private static final long serialVersionUID = -1013460999649007604L;
public static final DateRange DEFAULT_DATE_RANGE = new DateRange();
public static final double
DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS = 2.0;
public static final DateTickUnit DEFAULT_DATE_TICK_UNIT
= new ... | public void testPreviousStandardDateYearB() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/DateAxis.java",
"be_test_class_name": "org.jfree.chart.axis.DateAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"1277",
"1279",
"1280",
"1283",
"1284",
"128... | ||
public class LocaleUtilsTest | @Test
public void testLocaleLookupList_Locale() {
assertLocaleLookupList(null, null, new Locale[0]);
assertLocaleLookupList(LOCALE_QQ, null, new Locale[]{LOCALE_QQ});
assertLocaleLookupList(LOCALE_EN, null, new Locale[]{LOCALE_EN});
assertLocaleLookupList(LOCALE_EN, null, new Loc... | // // Abstract Java Tested Class
// package org.apache.commons.lang3;
//
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.util.Collections;
// import java.util.HashSet;
// import java.util.List;
// import java.util.Locale;
// import java.util.Set;
// import java.util.concurrent.ConcurrentHashM... | src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java | package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
| public LocaleUtils();
public static Locale toLocale(final String str);
public static List<Locale> localeLookupList(final Locale locale);
public static List<Locale> localeLookupList(final Locale locale, final Locale defaultLocale);
public static List<Locale> availableLocaleList();
public static S... | 271 | testLocaleLookupList_Locale | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.conc... | 256 | // // Abstract Java Tested Class
// package org.apache.commons.lang3;
//
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.util.Collections;
// import java.util.HashSet;
// import java.util.List;
// import java.util.Locale;
// import java.util.Set;
// import java.util.concurrent.ConcurrentHashM... | /**
* Test localeLookupList() method.
*/
//----------------------------------------------------------------------- | 1 | org.apache.commons.lang3.LocaleUtils | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.conc... | public class LocaleUtils | package org.apache.commons.lang3;
import static org.apache.commons.lang3.JavaVersion.JAVA_1_4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
imp... | @Before
public void setUp() throws Exception;
@Test
public void testConstructor();
private void assertValidToLocale(final String language);
private void assertValidToLocale(final String localeString, final String language, final String country);
private void assertValidToLocale(
... | 46cce23973f57409c26cf471b3e57aee275d61ff0a506c5911179f8656633d2d | [
"org.apache.commons.lang3.LocaleUtilsTest::testLocaleLookupList_Locale"
] | private static final ConcurrentMap<String, List<Locale>> cLanguagesByCountry =
new ConcurrentHashMap<String, List<Locale>>();
private static final ConcurrentMap<String, List<Locale>> cCountriesByLanguage =
new ConcurrentHashMap<String, List<Locale>>(); | @Test
public void testLocaleLookupList_Locale() | private static final Locale LOCALE_EN = new Locale("en", "");
private static final Locale LOCALE_EN_US = new Locale("en", "US");
private static final Locale LOCALE_EN_US_ZZZZ = new Locale("en", "US", "ZZZZ");
private static final Locale LOCALE_FR = new Locale("fr", "");
private static final Locale L... | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/LocaleUtils.java",
"be_test_class_name": "org.apache.commons.lang3.LocaleUtils",
"be_test_function_name": "availableLocaleList",
"be_test_function_signature": "()Ljava/util/List;",
"line_numbers": [
"216"
],
"method_line_rate": 1
... | |
public class ConcurrentUtilsTest | @Test
public void testPutIfAbsentKeyPresent() {
final String key = "testKey";
final Integer value = 42;
final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
map.put(key, value);
assertEquals("Wrong result", value,
Concurrent... | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.concurrent.ConcurrentMap;
// import java.util.concurrent.ExecutionException;
// import java.util.concurrent.Future;
// import java.util.concurrent.TimeUnit;
//
//
//
// public class ConcurrentUtils {
//
//
// ... | src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java | package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
| private ConcurrentUtils();
public static ConcurrentException extractCause(final ExecutionException ex);
public static ConcurrentRuntimeException extractCauseUnchecked(
final ExecutionException ex);
public static void handleCause(final ExecutionException ex)
throws ConcurrentExcep... | 425 | testPutIfAbsentKeyPresent | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
public class ConcurrentUtils {
private ConcurrentUtils();
... | 416 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.concurrent.ConcurrentMap;
// import java.util.concurrent.ExecutionException;
// import java.util.concurrent.Future;
// import java.util.concurrent.TimeUnit;
//
//
//
// public class ConcurrentUtils {
//
//
// ... | /**
* Tests putIfAbsent() if the map contains the key in question.
*/
//----------------------------------------------------------------------- | 1 | org.apache.commons.lang3.concurrent.ConcurrentUtils | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
public class ConcurrentUtils {
private ConcurrentUtils();
... | public class ConcurrentUtils | package org.apache.commons.lang3.concurrent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.co... | @Test(expected = IllegalArgumentException.class)
public void testConcurrentExceptionCauseUnchecked();
@Test(expected = IllegalArgumentException.class)
public void testConcurrentExceptionCauseError();
@Test(expected = IllegalArgumentException.class)
public void testConcurrentExceptionCauseNull();... | 4a09a349d10689b3b54c165956a271c89e4433636cdbae0841dbb320843bb145 | [
"org.apache.commons.lang3.concurrent.ConcurrentUtilsTest::testPutIfAbsentKeyPresent"
] | @Test
public void testPutIfAbsentKeyPresent() | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/concurrent/ConcurrentUtils.java",
"be_test_class_name": "org.apache.commons.lang3.concurrent.ConcurrentUtils",
"be_test_function_name": "putIfAbsent",
"be_test_function_signature": "(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Ljava/lang/Ob... | |||
@RunWith(RetryRunner.class)
public final class ValueServerTest | @Test
public void testNextDigest() throws Exception {
double next = 0.0;
double tolerance = 0.1;
vs.computeDistribution();
Assert.assertTrue("empirical distribution property",
vs.getEmpiricalDistribution() != null);
SummaryStatistics stats = new SummaryStatist... | // // Abstract Java Tested Class
// package org.apache.commons.math3.random;
//
// import java.io.BufferedReader;
// import java.io.IOException;
// import java.io.InputStreamReader;
// import java.net.MalformedURLException;
// import java.net.URL;
// import org.apache.commons.math3.exception.MathIllegalArgumentExcepti... | src/test/java/org/apache/commons/math3/random/ValueServerTest.java | package org.apache.commons.math3.random;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.exception.MathIllegal... | public ValueServer();
@Deprecated
public ValueServer(RandomDataImpl randomData);
public ValueServer(RandomGenerator generator);
public double getNext() throws IOException, MathIllegalStateException, MathIllegalArgumentException;
public void fill(double[] values)
throws IOException, MathI... | 78 | testNextDigest | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.random;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apac... | 53 | // // Abstract Java Tested Class
// package org.apache.commons.math3.random;
//
// import java.io.BufferedReader;
// import java.io.IOException;
// import java.io.InputStreamReader;
// import java.net.MalformedURLException;
// import java.net.URL;
// import org.apache.commons.math3.exception.MathIllegalArgumentExcepti... | /**
* Generate 1000 random values and make sure they look OK.<br>
* Note that there is a non-zero (but very small) probability that
* these tests will fail even if the code is working as designed.
*/ | 1 | org.apache.commons.math3.random.ValueServer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.random;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apac... | public class ValueServer | package org.apache.commons.math3.random;
import java.net.URL;
import java.util.Arrays;
import org.apache.commons.math3.RetryRunner;
import org.apache.commons.math3.exception.MathIllegalStateException;
import org.apache.commons.math3.exception.ZeroException;
import org.apache.commons.math3.stat.descriptive.SummaryStati... | @Before
public void setUp();
@Test
public void testNextDigest() throws Exception;
@Test
public void testFixedSeed() throws Exception;
private void checkFixedSeed(ValueServer valueServer, int mode) throws Exception;
@Test
public void testNextDigestFail() throws Exception;
@Test
... | 53ca0d6862c947bd37c15034ca082c8606d7549473586a1e4cde60d7f9b9a44c | [
"org.apache.commons.math3.random.ValueServerTest::testNextDigest"
] | public static final int DIGEST_MODE = 0;
public static final int REPLAY_MODE = 1;
public static final int UNIFORM_MODE = 2;
public static final int EXPONENTIAL_MODE = 3;
public static final int GAUSSIAN_MODE = 4;
public static final int CONSTANT_MODE = 5;
private int mode = 5;
private UR... | @Test
public void testNextDigest() throws Exception | private ValueServer vs = new ValueServer(new Well19937c(100)); | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/random/ValueServer.java",
"be_test_class_name": "org.apache.commons.math3.random.ValueServer",
"be_test_function_name": "computeDistribution",
"be_test_function_signature": "()V",
"line_numbers": [
"199",
"200"
],
"method_line... | |
public class FunctionInjectorTest extends TestCase | public void testCanInlineReferenceToFunctionInExpression18() {
// Call in within a call
helperCanInlineReferenceToFunction(CanInlineResult.AFTER_PREPARATION,
"function foo(){return _g();}; " +
"function x() {1 + foo()() }",
"foo", INLINE_BLOCK, true);
} | // CanInlineResult.YES;
//
// @Override
// protected void setUp() throws Exception;
// private FunctionInjector getInjector();
// public void testIsSimpleFunction1();
// public void testIsSimpleFunction2();
// public void testIsSimpleFunction3();
// public void testIsSimpleFunction4();
// public void te... | test/com/google/javascript/jscomp/FunctionInjectorTest.java | package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.base.Supplier;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.ExpressionDecomposer.DecompositionType... | public FunctionInjector(
AbstractCompiler compiler,
Supplier<String> safeNameIdSupplier,
boolean allowDecomposition,
boolean assumeStrictThis,
boolean assumeMinimumCapture);
boolean doesFunctionMeetMinimumRequirements(
final String fnName, Node fnNode);
CanInlineResult canInlin... | 664 | testCanInlineReferenceToFunctionInExpression18 | ```java
CanInlineResult.YES;
@Override
protected void setUp() throws Exception;
private FunctionInjector getInjector();
public void testIsSimpleFunction1();
public void testIsSimpleFunction2();
public void testIsSimpleFunction3();
public void testIsSimpleFunction4();
public void testIsSimpleFunction5();... | 658 | // CanInlineResult.YES;
//
// @Override
// protected void setUp() throws Exception;
// private FunctionInjector getInjector();
// public void testIsSimpleFunction1();
// public void testIsSimpleFunction2();
// public void testIsSimpleFunction3();
// public void testIsSimpleFunction4();
// public void te... | // }
// "foo", INLINE_BLOCK);
// "x().test=foo();",
// "/** @nosideeffects */ function foo(){return 'foo'};" +
// "/** @nosideeffects */ function x(){return c};" +
// "c = a;" +
// "b.test = 'b';" +
// "a.test = 'a';" +
// "var a = {}, b = {}, c;" +
// ... | 107 | com.google.javascript.jscomp.FunctionInjector | test | ```java
CanInlineResult.YES;
@Override
protected void setUp() throws Exception;
private FunctionInjector getInjector();
public void testIsSimpleFunction1();
public void testIsSimpleFunction2();
public void testIsSimpleFunction3();
public void testIsSimpleFunction4();
public void testIsSimpleFunction5();... | class FunctionInjector | package com.google.javascript.jscomp;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.FunctionInjector.CanInlineResult;
import com.google.javascript.jscomp.FunctionInjector.InliningMo... | @Override
protected void setUp() throws Exception;
private FunctionInjector getInjector();
public void testIsSimpleFunction1();
public void testIsSimpleFunction2();
public void testIsSimpleFunction3();
public void testIsSimpleFunction4();
public void testIsSimpleFunction5();
public void testIsSimpleFunction6(... | 5554179f0641b911fa0bc7cd25c1243f99bccb03cb84139216e49dc38e9d80e0 | [
"com.google.javascript.jscomp.FunctionInjectorTest::testCanInlineReferenceToFunctionInExpression18"
] | private final AbstractCompiler compiler;
private final boolean allowDecomposition;
private Set<String> knownConstants = Sets.newHashSet();
private final boolean assumeStrictThis;
private final boolean assumeMinimumCapture;
private final Supplier<String> safeNameIdSupplier;
private final Supplier<String> t... | public void testCanInlineReferenceToFunctionInExpression18() | static final InliningMode INLINE_DIRECT = InliningMode.DIRECT;
static final InliningMode INLINE_BLOCK = InliningMode.BLOCK;
private boolean assumeStrictThis = false;
private boolean assumeMinimumCapture = false;
static final CanInlineResult NEW_VARS_IN_GLOBAL_SCOPE =
CanInlineResult.YES; | Closure | /*
* Copyright 2008 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/FunctionInjector.java",
"be_test_class_name": "com.google.javascript.jscomp.FunctionInjector",
"be_test_function_name": "callMeetsBlockInliningRequirements",
"be_test_function_signature": "(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/... | |
public class AliasExternalsTest extends CompilerTestCase | public void testUnaliasable() {
test("function foo() {" +
"var x=arguments.length;" +
"var y=arguments.length;" +
"var z=arguments.length;" +
"var w=arguments.length;" +
"return x + y + z + w" +
"};foo();",
formatPropNameDecl("length") +
... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Preconditions;
// import com.google.common.base.Strings;
// import com.google.common.collect.Lists;
// import com.google.common.collect.Maps;
// import com.google.common.collect.Sets;
// import com.google.java... | test/com/google/javascript/jscomp/AliasExternalsTest.java | package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
im... | AliasExternals(AbstractCompiler compiler, JSModuleGraph moduleGraph);
AliasExternals(AbstractCompiler compiler, JSModuleGraph moduleGraph,
@Nullable String unaliasableGlobals,
@Nullable String aliasableGlobals);
public void setRequiredUsage(int usage);
@Override
public void p... | 123 | testUnaliasable | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.NodeT... | 87 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Preconditions;
// import com.google.common.base.Strings;
// import com.google.common.collect.Lists;
// import com.google.common.collect.Maps;
// import com.google.common.collect.Sets;
// import com.google.java... | /**
* Some globals should not be aliased because they have special meaning
* within the language (like arguments).
*/ | 107 | com.google.javascript.jscomp.AliasExternals | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.NodeT... | class AliasExternals implements CompilerPass | package com.google.javascript.jscomp;
| public AliasExternalsTest();
@Override
protected int getNumRepetitions();
@Override
public void setUp();
public void testGlobalAlias();
public void testUnaliasable();
public void testAliasableGlobals();
public void testAliasableAndUnaliasableGlobals();
public void testGlobalAssigment();
public voi... | 5861a7cfe5e7aae08d23d087853820b1a5cc3acaf41914e438b6ea7dcdf8a3cc | [
"com.google.javascript.jscomp.AliasExternalsTest::testUnaliasable"
] | private static final int DEFAULT_REQUIRED_USAGE = 4;
private int requiredUsage = DEFAULT_REQUIRED_USAGE;
private static final int MIN_PROP_SIZE = 4;
static final String PROTOTYPE_PROPERTY_NAME =
getArrayNotationNameFor("prototype");
private final Map<String, Symbol> props = Maps.newHashMap();
private ... | public void testUnaliasable() | private static String EXTERNS =
// Globals
"/** @const */ var window;" +
"/** @const */ var document;" +
"var arguments;var _USER_ID;var ActiveXObject;" +
"function eval(x) {}" +
// Properties
"window.setTimeout;" +
"window.eval;" +
"props.window;props.innerHTML;props.length;props.... | Closure | /*
* Copyright 2006 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/AliasExternals.java",
"be_test_class_name": "com.google.javascript.jscomp.AliasExternals",
"be_test_function_name": "access$1100",
"be_test_function_signature": "(Lcom/google/javascript/jscomp/AliasExternals;)Lcom/google/javascript/jscomp/JSModul... | |
public class ObjectWriterTest
extends BaseMapTest
| public void testPrettyPrinter() throws Exception
{
ObjectWriter writer = MAPPER.writer();
HashMap<String, Integer> data = new HashMap<String,Integer>();
data.put("a", 1);
// default: no indentation
assertEquals("{\"a\":1}", writer.writeValueAsString(data));
... | // public ObjectWriter with(FormatFeature feature);
// public ObjectWriter withFeatures(FormatFeature... features);
// public ObjectWriter without(FormatFeature feature);
// public ObjectWriter withoutFeatures(FormatFeature... features);
// public ObjectWriter forType(JavaType rootType);
// publ... | src/test/java/com/fasterxml/jackson/databind/ObjectWriterTest.java | package com.fasterxml.jackson.databind;
import java.io.*;
import java.text.*;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.io.CharacterEscapes;
import com.fasterxml.ja... | protected ObjectWriter(ObjectMapper mapper, SerializationConfig config,
JavaType rootType, PrettyPrinter pp);
protected ObjectWriter(ObjectMapper mapper, SerializationConfig config);
protected ObjectWriter(ObjectMapper mapper, SerializationConfig config,
FormatSchema s);
protecte... | 79 | testPrettyPrinter | ```java
public ObjectWriter with(FormatFeature feature);
public ObjectWriter withFeatures(FormatFeature... features);
public ObjectWriter without(FormatFeature feature);
public ObjectWriter withoutFeatures(FormatFeature... features);
public ObjectWriter forType(JavaType rootType);
public ObjectW... | 60 | // public ObjectWriter with(FormatFeature feature);
// public ObjectWriter withFeatures(FormatFeature... features);
// public ObjectWriter without(FormatFeature feature);
// public ObjectWriter withoutFeatures(FormatFeature... features);
// public ObjectWriter forType(JavaType rootType);
// publ... | /*
/**********************************************************
/* Test methods, normal operation
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.ObjectWriter | src/test/java | ```java
public ObjectWriter with(FormatFeature feature);
public ObjectWriter withFeatures(FormatFeature... features);
public ObjectWriter without(FormatFeature feature);
public ObjectWriter withoutFeatures(FormatFeature... features);
public ObjectWriter forType(JavaType rootType);
public ObjectW... | public class ObjectWriter
implements Versioned,
java.io.Serializable // since 2.1
| package com.fasterxml.jackson.databind;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.StringWriter;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.c... | public void testPrettyPrinter() throws Exception;
public void testPrefetch() throws Exception;
public void testObjectWriterFeatures() throws Exception;
public void testObjectWriterWithNode() throws Exception;
public void testPolymorphicWithTyping() throws Exception;
public void testCanSerialize(... | 5c16aedfbdd8ef70e1b03c495289dd1de66d0510132efbfef841cd17cd3a32e0 | [
"com.fasterxml.jackson.databind.ObjectWriterTest::testPrettyPrinter"
] | private static final long serialVersionUID = 1;
protected final static PrettyPrinter NULL_PRETTY_PRINTER = new MinimalPrettyPrinter();
protected final SerializationConfig _config;
protected final DefaultSerializerProvider _serializerProvider;
protected final SerializerFactory _serializerFactory;
... | public void testPrettyPrinter() throws Exception
| final ObjectMapper MAPPER = new ObjectMapper(); | JacksonDatabind | package com.fasterxml.jackson.databind;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.StringWriter;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/ObjectWriter.java",
"be_test_class_name": "com.fasterxml.jackson.databind.ObjectWriter",
"be_test_function_name": "_configAndWriteValue",
"be_test_function_signature": "(Lcom/fasterxml/jackson/core/JsonGenerator;Ljava/lang/Object;)V",
"line... | |
public class ChartPanelTests extends TestCase
implements ChartChangeListener, ChartMouseListener | public void test2502355_restoreAutoRangeBounds() {
DefaultXYDataset dataset = new DefaultXYDataset();
JFreeChart chart = ChartFactory.createXYLineChart("TestChart", "X",
"Y", dataset, false);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setRangeAxis(1, new NumberAxis(... | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | tests/org/jfree/chart/junit/ChartPanelTests.java | package org.jfree.chart;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.aw... | public ChartPanel(JFreeChart chart);
public ChartPanel(JFreeChart chart, boolean useBuffer);
public ChartPanel(JFreeChart chart,
boolean properties,
boolean save,
boolean print,
boolean zoom,
boolea... | 334 | test2502355_restoreAutoRangeBounds | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | 323 | // public int getZoomTriggerDistance();
// public void setZoomTriggerDistance(int distance);
// public File getDefaultDirectoryForSaveAs();
// public void setDefaultDirectoryForSaveAs(File directory);
// public boolean isEnforceFileExtensions();
// public void setEnforceFileExtensions(boolean en... | /**
* Checks that a call to the restoreAutoRangeBounds() method, for a plot
* with more than one range axis, generates just one ChartChangeEvent.
*/ | 1 | org.jfree.chart.ChartPanel | tests | ```java
public int getZoomTriggerDistance();
public void setZoomTriggerDistance(int distance);
public File getDefaultDirectoryForSaveAs();
public void setDefaultDirectoryForSaveAs(File directory);
public boolean isEnforceFileExtensions();
public void setEnforceFileExtensions(boolean enforce);
... | public class ChartPanel extends JPanel implements ChartChangeListener,
ChartProgressListener, ActionListener, MouseListener,
MouseMotionListener, OverlayChangeListener, RenderingSource,
Printable, Serializable | package org.jfree.chart.junit;
import java.awt.geom.Rectangle2D;
import java.util.EventListener;
import java.util.List;
import javax.swing.event.CaretListener;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.Cha... | public void chartChanged(ChartChangeEvent event);
public static Test suite();
public ChartPanelTests(String name);
public void testConstructor1();
public void testSetChart();
public void testGetListeners();
public void chartMouseClicked(ChartMouseEvent event);
public void chartMouseMoved... | 5fa18cb88877706694022ead07e10743b3abf0a1bd48693f87c68b672af6b21b | [
"org.jfree.chart.junit.ChartPanelTests::test2502355_restoreAutoRangeBounds"
] | private static final long serialVersionUID = 6046366297214274674L;
public static final boolean DEFAULT_BUFFER_USED = true;
public static final int DEFAULT_WIDTH = 680;
public static final int DEFAULT_HEIGHT = 420;
public static final int DEFAULT_MINIMUM_DRAW_WIDTH = 300;
public static final int ... | public void test2502355_restoreAutoRangeBounds() | private List chartChangeEvents = new java.util.ArrayList(); | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/ChartPanel.java",
"be_test_class_name": "org.jfree.chart.ChartPanel",
"be_test_function_name": "chartChanged",
"be_test_function_signature": "(Lorg/jfree/chart/event/ChartChangeEvent;)V",
"line_numbers": [
"1746",
"1747",
"1748",
"... | |
public class ZipArchiveEntryTest | @Test
public void testCompressionMethod() throws Exception {
final ZipArchiveOutputStream zos =
new ZipArchiveOutputStream(new ByteArrayOutputStream());
final ZipArchiveEntry entry = new ZipArchiveEntry("foo");
assertEquals(-1, entry.getMethod());
assertFalse(zos.canW... | // // Abstract Java Tested Class
// package org.apache.commons.compress.archivers.zip;
//
// import org.apache.commons.compress.archivers.ArchiveEntry;
// import org.apache.commons.compress.archivers.EntryStreamOffsets;
// import java.io.File;
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.u... | src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java | package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.zip.Zip... | public ZipArchiveEntry(final String name);
public ZipArchiveEntry(final java.util.zip.ZipEntry entry) throws ZipException;
public ZipArchiveEntry(final ZipArchiveEntry entry) throws ZipException;
protected ZipArchiveEntry();
public ZipArchiveEntry(final File inputFile, final String entryName);
@... | 231 | testCompressionMethod | ```java
// Abstract Java Tested Class
package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import ja... | 210 | // // Abstract Java Tested Class
// package org.apache.commons.compress.archivers.zip;
//
// import org.apache.commons.compress.archivers.ArchiveEntry;
// import org.apache.commons.compress.archivers.EntryStreamOffsets;
// import java.io.File;
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.u... | /**
* Test case for
* <a href="https://issues.apache.org/jira/browse/COMPRESS-93"
* >COMPRESS-93</a>.
*/ | 47 | org.apache.commons.compress.archivers.zip.ZipArchiveEntry | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import ja... | public class ZipArchiveEntry extends java.util.zip.ZipEntry
implements ArchiveEntry, EntryStreamOffsets
| package org.apache.commons.compress.archivers.zip;
import static org.apache.commons.compress.AbstractTestCase.getFile;
import static org.junit.Assert.*;
import java.io.ByteArrayOutputStream;
import java.util.zip.ZipEntry;
import org.junit.Test;
| @Test
public void testExtraFields();
@Test
public void testExtraFieldMerging();
@Test
public void testAddAsFirstExtraField();
@Test
public void testUnixMode();
@Test
public void testCompressionMethod() throws Exception;
@Test
public void testNotEquals();
@Test
pub... | 6486332745860952d3c36804e879a4ccbb5baa8dc1a36b573636c642c57abdad | [
"org.apache.commons.compress.archivers.zip.ZipArchiveEntryTest::testCompressionMethod"
] | public static final int PLATFORM_UNIX = 3;
public static final int PLATFORM_FAT = 0;
public static final int CRC_UNKNOWN = -1;
private static final int SHORT_MASK = 0xFFFF;
private static final int SHORT_SHIFT = 16;
private static final byte[] EMPTY = new byte[0];
private int method = ZipMe... | @Test
public void testCompressionMethod() throws Exception | Compress | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you... | [
{
"be_test_class_file": "org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java",
"be_test_class_name": "org.apache.commons.compress.archivers.zip.ZipArchiveEntry",
"be_test_function_name": "getGeneralPurposeBit",
"be_test_function_signature": "()Lorg/apache/commons/compress/archivers/zip/Ge... | ||
public class ZipArchiveEntryTest | @Test
public void testNullCommentEqualsEmptyComment() {
final ZipArchiveEntry entry1 = new ZipArchiveEntry("foo");
final ZipArchiveEntry entry2 = new ZipArchiveEntry("foo");
final ZipArchiveEntry entry3 = new ZipArchiveEntry("foo");
entry1.setComment(null);
entry2.setComm... | // // Abstract Java Tested Class
// package org.apache.commons.compress.archivers.zip;
//
// import org.apache.commons.compress.archivers.ArchiveEntry;
// import org.apache.commons.compress.archivers.EntryStreamOffsets;
// import java.io.File;
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.u... | src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java | package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.zip.Zip... | public ZipArchiveEntry(final String name);
public ZipArchiveEntry(final java.util.zip.ZipEntry entry) throws ZipException;
public ZipArchiveEntry(final ZipArchiveEntry entry) throws ZipException;
protected ZipArchiveEntry();
public ZipArchiveEntry(final File inputFile, final String entryName);
@... | 260 | testNullCommentEqualsEmptyComment | ```java
// Abstract Java Tested Class
package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import ja... | 249 | // // Abstract Java Tested Class
// package org.apache.commons.compress.archivers.zip;
//
// import org.apache.commons.compress.archivers.ArchiveEntry;
// import org.apache.commons.compress.archivers.EntryStreamOffsets;
// import java.io.File;
// import java.util.ArrayList;
// import java.util.Arrays;
// import java.u... | /**
* Tests comment's influence on equals comparisons.
* @see "https://issues.apache.org/jira/browse/COMPRESS-187"
*/ | 47 | org.apache.commons.compress.archivers.zip.ZipArchiveEntry | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.compress.archivers.zip;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.EntryStreamOffsets;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import ja... | public class ZipArchiveEntry extends java.util.zip.ZipEntry
implements ArchiveEntry, EntryStreamOffsets
| package org.apache.commons.compress.archivers.zip;
import static org.apache.commons.compress.AbstractTestCase.getFile;
import static org.junit.Assert.*;
import java.io.ByteArrayOutputStream;
import java.util.zip.ZipEntry;
import org.junit.Test;
| @Test
public void testExtraFields();
@Test
public void testExtraFieldMerging();
@Test
public void testAddAsFirstExtraField();
@Test
public void testUnixMode();
@Test
public void testCompressionMethod() throws Exception;
@Test
public void testNotEquals();
@Test
pub... | 650a23b0d29efd0b02d7117e04cfbfd5884ede9e60acf1735942aa7d78740fcf | [
"org.apache.commons.compress.archivers.zip.ZipArchiveEntryTest::testNullCommentEqualsEmptyComment"
] | public static final int PLATFORM_UNIX = 3;
public static final int PLATFORM_FAT = 0;
public static final int CRC_UNKNOWN = -1;
private static final int SHORT_MASK = 0xFFFF;
private static final int SHORT_SHIFT = 16;
private static final byte[] EMPTY = new byte[0];
private int method = ZipMe... | @Test
public void testNullCommentEqualsEmptyComment() | Compress | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you... | [
{
"be_test_class_file": "org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java",
"be_test_class_name": "org.apache.commons.compress.archivers.zip.ZipArchiveEntry",
"be_test_function_name": "equals",
"be_test_function_signature": "(Ljava/lang/Object;)Z",
"line_numbers": [
"881",
... | ||
public class RenamePrototypesTest extends CompilerTestCase | public void testRenameProperties() {
test("var foo; foo.prop_='bar'", "var foo;foo.a='bar'");
test("this.prop_='bar'", "this.a='bar'");
test("this.prop='bar'", "this.prop='bar'");
test("this['prop_']='bar'", "this['a']='bar'");
test("this['prop']='bar'", "this['prop']='bar'");
test("var foo={p... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Preconditions;
// import com.google.common.collect.ImmutableMap;
// import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
// import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCa... | test/com/google/javascript/jscomp/RenamePrototypesTest.java | package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
import com.google.javascript.rhino.Node;
im... | RenamePrototypes(AbstractCompiler compiler, boolean aggressiveRenaming,
@Nullable char[] reservedCharacters,
@Nullable VariableMap prevUsedRenameMap);
@Override
public void process(Node externs, Node root);
private void reusePrototypeNames(Set<Property> properties);
Varia... | 141 | testRenameProperties | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
impor... | 133 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Preconditions;
// import com.google.common.collect.ImmutableMap;
// import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
// import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCa... | /**
* Test renaming private properties (end with underscores) and test to make
* sure we don't rename other properties.
*/ | 107 | com.google.javascript.jscomp.RenamePrototypes | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
impor... | class RenamePrototypes implements CompilerPass | package com.google.javascript.jscomp;
| public RenamePrototypesTest();
@Override
public CompilerPass getProcessor(Compiler compiler);
@Override
protected void tearDown() throws Exception;
@Override
protected int getNumRepetitions();
public void testRenamePrototypes1();
public void testRenamePrototypes2();
public void testRenamePrototypesW... | 65bb26f25cee97b106d37eca14e9ba50f9c83b7b933102e6cf1f3baa189019b1 | [
"com.google.javascript.jscomp.RenamePrototypesTest::testRenameProperties"
] | private final AbstractCompiler compiler;
private final boolean aggressiveRenaming;
private final char[] reservedCharacters;
private final VariableMap prevUsedRenameMap;
private static final Comparator<Property> FREQUENCY_COMPARATOR =
new Comparator<Property>() {
@Override
public int compare(Pr... | public void testRenameProperties() | private static final String EXTERNS = "var js_version;js_version.toString;";
private VariableMap prevUsedRenameMap;
private RenamePrototypes renamePrototypes; | Closure | /*
* Copyright 2005 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/RenamePrototypes.java",
"be_test_class_name": "com.google.javascript.jscomp.RenamePrototypes",
"be_test_function_name": "access$700",
"be_test_function_signature": "(Lcom/google/javascript/jscomp/RenamePrototypes;)Ljava/util/Map;",
"line_numb... | |
public class ErfTest | @Test
public void testErfGnu() {
final double tol = 1E-15;
final double[] gnuValues = new double[] {-1, -1, -1, -1, -1,
-1, -1, -1, -0.99999999999999997848,
-0.99999999999999264217, -0.99999999999846254017, -0.99999999980338395581, -0.99999998458274209971,
-0.999999256... | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | src/test/java/org/apache/commons/math3/special/ErfTest.java | package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
| private Erf();
public static double erf(double x);
public static double erfc(double x);
public static double erf(double x1, double x2);
public static double erfInv(final double x);
public static double erfcInv(final double x); | 140 | testErfGnu | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | 122 | // // Abstract Java Tested Class
// package org.apache.commons.math3.special;
//
// import org.apache.commons.math3.util.FastMath;
//
//
//
// public class Erf {
// private static final double X_CRIT = 0.4769362762044697;
//
// private Erf();
// public static double erf(double x);
// public static... | /**
* Compare Erf.erf against reference values computed using GCC 4.2.1 (Apple OSX packaged version)
* erfl (extended precision erf).
*/ | 1 | org.apache.commons.math3.special.Erf | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.special;
import org.apache.commons.math3.util.FastMath;
public class Erf {
private static final double X_CRIT = 0.4769362762044697;
private Erf();
public static double erf(double x);
public static double erfc(double x);
pub... | public class Erf | package org.apache.commons.math3.special;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Test;
import org.junit.Assert;
| @Test
public void testErf0();
@Test
public void testErf1960();
@Test
public void testErf2576();
@Test
public void testErf2807();
@Test
public void testErf3291();
@Test
public void testLargeValues();
@Test
public void testErfGnu();
@Test
public void testErf... | 660f4f065ef44e98248b7eb98dccb4013472244ce14223c54e09122b5e08f7e5 | [
"org.apache.commons.math3.special.ErfTest::testErfGnu"
] | private static final double X_CRIT = 0.4769362762044697; | @Test
public void testErfGnu() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you ... | [
{
"be_test_class_file": "org/apache/commons/math3/special/Erf.java",
"be_test_class_name": "org.apache.commons.math3.special.Erf",
"be_test_function_name": "erf",
"be_test_function_signature": "(D)D",
"line_numbers": [
"67",
"68",
"70",
"71"
],
"method_line_rate":... | ||
public final class SmoothingPolynomialBicubicSplineInterpolatorTest | @Test
public void testParaboloid() {
BivariateFunction f = new BivariateFunction() {
public double value(double x, double y) {
return 2 * x * x - 3 * y * y + 4 * x * y - 5
+ ((int) (FastMath.abs(5 * x + 3 * y)) % 2 == 0 ? 1 : -1);
... | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.interpolation;
//
// import org.apache.commons.math3.exception.DimensionMismatchException;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.exception.NonMonotonicSequenceException;
// import or... | src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java | package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NonMonotonicSequenceException;
import org.apache.commons.math3.exception.NotPositiveExcepti... | public SmoothingPolynomialBicubicSplineInterpolator();
public SmoothingPolynomialBicubicSplineInterpolator(int degree)
throws NotPositiveException;
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree, int yDegree)
throws NotPositiveException;
@Override
public BicubicSplin... | 178 | testParaboloid | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NonMonotonicSequenceException;
import org.apache.comm... | 137 | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.interpolation;
//
// import org.apache.commons.math3.exception.DimensionMismatchException;
// import org.apache.commons.math3.exception.NoDataException;
// import org.apache.commons.math3.exception.NonMonotonicSequenceException;
// import or... | /**
* Test of interpolator for a paraboloid.
* <p>
* z = 2 x<sup>2</sup> - 3 y<sup>2</sup> + 4 x y - 5
*/ | 1 | org.apache.commons.math3.analysis.interpolation.SmoothingPolynomialBicubicSplineInterpolator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NonMonotonicSequenceException;
import org.apache.comm... | public class SmoothingPolynomialBicubicSplineInterpolator
extends BicubicSplineInterpolator | package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.analysis.BivariateFunction;
import org.ju... | @Test
public void testPreconditions();
@Test
public void testPlane();
@Test
public void testParaboloid();
public double value(double x, double y);
public double value(double x, double y); | 6874fcb80a83a231a65f8156d39a6448ff93d950d60a38b6c219b4eea1c18951 | [
"org.apache.commons.math3.analysis.interpolation.SmoothingPolynomialBicubicSplineInterpolatorTest::testParaboloid"
] | private final PolynomialFitter xFitter;
private final int xDegree;
private final PolynomialFitter yFitter;
private final int yDegree; | @Test
public void testParaboloid() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolator.java",
"be_test_class_name": "org.apache.commons.math3.analysis.interpolation.SmoothingPolynomialBicubicSplineInterpolator",
"be_test_function_name": "interpolate",
"be_test_function... | ||
public class BoundedIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testOffsetGreaterThanSize() {
Iterator<E> iter = new BoundedIterator<E>(testList.iterator(), 10, 4);
assertFalse(iter.hasNext());
try {
iter.next();
fail("Expected NoSuchElementException.");
} catch (NoSuchElementException nsee) { /* Succ... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
| public BoundedIterator(final Iterator<? extends E> iterator, final long offset, final long max);
private void init();
@Override
public boolean hasNext();
private boolean checkBounds();
@Override
public E next();
@Override
public void remove(); | 177 | testOffsetGreaterThanSize | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | 168 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | /**
* Test the case if the <code>offset</code> passed to the constructor is
* greater than the decorated iterator's size. The BoundedIterator should
* behave as if there are no more elements to return.
*/ | 28 | org.apache.commons.collections4.iterators.BoundedIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | public class BoundedIterator<E> implements Iterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public BoundedIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testBounded();
@Test
pu... | 691fa7d2362ce4ea94267b7147d03e020bf1f7cb752a6c0a3bcd954fae65f23f | [
"org.apache.commons.collections4.iterators.BoundedIteratorTest::testOffsetGreaterThanSize"
] | private final Iterator<? extends E> iterator;
private final long offset;
private final long max;
private long pos; | @Test
public void testOffsetGreaterThanSize() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/BoundedIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.BoundedIterator",
"be_test_function_name": "checkBounds",
"be_test_function_signature": "()Z",
"line_numbers": [
"106",
"107",
... | |
public class StatisticalBarRendererTests extends TestCase | public void testDrawWithNullMeanVertical() {
boolean success = false;
try {
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(null, new Double(4.0), "S1", "C2");
... | // // Abstract Java Tested Class
// package org.jfree.chart.renderer.category;
//
// import java.awt.BasicStroke;
// import java.awt.Color;
// import java.awt.GradientPaint;
// import java.awt.Graphics2D;
// import java.awt.Paint;
// import java.awt.Stroke;
// import java.awt.geom.Line2D;
// import java.awt.geom.Recta... | tests/org/jfree/chart/renderer/category/junit/StatisticalBarRendererTests.java | package org.jfree.chart.renderer.category;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputS... | public StatisticalBarRenderer();
public Paint getErrorIndicatorPaint();
public void setErrorIndicatorPaint(Paint paint);
public Stroke getErrorIndicatorStroke();
public void setErrorIndicatorStroke(Stroke stroke);
public Range findRangeBounds(CategoryDataset dataset);
public void drawItem(Gr... | 223 | testDrawWithNullMeanVertical | ```java
// Abstract Java Tested Class
package org.jfree.chart.renderer.category;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IO... | 203 | // // Abstract Java Tested Class
// package org.jfree.chart.renderer.category;
//
// import java.awt.BasicStroke;
// import java.awt.Color;
// import java.awt.GradientPaint;
// import java.awt.Graphics2D;
// import java.awt.Paint;
// import java.awt.Stroke;
// import java.awt.geom.Line2D;
// import java.awt.geom.Recta... | /**
* Draws the chart with a <code>null</code> mean value to make sure that
* no exceptions are thrown (particularly by code in the renderer). See
* bug report 1779941.
*/ | 1 | org.jfree.chart.renderer.category.StatisticalBarRenderer | tests | ```java
// Abstract Java Tested Class
package org.jfree.chart.renderer.category;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IO... | public class StatisticalBarRenderer extends BarRenderer
implements CategoryItemRenderer, Cloneable, PublicCloneable,
Serializable | package org.jfree.chart.renderer.category.junit;
import java.awt.BasicStroke;
import java.awt.Color;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.fram... | public static Test suite();
public StatisticalBarRendererTests(String name);
public void testEquals();
public void testHashcode();
public void testCloning();
public void testPublicCloneable();
public void testSerialization();
public void testDrawWithNullInfo();
public void testDrawWi... | 6fce6b428373f91dfa85e8ba241c374fa059d6a3d3ae5eeddd78046d9456841f | [
"org.jfree.chart.renderer.category.junit.StatisticalBarRendererTests::testDrawWithNullMeanVertical"
] | private static final long serialVersionUID = -4986038395414039117L;
private transient Paint errorIndicatorPaint;
private transient Stroke errorIndicatorStroke; | public void testDrawWithNullMeanVertical() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/renderer/category/StatisticalBarRenderer.java",
"be_test_class_name": "org.jfree.chart.renderer.category.StatisticalBarRenderer",
"be_test_function_name": "drawItem",
"be_test_function_signature": "(Ljava/awt/Graphics2D;Lorg/jfree/chart/renderer/category/Cate... | ||
public class SegmentedTimelineTests extends TestCase | public void testBasicSegmentedTimeline() {
SegmentedTimeline stl = new SegmentedTimeline(10, 2, 3);
stl.setStartTime(946684800000L); // 1-Jan-2000
assertFalse(stl.containsDomainValue(946684799999L));
assertTrue(stl.containsDomainValue(946684800000L));
assertTrue(stl.contains... | // "2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
// "2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
// "2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
// "2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-0... | tests/org/jfree/chart/axis/junit/SegmentedTimelineTests.java | package org.jfree.chart.axis;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.SimpleTimeZone;
import j... | public SegmentedTimeline(long segmentSize,
int segmentsIncluded,
int segmentsExcluded);
public static long firstMondayAfter1900();
public static SegmentedTimeline newMondayThroughFridayTimeline();
public static SegmentedTimeline newFifteenMinuteT... | 1,102 | testBasicSegmentedTimeline | ```java
"2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
"2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
"2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
"2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-04",
... | 1,072 | // "2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
// "2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
// "2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
// "2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-0... | /**
* Tests a basic segmented timeline.
*/
//////////////////////////////////////////////////////////////////////////
// utility methods
////////////////////////////////////////////////////////////////////////// | 1 | org.jfree.chart.axis.SegmentedTimeline | tests | ```java
"2000-12-25", "2001-01-01", "2001-01-15", "2001-02-19", "2001-04-13",
"2001-05-28", "2001-07-04", "2001-09-03", "2001-09-11", "2001-09-12",
"2001-09-13", "2001-09-14", "2001-11-22", "2001-12-25", "2002-01-01",
"2002-01-21", "2002-02-18", "2002-03-29", "2002-05-27", "2002-07-04",
... | public class SegmentedTimeline implements Timeline, Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.Format;
import java.text.NumberFormat;
import java.text.ParseExce... | public static Test suite();
public SegmentedTimelineTests(String name);
protected void setUp() throws Exception;
protected void tearDown() throws Exception;
public void testMsSegmentedTimeline();
public void testMs2SegmentedTimeline();
public void testMondayThroughFridaySegmentedTimeline();
... | 71fbed0b4385ae5ec64d255703ad7ed9877376daec17f220b823dba6700de86d | [
"org.jfree.chart.axis.junit.SegmentedTimelineTests::testBasicSegmentedTimeline"
] | private static final long serialVersionUID = 1093779862539903110L;
public static final long DAY_SEGMENT_SIZE = 24 * 60 * 60 * 1000;
public static final long HOUR_SEGMENT_SIZE = 60 * 60 * 1000;
public static final long FIFTEEN_MINUTE_SEGMENT_SIZE = 15 * 60 * 1000;
public static final long MINUTE_SEGM... | public void testBasicSegmentedTimeline() | private static final int TEST_CYCLE_START = 0;
private static final int TEST_CYCLE_END = 1000;
private static final int TEST_CYCLE_INC = 55;
private static final long FIVE_YEARS = 5 * 365
* SegmentedTimeline.DAY_SEGMENT_SIZE;
private static final NumberFormat NUMBER_FORMAT
... | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/SegmentedTimeline.java",
"be_test_class_name": "org.jfree.chart.axis.SegmentedTimeline",
"be_test_function_name": "access$400",
"be_test_function_signature": "(Lorg/jfree/chart/axis/SegmentedTimeline;Lorg/jfree/chart/axis/SegmentedTimeline$Segment;)I",
... | |
public class BorderArrangementTests extends TestCase | public void testBugX() {
RectangleConstraint constraint = new RectangleConstraint(
new Range(0.0, 200.0), new Range(0.0, 100.0));
BlockContainer container = new BlockContainer(new BorderArrangement());
BufferedImage image = new BufferedImage(200, 100,
Buffered... | // // Abstract Java Tested Class
// package org.jfree.chart.block;
//
// import java.awt.Graphics2D;
// import java.awt.geom.Rectangle2D;
// import java.io.Serializable;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.RectangleEdge;
// import org.jfree.chart.util.Size2D;
// import org.jf... | tests/org/jfree/chart/block/junit/BorderArrangementTests.java | package org.jfree.chart.block;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.RectangleEdge;
import org.jfree.chart.util.Size2D;
import org.jfree.data.Range;
| public BorderArrangement();
public void add(Block block, Object key);
public Size2D arrange(BlockContainer container,
Graphics2D g2,
RectangleConstraint constraint);
protected Size2D arrangeNN(BlockContainer container, Graphics2D g2);
protected Siz... | 844 | testBugX | ```java
// Abstract Java Tested Class
package org.jfree.chart.block;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.RectangleEdge;
import org.jfree.chart.util.Size2D;
import org.jfree.data.Range;
pub... | 820 | // // Abstract Java Tested Class
// package org.jfree.chart.block;
//
// import java.awt.Graphics2D;
// import java.awt.geom.Rectangle2D;
// import java.io.Serializable;
// import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.RectangleEdge;
// import org.jfree.chart.util.Size2D;
// import org.jf... | /**
* This test is for a particular bug that arose just prior to the release
* of JFreeChart 1.0.10. A BorderArrangement with LEFT, CENTRE and RIGHT
* blocks that is too wide, by default, for the available space, wasn't
* shrinking the centre block as expected.
*/ | 1 | org.jfree.chart.block.BorderArrangement | tests | ```java
// Abstract Java Tested Class
package org.jfree.chart.block;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.RectangleEdge;
import org.jfree.chart.util.Size2D;
import org.jfree.data.Range;
pub... | public class BorderArrangement implements Arrangement, Serializable | package org.jfree.chart.block.junit;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.fra... | public static Test suite();
public BorderArrangementTests(String name);
public void testEquals();
public void testCloning();
public void testSerialization();
public void testSizing();
public void testSizingWithWidthConstraint();
public void testBugX(); | 72b6594c4593f75ccd4d5c46d73f2232da6bc4594a9d582f3942244775232add | [
"org.jfree.chart.block.junit.BorderArrangementTests::testBugX"
] | private static final long serialVersionUID = 506071142274883745L;
private Block centerBlock;
private Block topBlock;
private Block bottomBlock;
private Block leftBlock;
private Block rightBlock; | public void testBugX() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/block/BorderArrangement.java",
"be_test_class_name": "org.jfree.chart.block.BorderArrangement",
"be_test_function_name": "add",
"be_test_function_signature": "(Lorg/jfree/chart/block/Block;Ljava/lang/Object;)V",
"line_numbers": [
"98",
"99",
... | |
public class SoundexTest extends StringEncoderAbstractTest<Soundex> | @Test
public void testHWRuleEx3() throws EncoderException {
Assert.assertEquals("S460", this.getStringEncoder().encode("Sgler"));
Assert.assertEquals("S460", this.getStringEncoder().encode("Swhgler"));
// Also S460:
this.checkEncodingVariations("S460", new String[]{
"... | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
// import org.apache.commons.codec.EncoderException;
// import org.apache.commons.codec.StringEncoder;
//
//
//
// public class Soundex implements StringEncoder {
// public static final String US_ENGLISH_MAPPING_STRING = "0123012... | src/test/java/org/apache/commons/codec/language/SoundexTest.java | package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
| public Soundex();
public Soundex(final char[] mapping);
public Soundex(final String mapping);
public int difference(final String s1, final String s2) throws EncoderException;
@Override
public Object encode(final Object obj) throws EncoderException;
@Override
public String encode(final St... | 272 | testHWRuleEx3 | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
public class Soundex implements StringEncoder {
public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
... | 250 | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
// import org.apache.commons.codec.EncoderException;
// import org.apache.commons.codec.StringEncoder;
//
//
//
// public class Soundex implements StringEncoder {
// public static final String US_ENGLISH_MAPPING_STRING = "0123012... | /**
* Consonants from the same code group separated by W or H are treated as one.
*
* @throws EncoderException
*/ | 18 | org.apache.commons.codec.language.Soundex | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
public class Soundex implements StringEncoder {
public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
... | public class Soundex implements StringEncoder | package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoderAbstractTest;
import org.junit.Assert;
import org.junit.Test;
| @Override
protected Soundex createStringEncoder();
@Test
public void testB650() throws EncoderException;
@Test
public void testBadCharacters();
@Test
public void testDifference() throws EncoderException;
@Test
public void testEncodeBasic();
@Test
public void testEncodeBat... | 7d4d699124eadac3d01e43249afb7a0b393b8f4357dae98bb667c3ec2091c825 | [
"org.apache.commons.codec.language.SoundexTest::testHWRuleEx3"
] | public static final String US_ENGLISH_MAPPING_STRING = "0123012#02245501262301#202";
private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
public static final Soundex US_ENGLISH = new Soundex();
@Deprecated
private int maxLength = 4;
private final char[] sound... | @Test
public void testHWRuleEx3() throws EncoderException | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/language/Soundex.java",
"be_test_class_name": "org.apache.commons.codec.language.Soundex",
"be_test_function_name": "encode",
"be_test_function_signature": "(Ljava/lang/String;)Ljava/lang/String;",
"line_numbers": [
"167"
],
"method... | ||
public class MultiBackgroundInitializerTest | @Test
public void testInitializeEx() throws ConcurrentException {
final ChildBackgroundInitializer child = new ChildBackgroundInitializer();
child.ex = new Exception();
initializer.addInitializer(CHILD_INIT, child);
initializer.start();
final MultiBackgroundInitializer.Mu... | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java | package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
| public MultiBackgroundInitializer();
public MultiBackgroundInitializer(final ExecutorService exec);
public void addInitializer(final String name, final BackgroundInitializer<?> init);
@Override
protected int getTaskCount();
@Override
protected MultiBackgroundInitializerResults initialize() t... | 285 | testInitializeEx | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | 273 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.Collections;
// import java.util.HashMap;
// import java.util.Map;
// import java.util.NoSuchElementException;
// import java.util.Set;
// import java.util.concurrent.ExecutorService;
//
//
//
// public class Mul... | /**
* Tests the behavior of the initializer if one of the child initializers
* throws a checked exception.
*/ | 1 | org.apache.commons.lang3.concurrent.MultiBackgroundInitializer | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.ExecutorService;
public class MultiBackgroundInitializer
... | public class MultiBackgroundInitializer
extends
BackgroundInitializer<MultiBackgroundInitializer.MultiBackgroundInitializerResults> | package org.apache.commons.lang3.concurrent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Iterator;
import java.util.NoSuchElementExcep... | @Before
public void setUp() throws Exception;
private void checkChild(final BackgroundInitializer<?> child,
final ExecutorService expExec) throws ConcurrentException;
@Test(expected = IllegalArgumentException.class)
public void testAddInitializerNullName();
@Test(expected = IllegalAr... | 80852c9c2bb5d4c8ed3408d9dd0859bf689375016db116069ee24ab7d8ce5bde | [
"org.apache.commons.lang3.concurrent.MultiBackgroundInitializerTest::testInitializeEx"
] | private final Map<String, BackgroundInitializer<?>> childInitializers =
new HashMap<String, BackgroundInitializer<?>>(); | @Test
public void testInitializeEx() throws ConcurrentException | private static final String CHILD_INIT = "childInitializer";
private MultiBackgroundInitializer initializer; | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java",
"be_test_class_name": "org.apache.commons.lang3.concurrent.MultiBackgroundInitializer",
"be_test_function_name": "addInitializer",
"be_test_function_signature": "(Ljava/lang/String;Lorg/apache/commons/lang... | |
public class TypeCheckTest extends CompilerTypeTestCase | public void testBug911118() throws Exception {
// verifying the type assigned to function expressions assigned variables
Scope s = parseAndTypeCheckWithScope("var a = function(){};").scope;
JSType type = s.getVar("a").getType();
assertEquals("function (): undefined", type.toString());
// verifyin... | // public void testLends3() throws Exception;
// public void testLends4() throws Exception;
// public void testLends5() throws Exception;
// public void testLends6() throws Exception;
// public void testLends7() throws Exception;
// public void testLends8() throws Exception;
// public void testLends9() th... | test/com/google/javascript/jscomp/TypeCheckTest.java | package com.google.javascript.jscomp;
import static com.google.javascript.rhino.jstype.JSTypeNative.ARRAY_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNative.BOOLEAN_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNative.NULL_TYPE;
import static com.google.javascript.rhino.jstype.JSTypeNat... | public TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter reverseInterpreter,
JSTypeRegistry typeRegistry,
Scope topScope,
MemoizedScopeCreator scopeCreator,
CheckLevel reportMissingOverride);
public TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter rev... | 7,026 | testBug911118 | ```java
public void testLends3() throws Exception;
public void testLends4() throws Exception;
public void testLends5() throws Exception;
public void testLends6() throws Exception;
public void testLends7() throws Exception;
public void testLends8() throws Exception;
public void testLends9() throws Exceptio... | 7,015 | // public void testLends3() throws Exception;
// public void testLends4() throws Exception;
// public void testLends5() throws Exception;
// public void testLends6() throws Exception;
// public void testLends7() throws Exception;
// public void testLends8() throws Exception;
// public void testLends9() th... | /**
* Tests that assigning two untyped functions to a variable whose type is
* inferred and calling this variable is legal.
*/ | 107 | com.google.javascript.jscomp.TypeCheck | test | ```java
public void testLends3() throws Exception;
public void testLends4() throws Exception;
public void testLends5() throws Exception;
public void testLends6() throws Exception;
public void testLends7() throws Exception;
public void testLends8() throws Exception;
public void testLends9() throws Exceptio... | public class TypeCheck implements NodeTraversal.Callback, CompilerPass | package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.javascript.jscomp.Scope.Var;
import com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter;
import com.google.javascript.jscomp.type.... | @Override
public void setUp() throws Exception;
public void testInitialTypingScope();
public void testPrivateType() throws Exception;
public void testTypeCheck1() throws Exception;
public void testTypeCheck2() throws Exception;
public void testTypeCheck4() throws Exception;
public void testTypeCheck5() ... | 838cd9528d0dc75efd6d0fb5afe9c794f64c86b715efd34d53897f41e6ac99b7 | [
"com.google.javascript.jscomp.TypeCheckTest::testBug911118"
] | static final DiagnosticType UNEXPECTED_TOKEN = DiagnosticType.error(
"JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN",
"Internal Error: Don't know how to handle {0}");
protected static final String OVERRIDING_PROTOTYPE_WITH_NON_OBJECT =
"overriding prototype with non-object";
static final DiagnosticType DE... | public void testBug911118() throws Exception | private CheckLevel reportMissingOverrides = CheckLevel.WARNING;
private static final String SUGGESTION_CLASS =
"/** @constructor\n */\n" +
"function Suggest() {}\n" +
"Suggest.prototype.a = 1;\n" +
"Suggest.prototype.veryPossible = 1;\n" +
"Suggest.prototype.veryPossible2 = 1;\n"; | Closure | /*
* Copyright 2006 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/TypeCheck.java",
"be_test_class_name": "com.google.javascript.jscomp.TypeCheck",
"be_test_function_name": "check",
"be_test_function_signature": "(Lcom/google/javascript/rhino/Node;Z)V",
"line_numbers": [
"418",
"420",
"421"... | |
public class MillerUpdatingRegressionTest | @Test
public void testRegressAirlineConstantExternal() {
MillerUpdatingRegression instance = new MillerUpdatingRegression(4, false);
double[][] x = new double[airdata[0].length][];
double[] y = new double[airdata[0].length];
for (int i = 0; i < airdata[0].length; i++) {
... | // /*"Q",*/ new double[]{0.952757, 0.986757, 1.09198, 1.17578, 1.16017, 1.17376, 1.29051, 1.39067, 1.61273, 1.82544, 1.54604, 1.5279, 1.6602, 1.82231, 1.93646, 0.520635, 0.534627, 0.655192, 0.791575, 0.842945, 0.852892, 0.922843, 1, 1.19845, 1.34067, 1.32624, 1.24852, 1.25432, 1.37177, 1.38974, 0.262424, 0.2664... | src/test/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegressionTest.java | package org.apache.commons.math3.stat.regression;
import java.util.Arrays;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;
import org.apache.commons.math3.util.MathArrays;
| @SuppressWarnings("unused")
private MillerUpdatingRegression();
public MillerUpdatingRegression(int numberOfVariables, boolean includeConstant, double errorTolerance)
throws ModelSpecificationException;
public MillerUpdatingRegression(int numberOfVariables, boolean includeConstant)
throws ModelS... | 194 | testRegressAirlineConstantExternal | ```java
/*"Q",*/ new double[]{0.952757, 0.986757, 1.09198, 1.17578, 1.16017, 1.17376, 1.29051, 1.39067, 1.61273, 1.82544, 1.54604, 1.5279, 1.6602, 1.82231, 1.93646, 0.520635, 0.534627, 0.655192, 0.791575, 0.842945, 0.852892, 0.922843, 1, 1.19845, 1.34067, 1.32624, 1.24852, 1.25432, 1.37177, 1.38974, 0.262424, 0... | 163 | // /*"Q",*/ new double[]{0.952757, 0.986757, 1.09198, 1.17578, 1.16017, 1.17376, 1.29051, 1.39067, 1.61273, 1.82544, 1.54604, 1.5279, 1.6602, 1.82231, 1.93646, 0.520635, 0.534627, 0.655192, 0.791575, 0.842945, 0.852892, 0.922843, 1, 1.19845, 1.34067, 1.32624, 1.24852, 1.25432, 1.37177, 1.38974, 0.262424, 0.2664... | /* Results can be found at http://www.indiana.edu/~statmath/stat/all/panel/panel4.html
* This test concerns a known data set
*/ | 1 | org.apache.commons.math3.stat.regression.MillerUpdatingRegression | src/test/java | ```java
/*"Q",*/ new double[]{0.952757, 0.986757, 1.09198, 1.17578, 1.16017, 1.17376, 1.29051, 1.39067, 1.61273, 1.82544, 1.54604, 1.5279, 1.6602, 1.82231, 1.93646, 0.520635, 0.534627, 0.655192, 0.791575, 0.842945, 0.852892, 0.922843, 1, 1.19845, 1.34067, 1.32624, 1.24852, 1.25432, 1.37177, 1.38974, 0.262424, 0... | public class MillerUpdatingRegression implements UpdatingMultipleLinearRegression | package org.apache.commons.math3.stat.regression;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.util.FastMath;
import org.junit.Assert;
import org.junit.Test;
| public MillerUpdatingRegressionTest();
@Test
public void testHasIntercept();
@Test
public void testAddObsGetNClear();
@Test
public void testNegativeTestAddObs();
@Test
public void testNegativeTestAddMultipleObs();
@Test
public void testRegressAirlineConstantExternal();
@T... | 87d07343480ffca3bc98fdbe693da56389998dcff51842d52222725f7935959e | [
"org.apache.commons.math3.stat.regression.MillerUpdatingRegressionTest::testRegressAirlineConstantExternal"
] | private final int nvars;
private final double[] d;
private final double[] rhs;
private final double[] r;
private final double[] tol;
private final double[] rss;
private final int[] vorder;
private final double[] work_tolset;
private long nobs = 0;
private double sserr = 0.0;
... | @Test
public void testRegressAirlineConstantExternal() | private final static double[][] airdata = {
/*"I",*/new double[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, ... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java",
"be_test_class_name": "org.apache.commons.math3.stat.regression.MillerUpdatingRegression",
"be_test_function_name": "addObservation",
"be_test_function_signature": "([DD)V",
"line_numbers": [
... | |
public class ComplexTest | @Test
public void testNthRoot_cornercase_thirdRoot_realPartZero() {
// complex number with only imaginary part
Complex z = new Complex(0,2);
// The List holding all third roots
Complex[] thirdRootsOfZ = z.nthRoot(3).toArray(new Complex[0]);
// Returned Collection must not... | // public void testScalarAdd();
// @Test
// public void testScalarAddNaN();
// @Test
// public void testScalarAddInf();
// @Test
// public void testConjugate();
// @Test
// public void testConjugateNaN();
// @Test
// public void testConjugateInfiinite();
// @Test
// public ... | src/test/java/org/apache/commons/math3/complex/ComplexTest.java | package org.apache.commons.math3.complex;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.FieldElement;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.comm... | public Complex(double real);
public Complex(double real, double imaginary);
public double abs();
public Complex add(Complex addend) throws NullArgumentException;
public Complex add(double addend);
public Complex conjugate();
public Complex divide(Complex divisor)
throws NullArgumentE... | 1,197 | testNthRoot_cornercase_thirdRoot_realPartZero | ```java
public void testScalarAdd();
@Test
public void testScalarAddNaN();
@Test
public void testScalarAddInf();
@Test
public void testConjugate();
@Test
public void testConjugateNaN();
@Test
public void testConjugateInfiinite();
@Test
public void testDivide();
@Test
... | 1,180 | // public void testScalarAdd();
// @Test
// public void testScalarAddNaN();
// @Test
// public void testScalarAddInf();
// @Test
// public void testConjugate();
// @Test
// public void testConjugateNaN();
// @Test
// public void testConjugateInfiinite();
// @Test
// public ... | /**
* Test: computing <b>third roots</b> of z with real part 0.
* <pre>
* <code>
* <b>z = 2 * i</b>
* => z_0 = 1.0911 + 0.6299 * i
* => z_1 = -1.0911 + 0.6299 * i
* => z_2 = -2.3144 - 1.2599 * i
* </code>
* </pre>
*/ | 1 | org.apache.commons.math3.complex.Complex | src/test/java | ```java
public void testScalarAdd();
@Test
public void testScalarAddNaN();
@Test
public void testScalarAddInf();
@Test
public void testConjugate();
@Test
public void testConjugateNaN();
@Test
public void testConjugateInfiinite();
@Test
public void testDivide();
@Test
... | public class Complex implements FieldElement<Complex>, Serializable | package org.apache.commons.math3.complex;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.util.FastMath;
import org.junit.Assert;
import org.junit.Test;
import java.util.List;
| @Test
public void testConstructor();
@Test
public void testConstructorNaN();
@Test
public void testAbs();
@Test
public void testAbsNaN();
@Test
public void testAbsInfinite();
@Test
public void testAdd();
@Test
public void testAddNaN();
@Test
public void testAddInf... | 88081ac74a9e422e3dbc1c46f743d270bd5c3bd50a181ce306ddf395a88a6e5a | [
"org.apache.commons.math3.complex.ComplexTest::testNthRoot_cornercase_thirdRoot_realPartZero"
] | public static final Complex I = new Complex(0.0, 1.0);
public static final Complex NaN = new Complex(Double.NaN, Double.NaN);
public static final Complex INF = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
public static final Complex ONE = new Complex(1.0, 0.0);
public static fina... | @Test
public void testNthRoot_cornercase_thirdRoot_realPartZero() | private double inf = Double.POSITIVE_INFINITY;
private double neginf = Double.NEGATIVE_INFINITY;
private double nan = Double.NaN;
private double pi = FastMath.PI;
private Complex oneInf = new Complex(1, inf);
private Complex oneNegInf = new Complex(1, neginf);
private Complex infOne = new Complex(i... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/complex/Complex.java",
"be_test_class_name": "org.apache.commons.math3.complex.Complex",
"be_test_function_name": "abs",
"be_test_function_signature": "()D",
"line_numbers": [
"116",
"117",
"119",
"120",
"122",
... | |
public class LoopingIteratorTest extends TestCase | public void testLooping2() throws Exception {
final List<String> list = Arrays.asList("a", "b");
final LoopingIterator<String> loop = new LoopingIterator<String>(list);
assertTrue("1st hasNext should return true", loop.hasNext());
assertEquals("a", loop.next());
assertTrue(... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | src/test/java/org/apache/commons/collections4/iterators/LoopingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
| public LoopingIterator(final Collection<? extends E> coll);
@Override
public boolean hasNext();
@Override
public E next();
@Override
public void remove();
@Override
public void reset();
public int size(); | 95 | testLooping2 | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | 82 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | /**
* Tests whether a populated looping iterator works as designed.
* @throws Exception If something unexpected occurs.
*/ | 28 | org.apache.commons.collections4.iterators.LoopingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | public class LoopingIterator<E> implements ResettableIterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.TestCase;
| public void testConstructorEx() throws Exception;
public void testLooping0() throws Exception;
public void testLooping1() throws Exception;
public void testLooping2() throws Exception;
public void testLooping3() throws Exception;
public void testRemoving1() throws Exception;
public void test... | 88f47be3955b743ab59260320ad1f4dabe5ce9fe860a6ae2101b5cbadf0df813 | [
"org.apache.commons.collections4.iterators.LoopingIteratorTest::testLooping2"
] | private final Collection<? extends E> collection;
private Iterator<? extends E> iterator; | public void testLooping2() throws Exception | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/LoopingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.LoopingIterator",
"be_test_function_name": "hasNext",
"be_test_function_signature": "()Z",
"line_numbers": [
"72"
],
"method_li... | ||
public final class EmpiricalDistributionTest extends RealDistributionAbstractTest | @Override
@Test
public void testDensityIntegrals() {
final RealDistribution distribution = makeDistribution();
final double tol = 1.0e-9;
final BaseAbstractUnivariateIntegrator integrator =
new IterativeLegendreGaussIntegrator(5, 1.0e-12, 1.0e-10);
final Univariat... | // private EmpiricalDistribution(int binCount,
// RandomDataGenerator randomData);
// public void load(double[] in) throws NullArgumentException;
// public void load(URL url) throws IOException, NullArgumentException, ZeroException;
// public void load(File file) throws... | src/test/java/org/apache/commons/math3/random/EmpiricalDistributionTest.java | package org.apache.commons.math3.random;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;... | public EmpiricalDistribution();
public EmpiricalDistribution(int binCount);
public EmpiricalDistribution(int binCount, RandomGenerator generator);
public EmpiricalDistribution(RandomGenerator generator);
@Deprecated
public EmpiricalDistribution(int binCount, RandomDataImpl randomData);
@Depr... | 408 | testDensityIntegrals | ```java
private EmpiricalDistribution(int binCount,
RandomDataGenerator randomData);
public void load(double[] in) throws NullArgumentException;
public void load(URL url) throws IOException, NullArgumentException, ZeroException;
public void load(File file) throws IOExce... | 386 | // private EmpiricalDistribution(int binCount,
// RandomDataGenerator randomData);
// public void load(double[] in) throws NullArgumentException;
// public void load(URL url) throws IOException, NullArgumentException, ZeroException;
// public void load(File file) throws... | /**
* Modify test integration bounds from the default. Because the distribution
* has discontinuities at bin boundaries, integrals spanning multiple bins
* will face convergence problems. Only test within-bin integrals and spans
* across no more than 3 bin boundaries.
*/ | 1 | org.apache.commons.math3.random.EmpiricalDistribution | src/test/java | ```java
private EmpiricalDistribution(int binCount,
RandomDataGenerator randomData);
public void load(double[] in) throws NullArgumentException;
public void load(URL url) throws IOException, NullArgumentException, ZeroException;
public void load(File file) throws IOExce... | public class EmpiricalDistribution extends AbstractRealDistribution | package org.apache.commons.math3.random;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.analysis.Univar... | @Override
@Before
public void setUp();
@Test
public void testLoad() throws Exception;
private void checkDistribution();
@Test
public void testDoubleLoad() throws Exception;
@Test
public void testNext() throws Exception;
@Test
public void testNexFail();
@Test
publi... | 89d84023ad347df997774ab15386e2cf06ee1f17a7c2e19af7c96f4c5d3965ec | [
"org.apache.commons.math3.random.EmpiricalDistributionTest::testDensityIntegrals"
] | public static final int DEFAULT_BIN_COUNT = 1000;
private static final String FILE_CHARSET = "US-ASCII";
private static final long serialVersionUID = 5729073523949762654L;
protected final RandomDataGenerator randomData;
private final List<SummaryStatistics> binStats;
private SummaryStatistics sa... | @Override
@Test
public void testDensityIntegrals() | protected EmpiricalDistribution empiricalDistribution = null;
protected EmpiricalDistribution empiricalDistribution2 = null;
protected File file = null;
protected URL url = null;
protected double[] dataArray = null;
protected final int n = 10000;
private final double binMass = 10d / (n + 1);... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/random/EmpiricalDistribution.java",
"be_test_class_name": "org.apache.commons.math3.random.EmpiricalDistribution",
"be_test_function_name": "access$300",
"be_test_function_signature": "(Lorg/apache/commons/math3/random/EmpiricalDistribution;)Lorg/apa... | |
public class SkippingIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testRemoveLast() {
List<E> testListCopy = new ArrayList<E>(testList);
Iterator<E> iter = new SkippingIterator<E>(testListCopy.iterator(), 5);
assertTrue(iter.hasNext());
assertEquals("f", iter.next());
assertTrue(iter.hasNext());
assertEquals("g... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
| public SkippingIterator(final Iterator<E> iterator, final long offset);
private void init();
@Override
public E next();
@Override
public void remove(); | 275 | testRemoveLast | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | 249 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | /**
* Test removing the last element. Verify that the element is removed from
* the underlying collection.
*/ | 28 | org.apache.commons.collections4.iterators.SkippingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | public class SkippingIterator<E> extends AbstractIteratorDecorator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public SkippingIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testSkipping();
@Test
... | 8a08abb0574008f5fa517d120b0b6a016762d66ffb6296283d9c7975e9f04d3d | [
"org.apache.commons.collections4.iterators.SkippingIteratorTest::testRemoveLast"
] | private final long offset;
private long pos; | @Test
public void testRemoveLast() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/SkippingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.SkippingIterator",
"be_test_function_name": "init",
"be_test_function_signature": "()V",
"line_numbers": [
"66",
"67",
"69... | |
public class DatasetUtilitiesTests extends TestCase | public void testBug2849731_2() {
XYIntervalSeriesCollection d = new XYIntervalSeriesCollection();
XYIntervalSeries s = new XYIntervalSeries("S1");
s.add(1.0, Double.NaN, Double.NaN, Double.NaN, 1.5, Double.NaN);
d.addSeries(s);
Range r = DatasetUtilities.iterateDomainBounds(d... | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | tests/org/jfree/data/general/junit/DatasetUtilitiesTests.java | package org.jfree.data.general;
import org.jfree.data.pie.PieDataset;
import org.jfree.data.pie.DefaultPieDataset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.util.ArrayUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.KeyToGroupMap;
import org.... | private DatasetUtilities();
public static double calculatePieDatasetTotal(PieDataset dataset);
public static PieDataset createPieDatasetForRow(CategoryDataset dataset,
Comparable rowKey);
public static PieDataset createPieDatasetForRow(CategoryDataset ... | 1,287 | testBug2849731_2 | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | 1,269 | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | /**
* Another test for bug 2849731.
*/
// }
// DatasetUtilities.iterateRangeBounds(d));
// assertEquals(new Range(2.0, 4.0),
// d.addItem(4.0, 0.0, 0.0, "R2", "C1");
// d.addItem(2.5, 2.0, 3.0, "R1", "C1");
// TestIntervalCategoryDataset d = new TestInte... | 1 | org.jfree.data.general.DatasetUtilities | tests | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | public final class DatasetUtilities | package org.jfree.data.general.junit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.data.KeyToGroupMap;
import org.jfree.data.Range;
import org.jfree.dat... | public static Test suite();
public DatasetUtilitiesTests(String name);
public void testJava();
public void testCalculatePieDatasetTotal();
public void testFindDomainBounds();
public void testFindDomainBounds2();
public void testFindDomainBounds3();
public void testFindDomainBounds_NaN();... | 8bab93c095240f70ef535e3a25901d7efccad29613c19abb9bfd1aa3d7a33dba | [
"org.jfree.data.general.junit.DatasetUtilitiesTests::testBug2849731_2"
] | public void testBug2849731_2() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/general/DatasetUtilities.java",
"be_test_class_name": "org.jfree.data.general.DatasetUtilities",
"be_test_function_name": "iterateDomainBounds",
"be_test_function_signature": "(Lorg/jfree/data/xy/XYDataset;)Lorg/jfree/data/Range;",
"line_numbers": [
... | ||
public class NumberAxisTests extends TestCase | public void testAutoRange4() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.setValue(100.0, "Row 1", "Column 1");
dataset.setValue(200.0, "Row 1", "Column 2");
JFreeChart chart = ChartFactory.createBarChart("Test", "Categories",
"Value", data... | // import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.RectangleEdge;
// import org.jfree.chart.util.RectangleInsets;
// import org.jfree.data.Range;
// import org.jfree.data.RangeType;
//
//
//
// public class NumberAxis extends ValueAxis implements Cloneable, Serializable {
// private s... | tests/org/jfree/chart/axis/junit/NumberAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import jav... | public NumberAxis();
public NumberAxis(String label);
public RangeType getRangeType();
public void setRangeType(RangeType rangeType);
public boolean getAutoRangeIncludesZero();
public void setAutoRangeIncludesZero(boolean flag);
public boolean getAutoRangeStickyZero();
public void setAutoRangeSt... | 329 | testAutoRange4 | ```java
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.RectangleEdge;
import org.jfree.chart.util.RectangleInsets;
import org.jfree.data.Range;
import org.jfree.data.RangeType;
public class NumberAxis extends ValueAxis implements Cloneable, Serializable {
private static final long seria... | 288 | // import org.jfree.chart.util.ObjectUtilities;
// import org.jfree.chart.util.RectangleEdge;
// import org.jfree.chart.util.RectangleInsets;
// import org.jfree.data.Range;
// import org.jfree.data.RangeType;
//
//
//
// public class NumberAxis extends ValueAxis implements Cloneable, Serializable {
// private s... | /**
* A check for the interaction between the 'autoRangeIncludesZero' flag
* and the base setting in the BarRenderer.
*/ | 1 | org.jfree.chart.axis.NumberAxis | tests | ```java
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.RectangleEdge;
import org.jfree.chart.util.RectangleInsets;
import org.jfree.data.Range;
import org.jfree.data.RangeType;
public class NumberAxis extends ValueAxis implements Cloneable, Serializable {
private static final long seria... | public class NumberAxis extends ValueAxis implements Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.geom.Rectangle2D;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.DecimalFormat;
import junit.fra... | public static Test suite();
public NumberAxisTests(String name);
public void testCloning();
public void testEquals();
public void testHashCode();
public void testTranslateJava2DToValue();
public void testSerialization();
public void testAutoRange1();
public void testAutoRange2();
... | 8be2289383de597004f2938a167f7fa5b2d2affee68d46b1789322caf5cd63f0 | [
"org.jfree.chart.axis.junit.NumberAxisTests::testAutoRange4"
] | private static final long serialVersionUID = 2805933088476185789L;
public static final boolean DEFAULT_AUTO_RANGE_INCLUDES_ZERO = true;
public static final boolean DEFAULT_AUTO_RANGE_STICKY_ZERO = true;
public static final NumberTickUnit DEFAULT_TICK_UNIT = new NumberTickUnit(
1.0, new DecimalFo... | public void testAutoRange4() | private static final double EPSILON = 0.0000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/NumberAxis.java",
"be_test_class_name": "org.jfree.chart.axis.NumberAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"426",
"427",
"428",
"431",
"432",
"434"... | |
public class HypergeometricDistributionTest extends IntegerDistributionAbstractTest | @Test
public void testDegenerateNoFailures() {
HypergeometricDistribution dist = new HypergeometricDistribution(5,5,3);
setDistribution(dist);
setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
setCumulativeTestValues(new double[] {0d, 0d, 0d, 1d, 1d});
setDensityTest... | // // Abstract Java Tested Class
// package org.apache.commons.math3.distribution;
//
// import org.apache.commons.math3.exception.NotPositiveException;
// import org.apache.commons.math3.exception.NotStrictlyPositiveException;
// import org.apache.commons.math3.exception.NumberIsTooLargeException;
// import org.apach... | src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java | package org.apache.commons.math3.distribution;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NumberIsTooLargeException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
im... | public HypergeometricDistribution(int populationSize, int numberOfSuccesses, int sampleSize)
throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException;
public HypergeometricDistribution(RandomGenerator rng,
int populationSize,
... | 101 | testDegenerateNoFailures | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.distribution;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NumberIsTooLargeException;
import org.apache.commons.mat... | 86 | // // Abstract Java Tested Class
// package org.apache.commons.math3.distribution;
//
// import org.apache.commons.math3.exception.NotPositiveException;
// import org.apache.commons.math3.exception.NotStrictlyPositiveException;
// import org.apache.commons.math3.exception.NumberIsTooLargeException;
// import org.apach... | /** Verify that if there are no failures, mass is concentrated on sampleSize */
//-------------------- Additional test cases ------------------------------ | 1 | org.apache.commons.math3.distribution.HypergeometricDistribution | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.distribution;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NumberIsTooLargeException;
import org.apache.commons.mat... | public class HypergeometricDistribution extends AbstractIntegerDistribution | package org.apache.commons.math3.distribution;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.exception.NotPositiveException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NumberIsTooLargeException;
import org.apache.common... | @Override
public IntegerDistribution makeDistribution();
@Override
public int[] makeDensityTestPoints();
@Override
public double[] makeDensityTestValues();
@Override
public int[] makeCumulativeTestPoints();
@Override
public double[] makeCumulativeTestValues();
@Override
p... | 8d3483cdda44403cfe04cfbe9aa2bbfab50dd771789967799f35c402c24f62c8 | [
"org.apache.commons.math3.distribution.HypergeometricDistributionTest::testDegenerateNoFailures"
] | private static final long serialVersionUID = -436928820673516179L;
private final int numberOfSuccesses;
private final int populationSize;
private final int sampleSize;
private double numericalVariance = Double.NaN;
private boolean numericalVarianceIsCalculated = false; | @Test
public void testDegenerateNoFailures() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/distribution/HypergeometricDistribution.java",
"be_test_class_name": "org.apache.commons.math3.distribution.HypergeometricDistribution",
"be_test_function_name": "calculateNumericalVariance",
"be_test_function_signature": "()D",
"line_numbers": [... | ||
public class SimplexSolverTest | @Test
public void testModelWithNoArtificialVars() {
LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { 15, 10 }, 0);
Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>();
constraints.add(new LinearConstraint(new double[] { 1, 0 }, Relationship.... | // // Abstract Java Tested Class
// package org.apache.commons.math3.optim.linear;
//
// import java.util.ArrayList;
// import java.util.List;
// import org.apache.commons.math3.exception.TooManyIterationsException;
// import org.apache.commons.math3.optim.PointValuePair;
// import org.apache.commons.math3.util.Precis... | src/test/java/org/apache/commons/math3/optim/linear/SimplexSolverTest.java | package org.apache.commons.math3.optim.linear;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.exception.TooManyIterationsException;
import org.apache.commons.math3.optim.PointValuePair;
import org.apache.commons.math3.util.Precision;
| public SimplexSolver();
public SimplexSolver(final double epsilon);
public SimplexSolver(final double epsilon, final int maxUlps);
public SimplexSolver(final double epsilon, final int maxUlps, final double cutOff);
private Integer getPivotColumn(SimplexTableau tableau);
private Integer getPivotR... | 477 | testModelWithNoArtificialVars | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optim.linear;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.exception.TooManyIterationsException;
import org.apache.commons.math3.optim.PointValuePair;
import org.apache.commons.math3.util.Precision;
public c... | 463 | // // Abstract Java Tested Class
// package org.apache.commons.math3.optim.linear;
//
// import java.util.ArrayList;
// import java.util.List;
// import org.apache.commons.math3.exception.TooManyIterationsException;
// import org.apache.commons.math3.optim.PointValuePair;
// import org.apache.commons.math3.util.Precis... | /**
* With no artificial variables needed (no equals and no greater than
* constraints) we can go straight to Phase 2.
*/ | 1 | org.apache.commons.math3.optim.linear.SimplexSolver | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.optim.linear;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math3.exception.TooManyIterationsException;
import org.apache.commons.math3.optim.PointValuePair;
import org.apache.commons.math3.util.Precision;
public c... | public class SimplexSolver extends LinearOptimizer | package org.apache.commons.math3.optim.linear;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.commons.math3.optim.MaxIter;
import org.apache.commons.math3.optim.nonlinear.scalar.GoalType;
import org.apache.commons.math3.optim.PointValuePair;
import org.apache.commons.... | @Test
public void testMath828();
@Test
public void testMath828Cycle();
@Test
public void testMath781();
@Test
public void testMath713NegativeVariable();
@Test
public void testMath434NegativeVariable();
@Test(expected = NoFeasibleSolutionException.class)
public void testMath434Unfeasi... | 93b96a9cfc5f2a11892e28d29632c7b5d38a5a0e1cd31b654412ee6958484b25 | [
"org.apache.commons.math3.optim.linear.SimplexSolverTest::testModelWithNoArtificialVars"
] | static final int DEFAULT_ULPS = 10;
static final double DEFAULT_CUT_OFF = 1e-12;
private static final double DEFAULT_EPSILON = 1.0e-6;
private final double epsilon;
private final int maxUlps;
private final double cutOff; | @Test
public void testModelWithNoArtificialVars() | private static final MaxIter DEFAULT_MAX_ITER = new MaxIter(100); | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/optim/linear/SimplexSolver.java",
"be_test_class_name": "org.apache.commons.math3.optim.linear.SimplexSolver",
"be_test_function_name": "doIteration",
"be_test_function_signature": "(Lorg/apache/commons/math3/optim/linear/SimplexTableau;)V",
"lin... | |
public class ZipArchiveInputStreamTest | @Test
public void testWithBytesAfterData() throws Exception {
final int expectedNumEntries = 2;
final InputStream is = ZipArchiveInputStreamTest.class
.getResourceAsStream("/archive_with_bytes_after_data.zip");
final ZipArchiveInputStream zip = new ZipArchiveInputStream(i... | // private static final int LFH_LEN = 30;
// private static final int CFH_LEN = 46;
// private static final long TWO_EXP_32 = ZIP64_MAGIC + 1;
// private final byte[] lfhBuf = new byte[LFH_LEN];
// private final byte[] skipBuf = new byte[1024];
// private final byte[] shortBuf = new byte[SHORT];... | src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java | package org.apache.commons.compress.archivers.zip;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.nio.ByteBuffer;
import java.util.zip.CRC32;
import java.util... | public ZipArchiveInputStream(final InputStream inputStream);
public ZipArchiveInputStream(final InputStream inputStream, final String encoding);
public ZipArchiveInputStream(final InputStream inputStream, final String encoding, final boolean useUnicodeExtraFields);
public ZipArchiveInputStream(final Inp... | 268 | testWithBytesAfterData | ```java
private static final int LFH_LEN = 30;
private static final int CFH_LEN = 46;
private static final long TWO_EXP_32 = ZIP64_MAGIC + 1;
private final byte[] lfhBuf = new byte[LFH_LEN];
private final byte[] skipBuf = new byte[1024];
private final byte[] shortBuf = new byte[SHORT];
priva... | 249 | // private static final int LFH_LEN = 30;
// private static final int CFH_LEN = 46;
// private static final long TWO_EXP_32 = ZIP64_MAGIC + 1;
// private final byte[] lfhBuf = new byte[LFH_LEN];
// private final byte[] skipBuf = new byte[1024];
// private final byte[] shortBuf = new byte[SHORT];... | /**
* Test case for
* <a href="https://issues.apache.org/jira/browse/COMPRESS-364"
* >COMPRESS-364</a>.
*/ | 47 | org.apache.commons.compress.archivers.zip.ZipArchiveInputStream | src/test/java | ```java
private static final int LFH_LEN = 30;
private static final int CFH_LEN = 46;
private static final long TWO_EXP_32 = ZIP64_MAGIC + 1;
private final byte[] lfhBuf = new byte[LFH_LEN];
private final byte[] skipBuf = new byte[1024];
private final byte[] shortBuf = new byte[SHORT];
priva... | public class ZipArchiveInputStream extends ArchiveInputStream | package org.apache.commons.compress.archivers.zip;
import static org.apache.commons.compress.AbstractTestCase.getFile;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.... | @Test
public void winzipBackSlashWorkaround() throws Exception;
@Test
public void properUseOfInflater() throws Exception;
@Test
public void shouldConsumeArchiveCompletely() throws Exception;
@Test
public void shouldReadNestedZip() throws IOException;
private void extractZipInputStrea... | 93ba1fa9a4f1f81b503c40bc0a0e62db14102b6db03d603fd47678f68451737d | [
"org.apache.commons.compress.archivers.zip.ZipArchiveInputStreamTest::testWithBytesAfterData"
] | private final ZipEncoding zipEncoding;
final String encoding;
private final boolean useUnicodeExtraFields;
private final InputStream in;
private final Inflater inf = new Inflater(true);
private final ByteBuffer buf = ByteBuffer.allocate(ZipArchiveOutputStream.BUFFER_SIZE);
private CurrentEnt... | @Test
public void testWithBytesAfterData() throws Exception | Compress | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you... | [
{
"be_test_class_file": "org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java",
"be_test_class_name": "org.apache.commons.compress.archivers.zip.ZipArchiveInputStream",
"be_test_function_name": "close",
"be_test_function_signature": "()V",
"line_numbers": [
"554",
"55... | ||
public class ExternExportsPassTest extends TestCase | public void testExportDontEmitPrototypePathPrefix() {
compileAndCheck(
"/**\n" +
" * @constructor\n" +
" */\n" +
"var Foo = function() {};" +
"/**\n" +
" * @return {number}\n" +
" */\n" +
"Foo.prototype.m = function() {return 6;};\n" +
"goog.... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Joiner;
// import com.google.common.base.Preconditions;
// import com.google.common.collect.Iterables;
// import com.google.common.collect.Lists;
// import com.google.common.collect.Maps;
// import com.google.... | test/com/google/javascript/jscomp/ExternExportsPassTest.java | package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.javascript.rhino.I... | ExternExportsPass(AbstractCompiler compiler);
private void initExportMethods();
@Override
public void process(Node externs, Node root);
public String getGeneratedExterns();
@Override
public void visit(NodeTraversal t, Node n, Node parent);
private void handleSymbolExport(Node parent);
private void han... | 401 | testExportDontEmitPrototypePathPrefix | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets... | 380 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp;
//
// import com.google.common.base.Joiner;
// import com.google.common.base.Preconditions;
// import com.google.common.collect.Iterables;
// import com.google.common.collect.Lists;
// import com.google.common.collect.Maps;
// import com.google.... | /** If we export a property with "prototype" as a path component, there
* is no need to emit the initializer for prototype because every namespace
* has one automatically.
*/ | 107 | com.google.javascript.jscomp.ExternExportsPass | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets... | final class ExternExportsPass extends NodeTraversal.AbstractPostOrderCallback
implements CompilerPass | package com.google.javascript.jscomp;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import junit.framework.TestCase;
import java.util.List;
| private void setRunCheckTypes(boolean shouldRunCheckTypes);
@Override
public void setUp() throws Exception;
public void testExportSymbol() throws Exception;
public void testExportSymbolDefinedInVar() throws Exception;
public void testExportProperty() throws Exception;
public void testExportMultiple() thro... | 977ca7d0d687ad1ab5c801e56266c863076ab04fd72b3ba27a266bd4a1335f58 | [
"com.google.javascript.jscomp.ExternExportsPassTest::testExportDontEmitPrototypePathPrefix"
] | private final List<Export> exports;
private final Map<String, Node> definitionMap;
private final AbstractCompiler compiler;
private final Node externsRoot;
private final Map<String, String> mappedPaths;
private final Set<String> alreadyExportedPaths;
private List<String> exportSymbolFunctionNames;
priva... | public void testExportDontEmitPrototypePathPrefix() | private boolean runCheckTypes = true; | Closure | /*
* Copyright 2009 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/ExternExportsPass.java",
"be_test_class_name": "com.google.javascript.jscomp.ExternExportsPass",
"be_test_function_name": "access$400",
"be_test_function_signature": "(Lcom/google/javascript/jscomp/ExternExportsPass;)Ljava/util/Map;",
"line_n... | |
public class JsFunctionParserTest extends TestCase | public void testParseFile() {
final String CONTENTS = "/*"
+ "goog.provide('no1');*//*\n"
+ "goog.provide('no2');\n"
+ "*/goog.provide('yes1');\n"
+ "/* blah */goog.provide(\"yes2\")/* blah*/\n"
+ "goog.require('yes3'); // goog.provide('no3');\n"
+ "// goog.provide('no4');\n"
... | // // Abstract Java Tested Class
// package com.google.javascript.jscomp.deps;
//
// import com.google.common.base.CharMatcher;
// import com.google.common.collect.Lists;
// import com.google.javascript.jscomp.ErrorManager;
// import java.io.Reader;
// import java.io.StringReader;
// import java.util.Collection;
// im... | test/com/google/javascript/jscomp/deps/JsFunctionParserTest.java | package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.Reader;
import java.io.StringReader;
import java.util.Collection;
import java.util.logging.Logger;
import java.util.regex.Matche... | public JsFunctionParser(
Collection<String> functions, ErrorManager errorManager);
private Pattern getPattern(Collection<String> functions);
public Collection<SymbolInfo> parseFile(
String filePath, String fileContents);
private Collection<SymbolInfo> parseReader(
String filePath, Reader fileC... | 89 | testParseFile | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.Reader;
import java.io.StringReader;
import java.util.Collection;
import java.util.logging... | 54 | // // Abstract Java Tested Class
// package com.google.javascript.jscomp.deps;
//
// import com.google.common.base.CharMatcher;
// import com.google.common.collect.Lists;
// import com.google.javascript.jscomp.ErrorManager;
// import java.io.Reader;
// import java.io.StringReader;
// import java.util.Collection;
// im... | /**
* Tests:
* -Parsing of comments,
* -Parsing of different styles of quotes,
* -Correct recording of what was parsed.
*/ | 107 | com.google.javascript.jscomp.deps.JsFunctionParser | test | ```java
// Abstract Java Tested Class
package com.google.javascript.jscomp.deps;
import com.google.common.base.CharMatcher;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import java.io.Reader;
import java.io.StringReader;
import java.util.Collection;
import java.util.logging... | public class JsFunctionParser extends JsFileLineParser | package com.google.javascript.jscomp.deps;
import com.google.common.collect.Lists;
import com.google.javascript.jscomp.ErrorManager;
import com.google.javascript.jscomp.PrintStreamErrorManager;
import com.google.javascript.jscomp.deps.JsFunctionParser.SymbolInfo;
import junit.framework.TestCase;
import java.util.Colle... | @Override
public void setUp();
public void testParseFile();
public void testMultiplePerLine();
public void testShortcutMode1();
public void testShortcutMode2();
public void testShortcutMode3(); | 99d67dcd9dc6ba33d143b73442aba6ea02f52d25ed6c1ee91d51d1b6f4117a87 | [
"com.google.javascript.jscomp.deps.JsFunctionParserTest::testParseFile"
] | private static Logger logger =
Logger.getLogger(JsFunctionParser.class.getName());
private Pattern pattern;
private Matcher matcher;
private Collection<SymbolInfo> symbols;
private Collection<String> functionsToParse; | public void testParseFile() | private static final String SRC_PATH = "a";
private JsFunctionParser parser;
private ErrorManager errorManager;
private Collection<String> functions = Lists.newArrayList(
"goog.require", "goog.provide"); | Closure | /*
* Copyright 2008 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "com/google/javascript/jscomp/deps/JsFunctionParser.java",
"be_test_class_name": "com.google.javascript.jscomp.deps.JsFunctionParser",
"be_test_function_name": "getPattern",
"be_test_function_signature": "(Ljava/util/Collection;)Ljava/util/regex/Pattern;",
"line_numbers":... | |
public class LoopingIteratorTest extends TestCase | public void testLooping3() throws Exception {
final List<String> list = Arrays.asList("a", "b", "c");
final LoopingIterator<String> loop = new LoopingIterator<String>(list);
assertTrue("1st hasNext should return true", loop.hasNext());
assertEquals("a", loop.next());
assert... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | src/test/java/org/apache/commons/collections4/iterators/LoopingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
| public LoopingIterator(final Collection<? extends E> coll);
@Override
public boolean hasNext();
@Override
public E next();
@Override
public void remove();
@Override
public void reset();
public int size(); | 117 | testLooping3 | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | 101 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | /**
* Tests whether a populated looping iterator works as designed.
* @throws Exception If something unexpected occurs.
*/ | 28 | org.apache.commons.collections4.iterators.LoopingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | public class LoopingIterator<E> implements ResettableIterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.TestCase;
| public void testConstructorEx() throws Exception;
public void testLooping0() throws Exception;
public void testLooping1() throws Exception;
public void testLooping2() throws Exception;
public void testLooping3() throws Exception;
public void testRemoving1() throws Exception;
public void test... | 9bfabda7b9ab559a6b146bd0bfde4724362c5854b60db0dd8e0ec87e84793f73 | [
"org.apache.commons.collections4.iterators.LoopingIteratorTest::testLooping3"
] | private final Collection<? extends E> collection;
private Iterator<? extends E> iterator; | public void testLooping3() throws Exception | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/LoopingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.LoopingIterator",
"be_test_function_name": "hasNext",
"be_test_function_signature": "()Z",
"line_numbers": [
"72"
],
"method_li... | ||
public class XYPlotTests extends TestCase | public void testSerialization3() {
XYSeriesCollection dataset = new XYSeriesCollection();
JFreeChart chart = ChartFactory.createXYLineChart("Test Chart",
"Domain Axis", "Range Axis", dataset, true);
JFreeChart chart2 = null;
// serialize and deserialize the chart..... | // public AxisSpace getFixedRangeAxisSpace();
// public void setFixedRangeAxisSpace(AxisSpace space);
// public void setFixedRangeAxisSpace(AxisSpace space, boolean notify);
// public boolean isDomainPannable();
// public void setDomainPannable(boolean pannable);
// public boolean isRangePannabl... | tests/org/jfree/chart/plot/junit/XYPlotTests.java | package org.jfree.chart.plot;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.geo... | public XYPlot();
public XYPlot(XYDataset dataset,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYItemRenderer renderer);
public String getPlotType();
public PlotOrientation getOrientation();
public void setOrientation(PlotOrientation orientation);
... | 809 | testSerialization3 | ```java
public AxisSpace getFixedRangeAxisSpace();
public void setFixedRangeAxisSpace(AxisSpace space);
public void setFixedRangeAxisSpace(AxisSpace space, boolean notify);
public boolean isDomainPannable();
public void setDomainPannable(boolean pannable);
public boolean isRangePannable();
p... | 775 | // public AxisSpace getFixedRangeAxisSpace();
// public void setFixedRangeAxisSpace(AxisSpace space);
// public void setFixedRangeAxisSpace(AxisSpace space, boolean notify);
// public boolean isDomainPannable();
// public void setDomainPannable(boolean pannable);
// public boolean isRangePannabl... | /**
* Problem to reproduce a bug in serialization. The bug (first reported
* against the {@link org.jfree.chart.plot.CategoryPlot} class) is a null
* pointer exception that occurs when drawing a plot after deserialization.
* It is caused by four temporary storage structures (axesAtTop,
* a... | 1 | org.jfree.chart.plot.XYPlot | tests | ```java
public AxisSpace getFixedRangeAxisSpace();
public void setFixedRangeAxisSpace(AxisSpace space);
public void setFixedRangeAxisSpace(AxisSpace space, boolean notify);
public boolean isDomainPannable();
public void setDomainPannable(boolean pannable);
public boolean isRangePannable();
p... | public class XYPlot extends Plot implements ValueAxisPlot, Pannable,
Selectable, Zoomable, RendererChangeListener, Cloneable,
PublicCloneable, Serializable | package org.jfree.chart.plot.junit;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.Stroke;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import jav... | public static Test suite();
public XYPlotTests(String name);
public void testEquals();
public void testCloning();
public void testCloning2();
public void testCloning3();
public void testCloning4();
public void testCloning_QuadrantOrigin();
public void testCloning_QuadrantPaint();
... | 9cb0c26f4385d15232f549a6cdba139f0cb0772e2cc26ea829f6522440e32209 | [
"org.jfree.chart.plot.junit.XYPlotTests::testSerialization3"
] | private static final long serialVersionUID = 7044148245716569264L;
public static final Stroke DEFAULT_GRIDLINE_STROKE = new BasicStroke(0.5f,
BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0.0f,
new float[] {2.0f, 2.0f}, 0.0f);
public static final Paint DEFAULT_GRIDLINE_PAINT = Color.... | public void testSerialization3() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/plot/XYPlot.java",
"be_test_class_name": "org.jfree.chart.plot.XYPlot",
"be_test_function_name": "calculateAxisSpace",
"be_test_function_signature": "(Ljava/awt/Graphics2D;Ljava/awt/geom/Rectangle2D;)Lorg/jfree/chart/axis/AxisSpace;",
"line_numbers": [
... | ||
public class ZipFileTest | @Test
public void testReadingOfFirstStoredEntry() throws Exception {
final File archive = getFile("COMPRESS-264.zip");
zf = new ZipFile(archive);
final ZipArchiveEntry ze = zf.getEntry("test.txt");
assertEquals(5, ze.getSize());
assertArrayEquals(new byte[] {'d', 'a', 't'... | // public InputStream getInputStream(final ZipArchiveEntry ze)
// throws IOException, ZipException;
// public String getUnixSymlink(final ZipArchiveEntry entry) throws IOException;
// @Override
// protected void finalize() throws Throwable;
// private Map<ZipArchiveEntry, NameAndComment> pop... | src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java | package org.apache.commons.compress.archivers.zip;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableB... | public ZipFile(final File f) throws IOException;
public ZipFile(final String name) throws IOException;
public ZipFile(final String name, final String encoding) throws IOException;
public ZipFile(final File f, final String encoding) throws IOException;
public ZipFile(final File f, final String encodi... | 328 | testReadingOfFirstStoredEntry | ```java
public InputStream getInputStream(final ZipArchiveEntry ze)
throws IOException, ZipException;
public String getUnixSymlink(final ZipArchiveEntry entry) throws IOException;
@Override
protected void finalize() throws Throwable;
private Map<ZipArchiveEntry, NameAndComment> populateFromC... | 320 | // public InputStream getInputStream(final ZipArchiveEntry ze)
// throws IOException, ZipException;
// public String getUnixSymlink(final ZipArchiveEntry entry) throws IOException;
// @Override
// protected void finalize() throws Throwable;
// private Map<ZipArchiveEntry, NameAndComment> pop... | /**
* Test case for
* <a href="https://issues.apache.org/jira/browse/COMPRESS-264"
* >COMPRESS-264</a>.
*/ | 47 | org.apache.commons.compress.archivers.zip.ZipFile | src/test/java | ```java
public InputStream getInputStream(final ZipArchiveEntry ze)
throws IOException, ZipException;
public String getUnixSymlink(final ZipArchiveEntry entry) throws IOException;
@Override
protected void finalize() throws Throwable;
private Map<ZipArchiveEntry, NameAndComment> populateFromC... | public class ZipFile implements Closeable | package org.apache.commons.compress.archivers.zip;
import static org.apache.commons.compress.AbstractTestCase.getFile;
import static org.junit.Assert.*;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io... | @After
public void tearDown();
@Test
public void testCDOrder() throws Exception;
@Test
public void testCDOrderInMemory() throws Exception;
@Test
public void testPhysicalOrder() throws Exception;
@Test
public void testDoubleClose() throws Exception;
@Test
public void testR... | 9cca185a22be26faf343d59c734f865f78f3897e6a397fccf723778d00fce0d8 | [
"org.apache.commons.compress.archivers.zip.ZipFileTest::testReadingOfFirstStoredEntry"
] | private static final int HASH_SIZE = 509;
static final int NIBLET_MASK = 0x0f;
static final int BYTE_SHIFT = 8;
private static final int POS_0 = 0;
private static final int POS_1 = 1;
private static final int POS_2 = 2;
private static final int POS_3 = 3;
private final List<ZipArchiveEnt... | @Test
public void testReadingOfFirstStoredEntry() throws Exception | private ZipFile zf = null; | Compress | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you... | [
{
"be_test_class_file": "org/apache/commons/compress/archivers/zip/ZipFile.java",
"be_test_class_name": "org.apache.commons.compress.archivers.zip.ZipFile",
"be_test_function_name": "access$300",
"be_test_function_signature": "(Lorg/apache/commons/compress/archivers/zip/ZipFile;)Ljava/nio/channels/S... | |
public class JSTypeTest extends BaseJSTypeTestCase | public void testCreateObjectType() throws Exception {
// simple
ObjectType subDate =
registry.createObjectType(DATE_TYPE.getImplicitPrototype());
assertTypeEquals(DATE_TYPE.getImplicitPrototype(),
subDate.getImplicitPrototype());
assertNull(subDate.getReferenceName());
assertEquals... | // public void testRecordTypeGreatestSubType8();
// public void testApplyOfDateMethod();
// public void testCallOfDateMethod();
// public void testFunctionTypeRepresentation();
// public void testFunctionTypeRelationships();
// public void testProxiedFunctionTypeRelationships();
// public void testFunctio... | test/com/google/javascript/rhino/jstype/JSTypeTest.java | package com.google.javascript.rhino.jstype;
import static com.google.javascript.rhino.jstype.TernaryValue.UNKNOWN;
import com.google.common.base.Predicate;
import com.google.javascript.rhino.ErrorReporter;
import com.google.javascript.rhino.JSDocInfo;
import java.io.Serializable;
import java.util.Comparator;
| JSType(JSTypeRegistry registry);
JSType(JSTypeRegistry registry, TemplateTypeMap templateTypeMap);
JSType getNativeType(JSTypeNative typeId);
public JSDocInfo getJSDocInfo();
public String getDisplayName();
public boolean hasDisplayName();
public boolean hasProperty(String pname);
public boolean isNoTyp... | 5,891 | testCreateObjectType | ```java
public void testRecordTypeGreatestSubType8();
public void testApplyOfDateMethod();
public void testCallOfDateMethod();
public void testFunctionTypeRepresentation();
public void testFunctionTypeRelationships();
public void testProxiedFunctionTypeRelationships();
public void testFunctionSubTypeRelat... | 5,876 | // public void testRecordTypeGreatestSubType8();
// public void testApplyOfDateMethod();
// public void testCallOfDateMethod();
// public void testFunctionTypeRepresentation();
// public void testFunctionTypeRelationships();
// public void testProxiedFunctionTypeRelationships();
// public void testFunctio... | /**
* Tests the factory methods
* {@link JSTypeRegistry#createObjectType(ObjectType)}} and
* {@link JSTypeRegistry#createObjectType(String, Node, ObjectType)}}.
*/ | 107 | com.google.javascript.rhino.jstype.JSType | test | ```java
public void testRecordTypeGreatestSubType8();
public void testApplyOfDateMethod();
public void testCallOfDateMethod();
public void testFunctionTypeRepresentation();
public void testFunctionTypeRelationships();
public void testProxiedFunctionTypeRelationships();
public void testFunctionSubTypeRelat... | public abstract class JSType implements Serializable | package com.google.javascript.rhino.jstype;
import static com.google.javascript.rhino.jstype.TernaryValue.FALSE;
import static com.google.javascript.rhino.jstype.TernaryValue.TRUE;
import static com.google.javascript.rhino.jstype.TernaryValue.UNKNOWN;
import com.google.common.collect.ImmutableList;
import com.google.c... | @Override
protected void setUp() throws Exception;
public void testUniversalConstructorType() throws Exception;
public void testNoObjectType() throws Exception;
public void testNoType() throws Exception;
public void testNoResolvedType() throws Exception;
public void testArrayType() throws Exception;
pub... | 9d328c05ab6a9fef88d673b6820f76da94fb8130c2b057ca141dfa10f3aa11a3 | [
"com.google.javascript.rhino.jstype.JSTypeTest::testCreateObjectType"
] | private static final long serialVersionUID = 1L;
private boolean resolved = false;
private JSType resolveResult = null;
protected TemplateTypeMap templateTypeMap;
private boolean inTemplatedCheckVisit = false;
private static final CanCastToVisitor CAN_CAST_TO_VISITOR =
new CanCastToVisitor();
public... | public void testCreateObjectType() throws Exception | private FunctionType dateMethod;
private FunctionType functionType;
private NamedType unresolvedNamedType;
private FunctionType googBar;
private FunctionType googSubBar;
private FunctionType googSubSubBar;
private ObjectType googBarInst;
private ObjectType googSubBarInst;
private ObjectType googSubSub... | Closure | /*
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* ... | [
{
"be_test_class_file": "com/google/javascript/rhino/jstype/JSType.java",
"be_test_class_name": "com.google.javascript.rhino.jstype.JSType",
"be_test_function_name": "checkEquivalenceHelper",
"be_test_function_signature": "(Lcom/google/javascript/rhino/jstype/JSType;Lcom/google/javascript/rhino/jsty... | |
public class TimedSemaphoreTest | @Test
public void testAcquireMultipleThreads() throws InterruptedException {
final ScheduledExecutorService service = EasyMock
.createMock(ScheduledExecutorService.class);
final ScheduledFuture<?> future = EasyMock.createMock(ScheduledFuture.class);
prepareStartTimer(serv... | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.concurrent.ScheduledExecutorService;
// import java.util.concurrent.ScheduledFuture;
// import java.util.concurrent.ScheduledThreadPoolExecutor;
// import java.util.concurrent.TimeUnit;
//
//
//
// public class T... | src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java | package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
| public TimedSemaphore(final long timePeriod, final TimeUnit timeUnit, final int limit);
public TimedSemaphore(final ScheduledExecutorService service, final long timePeriod,
final TimeUnit timeUnit, final int limit);
public final synchronized int getLimit();
public final synchronized void set... | 267 | testAcquireMultipleThreads | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class TimedSemaphore {
publ... | 239 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.concurrent;
//
// import java.util.concurrent.ScheduledExecutorService;
// import java.util.concurrent.ScheduledFuture;
// import java.util.concurrent.ScheduledThreadPoolExecutor;
// import java.util.concurrent.TimeUnit;
//
//
//
// public class T... | /**
* Tests the acquire() method if more threads are involved than the limit.
* This method starts a number of threads that all invoke the semaphore. The
* semaphore's limit is set to 1, so in each period only a single thread can
* acquire the semaphore.
*/ | 1 | org.apache.commons.lang3.concurrent.TimedSemaphore | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.concurrent;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class TimedSemaphore {
publ... | public class TimedSemaphore | package org.apache.commons.lang3.concurrent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.concurrent.CountDownLatch;
import java.uti... | @Test
public void testInit();
@Test(expected = IllegalArgumentException.class)
public void testInitInvalidPeriod();
@Test
public void testInitDefaultService();
@Test
public void testStartTimer() throws InterruptedException;
@Test
public void testShutdownOwnExecutor();
@Test
... | 9f1a6f88a0e2784b1644af328ff5707fce1a0600523ba04f890589d5833d4b46 | [
"org.apache.commons.lang3.concurrent.TimedSemaphoreTest::testAcquireMultipleThreads"
] | public static final int NO_LIMIT = 0;
private static final int THREAD_POOL_SIZE = 1;
private final ScheduledExecutorService executorService;
private final long period;
private final TimeUnit unit;
private final boolean ownExecutor;
private ScheduledFuture<?> task;
private long totalAcqui... | @Test
public void testAcquireMultipleThreads() throws InterruptedException | private static final long PERIOD = 500;
private static final TimeUnit UNIT = TimeUnit.MILLISECONDS;
private static final int LIMIT = 10; | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/concurrent/TimedSemaphore.java",
"be_test_class_name": "org.apache.commons.lang3.concurrent.TimedSemaphore",
"be_test_function_name": "acquire",
"be_test_function_signature": "()V",
"line_numbers": [
"293",
"294",
"297",
"... | |
public class ExtendedMessageFormatTest | @Test
public void testBuiltInChoiceFormat() {
final Object[] values = new Number[] {Integer.valueOf(1), Double.valueOf("2.2"), Double.valueOf("1234.5")};
String choicePattern = null;
final Locale[] availableLocales = ChoiceFormat.getAvailableLocales();
choicePattern = "{0,choice... | // // Abstract Java Tested Class
// package org.apache.commons.lang3.text;
//
// import java.text.Format;
// import java.text.MessageFormat;
// import java.text.ParsePosition;
// import java.util.ArrayList;
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.Locale;
// import java.util.Ma... | src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java | package org.apache.commons.lang3.text;
import java.text.Format;
import java.text.MessageFormat;
import java.text.ParsePosition;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import org.apache.commons.lang3.ObjectUtils;
import org.apac... | public ExtendedMessageFormat(final String pattern);
public ExtendedMessageFormat(final String pattern, final Locale locale);
public ExtendedMessageFormat(final String pattern, final Map<String, ? extends FormatFactory> registry);
public ExtendedMessageFormat(final String pattern, final Locale locale, fi... | 198 | testBuiltInChoiceFormat | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.text;
import java.text.Format;
import java.text.MessageFormat;
import java.text.ParsePosition;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import org.apache.comm... | 183 | // // Abstract Java Tested Class
// package org.apache.commons.lang3.text;
//
// import java.text.Format;
// import java.text.MessageFormat;
// import java.text.ParsePosition;
// import java.util.ArrayList;
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.Locale;
// import java.util.Ma... | /**
* Test the built in choice format.
*/
// }
// }
// }
// // currently sub-formats not supported
// } catch (IllegalArgumentException e) {
// assertEquals(highExpected, emf.format(highArgs));
// assertEquals(lowExpected, emf.f... | 1 | org.apache.commons.lang3.text.ExtendedMessageFormat | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.lang3.text;
import java.text.Format;
import java.text.MessageFormat;
import java.text.ParsePosition;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import org.apache.comm... | public class ExtendedMessageFormat extends MessageFormat | package org.apache.commons.lang3.text;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
import static org.apache.commons.lang3.JavaVersion.JAVA_1_4;
import java.text.ChoiceFormat;
import java.text.DateFormat;
import java.text.FieldPosition;
import java.text.Format;
import java.text.Mes... | @Before
public void setUp() throws Exception;
@Test
public void testExtendedFormats();
@Test
public void testEscapedQuote_LANG_477();
@Test
public void testExtendedAndBuiltInFormats();
@Test
public void testBuiltInChoiceFormat();
@Test
public void testBuiltInDateTimeForma... | 9f38abb65845d1eee30b3451c58bd495072c16e6e11817f27e5b96159f20abe2 | [
"org.apache.commons.lang3.text.ExtendedMessageFormatTest::testBuiltInChoiceFormat"
] | private static final long serialVersionUID = -2362048321261811743L;
private static final int HASH_SEED = 31;
private static final String DUMMY_PATTERN = "";
private static final String ESCAPED_QUOTE = "''";
private static final char START_FMT = ',';
private static final char END_FE = '}';
pr... | @Test
public void testBuiltInChoiceFormat() | private final Map<String, FormatFactory> registry = new HashMap<String, FormatFactory>(); | Lang | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/lang3/text/ExtendedMessageFormat.java",
"be_test_class_name": "org.apache.commons.lang3.text.ExtendedMessageFormat",
"be_test_function_name": "applyPattern",
"be_test_function_signature": "(Ljava/lang/String;)V",
"line_numbers": [
"146",
"1... | |
public class TestValueInstantiator extends BaseMapTest
| public void testPropertyBasedBeanInstantiator() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new MyModule(CreatorBean.class,
new InstantiatorBase() {
@Override
public boolean canCreateFromObjectWith() {... | // import com.fasterxml.jackson.databind.module.SimpleModule;
// import com.fasterxml.jackson.databind.type.TypeFactory;
//
//
//
// public class TestValueInstantiator extends BaseMapTest
// {
// private final ObjectMapper MAPPER = objectMapper();
//
// public void testCustomBeanInstantiator() throws Excep... | src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java | package com.fasterxml.jackson.databind.deser;
import java.io.IOException;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer;
import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;
import com.fasterxml.jackson.databind.introspect.AnnotatedWithPar... | public Class<?> getValueClass();
public String getValueTypeDesc();
public boolean canInstantiate();
public boolean canCreateFromString();
public boolean canCreateFromInt();
public boolean canCreateFromLong();
public boolean canCreateFromDouble();
public boolean canCreateFromBoolean();
... | 445 | testPropertyBasedBeanInstantiator | ```java
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.type.TypeFactory;
public class TestValueInstantiator extends BaseMapTest
{
private final ObjectMapper MAPPER = objectMapper();
public void testCustomBeanInstantiator() throws Exception;
public void ... | 420 | // import com.fasterxml.jackson.databind.module.SimpleModule;
// import com.fasterxml.jackson.databind.type.TypeFactory;
//
//
//
// public class TestValueInstantiator extends BaseMapTest
// {
// private final ObjectMapper MAPPER = objectMapper();
//
// public void testCustomBeanInstantiator() throws Excep... | /*
/**********************************************************
/* Unit tests for property-based creators
/**********************************************************
*/ | 112 | com.fasterxml.jackson.databind.deser.ValueInstantiator | src/test/java | ```java
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.type.TypeFactory;
public class TestValueInstantiator extends BaseMapTest
{
private final ObjectMapper MAPPER = objectMapper();
public void testCustomBeanInstantiator() throws Exception;
public void ... | public abstract class ValueInstantiator
| package com.fasterxml.jackson.databind.deser.creators;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.JsonValueInstantiator;
impo... | public void testCustomBeanInstantiator() throws Exception;
public void testCustomListInstantiator() throws Exception;
public void testCustomMapInstantiator() throws Exception;
public void testDelegateBeanInstantiator() throws Exception;
public void testDelegateListInstantiator() throws Exception;
... | 9f3cf44b025b3cf4bbeee1b3b2230c6fbcb9f258379c44e70fa3efd390c3da8c | [
"com.fasterxml.jackson.databind.deser.creators.TestValueInstantiator::testPropertyBasedBeanInstantiator"
] | public void testPropertyBasedBeanInstantiator() throws Exception
| private final ObjectMapper MAPPER = objectMapper(); | JacksonDatabind | package com.fasterxml.jackson.databind.deser.creators;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.JsonValueInstantiator;
imp... | [
{
"be_test_class_file": "com/fasterxml/jackson/databind/deser/ValueInstantiator.java",
"be_test_class_name": "com.fasterxml.jackson.databind.deser.ValueInstantiator",
"be_test_function_name": "canCreateUsingArrayDelegate",
"be_test_function_signature": "()Z",
"line_numbers": [
"129"
],... | ||
public class WeekTests extends TestCase | public void testWeek12005() {
Week w1 = new Week(1, 2005);
Calendar c1 = Calendar.getInstance(
TimeZone.getTimeZone("Europe/London"), Locale.UK);
c1.setMinimalDaysInFirstWeek(4); // see Java Bug ID 4960215
assertEquals(1104710400000L, w1.getFirstMillisecond(c1));
... | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Calendar;
// import java.util.Date;
// import java.util.Locale;
// import java.util.TimeZone;
//
//
//
// public class Week extends RegularTimePeriod implements Serializable {
// private stati... | tests/org/jfree/data/time/junit/WeekTests.java | package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
| public Week();
public Week(int week, int year);
public Week(int week, Year year);
public Week(Date time);
public Week(Date time, TimeZone zone);
public Week(Date time, TimeZone zone, Locale locale);
public Year getYear();
public int getYearValue();
public int getWeek();
public long getFirs... | 250 | testWeek12005 | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class Week extends RegularTimePeriod implements Serializable {
private static final long serialVersionUID =... | 234 | // // Abstract Java Tested Class
// package org.jfree.data.time;
//
// import java.io.Serializable;
// import java.util.Calendar;
// import java.util.Date;
// import java.util.Locale;
// import java.util.TimeZone;
//
//
//
// public class Week extends RegularTimePeriod implements Serializable {
// private stati... | /**
* The first week in 2005 should span the range:
*
* TimeZone | Start Millis | End Millis | Start Date | End Date
* -----------------+---------------+---------------+-------------+------------
* Europe/London | 1104710400000 | 1105315199999 | 3-Jan-2005 | 9-Jan-2005
... | 1 | org.jfree.data.time.Week | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.time;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class Week extends RegularTimePeriod implements Serializable {
private static final long serialVersionUID =... | public class Week extends RegularTimePeriod implements Serializable | package org.jfree.data.time.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalenda... | public static Test suite();
public WeekTests(String name);
protected void setUp();
public void testEquals();
public void testW1Y1900Previous();
public void testW1Y1900Next();
public void testW52Y9999Previous();
public void testW52Y9999Next();
public void testSerialization();
publ... | 9f45b7b90decae7f37a9c8ed04acfbcb5013b5e9878c10fc262f99df3cc2a0f7 | [
"org.jfree.data.time.junit.WeekTests::testWeek12005"
] | private static final long serialVersionUID = 1856387786939865061L;
public static final int FIRST_WEEK_IN_YEAR = 1;
public static final int LAST_WEEK_IN_YEAR = 53;
private short year;
private byte week;
private long firstMillisecond;
private long lastMillisecond; | public void testWeek12005() | private Week w1Y1900;
private Week w2Y1900;
private Week w51Y9999;
private Week w52Y9999; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/time/Week.java",
"be_test_class_name": "org.jfree.data.time.Week",
"be_test_function_name": "getFirstMillisecond",
"be_test_function_signature": "(Ljava/util/Calendar;)J",
"line_numbers": [
"385",
"386",
"387",
"388",
"389",
... | |
public class CSVParserTest | @Test
public void testGetOneLineOneParser() throws IOException {
final CSVFormat format = CSVFormat.DEFAULT;
try (final PipedWriter writer = new PipedWriter();
final CSVParser parser = new CSVParser(new PipedReader(writer), format)) {
writer.append(CSV_INPUT_1);
... | // + " \"foo\n,,\n\"\",,\n\"\"\",d,e\n";
// private static final String CSV_INPUT_1 = "a,b,c,d";
// private static final String CSV_INPUT_2 = "a,b,1 2";
// private static final String[][] RESULT = { { "a", "b", "c", "d" }, { "a", "b", "1 2" }, { "foo baar", "b", "" },
// { "foo\n,,... | src/test/java/org/apache/commons/csv/CSVParserTest.java | package org.apache.commons.csv;
import static org.apache.commons.csv.Token.Type.TOKEN;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java... | @SuppressWarnings("resource")
public static CSVParser parse(final File file, final Charset charset, final CSVFormat format) throws IOException;
@SuppressWarnings("resource")
public static CSVParser parse(final InputStream inputStream, final Charset charset, final CSVFormat format)
throws IOE... | 545 | testGetOneLineOneParser | ```java
+ " \"foo\n,,\n\"\",,\n\"\"\",d,e\n";
private static final String CSV_INPUT_1 = "a,b,c,d";
private static final String CSV_INPUT_2 = "a,b,1 2";
private static final String[][] RESULT = { { "a", "b", "c", "d" }, { "a", "b", "1 2" }, { "foo baar", "b", "" },
{ "foo\n,,\n\",,\... | 531 | // + " \"foo\n,,\n\"\",,\n\"\"\",d,e\n";
// private static final String CSV_INPUT_1 = "a,b,c,d";
// private static final String CSV_INPUT_2 = "a,b,1 2";
// private static final String[][] RESULT = { { "a", "b", "c", "d" }, { "a", "b", "1 2" }, { "foo baar", "b", "" },
// { "foo\n,,... | /**
* Tests reusing a parser to process new string records one at a time as they are being discovered. See [CSV-110].
*
* @throws IOException
*/ | 16 | org.apache.commons.csv.CSVParser | src/test/java | ```java
+ " \"foo\n,,\n\"\",,\n\"\"\",d,e\n";
private static final String CSV_INPUT_1 = "a,b,c,d";
private static final String CSV_INPUT_2 = "a,b,1 2";
private static final String[][] RESULT = { { "a", "b", "c", "d" }, { "a", "b", "1 2" }, { "foo baar", "b", "" },
{ "foo\n,,\n\",,\... | public final class CSVParser implements Iterable<CSVRecord>, Closeable | package org.apache.commons.csv;
import static org.apache.commons.csv.Constants.CR;
import static org.apache.commons.csv.Constants.CRLF;
import static org.apache.commons.csv.Constants.LF;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assert... | private BOMInputStream createBOMInputStream(final String resource) throws IOException;
@Test
public void testBackslashEscaping() throws IOException;
@Test
public void testBackslashEscaping2() throws IOException;
@Test
@Ignore
public void testBackslashEscapingOld() throws IOException;
... | a18fb651934d5375cc19cb9f1fe435ba8ff1eef8092e0d7bbc17478882482d9a | [
"org.apache.commons.csv.CSVParserTest::testGetOneLineOneParser"
] | private final CSVFormat format;
private final Map<String, Integer> headerMap;
private final Lexer lexer;
private final CSVRecordIterator csvRecordIterator;
private final List<String> recordList = new ArrayList<>();
private long recordNumber;
private final long characterOffset;
private fi... | @Test
public void testGetOneLineOneParser() throws IOException | private static final Charset UTF_8 = StandardCharsets.UTF_8;
private static final String UTF_8_NAME = UTF_8.name();
private static final String CSV_INPUT = "a,b,c,d\n" + " a , b , 1 2 \n" + "\"foo baar\", b,\n"
// + " \"foo\n,,\n\"\",,\n\\\"\",d,e\n";
+ " \"foo\n,,\n\"\",,\n\"\"\",... | Csv | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/csv/CSVParser.java",
"be_test_class_name": "org.apache.commons.csv.CSVParser",
"be_test_function_name": "addRecordValue",
"be_test_function_signature": "(Z)V",
"line_numbers": [
"365",
"366",
"367",
"368",
"370",
"37... | |
public class DateAxisTests extends TestCase | public void test1472942() {
DateAxis a1 = new DateAxis("Test");
DateAxis a2 = new DateAxis("Test");
assertTrue(a1.equals(a2));
// range
a1.setRange(new Date(1L), new Date(2L));
assertFalse(a1.equals(a2));
a2.setRange(new Date(1L), new Date(2L));
asser... | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | tests/org/jfree/chart/axis/junit/DateAxisTests.java | package org.jfree.chart.axis;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import ja... | public DateAxis();
public DateAxis(String label);
public DateAxis(String label, TimeZone zone);
public DateAxis(String label, TimeZone zone, Locale locale);
public TimeZone getTimeZone();
public void setTimeZone(TimeZone zone);
public Timeline getTimeline();
public void setTimeline(Timel... | 177 | test1472942 | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | 167 | // public double dateToJava2D(Date date, Rectangle2D area,
// RectangleEdge edge);
// public double java2DToValue(double java2DValue, Rectangle2D area,
// RectangleEdge edge);
// public Date calculateLowestVisibleTickValue(DateTickUnit unit);
//... | /**
* A test for bug report 1472942. The DateFormat.equals() method is not
* checking the range attribute.
*/ | 1 | org.jfree.chart.axis.DateAxis | tests | ```java
public double dateToJava2D(Date date, Rectangle2D area,
RectangleEdge edge);
public double java2DToValue(double java2DValue, Rectangle2D area,
RectangleEdge edge);
public Date calculateLowestVisibleTickValue(DateTickUnit unit);
publi... | public class DateAxis extends ValueAxis implements Cloneable, Serializable | package org.jfree.chart.axis.junit;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.Obj... | public static Test suite();
public DateAxisTests(String name);
public void testEquals();
public void test1472942();
public void testHashCode();
public void testCloning();
public void testSetRange();
public void testSetMaximumDate();
public void testSetMinimumDate();
private boole... | a1b40fbe5b39c99e9c2b6c383d6ad6251f96cb03758f7cb02efbc8852706bb0d | [
"org.jfree.chart.axis.junit.DateAxisTests::test1472942"
] | private static final long serialVersionUID = -1013460999649007604L;
public static final DateRange DEFAULT_DATE_RANGE = new DateRange();
public static final double
DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS = 2.0;
public static final DateTickUnit DEFAULT_DATE_TICK_UNIT
= new ... | public void test1472942() | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/chart/axis/DateAxis.java",
"be_test_class_name": "org.jfree.chart.axis.DateAxis",
"be_test_function_name": "autoAdjustRange",
"be_test_function_signature": "()V",
"line_numbers": [
"1277",
"1279",
"1280",
"1283",
"1284",
"128... | ||
public class JSTypeTest extends BaseJSTypeTestCase | public void testSupertypeOfProxiedFunctionTypes() {
ObjectType fn1 =
new FunctionBuilder(registry)
.withParamsNode(new Node(Token.PARAM_LIST))
.withReturnType(NUMBER_TYPE)
.build();
ObjectType fn2 =
new FunctionBuilder(registry)
.withParamsNode(new Node(Token.PA... | // public void testRecordTypeGreatestSubType8();
// public void testApplyOfDateMethod();
// public void testCallOfDateMethod();
// public void testFunctionTypeRepresentation();
// public void testFunctionTypeRelationships();
// public void testProxiedFunctionTypeRelationships();
// public void testFunctio... | test/com/google/javascript/rhino/jstype/JSTypeTest.java | package com.google.javascript.rhino.jstype;
import static com.google.javascript.rhino.jstype.TernaryValue.UNKNOWN;
import com.google.common.base.Predicate;
import com.google.javascript.rhino.ErrorReporter;
import com.google.javascript.rhino.JSDocInfo;
import java.io.Serializable;
import java.util.Comparator;
| JSType(JSTypeRegistry registry);
JSType(JSTypeRegistry registry, TemplateTypeMap templateTypeMap);
JSType getNativeType(JSTypeNative typeId);
public JSDocInfo getJSDocInfo();
public String getDisplayName();
public boolean hasDisplayName();
public boolean hasProperty(String pname);
public boolean isNoTyp... | 4,782 | testSupertypeOfProxiedFunctionTypes | ```java
public void testRecordTypeGreatestSubType8();
public void testApplyOfDateMethod();
public void testCallOfDateMethod();
public void testFunctionTypeRepresentation();
public void testFunctionTypeRelationships();
public void testProxiedFunctionTypeRelationships();
public void testFunctionSubTypeRelat... | 4,758 | // public void testRecordTypeGreatestSubType8();
// public void testApplyOfDateMethod();
// public void testCallOfDateMethod();
// public void testFunctionTypeRepresentation();
// public void testFunctionTypeRelationships();
// public void testProxiedFunctionTypeRelationships();
// public void testFunctio... | /**
* Tests that Proxied FunctionTypes behave the same over getLeastSupertype and
* getGreatestSubtype as non proxied FunctionTypes
*/ | 107 | com.google.javascript.rhino.jstype.JSType | test | ```java
public void testRecordTypeGreatestSubType8();
public void testApplyOfDateMethod();
public void testCallOfDateMethod();
public void testFunctionTypeRepresentation();
public void testFunctionTypeRelationships();
public void testProxiedFunctionTypeRelationships();
public void testFunctionSubTypeRelat... | public abstract class JSType implements Serializable | package com.google.javascript.rhino.jstype;
import static com.google.javascript.rhino.jstype.TernaryValue.FALSE;
import static com.google.javascript.rhino.jstype.TernaryValue.TRUE;
import static com.google.javascript.rhino.jstype.TernaryValue.UNKNOWN;
import com.google.common.collect.ImmutableList;
import com.google.c... | @Override
protected void setUp() throws Exception;
public void testUniversalConstructorType() throws Exception;
public void testNoObjectType() throws Exception;
public void testNoType() throws Exception;
public void testNoResolvedType() throws Exception;
public void testArrayType() throws Exception;
pub... | a1b9e5546049bf5fe45db5108c8cdfa3ee06ef06d5a875ae2e2caf89080af59e | [
"com.google.javascript.rhino.jstype.JSTypeTest::testSupertypeOfProxiedFunctionTypes"
] | private static final long serialVersionUID = 1L;
private boolean resolved = false;
private JSType resolveResult = null;
protected TemplateTypeMap templateTypeMap;
private boolean inTemplatedCheckVisit = false;
private static final CanCastToVisitor CAN_CAST_TO_VISITOR =
new CanCastToVisitor();
public... | public void testSupertypeOfProxiedFunctionTypes() | private FunctionType dateMethod;
private FunctionType functionType;
private NamedType unresolvedNamedType;
private FunctionType googBar;
private FunctionType googSubBar;
private FunctionType googSubSubBar;
private ObjectType googBarInst;
private ObjectType googSubBarInst;
private ObjectType googSubSub... | Closure | /*
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* ... | [
{
"be_test_class_file": "com/google/javascript/rhino/jstype/JSType.java",
"be_test_class_name": "com.google.javascript.rhino.jstype.JSType",
"be_test_function_name": "checkEquivalenceHelper",
"be_test_function_signature": "(Lcom/google/javascript/rhino/jstype/JSType;Lcom/google/javascript/rhino/jsty... | |
public class BoundedIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testRemoveMiddle() {
List<E> testListCopy = new ArrayList<E>(testList);
Iterator<E> iter = new BoundedIterator<E>(testListCopy.iterator(), 1, 5);
assertTrue(iter.hasNext());
assertEquals("b", iter.next());
assertTrue(iter.hasNext());
assertEqual... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
| public BoundedIterator(final Iterator<? extends E> iterator, final long offset, final long max);
private void init();
@Override
public boolean hasNext();
private boolean checkBounds();
@Override
public E next();
@Override
public void remove(); | 308 | testRemoveMiddle | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | 282 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
// import java.util.NoSuchElementException;
//
//
//
// public class BoundedIterator<E> implements Iterator<E> {
// private final Iterator<? extends E> iterator;
// private final long off... | /**
* Test removing an element in the middle of the iterator. Verify that the
* element is removed from the underlying collection.
*/ | 28 | org.apache.commons.collections4.iterators.BoundedIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BoundedIterator<E> implements Iterator<E> {
private final Iterator<? extends E> iterator;
private final long offset;
private final lo... | public class BoundedIterator<E> implements Iterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public BoundedIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testBounded();
@Test
pu... | a1be37f69603a73a6528dae3d3195dac4f8af3937af30bd2d4f5158b4c82fb05 | [
"org.apache.commons.collections4.iterators.BoundedIteratorTest::testRemoveMiddle"
] | private final Iterator<? extends E> iterator;
private final long offset;
private final long max;
private long pos; | @Test
public void testRemoveMiddle() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/BoundedIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.BoundedIterator",
"be_test_function_name": "checkBounds",
"be_test_function_signature": "()Z",
"line_numbers": [
"106",
"107",
... | |
public class TestUnsupportedDateTimeField extends TestCase | public void testDifferentDurationReturnDifferentObjects() {
/**
* The fields returned by getInstance should be the same when the
* duration is the same for both method calls.
*/
DateTimeField fieldOne = UnsupportedDateTimeField.getInstance(
dateTimeFieldTy... | // // Abstract Java Tested Class
// package org.joda.time.field;
//
// import java.io.Serializable;
// import java.util.HashMap;
// import java.util.Locale;
// import org.joda.time.DateTimeField;
// import org.joda.time.DateTimeFieldType;
// import org.joda.time.DurationField;
// import org.joda.time.ReadablePartial;
... | src/test/java/org/joda/time/field/TestUnsupportedDateTimeField.java | package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
| public static synchronized UnsupportedDateTimeField getInstance(
DateTimeFieldType type, DurationField durationField);
private UnsupportedDateTimeField(DateTimeFieldType type, DurationField durationField);
public DateTimeFieldType getType();
public String getName();
public boolean isSupp... | 100 | testDifferentDurationReturnDifferentObjects | ```java
// Abstract Java Tested Class
package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
public final class ... | 78 | // // Abstract Java Tested Class
// package org.joda.time.field;
//
// import java.io.Serializable;
// import java.util.HashMap;
// import java.util.Locale;
// import org.joda.time.DateTimeField;
// import org.joda.time.DateTimeFieldType;
// import org.joda.time.DurationField;
// import org.joda.time.ReadablePartial;
... | /**
*
* This test exercises the logic in UnsupportedDateTimeField.getInstance. If
* getInstance() is invoked twice with: - the same DateTimeFieldType -
* different duration fields
*
* Then the field returned in the first invocation should not be equal to
* the field returned by ... | 1 | org.joda.time.field.UnsupportedDateTimeField | src/test/java | ```java
// Abstract Java Tested Class
package org.joda.time.field;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Locale;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
import org.joda.time.ReadablePartial;
public final class ... | public final class UnsupportedDateTimeField extends DateTimeField implements Serializable | package org.joda.time.field;
import java.util.Locale;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationFieldType;
import org.joda.time.LocalTime;
import org.joda.time.ReadablePartial;
| public static TestSuite suite();
protected void setUp() throws Exception;
public void testNullValuesToGetInstanceThrowsException();
public void testDifferentDurationReturnDifferentObjects();
public void testPublicGetNameMethod();
public void testAlwaysFalseReturnTypes();
public void testMeth... | a3cbdd7d3e8562adc9665c1367376e3b0dc7a05cbf0d69cd6268eb29ac30af44 | [
"org.joda.time.field.TestUnsupportedDateTimeField::testDifferentDurationReturnDifferentObjects"
] | private static final long serialVersionUID = -1934618396111902255L;
private static HashMap<DateTimeFieldType, UnsupportedDateTimeField> cCache;
private final DateTimeFieldType iType;
private final DurationField iDurationField; | public void testDifferentDurationReturnDifferentObjects() | private DurationFieldType weeks;
private DurationFieldType months;
private DateTimeFieldType dateTimeFieldTypeOne;
private ReadablePartial localTime; | Time | /*
* Copyright 2001-2006 Stephen Colebourne
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | [
{
"be_test_class_file": "org/joda/time/field/UnsupportedDateTimeField.java",
"be_test_class_name": "org.joda.time.field.UnsupportedDateTimeField",
"be_test_function_name": "getDurationField",
"be_test_function_signature": "()Lorg/joda/time/DurationField;",
"line_numbers": [
"343"
],
... | |
public class SkippingIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testRemoveCalledTwice() {
List<E> testListCopy = new ArrayList<E>(testList);
Iterator<E> iter = new SkippingIterator<E>(testListCopy.iterator(), 1);
assertTrue(iter.hasNext());
assertEquals("b", iter.next());
iter.remove();
try {
it... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
| public SkippingIterator(final Iterator<E> iterator, final long offset);
private void init();
@Override
public E next();
@Override
public void remove(); | 185 | testRemoveCalledTwice | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | 171 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | /**
* Test the <code>remove()</code> method being called twice without calling
* <code>next()</code> in between.
*/ | 28 | org.apache.commons.collections4.iterators.SkippingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | public class SkippingIterator<E> extends AbstractIteratorDecorator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public SkippingIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testSkipping();
@Test
... | a76cdc042986d52dbeba76f896c065ad83c62e195782bc8e57faf6423c7050ef | [
"org.apache.commons.collections4.iterators.SkippingIteratorTest::testRemoveCalledTwice"
] | private final long offset;
private long pos; | @Test
public void testRemoveCalledTwice() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/SkippingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.SkippingIterator",
"be_test_function_name": "init",
"be_test_function_signature": "()V",
"line_numbers": [
"66",
"67",
"69... | |
public class DatasetUtilitiesTests extends TestCase | public void testIterateRangeBounds4() {
YIntervalSeriesCollection dataset = new YIntervalSeriesCollection();
Range r = DatasetUtilities.iterateRangeBounds(dataset);
assertNull(r);
YIntervalSeries s1 = new YIntervalSeries("S1");
dataset.addSeries(s1);
r = DatasetUtilit... | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | tests/org/jfree/data/general/junit/DatasetUtilitiesTests.java | package org.jfree.data.general;
import org.jfree.data.pie.PieDataset;
import org.jfree.data.pie.DefaultPieDataset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.jfree.chart.util.ArrayUtilities;
import org.jfree.data.DomainInfo;
import org.jfree.data.KeyToGroupMap;
import org.... | private DatasetUtilities();
public static double calculatePieDatasetTotal(PieDataset dataset);
public static PieDataset createPieDatasetForRow(CategoryDataset dataset,
Comparable rowKey);
public static PieDataset createPieDatasetForRow(CategoryDataset ... | 485 | testIterateRangeBounds4 | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | 452 | // public static Range iterateRangeBounds(XYDataset dataset,
// boolean includeInterval);
// public static Range iterateToFindDomainBounds(XYDataset dataset,
// List visibleSeriesKeys, boolean includeInterval);
// public static Range iterateToFindRangeBounds(XYDataset dataset,
// ... | /**
* Some checks for the range bounds of a dataset that implements the
* {@link IntervalXYDataset} interface.
*/ | 1 | org.jfree.data.general.DatasetUtilities | tests | ```java
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval);
public static Range iterateToFindDomainBounds(XYDataset dataset,
List visibleSeriesKeys, boolean includeInterval);
public static Range iterateToFindRangeBounds(XYDataset dataset,
L... | public final class DatasetUtilities | package org.jfree.data.general.junit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jfree.data.KeyToGroupMap;
import org.jfree.data.Range;
import org.jfree.dat... | public static Test suite();
public DatasetUtilitiesTests(String name);
public void testJava();
public void testCalculatePieDatasetTotal();
public void testFindDomainBounds();
public void testFindDomainBounds2();
public void testFindDomainBounds3();
public void testFindDomainBounds_NaN();... | a89cb774fd9cda4a5e177b2c88113b3e67e7815eb4efef93ab5c40f781e5da4b | [
"org.jfree.data.general.junit.DatasetUtilitiesTests::testIterateRangeBounds4"
] | public void testIterateRangeBounds4() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2009, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/general/DatasetUtilities.java",
"be_test_class_name": "org.jfree.data.general.DatasetUtilities",
"be_test_function_name": "iterateRangeBounds",
"be_test_function_signature": "(Lorg/jfree/data/xy/XYDataset;)Lorg/jfree/data/Range;",
"line_numbers": [
"... | ||
public class AggregateSummaryStatisticsTest | @Test
public void testAggregate() {
// Generate a random sample and random partition
double[] totalSample = generateSample();
double[][] subSamples = generatePartition(totalSample);
int nSamples = subSamples.length;
// Compute combined stats directly
SummaryStat... | // // Abstract Java Tested Class
// package org.apache.commons.math3.stat.descriptive;
//
// import java.io.Serializable;
// import java.util.Collection;
// import java.util.Iterator;
// import org.apache.commons.math3.exception.NullArgumentException;
//
//
//
// public class AggregateSummaryStatistics implements S... | src/test/java/org/apache/commons/math3/stat/descriptive/AggregateSummaryStatisticsTest.java | package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
| public AggregateSummaryStatistics();
public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics) throws NullArgumentException;
public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics,
SummaryStatistics initialStatistics);
public double g... | 163 | testAggregate | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
public class AggregateSummaryStatistics implements StatisticalSummary,
... | 133 | // // Abstract Java Tested Class
// package org.apache.commons.math3.stat.descriptive;
//
// import java.io.Serializable;
// import java.util.Collection;
// import java.util.Iterator;
// import org.apache.commons.math3.exception.NullArgumentException;
//
//
//
// public class AggregateSummaryStatistics implements S... | /**
* Test aggregate function by randomly generating a dataset of 10-100 values
* from [-100, 100], dividing it into 2-5 partitions, computing stats for each
* partition and comparing the result of aggregate(...) applied to the collection
* of per-partition SummaryStatistics with a single Summar... | 1 | org.apache.commons.math3.stat.descriptive.AggregateSummaryStatistics | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
public class AggregateSummaryStatistics implements StatisticalSummary,
... | public class AggregateSummaryStatistics implements StatisticalSummary,
Serializable | package org.apache.commons.math3.stat.descriptive;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.distribution.RealDistribution;
import org.apache.commons.math3.distribution.UniformRealDistribution;
import org.apache.commons.math3.dis... | @Test
public void testAggregation();
@Test
public void testAggregationConsistency();
@Test
public void testAggregate();
@Test
public void testAggregateDegenerate();
@Test
public void testAggregateSpecialValues();
protected static void assertEquals(StatisticalSummary expected,... | a964dd93449c91f54acb58efc8d014a9e6ae88384fe152d1ec76d573c61ea348 | [
"org.apache.commons.math3.stat.descriptive.AggregateSummaryStatisticsTest::testAggregate"
] | private static final long serialVersionUID = -8207112444016386906L;
private final SummaryStatistics statisticsPrototype;
private final SummaryStatistics statistics; | @Test
public void testAggregate() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/stat/descriptive/AggregateSummaryStatistics.java",
"be_test_class_name": "org.apache.commons.math3.stat.descriptive.AggregateSummaryStatistics",
"be_test_function_name": "aggregate",
"be_test_function_signature": "(Ljava/util/Collection;)Lorg/apache/... | ||
public class SkippingIteratorTest<E> extends AbstractIteratorTest<E> | @Test
public void testRemoveFirst() {
List<E> testListCopy = new ArrayList<E>(testList);
Iterator<E> iter = new SkippingIterator<E>(testListCopy.iterator(), 4);
assertTrue(iter.hasNext());
assertEquals("e", iter.next());
iter.remove();
assertFalse(testListCopy.c... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Iterator;
| public SkippingIterator(final Iterator<E> iterator, final long offset);
private void init();
@Override
public E next();
@Override
public void remove(); | 213 | testRemoveFirst | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | 191 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Iterator;
//
//
//
// public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
// private final long offset;
// private long pos;
//
// public SkippingIterator(final Iterator<E>... | /**
* Test removing the first element. Verify that the element is removed from
* the underlying collection.
*/ | 28 | org.apache.commons.collections4.iterators.SkippingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Iterator;
public class SkippingIterator<E> extends AbstractIteratorDecorator<E> {
private final long offset;
private long pos;
public SkippingIterator(final Iterator<E> iterator, final long offset... | public class SkippingIterator<E> extends AbstractIteratorDecorator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import org.junit.Test;
| public SkippingIteratorTest(final String testName);
@SuppressWarnings("unchecked")
@Override
public void setUp()
throws Exception;
@Override
public Iterator<E> makeEmptyIterator();
@Override
public Iterator<E> makeObject();
@Test
public void testSkipping();
@Test
... | abc55217222fd7b9fa0492b598461d82ab12eb4030ca32b1583fe1a1ec63f866 | [
"org.apache.commons.collections4.iterators.SkippingIteratorTest::testRemoveFirst"
] | private final long offset;
private long pos; | @Test
public void testRemoveFirst() | private final String[] testArray = {
"a", "b", "c", "d", "e", "f", "g"
};
private List<E> testList; | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may n... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/SkippingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.SkippingIterator",
"be_test_function_name": "init",
"be_test_function_signature": "()V",
"line_numbers": [
"66",
"67",
"69... | |
public class AggregateSummaryStatisticsTest | @Test
public void testAggregationConsistency() {
// Generate a random sample and random partition
double[] totalSample = generateSample();
double[][] subSamples = generatePartition(totalSample);
int nSamples = subSamples.length;
// Create aggregator and total stats for ... | // // Abstract Java Tested Class
// package org.apache.commons.math3.stat.descriptive;
//
// import java.io.Serializable;
// import java.util.Collection;
// import java.util.Iterator;
// import org.apache.commons.math3.exception.NullArgumentException;
//
//
//
// public class AggregateSummaryStatistics implements S... | src/test/java/org/apache/commons/math3/stat/descriptive/AggregateSummaryStatisticsTest.java | package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
| public AggregateSummaryStatistics();
public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics) throws NullArgumentException;
public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics,
SummaryStatistics initialStatistics);
public double g... | 123 | testAggregationConsistency | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
public class AggregateSummaryStatistics implements StatisticalSummary,
... | 83 | // // Abstract Java Tested Class
// package org.apache.commons.math3.stat.descriptive;
//
// import java.io.Serializable;
// import java.util.Collection;
// import java.util.Iterator;
// import org.apache.commons.math3.exception.NullArgumentException;
//
//
//
// public class AggregateSummaryStatistics implements S... | /**
* Verify that aggregating over a partition gives the same results
* as direct computation.
*
* 1) Randomly generate a dataset of 10-100 values
* from [-100, 100]
* 2) Divide the dataset it into 2-5 partitions
* 3) Create an AggregateSummaryStatistic and ContributingStat... | 1 | org.apache.commons.math3.stat.descriptive.AggregateSummaryStatistics | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.stat.descriptive;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.math3.exception.NullArgumentException;
public class AggregateSummaryStatistics implements StatisticalSummary,
... | public class AggregateSummaryStatistics implements StatisticalSummary,
Serializable | package org.apache.commons.math3.stat.descriptive;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.distribution.RealDistribution;
import org.apache.commons.math3.distribution.UniformRealDistribution;
import org.apache.commons.math3.dis... | @Test
public void testAggregation();
@Test
public void testAggregationConsistency();
@Test
public void testAggregate();
@Test
public void testAggregateDegenerate();
@Test
public void testAggregateSpecialValues();
protected static void assertEquals(StatisticalSummary expected,... | af89dce23b2b9dad00573a0e0da8d2afce63f853e0648d6e2255a10c4b68a9c7 | [
"org.apache.commons.math3.stat.descriptive.AggregateSummaryStatisticsTest::testAggregationConsistency"
] | private static final long serialVersionUID = -8207112444016386906L;
private final SummaryStatistics statisticsPrototype;
private final SummaryStatistics statistics; | @Test
public void testAggregationConsistency() | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/stat/descriptive/AggregateSummaryStatistics.java",
"be_test_class_name": "org.apache.commons.math3.stat.descriptive.AggregateSummaryStatistics",
"be_test_function_name": "createContributingStatistics",
"be_test_function_signature": "()Lorg/apache/com... | ||
@SuppressWarnings("resource")
public final class JsonReaderTest extends TestCase | public void testUnterminatedStringFailure() throws IOException {
JsonReader reader = new JsonReader(reader("[\"string"));
reader.setLenient(true);
reader.beginArray();
assertEquals(JsonToken.STRING, reader.peek());
try {
reader.nextString();
fail();
} catch (MalformedJsonException ... | // public void testSkipObject() throws IOException;
// public void testSkipObjectAfterPeek() throws Exception;
// public void testSkipInteger() throws IOException;
// public void testSkipDouble() throws IOException;
// public void testHelloWorld() throws IOException;
// public void testInvalidJsonInput() th... | gson/src/test/java/com/google/gson/stream/JsonReaderTest.java | package com.google.gson.stream;
import com.google.gson.internal.JsonReaderInternalAccess;
import com.google.gson.internal.bind.JsonTreeReader;
import java.io.Closeable;
import java.io.EOFException;
import java.io.IOException;
import java.io.Reader;
| public JsonReader(Reader in);
public final void setLenient(boolean lenient);
public final boolean isLenient();
public void beginArray() throws IOException;
public void endArray() throws IOException;
public void beginObject() throws IOException;
public void endObject() throws IOException;
public boolean ... | 1,729 | testUnterminatedStringFailure | ```java
public void testSkipObject() throws IOException;
public void testSkipObjectAfterPeek() throws Exception;
public void testSkipInteger() throws IOException;
public void testSkipDouble() throws IOException;
public void testHelloWorld() throws IOException;
public void testInvalidJsonInput() throws IOExc... | 1,719 | // public void testSkipObject() throws IOException;
// public void testSkipObjectAfterPeek() throws Exception;
// public void testSkipInteger() throws IOException;
// public void testSkipDouble() throws IOException;
// public void testHelloWorld() throws IOException;
// public void testInvalidJsonInput() th... | /**
* This test behave slightly differently in Gson 2.2 and earlier. It fails
* during peek rather than during nextString().
*/ | 18 | com.google.gson.stream.JsonReader | gson/src/test/java | ```java
public void testSkipObject() throws IOException;
public void testSkipObjectAfterPeek() throws Exception;
public void testSkipInteger() throws IOException;
public void testSkipDouble() throws IOException;
public void testHelloWorld() throws IOException;
public void testInvalidJsonInput() throws IOExc... | public class JsonReader implements Closeable | package com.google.gson.stream;
import java.io.EOFException;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.Arrays;
import junit.framework.TestCase;
import static com.google.gson.stream.JsonToken.BEGIN_ARRAY;
import static com.google.gson.stream.JsonToken.BEGIN_OBJECT;... | public void testReadArray() throws IOException;
public void testReadEmptyArray() throws IOException;
public void testReadObject() throws IOException;
public void testReadEmptyObject() throws IOException;
public void testSkipArray() throws IOException;
public void testSkipArrayAfterPeek() throws Exception;
... | aff77bc307f21a1b2261239b47c98f2ceab8a38c7228637fe4df049c1b8aaf0e | [
"com.google.gson.stream.JsonReaderTest::testUnterminatedStringFailure"
] | private static final char[] NON_EXECUTE_PREFIX = ")]}'\n".toCharArray();
private static final long MIN_INCOMPLETE_INTEGER = Long.MIN_VALUE / 10;
private static final int PEEKED_NONE = 0;
private static final int PEEKED_BEGIN_OBJECT = 1;
private static final int PEEKED_END_OBJECT = 2;
private static final in... | public void testUnterminatedStringFailure() throws IOException | Gson | /*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | [
{
"be_test_class_file": "com/google/gson/stream/JsonReader.java",
"be_test_class_name": "com.google.gson.stream.JsonReader",
"be_test_function_name": "beginArray",
"be_test_function_signature": "()V",
"line_numbers": [
"341",
"342",
"343",
"345",
"346",
"347",... | ||
public class Caverphone1Test extends StringEncoderAbstractTest<Caverphone1> | @Test
public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException {
this.checkEncodingVariations("AT1111", new String[]{
"add",
"aid",
"at",
"art",
"eat",
"earth",
"head",
"hit",
... | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
//
//
// public class Caverphone1 extends AbstractCaverphone {
// private static final String SIX_1 = "111111";
//
// @Override
// public String encode(final String source);
// }
//
// // Abstract Java Test Class
// pack... | src/test/java/org/apache/commons/codec/language/Caverphone1Test.java | package org.apache.commons.codec.language;
| @Override
public String encode(final String source); | 62 | testCaverphoneRevisitedCommonCodeAT1111 | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
public class Caverphone1 extends AbstractCaverphone {
private static final String SIX_1 = "111111";
@Override
public String encode(final String source);
}
// Abstract Java Test Class
package org.apache.commons.codec.langu... | 44 | // // Abstract Java Tested Class
// package org.apache.commons.codec.language;
//
//
//
// public class Caverphone1 extends AbstractCaverphone {
// private static final String SIX_1 = "111111";
//
// @Override
// public String encode(final String source);
// }
//
// // Abstract Java Test Class
// pack... | /**
* Tests example adapted from version 2.0 http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
* AT1111 words: add, aid, at, art, eat, earth, head, hit, hot, hold, hard, heart, it, out, old
*
* @throws EncoderException
*/ | 18 | org.apache.commons.codec.language.Caverphone1 | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.codec.language;
public class Caverphone1 extends AbstractCaverphone {
private static final String SIX_1 = "111111";
@Override
public String encode(final String source);
}
// Abstract Java Test Class
package org.apache.commons.codec.langu... | public class Caverphone1 extends AbstractCaverphone | package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoderAbstractTest;
import org.junit.Assert;
import org.junit.Test;
| @Override
protected Caverphone1 createStringEncoder();
@Test
public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException;
@Test
public void testEndMb() throws EncoderException;
@Test
public void testIsCaverphoneEquals() throws EncoderException;
@Test
public void... | b63e55d965cbd13d4e6bd2a1f9e72a360b57f14404e95fbd7920d81a833c871e | [
"org.apache.commons.codec.language.Caverphone1Test::testCaverphoneRevisitedCommonCodeAT1111"
] | private static final String SIX_1 = "111111"; | @Test
public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException | Codec | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/codec/language/Caverphone1.java",
"be_test_class_name": "org.apache.commons.codec.language.Caverphone1",
"be_test_function_name": "encode",
"be_test_function_signature": "(Ljava/lang/String;)Ljava/lang/String;",
"line_numbers": [
"46",
"47"... | ||
public class LoopingIteratorTest extends TestCase | public void testRemoving1() throws Exception {
final List<String> list = new ArrayList<String>(Arrays.asList("a", "b", "c"));
final LoopingIterator<String> loop = new LoopingIterator<String>(list);
assertEquals("list should have 3 elements.", 3, list.size());
assertTrue("1st hasNext... | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | src/test/java/org/apache/commons/collections4/iterators/LoopingIteratorTest.java | package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
| public LoopingIterator(final Collection<? extends E> coll);
@Override
public boolean hasNext();
@Override
public E next();
@Override
public void remove();
@Override
public void reset();
public int size(); | 149 | testRemoving1 | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | 123 | // // Abstract Java Tested Class
// package org.apache.commons.collections4.iterators;
//
// import java.util.Collection;
// import java.util.Iterator;
// import java.util.NoSuchElementException;
// import org.apache.commons.collections4.ResettableIterator;
//
//
//
// public class LoopingIterator<E> implements Res... | /**
* Tests the remove() method on a LoopingIterator wrapped ArrayList.
* @throws Exception If something unexpected occurs.
*/ | 28 | org.apache.commons.collections4.iterators.LoopingIterator | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.collections4.iterators;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.commons.collections4.ResettableIterator;
public class LoopingIterator<E> implements ResettableIterator<E> {
... | public class LoopingIterator<E> implements ResettableIterator<E> | package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.TestCase;
| public void testConstructorEx() throws Exception;
public void testLooping0() throws Exception;
public void testLooping1() throws Exception;
public void testLooping2() throws Exception;
public void testLooping3() throws Exception;
public void testRemoving1() throws Exception;
public void test... | b8a0ea8669b47ef25f8ab78f8e5d391c9f953adc0e5820978d5762a9b50fb44e | [
"org.apache.commons.collections4.iterators.LoopingIteratorTest::testRemoving1"
] | private final Collection<? extends E> collection;
private Iterator<? extends E> iterator; | public void testRemoving1() throws Exception | Collections | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/collections4/iterators/LoopingIterator.java",
"be_test_class_name": "org.apache.commons.collections4.iterators.LoopingIterator",
"be_test_function_name": "hasNext",
"be_test_function_signature": "()Z",
"line_numbers": [
"72"
],
"method_li... | ||
public class HistogramDatasetTests extends TestCase | public void test1553088() {
double[] values = {-1.0, 0.0, -Double.MIN_VALUE, 3.0};
HistogramDataset d = new HistogramDataset();
d.addSeries("S1", values, 2, -1.0, 0.0);
assertEquals(-1.0, d.getStartXValue(0, 0), EPSILON);
assertEquals(-0.5, d.getEndXValue(0, 0), EPSILON);
... | // // Abstract Java Tested Class
// package org.jfree.data.statistics;
//
// import java.io.Serializable;
// import java.util.ArrayList;
// import java.util.HashMap;
// import java.util.List;
// import java.util.Map;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// ... | tests/org/jfree/data/statistics/junit/HistogramDatasetTests.java | package org.jfree.data.statistics;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.d... | public HistogramDataset();
public HistogramType getType();
public void setType(HistogramType type);
public void addSeries(Comparable key, double[] values, int bins);
public void addSeries(Comparable key,
double[] values,
int bins,
... | 256 | test1553088 | ```java
// Abstract Java Tested Class
package org.jfree.data.statistics;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.ut... | 245 | // // Abstract Java Tested Class
// package org.jfree.data.statistics;
//
// import java.io.Serializable;
// import java.util.ArrayList;
// import java.util.HashMap;
// import java.util.List;
// import java.util.Map;
// import org.jfree.chart.event.DatasetChangeInfo;
// import org.jfree.chart.util.ObjectUtilities;
// ... | /**
* Some checks for bug 1553088. An IndexOutOfBoundsException is thrown
* when a data value is *very* close to the upper limit of the last bin.
*/ | 1 | org.jfree.data.statistics.HistogramDataset | tests | ```java
// Abstract Java Tested Class
package org.jfree.data.statistics;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jfree.chart.event.DatasetChangeInfo;
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.ut... | public class HistogramDataset extends AbstractIntervalXYDataset
implements IntervalXYDataset, Cloneable, PublicCloneable,
Serializable | package org.jfree.data.statistics.junit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.fr... | public static Test suite();
public HistogramDatasetTests(String name);
public void testBins();
public void testEquals();
public void testCloning();
public void testSerialization();
public void testGetSeriesKey();
public void testAddSeries();
public void testAddSeries2();
public v... | ba919fcfe9d145d7e7d2696c6b50379cd0446b3aaf3201bc16dce62785ddd6ac | [
"org.jfree.data.statistics.junit.HistogramDatasetTests::test1553088"
] | private static final long serialVersionUID = -6341668077370231153L;
private List list;
private HistogramType type; | public void test1553088() | private static final double EPSILON = 0.0000000001; | Chart | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/in... | [
{
"be_test_class_file": "org/jfree/data/statistics/HistogramDataset.java",
"be_test_class_name": "org.jfree.data.statistics.HistogramDataset",
"be_test_function_name": "addSeries",
"be_test_function_signature": "(Ljava/lang/Comparable;[DIDD)V",
"line_numbers": [
"158",
"159",
"... | |
public class CovarianceTest | @Test
public void testConsistency() {
final RealMatrix matrix = createRealMatrix(swissData, 47, 5);
final RealMatrix covarianceMatrix = new Covariance(matrix).getCovarianceMatrix();
// Variances on the diagonal
Variance variance = new Variance();
for (int i = 0; i < 5; i... | // 60323,83.0,234289,2356,1590,107608,1947,
// 61122,88.5,259426,2325,1456,108632,1948,
// 60171,88.2,258054,3682,1616,109773,1949,
// 61187,89.5,284599,3351,1650,110929,1950,
// 63221,96.2,328975,2099,3099,112075,1951,
// 63639,98.1,346999,1932,35... | src/test/java/org/apache/commons/math3/stat/correlation/CovarianceTest.java | package org.apache.commons.math3.stat.correlation;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.linear.RealMatrix;
import o... | public Covariance();
public Covariance(double[][] data, boolean biasCorrected)
throws MathIllegalArgumentException, NotStrictlyPositiveException;
public Covariance(double[][] data)
throws MathIllegalArgumentException, NotStrictlyPositiveException;
public Covariance(RealMatrix matrix, boolean bia... | 240 | testConsistency | ```java
60323,83.0,234289,2356,1590,107608,1947,
61122,88.5,259426,2325,1456,108632,1948,
60171,88.2,258054,3682,1616,109773,1949,
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,1951,
63639,98.1,346999,1932,3594,113270,... | 200 | // 60323,83.0,234289,2356,1590,107608,1947,
// 61122,88.5,259426,2325,1456,108632,1948,
// 60171,88.2,258054,3682,1616,109773,1949,
// 61187,89.5,284599,3351,1650,110929,1950,
// 63221,96.2,328975,2099,3099,112075,1951,
// 63639,98.1,346999,1932,35... | /**
* Verify that diagonal entries are consistent with Variance computation and matrix matches
* column-by-column covariances
*/ | 1 | org.apache.commons.math3.stat.correlation.Covariance | src/test/java | ```java
60323,83.0,234289,2356,1590,107608,1947,
61122,88.5,259426,2325,1456,108632,1948,
60171,88.2,258054,3682,1616,109773,1949,
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,1951,
63639,98.1,346999,1932,3594,113270,... | public class Covariance | package org.apache.commons.math3.stat.correlation;
import org.apache.commons.math3.TestUtils;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.stat.desc... | @Test
public void testLongly();
@Test
public void testSwissFertility();
@Test
public void testConstant();
@Test
public void testOneColumn();
@Test
public void testInsufficientData();
@Test
public void testConsistency();
protected RealMatrix createRealMatrix(double[] d... | baebc8b8875f0038dcb88a2ec2f63734578c2ed1c2aff1c0d424c44c581b8ece | [
"org.apache.commons.math3.stat.correlation.CovarianceTest::testConsistency"
] | private final RealMatrix covarianceMatrix;
private final int n; | @Test
public void testConsistency() | protected final double[] longleyData = new double[] {
60323,83.0,234289,2356,1590,107608,1947,
61122,88.5,259426,2325,1456,108632,1948,
60171,88.2,258054,3682,1616,109773,1949,
61187,89.5,284599,3351,1650,110929,1950,
63221,96.2,328975,2099,3099,112075,195... | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/stat/correlation/Covariance.java",
"be_test_class_name": "org.apache.commons.math3.stat.correlation.Covariance",
"be_test_function_name": "checkSufficientData",
"be_test_function_signature": "(Lorg/apache/commons/math3/linear/RealMatrix;)V",
"lin... | |
public class BaseRuleFactoryTest | @Test
public void testConcurrentCreation() throws InterruptedException,
ExecutionException {
// Number of times the same rule will be called.
final int numTasks = 20;
final ThreadPoolExecutor exec
= new ThreadPoolExecut... | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.integration.gauss;
//
// import java.util.Map;
// import java.util.TreeMap;
// import org.apache.commons.math3.util.Pair;
// import org.apache.commons.math3.exception.DimensionMismatchException;
// import org.apache.commons.math3.exception.N... | src/test/java/org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactoryTest.java | package org.apache.commons.math3.analysis.integration.gauss;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.math3.util.Pair;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons... | public Pair<double[], double[]> getRule(int numberOfPoints)
throws NotStrictlyPositiveException, DimensionMismatchException;
protected synchronized Pair<T[], T[]> getRuleInternal(int numberOfPoints)
throws DimensionMismatchException;
protected void addRule(Pair<T[], T[]> rule) throws Dimensi... | 65 | testConcurrentCreation | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.integration.gauss;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.math3.util.Pair;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NotStrictlyPositi... | 41 | // // Abstract Java Tested Class
// package org.apache.commons.math3.analysis.integration.gauss;
//
// import java.util.Map;
// import java.util.TreeMap;
// import org.apache.commons.math3.util.Pair;
// import org.apache.commons.math3.exception.DimensionMismatchException;
// import org.apache.commons.math3.exception.N... | /**
* Tests that a given rule rule will be computed and added once to the cache
* whatever the number of times this rule is called concurrently.
*/ | 1 | org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory | src/test/java | ```java
// Abstract Java Tested Class
package org.apache.commons.math3.analysis.integration.gauss;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.math3.util.Pair;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NotStrictlyPositi... | public abstract class BaseRuleFactory<T extends Number> | package org.apache.commons.math3.analysis.integration.gauss;
import java.util.List;
import java.util.ArrayList;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;... | @Test
public void testConcurrentCreation() throws InterruptedException,
ExecutionException;
public Pair<double[], double[]> call();
public static int getNumberOfCalls();
@Override
protected Pair<Double[], Double[]> computeRule(int order);
... | bb86dee5d62c65c76761b509b2d28268218fbfc779c6bcbb6691ccefbbf587b2 | [
"org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactoryTest::testConcurrentCreation"
] | private final Map<Integer, Pair<T[], T[]>> pointsAndWeights
= new TreeMap<Integer, Pair<T[], T[]>>();
private final Map<Integer, Pair<double[], double[]>> pointsAndWeightsDouble
= new TreeMap<Integer, Pair<double[], double[]>>(); | @Test
public void testConcurrentCreation() throws InterruptedException,
ExecutionException | private static final DummyRuleFactory factory = new DummyRuleFactory();
private static AtomicInteger nCalls = new AtomicInteger(); | Math | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | [
{
"be_test_class_file": "org/apache/commons/math3/analysis/integration/gauss/BaseRuleFactory.java",
"be_test_class_name": "org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory",
"be_test_function_name": "addRule",
"be_test_function_signature": "(Lorg/apache/commons/math3/util/Pair;)V"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.