function stringlengths 61 9.1k | testmethod stringlengths 42 143 | location_fixed stringlengths 43 98 | end_buggy int64 10 12k | location stringlengths 43 98 | function_name stringlengths 4 73 | source_buggy stringlengths 655 442k | prompt_complete stringlengths 433 4.3k | end_fixed int64 10 12k | comment stringlengths 0 763 | bug_id stringlengths 1 3 | start_fixed int64 7 12k | location_buggy stringlengths 43 98 | source_dir stringclasses 5
values | prompt_chat stringlengths 420 3.86k | start_buggy int64 7 12k | classes_modified list | task_id stringlengths 64 64 | function_signature stringlengths 22 150 | prompt_complete_without_signature stringlengths 404 4.23k | project stringclasses 17
values | indent stringclasses 4
values | source_fixed stringlengths 655 442k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public void testIssue794b() {
noInline(
"var x = 1; " +
"try { x = x + someFunction(); } catch (e) {}" +
"x = x + 1;" +
"try { x = x + someFunction(); } catch (e) {}" +
"return x;");
} | com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testIssue794b | test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java | 518 | test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java | testIssue794b | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testIssue794b` for the issue `Closure-794`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-794
//
// ## Issue-Title:
// Try/catch blocks incorporate code not inside origina... | 518 | 12 | 511 | test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java | test | ```markdown
## Issue-ID: Closure-794
## Issue-Title:
Try/catch blocks incorporate code not inside original blocks
## Issue-Description:
**What steps will reproduce the problem?**
Starting with this code:
-----
function a() {
var x = '1';
try {
x += somefunction();
} catch(e) {
}
x += "2";
try {
... | 511 | [
"com.google.javascript.jscomp.MaybeReachingVariableUse"
] | 6c69251b3fd7b4a04003663fa13b311a08fa7d782c5577615e78146bd6ad0236 | public void testIssue794b() | // You are a professional Java test case writer, please create a test case named `testIssue794b` for the issue `Closure-794`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-794
//
// ## Issue-Title:
// Try/catch blocks incorporate code not inside origina... | 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... | ||
public void testWith3() {
Partial test = createHourMinPartial();
try {
test.with(DateTimeFieldType.clockhourOfDay(), 6);
fail();
} catch (IllegalArgumentException ex) {}
check(test, 10, 20);
} | org.joda.time.TestPartial_Basics::testWith3 | src/test/java/org/joda/time/TestPartial_Basics.java | 366 | src/test/java/org/joda/time/TestPartial_Basics.java | testWith3 | /*
* Copyright 2001-2013 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... | // You are a professional Java test case writer, please create a test case named `testWith3` for the issue `Time-88`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-88
//
// ## Issue-Title:
// Constructing invalid Partials
//
// ## Issue-Description:
// P... | 366 | 4 | 359 | src/test/java/org/joda/time/TestPartial_Basics.java | src/test/java | ```markdown
## Issue-ID: Time-88
## Issue-Title:
Constructing invalid Partials
## Issue-Description:
Partials can be constructed by invoking a constructor `Partial(DateTimeFieldType[], int[])` or by merging together a set of partials using `with`, each constructed by calling `Partial(DateTimeFieldType, int)`, e.g.:... | 359 | [
"org.joda.time.Partial"
] | 6c8a8d3eedb48d935d89d44f9e8a4e8a4bba0faca1e6010d4b3a7fdc18930126 | public void testWith3() | // You are a professional Java test case writer, please create a test case named `testWith3` for the issue `Time-88`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-88
//
// ## Issue-Title:
// Constructing invalid Partials
//
// ## Issue-Description:
// P... | Time | /*
* Copyright 2001-2013 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... | ||
public void testExample() throws Exception {
ObjectMapper mapper = new ObjectMapper();
String json = mapper.writerWithDefaultPrettyPrinter()
.writeValueAsString(Arrays.asList(new AnimalAndType(AnimalType.Dog, new Dog())));
List<AnimalAndType> list = mapper.readerFor(... | com.fasterxml.jackson.databind.jsontype.ext.ExternalTypeIdWithEnum1328Test::testExample | src/test/java/com/fasterxml/jackson/databind/jsontype/ext/ExternalTypeIdWithEnum1328Test.java | 89 | src/test/java/com/fasterxml/jackson/databind/jsontype/ext/ExternalTypeIdWithEnum1328Test.java | testExample | package com.fasterxml.jackson.databind.jsontype.ext;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.an... | // You are a professional Java test case writer, please create a test case named `testExample` for the issue `JacksonDatabind-1328`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1328
//
// ## Issue-Title:
// External property polymorphic deseri... | 89 | 98 | 81 | src/test/java/com/fasterxml/jackson/databind/jsontype/ext/ExternalTypeIdWithEnum1328Test.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-1328
## Issue-Title:
External property polymorphic deserialization does not work with enums
## Issue-Description:
versions: Jackson 2.8.1, Jackson-module-kotlin 2.8.1
Attempting to deserialize a class using external\_property. In my case, the property is an Enum type with ... | 81 | [
"com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler"
] | 6d66486e1227041618eb36bf038d5073d00b3bcbdc937fbc75c469ae38a776de | public void testExample() throws Exception | // You are a professional Java test case writer, please create a test case named `testExample` for the issue `JacksonDatabind-1328`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1328
//
// ## Issue-Title:
// External property polymorphic deseri... | JacksonDatabind | package com.fasterxml.jackson.databind.jsontype.ext;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.an... | ||
@Test(expected = UnsupportedOperationException.class)
public void testIterator() {
final ArrayList<Chromosome> chromosomes = new ArrayList<Chromosome>();
chromosomes.add(new DummyBinaryChromosome(BinaryChromosome.randomBinaryRepresentation(3)));
chromosomes.add(new DummyBinaryChromosome(... | org.apache.commons.math3.genetics.ListPopulationTest::testIterator | src/test/java/org/apache/commons/math3/genetics/ListPopulationTest.java | 187 | src/test/java/org/apache/commons/math3/genetics/ListPopulationTest.java | testIterator | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testIterator` for the issue `Math-MATH-779`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-779
//
// ## Issue-Title:
// ListPopulation Iterator allows you to remove chro... | 187 | 34 | 166 | src/test/java/org/apache/commons/math3/genetics/ListPopulationTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-779
## Issue-Title:
ListPopulation Iterator allows you to remove chromosomes from the population.
## Issue-Description:
Calling the iterator method of ListPopulation returns an iterator of the protected modifiable list. Before returning the iterator we should wrap it in an unmodi... | 166 | [
"org.apache.commons.math3.genetics.ListPopulation"
] | 6e1eda59635ac5fbb79e3e8849345b824061ee9c4cbf831ad1df670bb6f06170 | @Test(expected = UnsupportedOperationException.class)
public void testIterator() | // You are a professional Java test case writer, please create a test case named `testIterator` for the issue `Math-MATH-779`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-779
//
// ## Issue-Title:
// ListPopulation Iterator allows you to remove chro... | 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 ... | ||
public void testSupplementaryUnescaping() {
NumericEntityUnescaper neu = new NumericEntityUnescaper();
String input = "𐰢";
String expected = "\uD803\uDC22";
String result = neu.translate(input);
assertEquals("Failed to unescape numeric entities supplementary character... | org.apache.commons.lang3.text.translate.NumericEntityUnescaperTest::testSupplementaryUnescaping | src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java | 33 | src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java | testSupplementaryUnescaping | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testSupplementaryUnescaping` for the issue `Lang-LANG-617`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-617
//
// ## Issue-Title:
// StringEscapeUtils.escapeXML() can'... | 33 | 28 | 26 | src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java | src/test/java | ```markdown
## Issue-ID: Lang-LANG-617
## Issue-Title:
StringEscapeUtils.escapeXML() can't process UTF-16 supplementary characters
## Issue-Description:
Supplementary characters in UTF-16 are those whose code points are above 0xffff, that is, require more than 1 Java char to be encoded, as explained here: <http://... | 26 | [
"org.apache.commons.lang3.text.translate.NumericEntityUnescaper"
] | 6ed8ed22d585c11cee2ef619deca5bf764360855bbfdc0bfb6214beaccd12a11 | public void testSupplementaryUnescaping() | // You are a professional Java test case writer, please create a test case named `testSupplementaryUnescaping` for the issue `Lang-LANG-617`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-617
//
// ## Issue-Title:
// StringEscapeUtils.escapeXML() can'... | 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 ... | ||
public void testRootEndpoints() throws Exception {
UnivariateRealFunction f = new SinFunction();
UnivariateRealSolver solver = new BrentSolver(f);
// endpoint is root
double result = solver.solve(Math.PI, 4);
assertEquals(result, Math.PI, solver.getAbsoluteAccuracy()... | org.apache.commons.math.analysis.BrentSolverTest::testRootEndpoints | src/test/org/apache/commons/math/analysis/BrentSolverTest.java | 280 | src/test/org/apache/commons/math/analysis/BrentSolverTest.java | testRootEndpoints | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testRootEndpoints` for the issue `Math-MATH-204`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-204
//
// ## Issue-Title:
// BrentSolver throws IllegalArgumentException
... | 280 | 97 | 270 | src/test/org/apache/commons/math/analysis/BrentSolverTest.java | src/test | ```markdown
## Issue-ID: Math-MATH-204
## Issue-Title:
BrentSolver throws IllegalArgumentException
## Issue-Description:
I am getting this exception:
java.lang.IllegalArgumentException: Function values at endpoints do not have different signs. Endpoints: [-100000.0,1.7976931348623157E308] Values: [0.0,-101945.04... | 270 | [
"org.apache.commons.math.analysis.BrentSolver"
] | 6f731e5d2a9eb10ab8a1a30ad3a9e1e1098006c54de22fa3fc099dc96735be3b | public void testRootEndpoints() throws Exception | // You are a professional Java test case writer, please create a test case named `testRootEndpoints` for the issue `Math-MATH-204`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-204
//
// ## Issue-Title:
// BrentSolver throws IllegalArgumentException
... | 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 ... | ||
public void testAbbreviate() {
// check null and empty are returned respectively
assertNull(WordUtils.abbreviate(null, 1,-1,""));
assertEquals(StringUtils.EMPTY, WordUtils.abbreviate("", 1,-1,""));
// test upper limit
assertEquals("01234", WordUtils.abbreviate("0123456789", ... | org.apache.commons.lang.WordUtilsTest::testAbbreviate | src/test/org/apache/commons/lang/WordUtilsTest.java | 400 | src/test/org/apache/commons/lang/WordUtilsTest.java | testAbbreviate | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testAbbreviate` for the issue `Lang-LANG-419`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-419
//
// ## Issue-Title:
// WordUtils.abbreviate bug when lower is greater ... | 400 | // ----------------------------------------------------------------------- | 45 | 365 | src/test/org/apache/commons/lang/WordUtilsTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-419
## Issue-Title:
WordUtils.abbreviate bug when lower is greater than str.length
## Issue-Description:
In WordUtils.abbreviate, upper is adjusted to the length of the string, then to lower.
But lower is never adjusted to the length of the string, so if lower is greater than ... | 365 | [
"org.apache.commons.lang.WordUtils"
] | 70fe6488c6b2d2cc2fb2a1f51c0b2c07fe7ba83945d79ca35c9cb28de620046a | public void testAbbreviate() | // You are a professional Java test case writer, please create a test case named `testAbbreviate` for the issue `Lang-LANG-419`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-419
//
// ## Issue-Title:
// WordUtils.abbreviate bug when lower is greater ... | 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 ... | |
@Test
public void testSmallDistances() {
// Create a bunch of CloseIntegerPoints. Most are identical, but one is different by a
// small distance.
int[] repeatedArray = { 0 };
int[] uniqueArray = { 1 };
CloseIntegerPoint repeatedPoint =
new CloseIntegerPoint(n... | org.apache.commons.math.stat.clustering.KMeansPlusPlusClustererTest::testSmallDistances | src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java | 249 | src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java | testSmallDistances | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testSmallDistances` for the issue `Math-MATH-546`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-546
//
// ## Issue-Title:
// Truncation issue in KMeansPlusPlusClusterer... | 249 | /**
* Test points that are very close together. See issue MATH-546.
*/ | 57 | 213 | src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-546
## Issue-Title:
Truncation issue in KMeansPlusPlusClusterer
## Issue-Description:
The for loop inside KMeansPlusPlusClusterer.chooseInitialClusters defines a variable
int sum = 0;
This variable should have type double, rather than int. Using an int causes the method to... | 213 | [
"org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer"
] | 71de60a0306b7aa5a2e1e3d9470587b4a8932733c9c2bad2d339f21da06966e2 | @Test
public void testSmallDistances() | // You are a professional Java test case writer, please create a test case named `testSmallDistances` for the issue `Math-MATH-546`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-546
//
// ## Issue-Title:
// Truncation issue in KMeansPlusPlusClusterer... | 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 ... | |
public void testIssue538() {
checkCompilesToSame( "/** @constructor */\n" +
"WebInspector.Setting = function() {}\n" +
"WebInspector.Setting.prototype = {\n" +
" get name0(){return this._name;},\n" +
" get name1(){return this._name;},\n" +
" get name2(){return... | com.google.javascript.jscomp.FunctionRewriterTest::testIssue538 | test/com/google/javascript/jscomp/FunctionRewriterTest.java | 179 | test/com/google/javascript/jscomp/FunctionRewriterTest.java | testIssue538 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testIssue538` for the issue `Closure-538`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-538
//
// ## Issue-Title:
// Exception when emitting code containing getters
//
/... | 179 | 55 | 164 | test/com/google/javascript/jscomp/FunctionRewriterTest.java | test | ```markdown
## Issue-ID: Closure-538
## Issue-Title:
Exception when emitting code containing getters
## Issue-Description:
Consider the following source code: http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/front-end/Settings.js#L123
Following exception fires unless I remove the "get name()" getter... | 164 | [
"com.google.javascript.jscomp.FunctionRewriter"
] | 71e22c9d3d5d76d5b005bae8930233044989bdc5da425fb12e927d110a0400c0 | public void testIssue538() | // You are a professional Java test case writer, please create a test case named `testIssue538` for the issue `Closure-538`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-538
//
// ## Issue-Title:
// Exception when emitting code containing getters
//
/... | 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... | ||
@Test public void settersOnOrphanAttribute() {
Attribute attr = new Attribute("one", "two");
attr.setKey("three");
String oldVal = attr.setValue("four");
assertEquals("two", oldVal);
assertEquals("three", attr.getKey());
assertEquals("four", attr.getValue());
... | org.jsoup.nodes.AttributeTest::settersOnOrphanAttribute | src/test/java/org/jsoup/nodes/AttributeTest.java | 48 | src/test/java/org/jsoup/nodes/AttributeTest.java | settersOnOrphanAttribute | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AttributeTest {
@Test public void html() {
Attribute attr = new Attribute("key", "value &");
assertEquals("key=\"value &\"", attr.html());
assertEquals(att... | // You are a professional Java test case writer, please create a test case named `settersOnOrphanAttribute` for the issue `Jsoup-1107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-1107
//
// ## Issue-Title:
// NPE in Attribute.setValue() for attribute w... | 48 | 89 | 40 | src/test/java/org/jsoup/nodes/AttributeTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-1107
## Issue-Title:
NPE in Attribute.setValue() for attribute without parent
## Issue-Description:
```
public String setValue(String val) {
String oldVal = parent.get(this.key);
if (parent != null) {
int i = parent.indexOfKey(this.key);
if... | 40 | [
"org.jsoup.nodes.Attribute"
] | 7218ba878311628d74a6ff44cd4b2853662342fba3ed6a4d3804a2790323f24f | @Test public void settersOnOrphanAttribute() | // You are a professional Java test case writer, please create a test case named `settersOnOrphanAttribute` for the issue `Jsoup-1107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-1107
//
// ## Issue-Title:
// NPE in Attribute.setValue() for attribute w... | Jsoup | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AttributeTest {
@Test public void html() {
Attribute attr = new Attribute("key", "value &");
assertEquals("key=\"value &\"", attr.html());
assertEquals(att... | ||
public void testRecordInference() {
inFunction(
"/** @param {{a: (boolean|undefined)}|{b: (string|undefined)}} x */" +
"function f(x) {}" +
"var out = {};" +
"f(out);");
assertEquals("{a: (boolean|undefined), b: (string|undefined)}",
getType("out").toString());
} | com.google.javascript.jscomp.TypeInferenceTest::testRecordInference | test/com/google/javascript/jscomp/TypeInferenceTest.java | 1,014 | test/com/google/javascript/jscomp/TypeInferenceTest.java | testRecordInference | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testRecordInference` for the issue `Closure-785`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-785
//
// ## Issue-Title:
// anonymous object type inference inconsistency ... | 1,014 | 166 | 1,006 | test/com/google/javascript/jscomp/TypeInferenceTest.java | test | ```markdown
## Issue-ID: Closure-785
## Issue-Title:
anonymous object type inference inconsistency when used in union
## Issue-Description:
Code:
/\*\* @param {{prop: string, prop2: (string|undefined)}} record \*/
var func = function(record) {
window.console.log(record.prop);
}
/\*\* @param {{prop: string, ... | 1,006 | [
"com.google.javascript.rhino.jstype.PrototypeObjectType"
] | 73378345445725fb540e35473f57fb62be7020020864ea9c90dddc0b1a30f647 | public void testRecordInference() | // You are a professional Java test case writer, please create a test case named `testRecordInference` for the issue `Closure-785`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-785
//
// ## Issue-Title:
// anonymous object type inference inconsistency ... | 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... | ||
public void testDateDeserializationISO8601() throws Exception {
DefaultDateTypeAdapter adapter = new DefaultDateTypeAdapter();
assertParsed("1970-01-01T00:00:00.000Z", adapter);
assertParsed("1970-01-01T00:00Z", adapter);
assertParsed("1970-01-01T00:00:00+00:00", adapter);
assertParsed("1970-01-01T... | com.google.gson.DefaultDateTypeAdapterTest::testDateDeserializationISO8601 | gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java | 133 | gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java | testDateDeserializationISO8601 | /*
* Copyright (C) 2008 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 agreed to ... | // You are a professional Java test case writer, please create a test case named `testDateDeserializationISO8601` for the issue `Gson-768`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Gson-768
//
// ## Issue-Title:
// ISO8601 is not fully implemented
//
// #... | 133 | 5 | 126 | gson/src/test/java/com/google/gson/DefaultDateTypeAdapterTest.java | gson/src/test/java | ```markdown
## Issue-ID: Gson-768
## Issue-Title:
ISO8601 is not fully implemented
## Issue-Description:
Hi guys,
I'm working on a project where I have to parse `2016-01-11T11:06:14.000-02` to java.util.Date which is a valid date according to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) on page 12.
But I got... | 126 | [
"com.google.gson.internal.bind.util.ISO8601Utils"
] | 733aff847b35cde65be97e0607dba0d99d2584c7e558e50683de67fd60127c34 | public void testDateDeserializationISO8601() throws Exception | // You are a professional Java test case writer, please create a test case named `testDateDeserializationISO8601` for the issue `Gson-768`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Gson-768
//
// ## Issue-Title:
// ISO8601 is not fully implemented
//
// #... | Gson | /*
* Copyright (C) 2008 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 agreed to ... | ||
@Test(expected=NumberIsTooLargeException.class)
public void testMath679() {
new OpenMapRealMatrix(3, Integer.MAX_VALUE);
} | org.apache.commons.math.linear.OpenMapRealMatrixTest::testMath679 | src/test/java/org/apache/commons/math/linear/OpenMapRealMatrixTest.java | 26 | src/test/java/org/apache/commons/math/linear/OpenMapRealMatrixTest.java | testMath679 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMath679` for the issue `Math-MATH-679`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-679
//
// ## Issue-Title:
// Integer overflow in OpenMapRealMatrix
//
// ## Is... | 26 | 45 | 23 | src/test/java/org/apache/commons/math/linear/OpenMapRealMatrixTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-679
## Issue-Title:
Integer overflow in OpenMapRealMatrix
## Issue-Description:
computeKey() has an integer overflow. Since it is a sparse matrix, this is quite easily encountered long before heap space is exhausted. The attached code demonstrates the problem, which could potenti... | 23 | [
"org.apache.commons.math.linear.OpenMapRealMatrix"
] | 73bc8736369edf4e77025d9915a04473b0a08fbf311ba32ccae514351a3babc9 | @Test(expected=NumberIsTooLargeException.class)
public void testMath679() | // You are a professional Java test case writer, please create a test case named `testMath679` for the issue `Math-MATH-679`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-679
//
// ## Issue-Title:
// Integer overflow in OpenMapRealMatrix
//
// ## Is... | 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 ... | ||
@Test
public void testGetLineNumberWithCR() throws Exception {
CSVParser parser = new CSVParser("a\rb\rc", CSVFormat.DEFAULT.withLineSeparator("\r"));
assertEquals(0, parser.getLineNumber());
assertNotNull(parser.getRecord());
assertEquals(1, parser.getLineNumber());
... | org.apache.commons.csv.CSVParserTest::testGetLineNumberWithCR | src/test/java/org/apache/commons/csv/CSVParserTest.java | 515 | src/test/java/org/apache/commons/csv/CSVParserTest.java | testGetLineNumberWithCR | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testGetLineNumberWithCR` for the issue `Csv-CSV-75`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-75
//
// ## Issue-Title:
// ExtendedBufferReader does not handle EOL con... | 515 | 1 | 503 | src/test/java/org/apache/commons/csv/CSVParserTest.java | src/test/java | ```markdown
## Issue-ID: Csv-CSV-75
## Issue-Title:
ExtendedBufferReader does not handle EOL consistently
## Issue-Description:
ExtendedBufferReader checks for '\n' (LF) in the read() methods, incrementing linecount when found.
However, the readLine() method calls BufferedReader.readLine() which treats CR, LF an... | 503 | [
"org.apache.commons.csv.ExtendedBufferedReader"
] | 74479ffa5f3d1eff5086f90f54cc4990d312d974eb83e567fb0f734d971f2bfb | @Test
public void testGetLineNumberWithCR() throws Exception | // You are a professional Java test case writer, please create a test case named `testGetLineNumberWithCR` for the issue `Csv-CSV-75`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-75
//
// ## Issue-Title:
// ExtendedBufferReader does not handle EOL con... | 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 ... | ||
public void testLocationOffsets() throws Exception
{
JsonParser parser = DEFAULT_F.createNonBlockingByteArrayParser();
ByteArrayFeeder feeder = (ByteArrayFeeder) parser.getNonBlockingInputFeeder();
byte[] input = utf8Bytes("[[[");
feeder.feedInput(input, 2, 3);
assertEq... | com.fasterxml.jackson.core.json.async.AsyncLocationTest::testLocationOffsets | src/test/java/com/fasterxml/jackson/core/json/async/AsyncLocationTest.java | 36 | src/test/java/com/fasterxml/jackson/core/json/async/AsyncLocationTest.java | testLocationOffsets | package com.fasterxml.jackson.core.json.async;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.async.AsyncTestBase;
import com.fasterxml.jackson.core.async.ByteArrayFeeder;
public class AsyncLocationTest extends AsyncTestBase
{
private final JsonFactory DEFAULT_F = new JsonFactory();
/... | // You are a professional Java test case writer, please create a test case named `testLocationOffsets` for the issue `JacksonCore-531`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-531
//
// ## Issue-Title:
// Non-blocking parser reports incorrect ... | 36 | // for [core#531] | 26 | 11 | src/test/java/com/fasterxml/jackson/core/json/async/AsyncLocationTest.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-531
## Issue-Title:
Non-blocking parser reports incorrect locations when fed with non-zero offset
## Issue-Description:
When feeding a non-blocking parser, the input array offset leaks into the offsets reported by `getCurrentLocation()` and `getTokenLocation()`.
For example, f... | 11 | [
"com.fasterxml.jackson.core.json.async.NonBlockingJsonParser"
] | 74cf61b24d9566ce3276db992a55297d5b3bbbaf156801bea4904f69aa3bf8dc | public void testLocationOffsets() throws Exception
| // You are a professional Java test case writer, please create a test case named `testLocationOffsets` for the issue `JacksonCore-531`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-531
//
// ## Issue-Title:
// Non-blocking parser reports incorrect ... | JacksonCore | package com.fasterxml.jackson.core.json.async;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.async.AsyncTestBase;
import com.fasterxml.jackson.core.async.ByteArrayFeeder;
public class AsyncLocationTest extends AsyncTestBase
{
private final JsonFactory DEFAULT_F = new JsonFactory();
/... | |
public void testWonkyNumber173() throws Exception
{
JsonPointer ptr = JsonPointer.compile("/1e0");
assertFalse(ptr.matches());
} | com.fasterxml.jackson.core.TestJsonPointer::testWonkyNumber173 | src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java | 42 | src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java | testWonkyNumber173 | package com.fasterxml.jackson.core;
import com.fasterxml.jackson.test.BaseTest;
public class TestJsonPointer extends BaseTest
{
public void testSimplePath() throws Exception
{
final String INPUT = "/Image/15/name";
JsonPointer ptr = JsonPointer.compile(INPUT);
assertFalse(ptr.matches(... | // You are a professional Java test case writer, please create a test case named `testWonkyNumber173` for the issue `JacksonCore-173`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-173
//
// ## Issue-Title:
// An exception is thrown for a valid Json... | 42 | 5 | 38 | src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-173
## Issue-Title:
An exception is thrown for a valid JsonPointer expression
## Issue-Description:
Json-Patch project leader has noted me that there is a bug on JsonPointer implementation and I have decided to investigate.
Basically if you do something like `JsonPointer.compi... | 38 | [
"com.fasterxml.jackson.core.JsonPointer"
] | 754589f118a4d5c9560555ac6418741d914788c077610a8d03bdb59994623ee3 | public void testWonkyNumber173() throws Exception
| // You are a professional Java test case writer, please create a test case named `testWonkyNumber173` for the issue `JacksonCore-173`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-173
//
// ## Issue-Title:
// An exception is thrown for a valid Json... | JacksonCore | package com.fasterxml.jackson.core;
import com.fasterxml.jackson.test.BaseTest;
public class TestJsonPointer extends BaseTest
{
public void testSimplePath() throws Exception
{
final String INPUT = "/Image/15/name";
JsonPointer ptr = JsonPointer.compile(INPUT);
assertFalse(ptr.matches(... | ||
public void testLang328() {
assertValidToLocale("fr__POSIX", "fr", "", "POSIX");
} | org.apache.commons.lang.LocaleUtilsTest::testLang328 | src/test/org/apache/commons/lang/LocaleUtilsTest.java | 505 | src/test/org/apache/commons/lang/LocaleUtilsTest.java | testLang328 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testLang328` for the issue `Lang-LANG-328`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-328
//
// ## Issue-Title:
// LocaleUtils.toLocale() rejects strings with only l... | 505 | /**
* Tests #LANG-328 - only language+variant
*/ | 54 | 503 | src/test/org/apache/commons/lang/LocaleUtilsTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-328
## Issue-Title:
LocaleUtils.toLocale() rejects strings with only language+variant
## Issue-Description:
LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr\_\_POSIX
This string can be produced with ... | 503 | [
"org.apache.commons.lang.LocaleUtils"
] | 75512a7223215d47f431aeab8f88a694e1bf1111eb04615aeb62aad80742abdc | public void testLang328() | // You are a professional Java test case writer, please create a test case named `testLang328` for the issue `Lang-LANG-328`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-328
//
// ## Issue-Title:
// LocaleUtils.toLocale() rejects strings with only 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 ... | |
public void testContainsIgnoreCase_LocaleIndependence() {
Locale orig = Locale.getDefault();
Locale[] locales = { Locale.ENGLISH, new Locale("tr"), Locale.getDefault() };
String[][] tdata = {
{ "i", "I" },
{ "I", "i" },
{ "\u03C2", "\u03C3" },
... | org.apache.commons.lang.StringUtilsEqualsIndexOfTest::testContainsIgnoreCase_LocaleIndependence | src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java | 347 | src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java | testContainsIgnoreCase_LocaleIndependence | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testContainsIgnoreCase_LocaleIndependence` for the issue `Lang-LANG-432`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-432
//
// ## Issue-Title:
// Fix case-insensitive... | 347 | 40 | 315 | src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-432
## Issue-Title:
Fix case-insensitive string handling
## Issue-Description:
String.to\*Case() is locale-sensitive, this is usually not intended for case-insensitive comparisions. Please see [Common Bug #3](http://www.nabble.com/Re%3A-Common-Bugs-p14931921s177.html) for details... | 315 | [
"org.apache.commons.lang.StringUtils"
] | 75a14e0c8b6dee707b891af6c0206d2558da56e6d49ce1884a129fea03e08799 | public void testContainsIgnoreCase_LocaleIndependence() | // You are a professional Java test case writer, please create a test case named `testContainsIgnoreCase_LocaleIndependence` for the issue `Lang-LANG-432`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-432
//
// ## Issue-Title:
// Fix case-insensitive... | 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 ... | ||
public void testIssue779() {
testNotMissing(
"var a = f(); try { alert(); if (a > 0) return 1; }" +
"finally { a = 5; } return 2;");
} | com.google.javascript.jscomp.CheckMissingReturnTest::testIssue779 | test/com/google/javascript/jscomp/CheckMissingReturnTest.java | 197 | test/com/google/javascript/jscomp/CheckMissingReturnTest.java | testIssue779 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testIssue779` for the issue `Closure-779`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-779
//
// ## Issue-Title:
// bogus 'missing return' warning
//
// ## Issue-Descri... | 197 | 14 | 193 | test/com/google/javascript/jscomp/CheckMissingReturnTest.java | test | ```markdown
## Issue-ID: Closure-779
## Issue-Title:
bogus 'missing return' warning
## Issue-Description:
The following sample code compiles with "Missing return statement. Function expected to return boolean." warning:
/\*\*
\* @return {boolean}
\*/
function fb(a)
{
try
{
alert(a); // Some method, w... | 193 | [
"com.google.javascript.jscomp.ControlFlowAnalysis"
] | 76b2627c4f07659475184fe2e7d8fee81654de85de0fdddb31c46f022bc131ee | public void testIssue779() | // You are a professional Java test case writer, please create a test case named `testIssue779` for the issue `Closure-779`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-779
//
// ## Issue-Title:
// bogus 'missing return' warning
//
// ## Issue-Descri... | 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... | ||
@Test public void handlesAbsPrefixOnHasAttr() {
// 1: no abs url; 2: has abs url
Document doc = Jsoup.parse("<a id=1 href='/foo'>One</a> <a id=2 href='http://jsoup.org/'>Two</a>");
Element one = doc.select("#1").first();
Element two = doc.select("#2").first();
assertFalse(on... | org.jsoup.nodes.NodeTest::handlesAbsPrefixOnHasAttr | src/test/java/org/jsoup/nodes/NodeTest.java | 61 | src/test/java/org/jsoup/nodes/NodeTest.java | handlesAbsPrefixOnHasAttr | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.parser.Tag;
import org.junit.Test;
import static org.junit.Assert.*;
/**
Tests Nodes
@author Jonathan Hedley, jonathan@hedley.net */
public class NodeTest {
@Test public void handlesBaseUri() {
Tag tag = Tag.va... | // You are a professional Java test case writer, please create a test case named `handlesAbsPrefixOnHasAttr` for the issue `Jsoup-97`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-97
//
// ## Issue-Title:
// abs: attribute prefix does not work on Element... | 61 | 13 | 48 | src/test/java/org/jsoup/nodes/NodeTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-97
## Issue-Title:
abs: attribute prefix does not work on Elements.attr()
## Issue-Description:
Elements.attr() iterates on its element to look for the first one with the given attrbute.
If I try to get the attribute abs:href, the test element.hasAttr("abs:herf") fails, and the retu... | 48 | [
"org.jsoup.nodes.Node"
] | 76f47fdb89bf1d44aa10d10a94bb5e278d374722bb40b1cf73dfe7652499e45a | @Test public void handlesAbsPrefixOnHasAttr() | // You are a professional Java test case writer, please create a test case named `handlesAbsPrefixOnHasAttr` for the issue `Jsoup-97`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-97
//
// ## Issue-Title:
// abs: attribute prefix does not work on Element... | Jsoup | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.parser.Tag;
import org.junit.Test;
import static org.junit.Assert.*;
/**
Tests Nodes
@author Jonathan Hedley, jonathan@hedley.net */
public class NodeTest {
@Test public void handlesBaseUri() {
Tag tag = Tag.va... | ||
public void testSingletonGetter1() {
CompilerOptions options = createCompilerOptions();
CompilationLevel.ADVANCED_OPTIMIZATIONS
.setOptionsForCompilationLevel(options);
options.setCodingConvention(new ClosureCodingConvention());
test(options,
"/** @const */\n" +
"var goog = goo... | com.google.javascript.jscomp.IntegrationTest::testSingletonGetter1 | test/com/google/javascript/jscomp/IntegrationTest.java | 1,956 | test/com/google/javascript/jscomp/IntegrationTest.java | testSingletonGetter1 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testSingletonGetter1` for the issue `Closure-668`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-668
//
// ## Issue-Title:
// goog.addSingletonGetter prevents unused class... | 1,956 | 36 | 1,936 | test/com/google/javascript/jscomp/IntegrationTest.java | test | ```markdown
## Issue-ID: Closure-668
## Issue-Title:
goog.addSingletonGetter prevents unused class removal
## Issue-Description:
**What steps will reproduce the problem?**
// ==ClosureCompiler==
// @compilation\_level ADVANCED\_OPTIMIZATIONS
// @output\_file\_name default.js
// @use\_closure\_library true
// ... | 1,936 | [
"com.google.javascript.jscomp.InlineVariables"
] | 77aa0aed1809e86e43b5da3f38514fdedf9bb68b26b7dce6ed9acbaa650f74eb | public void testSingletonGetter1() | // You are a professional Java test case writer, please create a test case named `testSingletonGetter1` for the issue `Closure-668`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-668
//
// ## Issue-Title:
// goog.addSingletonGetter prevents unused class... | 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... | ||
public void testIssue700() throws Exception {
testTypes(
"/**\n" +
" * @param {{text: string}} opt_data\n" +
" * @return {string}\n" +
" */\n" +
"function temp1(opt_data) {\n" +
" return opt_data.text;\n" +
"}\n" +
"\n" +
"/**\n" +
"... | com.google.javascript.jscomp.TypeCheckTest::testIssue700 | test/com/google/javascript/jscomp/TypeCheckTest.java | 5,815 | test/com/google/javascript/jscomp/TypeCheckTest.java | testIssue700 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testIssue700` for the issue `Closure-700`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-700
//
// ## Issue-Title:
// weird object literal invalid property error on unrela... | 5,815 | 33 | 5,775 | test/com/google/javascript/jscomp/TypeCheckTest.java | test | ```markdown
## Issue-ID: Closure-700
## Issue-Title:
weird object literal invalid property error on unrelated object prototype
## Issue-Description:
Apologies in advance for the convoluted repro case and the vague summary.
Compile the following code (attached as repro.js) with:
java -jar build/compiler.jar --co... | 5,775 | [
"com.google.javascript.rhino.jstype.PrototypeObjectType"
] | 7938ce18334029daf23cb96a1507f8f02ef479515b108bd14e62ffe1e0286089 | public void testIssue700() throws Exception | // You are a professional Java test case writer, please create a test case named `testIssue700` for the issue `Closure-700`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-700
//
// ## Issue-Title:
// weird object literal invalid property error on unrela... | 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... | ||
public void testNestedTypeCheck1735() throws Exception
{
try {
MAPPER.readValue(aposToQuotes(
"{'w':{'type':'java.util.HashMap<java.lang.String,java.lang.String>'}}"),
Wrapper1735.class);
fail("Should not pass");
} catch (JsonMappingException e) {
... | com.fasterxml.jackson.databind.jsontype.GenericTypeId1735Test::testNestedTypeCheck1735 | src/test/java/com/fasterxml/jackson/databind/jsontype/GenericTypeId1735Test.java | 62 | src/test/java/com/fasterxml/jackson/databind/jsontype/GenericTypeId1735Test.java | testNestedTypeCheck1735 | package com.fasterxml.jackson.databind.jsontype;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.*;
// for [databind#1735]:
public class GenericTypeId1735Test extends BaseMapTest
{
static class Wrapper1735 {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property =... | // You are a professional Java test case writer, please create a test case named `testNestedTypeCheck1735` for the issue `JacksonDatabind-1735`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1735
//
// ## Issue-Title:
// Missing type checks when... | 62 | // but this was not being verified early enough | 88 | 52 | src/test/java/com/fasterxml/jackson/databind/jsontype/GenericTypeId1735Test.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-1735
## Issue-Title:
Missing type checks when using polymorphic type ids
## Issue-Description:
(report by Lukes Euler)
`JavaType` supports limited amount of generic typing for textual representation, originally just to support typing needed for `EnumMap` (I think). Based o... | 52 | [
"com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver"
] | 798076d44fe7545aceaa07a180af8314e184b1e6ae2f687a4c4df4b2fc75def2 | public void testNestedTypeCheck1735() throws Exception
| // You are a professional Java test case writer, please create a test case named `testNestedTypeCheck1735` for the issue `JacksonDatabind-1735`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1735
//
// ## Issue-Title:
// Missing type checks when... | JacksonDatabind | package com.fasterxml.jackson.databind.jsontype;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.*;
// for [databind#1735]:
public class GenericTypeId1735Test extends BaseMapTest
{
static class Wrapper1735 {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property =... | |
public void testExpressionInForIn() {
assertLiveBeforeX("var a = [0]; X:for (a[1] in foo) { }", "a");
} | com.google.javascript.jscomp.LiveVariableAnalysisTest::testExpressionInForIn | test/com/google/javascript/jscomp/LiveVariableAnalysisTest.java | 210 | test/com/google/javascript/jscomp/LiveVariableAnalysisTest.java | testExpressionInForIn | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testExpressionInForIn` for the issue `Closure-528`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-528
//
// ## Issue-Title:
// Online CC bug: report java error.
//
// ## ... | 210 | 58 | 208 | test/com/google/javascript/jscomp/LiveVariableAnalysisTest.java | test | ```markdown
## Issue-ID: Closure-528
## Issue-Title:
Online CC bug: report java error.
## Issue-Description:
**What steps will reproduce the problem?**
1. open http://closure-compiler.appspot.com/
2. input js code:
function keys(obj) {
var a = [], i = 0;
for (a[i++] in obj)
;
return a;
}
3. press [com... | 208 | [
"com.google.javascript.jscomp.LiveVariablesAnalysis"
] | 799dee72411592e340952ee55b93d630633b9c48d0927e2660b55134298b83fa | public void testExpressionInForIn() | // You are a professional Java test case writer, please create a test case named `testExpressionInForIn` for the issue `Closure-528`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-528
//
// ## Issue-Title:
// Online CC bug: report java error.
//
// ## ... | 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... | ||
public void testMathpbx02() {
double[] mainTridiagonal = {
7484.860960227216, 18405.28129035345, 13855.225609560746,
10016.708722343366, 559.8117399576674, 6750.190788301587,
71.21428769782159
};
double[] secondaryTridiagonal = {
-4175.0885704763... | org.apache.commons.math.linear.EigenDecompositionImplTest::testMathpbx02 | src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java | 188 | src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java | testMathpbx02 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMathpbx02` for the issue `Math-MATH-318`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-318
//
// ## Issue-Title:
// wrong result in eigen decomposition
//
// ## Is... | 188 | 80 | 144 | src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-318
## Issue-Title:
wrong result in eigen decomposition
## Issue-Description:
Some results computed by EigenDecompositionImpl are wrong. The following case computed by Fortran Lapack fails with version 2.0
```
public void testMathpbx02() {
double[] mainTridiagona... | 144 | [
"org.apache.commons.math.linear.EigenDecompositionImpl"
] | 79a2711195f47bf12735df29374553ae6e7130d66000fe59d2565e7bf4dc8bc9 | public void testMathpbx02() | // You are a professional Java test case writer, please create a test case named `testMathpbx02` for the issue `Math-MATH-318`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-318
//
// ## Issue-Title:
// wrong result in eigen decomposition
//
// ## Is... | 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 ... | ||
public void testSimple() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
final String json = aposToQuotes("{'schemas': [{\n"
+ " 'name': 'FoodMart'\n"
+ "}]}\n");
mapper.readValue(json, JsonRoot.class);
} | com.fasterxml.jackson.databind.objectid.Objecid1083Test::testSimple | src/test/java/com/fasterxml/jackson/databind/objectid/Objecid1083Test.java | 43 | src/test/java/com/fasterxml/jackson/databind/objectid/Objecid1083Test.java | testSimple | package com.fasterxml.jackson.databind.objectid;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
public class Objecid1083Test extends BaseMapTest
{
public static class JsonRoot {
public final List<JsonSchema> s... | // You are a professional Java test case writer, please create a test case named `testSimple` for the issue `JacksonDatabind-1083`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1083
//
// ## Issue-Title:
// Field in base class is not recognized... | 43 | /*
/*****************************************************
/* Unit tests, external id deserialization
/*****************************************************
*/ | 37 | 37 | src/test/java/com/fasterxml/jackson/databind/objectid/Objecid1083Test.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-1083
## Issue-Title:
Field in base class is not recognized, when using @JsonType.defaultImpl
## Issue-Description:
When deserializing JSON to Java POJOS, a field inherited from a base class is not recognized. Here is the stack:
```
com.fasterxml.jackson.databind.exc.Unrec... | 37 | [
"com.fasterxml.jackson.databind.type.SimpleType"
] | 7ab1bdb2549a1c95c52fab025190831402080f55ff044590ef1f4f84bf7d7655 | public void testSimple() throws Exception | // You are a professional Java test case writer, please create a test case named `testSimple` for the issue `JacksonDatabind-1083`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-1083
//
// ## Issue-Title:
// Field in base class is not recognized... | JacksonDatabind | package com.fasterxml.jackson.databind.objectid;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
public class Objecid1083Test extends BaseMapTest
{
public static class JsonRoot {
public final List<JsonSchema> s... | |
@Test
public void testMinimizeMaximize()
throws FunctionEvaluationException, ConvergenceException {
// the following function has 4 local extrema:
final double xM = -3.841947088256863675365;
final double yM = -1.391745200270734924416;
final double xP = 0.22866822... | org.apache.commons.math.optimization.direct.MultiDirectionalTest::testMinimizeMaximize | src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java | 127 | src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java | testMinimizeMaximize | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMinimizeMaximize` for the issue `Math-MATH-283`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-283
//
// ## Issue-Title:
// MultiDirectional optimzation loops forver... | 127 | 84 | 68 | src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-283
## Issue-Title:
MultiDirectional optimzation loops forver if started at the correct solution
## Issue-Description:
MultiDirectional.iterateSimplex loops forever if the starting point is the correct solution.
see the attached test case (testMultiDirectionalCorrectStart) as a... | 68 | [
"org.apache.commons.math.optimization.direct.MultiDirectional"
] | 7bceba76534ac7dc7561e726cde4d805e5694c2e374f85f211eafd337242ed31 | @Test
public void testMinimizeMaximize()
throws FunctionEvaluationException, ConvergenceException | // You are a professional Java test case writer, please create a test case named `testMinimizeMaximize` for the issue `Math-MATH-283`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-283
//
// ## Issue-Title:
// MultiDirectional optimzation loops forver... | 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 ... | ||
public void testContainsAnyCharArrayWithSupplementaryChars() {
assertEquals(true, StringUtils.containsAny(CharU20000 + CharU20001, CharU20000.toCharArray()));
assertEquals(true, StringUtils.containsAny(CharU20000 + CharU20001, CharU20001.toCharArray()));
assertEquals(true, StringUtils.containsAny(CharU20000, Cha... | org.apache.commons.lang3.StringUtilsEqualsIndexOfTest::testContainsAnyCharArrayWithSupplementaryChars | src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java | 697 | src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java | testContainsAnyCharArrayWithSupplementaryChars | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testContainsAnyCharArrayWithSupplementaryChars` for the issue `Lang-LANG-607`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-607
//
// ## Issue-Title:
// StringUtils met... | 697 | /**
* See http://java.sun.com/developer/technicalArticles/Intl/Supplementary/
*/ | 31 | 686 | src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java | src/test/java | ```markdown
## Issue-ID: Lang-LANG-607
## Issue-Title:
StringUtils methods do not handle Unicode 2.0+ supplementary characters correctly.
## Issue-Description:
StringUtils.containsAny methods incorrectly matches Unicode 2.0+ supplementary characters.
For example, define a test fixture to be the Unicode character... | 686 | [
"org.apache.commons.lang3.StringUtils"
] | 7beb15d4366eb6e820d91951d7e7606344d29a48ec64fe37201adcd28ca62008 | public void testContainsAnyCharArrayWithSupplementaryChars() | // You are a professional Java test case writer, please create a test case named `testContainsAnyCharArrayWithSupplementaryChars` for the issue `Lang-LANG-607`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-607
//
// ## Issue-Title:
// StringUtils met... | 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 ... | |
public void testInverseExternalId928() throws Exception
{
final String CLASS = Payload928.class.getName();
ObjectMapper mapper = new ObjectMapper();
final String successCase = "{\"payload\":{\"something\":\"test\"},\"class\":\""+CLASS+"\"}";
Envelope928 envelope1 = mapper.readV... | com.fasterxml.jackson.databind.jsontype.TestExternalId::testInverseExternalId928 | src/test/java/com/fasterxml/jackson/databind/jsontype/TestExternalId.java | 497 | src/test/java/com/fasterxml/jackson/databind/jsontype/TestExternalId.java | testInverseExternalId928 | package com.fasterxml.jackson.databind.jsontype;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.Obj... | // You are a professional Java test case writer, please create a test case named `testInverseExternalId928` for the issue `JacksonDatabind-928`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-928
//
// ## Issue-Title:
// Problem deserializing Ext... | 497 | // [databind#928] | 27 | 481 | src/test/java/com/fasterxml/jackson/databind/jsontype/TestExternalId.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-928
## Issue-Title:
Problem deserializing External Type Id if type id comes before POJO
## Issue-Description:
(note: seems to be similar or related to [FasterXML/jackson-module-afterburner#58](https://github.com/FasterXML/jackson-module-afterburner/issues/58))
With 2.6, lo... | 481 | [
"com.fasterxml.jackson.databind.deser.BeanDeserializer"
] | 7c1b1d64149ad3cbec36f0ea8a644e9cf4e659edd2962646bbd9531ac6ef1037 | public void testInverseExternalId928() throws Exception
| // You are a professional Java test case writer, please create a test case named `testInverseExternalId928` for the issue `JacksonDatabind-928`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-928
//
// ## Issue-Title:
// Problem deserializing Ext... | JacksonDatabind | package com.fasterxml.jackson.databind.jsontype;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.Obj... | |
public void testForOffsetHoursMinutes_int_int() {
assertEquals(DateTimeZone.UTC, DateTimeZone.forOffsetHoursMinutes(0, 0));
assertEquals(DateTimeZone.forID("+23:59"), DateTimeZone.forOffsetHoursMinutes(23, 59));
assertEquals(DateTimeZone.forID("+02:15"), DateTimeZone.forOffsetHoursM... | org.joda.time.TestDateTimeZone::testForOffsetHoursMinutes_int_int | src/test/java/org/joda/time/TestDateTimeZone.java | 338 | src/test/java/org/joda/time/TestDateTimeZone.java | testForOffsetHoursMinutes_int_int | /*
* Copyright 2001-2013 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... | // You are a professional Java test case writer, please create a test case named `testForOffsetHoursMinutes_int_int` for the issue `Time-42`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-42
//
// ## Issue-Title:
// DateTimeZone.forOffsetHoursMinutes canno... | 338 | //----------------------------------------------------------------------- | 8 | 302 | src/test/java/org/joda/time/TestDateTimeZone.java | src/test/java | ```markdown
## Issue-ID: Time-42
## Issue-Title:
DateTimeZone.forOffsetHoursMinutes cannot handle negative offset < 1 hour
## Issue-Description:
`DateTimeZone.forOffsetHoursMinutes(h,m)` cannot handle negative offset < 1 hour like `-0:30` due to argument range checking. I used `forOffsetMillis()` instead.
This sh... | 302 | [
"org.joda.time.DateTimeZone"
] | 7c6c9aae04dcc9c095ba553c27286a63acd78d39f2d419f2d2aeb309788b1c95 | public void testForOffsetHoursMinutes_int_int() | // You are a professional Java test case writer, please create a test case named `testForOffsetHoursMinutes_int_int` for the issue `Time-42`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-42
//
// ## Issue-Title:
// DateTimeZone.forOffsetHoursMinutes canno... | Time | /*
* Copyright 2001-2013 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... | |
@Test public void testClonesClassnames() {
Document doc = Jsoup.parse("<div class='one two'></div>");
Element div = doc.select("div").first();
Set<String> classes = div.classNames();
assertEquals(2, classes.size());
assertTrue(classes.contains("one"));
assertTrue(clas... | org.jsoup.nodes.ElementTest::testClonesClassnames | src/test/java/org/jsoup/nodes/ElementTest.java | 499 | src/test/java/org/jsoup/nodes/ElementTest.java | testClonesClassnames | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.parser.Tag;
import org.jsoup.select.Elements;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.... | // You are a professional Java test case writer, please create a test case named `testClonesClassnames` for the issue `Jsoup-278`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-278
//
// ## Issue-Title:
// Element.clone() wrongly shared a same classNames ... | 499 | 32 | 476 | src/test/java/org/jsoup/nodes/ElementTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-278
## Issue-Title:
Element.clone() wrongly shared a same classNames Set instance
## Issue-Description:
In the clone() method of Node, the Object.clone() is called, if the original element's classNames Set had been initialized before clone, the original classNames Set will be set to t... | 476 | [
"org.jsoup.nodes.Element"
] | 7ce1e39f3ff949f2ae90a29e858145e371f14ce0782d3981c0104c89d6b50587 | @Test public void testClonesClassnames() | // You are a professional Java test case writer, please create a test case named `testClonesClassnames` for the issue `Jsoup-278`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-278
//
// ## Issue-Title:
// Element.clone() wrongly shared a same classNames ... | Jsoup | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.parser.Tag;
import org.jsoup.select.Elements;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.... | ||
public void testParseLocalDate_weekyear_month_week_2010() {
Chronology chrono = GJChronology.getInstanceUTC();
DateTimeFormatter f = DateTimeFormat.forPattern("xxxx-MM-ww").withChronology(chrono);
assertEquals(new LocalDate(2010, 1, 4, chrono), f.parseLocalDate("2010-01-01"));
} | org.joda.time.format.TestDateTimeFormatter::testParseLocalDate_weekyear_month_week_2010 | src/test/java/org/joda/time/format/TestDateTimeFormatter.java | 428 | src/test/java/org/joda/time/format/TestDateTimeFormatter.java | testParseLocalDate_weekyear_month_week_2010 | /*
* Copyright 2001-2011 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... | // You are a professional Java test case writer, please create a test case named `testParseLocalDate_weekyear_month_week_2010` for the issue `Time-107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-107
//
// ## Issue-Title:
// #107 Incorrect date parsed w... | 428 | 24 | 424 | src/test/java/org/joda/time/format/TestDateTimeFormatter.java | src/test/java | ```markdown
## Issue-ID: Time-107
## Issue-Title:
#107 Incorrect date parsed when week and month used together
## Issue-Description:
I have following code snippet :
```
DateTimeFormatter dtf = DateTimeFormat.forPattern("xxxxMM'w'ww");
DateTime dt = dtf.parseDateTime("201101w01");
System.out.printl... | 424 | [
"org.joda.time.format.DateTimeParserBucket"
] | 7d8784779bd09c304f2cf70f9bb0e1d2494e77e153c91b5a26ae4964a4a07d24 | public void testParseLocalDate_weekyear_month_week_2010() | // You are a professional Java test case writer, please create a test case named `testParseLocalDate_weekyear_month_week_2010` for the issue `Time-107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-107
//
// ## Issue-Title:
// #107 Incorrect date parsed w... | Time | /*
* Copyright 2001-2011 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... | ||
public void testCodec112() { // size calculation assumes always chunked
byte[] in = new byte[] {0};
byte[] out=Base64.encodeBase64(in);
Base64.encodeBase64(in, false, false, out.length);
} | org.apache.commons.codec.binary.Base64Test::testCodec112 | src/test/org/apache/commons/codec/binary/Base64Test.java | 343 | src/test/org/apache/commons/codec/binary/Base64Test.java | testCodec112 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testCodec112` for the issue `Codec-CODEC-112`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-112
//
// ## Issue-Title:
// Base64.encodeBase64(byte[] binaryData, boolea... | 343 | 9 | 339 | src/test/org/apache/commons/codec/binary/Base64Test.java | src/test | ```markdown
## Issue-ID: Codec-CODEC-112
## Issue-Title:
Base64.encodeBase64(byte[] binaryData, boolean isChunked, boolean urlSafe, int maxResultSize) throws IAE for valid maxResultSize if isChunked is false
## Issue-Description:
If isChunked is false, Base64.encodeBase64(byte[] binaryData, boolean isChunked, bool... | 339 | [
"org.apache.commons.codec.binary.Base64"
] | 7d90f257853357655db3f4c468a96d64ff6f3d7ebf6f5fb9794c7a692a1d8ed3 | public void testCodec112() | // You are a professional Java test case writer, please create a test case named `testCodec112` for the issue `Codec-CODEC-112`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-112
//
// ## Issue-Title:
// Base64.encodeBase64(byte[] binaryData, boolea... | 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 ... | ||
public void testDontRemoveBreakInTryFinally() throws Exception {
foldSame("function f() {b:try{throw 9} finally {break b} return 1;}");
} | com.google.javascript.jscomp.MinimizeExitPointsTest::testDontRemoveBreakInTryFinally | test/com/google/javascript/jscomp/MinimizeExitPointsTest.java | 276 | test/com/google/javascript/jscomp/MinimizeExitPointsTest.java | testDontRemoveBreakInTryFinally | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testDontRemoveBreakInTryFinally` for the issue `Closure-936`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-936
//
// ## Issue-Title:
// Break in finally block isn't optim... | 276 | 126 | 274 | test/com/google/javascript/jscomp/MinimizeExitPointsTest.java | test | ```markdown
## Issue-ID: Closure-936
## Issue-Title:
Break in finally block isn't optimized properly
## Issue-Description:
b: try { throw("throw me") } finally { /\* fake catcher \*/ ; break b }; console.log("ok then...")
... gets optimized into ...
throw"throw me";
... which is not the same.
The break... | 274 | [
"com.google.javascript.jscomp.MinimizeExitPoints"
] | 7d9d054f93de2de6f575788a8da1fb9a9d85ac5b8b629d4550c4174db46eaa84 | public void testDontRemoveBreakInTryFinally() throws Exception | // You are a professional Java test case writer, please create a test case named `testDontRemoveBreakInTryFinally` for the issue `Closure-936`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-936
//
// ## Issue-Title:
// Break in finally block isn't optim... | 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... | ||
@Test public void parsesQuiteRoughAttributes() {
String html = "<p =a>One<a =a";
Document doc = Jsoup.parse(html);
assertEquals("<p>One<a></a></p>", doc.body().html());
doc = Jsoup.parse("<p .....");
assertEquals("<p></p>", doc.body().html());
doc = ... | org.jsoup.parser.ParserTest::parsesQuiteRoughAttributes | src/test/java/org/jsoup/parser/ParserTest.java | 52 | src/test/java/org/jsoup/parser/ParserTest.java | parsesQuiteRoughAttributes | package org.jsoup.parser;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.nodes.Comment;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.TextNode;
import org.jsoup.select.Elements;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert... | // You are a professional Java test case writer, please create a test case named `parsesQuiteRoughAttributes` for the issue `Jsoup-32`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-32
//
// ## Issue-Title:
// StringIndexOutOfBoundsException when testing ... | 52 | 5 | 42 | src/test/java/org/jsoup/parser/ParserTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-32
## Issue-Title:
StringIndexOutOfBoundsException when testing whether String content is valid HTML
## Issue-Description:
If I try to parse a tag with an equals sign (an empty attribute) but without any single or double quotes around an attribute value, then I get a StringIndexOutOfB... | 42 | [
"org.jsoup.parser.Parser"
] | 7e2665b68e2145c6cf252864e46a6f91fe6c280939237a5f920ccd31ae0b5af6 | @Test public void parsesQuiteRoughAttributes() | // You are a professional Java test case writer, please create a test case named `parsesQuiteRoughAttributes` for the issue `Jsoup-32`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-32
//
// ## Issue-Title:
// StringIndexOutOfBoundsException when testing ... | Jsoup | package org.jsoup.parser;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.nodes.Comment;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.TextNode;
import org.jsoup.select.Elements;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert... | ||
public void testCustomMapValueDeser735() throws Exception {
String json = "{\"map1\":{\"a\":1},\"map2\":{\"a\":1}}";
TestMapBean735 bean = MAPPER.readValue(json, TestMapBean735.class);
assertEquals(100, bean.map1.get("a").intValue());
assertEquals(1, bean.map2.get("a").intValue());
... | com.fasterxml.jackson.databind.deser.TestCustomDeserializers::testCustomMapValueDeser735 | src/test/java/com/fasterxml/jackson/databind/deser/TestCustomDeserializers.java | 370 | src/test/java/com/fasterxml/jackson/databind/deser/TestCustomDeserializers.java | testCustomMapValueDeser735 | package com.fasterxml.jackson.databind.deser;
import java.io.*;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml... | // You are a professional Java test case writer, please create a test case named `testCustomMapValueDeser735` for the issue `JacksonDatabind-735`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-735
//
// ## Issue-Title:
// @JsonDeserialize on Map... | 370 | // [databind#735]: erroneous application of custom deserializer | 12 | 364 | src/test/java/com/fasterxml/jackson/databind/deser/TestCustomDeserializers.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-735
## Issue-Title:
@JsonDeserialize on Map with contentUsing custom deserializer overwrites default behavior
## Issue-Description:
I recently updated from version 2.3.3 to 2.5.1 and encountered a new issue with our custom deserializers. They either seemed to stop working or... | 364 | [
"com.fasterxml.jackson.databind.deser.std.MapDeserializer"
] | 7ecec775c59b200c1c47892ac1aba008f8100ed9c986feca92dceda06d3af47d | public void testCustomMapValueDeser735() throws Exception | // You are a professional Java test case writer, please create a test case named `testCustomMapValueDeser735` for the issue `JacksonDatabind-735`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-735
//
// ## Issue-Title:
// @JsonDeserialize on Map... | JacksonDatabind | package com.fasterxml.jackson.databind.deser;
import java.io.*;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml... | |
public void testIssue284() {
CompilerOptions options = createCompilerOptions();
options.smartNameRemoval = true;
test(options,
"var goog = {};" +
"goog.inherits = function(x, y) {};" +
"var ns = {};" +
"/** @constructor */" +
"ns.PageSelectionModel = function() {};"... | com.google.javascript.jscomp.IntegrationTest::testIssue284 | test/com/google/javascript/jscomp/IntegrationTest.java | 1,781 | test/com/google/javascript/jscomp/IntegrationTest.java | testIssue284 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testIssue284` for the issue `Closure-284`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-284
//
// ## Issue-Title:
// smartNameRemoval causing compiler crash
//
// ## Iss... | 1,781 | 40 | 1,765 | test/com/google/javascript/jscomp/IntegrationTest.java | test | ```markdown
## Issue-ID: Closure-284
## Issue-Title:
smartNameRemoval causing compiler crash
## Issue-Description:
**What steps will reproduce the problem?**
Compiler the following code in advanced mode:
{{{
var goog = {};
goog.inherits = function(x, y) {};
var ns = {};
/\*\* @constructor \*/ ns.PageSelectio... | 1,765 | [
"com.google.javascript.jscomp.NameAnalyzer"
] | 7ed74e2a02ac5a5c5d87c50e8d177187d5208dbf8fb09783a33416c19abf0b5a | public void testIssue284() | // You are a professional Java test case writer, please create a test case named `testIssue284` for the issue `Closure-284`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-284
//
// ## Issue-Title:
// smartNameRemoval causing compiler crash
//
// ## Iss... | 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... | ||
public void testMinpackJennrichSampson() {
minpackTest(new JennrichSampsonFunction(10, new double[] { 0.3, 0.4 },
64.5856498144943, 11.1517793413499,
new double[] {
// 0.2578330049, ... | org.apache.commons.math.optimization.general.MinpackTest::testMinpackJennrichSampson | src/test/java/org/apache/commons/math/optimization/general/MinpackTest.java | 330 | src/test/java/org/apache/commons/math/optimization/general/MinpackTest.java | testMinpackJennrichSampson | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMinpackJennrichSampson` for the issue `Math-MATH-405`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-405
//
// ## Issue-Title:
// Inconsistent result from Levenberg-... | 330 | 64 | 323 | src/test/java/org/apache/commons/math/optimization/general/MinpackTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-405
## Issue-Title:
Inconsistent result from Levenberg-Marquardt
## Issue-Description:
Levenberg-Marquardt (its method doOptimize) returns a VectorialPointValuePair. However, the class holds the optimum point, the vector of the objective function, the cost and residuals. The valu... | 323 | [
"org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizer"
] | 7f53fd8c031b37c1f534faeca6fa8b57509dc69909fdf3a6593613a0de61bc94 | public void testMinpackJennrichSampson() | // You are a professional Java test case writer, please create a test case named `testMinpackJennrichSampson` for the issue `Math-MATH-405`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-405
//
// ## Issue-Title:
// Inconsistent result from Levenberg-... | 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 ... | ||
@Test
public void testToMapWithNoHeader() throws Exception {
final CSVParser parser = CSVParser.parse("a,b", CSVFormat.newFormat(','));
final CSVRecord shortRec = parser.iterator().next();
Map<String, String> map = shortRec.toMap();
assertNotNull("Map is not null.", map);
ass... | org.apache.commons.csv.CSVRecordTest::testToMapWithNoHeader | src/test/java/org/apache/commons/csv/CSVRecordTest.java | 177 | src/test/java/org/apache/commons/csv/CSVRecordTest.java | testToMapWithNoHeader | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testToMapWithNoHeader` for the issue `Csv-CSV-118`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-118
//
// ## Issue-Title:
// CSVRecord.toMap() throws NPE on formats with... | 177 | 9 | 170 | src/test/java/org/apache/commons/csv/CSVRecordTest.java | src/test/java | ```markdown
## Issue-ID: Csv-CSV-118
## Issue-Title:
CSVRecord.toMap() throws NPE on formats with no headers.
## Issue-Description:
The method toMap() on CSVRecord throws a NullPointerExcpetion when called on records derived using a format with no headers.
The method documentation states a null map should be ret... | 170 | [
"org.apache.commons.csv.CSVRecord"
] | 7fbb9d544e8425193e189642ad0230a65c0068033fa623b6193681ad02bf05c2 | @Test
public void testToMapWithNoHeader() throws Exception | // You are a professional Java test case writer, please create a test case named `testToMapWithNoHeader` for the issue `Csv-CSV-118`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-118
//
// ## Issue-Title:
// CSVRecord.toMap() throws NPE on formats with... | 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 ... | ||
public void testRoundTripNames(){
checkName("");
checkName("The quick brown fox\n");
checkName("\177");
// checkName("\0"); // does not work, because NUL is ignored
// COMPRESS-114
checkName("0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model");
... | org.apache.commons.compress.archivers.tar.TarUtilsTest::testRoundTripNames | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | 126 | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | testRoundTripNames | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testRoundTripNames` for the issue `Compress-COMPRESS-114`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-114
//
// ## Issue-Title:
// TarUtils.parseName does not... | 126 | 7 | 119 | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | src/test/java | ```markdown
## Issue-ID: Compress-COMPRESS-114
## Issue-Title:
TarUtils.parseName does not properly handle characters outside the range 0-127
## Issue-Description:
if a tarfile contains files with special characters, the names of the tar entries are wrong.
example:
correct name: 0302-0601-3±±±F06±W220±ZB±LALA... | 119 | [
"org.apache.commons.compress.archivers.tar.TarUtils"
] | 7fbec07ca3d104171ffbcdadaaa9c40bab55c8e36767de5c86a29d767f70693e | public void testRoundTripNames() | // You are a professional Java test case writer, please create a test case named `testRoundTripNames` for the issue `Compress-COMPRESS-114`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-114
//
// ## Issue-Title:
// TarUtils.parseName does not... | 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 may ... | ||
@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 + ... | org.apache.commons.math3.optimization.univariate.BrentOptimizerTest::testKeepInitIfBest | src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java | 221 | src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java | testKeepInitIfBest | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testKeepInitIfBest` for the issue `Math-MATH-855`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-855
//
// ## Issue-Title:
// "BrentOptimizer" not always reporting the b... | 221 | /**
* 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.
*/ | 23 | 191 | src/test/java/org/apache/commons/math3/optimization/univariate/BrentOptimizerTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-855
## Issue-Title:
"BrentOptimizer" not always reporting the best point
## Issue-Description:
BrentOptimizer (package "o.a.c.m.optimization.univariate") does not check that the point it is going to return is indeed the best one it has encountered. Indeed, the last evaluated poin... | 191 | [
"org.apache.commons.math3.optimization.univariate.BrentOptimizer"
] | 7fccde03d3c29ad6ef8a8ba68491dddf0ffa99fc027bbea066c5d38a129704b7 | @Test
public void testKeepInitIfBest() | // You are a professional Java test case writer, please create a test case named `testKeepInitIfBest` for the issue `Math-MATH-855`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-855
//
// ## Issue-Title:
// "BrentOptimizer" not always reporting the b... | 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 ... | |
public void testForID_String_old() {
Map<String, String> map = new LinkedHashMap<String, String>();
map.put("GMT", "UTC");
map.put("WET", "WET");
map.put("CET", "CET");
map.put("MET", "CET");
map.put("ECT", "CET");
map.put("EET", "EET");
map.put("MIT",... | org.joda.time.TestDateTimeZone::testForID_String_old | src/test/java/org/joda/time/TestDateTimeZone.java | 287 | src/test/java/org/joda/time/TestDateTimeZone.java | testForID_String_old | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testForID_String_old` for the issue `Time-112`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-112
//
// ## Issue-Title:
// #112 Incorrect mapping of the MET time zone
//
// ... | 287 | 23 | 242 | src/test/java/org/joda/time/TestDateTimeZone.java | src/test/java | ```markdown
## Issue-ID: Time-112
## Issue-Title:
#112 Incorrect mapping of the MET time zone
## Issue-Description:
This timezone is mapped to Asia/Tehran in DateTimeZone. It should be middle europena time.
I know that this bug has been raised before (Incorrect mapping of the MET time zone - ID: 2012274), and... | 242 | [
"org.joda.time.DateTimeZone"
] | 801239f9e0aabc047ecc25f3b96dccf4a27a38e8bcec47ca5723ad186cdb7727 | public void testForID_String_old() | // You are a professional Java test case writer, please create a test case named `testForID_String_old` for the issue `Time-112`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-112
//
// ## Issue-Title:
// #112 Incorrect mapping of the MET time zone
//
// ... | 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... | ||
public void testCompressedHeaderWithNonDefaultDictionarySize() throws Exception {
SevenZFile sevenZFile = new SevenZFile(getFile("COMPRESS-256.7z"));
try {
int count = 0;
while (sevenZFile.getNextEntry() != null) {
count++;
}
assertEqua... | org.apache.commons.compress.archivers.sevenz.SevenZFileTest::testCompressedHeaderWithNonDefaultDictionarySize | src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java | 88 | src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java | testCompressedHeaderWithNonDefaultDictionarySize | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testCompressedHeaderWithNonDefaultDictionarySize` for the issue `Compress-COMPRESS-256`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-256
//
// ## Issue-Title:
... | 88 | /**
* @see "https://issues.apache.org/jira/browse/COMPRESS-256"
*/ | 23 | 77 | src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java | src/test/java | ```markdown
## Issue-ID: Compress-COMPRESS-256
## Issue-Title:
7z: 16 MB dictionary is too big
## Issue-Description:
I created an archiv with 7zip 9.20 containing the compress-1.7-src directory. Also tried it with 1.6 version and directory. I
downloaded the zip file and reziped it as 7z. The standard setting wh... | 77 | [
"org.apache.commons.compress.archivers.sevenz.Coders"
] | 81c80475325e99fc609ea6210d6ce8287a834409b124cebb305936f4b8becdbb | public void testCompressedHeaderWithNonDefaultDictionarySize() throws Exception | // You are a professional Java test case writer, please create a test case named `testCompressedHeaderWithNonDefaultDictionarySize` for the issue `Compress-COMPRESS-256`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-256
//
// ## Issue-Title:
... | 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... | |
public void testDependencySortingWhitespaceMode() {
args.add("--manage_closure_dependencies");
args.add("--compilation_level=WHITESPACE_ONLY");
test(new String[] {
"goog.require('beer');",
"goog.provide('beer');\ngoog.require('hops');",
"goog.provide('hops');",
},
... | com.google.javascript.jscomp.CommandLineRunnerTest::testDependencySortingWhitespaceMode | test/com/google/javascript/jscomp/CommandLineRunnerTest.java | 636 | test/com/google/javascript/jscomp/CommandLineRunnerTest.java | testDependencySortingWhitespaceMode | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testDependencySortingWhitespaceMode` for the issue `Closure-703`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-703
//
// ## Issue-Title:
// Add support for --manage_closu... | 636 | 31 | 623 | test/com/google/javascript/jscomp/CommandLineRunnerTest.java | test | ```markdown
## Issue-ID: Closure-703
## Issue-Title:
Add support for --manage_closure_dependencies and --only_closure_dependencies with compilation level WHITESPACE_ONLY
## Issue-Description:
The compiler options --manage\_closure\_dependencies and --only\_closure\_dependencies are currently ignored with compilatio... | 623 | [
"com.google.javascript.jscomp.Compiler"
] | 8288fa0343aca972f07cbb30ab15a188f39c92e29ed749c5797dffdfb4a1fb41 | public void testDependencySortingWhitespaceMode() | // You are a professional Java test case writer, please create a test case named `testDependencySortingWhitespaceMode` for the issue `Closure-703`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-703
//
// ## Issue-Title:
// Add support for --manage_closu... | 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... | ||
public void testCodec98NPE() throws Exception {
byte[] codec98 = StringUtils.getBytesUtf8(Base64TestData.CODEC_98_NPE);
ByteArrayInputStream data = new ByteArrayInputStream(codec98);
Base64InputStream stream = new Base64InputStream(data);
// This line causes an NPE in commons-codec-... | org.apache.commons.codec.binary.Base64InputStreamTest::testCodec98NPE | src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java | 66 | src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java | testCodec98NPE | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testCodec98NPE` for the issue `Codec-CODEC-98`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-98
//
// ## Issue-Title:
// Base64InputStream causes NullPointerException... | 66 | /**
* Test the Base64InputStream implementation against the special NPE inducing input
* identified in the CODEC-98 bug.
*
* @throws Exception for some failure scenarios.
*/ | 5 | 54 | src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java | src/test | ```markdown
## Issue-ID: Codec-CODEC-98
## Issue-Title:
Base64InputStream causes NullPointerException on some input
## Issue-Description:
Certain (malformed?) input to Base64InputStream causes a NullPointerException in Base64.decode.
The exception occurs when Base64.decode is entered with the following condition... | 54 | [
"org.apache.commons.codec.binary.Base64"
] | 82d94101a7c7162487c62daf67c3fa04a448ce0d726867bfe2702a4493900a03 | public void testCodec98NPE() throws Exception | // You are a professional Java test case writer, please create a test case named `testCodec98NPE` for the issue `Codec-CODEC-98`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-98
//
// ## Issue-Title:
// Base64InputStream causes NullPointerException... | 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 ... | |
@Test
public void testMath828Cycle() {
LinearObjectiveFunction f = new LinearObjectiveFunction(
new double[] { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, 0.0);
... | org.apache.commons.math3.optimization.linear.SimplexSolverTest::testMath828Cycle | src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java | 72 | src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java | testMath828Cycle | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMath828Cycle` for the issue `Math-MATH-828`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-828
//
// ## Issue-Title:
// Not expected UnboundedSolutionException
//
/... | 72 | 28 | 53 | src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-828
## Issue-Title:
Not expected UnboundedSolutionException
## Issue-Description:
SimplexSolver throws UnboundedSolutionException when trying to solve minimization linear programming problem. The number of exception thrown depends on the number of variables.
In order to see tha... | 53 | [
"org.apache.commons.math3.optimization.linear.SimplexSolver"
] | 843a5fe43db60c40b4957f79e3ca8cc4a70bbe09de493298cc8dc0e53652214a | @Test
public void testMath828Cycle() | // You are a professional Java test case writer, please create a test case named `testMath828Cycle` for the issue `Math-MATH-828`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-828
//
// ## Issue-Title:
// Not expected UnboundedSolutionException
//
/... | 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 ... | ||
@Test
public void workaroundForBrokenTimeHeader() throws Exception {
URL tar = getClass().getResource("/simple-aix-native-tar.tar");
TarArchiveInputStream in = null;
try {
in = new TarArchiveInputStream(new FileInputStream(new File(new URI(tar.toString()))));
TarA... | org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::workaroundForBrokenTimeHeader | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java | 65 | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java | workaroundForBrokenTimeHeader | /*
* 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... | // You are a professional Java test case writer, please create a test case named `workaroundForBrokenTimeHeader` for the issue `Compress-COMPRESS-181`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-181
//
// ## Issue-Title:
// Tar files create... | 65 | 14 | 49 | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java | src/test/java | ```markdown
## Issue-ID: Compress-COMPRESS-181
## Issue-Title:
Tar files created by AIX native tar, and which contain symlinks, cannot be read by TarArchiveInputStream
## Issue-Description:
A simple tar file created on AIX using the native (/usr/bin/tar tar utility) **and** which contains a symbolic link, cannot b... | 49 | [
"org.apache.commons.compress.archivers.tar.TarUtils"
] | 848f11e5289c47b1a0e0e64694a1379ff22d06e6acee4370b10942472086371a | @Test
public void workaroundForBrokenTimeHeader() throws Exception | // You are a professional Java test case writer, please create a test case named `workaroundForBrokenTimeHeader` for the issue `Compress-COMPRESS-181`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-181
//
// ## Issue-Title:
// Tar files create... | 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... | ||
public void testFailOnWritingStringNotFieldNameBytes() throws Exception {
_testFailOnWritingStringNotFieldName(F, false);
} | com.fasterxml.jackson.core.json.GeneratorFailTest::testFailOnWritingStringNotFieldNameBytes | src/test/java/com/fasterxml/jackson/core/json/GeneratorFailTest.java | 27 | src/test/java/com/fasterxml/jackson/core/json/GeneratorFailTest.java | testFailOnWritingStringNotFieldNameBytes | package com.fasterxml.jackson.core.json;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import com.fasterxml.jackson.core.JsonEncoding;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
... | // You are a professional Java test case writer, please create a test case named `testFailOnWritingStringNotFieldNameBytes` for the issue `JacksonCore-177`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-177
//
// ## Issue-Title:
// Add a check so Js... | 27 | // (in future maybe take one as alias... but not yet)
// Also: should not try writing JSON String if field name expected
// [core#177] | 7 | 25 | src/test/java/com/fasterxml/jackson/core/json/GeneratorFailTest.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-177
## Issue-Title:
Add a check so JsonGenerator.writeString() won't work if writeFieldName() expected.
## Issue-Description:
Looks like calling `writeString()` (and perhaps other scalar write methods) results in writing invalid output, instead of throwing an exception. It shoul... | 25 | [
"com.fasterxml.jackson.core.json.JsonWriteContext"
] | 84cc9e8003666273b27236d509190eeee6cd418a93b72b0189fb598543e6c6db | public void testFailOnWritingStringNotFieldNameBytes() throws Exception | // You are a professional Java test case writer, please create a test case named `testFailOnWritingStringNotFieldNameBytes` for the issue `JacksonCore-177`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-177
//
// ## Issue-Title:
// Add a check so Js... | JacksonCore | package com.fasterxml.jackson.core.json;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import com.fasterxml.jackson.core.JsonEncoding;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
... | |
@SuppressWarnings("unchecked")
public void testEqCondition4() throws Exception {
FlowScope blind = newScope();
testBinop(blind,
Token.EQ,
createVar(blind, "a", VOID_TYPE),
createVar(blind, "b", VOID_TYPE),
Sets.newHashSet(
new TypedName("a", VOID_TYPE),
... | com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest::testEqCondition4 | test/com/google/javascript/jscomp/SemanticReverseAbstractInterpreterTest.java | 350 | test/com/google/javascript/jscomp/SemanticReverseAbstractInterpreterTest.java | testEqCondition4 | /*
* Copyright 2007 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 agreed to ... | // You are a professional Java test case writer, please create a test case named `testEqCondition4` for the issue `Closure-172`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-172
//
// ## Issue-Title:
// bad type inference for != undefined
//
// ## Iss... | 350 | /**
* Tests reverse interpretation of two undefineds.
*/ | 146 | 337 | test/com/google/javascript/jscomp/SemanticReverseAbstractInterpreterTest.java | test | ```markdown
## Issue-ID: Closure-172
## Issue-Title:
bad type inference for != undefined
## Issue-Description:
**What steps will reproduce the problem?**
// ==ClosureCompiler==
// @compilation\_level ADVANCED\_OPTIMIZATIONS
// @output\_file\_name default.js
// ==/ClosureCompiler==
/\*\* @param {string} x \*... | 337 | [
"com.google.javascript.rhino.jstype.JSType"
] | 8589e62ad5fa4b34d2e3fa697eda356ab8f0a7afb75704b1c484727edbd1ab2a | @SuppressWarnings("unchecked")
public void testEqCondition4() throws Exception | // You are a professional Java test case writer, please create a test case named `testEqCondition4` for the issue `Closure-172`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-172
//
// ## Issue-Title:
// bad type inference for != undefined
//
// ## Iss... | Closure | /*
* Copyright 2007 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 agreed to ... | |
public void testIssue115() {
CompilerRunner.FLAG_compilation_level.setForTest(
CompilationLevel.SIMPLE_OPTIMIZATIONS);
CompilerRunner.FLAG_warning_level.setForTest(
WarningLevel.VERBOSE);
test("function f() { " +
" var arguments = Array.prototype.slice.call(arguments, 0);" +
... | com.google.javascript.jscomp.CompilerRunnerTest::testIssue115 | test/com/google/javascript/jscomp/CompilerRunnerTest.java | 193 | test/com/google/javascript/jscomp/CompilerRunnerTest.java | testIssue115 | /*
* Copyright 2009 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 agreed to ... | // You are a professional Java test case writer, please create a test case named `testIssue115` for the issue `Closure-115`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-115
//
// ## Issue-Title:
// compiler assumes that 'arguments' can be shadowed
// ... | 193 | // }
// "eval(\"1\");(0,eval)(\"2\");");
// test("eval('1'); var x = eval; x('2');",
// useStringComparison = true;
// CompilationLevel.ADVANCED_OPTIMIZATIONS);
// CompilerRunner.FLAG_compilation_level.setForTest(
// public void testIssue81() {
// Defects4J: flaky method | 102 | 180 | test/com/google/javascript/jscomp/CompilerRunnerTest.java | test | ```markdown
## Issue-ID: Closure-115
## Issue-Title:
compiler assumes that 'arguments' can be shadowed
## Issue-Description:
The code:
function name() {
var arguments = Array.prototype.slice.call(arguments, 0);
}
gets compiled to:
function name(){ var c=Array.prototype.slice.call(c,0); }
Thanks to tescos... | 180 | [
"com.google.javascript.jscomp.Normalize"
] | 87704a4e3942c73cc13aed27b67f8a3f09be4324cecf85d28214f2bf2dbbb958 | public void testIssue115() | // You are a professional Java test case writer, please create a test case named `testIssue115` for the issue `Closure-115`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-115
//
// ## Issue-Title:
// compiler assumes that 'arguments' can be shadowed
// ... | Closure | /*
* Copyright 2009 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 agreed to ... | |
public void testToClass_object() {
assertNull(ClassUtils.toClass(null));
assertSame(ArrayUtils.EMPTY_CLASS_ARRAY, ClassUtils.toClass(ArrayUtils.EMPTY_OBJECT_ARRAY));
assertTrue(Arrays.equals(new Class[] { String.class, Integer.class, Double.class },
ClassUtils.toClass(new O... | org.apache.commons.lang3.ClassUtilsTest::testToClass_object | src/test/java/org/apache/commons/lang3/ClassUtilsTest.java | 911 | src/test/java/org/apache/commons/lang3/ClassUtilsTest.java | testToClass_object | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testToClass_object` for the issue `Lang-LANG-587`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-587
//
// ## Issue-Title:
// ClassUtils.toClass(Object[]) throws NPE on ... | 911 | 33 | 901 | src/test/java/org/apache/commons/lang3/ClassUtilsTest.java | src/test/java | ```markdown
## Issue-ID: Lang-LANG-587
## Issue-Title:
ClassUtils.toClass(Object[]) throws NPE on null array element
## Issue-Description:
see summary
```
You are a professional Java test case writer, please create a test case named `testToClass_object` for the issue `Lang-LANG-587`, utilizing the provided i... | 901 | [
"org.apache.commons.lang3.ClassUtils"
] | 88f5adf757687983e9032f2aa61d98789baf908e410603fc95204a78c3fcc067 | public void testToClass_object() | // You are a professional Java test case writer, please create a test case named `testToClass_object` for the issue `Lang-LANG-587`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-587
//
// ## Issue-Title:
// ClassUtils.toClass(Object[]) throws NPE on ... | 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 ... | ||
@Test
public void testCreateNumber() {
// a lot of things can go wrong
assertEquals("createNumber(String) 1 failed", Float.valueOf("1234.5"), NumberUtils.createNumber("1234.5"));
assertEquals("createNumber(String) 2 failed", Integer.valueOf("12345"), NumberUtils.createNumber("12345"));
... | org.apache.commons.lang3.math.NumberUtilsTest::testCreateNumber | src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | 228 | src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | testCreateNumber | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testCreateNumber` for the issue `Lang-LANG-746`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-746
//
// ## Issue-Title:
// NumberUtils does not handle upper-case hex: 0... | 228 | 16 | 180 | src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | src/test/java | ```markdown
## Issue-ID: Lang-LANG-746
## Issue-Title:
NumberUtils does not handle upper-case hex: 0X and -0X
## Issue-Description:
NumberUtils.createNumber() should work equally for 0x1234 and 0X1234; currently 0X1234 generates a NumberFormatException
Integer.decode() handles both upper and lower case hex.
... | 180 | [
"org.apache.commons.lang3.math.NumberUtils"
] | 8952c043dae764b33a089f56fd003e5a32d21949d61d9c71adfe85c8e94df5d4 | @Test
public void testCreateNumber() | // You are a professional Java test case writer, please create a test case named `testCreateNumber` for the issue `Lang-LANG-746`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-746
//
// ## Issue-Title:
// NumberUtils does not handle upper-case hex: 0... | 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 ... | ||
public void testRecursiveRecord() {
ProxyObjectType loop = new ProxyObjectType(registry, NUMBER_TYPE);
JSType record = new RecordTypeBuilder(registry)
.addProperty("loop", loop, null)
.addProperty("number", NUMBER_TYPE, null)
.addProperty("string", STRING_TYPE, null)
.build();
... | com.google.javascript.rhino.jstype.RecordTypeTest::testRecursiveRecord | test/com/google/javascript/rhino/jstype/RecordTypeTest.java | 62 | test/com/google/javascript/rhino/jstype/RecordTypeTest.java | testRecursiveRecord | /*
*
* ***** 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/
*
* ... | // You are a professional Java test case writer, please create a test case named `testRecursiveRecord` for the issue `Closure-643`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-643
//
// ## Issue-Title:
// externExport with @typedef can generate invali... | 62 | 39 | 45 | test/com/google/javascript/rhino/jstype/RecordTypeTest.java | test | ```markdown
## Issue-ID: Closure-643
## Issue-Title:
externExport with @typedef can generate invalid externs
## Issue-Description:
**What steps will reproduce the problem?**
1. Create a file that has a @typedef and code referencing the type def above and below the typedef declaration.
2. Run the closure compiler a... | 45 | [
"com.google.javascript.rhino.jstype.PrototypeObjectType"
] | 8975a77b5651a4e38748eaeb5f5b4ce0e0b56d6ba507ce44b1cae34cb3d5766c | public void testRecursiveRecord() | // You are a professional Java test case writer, please create a test case named `testRecursiveRecord` for the issue `Closure-643`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-643
//
// ## Issue-Title:
// externExport with @typedef can generate invali... | 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/
*
* ... | ||
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... | com.fasterxml.jackson.databind.type.TestJavaType::testLocalType728 | src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java | 49 | src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java | testLocalType728 | package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Method;
import java.util.*;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.JavaType;
/**
* Simple tests to verify that {@link JavaType} types work to
* some degree
*/
public class TestJavaType
exten... | // You are a professional Java test case writer, please create a test case named `testLocalType728` for the issue `JacksonDatabind-609`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-609
//
// ## Issue-Title:
// Problem resolving locally declare... | 49 | 11 | 30 | src/test/java/com/fasterxml/jackson/databind/type/TestJavaType.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-609
## Issue-Title:
Problem resolving locally declared generic type
## Issue-Description:
(reported by Hal H)
Case like:
```
class Something {
public <T extends Ruleform> T getEntity()
public <T extends Ruleform> void setEntity(T entity)
}
```
appears to fail ... | 30 | [
"com.fasterxml.jackson.databind.type.TypeFactory"
] | 89ecd6d9cc821a02dff5fac7d139a10f25b7640e9ee5bbc8fbc0440e9d1dd5b6 | public void testLocalType728() throws Exception
| // You are a professional Java test case writer, please create a test case named `testLocalType728` for the issue `JacksonDatabind-609`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-609
//
// ## Issue-Title:
// Problem resolving locally declare... | JacksonDatabind | package com.fasterxml.jackson.databind.type;
import java.lang.reflect.Method;
import java.util.*;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.JavaType;
/**
* Simple tests to verify that {@link JavaType} types work to
* some degree
*/
public class TestJavaType
exten... | ||
public void testExtremeValues() throws Exception {
NormalDistribution distribution = (NormalDistribution) getDistribution();
distribution.setMean(0);
distribution.setStandardDeviation(1);
for (int i = 0; i < 100; i+=5) { // make sure no convergence exception
double lowerT... | org.apache.commons.math.distribution.NormalDistributionTest::testExtremeValues | src/test/org/apache/commons/math/distribution/NormalDistributionTest.java | 143 | src/test/org/apache/commons/math/distribution/NormalDistributionTest.java | testExtremeValues | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testExtremeValues` for the issue `Math-MATH-167`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-167
//
// ## Issue-Title:
// ConvergenceException in normal CDF
//
// ##... | 143 | /**
* Check to make sure top-coding of extreme values works correctly.
* Verifies fix for JIRA MATH-167
*/ | 103 | 127 | src/test/org/apache/commons/math/distribution/NormalDistributionTest.java | src/test | ```markdown
## Issue-ID: Math-MATH-167
## Issue-Title:
ConvergenceException in normal CDF
## Issue-Description:
NormalDistributionImpl::cumulativeProbability(double x) throws ConvergenceException
if x deviates too much from the mean. For example, when x=+/-100, mean=0, sd=1.
Of course the value of the CDF is... | 127 | [
"org.apache.commons.math.distribution.NormalDistributionImpl"
] | 8a79fbfc1f9484718aae5e74d1e3bdc60655d1e82d7a22cc256e70fc3417dde7 | public void testExtremeValues() throws Exception | // You are a professional Java test case writer, please create a test case named `testExtremeValues` for the issue `Math-MATH-167`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-167
//
// ## Issue-Title:
// ConvergenceException in normal CDF
//
// ##... | 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 ... | |
public void testArrayWithDefaultTyping() throws Exception
{
ObjectMapper mapper = new ObjectMapper()
.enableDefaultTyping();
JsonNode array = mapper.readTree("[ 1, 2 ]");
assertTrue(array.isArray());
assertEquals(2, array.size());
JsonNode obj = mapper.readT... | com.fasterxml.jackson.databind.node.TestJsonNode::testArrayWithDefaultTyping | src/test/java/com/fasterxml/jackson/databind/node/TestJsonNode.java | 121 | src/test/java/com/fasterxml/jackson/databind/node/TestJsonNode.java | testArrayWithDefaultTyping | package com.fasterxml.jackson.databind.node;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
/**
* Basic tests for {@link JsonNode} base class and some features
* of implementation classes
*/
public class TestJsonNode extends NodeTestBase
{
public void testText()
{
ass... | // You are a professional Java test case writer, please create a test case named `testArrayWithDefaultTyping` for the issue `JacksonDatabind-793`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-793
//
// ## Issue-Title:
// readTree does not work ... | 121 | // [databind#793] | 17 | 108 | src/test/java/com/fasterxml/jackson/databind/node/TestJsonNode.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-793
## Issue-Title:
readTree does not work with defaultTyping enabled but no type info provided
## Issue-Description:
I have enabled `defaultTyping`, and serialized `Foo` entity with no type info. I'm trying to read json as a tree with `mapper.readTree(json)`, and it throws ... | 108 | [
"com.fasterxml.jackson.databind.ObjectMapper"
] | 8af5c1b559a0b6435ca696c9eb366c43c1e1866eb582c5bd7575e436e7dbde9f | public void testArrayWithDefaultTyping() throws Exception
| // You are a professional Java test case writer, please create a test case named `testArrayWithDefaultTyping` for the issue `JacksonDatabind-793`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-793
//
// ## Issue-Title:
// readTree does not work ... | JacksonDatabind | package com.fasterxml.jackson.databind.node;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
/**
* Basic tests for {@link JsonNode} base class and some features
* of implementation classes
*/
public class TestJsonNode extends NodeTestBase
{
public void testText()
{
ass... | |
public void testNormalizedStandard_periodType_months1() {
Period test = new Period(1, 15, 0, 0, 0, 0, 0, 0);
Period result = test.normalizedStandard(PeriodType.months());
assertEquals(new Period(1, 15, 0, 0, 0, 0, 0, 0), test);
assertEquals(new Period(0, 27, 0, 0, 0, 0, 0, 0, PeriodT... | org.joda.time.TestPeriod_Basics::testNormalizedStandard_periodType_months1 | src/test/java/org/joda/time/TestPeriod_Basics.java | 1,524 | src/test/java/org/joda/time/TestPeriod_Basics.java | testNormalizedStandard_periodType_months1 | /*
* Copyright 2001-2005 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... | // You are a professional Java test case writer, please create a test case named `testNormalizedStandard_periodType_months1` for the issue `Time-79`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-79
//
// ## Issue-Title:
// none standard PeriodType without... | 1,524 | 5 | 1,519 | src/test/java/org/joda/time/TestPeriod_Basics.java | src/test/java | ```markdown
## Issue-ID: Time-79
## Issue-Title:
none standard PeriodType without year throws exception
## Issue-Description:
Hi.
I tried to get a Period only for months and weeks with following code:
```
Period p = new Period(new DateTime(startDate.getTime()), new DateTime(endDate.getTime()), PeriodType.forFi... | 1,519 | [
"org.joda.time.Period"
] | 8b42e2cdd846820c376c547a8c58660ea991a11910b0ed15e2ce5d553cdb1d4b | public void testNormalizedStandard_periodType_months1() | // You are a professional Java test case writer, please create a test case named `testNormalizedStandard_periodType_months1` for the issue `Time-79`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-79
//
// ## Issue-Title:
// none standard PeriodType without... | Time | /*
* Copyright 2001-2005 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... | ||
public void testIssue1107() {
String json = "{\n" +
" \"inBig\": {\n" +
" \"key\": [\n" +
" { \"inSmall\": \"hello\" }\n" +
" ]\n" +
" }\n" +
"}";
BigClass bigClass = new Gson().fromJson(json, BigClass.class);
SmallClass ... | com.google.gson.functional.CollectionTest::testIssue1107 | gson/src/test/java/com/google/gson/functional/CollectionTest.java | 412 | gson/src/test/java/com/google/gson/functional/CollectionTest.java | testIssue1107 | /*
* Copyright (C) 2008 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 agreed to ... | // You are a professional Java test case writer, please create a test case named `testIssue1107` for the issue `Gson-1107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Gson-1107
//
// ## Issue-Title:
// Gson deserializes wildcards to LinkedHashMap
//
// ## I... | 412 | 18 | 400 | gson/src/test/java/com/google/gson/functional/CollectionTest.java | gson/src/test/java | ```markdown
## Issue-ID: Gson-1107
## Issue-Title:
Gson deserializes wildcards to LinkedHashMap
## Issue-Description:
This issue is a successor to [#1101](https://github.com/google/gson/issues/1101).
Models:
```
// ? extends causes the issue
class BigClass { Map<String, ? extends List<SmallClass>> inBig; }
cl... | 400 | [
"com.google.gson.internal.$Gson$Types"
] | 8c0d9282bfc6aa3fd5c534b6361265cd1d7cbf14fa87d4341015d15e6689579f | public void testIssue1107() | // You are a professional Java test case writer, please create a test case named `testIssue1107` for the issue `Gson-1107`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Gson-1107
//
// ## Issue-Title:
// Gson deserializes wildcards to LinkedHashMap
//
// ## I... | Gson | /*
* Copyright (C) 2008 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 agreed to ... | ||
public void testWriteNonAsciiDirectoryNamePosixMode() throws Exception {
String n = "f\u00f6\u00f6/";
TarArchiveEntry t = new TarArchiveEntry(n);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
TarArchiveOutputStream tos = new TarArchiveOutputStream(bos);
tos.setAddP... | org.apache.commons.compress.archivers.tar.TarArchiveOutputStreamTest::testWriteNonAsciiDirectoryNamePosixMode | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java | 427 | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java | testWriteNonAsciiDirectoryNamePosixMode | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testWriteNonAsciiDirectoryNamePosixMode` for the issue `Compress-COMPRESS-203`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-203
//
// ## Issue-Title:
// Long d... | 427 | /**
* @see https://issues.apache.org/jira/browse/COMPRESS-203
*/ | 18 | 411 | src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java | src/test/java | ```markdown
## Issue-ID: Compress-COMPRESS-203
## Issue-Title:
Long directory names can not be stored in a tar archive because of error when writing PAX headers
## Issue-Description:
Trying to add a directory to the TAR Archive that has a name longer than 100 bytes generates an exception with a stack trace similar... | 411 | [
"org.apache.commons.compress.archivers.tar.TarArchiveOutputStream"
] | 8c7b1b8f75d0e6749f1b39dc530151814d2456dfaeb47f75d84ae8d6d029b182 | public void testWriteNonAsciiDirectoryNamePosixMode() throws Exception | // You are a professional Java test case writer, please create a test case named `testWriteNonAsciiDirectoryNamePosixMode` for the issue `Compress-COMPRESS-203`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-203
//
// ## Issue-Title:
// Long d... | 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... | |
public void testSnakeCaseWithOneArg() throws Exception
{
final String MSG = "1st";
OneProperty actual = MAPPER.readValue(
"{\"param_name0\":\""+MSG+"\"}",
OneProperty.class);
assertEquals("CTOR:"+MSG, actual.paramName0);
} | com.fasterxml.jackson.databind.deser.creators.CreatorWithNamingStrategyTest::testSnakeCaseWithOneArg | src/test/java/com/fasterxml/jackson/databind/deser/creators/CreatorWithNamingStrategyTest.java | 52 | src/test/java/com/fasterxml/jackson/databind/deser/creators/CreatorWithNamingStrategyTest.java | testSnakeCaseWithOneArg | package com.fasterxml.jackson.databind.deser.creators;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;
import com.fasterxml.jackson.databi... | // You are a professional Java test case writer, please create a test case named `testSnakeCaseWithOneArg` for the issue `JacksonDatabind-2051`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-2051
//
// ## Issue-Title:
// Implicit constructor pro... | 52 | // [databind#2051] | 96 | 45 | src/test/java/com/fasterxml/jackson/databind/deser/creators/CreatorWithNamingStrategyTest.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-2051
## Issue-Title:
Implicit constructor property names are not renamed properly with PropertyNamingStrategy
## Issue-Description:
(note: spin-off from [FasterXML/jackson-modules-java8#67](https://github.com/FasterXML/jackson-modules-java8/issues/67))
Looks like something... | 45 | [
"com.fasterxml.jackson.databind.deser.BasicDeserializerFactory"
] | 8c9a3f7e0e5f5ce3a27fc23e620c4fa45df447a558333831377125f1142058be | public void testSnakeCaseWithOneArg() throws Exception
| // You are a professional Java test case writer, please create a test case named `testSnakeCaseWithOneArg` for the issue `JacksonDatabind-2051`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-2051
//
// ## Issue-Title:
// Implicit constructor pro... | JacksonDatabind | package com.fasterxml.jackson.databind.deser.creators;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;
import com.fasterxml.jackson.databi... | |
@Test public void nextIndexOfUnmatched() {
CharacterReader r = new CharacterReader("<[[one]]");
assertEquals(-1, r.nextIndexOf("]]>"));
} | org.jsoup.parser.CharacterReaderTest::nextIndexOfUnmatched | src/test/java/org/jsoup/parser/CharacterReaderTest.java | 100 | src/test/java/org/jsoup/parser/CharacterReaderTest.java | nextIndexOfUnmatched | package org.jsoup.parser;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Test suite for character reader.
*
* @author Jonathan Hedley, jonathan@hedley.net
*/
public class CharacterReaderTest {
@Test public void consume() {
CharacterReader r = new CharacterReader("one");
asser... | // You are a professional Java test case writer, please create a test case named `nextIndexOfUnmatched` for the issue `Jsoup-349`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-349
//
// ## Issue-Title:
// Parser error on commented CDATA
//
// ## Issue-D... | 100 | 34 | 97 | src/test/java/org/jsoup/parser/CharacterReaderTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-349
## Issue-Title:
Parser error on commented CDATA
## Issue-Description:
Jsoup gives the following error when trying to parse this HTML: <https://gist.github.com/felipehummel/6122799>
```
java.lang.ArrayIndexOutOfBoundsException: 8666
at org.jsoup.parser.CharacterReader.nextIn... | 97 | [
"org.jsoup.parser.CharacterReader"
] | 8cc4665f65c3aae9005ae6623b38a5d43602f9c41fe2366624b2d1cc200e5ee0 | @Test public void nextIndexOfUnmatched() | // You are a professional Java test case writer, please create a test case named `nextIndexOfUnmatched` for the issue `Jsoup-349`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-349
//
// ## Issue-Title:
// Parser error on commented CDATA
//
// ## Issue-D... | Jsoup | package org.jsoup.parser;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Test suite for character reader.
*
* @author Jonathan Hedley, jonathan@hedley.net
*/
public class CharacterReaderTest {
@Test public void consume() {
CharacterReader r = new CharacterReader("one");
asser... | ||
@Test
public void testNoHeaderMap() throws Exception {
final CSVParser parser = CSVParser.parse("a,b,c\n1,2,3\nx,y,z", CSVFormat.DEFAULT);
Assert.assertNull(parser.getHeaderMap());
} | org.apache.commons.csv.CSVParserTest::testNoHeaderMap | src/test/java/org/apache/commons/csv/CSVParserTest.java | 670 | src/test/java/org/apache/commons/csv/CSVParserTest.java | testNoHeaderMap | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testNoHeaderMap` for the issue `Csv-CSV-100`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-100
//
// ## Issue-Title:
// CSVParser: getHeaderMap throws NPE
//
// ## Issue... | 670 | 4 | 666 | src/test/java/org/apache/commons/csv/CSVParserTest.java | src/test/java | ```markdown
## Issue-ID: Csv-CSV-100
## Issue-Title:
CSVParser: getHeaderMap throws NPE
## Issue-Description:
title nearly says it all 
Given a CSVParser parser, the following line throws an NPE:
```
Map<String, Integer> header = parser.getHeaderMap();
```
Stack... | 666 | [
"org.apache.commons.csv.CSVParser"
] | 8ced1e9d4de16bc1057c225b947cb19f104b252e6eda62c13abbe21f7e2935c1 | @Test
public void testNoHeaderMap() throws Exception | // You are a professional Java test case writer, please create a test case named `testNoHeaderMap` for the issue `Csv-CSV-100`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Csv-CSV-100
//
// ## Issue-Title:
// CSVParser: getHeaderMap throws NPE
//
// ## Issue... | 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 ... | ||
public void testEmpty() {
TextBuffer tb = new TextBuffer(new BufferRecycler());
tb.resetWithEmpty();
assertTrue(tb.getTextBuffer().length == 0);
tb.contentsAsString();
assertTrue(tb.getTextBuffer().length == 0);
} | com.fasterxml.jackson.core.util.TestTextBuffer::testEmpty | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | 85 | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | testEmpty | package com.fasterxml.jackson.core.util;
public class TestTextBuffer
extends com.fasterxml.jackson.core.BaseTest
{
/**
* Trivially simple basic test to ensure all basic append
* methods work
*/
public void testSimple()
{
TextBuffer tb = new TextBuffer(new BufferRecycler());
... | // You are a professional Java test case writer, please create a test case named `testEmpty` for the issue `JacksonCore-182`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-182
//
// ## Issue-Title:
// Inconsistent TextBuffer#getTextBuffer behavior
/... | 85 | // [Core#182] | 8 | 78 | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-182
## Issue-Title:
Inconsistent TextBuffer#getTextBuffer behavior
## Issue-Description:
Hi, I'm using 2.4.2. While I'm working on CBORParser, I noticed that CBORParser#getTextCharacters() returns sometimes `null` sometimes `[]` (empty array) when it's parsing empty string `""`.... | 78 | [
"com.fasterxml.jackson.core.util.TextBuffer"
] | 8e084a02916664f23ad6f54f1ea1c573ff7eabc3b9da922f38ce7ed21ede57ae | public void testEmpty() | // You are a professional Java test case writer, please create a test case named `testEmpty` for the issue `JacksonCore-182`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-182
//
// ## Issue-Title:
// Inconsistent TextBuffer#getTextBuffer behavior
/... | JacksonCore | package com.fasterxml.jackson.core.util;
public class TestTextBuffer
extends com.fasterxml.jackson.core.BaseTest
{
/**
* Trivially simple basic test to ensure all basic append
* methods work
*/
public void testSimple()
{
TextBuffer tb = new TextBuffer(new BufferRecycler());
... | |
public void testStripLeadingAndTrailingQuotes()
{
assertEquals("foo", Util.stripLeadingAndTrailingQuotes("\"foo\""));
assertEquals("foo \"bar\"", Util.stripLeadingAndTrailingQuotes("foo \"bar\""));
assertEquals("\"foo\" bar", Util.stripLeadingAndTrailingQuotes("\"foo\" bar"));
as... | org.apache.commons.cli.UtilTest::testStripLeadingAndTrailingQuotes | src/test/org/apache/commons/cli/UtilTest.java | 41 | src/test/org/apache/commons/cli/UtilTest.java | testStripLeadingAndTrailingQuotes | /**
* 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... | // You are a professional Java test case writer, please create a test case named `testStripLeadingAndTrailingQuotes` for the issue `Cli-CLI-185`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-185
//
// ## Issue-Title:
// Commons CLI incorrectly strippin... | 41 | 29 | 34 | src/test/org/apache/commons/cli/UtilTest.java | src/test | ```markdown
## Issue-ID: Cli-CLI-185
## Issue-Title:
Commons CLI incorrectly stripping leading and trailing quotes
## Issue-Description:
org.apache.commons.cli.Parser.processArgs() calls Util.stripLeadingAndTrailingQuotes() for all argument values. IMHO this is incorrect and totally broken.
It is trivial to crea... | 34 | [
"org.apache.commons.cli.Util"
] | 8e4dc96b9f856e20500c0993b9056f8f0d7b0d54e67e7e65373455578f6dd9b5 | public void testStripLeadingAndTrailingQuotes()
| // You are a professional Java test case writer, please create a test case named `testStripLeadingAndTrailingQuotes` for the issue `Cli-CLI-185`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-185
//
// ## Issue-Title:
// Commons CLI incorrectly strippin... | Cli | /**
* 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... | ||
public void testNumericKeys() {
assertPrint("var x = {010: 1};", "var x={8:1}");
assertPrint("var x = {'010': 1};", "var x={\"010\":1}");
assertPrint("var x = {0x10: 1};", "var x={16:1}");
assertPrint("var x = {'0x10': 1};", "var x={\"0x10\":1}");
// I was surprised at this result too.
asser... | com.google.javascript.jscomp.CodePrinterTest::testNumericKeys | test/com/google/javascript/jscomp/CodePrinterTest.java | 1,269 | test/com/google/javascript/jscomp/CodePrinterTest.java | testNumericKeys | /*
* Copyright 2004 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... | // You are a professional Java test case writer, please create a test case named `testNumericKeys` for the issue `Closure-569`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-569
//
// ## Issue-Title:
// Converts string properties into numbers in literal... | 1,269 | 52 | 1,256 | test/com/google/javascript/jscomp/CodePrinterTest.java | test | ```markdown
## Issue-ID: Closure-569
## Issue-Title:
Converts string properties into numbers in literal object definitions
## Issue-Description:
**What steps will reproduce the problem?**
1. Minimize the following script:
var lit = {"0102":"Zero One Zero Two"};
alert(lit["0102"]);
**What is the expected outp... | 1,256 | [
"com.google.javascript.jscomp.CodeGenerator"
] | 8e5a080f1e0dbd57e1ca0d243745942665842d1bee60e0b4fbe377e3ecad9a6e | public void testNumericKeys() | // You are a professional Java test case writer, please create a test case named `testNumericKeys` for the issue `Closure-569`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-569
//
// ## Issue-Title:
// Converts string properties into numbers in literal... | Closure | /*
* Copyright 2004 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... | ||
public void testDependencySorting() throws Exception {
CompilerOptions options = createCompilerOptions();
options.setDependencyOptions(
new DependencyOptions()
.setDependencySorting(true));
test(
options,
new String[] {
"goog.require('x');",
"goog.provid... | com.google.javascript.jscomp.IntegrationTest::testDependencySorting | test/com/google/javascript/jscomp/IntegrationTest.java | 2,120 | test/com/google/javascript/jscomp/IntegrationTest.java | testDependencySorting | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testDependencySorting` for the issue `Closure-768`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-768
//
// ## Issue-Title:
// Dependency sorting with closurePass set to f... | 2,120 | 18 | 2,101 | test/com/google/javascript/jscomp/IntegrationTest.java | test | ```markdown
## Issue-ID: Closure-768
## Issue-Title:
Dependency sorting with closurePass set to false no longer works.
## Issue-Description:
**What steps will reproduce the problem?**
1. Instantiate new instance of Compiler
2. Set closurePass to false to prevent goog.require/goog.provide removal.
compilerOpti... | 2,101 | [
"com.google.javascript.jscomp.Compiler"
] | 8e9ebbd3fd3e375aa54c7191758c747fed591e481ce49384b2b2bf5b0f0d91b0 | public void testDependencySorting() throws Exception | // You are a professional Java test case writer, please create a test case named `testDependencySorting` for the issue `Closure-768`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-768
//
// ## Issue-Title:
// Dependency sorting with closurePass set to f... | 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... | ||
public void testRoundLang346() throws Exception
{
TimeZone.setDefault(defaultZone);
dateTimeParser.setTimeZone(defaultZone);
Calendar testCalendar = Calendar.getInstance();
testCalendar.set(2007, 6, 2, 8, 8, 50);
Date date = testCalendar.getTime();
assertEquals("M... | org.apache.commons.lang.time.DateUtilsTest::testRoundLang346 | src/test/org/apache/commons/lang/time/DateUtilsTest.java | 761 | src/test/org/apache/commons/lang/time/DateUtilsTest.java | testRoundLang346 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testRoundLang346` for the issue `Lang-LANG-346`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-346
//
// ## Issue-Title:
// Dates.round() behaves incorrectly for minutes... | 761 | /**
* Tests the Changes Made by LANG-346 to the DateUtils.modify() private method invoked
* by DateUtils.round().
*/ | 53 | 704 | src/test/org/apache/commons/lang/time/DateUtilsTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-346
## Issue-Title:
Dates.round() behaves incorrectly for minutes and seconds
## Issue-Description:
Get unexpected output for rounding by minutes or seconds.
public void testRound()
{
Calendar testCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
testCale... | 704 | [
"org.apache.commons.lang.time.DateUtils"
] | 8ef098abb2606bf0f50a8ac6df4bdcd703cf437074a79202ffd1ab7bbfd5471e | public void testRoundLang346() throws Exception
| // You are a professional Java test case writer, please create a test case named `testRoundLang346` for the issue `Lang-LANG-346`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-346
//
// ## Issue-Title:
// Dates.round() behaves incorrectly for minutes... | 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 ... | |
@Test(expected=ConvergenceException.class)
public void testIssue631() {
final UnivariateRealFunction f = new UnivariateRealFunction() {
/** {@inheritDoc} */
public double value(double x) {
return Math.exp(x) - Math.pow(Math.PI, 3.0);
}
... | org.apache.commons.math.analysis.solvers.RegulaFalsiSolverTest::testIssue631 | src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java | 55 | src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java | testIssue631 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testIssue631` for the issue `Math-MATH-631`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-631
//
// ## Issue-Title:
// "RegulaFalsiSolver" failure
//
// ## Issue-Descr... | 55 | 48 | 43 | src/test/java/org/apache/commons/math/analysis/solvers/RegulaFalsiSolverTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-631
## Issue-Title:
"RegulaFalsiSolver" failure
## Issue-Description:
The following unit test:
```
@Test
public void testBug() {
final UnivariateRealFunction f = new UnivariateRealFunction() {
@Override
public double value(double x) {
... | 43 | [
"org.apache.commons.math.analysis.solvers.BaseSecantSolver"
] | 8f16d7e40d63ddcd947a4602c478620d318758113b67e8e11846cf96476d52e7 | @Test(expected=ConvergenceException.class)
public void testIssue631() | // You are a professional Java test case writer, please create a test case named `testIssue631` for the issue `Math-MATH-631`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-631
//
// ## Issue-Title:
// "RegulaFalsiSolver" failure
//
// ## Issue-Descr... | 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 ... | ||
@Test
public void supportsBOMinFiles() throws IOException {
// test files from http://www.i18nl10n.com/korean/utftest/
File in = getFile("/bomtests/bom_utf16be.html");
Document doc = Jsoup.parse(in, null, "http://example.com");
assertTrue(doc.title().contains("UTF-16BE"));
... | org.jsoup.helper.DataUtilTest::supportsBOMinFiles | src/test/java/org/jsoup/helper/DataUtilTest.java | 125 | src/test/java/org/jsoup/helper/DataUtilTest.java | supportsBOMinFiles | package org.jsoup.helper;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.parser.Parser;
import org.junit.Test;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import static org.jsoup... | // You are a professional Java test case writer, please create a test case named `supportsBOMinFiles` for the issue `Jsoup-695`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-695
//
// ## Issue-Title:
// UTF16 streams with BOM are processed as UTF-8
//
/... | 125 | 50 | 103 | src/test/java/org/jsoup/helper/DataUtilTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-695
## Issue-Title:
UTF16 streams with BOM are processed as UTF-8
## Issue-Description:
The handling of the character encoding in org.jsoup.helper.DataUtil.parseByteData(...) is bugged when the input is an UTF16 stream with unicode BOM. This method does a check for presence of a BOM a... | 103 | [
"org.jsoup.helper.DataUtil"
] | 90198544d0d8ad5a03c93c2afbc24ddb0c57262724c2abd0a1a45c392a73a9bc | @Test
public void supportsBOMinFiles() throws IOException | // You are a professional Java test case writer, please create a test case named `supportsBOMinFiles` for the issue `Jsoup-695`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-695
//
// ## Issue-Title:
// UTF16 streams with BOM are processed as UTF-8
//
/... | Jsoup | package org.jsoup.helper;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.parser.Parser;
import org.junit.Test;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import static org.jsoup... | ||
public void testReplace_StringStringArrayStringArray() {
//JAVADOC TESTS START
assertNull(StringUtils.replaceEach(null, new String[]{"a"}, new String[]{"b"}));
assertEquals(StringUtils.replaceEach("", new String[]{"a"}, new String[]{"b"}),"");
assertEquals(StringUtils.repla... | org.apache.commons.lang3.StringUtilsTest::testReplace_StringStringArrayStringArray | src/test/org/apache/commons/lang3/StringUtilsTest.java | 1,039 | src/test/org/apache/commons/lang3/StringUtilsTest.java | testReplace_StringStringArrayStringArray | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testReplace_StringStringArrayStringArray` for the issue `Lang-LANG-552`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-552
//
// ## Issue-Title:
// StringUtils replaceEa... | 1,039 | /**
* Test method for 'StringUtils.replaceEach(String, String[], String[])'
*/ | 39 | 1,008 | src/test/org/apache/commons/lang3/StringUtilsTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-552
## Issue-Title:
StringUtils replaceEach - Bug or Missing Documentation
## Issue-Description:
The following Test Case for replaceEach fails with a null pointer exception.
I have expected that all StringUtils methods are "null-friendly"
The use case is that i will stuff V... | 1,008 | [
"org.apache.commons.lang3.StringUtils"
] | 907801b3dbef9179d55baf26d710ca872b717b5282f71bfa51ee9f933f6e3b04 | public void testReplace_StringStringArrayStringArray() | // You are a professional Java test case writer, please create a test case named `testReplace_StringStringArrayStringArray` for the issue `Lang-LANG-552`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-552
//
// ## Issue-Title:
// StringUtils replaceEa... | 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 ... | |
public void testStop3() throws Exception
{
String[] args = new String[]{"--zop==1",
"-abtoast",
"--b=bar"};
CommandLine cl = parser.parse(options, args, true);
assertFalse("Confirm -a is not set", cl.hasOption("a... | org.apache.commons.cli.PosixParserTest::testStop3 | src/test/org/apache/commons/cli/PosixParserTest.java | 169 | src/test/org/apache/commons/cli/PosixParserTest.java | testStop3 | /**
* 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... | // You are a professional Java test case writer, please create a test case named `testStop3` for the issue `Cli-CLI-165`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-165
//
// ## Issue-Title:
// PosixParser keeps processing tokens after a non unrecogn... | 169 | 20 | 158 | src/test/org/apache/commons/cli/PosixParserTest.java | src/test | ```markdown
## Issue-ID: Cli-CLI-165
## Issue-Title:
PosixParser keeps processing tokens after a non unrecognized long option
## Issue-Description:
PosixParser keeps processing tokens after a non unrecognized long option when stopAtNonOption is enabled. The tokens after the unrecognized long option are burst, spli... | 158 | [
"org.apache.commons.cli.PosixParser"
] | 90ce3e7767e044abbbedd69e07cc95a54688b9bf52d0f9be0567f416e6ae44e4 | public void testStop3() throws Exception
| // You are a professional Java test case writer, please create a test case named `testStop3` for the issue `Cli-CLI-165`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-165
//
// ## Issue-Title:
// PosixParser keeps processing tokens after a non unrecogn... | Cli | /**
* 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... | ||
@Test
public void testTooLargeFirstStep() {
AdaptiveStepsizeIntegrator integ =
new DormandPrince853Integrator(0, Double.POSITIVE_INFINITY, Double.NaN, Double.NaN);
final double start = 0.0;
final double end = 0.001;
FirstOrderDifferentialEquations equations = new FirstOrderD... | org.apache.commons.math.ode.nonstiff.DormandPrince853IntegratorTest::testTooLargeFirstStep | src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java | 202 | src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java | testTooLargeFirstStep | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testTooLargeFirstStep` for the issue `Math-MATH-727`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-727
//
// ## Issue-Title:
// too large first step with embedded Runge... | 202 | 39 | 178 | src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-727
## Issue-Title:
too large first step with embedded Runge-Kutta integrators (Dormand-Prince 8(5,3) ...)
## Issue-Description:
Adaptive step size integrators compute the first step size by themselves if it is not provided.
For embedded Runge-Kutta type, this step size is not... | 178 | [
"org.apache.commons.math.ode.nonstiff.EmbeddedRungeKuttaIntegrator"
] | 9187f7a98b6e9614b651ecde27f18c8ad708be8f07484cf81a07c0a723338829 | @Test
public void testTooLargeFirstStep() | // You are a professional Java test case writer, please create a test case named `testTooLargeFirstStep` for the issue `Math-MATH-727`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-727
//
// ## Issue-Title:
// too large first step with embedded Runge... | 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 ... | ||
@Test // like using several time the captor in the vararg
public void should_capture_arguments_when_args_count_does_NOT_match() throws Exception {
//given
mock.varargs();
Invocation invocation = getLastInvocation();
//when
InvocationMatcher invocationMatcher = new Invoc... | org.mockito.internal.invocation.InvocationMatcherTest::should_capture_arguments_when_args_count_does_NOT_match | test/org/mockito/internal/invocation/InvocationMatcherTest.java | 170 | test/org/mockito/internal/invocation/InvocationMatcherTest.java | should_capture_arguments_when_args_count_does_NOT_match | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.invocation;
import org.fest.assertions.Assertions;
import org.hamcrest.Matcher;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mocki... | // You are a professional Java test case writer, please create a test case named `should_capture_arguments_when_args_count_does_NOT_match` for the issue `Mockito-188`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-188
//
// ## Issue-Title:
// ArgumentCa... | 170 | // }
// Assertions.assertThat(m.getAllValues()).containsExactly("a", "b");
// //then
//
// invocationMatcher.captureArgumentsFrom(invocation);
// //when
//
// InvocationMatcher invocationMatcher = new InvocationMatcher(invocation, (List) asList(new Equals(1), new LocalizedM... | 1 | 159 | test/org/mockito/internal/invocation/InvocationMatcherTest.java | test | ```markdown
## Issue-ID: Mockito-188
## Issue-Title:
ArgumentCaptor no longer working for varargs
## Issue-Description:
I ran into the issue described here: <http://stackoverflow.com/questions/27303562/why-does-upgrading-mockito-from-1-9-5-to-1-10-8-break-this-captor>
```
You are a professional Java test case ... | 159 | [
"org.mockito.internal.invocation.InvocationMatcher"
] | 925630547f73537c27e303a91e766627b827aa0754baf73b406226f25fb9fc8d | @Test // like using several time the captor in the vararg
public void should_capture_arguments_when_args_count_does_NOT_match() throws Exception | // You are a professional Java test case writer, please create a test case named `should_capture_arguments_when_args_count_does_NOT_match` for the issue `Mockito-188`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-188
//
// ## Issue-Title:
// ArgumentCa... | Mockito | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.invocation;
import org.fest.assertions.Assertions;
import org.hamcrest.Matcher;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mocki... | |
public void testBackwardsInferenceNew() {
inFunction(
"/**\n" +
" * @constructor\n" +
" * @param {{foo: (number|undefined)}} x\n" +
" */" +
"function F(x) {}" +
"var y = {};" +
"new F(y);");
assertEquals("{foo: (number|undefined)}", getType("y").toStrin... | com.google.javascript.jscomp.TypeInferenceTest::testBackwardsInferenceNew | test/com/google/javascript/jscomp/TypeInferenceTest.java | 890 | test/com/google/javascript/jscomp/TypeInferenceTest.java | testBackwardsInferenceNew | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testBackwardsInferenceNew` for the issue `Closure-729`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-729
//
// ## Issue-Title:
// anonymous object type inference behavior... | 890 | 25 | 879 | test/com/google/javascript/jscomp/TypeInferenceTest.java | test | ```markdown
## Issue-ID: Closure-729
## Issue-Title:
anonymous object type inference behavior is different when calling constructors
## Issue-Description:
The following compiles fine with:
java -jar build/compiler.jar --compilation\_level=ADVANCED\_OPTIMIZATIONS --jscomp\_error=accessControls --jscomp\_error=check... | 879 | [
"com.google.javascript.jscomp.TypeInference"
] | 9256fab7e6a6f61e23d98b65f0f3520a5bff477a00e71f94ccc1310167761262 | public void testBackwardsInferenceNew() | // You are a professional Java test case writer, please create a test case named `testBackwardsInferenceNew` for the issue `Closure-729`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-729
//
// ## Issue-Title:
// anonymous object type inference behavior... | 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... | ||
public void testParseOctal() throws Exception{
long value;
byte [] buffer;
final long MAX_OCTAL = 077777777777L; // Allowed 11 digits
final long MAX_OCTAL_OVERFLOW = 0777777777777L; // in fact 12 for some implementations
final String maxOctal = "777777777777"; // Maximum v... | org.apache.commons.compress.archivers.tar.TarUtilsTest::testParseOctal | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | 66 | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | testParseOctal | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testParseOctal` for the issue `Compress-COMPRESS-262`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-262
//
// ## Issue-Title:
// TarArchiveInputStream fails to ... | 66 | 24 | 45 | src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java | src/test/java | ```markdown
## Issue-ID: Compress-COMPRESS-262
## Issue-Title:
TarArchiveInputStream fails to read entry with big user-id value
## Issue-Description:
Caused by: java.lang.IllegalArgumentException: Invalid byte 52 at offset 7 in '62410554' len=8
at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(T... | 45 | [
"org.apache.commons.compress.archivers.tar.TarUtils"
] | 93dc27dfb9a30dd541c5272638d9ca2d58177b88d4e0789c5f79f85d79fa3357 | public void testParseOctal() throws Exception | // You are a professional Java test case writer, please create a test case named `testParseOctal` for the issue `Compress-COMPRESS-262`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Compress-COMPRESS-262
//
// ## Issue-Title:
// TarArchiveInputStream fails to ... | 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 may ... | ||
@Test
public void testLinearCombinationWithSingleElementArray() {
final double[] a = { 1.23456789 };
final double[] b = { 98765432.1 };
Assert.assertEquals(a[0] * b[0], MathArrays.linearCombination(a, b), 0d);
} | org.apache.commons.math3.util.MathArraysTest::testLinearCombinationWithSingleElementArray | src/test/java/org/apache/commons/math3/util/MathArraysTest.java | 591 | src/test/java/org/apache/commons/math3/util/MathArraysTest.java | testLinearCombinationWithSingleElementArray | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testLinearCombinationWithSingleElementArray` for the issue `Math-MATH-1005`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-1005
//
// ## Issue-Title:
// ArrayIndexOutOfB... | 591 | // MATH-1005 | 3 | 585 | src/test/java/org/apache/commons/math3/util/MathArraysTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-1005
## Issue-Title:
ArrayIndexOutOfBoundsException in MathArrays.linearCombination
## Issue-Description:
When MathArrays.linearCombination is passed arguments with length 1, it throws an ArrayOutOfBoundsException. This is caused by this line:
double prodHighNext = prodHigh[1];... | 585 | [
"org.apache.commons.math3.util.MathArrays"
] | 948ee0f50e84b33739a238cbc250ea91b578d5e791852aca1e27ff5fd5e4e008 | @Test
public void testLinearCombinationWithSingleElementArray() | // You are a professional Java test case writer, please create a test case named `testLinearCombinationWithSingleElementArray` for the issue `Math-MATH-1005`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-1005
//
// ## Issue-Title:
// ArrayIndexOutOfB... | 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 n... | |
@Test(expected = ParseException.class)
public void testCreateValueInteger_failure()
throws Exception
{
TypeHandler.createValue("just-a-string", Integer.class);
} | org.apache.commons.cli.TypeHandlerTest::testCreateValueInteger_failure | src/test/java/org/apache/commons/cli/TypeHandlerTest.java | 155 | src/test/java/org/apache/commons/cli/TypeHandlerTest.java | testCreateValueInteger_failure | /**
* 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... | // You are a professional Java test case writer, please create a test case named `testCreateValueInteger_failure` for the issue `Cli-CLI-282`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-282
//
// ## Issue-Title:
// TypeHandler should throw ParseExcep... | 155 | 40 | 150 | src/test/java/org/apache/commons/cli/TypeHandlerTest.java | src/test/java | ```markdown
## Issue-ID: Cli-CLI-282
## Issue-Title:
TypeHandler should throw ParseException for an unsupported class
## Issue-Description:
JavaDoc for TypeHandler states that createValue will
```
* @throws ParseException if the value creation for the given object type failedtype
```
However createValue(Str... | 150 | [
"org.apache.commons.cli.TypeHandler"
] | 9578e3d755df40483fc531f327018271915bf09e5af444ecacfd6f7520f0b972 | @Test(expected = ParseException.class)
public void testCreateValueInteger_failure()
throws Exception
| // You are a professional Java test case writer, please create a test case named `testCreateValueInteger_failure` for the issue `Cli-CLI-282`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-282
//
// ## Issue-Title:
// TypeHandler should throw ParseExcep... | Cli | /**
* 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... | ||
public void testXmlAttributesWithNextTextValue() throws Exception
{
final String XML = "<data max=\"7\" offset=\"9\"/>";
FromXmlParser xp = (FromXmlParser) _xmlFactory.createParser(new StringReader(XML));
// First: verify handling without forcing array handling:
assertToken(Jso... | com.fasterxml.jackson.dataformat.xml.stream.XmlParserNextXxxTest::testXmlAttributesWithNextTextValue | src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserNextXxxTest.java | 53 | src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserNextXxxTest.java | testXmlAttributesWithNextTextValue | package com.fasterxml.jackson.dataformat.xml.stream;
import java.io.*;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.dataformat.xml.XmlFactory;
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
public class XmlParserNextXxxT... | // You are a professional Java test case writer, please create a test case named `testXmlAttributesWithNextTextValue` for the issue `JacksonXml-204`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonXml-204
//
// ## Issue-Title:
// FromXMLParser nextTextVal... | 53 | // [dataformat-xml#204]
/*
/**********************************************************
/* Unit tests
/**********************************************************
*/ | 3 | 29 | src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserNextXxxTest.java | src/test/java | ```markdown
## Issue-ID: JacksonXml-204
## Issue-Title:
FromXMLParser nextTextValue() incorrect for attributes
## Issue-Description:
As of [#129](https://github.com/FasterXML/jackson-dataformat-xml/issues/129) the Method nextTextValue of FromXMLParser will no longer return a value for attributes. As the \_currToken... | 29 | [
"com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser"
] | 958e58dc1fb7f5238b60d7f0efc923c50caaaddc8b148f36f6337d30dd610479 | public void testXmlAttributesWithNextTextValue() throws Exception
| // You are a professional Java test case writer, please create a test case named `testXmlAttributesWithNextTextValue` for the issue `JacksonXml-204`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonXml-204
//
// ## Issue-Title:
// FromXMLParser nextTextVal... | JacksonXml | package com.fasterxml.jackson.dataformat.xml.stream;
import java.io.*;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.dataformat.xml.XmlFactory;
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
public class XmlParserNextXxxT... | |
@Test
public void shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine() {
//given
when(mock.otherMethod()).thenReturn("foo");
//when
mockTwo.simpleMethod("foo");
//then
verify(mockTwo).simpleMethod(mock.otherMethod());
try {
... | org.mockitousage.bugs.VerifyingWithAnExtraCallToADifferentMockTest::shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine | test/org/mockitousage/bugs/VerifyingWithAnExtraCallToADifferentMockTest.java | 34 | test/org/mockitousage/bugs/VerifyingWithAnExtraCallToADifferentMockTest.java | shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.bugs;
import static org.mockito.Mockito.*;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.exceptions.verification.NeverWantedButInvoked;
import org.mocki... | // You are a professional Java test case writer, please create a test case named `shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine` for the issue `Mockito-138`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-138
//
// ## Issue-Title:
// fix proposal ... | 34 | 13 | 20 | test/org/mockitousage/bugs/VerifyingWithAnExtraCallToADifferentMockTest.java | test | ```markdown
## Issue-ID: Mockito-138
## Issue-Title:
fix proposal for #114
## Issue-Description:
[@bric3](https://github.com/bric3), can you take a look at this one? If you don't have time I'll just merge it. All existing tests are passing.
Thanks for the fix!!!
```
You are a professional Java test case writ... | 20 | [
"org.mockito.internal.MockHandler"
] | 9785a86e564413e7642a35f96beee0e25e3c4ef7ccf957253f7c47ada7edb7de | @Test
public void shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine() | // You are a professional Java test case writer, please create a test case named `shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine` for the issue `Mockito-138`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-138
//
// ## Issue-Title:
// fix proposal ... | Mockito | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.bugs;
import static org.mockito.Mockito.*;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.exceptions.verification.NeverWantedButInvoked;
import org.mocki... | ||
public void testAliasing7() {
// An exported alias must preserved any referenced values in the
// referenced function.
testSame("function e(){}" +
"e.prototype['alias1'] = e.prototype.method1 = " +
"function(){this.method2()};" +
"e.prototype.method2 = function(){};");... | com.google.javascript.jscomp.RemoveUnusedPrototypePropertiesTest::testAliasing7 | test/com/google/javascript/jscomp/RemoveUnusedPrototypePropertiesTest.java | 192 | test/com/google/javascript/jscomp/RemoveUnusedPrototypePropertiesTest.java | testAliasing7 | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testAliasing7` for the issue `Closure-459`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-459
//
// ## Issue-Title:
// Advanced compilations renames a function and then de... | 192 | 67 | 185 | test/com/google/javascript/jscomp/RemoveUnusedPrototypePropertiesTest.java | test | ```markdown
## Issue-ID: Closure-459
## Issue-Title:
Advanced compilations renames a function and then deletes it, leaving a reference to a renamed but non-existent function
## Issue-Description:
If we provide the below code to advanced:
function A() {
this.\_x = 1;
}
A.prototype['func1'] = // done to sav... | 185 | [
"com.google.javascript.jscomp.AnalyzePrototypeProperties"
] | 97934d75b93db81f6b0c8c4eb849fa5e05b3c08979b53eec796dea72a00ae04f | public void testAliasing7() | // You are a professional Java test case writer, please create a test case named `testAliasing7` for the issue `Closure-459`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-459
//
// ## Issue-Title:
// Advanced compilations renames a function and then de... | 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... | ||
@Test
public void should_return_empty_iterable() throws Exception {
assertFalse(((Iterable) values.returnValueFor(Iterable.class)).iterator().hasNext());
} | org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValuesTest::should_return_empty_iterable | test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java | 57 | test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java | should_return_empty_iterable | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.stubbing.defaultanswers;
import static org.mockito.Mockito.mock;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap... | // You are a professional Java test case writer, please create a test case named `should_return_empty_iterable` for the issue `Mockito-210`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-210
//
// ## Issue-Title:
// Return empty value for Iterables
//
... | 57 | 18 | 54 | test/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValuesTest.java | test | ```markdown
## Issue-ID: Mockito-210
## Issue-Title:
Return empty value for Iterables
## Issue-Description:
<http://code.google.com/p/mockito/issues/detail?id=175>
I expect an Iterable to be mocked by default with an empty Iterable. I understand from the initial issue this behavior would be introduced in Mockito ... | 54 | [
"org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues"
] | 992b09a019da11e55005c6a755c34f2507a8a6ea7d2655c4cc23681dc57f3e25 | @Test
public void should_return_empty_iterable() throws Exception | // You are a professional Java test case writer, please create a test case named `should_return_empty_iterable` for the issue `Mockito-210`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-210
//
// ## Issue-Title:
// Return empty value for Iterables
//
... | Mockito | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.stubbing.defaultanswers;
import static org.mockito.Mockito.mock;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap... | ||
public void testToPeriod_fixedZone() throws Throwable {
DateTimeZone zone = DateTimeZone.getDefault();
try {
DateTimeZone.setDefault(DateTimeZone.forOffsetHours(2));
long length =
(4L + (3L * 7L) + (2L * 30L) + 365L) * DateTimeConstants.MILLIS_PER_DAY +
... | org.joda.time.TestDuration_Basics::testToPeriod_fixedZone | src/test/java/org/joda/time/TestDuration_Basics.java | 491 | src/test/java/org/joda/time/TestDuration_Basics.java | testToPeriod_fixedZone | /*
* Copyright 2001-2009 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... | // You are a professional Java test case writer, please create a test case named `testToPeriod_fixedZone` for the issue `Time-113`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-113
//
// ## Issue-Title:
// #113 Duration.toPeriod with fixed time zones.
// ... | 491 | 22 | 469 | src/test/java/org/joda/time/TestDuration_Basics.java | src/test/java | ```markdown
## Issue-ID: Time-113
## Issue-Title:
#113 Duration.toPeriod with fixed time zones.
## Issue-Description:
I have a question concerning the conversion of a Duration to Period. I'm not sure if this is a bug, or if there is a different way to do this.
The basis of the problem, is that using Duration.... | 469 | [
"org.joda.time.base.BasePeriod"
] | 9a00714dd02e407c62904ee6d9da8d2c3ff57ff9c385c175d8d1c054fc21e488 | public void testToPeriod_fixedZone() throws Throwable | // You are a professional Java test case writer, please create a test case named `testToPeriod_fixedZone` for the issue `Time-113`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Time-113
//
// ## Issue-Title:
// #113 Duration.toPeriod with fixed time zones.
// ... | Time | /*
* Copyright 2001-2009 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... | ||
public void testAssignWithCall() {
test("var fun, x; (fun = function(){ x; })();",
"var x; (function(){ x; })();");
} | com.google.javascript.jscomp.NameAnalyzerTest::testAssignWithCall | test/com/google/javascript/jscomp/NameAnalyzerTest.java | 1,237 | test/com/google/javascript/jscomp/NameAnalyzerTest.java | testAssignWithCall | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testAssignWithCall` for the issue `Closure-1085`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-1085
//
// ## Issue-Title:
// Crash on the web closure compiler
//
// ## I... | 1,237 | 114 | 1,234 | test/com/google/javascript/jscomp/NameAnalyzerTest.java | test | ```markdown
## Issue-ID: Closure-1085
## Issue-Title:
Crash on the web closure compiler
## Issue-Description:
With the web application (http://closure-compiler.appspot.com/home)
Config:
// ==ClosureCompiler==
// @output\_file\_name default.js
// @compilation\_level ADVANCED\_OPTIMIZATIONS
// ==/ClosureComp... | 1,234 | [
"com.google.javascript.jscomp.NameAnalyzer"
] | 9a1c6cfcb42b3cfb50e10d3996590305ff3a955f2537a733d2f9a1366224135f | public void testAssignWithCall() | // You are a professional Java test case writer, please create a test case named `testAssignWithCall` for the issue `Closure-1085`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-1085
//
// ## Issue-Title:
// Crash on the web closure compiler
//
// ## I... | 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... | ||
public void testImplementsExtendsLoop() throws Exception {
testClosureTypesMultipleWarnings(
suppressMissingProperty("foo") +
"/** @constructor \n * @implements {F} */var G = function() {};" +
"/** @constructor \n * @extends {G} */var F = function() {};" +
"alert((new F).fo... | com.google.javascript.jscomp.TypeCheckTest::testImplementsExtendsLoop | test/com/google/javascript/jscomp/TypeCheckTest.java | 9,238 | test/com/google/javascript/jscomp/TypeCheckTest.java | testImplementsExtendsLoop | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testImplementsExtendsLoop` for the issue `Closure-873`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-873
//
// ## Issue-Title:
// Converting from an interface type to a c... | 9,238 | 4 | 9,230 | test/com/google/javascript/jscomp/TypeCheckTest.java | test | ```markdown
## Issue-ID: Closure-873
## Issue-Title:
Converting from an interface type to a constructor which @implements itself causes stack overflow.
## Issue-Description:
// Options: --externs externs/es3.js --property\_renaming OFF --variable\_renaming OFF --jscomp\_warning=checkTypes --js=t.js
// File: t.... | 9,230 | [
"com.google.javascript.rhino.jstype.NamedType"
] | 9ad5f1236b72367ba5805e9c5389e2c953bcf1f489ed7e12d17e0138fe9e21f8 | public void testImplementsExtendsLoop() throws Exception | // You are a professional Java test case writer, please create a test case named `testImplementsExtendsLoop` for the issue `Closure-873`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-873
//
// ## Issue-Title:
// Converting from an interface type to a c... | 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... | ||
public void testFileValidator() {
final DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
final ArgumentBuilder abuilder = new ArgumentBuilder();
final GroupBuilder gbuilder = new GroupBuilder();
DefaultOption fileNameOption = obuilder.withShortName("f")
.withLongNam... | org.apache.commons.cli2.bug.BugCLI144Test::testFileValidator | src/test/org/apache/commons/cli2/bug/BugCLI144Test.java | 64 | src/test/org/apache/commons/cli2/bug/BugCLI144Test.java | testFileValidator | /**
* 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... | // You are a professional Java test case writer, please create a test case named `testFileValidator` for the issue `Cli-CLI-144`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-144
//
// ## Issue-Title:
// adding a FileValidator results in ClassCastExcep... | 64 | 14 | 43 | src/test/org/apache/commons/cli2/bug/BugCLI144Test.java | src/test | ```markdown
## Issue-ID: Cli-CLI-144
## Issue-Title:
adding a FileValidator results in ClassCastException in parser.parseAndHelp(args)
## Issue-Description:
When I add a FileValidator.getExistingFileInstance() to an Argument, I get a ClassCastException when I parse args.
Below is a testcase invoke with
java o... | 43 | [
"org.apache.commons.cli2.option.GroupImpl"
] | 9af16a9a4df4dd615bb6ff5832ac41b576e825199fea5aeef10d2688431b2f1e | public void testFileValidator() | // You are a professional Java test case writer, please create a test case named `testFileValidator` for the issue `Cli-CLI-144`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-144
//
// ## Issue-Title:
// adding a FileValidator results in ClassCastExcep... | Cli | /**
* 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... | ||
@Test
public void testMath713NegativeVariable() {
LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] {1.0, 1.0}, 0.0d);
ArrayList<LinearConstraint> constraints = new ArrayList<LinearConstraint>();
constraints.add(new LinearConstraint(new double[] {1, 0}, Relationship.EQ... | org.apache.commons.math.optimization.linear.SimplexSolverTest::testMath713NegativeVariable | src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java | 43 | src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java | testMath713NegativeVariable | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testMath713NegativeVariable` for the issue `Math-MATH-713`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-713
//
// ## Issue-Title:
// Negative value with restrictNonNeg... | 43 | 42 | 31 | src/test/java/org/apache/commons/math/optimization/linear/SimplexSolverTest.java | src/test/java | ```markdown
## Issue-ID: Math-MATH-713
## Issue-Title:
Negative value with restrictNonNegative
## Issue-Description:
Problem: commons-math-2.2 SimplexSolver.
A variable with 0 coefficient may be assigned a negative value nevertheless restrictToNonnegative flag in call:
SimplexSolver.optimize(function, constra... | 31 | [
"org.apache.commons.math.optimization.linear.SimplexTableau"
] | 9c5f6389544e0fd6a8f62967207becb69c2379f51c4f9924c6a093630312e0da | @Test
public void testMath713NegativeVariable() | // You are a professional Java test case writer, please create a test case named `testMath713NegativeVariable` for the issue `Math-MATH-713`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-713
//
// ## Issue-Title:
// Negative value with restrictNonNeg... | 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 ... | ||
@Test
public void testEqualsCS1() {
Assert.assertFalse(StringUtils.equals(new StringBuilder("abc"), null));
Assert.assertFalse(StringUtils.equals(null, new StringBuilder("abc")));
Assert.assertTrue(StringUtils.equals(new StringBuilder("abc"), new StringBuilder("abc")));
Assert.as... | org.apache.commons.codec.binary.StringUtilsTest::testEqualsCS1 | src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java | 230 | src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java | testEqualsCS1 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testEqualsCS1` for the issue `Codec-CODEC-231`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-231
//
// ## Issue-Title:
// StringUtils.equals(CharSequence cs1, CharSeq... | 230 | 18 | 222 | src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java | src/test/java | ```markdown
## Issue-ID: Codec-CODEC-231
## Issue-Title:
StringUtils.equals(CharSequence cs1, CharSequence cs2) can fail with String Index OBE
## Issue-Description:
StringUtils.equals(CharSequence cs1, CharSequence cs2) fails with String Index OBE if the two sequences are different lengths.
```
You are a pro... | 222 | [
"org.apache.commons.codec.binary.StringUtils"
] | 9c7cf79b8f29e168d3699b330ceb3062fffd449b19b3c33f47d44e2c7307eb7e | @Test
public void testEqualsCS1() | // You are a professional Java test case writer, please create a test case named `testEqualsCS1` for the issue `Codec-CODEC-231`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Codec-CODEC-231
//
// ## Issue-Title:
// StringUtils.equals(CharSequence cs1, CharSeq... | 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 ... | ||
public void testGcd() {
int a = 30;
int b = 50;
int c = 77;
assertEquals(0, MathUtils.gcd(0, 0));
assertEquals(b, MathUtils.gcd(0, b));
assertEquals(a, MathUtils.gcd(a, 0));
assertEquals(b, MathUtils.gcd(0, -b));
assertEquals(a, MathUtils.gcd(-a, 0))... | org.apache.commons.math.util.MathUtilsTest::testGcd | src/test/org/apache/commons/math/util/MathUtilsTest.java | 296 | src/test/org/apache/commons/math/util/MathUtilsTest.java | testGcd | /*
* 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... | // You are a professional Java test case writer, please create a test case named `testGcd` for the issue `Math-MATH-238`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-238
//
// ## Issue-Title:
// MathUtils.gcd(u, v) fails when u and v both contain a ... | 296 | 94 | 272 | src/test/org/apache/commons/math/util/MathUtilsTest.java | src/test | ```markdown
## Issue-ID: Math-MATH-238
## Issue-Title:
MathUtils.gcd(u, v) fails when u and v both contain a high power of 2
## Issue-Description:
The test at the beginning of MathUtils.gcd(u, v) for arguments equal to zero fails when u and v contain high enough powers of 2 so that their product overflows to zero.... | 272 | [
"org.apache.commons.math.util.MathUtils"
] | 9d92b388fdc54b18fa11d6d73c1e73fc4c5e1d65df29af7851335f4a0dbade7e | public void testGcd() | // You are a professional Java test case writer, please create a test case named `testGcd` for the issue `Math-MATH-238`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Math-MATH-238
//
// ## Issue-Title:
// MathUtils.gcd(u, v) fails when u and v both contain a ... | 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 n... | ||
@Test
public void testHashAndEquals() {
String doc1 = "<div id=1><p class=one>One</p><p class=one>One</p><p class=one>Two</p><p class=two>One</p></div>" +
"<div id=2><p class=one>One</p><p class=one>One</p><p class=one>Two</p><p class=two>One</p></div>";
Document doc = Jsoup.par... | org.jsoup.nodes.ElementTest::testHashAndEquals | src/test/java/org/jsoup/nodes/ElementTest.java | 799 | src/test/java/org/jsoup/nodes/ElementTest.java | testHashAndEquals | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.parser.Tag;
import org.jsoup.select.Elements;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
im... | // You are a professional Java test case writer, please create a test case named `testHashAndEquals` for the issue `Jsoup-537`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-537
//
// ## Issue-Title:
// Element.hashCode() ignores the content text of the e... | 799 | 41 | 752 | src/test/java/org/jsoup/nodes/ElementTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-537
## Issue-Title:
Element.hashCode() ignores the content text of the element.
## Issue-Description:
Found [this question](http://stackoverflow.com/questions/28970732/jsoup-node-hash-code-collision-when-traversing-dom-tree/28971463) on SO, OP was using `Element.hashCode()` and it was... | 752 | [
"org.jsoup.nodes.Element"
] | 9e8c440979d956df0123231d6dcab3996a63b8c8c7260b6d3d90b5ff6093f5e3 | @Test
public void testHashAndEquals() | // You are a professional Java test case writer, please create a test case named `testHashAndEquals` for the issue `Jsoup-537`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-537
//
// ## Issue-Title:
// Element.hashCode() ignores the content text of the e... | Jsoup | package org.jsoup.nodes;
import org.jsoup.Jsoup;
import org.jsoup.TextUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.parser.Tag;
import org.jsoup.select.Elements;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
im... | ||
public void testExpand()
{
TextBuffer tb = new TextBuffer(new BufferRecycler());
char[] buf = tb.getCurrentSegment();
while (buf.length < 500 * 1000) {
char[] old = buf;
buf = tb.expandCurrentSegment();
if (old.length >= buf.length) {
... | com.fasterxml.jackson.core.util.TestTextBuffer::testExpand | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | 78 | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | testExpand | package com.fasterxml.jackson.core.util;
import com.fasterxml.jackson.core.util.BufferRecycler;
import com.fasterxml.jackson.core.util.TextBuffer;
public class TestTextBuffer
extends com.fasterxml.jackson.core.BaseTest
{
/**
* Trivially simple basic test to ensure all basic append
* methods work
... | // You are a professional Java test case writer, please create a test case named `testExpand` for the issue `JacksonCore-152`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-152
//
// ## Issue-Title:
// What is the maximum key length allowed?
//
// ... | 78 | // [Core#152] | 4 | 66 | src/test/java/com/fasterxml/jackson/core/util/TestTextBuffer.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-152
## Issue-Title:
What is the maximum key length allowed?
## Issue-Description:
I noticed that even in Jackson 2.4, if a JSON key is longer than 262144 bytes, ArrayIndexOutOfBoundsException is thrown from TextBuffer. Below is the stack trace:
```
java.lang.ArrayIndexOutOfBo... | 66 | [
"com.fasterxml.jackson.core.util.TextBuffer"
] | 9e9d7cb425aca518f8ed4d5ceb074cf2899b38ded5c6c0f273626afc51d5d252 | public void testExpand()
| // You are a professional Java test case writer, please create a test case named `testExpand` for the issue `JacksonCore-152`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-152
//
// ## Issue-Title:
// What is the maximum key length allowed?
//
// ... | JacksonCore | package com.fasterxml.jackson.core.util;
import com.fasterxml.jackson.core.util.BufferRecycler;
import com.fasterxml.jackson.core.util.TextBuffer;
public class TestTextBuffer
extends com.fasterxml.jackson.core.BaseTest
{
/**
* Trivially simple basic test to ensure all basic append
* methods work
... | |
@Test
public void shouldWorkFineWhenGivenArgIsNull() {
//when
Integer[] suspicious = tool.getSuspiciouslyNotMatchingArgsIndexes((List) Arrays.asList(new Equals(20)), new Object[] {null});
//then
assertEquals(0, suspicious.length);
} | org.mockito.internal.verification.argumentmatching.ArgumentMatchingToolTest::shouldWorkFineWhenGivenArgIsNull | test/org/mockito/internal/verification/argumentmatching/ArgumentMatchingToolTest.java | 85 | test/org/mockito/internal/verification/argumentmatching/ArgumentMatchingToolTest.java | shouldWorkFineWhenGivenArgIsNull | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.verification.argumentmatching;
import java.util.Arrays;
import java.util.List;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matc... | // You are a professional Java test case writer, please create a test case named `shouldWorkFineWhenGivenArgIsNull` for the issue `Mockito-79`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-79
//
// ## Issue-Title:
// Generate change list separated by t... | 85 | 38 | 78 | test/org/mockito/internal/verification/argumentmatching/ArgumentMatchingToolTest.java | test | ```markdown
## Issue-ID: Mockito-79
## Issue-Title:
Generate change list separated by types using labels
## Issue-Description:
[ | // You are a professional Java test case writer, please create a test case named `shouldWorkFineWhenGivenArgIsNull` for the issue `Mockito-79`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Mockito-79
//
// ## Issue-Title:
// Generate change list separated by t... | Mockito | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.verification.argumentmatching;
import java.util.Arrays;
import java.util.List;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matc... | ||
public void testZero() {
assertPrint("var x ='\\0';", "var x=\"\\000\"");
assertPrint("var x ='\\x00';", "var x=\"\\000\"");
assertPrint("var x ='\\u0000';", "var x=\"\\000\"");
assertPrint("var x ='\\u00003';", "var x=\"\\0003\"");
} | com.google.javascript.jscomp.CodePrinterTest::testZero | test/com/google/javascript/jscomp/CodePrinterTest.java | 1,234 | test/com/google/javascript/jscomp/CodePrinterTest.java | testZero | /*
* Copyright 2004 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... | // You are a professional Java test case writer, please create a test case named `testZero` for the issue `Closure-486`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-486
//
// ## Issue-Title:
// String escaping mishandles null byte
//
// ## Issue-Desc... | 1,234 | 65 | 1,229 | test/com/google/javascript/jscomp/CodePrinterTest.java | test | ```markdown
## Issue-ID: Closure-486
## Issue-Title:
String escaping mishandles null byte
## Issue-Description:
**What steps will reproduce the problem?**
1. Run:
var x = "\u00003"; if (x.length < 2) { alert("fail"); } else { alert("win"); }
2. Compile and run
**What is the expected output? What do you see ins... | 1,229 | [
"com.google.javascript.jscomp.CodeGenerator"
] | a0a8a95cf1149923ba0f7ff8c9bcb53a389fec891e88071d3aac134866b4f39c | public void testZero() | // You are a professional Java test case writer, please create a test case named `testZero` for the issue `Closure-486`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-486
//
// ## Issue-Title:
// String escaping mishandles null byte
//
// ## Issue-Desc... | Closure | /*
* Copyright 2004 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... | ||
public void testSingleOptionSingleArgument() throws Exception {
Parser parser = createDefaultValueParser(new String[]{"100", "1000"});
String enteredValue1 = "1";
String[] args = new String[]{"-b", enteredValue1};
CommandLine cl = parser.parse(args);
CommandLine cmd = cl;
... | org.apache.commons.cli2.bug.BugCLI158Test::testSingleOptionSingleArgument | src/test/org/apache/commons/cli2/bug/BugCLI158Test.java | 70 | src/test/org/apache/commons/cli2/bug/BugCLI158Test.java | testSingleOptionSingleArgument | /**
* 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... | // You are a professional Java test case writer, please create a test case named `testSingleOptionSingleArgument` for the issue `Cli-CLI-158`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-158
//
// ## Issue-Title:
// deafult arguments only works if no ... | 70 | 15 | 61 | src/test/org/apache/commons/cli2/bug/BugCLI158Test.java | src/test | ```markdown
## Issue-ID: Cli-CLI-158
## Issue-Title:
deafult arguments only works if no arguments are submitted
## Issue-Description:
When using multple arguments and defaults, the behaviour is counter-intuitive and will only pick up a default if no args are passed in.
For instance in the code below I have set u... | 61 | [
"org.apache.commons.cli2.commandline.WriteableCommandLineImpl"
] | a17f5954f3df8a9aa54b59d8338353946b37489cc0b6e9059a1fca9dcdb566b8 | public void testSingleOptionSingleArgument() throws Exception | // You are a professional Java test case writer, please create a test case named `testSingleOptionSingleArgument` for the issue `Cli-CLI-158`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Cli-CLI-158
//
// ## Issue-Title:
// deafult arguments only works if no ... | Cli | /**
* 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... | ||
public void testDelegateWithTokenBuffer() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
Value592 value = mapper.readValue("{\"a\":1,\"b\":2}", Value592.class);
assertNotNull(value);
Object ob = value.stuff;
assertEquals(TokenBuffer.class, ob.getClass());
... | com.fasterxml.jackson.databind.creators.TestCreatorsDelegating::testDelegateWithTokenBuffer | src/test/java/com/fasterxml/jackson/databind/creators/TestCreatorsDelegating.java | 142 | src/test/java/com/fasterxml/jackson/databind/creators/TestCreatorsDelegating.java | testDelegateWithTokenBuffer | package com.fasterxml.jackson.databind.creators;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.d... | // You are a professional Java test case writer, please create a test case named `testDelegateWithTokenBuffer` for the issue `JacksonDatabind-592`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-592
//
// ## Issue-Title:
// Possibly wrong TokenBu... | 142 | // [databind#592] | 7 | 123 | src/test/java/com/fasterxml/jackson/databind/creators/TestCreatorsDelegating.java | src/test/java | ```markdown
## Issue-ID: JacksonDatabind-592
## Issue-Title:
Possibly wrong TokenBuffer delegate deserialization using @JsonCreator
## Issue-Description:
```
class Value {
@JsonCreator
public static Value from(TokenBuffer buffer) {
...
}
```
Given JSON string is `{ "a":1, "b":null }`, it is expected that while de... | 123 | [
"com.fasterxml.jackson.databind.util.TokenBuffer"
] | a2dc0da77d9a80cdcd7b5a6068ba0902b4efe7ab7314f859a4185357694d2eb5 | public void testDelegateWithTokenBuffer() throws Exception
| // You are a professional Java test case writer, please create a test case named `testDelegateWithTokenBuffer` for the issue `JacksonDatabind-592`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonDatabind-592
//
// ## Issue-Title:
// Possibly wrong TokenBu... | JacksonDatabind | package com.fasterxml.jackson.databind.creators;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.d... | |
@Test(expected = IllegalArgumentException.class) public void validatesKeysNotEmpty() {
Attribute attr = new Attribute(" ", "Check");
} | org.jsoup.nodes.AttributeTest::validatesKeysNotEmpty | src/test/java/org/jsoup/nodes/AttributeTest.java | 22 | src/test/java/org/jsoup/nodes/AttributeTest.java | validatesKeysNotEmpty | package org.jsoup.nodes;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AttributeTest {
@Test public void html() {
Attribute attr = new Attribute("key", "value &");
assertEquals("key=\"value &\"", attr.html());
assertEquals(attr.html(), attr.toString(... | // You are a professional Java test case writer, please create a test case named `validatesKeysNotEmpty` for the issue `Jsoup-1159`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-1159
//
// ## Issue-Title:
// Attribute.java line 45 variable key scope erro... | 22 | 85 | 20 | src/test/java/org/jsoup/nodes/AttributeTest.java | src/test/java | ```markdown
## Issue-ID: Jsoup-1159
## Issue-Title:
Attribute.java line 45 variable key scope error, it seems should be "this.key"
## Issue-Description:
[](https://user-images.githubusercontent.com/41705526... | 20 | [
"org.jsoup.nodes.Attribute"
] | a34b8735ff240b9b0dca58e322b76fc0f93f62fc140c4f11bb8dbbfaff171fc1 | @Test(expected = IllegalArgumentException.class) public void validatesKeysNotEmpty() | // You are a professional Java test case writer, please create a test case named `validatesKeysNotEmpty` for the issue `Jsoup-1159`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Jsoup-1159
//
// ## Issue-Title:
// Attribute.java line 45 variable key scope erro... | Jsoup | package org.jsoup.nodes;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AttributeTest {
@Test public void html() {
Attribute attr = new Attribute("key", "value &");
assertEquals("key=\"value &\"", attr.html());
assertEquals(attr.html(), attr.toString(... | ||
public void testInvalidSubClass() throws Exception
{
DefaultPrettyPrinter pp = new MyPrettyPrinter();
try {
pp.createInstance();
fail("Should not pass");
} catch (IllegalStateException e) {
verifyException(e, "does not override");
}
} | com.fasterxml.jackson.core.util.TestDefaultPrettyPrinter::testInvalidSubClass | src/test/java/com/fasterxml/jackson/core/util/TestDefaultPrettyPrinter.java | 172 | src/test/java/com/fasterxml/jackson/core/util/TestDefaultPrettyPrinter.java | testInvalidSubClass | package com.fasterxml.jackson.core.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;
import com.fasterxml.jackson.core.*;
public class TestDefaultPrettyPrinter extends BaseTest
{
private final JsonFactory JSON_F = new JsonFactory();
public void testSyst... | // You are a professional Java test case writer, please create a test case named `testInvalidSubClass` for the issue `JacksonCore-502`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-502
//
// ## Issue-Title:
// Make DefaultPrettyPrinter.createInstan... | 172 | // [core#502]: Force sub-classes to reimplement `createInstance` | 23 | 163 | src/test/java/com/fasterxml/jackson/core/util/TestDefaultPrettyPrinter.java | src/test/java | ```markdown
## Issue-ID: JacksonCore-502
## Issue-Title:
Make DefaultPrettyPrinter.createInstance() to fail for sub-classes
## Issue-Description:
Pattern of "blueprint object" (that is, having an instance not used as-is, but that has factory method for creating actual instance) is used by Jackson in couple of place... | 163 | [
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter"
] | a350b1a6f5a06c24d159212da7876bc155f274551dee59bca150bf12daf401d8 | public void testInvalidSubClass() throws Exception
| // You are a professional Java test case writer, please create a test case named `testInvalidSubClass` for the issue `JacksonCore-502`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonCore-502
//
// ## Issue-Title:
// Make DefaultPrettyPrinter.createInstan... | JacksonCore | package com.fasterxml.jackson.core.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;
import com.fasterxml.jackson.core.*;
public class TestDefaultPrettyPrinter extends BaseTest
{
private final JsonFactory JSON_F = new JsonFactory();
public void testSyst... | |
public void testPrintInOperatorInForLoop() {
// Check for in expression in for's init expression.
// Check alone, with + (higher precedence), with ?: (lower precedence),
// and with conditional.
assertPrint("var a={}; for (var i = (\"length\" in a); i;) {}",
"var a={};for(var i=(\"length\"in a... | com.google.javascript.jscomp.CodePrinterTest::testPrintInOperatorInForLoop | test/com/google/javascript/jscomp/CodePrinterTest.java | 471 | test/com/google/javascript/jscomp/CodePrinterTest.java | testPrintInOperatorInForLoop | /*
* Copyright 2004 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... | // You are a professional Java test case writer, please create a test case named `testPrintInOperatorInForLoop` for the issue `Closure-1033`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-1033
//
// ## Issue-Title:
// Generates code with invalid for/in ... | 471 | 123 | 438 | test/com/google/javascript/jscomp/CodePrinterTest.java | test | ```markdown
## Issue-ID: Closure-1033
## Issue-Title:
Generates code with invalid for/in left-hand assignment
## Issue-Description:
**What steps will reproduce the problem?**
1. Compile this:
window.Foo = function(A, B, C, D) {
if ( A ) {
if ( B ) {
C = 0;
} else {
C = 0 in D;
}
while ( C-- ) {}
... | 438 | [
"com.google.javascript.jscomp.CodeGenerator"
] | a3e67d98982693f3385f5d8609c8592dff343985595b8f770f1a5ca45556dbbb | public void testPrintInOperatorInForLoop() | // You are a professional Java test case writer, please create a test case named `testPrintInOperatorInForLoop` for the issue `Closure-1033`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Closure-1033
//
// ## Issue-Title:
// Generates code with invalid for/in ... | Closure | /*
* Copyright 2004 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... | ||
public void testNestedUnwrappedLists180() throws Exception
{
/*
Records recs = new Records();
recs.records.add(new Record());
recs.records.add(new Record());
recs.records.add(new Record());
recs.records.get(0).fields.add(new Field("a"));
recs.records.get(2... | com.fasterxml.jackson.dataformat.xml.lists.NestedUnwrappedLists180Test::testNestedUnwrappedLists180 | src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists180Test.java | 72 | src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists180Test.java | testNestedUnwrappedLists180 | package com.fasterxml.jackson.dataformat.xml.lists;
import java.util.*;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotatio... | // You are a professional Java test case writer, please create a test case named `testNestedUnwrappedLists180` for the issue `JacksonXml-180`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonXml-180
//
// ## Issue-Title:
// Problem with deserialization of ... | 72 | 1 | 37 | src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists180Test.java | src/test/java | ```markdown
## Issue-ID: JacksonXml-180
## Issue-Title:
Problem with deserialization of nested non-wrapped lists, with empty inner list
## Issue-Description:
Looks like there is a problem, wherein nested structures like say:
* Definition POJO, with `records`, unwrapped List with `Record`
* `Record` POJO having pr... | 37 | [
"com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser"
] | a57e5cc4e6d83a176e3ad4e4fb97da33881889324dcb64840681f519b508f27c | public void testNestedUnwrappedLists180() throws Exception
| // You are a professional Java test case writer, please create a test case named `testNestedUnwrappedLists180` for the issue `JacksonXml-180`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: JacksonXml-180
//
// ## Issue-Title:
// Problem with deserialization of ... | JacksonXml | package com.fasterxml.jackson.dataformat.xml.lists;
import java.util.*;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotatio... | ||
public void test_toBoolean_String() {
assertEquals(false, BooleanUtils.toBoolean((String) null));
assertEquals(false, BooleanUtils.toBoolean(""));
assertEquals(false, BooleanUtils.toBoolean("off"));
assertEquals(false, BooleanUtils.toBoolean("oof"));
assertEquals(false, Boole... | org.apache.commons.lang.BooleanUtilsTest::test_toBoolean_String | src/test/org/apache/commons/lang/BooleanUtilsTest.java | 334 | src/test/org/apache/commons/lang/BooleanUtilsTest.java | test_toBoolean_String | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `test_toBoolean_String` for the issue `Lang-LANG-365`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-365
//
// ## Issue-Title:
// BooleanUtils.toBoolean() - invalid drop-... | 334 | //----------------------------------------------------------------------- | 51 | 294 | src/test/org/apache/commons/lang/BooleanUtilsTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-365
## Issue-Title:
BooleanUtils.toBoolean() - invalid drop-thru in case statement causes StringIndexOutOfBoundsException
## Issue-Description:
The method BooleanUtils.toBoolean() has a case statement; case 3 drops through to case 4; this can cause StringIndexOutOfBoundsException... | 294 | [
"org.apache.commons.lang.BooleanUtils"
] | a598282942b6cce947b47440e6c6fc89daddc22fd6a5b8f0a2a8fd3406f46ad7 | public void test_toBoolean_String() | // You are a professional Java test case writer, please create a test case named `test_toBoolean_String` for the issue `Lang-LANG-365`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-365
//
// ## Issue-Title:
// BooleanUtils.toBoolean() - invalid drop-... | 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 ... | |
public void testIndexOfLang294() {
StrBuilder sb = new StrBuilder("onetwothree");
sb.deleteFirst("three");
assertEquals(-1, sb.indexOf("three"));
} | org.apache.commons.lang.text.StrBuilderTest::testIndexOfLang294 | src/test/org/apache/commons/lang/text/StrBuilderTest.java | 1,741 | src/test/org/apache/commons/lang/text/StrBuilderTest.java | testIndexOfLang294 | /*
* 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 ... | // You are a professional Java test case writer, please create a test case named `testIndexOfLang294` for the issue `Lang-LANG-294`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-294
//
// ## Issue-Title:
// StrBuilder.replaceAll and StrBuilder.delete... | 1,741 | 61 | 1,737 | src/test/org/apache/commons/lang/text/StrBuilderTest.java | src/test | ```markdown
## Issue-ID: Lang-LANG-294
## Issue-Title:
StrBuilder.replaceAll and StrBuilder.deleteAll can throw ArrayIndexOutOfBoundsException.
## Issue-Description:
StrBuilder.replaceAll and StrBuilder.deleteAll can thrown ArrayIndexOutOfBoundsException's. Here are a couple of additions to the StrBuilderTest clas... | 1,737 | [
"org.apache.commons.lang.text.StrBuilder"
] | a61dc21c8d973ee2be051395440fe87ed0b2c5e6316fad61fc86e80358e561ea | public void testIndexOfLang294() | // You are a professional Java test case writer, please create a test case named `testIndexOfLang294` for the issue `Lang-LANG-294`, utilizing the provided issue report information and the following function signature.
// ## Issue-ID: Lang-LANG-294
//
// ## Issue-Title:
// StrBuilder.replaceAll and StrBuilder.delete... | 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.