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 testFoldGetElem() { fold("x = [,10][0]", "x = void 0"); fold("x = [10, 20][0]", "x = 10"); fold("x = [10, 20][1]", "x = 20"); fold("x = [10, 20][0.5]", "", PeepholeFoldConstants.INVALID_GETELEM_INDEX_ERROR); fold("x = [10, 20][-1]", "", PeepholeFoldConstants.INDEX_OU...
com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldGetElem
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
777
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
testFoldGetElem
/* * 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 `testFoldGetElem` for the issue `Closure-747`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-747 // // ## Issue-Title: // tryFoldArrayAccess does not check for side effects...
777
23
763
test/com/google/javascript/jscomp/PeepholeFoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-747 ## Issue-Title: tryFoldArrayAccess does not check for side effects ## Issue-Description: **What steps will reproduce the problem?** 1. Compile the following program with simple or advanced optimization: console.log([console.log('hello, '), 'world!'][1]); **What is the expect...
763
[ "com.google.javascript.jscomp.PeepholeFoldConstants" ]
343ac16e223b07e426722e91998072bbd3b6a5b657039a63b7af7ab746dd7b1e
public void testFoldGetElem()
// You are a professional Java test case writer, please create a test case named `testFoldGetElem` for the issue `Closure-747`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-747 // // ## Issue-Title: // tryFoldArrayAccess does not check for side effects...
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 testElementDOM() { doTestElement(DocumentContainer.MODEL_DOM); }
org.apache.commons.jxpath.ri.model.ExternalXMLNamespaceTest::testElementDOM
src/test/org/apache/commons/jxpath/ri/model/ExternalXMLNamespaceTest.java
70
src/test/org/apache/commons/jxpath/ri/model/ExternalXMLNamespaceTest.java
testElementDOM
/* * 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 `testElementDOM` for the issue `JxPath-JXPATH-97`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-97 // // ## Issue-Title: // Incomplete handling of undefined namespac...
70
12
68
src/test/org/apache/commons/jxpath/ri/model/ExternalXMLNamespaceTest.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-97 ## Issue-Title: Incomplete handling of undefined namespaces ## Issue-Description: Mcduffey, Joe <jdmcduf@nsa.gov> Can someone tell me how to register namespaces so that attributes with namespaces does not cause the exception org.apache.common.ri.model.dom.DOMNodePointe...
68
[ "org.apache.commons.jxpath.ri.model.dom.DOMNodePointer" ]
35678f23c16ad7ab65076aa632a00229f7bc3ae9698c0266186fd8bffefc7857
public void testElementDOM()
// You are a professional Java test case writer, please create a test case named `testElementDOM` for the issue `JxPath-JXPATH-97`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-97 // // ## Issue-Title: // Incomplete handling of undefined namespac...
JxPath
/* * 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 testObject10() { testLocal("var x; var b = f(); x = {a:a, b:b}; if(x.a) g(x.b);", "var JSCompiler_object_inline_a_0;" + "var JSCompiler_object_inline_b_1;" + "var b = f();" + "JSCompiler_object_inline_a_0=a,JSCompiler_object_inline_b_1=b,true;" + "if(JSComp...
com.google.javascript.jscomp.InlineObjectLiteralsTest::testObject10
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
206
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
testObject10
/* * Copyright 2011 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 `testObject10` for the issue `Closure-724`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-724 // // ## Issue-Title: // closure compiler screws up a perfectly valid isFuncti...
206
29
166
test/com/google/javascript/jscomp/InlineObjectLiteralsTest.java
test
```markdown ## Issue-ID: Closure-724 ## Issue-Title: closure compiler screws up a perfectly valid isFunction() implementation ## Issue-Description: hi, this function does not get compiled correctly via google closure compiler isFunction = function(functionToCheck) { var getType; getType = {}; //just an obje...
166
[ "com.google.javascript.jscomp.InlineObjectLiterals" ]
369f05c14d87b86ddf808b76b727301c03541ae5e9df81d53e2bd80affcb1617
public void testObject10()
// You are a professional Java test case writer, please create a test case named `testObject10` for the issue `Closure-724`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-724 // // ## Issue-Title: // closure compiler screws up a perfectly valid isFuncti...
Closure
/* * Copyright 2011 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 testUnrecognizedOption2() throws Exception { String[] args = new String[] { "-z", "-abtoast", "foo", "bar" }; try { parser.parse(options, args); fail("UnrecognizedOptionException wasn't thrown"); } catch (UnrecognizedOptionException e)...
org.apache.commons.cli.PosixParserTest::testUnrecognizedOption2
src/test/org/apache/commons/cli/PosixParserTest.java
115
src/test/org/apache/commons/cli/PosixParserTest.java
testUnrecognizedOption2
/** * 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 `testUnrecognizedOption2` for the issue `Cli-CLI-164`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-164 // // ## Issue-Title: // PosixParser ignores unrecognized tokens st...
115
19
102
src/test/org/apache/commons/cli/PosixParserTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-164 ## Issue-Title: PosixParser ignores unrecognized tokens starting with '-' ## Issue-Description: PosixParser doesn't handle properly unrecognized tokens starting with '-' when stopAtNonOption is enabled, the token is simply ignored. For example, if the option 'a' is defined, t...
102
[ "org.apache.commons.cli.PosixParser" ]
36f7b5642e5611f9d87d5d4d8d6db66c25d6df7a513600bbef6d2734b7d0a66c
public void testUnrecognizedOption2() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnrecognizedOption2` for the issue `Cli-CLI-164`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-164 // // ## Issue-Title: // PosixParser ignores unrecognized tokens st...
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 test_DateTime_constructor_Moscow_Autumn() { DateTime dt = new DateTime(2007, 10, 28, 2, 30, ZONE_MOSCOW); assertEquals("2007-10-28T02:30:00.000+04:00", dt.toString()); }
org.joda.time.TestDateTimeZoneCutover::test_DateTime_constructor_Moscow_Autumn
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
922
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
test_DateTime_constructor_Moscow_Autumn
/* * Copyright 2001-2007 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 `test_DateTime_constructor_Moscow_Autumn` for the issue `Time-90`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-90 // // ## Issue-Title: // #90 DateTimeZone.getOffsetFromLoca...
922
25
919
src/test/java/org/joda/time/TestDateTimeZoneCutover.java
src/test/java
```markdown ## Issue-ID: Time-90 ## Issue-Title: #90 DateTimeZone.getOffsetFromLocal error during DST transition ## Issue-Description: This may be a failure of my understanding, but the comments in DateTimeZone.getOffsetFromLocal lead me to believe that if an ambiguous local time is given, the offset correspond...
919
[ "org.joda.time.DateTimeZone" ]
372a56e701836df75a3510517d16145dc52cedf9e6c680eb5ddbc12f5a3aa003
public void test_DateTime_constructor_Moscow_Autumn()
// You are a professional Java test case writer, please create a test case named `test_DateTime_constructor_Moscow_Autumn` for the issue `Time-90`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-90 // // ## Issue-Title: // #90 DateTimeZone.getOffsetFromLoca...
Time
/* * Copyright 2001-2007 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 testStringJoinAdd() { fold("x = ['a', 'b', 'c'].join('')", "x = \"abc\""); fold("x = [].join(',')", "x = \"\""); fold("x = ['a'].join(',')", "x = \"a\""); fold("x = ['a', 'b', 'c'].join(',')", "x = \"a,b,c\""); fold("x = ['a', foo, 'b', 'c'].join(',')", "x = [\"a\",foo,\"b,c\"].join(\"...
com.google.javascript.jscomp.FoldConstantsTest::testStringJoinAdd
test/com/google/javascript/jscomp/FoldConstantsTest.java
657
test/com/google/javascript/jscomp/FoldConstantsTest.java
testStringJoinAdd
/* * Copyright 2004 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 `testStringJoinAdd` for the issue `Closure-106`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-106 // // ## Issue-Title: // Array Join Munged Incorrectly // // ## Issue-De...
657
105
622
test/com/google/javascript/jscomp/FoldConstantsTest.java
test
```markdown ## Issue-ID: Closure-106 ## Issue-Title: Array Join Munged Incorrectly ## Issue-Description: $.fn.hasClass = function(selector) { return ( this.length > 0 ? !( ( ['', this[0].className, ''].join(' ') ).indexOf( ['', selector, ''].join(' ') ) == -1 ) : false ); }; munges into $.fn.hasClas...
622
[ "com.google.javascript.jscomp.FoldConstants" ]
377ff6ff7fdede670d67d34842cf6055a6a03d0edb57a0b94e31340f9a332b36
public void testStringJoinAdd()
// You are a professional Java test case writer, please create a test case named `testStringJoinAdd` for the issue `Closure-106`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-106 // // ## Issue-Title: // Array Join Munged Incorrectly // // ## Issue-De...
Closure
/* * Copyright 2004 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 testRenderWrappedTextWordCut() { int width = 7; int padding = 0; String text = "Thisisatest."; String expected = "Thisisa" + EOL + "test."; StringBuffer sb = new StringBuffer(); new HelpFormatter().renderWrappedText(...
org.apache.commons.cli.HelpFormatterTest::testRenderWrappedTextWordCut
src/test/java/org/apache/commons/cli/HelpFormatterTest.java
69
src/test/java/org/apache/commons/cli/HelpFormatterTest.java
testRenderWrappedTextWordCut
/** * 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 `testRenderWrappedTextWordCut` for the issue `Cli-CLI-193`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-193 // // ## Issue-Title: // StringIndexOutOfBoundsException in He...
69
32
58
src/test/java/org/apache/commons/cli/HelpFormatterTest.java
src/test/java
```markdown ## Issue-ID: Cli-CLI-193 ## Issue-Title: StringIndexOutOfBoundsException in HelpFormatter.findWrapPos ## Issue-Description: In the last while loop in HelpFormatter.findWrapPos, it can pass text.length() to text.charAt(int), which throws a StringIndexOutOfBoundsException. The first expression in that wh...
58
[ "org.apache.commons.cli.HelpFormatter" ]
3846b5e1e91bd5ad76de716498563b17ad200e4b6efaeb4c6ee355e1a41ec427
public void testRenderWrappedTextWordCut()
// You are a professional Java test case writer, please create a test case named `testRenderWrappedTextWordCut` for the issue `Cli-CLI-193`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-193 // // ## Issue-Title: // StringIndexOutOfBoundsException in He...
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 testShortWithEqual() throws Exception { String[] args = new String[] { "-f=bar" }; Options options = new Options(); options.addOption(OptionBuilder.withLongOpt("foo").hasArg().create('f')); Parser parser = new GnuParser(); CommandLine cl = parser.parse(optio...
org.apache.commons.cli.GnuParserTest::testShortWithEqual
src/test/org/apache/commons/cli/GnuParserTest.java
209
src/test/org/apache/commons/cli/GnuParserTest.java
testShortWithEqual
/** * 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 `testShortWithEqual` for the issue `Cli-cli-1`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-cli-1 // // ## Issue-Title: // PosixParser interupts "-target opt" as "-t arget op...
209
12
198
src/test/org/apache/commons/cli/GnuParserTest.java
src/test
```markdown ## Issue-ID: Cli-cli-1 ## Issue-Title: PosixParser interupts "-target opt" as "-t arget opt" ## Issue-Description: This was posted on the Commons-Developer list and confirmed as a bug. > Is this a bug? Or am I using this incorrectly? > I have an option with short and long values. Given code that i...
198
[ "org.apache.commons.cli.GnuParser" ]
39ca7080b581dc9130f1b142e3a8ffcf0ff7ee2b575c3df2b5c7b3aaa13c9fe8
public void testShortWithEqual() throws Exception
// You are a professional Java test case writer, please create a test case named `testShortWithEqual` for the issue `Cli-cli-1`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-cli-1 // // ## Issue-Title: // PosixParser interupts "-target opt" as "-t arget op...
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 testUnicode() { assertPrint("var x ='\\x0f';", "var x=\"\\u000f\""); assertPrint("var x ='\\x68';", "var x=\"h\""); assertPrint("var x ='\\x7f';", "var x=\"\\u007f\""); }
com.google.javascript.jscomp.CodePrinterTest::testUnicode
test/com/google/javascript/jscomp/CodePrinterTest.java
1,215
test/com/google/javascript/jscomp/CodePrinterTest.java
testUnicode
/* * 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 `testUnicode` for the issue `Closure-416`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-416 // // ## Issue-Title: // Codepoint U+007f appears raw in output // // ## Issue...
1,215
73
1,211
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-416 ## Issue-Title: Codepoint U+007f appears raw in output ## Issue-Description: **What steps will reproduce the problem?** 1. Open http://closure-compiler.appspot.com/home in your browser 2. Enter the source code: alert('\x7f') 3. Hit the "Compile" button. What is the expected...
1,211
[ "com.google.javascript.jscomp.CodeGenerator" ]
39ebfb0ede79f775cca0498108f5c6a3021b3ed07b8d88c541f4d86441f1b7b3
public void testUnicode()
// You are a professional Java test case writer, please create a test case named `testUnicode` for the issue `Closure-416`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-416 // // ## Issue-Title: // Codepoint U+007f appears raw in output // // ## Issue...
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...
@Test public void polynomial() throws DerivativeException, IntegratorException { TestProblem6 pb = new TestProblem6(); double range = Math.abs(pb.getFinalTime() - pb.getInitialTime()); for (int nSteps = 1; nSteps < 7; ++nSteps) { AdamsMoultonIntegrator integ = ...
org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegratorTest::polynomial
src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java
153
src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java
polynomial
/* * 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 `polynomial` for the issue `Math-MATH-338`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-338 // // ## Issue-Title: // Wrong parameter for first step size guess for Embed...
153
74
134
src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-338 ## Issue-Title: Wrong parameter for first step size guess for Embedded Runge Kutta methods ## Issue-Description: In a space application using DOP853 i detected what seems to be a bad parameter in the call to the method initializeStep of class AdaptiveStepsizeIntegrator. Her...
134
[ "org.apache.commons.math.ode.nonstiff.EmbeddedRungeKuttaIntegrator" ]
3a1124eeb1894e82ae4619a9d5206b37cf7fe8118033242dd3cea6657629fc67
@Test public void polynomial() throws DerivativeException, IntegratorException
// You are a professional Java test case writer, please create a test case named `polynomial` for the issue `Math-MATH-338`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-338 // // ## Issue-Title: // Wrong parameter for first step size guess for Embed...
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 testSimpleForIn() { inline("var a,b,x = a in b; x", "var a,b,x; a in b"); noInline("var a, b; var x = a in b; print(1); x"); noInline("var a,b,x = a in b; delete a[b]; x"); }
com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testSimpleForIn
test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java
68
test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java
testSimpleForIn
/* * 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 `testSimpleForIn` for the issue `Closure-773`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-773 // // ## Issue-Title: // Switched order of "delete key" and "key in" statem...
68
15
63
test/com/google/javascript/jscomp/FlowSensitiveInlineVariablesTest.java
test
```markdown ## Issue-ID: Closure-773 ## Issue-Title: Switched order of "delete key" and "key in" statements changes semantic ## Issue-Description: // Input: var customData = { key: 'value' }; function testRemoveKey( key ) { var dataSlot = customData, retval = dataSlot && dataSlot[ key ], hadKey = dataSl...
63
[ "com.google.javascript.jscomp.FlowSensitiveInlineVariables" ]
3a6e07fd09134513552c6551af6c69571de2460e5338a8b04fe2bfab6f39c4fc
public void testSimpleForIn()
// You are a professional Java test case writer, please create a test case named `testSimpleForIn` for the issue `Closure-773`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-773 // // ## Issue-Title: // Switched order of "delete key" and "key in" statem...
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 typeVariable_of_self_type() { GenericMetadataSupport genericMetadata = inferFrom(GenericsSelfReference.class).resolveGenericReturnType(firstNamedMethod("self", GenericsSelfReference.class)); assertThat(genericMetadata.rawType()).isEqualTo(GenericsSelfReference.class); }
org.mockito.internal.util.reflection.GenericMetadataSupportTest::typeVariable_of_self_type
test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
54
test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
typeVariable_of_self_type
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import static org.fest.assertions.Assertions.assertThat; import static org.junit.Assert.fail; import static org.mockito.internal.util.reflection.GenericM...
// You are a professional Java test case writer, please create a test case named `typeVariable_of_self_type` for the issue `Mockito-114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-114 // // ## Issue-Title: // 1.10 regression (StackOverflowError) wit...
54
8
49
test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
test
```markdown ## Issue-ID: Mockito-114 ## Issue-Title: 1.10 regression (StackOverflowError) with interface where generic type has itself as upper bound ## Issue-Description: Add this to `GenericMetadataSupportTest`: ``` interface GenericsSelfReference<T extends GenericsSelfReference<T>> { T self(); ...
49
[ "org.mockito.internal.util.reflection.GenericMetadataSupport" ]
3ac9bb69eba27fa73dc172acb13da3dbc73b7431f77f75d246a532e9a0e4310a
@Test public void typeVariable_of_self_type()
// You are a professional Java test case writer, please create a test case named `typeVariable_of_self_type` for the issue `Mockito-114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-114 // // ## Issue-Title: // 1.10 regression (StackOverflowError) wit...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import static org.fest.assertions.Assertions.assertThat; import static org.junit.Assert.fail; import static org.mockito.internal.util.reflection.GenericM...
public void testExtremeValues() throws Exception { NormalDistribution distribution = new NormalDistributionImpl(0, 1); for (int i = 0; i < 100; i++) { // make sure no convergence exception double lowerTail = distribution.cumulativeProbability(-i); double upperTail = distribut...
org.apache.commons.math.distribution.NormalDistributionTest::testExtremeValues
src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
178
src/test/java/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-414`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-414 // // ## Issue-Title: // ConvergenceException in NormalDistributionIm...
178
/** * Check to make sure top-coding of extreme values works correctly. * Verifies fixes for JIRA MATH-167, MATH-414 */
60
156
src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-414 ## Issue-Title: ConvergenceException in NormalDistributionImpl.cumulativeProbability() ## Issue-Description: I get a ConvergenceException in NormalDistributionImpl.cumulativeProbability() for very large/small parameters including Infinity, -Infinity. For instance in the fo...
156
[ "org.apache.commons.math.distribution.NormalDistributionImpl" ]
3bb5fab0eb888b88c3303a7ca947d449f13e5de29087d2c961b07af897e109ec
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-414`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-414 // // ## Issue-Title: // ConvergenceException in NormalDistributionIm...
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 testLocale() throws IOException { assertEquals(new Locale("en"), MAPPER.readValue(quote("en"), Locale.class)); assertEquals(new Locale("es", "ES"), MAPPER.readValue(quote("es_ES"), Locale.class)); assertEquals(new Locale("FI", "fi", "savo"), MAPPER.readValue(q...
com.fasterxml.jackson.databind.deser.TestJdkTypes::testLocale
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
150
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
testLocale
package com.fasterxml.jackson.databind.deser; import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Currency; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jac...
// You are a professional Java test case writer, please create a test case named `testLocale` for the issue `JacksonDatabind-1123`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1123 // // ## Issue-Title: // Serializing and Deserializing Locale....
150
42
141
src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1123 ## Issue-Title: Serializing and Deserializing Locale.ROOT ## Issue-Description: Serializing and Deserializing Locale objects seems to work just fine, until you try on the Root Locale. It writes it out as an empty string and when it reads it in, the value is null `...
141
[ "com.fasterxml.jackson.databind.deser.std.FromStringDeserializer" ]
3d5d16e1554b998a5a8d7bb4c7ed9bb525ce23c6224ac7fbebd6029b7090c004
public void testLocale() throws IOException
// You are a professional Java test case writer, please create a test case named `testLocale` for the issue `JacksonDatabind-1123`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1123 // // ## Issue-Title: // Serializing and Deserializing Locale....
JacksonDatabind
package com.fasterxml.jackson.databind.deser; import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Currency; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jac...
public void testcharSequenceKeyMap() throws Exception { String JSON = aposToQuotes("{'a':'b'}"); Map<CharSequence,String> result = MAPPER.readValue(JSON, new TypeReference<Map<CharSequence,String>>() { }); assertNotNull(result); assertEquals(1, result.size()); assertEquals("b...
com.fasterxml.jackson.databind.deser.TestMapDeserialization::testcharSequenceKeyMap
src/test/java/com/fasterxml/jackson/databind/deser/TestMapDeserialization.java
510
src/test/java/com/fasterxml/jackson/databind/deser/TestMapDeserialization.java
testcharSequenceKeyMap
package com.fasterxml.jackson.databind.deser; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.faste...
// You are a professional Java test case writer, please create a test case named `testcharSequenceKeyMap` for the issue `JacksonDatabind-1506`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1506 // // ## Issue-Title: // Missing KeyDeserializer f...
510
71
504
src/test/java/com/fasterxml/jackson/databind/deser/TestMapDeserialization.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1506 ## Issue-Title: Missing KeyDeserializer for CharSequence ## Issue-Description: Looks like use of nominal Map key type of `CharSequence` does not work yet (as of 2.7.8 / 2.8.6). This is something that is needed to work with certain frameworks, such as Avro's generated...
504
[ "com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer" ]
3db1e9728642736e786c223d95a7188d961f82acfe9459a6d21b7d684cbcf0ad
public void testcharSequenceKeyMap() throws Exception
// You are a professional Java test case writer, please create a test case named `testcharSequenceKeyMap` for the issue `JacksonDatabind-1506`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1506 // // ## Issue-Title: // Missing KeyDeserializer f...
JacksonDatabind
package com.fasterxml.jackson.databind.deser; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.*; import com.faste...
public void testLang457() { String[] badInputs = new String[] { "l", "L", "f", "F", "junk", "bobL"}; for(int i=0; i<badInputs.length; i++) { try { NumberUtils.createNumber(badInputs[i]); fail("NumberFormatException was expected for " + badInputs[i]); ...
org.apache.commons.lang.NumberUtilsTest::testLang457
src/test/org/apache/commons/lang/NumberUtilsTest.java
533
src/test/org/apache/commons/lang/NumberUtilsTest.java
testLang457
/* * 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 `testLang457` for the issue `Lang-LANG-457`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-457 // // ## Issue-Title: // NumberUtils createNumber thows a StringIndexOutOfB...
533
44
523
src/test/org/apache/commons/lang/NumberUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-457 ## Issue-Title: NumberUtils createNumber thows a StringIndexOutOfBoundsException when only an "l" is passed in. ## Issue-Description: Seems to be similar to [~~LANG-300~~](https://issues.apache.org/jira/browse/LANG-300 "NumberUtils.createNumber throws NumberFormatException fo...
523
[ "org.apache.commons.lang.NumberUtils" ]
3dd913a0927df71d67c42548e5f6b1b4dc7d5bcc39f1b5a3fda002f3b21d905b
public void testLang457()
// You are a professional Java test case writer, please create a test case named `testLang457` for the issue `Lang-LANG-457`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-457 // // ## Issue-Title: // NumberUtils createNumber thows a StringIndexOutOfB...
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 testMinMaxFloat() { float[][] pairs = { { -50.0f, 50.0f }, { Float.POSITIVE_INFINITY, 1.0f }, { Float.NEGATIVE_INFINITY, 1.0f }, { Float.NaN, 1.0f }, { Float.POSITIVE_INFINITY, 0.0f }, { Float.NEGATIVE_INFINIT...
org.apache.commons.math.util.FastMathTest::testMinMaxFloat
src/test/java/org/apache/commons/math/util/FastMathTest.java
107
src/test/java/org/apache/commons/math/util/FastMathTest.java
testMinMaxFloat
/* * 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 `testMinMaxFloat` for the issue `Math-MATH-482`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-482 // // ## Issue-Title: // FastMath.max(50.0f, -50.0f) => -50.0f; should ...
107
59
76
src/test/java/org/apache/commons/math/util/FastMathTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-482 ## Issue-Title: FastMath.max(50.0f, -50.0f) => -50.0f; should be +50.0f ## Issue-Description: FastMath.max(50.0f, -50.0f) => -50.0f; should be +50.0f. This is because the wrong variable is returned. The bug was not detected by the test case "testMinMaxFloat()" because tha...
76
[ "org.apache.commons.math.util.FastMath" ]
3eddad48f38ae8c77fb39a7e4e7f580a3f026ace4e37c495a626701548ebcd73
@Test public void testMinMaxFloat()
// You are a professional Java test case writer, please create a test case named `testMinMaxFloat` for the issue `Math-MATH-482`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-482 // // ## Issue-Title: // FastMath.max(50.0f, -50.0f) => -50.0f; should ...
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 testYahooArticle() throws IOException { File in = getFile("/htmltests/yahoo-article-1.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://news.yahoo.com/s/nm/20100831/bs_nm/us_gm_china"); Element p = doc.select("p:contains(Volt will be sold in the United States").fi...
org.jsoup.integration.ParseTest::testYahooArticle
src/test/java/org/jsoup/integration/ParseTest.java
147
src/test/java/org/jsoup/integration/ParseTest.java
testYahooArticle
package org.jsoup.integration; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import static org.junit.Assert.*; import org.junit.Test; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; /** * Integration te...
// You are a professional Java test case writer, please create a test case named `testYahooArticle` for the issue `Jsoup-34`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-34 // // ## Issue-Title: // StringIndexOutOfBoundsException when parsing link http:...
147
6
141
src/test/java/org/jsoup/integration/ParseTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-34 ## Issue-Title: StringIndexOutOfBoundsException when parsing link http://news.yahoo.com/s/nm/20100831/bs_nm/us_gm_china ## Issue-Description: java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.String.charAt(String.java:686) at java.util.regex...
141
[ "org.jsoup.nodes.Entities" ]
3ee9e8febb901c4757264c53cb30c7341810b2d22f56fff2682021ff47745b24
@Test public void testYahooArticle() throws IOException
// You are a professional Java test case writer, please create a test case named `testYahooArticle` for the issue `Jsoup-34`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-34 // // ## Issue-Title: // StringIndexOutOfBoundsException when parsing link http:...
Jsoup
package org.jsoup.integration; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import static org.junit.Assert.*; import org.junit.Test; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; /** * Integration te...
public void testNegativeZero() throws Exception { JsonReader reader = new JsonReader(reader("[-0]")); reader.setLenient(false); reader.beginArray(); assertEquals(NUMBER, reader.peek()); assertEquals("-0", reader.nextString()); }
com.google.gson.stream.JsonReaderTest::testNegativeZero
gson/src/test/java/com/google/gson/stream/JsonReaderTest.java
573
gson/src/test/java/com/google/gson/stream/JsonReaderTest.java
testNegativeZero
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// You are a professional Java test case writer, please create a test case named `testNegativeZero` for the issue `Gson-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1053 // // ## Issue-Title: // Negative zero // // ## Issue-Description: // Hi, //...
573
/** * Issue 1053, negative zero. * @throws Exception */
13
567
gson/src/test/java/com/google/gson/stream/JsonReaderTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-1053 ## Issue-Title: Negative zero ## Issue-Description: Hi, I have been cross testing various json parsers looking for those that expose the lexical of json numbers and not only their bound java.lang.Number. Because of the lazy parsing done by gson with `LazilyParsedNumber`, that ke...
567
[ "com.google.gson.stream.JsonReader" ]
3f73827c671fb384282d90c15f4b6730e33bbc20b1690ef17ba4b18b0a74634c
public void testNegativeZero() throws Exception
// You are a professional Java test case writer, please create a test case named `testNegativeZero` for the issue `Gson-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1053 // // ## Issue-Title: // Negative zero // // ## Issue-Description: // Hi, //...
Gson
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
public void testTextExtents() { parse("@return {@code foo} bar \n * baz. */", true, "Bad type annotation. type not recognized due to syntax error"); }
com.google.javascript.jscomp.parsing.JsDocInfoParserTest::testTextExtents
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
2,757
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
testTextExtents
/* * Copyright 2007 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 `testTextExtents` for the issue `Closure-919`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-919 // // ## Issue-Title: // Exception when parsing erroneous jsdoc: /**@return...
2,757
133
2,754
test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java
test
```markdown ## Issue-ID: Closure-919 ## Issue-Title: Exception when parsing erroneous jsdoc: /**@return {@code foo} bar * baz. */ ## Issue-Description: The following causes an exception in JSDocInfoParser. /\*\* \* @return {@code foo} bar \* baz. \*/ var x; Fix to follow. ``` You are a prof...
2,754
[ "com.google.javascript.jscomp.parsing.JsDocInfoParser" ]
3fa8a35fccba88a47754c261ff88138a95cd91771fd06788f60a83260c25a25f
public void testTextExtents()
// You are a professional Java test case writer, please create a test case named `testTextExtents` for the issue `Closure-919`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-919 // // ## Issue-Title: // Exception when parsing erroneous jsdoc: /**@return...
Closure
/* * Copyright 2007 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 testMath781() { LinearObjectiveFunction f = new LinearObjectiveFunction(new double[] { 2, 6, 7 }, 0); ArrayList<LinearConstraint> constraints = new ArrayList<LinearConstraint>(); constraints.add(new LinearConstraint(new double[] { 1, 2, 1 }, Relationship.LEQ, 2)); ...
org.apache.commons.math3.optimization.linear.SimplexSolverTest::testMath781
src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java
48
src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java
testMath781
/* * 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 `testMath781` for the issue `Math-MATH-781`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-781 // // ## Issue-Title: // SimplexSolver gives bad results // // ## Issue-De...
48
33
31
src/test/java/org/apache/commons/math3/optimization/linear/SimplexSolverTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-781 ## Issue-Title: SimplexSolver gives bad results ## Issue-Description: Methode SimplexSolver.optimeze(...) gives bad results with commons-math3-3.0 in a simple test problem. It works well in commons-math-2.2. ``` You are a professional Java test case writer, please c...
31
[ "org.apache.commons.math3.optimization.linear.SimplexTableau" ]
3fcc1fe2a0fa22f64543e84150c77d59747abcc3629e01ee88e56afa3a85daf4
@Test public void testMath781()
// You are a professional Java test case writer, please create a test case named `testMath781` for the issue `Math-MATH-781`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-781 // // ## Issue-Title: // SimplexSolver gives bad results // // ## Issue-De...
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 shouldReadBigGid() throws Exception { ByteArrayOutputStream bos = new ByteArrayOutputStream(); TarArchiveOutputStream tos = new TarArchiveOutputStream(bos); tos.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX); TarArchiveEntry t = new TarArchiveEntry("na...
org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::shouldReadBigGid
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
256
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
shouldReadBigGid
/* * 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 `shouldReadBigGid` for the issue `Compress-COMPRESS-314`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-314 // // ## Issue-Title: // TarArchiveInputStream rejects...
256
32
237
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-314 ## Issue-Title: TarArchiveInputStream rejects uid or gid >= 0x80000000 ## Issue-Description: A POSIX-format archive that came from sysdiagnose produces NumberFormatException[1] when I try to read it with TarArchiveInputStream. The relevant part of the .tar file look...
237
[ "org.apache.commons.compress.archivers.tar.TarArchiveInputStream" ]
4007375a86ce1fedf2f145981166c969e92c2471f8bc811b62155bfd68dbe198
@Test public void shouldReadBigGid() throws Exception
// You are a professional Java test case writer, please create a test case named `shouldReadBigGid` for the issue `Compress-COMPRESS-314`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-314 // // ## Issue-Title: // TarArchiveInputStream rejects...
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 testPlusMonths_int_negativeFromLeap() { MonthDay test = new MonthDay(2, 29, ISOChronology.getInstanceUTC()); MonthDay result = test.plusMonths(-1); MonthDay expected = new MonthDay(1, 29, ISOChronology.getInstance()); assertEquals(expected, result); }
org.joda.time.TestMonthDay_Basics::testPlusMonths_int_negativeFromLeap
src/test/java/org/joda/time/TestMonthDay_Basics.java
462
src/test/java/org/joda/time/TestMonthDay_Basics.java
testPlusMonths_int_negativeFromLeap
/* * Copyright 2001-2010 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 `testPlusMonths_int_negativeFromLeap` for the issue `Time-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-151 // // ## Issue-Title: // #151 Unable to add days to a MonthDa...
462
14
457
src/test/java/org/joda/time/TestMonthDay_Basics.java
src/test/java
```markdown ## Issue-ID: Time-151 ## Issue-Title: #151 Unable to add days to a MonthDay set to the ISO leap date ## Issue-Description: It's not possible to add days to a MonthDay set to the ISO leap date (February 29th). This is even more bizarre given the exact error message thrown. Sample snippet: ``` fi...
457
[ "org.joda.time.chrono.BasicMonthOfYearDateTimeField" ]
420c6f4f48cc6e754605e5cf45ad0e088cabf9bfb0d2c04c85ec14da31b70ce7
public void testPlusMonths_int_negativeFromLeap()
// You are a professional Java test case writer, please create a test case named `testPlusMonths_int_negativeFromLeap` for the issue `Time-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-151 // // ## Issue-Title: // #151 Unable to add days to a MonthDa...
Time
/* * Copyright 2001-2010 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 testSSENonNegative() { double[] y = { 8915.102, 8919.302, 8923.502 }; double[] x = { 1.107178495E2, 1.107264895E2, 1.107351295E2 }; SimpleRegression reg = new SimpleRegression(); for (int i = 0; i < x.length; i++) { reg.addData(x[i], y[i]); } a...
org.apache.commons.math.stat.regression.SimpleRegressionTest::testSSENonNegative
src/test/org/apache/commons/math/stat/regression/SimpleRegressionTest.java
275
src/test/org/apache/commons/math/stat/regression/SimpleRegressionTest.java
testSSENonNegative
/* * Copyright 2003-2004 The Apache Software Foundation. * * 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...
// You are a professional Java test case writer, please create a test case named `testSSENonNegative` for the issue `Math-MATH-85`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-85 // // ## Issue-Title: // [math] SimpleRegression getSumSquaredErrors ...
275
// Jira MATH-85 = Bugzilla 39432
105
267
src/test/org/apache/commons/math/stat/regression/SimpleRegressionTest.java
src/test
```markdown ## Issue-ID: Math-MATH-85 ## Issue-Title: [math] SimpleRegression getSumSquaredErrors ## Issue-Description: getSumSquaredErrors returns -ve value. See test below: public void testSimpleRegression() { double[] y = { 8915.102, 8919.302, 8923.502} ; double[] x = { 1.107178495, 1.107264895...
267
[ "org.apache.commons.math.stat.regression.SimpleRegression" ]
424adf8d1a8235482af9d0d0115df379b7296c3a68c00f8c5b49e6c4fd022949
public void testSSENonNegative()
// You are a professional Java test case writer, please create a test case named `testSSENonNegative` for the issue `Math-MATH-85`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-85 // // ## Issue-Title: // [math] SimpleRegression getSumSquaredErrors ...
Math
/* * Copyright 2003-2004 The Apache Software Foundation. * * 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...
@Test public void handlesInvalidAttributeNames() { String html = "<html><head></head><body style=\"color: red\" \" name\"></body></html>"; org.jsoup.nodes.Document jsoupDoc; jsoupDoc = Jsoup.parse(html); Element body = jsoupDoc.select("body").first(); assertTrue(body.hasA...
org.jsoup.helper.W3CDomTest::handlesInvalidAttributeNames
src/test/java/org/jsoup/helper/W3CDomTest.java
93
src/test/java/org/jsoup/helper/W3CDomTest.java
handlesInvalidAttributeNames
package org.jsoup.helper; import org.jsoup.Jsoup; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Element; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Node; import java.io.File; import java.io.IOException; import static org.jsoup.TextUtil.LE; import static org.junit.Assert.a...
// You are a professional Java test case writer, please create a test case named `handlesInvalidAttributeNames` for the issue `Jsoup-721`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-721 // // ## Issue-Title: // INVALID_CHARACTER_ERR when converting Doc...
93
54
83
src/test/java/org/jsoup/helper/W3CDomTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-721 ## Issue-Title: INVALID_CHARACTER_ERR when converting Document to W3C ## Issue-Description: A recent ClearQuest version has an HTML generation bug, which is ignored by both Chrome and Internet Explorer. Jsoup.parse is also successful: `org.jsoup.nodes.Document doc = Jsoup.parse(...
83
[ "org.jsoup.helper.W3CDom" ]
436d09cbcdbcc90657698b553624b9cb72ebac3674f7dfa56914cbc2306b010b
@Test public void handlesInvalidAttributeNames()
// You are a professional Java test case writer, please create a test case named `handlesInvalidAttributeNames` for the issue `Jsoup-721`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-721 // // ## Issue-Title: // INVALID_CHARACTER_ERR when converting Doc...
Jsoup
package org.jsoup.helper; import org.jsoup.Jsoup; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Element; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Node; import java.io.File; import java.io.IOException; import static org.jsoup.TextUtil.LE; import static org.junit.Assert.a...
@Test public void testMath519() { // The optimizer will try negative sigma values but "GaussianFitter" // will catch the raised exceptions and return NaN values instead. final double[] data = { 1.1143831578403364E-29, 4.95281403484594E-28, 1.11713472...
org.apache.commons.math.optimization.fitting.GaussianFitterTest::testMath519
src/test/java/org/apache/commons/math/optimization/fitting/GaussianFitterTest.java
339
src/test/java/org/apache/commons/math/optimization/fitting/GaussianFitterTest.java
testMath519
/* * 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 `testMath519` for the issue `Math-MATH-519`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-519 // // ## Issue-Title: // GaussianFitter Unexpectedly Throws NotStrictlyPosi...
339
58
296
src/test/java/org/apache/commons/math/optimization/fitting/GaussianFitterTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-519 ## Issue-Title: GaussianFitter Unexpectedly Throws NotStrictlyPositiveException ## Issue-Description: Running the following: double[] observations = { 1.1143831578403364E-29, 4.95281403484594E-28, 1.1171347211930288E-26, 1.7044813962636277E-25, 1.978471657...
296
[ "org.apache.commons.math.optimization.fitting.GaussianFitter" ]
43cbd9c8389c68a64c1e0902c0aa70f5a51159a50f2823b3cca7bd5cdd814960
@Test public void testMath519()
// You are a professional Java test case writer, please create a test case named `testMath519` for the issue `Math-MATH-519`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-519 // // ## Issue-Title: // GaussianFitter Unexpectedly Throws NotStrictlyPosi...
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 testFunctionSafariCompatiblity() { // Functions within IFs cause syntax errors on Safari. assertPrint("function(){if(e1){function goo(){return true}}else foo()}", "function(){if(e1){function goo(){return true}}else foo()}"); assertPrint("function(){if(e1)function goo(){return true}els...
com.google.javascript.jscomp.CodePrinterTest::testFunctionSafariCompatiblity
test/com/google/javascript/jscomp/CodePrinterTest.java
959
test/com/google/javascript/jscomp/CodePrinterTest.java
testFunctionSafariCompatiblity
/* * Copyright 2004 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 `testFunctionSafariCompatiblity` for the issue `Closure-190`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-190 // // ## Issue-Title: // Bug with labeled loops and breaks /...
959
145
943
test/com/google/javascript/jscomp/CodePrinterTest.java
test
```markdown ## Issue-ID: Closure-190 ## Issue-Title: Bug with labeled loops and breaks ## Issue-Description: **What steps will reproduce the problem?** Try to compile this code with the closure compiler : var i = 0; lab1: do{ lab2: do{ i++; if (1) { break lab2; } else { break lab1; } } w...
943
[ "com.google.javascript.jscomp.CodeGenerator" ]
448cf46dcb18748f88954abfd25ac6f2290c8fadc6e7bc78c54cf7750b882ada
public void testFunctionSafariCompatiblity()
// You are a professional Java test case writer, please create a test case named `testFunctionSafariCompatiblity` for the issue `Closure-190`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-190 // // ## Issue-Title: // Bug with labeled loops and breaks /...
Closure
/* * Copyright 2004 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 public void testIssue780() { float[] coords = { 1.000000f, -1.000000f, -1.000000f, 1.000000f, -1.000000f, 1.000000f, -1.000000f, -1.000000f, 1.000000f, -1.000000f, -1.000000f, -1.000000f, 1.000000f, 1.000000f, -1f, 0.9999...
org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSetTest::testIssue780
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSetTest.java
282
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSetTest.java
testIssue780
/* * 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 `testIssue780` for the issue `Math-MATH-780`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-780 // // ## Issue-Title: // BSPTree class and recovery of a Euclidean 3D BRep...
282
32
235
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSetTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-780 ## Issue-Title: BSPTree class and recovery of a Euclidean 3D BRep ## Issue-Description: New to the work here. Thanks for your efforts on this code. I create a BSPTree from a BoundaryRep (Brep) my test Brep is a cube as represented by a float array containing 8 3D points in(...
235
[ "org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet" ]
44f600f1fe6d1db53deefd7f2f654b3ff38e98f1222d5da6088094c35a7f4e78
@Test public void testIssue780()
// You are a professional Java test case writer, please create a test case named `testIssue780` for the issue `Math-MATH-780`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-780 // // ## Issue-Title: // BSPTree class and recovery of a Euclidean 3D BRep...
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 testReduce() { Fraction f = null; f = Fraction.getFraction(50, 75); Fraction result = f.reduce(); assertEquals(2, result.getNumerator()); assertEquals(3, result.getDenominator()); f = Fraction.getFraction(-2, -3); result = f.reduce(); ...
org.apache.commons.lang.math.FractionTest::testReduce
src/test/org/apache/commons/lang/math/FractionTest.java
656
src/test/org/apache/commons/lang/math/FractionTest.java
testReduce
/* * 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 `testReduce` for the issue `Lang-LANG-380`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-380 // // ## Issue-Title: // infinite loop in Fraction.reduce when numerator == ...
656
49
615
src/test/org/apache/commons/lang/math/FractionTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-380 ## Issue-Title: infinite loop in Fraction.reduce when numerator == 0 ## Issue-Description: Summary pretty much says it all. ``` You are a professional Java test case writer, please create a test case named `testReduce` for the issue `Lang-LANG-380`, utilizing the provid...
615
[ "org.apache.commons.lang.math.Fraction" ]
453c38c5c242a326c227bc656db653e88de47e4d600a684c0493f0271098581b
public void testReduce()
// You are a professional Java test case writer, please create a test case named `testReduce` for the issue `Lang-LANG-380`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-380 // // ## Issue-Title: // infinite loop in Fraction.reduce when numerator == ...
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 ...
public void testGreatestSubtypeUnionTypes5() throws Exception { JSType errUnion = createUnionType(EVAL_ERROR_TYPE, URI_ERROR_TYPE); assertEquals(NO_OBJECT_TYPE, errUnion.getGreatestSubtype(STRING_OBJECT_TYPE)); }
com.google.javascript.rhino.jstype.UnionTypeTest::testGreatestSubtypeUnionTypes5
test/com/google/javascript/rhino/jstype/UnionTypeTest.java
160
test/com/google/javascript/rhino/jstype/UnionTypeTest.java
testGreatestSubtypeUnionTypes5
/* * * ***** 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 `testGreatestSubtypeUnionTypes5` for the issue `Closure-114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-114 // // ## Issue-Title: // Typos in externs/html5.js // // ##...
160
/** * Tests {@link JSType#getGreatestSubtype(JSType)} on union types. */
104
156
test/com/google/javascript/rhino/jstype/UnionTypeTest.java
test
```markdown ## Issue-ID: Closure-114 ## Issue-Title: Typos in externs/html5.js ## Issue-Description: Line 354: CanvasRenderingContext2D.prototype.globalCompositingOperation; Line 366: CanvasRenderingContext2D.prototype.mitreLimit; They should be globalCompositeOperation and miterLimit, respectively. ``` ...
156
[ "com.google.javascript.rhino.jstype.UnionType" ]
459f263e42a2ccdeb97a6af98ef2e04bcb3b7cc123b3cf80e2117fd3c0abb836
public void testGreatestSubtypeUnionTypes5() throws Exception
// You are a professional Java test case writer, please create a test case named `testGreatestSubtypeUnionTypes5` for the issue `Closure-114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-114 // // ## Issue-Title: // Typos in externs/html5.js // // ##...
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 testMixinWithBundles() throws Exception { ObjectMapper mapper = new ObjectMapper().addMixIn(Foo.class, FooMixin.class); String result = mapper.writeValueAsString(new Foo("result")); assertEquals("{\"bar\":\"result\"}", result); }
com.fasterxml.jackson.databind.mixins.MixinsWithBundlesTest::testMixinWithBundles
src/test/java/com/fasterxml/jackson/databind/mixins/MixinsWithBundlesTest.java
41
src/test/java/com/fasterxml/jackson/databind/mixins/MixinsWithBundlesTest.java
testMixinWithBundles
package com.fasterxml.jackson.databind.mixins; import java.lang.annotation.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // for [databind#771] public class MixinsWithBundlesTest extends BaseMapTest { @Target(value={ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType...
// You are a professional Java test case writer, please create a test case named `testMixinWithBundles` for the issue `JacksonDatabind-771`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-771 // // ## Issue-Title: // Annotation bundles ignored wh...
41
16
36
src/test/java/com/fasterxml/jackson/databind/mixins/MixinsWithBundlesTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-771 ## Issue-Title: Annotation bundles ignored when added to Mixin ## Issue-Description: When updating from v 2.4.4 to 2.5.\* it appears as though annotation bundles created with `@JacksonAnnotationsInside` are ignored when placed on a mixin. Moving the annotation bundel to ...
36
[ "com.fasterxml.jackson.databind.introspect.AnnotationMap" ]
45da089301a1db4083f911024603972844144d0c080961566f4434ffc70ac269
public void testMixinWithBundles() throws Exception
// You are a professional Java test case writer, please create a test case named `testMixinWithBundles` for the issue `JacksonDatabind-771`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-771 // // ## Issue-Title: // Annotation bundles ignored wh...
JacksonDatabind
package com.fasterxml.jackson.databind.mixins; import java.lang.annotation.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; // for [databind#771] public class MixinsWithBundlesTest extends BaseMapTest { @Target(value={ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType...
@Test public void handlesCustomProtocols() { String html = "<img src='cid:12345' /> <img src='data:gzzt' />"; String dropped = Jsoup.clean(html, Whitelist.basicWithImages()); assertEquals("<img /> \n<img />", dropped); String preserved = Jsoup.clean(html, Whitelist.basicWithImages()...
org.jsoup.safety.CleanerTest::handlesCustomProtocols
src/test/java/org/jsoup/safety/CleanerTest.java
123
src/test/java/org/jsoup/safety/CleanerTest.java
handlesCustomProtocols
package org.jsoup.safety; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.safety.Whitelist; import org.junit.Test; import static org.junit.Assert.*; /** Tests for the cleaner. @author Jonathan Hedley, jonathan@hedley.net */ public class CleanerTest { @Test public void simpleBehaviourTest() ...
// You are a professional Java test case writer, please create a test case named `handlesCustomProtocols` for the issue `Jsoup-127`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-127 // // ## Issue-Title: // Cleaning html containing the cid identifier bre...
123
19
116
src/test/java/org/jsoup/safety/CleanerTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-127 ## Issue-Title: Cleaning html containing the cid identifier breaks images ## Issue-Description: Ok, so in mail type HTML the following is common ![]() The item after CID: can be almost anything (US-ASCII I think) and of any length. It corresponds to an image linked elsewhere i...
116
[ "org.jsoup.safety.Whitelist" ]
46181ac5fd3f15da4dcc1a7fa7d2c5f9556f81f414f54d072fbcd03f5bb72c10
@Test public void handlesCustomProtocols()
// You are a professional Java test case writer, please create a test case named `handlesCustomProtocols` for the issue `Jsoup-127`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-127 // // ## Issue-Title: // Cleaning html containing the cid identifier bre...
Jsoup
package org.jsoup.safety; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.safety.Whitelist; import org.junit.Test; import static org.junit.Assert.*; /** Tests for the cleaner. @author Jonathan Hedley, jonathan@hedley.net */ public class CleanerTest { @Test public void simpleBehaviourTest() ...
public void testJDKTypes1872() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); String json = aposToQuotes(String.format("{'@class':'%s','authorities':['java.util.ArrayList',[]]}"...
com.fasterxml.jackson.databind.interop.IllegalTypesCheckTest::testJDKTypes1872
src/test/java/com/fasterxml/jackson/databind/interop/IllegalTypesCheckTest.java
113
src/test/java/com/fasterxml/jackson/databind/interop/IllegalTypesCheckTest.java
testJDKTypes1872
package com.fasterxml.jackson.databind.interop; import java.util.*; import org.springframework.jacksontest.BogusApplicationContext; import org.springframework.jacksontest.BogusPointcutAdvisor; import org.springframework.jacksontest.GrantedAuthority; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fa...
// You are a professional Java test case writer, please create a test case named `testJDKTypes1872` for the issue `JacksonDatabind-1872`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1872 // // ## Issue-Title: // NullPointerException in SubType...
113
// // // Tests for [databind#1872] /* public void testSpringTypes1737() throws Exception { _testIllegalType("org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor"); _testIllegalType("org.springframework.beans.factory.config.PropertyPathFactoryBean"); } public void ...
93
104
src/test/java/com/fasterxml/jackson/databind/interop/IllegalTypesCheckTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1872 ## Issue-Title: NullPointerException in SubTypeValidator.validateSubType when validating Spring interface ## Issue-Description: In jackson-databind-2.8.11 jackson-databind-2.9.3 and jackson-databind-2.9.4-SNAPSHOT `SubTypeValidator.validateSubType` fails with a `NullPoi...
104
[ "com.fasterxml.jackson.databind.jsontype.impl.SubTypeValidator" ]
4680af3198a9a99c9cad6a360c773245a5d35c3bfb42be4bd34b25cde61e5a8e
public void testJDKTypes1872() throws Exception
// You are a professional Java test case writer, please create a test case named `testJDKTypes1872` for the issue `JacksonDatabind-1872`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1872 // // ## Issue-Title: // NullPointerException in SubType...
JacksonDatabind
package com.fasterxml.jackson.databind.interop; import java.util.*; import org.springframework.jacksontest.BogusApplicationContext; import org.springframework.jacksontest.BogusPointcutAdvisor; import org.springframework.jacksontest.GrantedAuthority; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fa...
@Test public void testHeader() throws IOException { final StringWriter sw = new StringWriter(); final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT.withQuoteChar(null) .withHeader("C1", "C2", "C3")); printer.printRecord("a", "b", "c"); printer.printRec...
org.apache.commons.csv.CSVPrinterTest::testHeader
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
496
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
testHeader
/* * 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 `testHeader` for the issue `Csv-CSV-120`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-120 // // ## Issue-Title: // CSVFormat#withHeader doesn't work with CSVPrinter // /...
496
10
487
src/test/java/org/apache/commons/csv/CSVPrinterTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-120 ## Issue-Title: CSVFormat#withHeader doesn't work with CSVPrinter ## Issue-Description: In the current version [CSVFormat#withHeader](https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/CSVFormat.html#withHeader(java.lang.String...)) is only used by CSV...
487
[ "org.apache.commons.csv.CSVPrinter" ]
478207cbdb48725a58cd98422b73ea962225eb9787b4531412143a97044b8c18
@Test public void testHeader() throws IOException
// You are a professional Java test case writer, please create a test case named `testHeader` for the issue `Csv-CSV-120`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-120 // // ## Issue-Title: // CSVFormat#withHeader doesn't work with CSVPrinter // /...
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 testEmpty1256() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT); String json = mapper.writeValueAsString(new Issue1256Bean()); assertEquals("{}", json); }
com.fasterxml.jackson.databind.deser.TestJDKAtomicTypes::testEmpty1256
src/test/java/com/fasterxml/jackson/databind/deser/TestJDKAtomicTypes.java
268
src/test/java/com/fasterxml/jackson/databind/deser/TestJDKAtomicTypes.java
testEmpty1256
package com.fasterxml.jackson.databind.deser; import java.io.Serializable; import java.math.BigDecimal; import java.util.concurrent.atomic.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fast...
// You are a professional Java test case writer, please create a test case named `testEmpty1256` for the issue `JacksonDatabind-1256`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1256 // // ## Issue-Title: // Optional.empty() not excluded if p...
268
54
261
src/test/java/com/fasterxml/jackson/databind/deser/TestJDKAtomicTypes.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1256 ## Issue-Title: Optional.empty() not excluded if property declared with type Object ## Issue-Description: Jackson version is 2.6.6 **Here is the code:** ``` ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Incl...
261
[ "com.fasterxml.jackson.databind.ser.PropertyBuilder" ]
47a702a5e6824384812ab7be914fa6428b3bd3c74ac8755787d58223654fb058
public void testEmpty1256() throws Exception
// You are a professional Java test case writer, please create a test case named `testEmpty1256` for the issue `JacksonDatabind-1256`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1256 // // ## Issue-Title: // Optional.empty() not excluded if p...
JacksonDatabind
package com.fasterxml.jackson.databind.deser; import java.io.Serializable; import java.math.BigDecimal; import java.util.concurrent.atomic.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fast...
public void testByteToStringVariations() throws DecoderException { Base64 base64 = new Base64(0); byte[] b1 = StringUtils.getBytesUtf8("Hello World"); byte[] b2 = new byte[0]; byte[] b3 = null; byte[] b4 = Hex.decodeHex("2bf7cc2701fe4397b49ebeed5acc7090".toCharArray()); // f...
org.apache.commons.codec.binary.Base64Test::testByteToStringVariations
src/test/org/apache/commons/codec/binary/Base64Test.java
1,136
src/test/org/apache/commons/codec/binary/Base64Test.java
testByteToStringVariations
/* * 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 `testByteToStringVariations` for the issue `Codec-CODEC-99`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-99 // // ## Issue-Title: // Base64.encodeBase64String() shoul...
1,136
7
1,120
src/test/org/apache/commons/codec/binary/Base64Test.java
src/test
```markdown ## Issue-ID: Codec-CODEC-99 ## Issue-Title: Base64.encodeBase64String() shouldn't chunk ## Issue-Description: Base64.encodeBase64String() shouldn't chunk. Change this: ``` public static String encodeBase64String(byte[] binaryData) { return StringUtils.newStringUtf8(encodeBase64(binaryData, tr...
1,120
[ "org.apache.commons.codec.binary.Base64" ]
4ae1c7527097f7e0339bd1e34ff7ea41e3af88c2c44d31a44ba3ab614f9a934e
public void testByteToStringVariations() throws DecoderException
// You are a professional Java test case writer, please create a test case named `testByteToStringVariations` for the issue `Codec-CODEC-99`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-99 // // ## Issue-Title: // Base64.encodeBase64String() shoul...
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 testJavaVersionAsInt() { assertEquals(0, SystemUtils.toJavaVersionInt(null)); assertEquals(0, SystemUtils.toJavaVersionInt("")); assertEquals(0, SystemUtils.toJavaVersionInt("0")); assertEquals(110, SystemUtils.toJavaVersionInt("1.1")); assertEquals(120, SystemUti...
org.apache.commons.lang3.SystemUtilsTest::testJavaVersionAsInt
src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
225
src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
testJavaVersionAsInt
/* * 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 `testJavaVersionAsInt` for the issue `Lang-LANG-624`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-624 // // ## Issue-Title: // SystemUtils.getJavaVersionAsFloat throws ...
225
29
208
src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-624 ## Issue-Title: SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android runtime/Dalvik VM ## Issue-Description: Can be replicated in the Android emulator quite easily. Stack trace: ``` at org.apache.commons.lang.builder.ToStringBuilder.<clin...
208
[ "org.apache.commons.lang3.SystemUtils" ]
4b6705adaca3d5a103e923b2ce5e54bf87d0d13c9f21f55d09d46aa8a1b5d47c
public void testJavaVersionAsInt()
// You are a professional Java test case writer, please create a test case named `testJavaVersionAsInt` for the issue `Lang-LANG-624`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-624 // // ## Issue-Title: // SystemUtils.getJavaVersionAsFloat throws ...
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 ...
@Test public void handlesHeaderEncodingOnRequest() { Connection.Request req = new HttpConnection.Request(); req.addHeader("xxx", "é"); }
org.jsoup.helper.HttpConnectionTest::handlesHeaderEncodingOnRequest
src/test/java/org/jsoup/helper/HttpConnectionTest.java
256
src/test/java/org/jsoup/helper/HttpConnectionTest.java
handlesHeaderEncodingOnRequest
package org.jsoup.helper; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.MultiLocaleRule; import org.jsoup.MultiLocaleRule.MultiLocaleTest; import org.jsoup.integration.ParseTest; import org.junit.Rule; import org.junit.Test; import java.io.IOException; import java.net.MalformedURLException; im...
// You are a professional Java test case writer, please create a test case named `handlesHeaderEncodingOnRequest` for the issue `Jsoup-1172`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1172 // // ## Issue-Title: // ArrayIndexOutOfBoundsException when p...
256
90
253
src/test/java/org/jsoup/helper/HttpConnectionTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1172 ## Issue-Title: ArrayIndexOutOfBoundsException when parsing with some URL ## Issue-Description: ### error ``` Caused by: java.lang.ArrayIndexOutOfBoundsException: 11 at org.jsoup.helper.HttpConnection$Base.looksLikeUtf8(HttpConnection.java:437) at org.jsoup.helper.HttpConnec...
253
[ "org.jsoup.helper.HttpConnection" ]
4bf60726598bb065e9323390e4bafdeeb5d0a6764bd425090ac8e8a794b8dce5
@Test public void handlesHeaderEncodingOnRequest()
// You are a professional Java test case writer, please create a test case named `handlesHeaderEncodingOnRequest` for the issue `Jsoup-1172`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1172 // // ## Issue-Title: // ArrayIndexOutOfBoundsException when p...
Jsoup
package org.jsoup.helper; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.MultiLocaleRule; import org.jsoup.MultiLocaleRule.MultiLocaleTest; import org.jsoup.integration.ParseTest; import org.junit.Rule; import org.junit.Test; import java.io.IOException; import java.net.MalformedURLException; im...
@Test public void testRevert() { // setup Line line = new Line(new Vector3D(1653345.6696423641, 6170370.041579291, 90000), new Vector3D(1650757.5050732433, 6160710.879908984, 0.9)); Vector3D expected = line.getDirection().negate(); // action...
org.apache.commons.math3.geometry.euclidean.threed.LineTest::testRevert
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/LineTest.java
145
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/LineTest.java
testRevert
/* * 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 `testRevert` for the issue `Math-MATH-938`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-938 // // ## Issue-Title: // Line.revert() is imprecise // // ## Issue-Descript...
145
9
131
src/test/java/org/apache/commons/math3/geometry/euclidean/threed/LineTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-938 ## Issue-Title: Line.revert() is imprecise ## Issue-Description: Line.revert() only maintains ~10 digits for the direction. This becomes an issue when the line's position is evaluated far from the origin. A simple fix would be to use Vector3D.negate() for the direction. Als...
131
[ "org.apache.commons.math3.geometry.euclidean.threed.Line" ]
4c65097b47211a990ed77ae46dd439485d871d880f25f079bfb36a7ff3929f0b
@Test public void testRevert()
// You are a professional Java test case writer, please create a test case named `testRevert` for the issue `Math-MATH-938`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-938 // // ## Issue-Title: // Line.revert() is imprecise // // ## Issue-Descript...
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 testCheckSymbolsOverrideForQuiet() { args.add("--warning_level=QUIET"); args.add("--jscomp_error=undefinedVars"); test("x = 3;", VarCheck.UNDEFINED_VAR_ERROR); }
com.google.javascript.jscomp.CommandLineRunnerTest::testCheckSymbolsOverrideForQuiet
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
230
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testCheckSymbolsOverrideForQuiet
/* * 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 `testCheckSymbolsOverrideForQuiet` for the issue `Closure-467`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-467 // // ## Issue-Title: // checkVars / undefinedVars diagnos...
230
160
226
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-467 ## Issue-Title: checkVars / undefinedVars diagnostics not working from command line ## Issue-Description: It seems that setting neither checkVars nor undefinedVars via the jscomp\_warning command line argument does anything. The check(s) do work when "warning\_level VERBOSE" is ...
226
[ "com.google.javascript.jscomp.Compiler" ]
4d74a94a6aa37ba369ca80810d36ac1d70ddfd10b9ff50e09c2c8dcebd737430
public void testCheckSymbolsOverrideForQuiet()
// You are a professional Java test case writer, please create a test case named `testCheckSymbolsOverrideForQuiet` for the issue `Closure-467`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-467 // // ## Issue-Title: // checkVars / undefinedVars diagnos...
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 testNoThisInference() { JSType thisType = createNullableType(OBJECT_TYPE); assumingThisType(thisType); inFunction("var out = 3; if (goog.isNull(this)) out = this;"); verify("out", createUnionType(OBJECT_TYPE, NUMBER_TYPE)); }
com.google.javascript.jscomp.TypeInferenceTest::testNoThisInference
test/com/google/javascript/jscomp/TypeInferenceTest.java
1,004
test/com/google/javascript/jscomp/TypeInferenceTest.java
testNoThisInference
/* * 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 `testNoThisInference` for the issue `Closure-769`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-769 // // ## Issue-Title: // Type refining of 'this' raises IllegalArgument...
1,004
19
999
test/com/google/javascript/jscomp/TypeInferenceTest.java
test
```markdown ## Issue-ID: Closure-769 ## Issue-Title: Type refining of 'this' raises IllegalArgumentException ## Issue-Description: **What steps will reproduce the problem?** 1. goog.isFunction(this) or goog.isObject(this) or goog.isNull(this) etc. **What is the expected output? What do you see instead?** Expec...
999
[ "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter" ]
4ebbeb9843ffa0ef77f188c2a866582a7a74a68b67397b5955a3aef5afe75b95
public void testNoThisInference()
// You are a professional Java test case writer, please create a test case named `testNoThisInference` for the issue `Closure-769`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-769 // // ## Issue-Title: // Type refining of 'this' raises IllegalArgument...
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 testClassKey() throws IOException { Map<Class<?>,Integer> map = new LinkedHashMap<Class<?>,Integer>(); map.put(String.class, 2); String json = MAPPER.writeValueAsString(map); assertEquals(aposToQuotes("{'java.lang.String':2}"), json); }
com.fasterxml.jackson.databind.ser.TestMapSerialization::testClassKey
src/test/java/com/fasterxml/jackson/databind/ser/TestMapSerialization.java
256
src/test/java/com/fasterxml/jackson/databind/ser/TestMapSerialization.java
testClassKey
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*;...
// You are a professional Java test case writer, please create a test case named `testClassKey` for the issue `JacksonDatabind-682`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-682 // // ## Issue-Title: // Deserializing Map<Class<? extends Obj...
256
9
250
src/test/java/com/fasterxml/jackson/databind/ser/TestMapSerialization.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-682 ## Issue-Title: Deserializing Map<Class<? extends Object>, String> ## Issue-Description: I am having problems deserializing my `Map<Class<? extends Object>, String>`. Simple test case demonstrates it: ``` @Test public void testMapWithClassAsKey() throws Exception { ...
250
[ "com.fasterxml.jackson.databind.ser.std.StdKeySerializer" ]
4f7aeda1290e99242e67dee093c55ba4489a466883d3be4121a0c6499c6de9bb
public void testClassKey() throws IOException
// You are a professional Java test case writer, please create a test case named `testClassKey` for the issue `JacksonDatabind-682`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-682 // // ## Issue-Title: // Deserializing Map<Class<? extends Obj...
JacksonDatabind
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*;...
public void testCodec101() throws Exception { byte[] codec101 = StringUtils.getBytesUtf8(Base64TestData.CODEC_101_MULTIPLE_OF_3); ByteArrayInputStream bais = new ByteArrayInputStream(codec101); Base64InputStream in = new Base64InputStream(bais); byte[] result = new byte[8192]; ...
org.apache.commons.codec.binary.Base64InputStreamTest::testCodec101
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
64
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
testCodec101
/* * 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 `testCodec101` for the issue `Codec-CODEC-101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-101 // // ## Issue-Title: // Base64InputStream#read(byte[]) incorrectly re...
64
/** * Test for the CODEC-101 bug: InputStream.read(byte[]) should never return 0 * because Java's builtin InputStreamReader hates that. * * @throws Exception for some failure scenarios. */
6
54
src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java
src/test
```markdown ## Issue-ID: Codec-CODEC-101 ## Issue-Title: Base64InputStream#read(byte[]) incorrectly returns 0 at end of any stream which is multiple of 3 bytes long ## Issue-Description: Using new InputStreamReader(new Base64InputStream(in, true)) sometimes fails with "java.io.IOException: Underlying input stream ...
54
[ "org.apache.commons.codec.binary.Base64InputStream" ]
4fc05c0e0e3fa74a5ecb6ba47f6c140ad69ea430ffc4b9729424ce8732ce4e5b
public void testCodec101() throws Exception
// You are a professional Java test case writer, please create a test case named `testCodec101` for the issue `Codec-CODEC-101`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-101 // // ## Issue-Title: // Base64InputStream#read(byte[]) incorrectly re...
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 testDynamicRootName() throws IOException { String xml; ObjectWriter w = _xmlMapper.writer().withRootName("rudy"); xml = w.writeValueAsString(new StringBean("foo")); assertEquals("<rudy><text>foo</text></rudy>", xml); xml = w.writeValueAsString(new StringBea...
com.fasterxml.jackson.dataformat.xml.misc.RootNameTest::testDynamicRootName
src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java
81
src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java
testDynamicRootName
package com.fasterxml.jackson.dataformat.xml.misc; import java.io.IOException; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.dataformat.xml.*; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; public class RootNameTest extends XmlTestBase { static cl...
// You are a professional Java test case writer, please create a test case named `testDynamicRootName` for the issue `JacksonXml-213`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonXml-213 // // ## Issue-Title: // XmlSerializerProvider does not use withR...
81
4
66
src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java
src/test/java
```markdown ## Issue-ID: JacksonXml-213 ## Issue-Title: XmlSerializerProvider does not use withRootName config for null ## Issue-Description: In `jackson-dataformat-xml/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.java` Line 203, I think `_rootNameFromConfig()` should be used if av...
66
[ "com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider" ]
4febfd4d47bcefe2a559107336bfc284597aae6947a60db23b090d8ae917dbee
public void testDynamicRootName() throws IOException
// You are a professional Java test case writer, please create a test case named `testDynamicRootName` for the issue `JacksonXml-213`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonXml-213 // // ## Issue-Title: // XmlSerializerProvider does not use withR...
JacksonXml
package com.fasterxml.jackson.dataformat.xml.misc; import java.io.IOException; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.dataformat.xml.*; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; public class RootNameTest extends XmlTestBase { static cl...
public void testNonFiniteDoublesWhenLenient() throws IOException { StringWriter stringWriter = new StringWriter(); JsonWriter jsonWriter = new JsonWriter(stringWriter); jsonWriter.setLenient(true); jsonWriter.beginArray(); jsonWriter.value(Double.NaN); jsonWriter.value(Double.NEGATIVE_INFINITY...
com.google.gson.stream.JsonWriterTest::testNonFiniteDoublesWhenLenient
gson/src/test/java/com/google/gson/stream/JsonWriterTest.java
226
gson/src/test/java/com/google/gson/stream/JsonWriterTest.java
testNonFiniteDoublesWhenLenient
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// You are a professional Java test case writer, please create a test case named `testNonFiniteDoublesWhenLenient` for the issue `Gson-1090`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1090 // // ## Issue-Title: // JsonWriter#value(java.lang.Number) can...
226
15
216
gson/src/test/java/com/google/gson/stream/JsonWriterTest.java
gson/src/test/java
```markdown ## Issue-ID: Gson-1090 ## Issue-Title: JsonWriter#value(java.lang.Number) can be lenient, but JsonWriter#value(double) can't, ## Issue-Description: In lenient mode, JsonWriter#value(java.lang.Number) can write pseudo-numeric values like `NaN`, `Infinity`, `-Infinity`: ``` if (!lenient && ...
216
[ "com.google.gson.stream.JsonWriter" ]
502698a024c46984b80927b2bb310bff5f35a7cd0328dec3cc606ccb42db1b60
public void testNonFiniteDoublesWhenLenient() throws IOException
// You are a professional Java test case writer, please create a test case named `testNonFiniteDoublesWhenLenient` for the issue `Gson-1090`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Gson-1090 // // ## Issue-Title: // JsonWriter#value(java.lang.Number) can...
Gson
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
@Test public void testHeaderMissingWithNull() throws Exception { final Reader in = new StringReader("a,,c,,d\n1,2,3,4\nx,y,z,zz"); CSVFormat.DEFAULT.withHeader().withNullString("").withIgnoreEmptyHeaders(true).parse(in).iterator(); }
org.apache.commons.csv.CSVParserTest::testHeaderMissingWithNull
src/test/java/org/apache/commons/csv/CSVParserTest.java
670
src/test/java/org/apache/commons/csv/CSVParserTest.java
testHeaderMissingWithNull
/* * 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 `testHeaderMissingWithNull` for the issue `Csv-CSV-122`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-122 // // ## Issue-Title: // NullPointerException when empty header s...
670
11
666
src/test/java/org/apache/commons/csv/CSVParserTest.java
src/test/java
```markdown ## Issue-ID: Csv-CSV-122 ## Issue-Title: NullPointerException when empty header string and and null string of "" ## Issue-Description: When setting the format to have a nullString of "" and having an empty header value, a nullPointerException is thrown. ``` You are a professional Java test case w...
666
[ "org.apache.commons.csv.CSVParser" ]
50b2f4870c16eae445fb17813cd1f21d4665380af553b4803c0257ad4b98aebb
@Test public void testHeaderMissingWithNull() throws Exception
// You are a professional Java test case writer, please create a test case named `testHeaderMissingWithNull` for the issue `Csv-CSV-122`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Csv-CSV-122 // // ## Issue-Title: // NullPointerException when empty header s...
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 test() throws Exception { Options options = buildCommandLineOptions(); CommandLineParser parser = new PosixParser(); String[] args = new String[] {"-t", "-something" }; CommandLine commandLine; commandLine = parser.parse( options, args ); assertEquals(...
org.apache.commons.cli.bug.BugCLI51Test::test
src/test/org/apache/commons/cli/bug/BugCLI51Test.java
41
src/test/org/apache/commons/cli/bug/BugCLI51Test.java
test
/* * 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` for the issue `Cli-CLI-51`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-51 // // ## Issue-Title: // [cli] Parameter value "-something" misinterpreted as a paramete...
41
2
33
src/test/org/apache/commons/cli/bug/BugCLI51Test.java
src/test
```markdown ## Issue-ID: Cli-CLI-51 ## Issue-Title: [cli] Parameter value "-something" misinterpreted as a parameter ## Issue-Description: If a parameter value is passed that contains a hyphen as the (delimited) first character, CLI parses this a parameter. For example using the call java myclass -t "-somet...
33
[ "org.apache.commons.cli.PosixParser" ]
510442be9a9617bf9110d20d33b1bbff24ec4b53e7d434c364304c9b24e08462
public void test() throws Exception
// You are a professional Java test case writer, please create a test case named `test` for the issue `Cli-CLI-51`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-51 // // ## Issue-Title: // [cli] Parameter value "-something" misinterpreted as a paramete...
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(expected = IOException.class) public void shouldThrowAnExceptionOnTruncatedEntries() throws Exception { File dir = mkdir("COMPRESS-279"); TarArchiveInputStream is = getTestStream("/COMPRESS-279.tar"); FileOutputStream out = null; try { TarArchiveEntry entry = is...
org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::shouldThrowAnExceptionOnTruncatedEntries
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
233
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
shouldThrowAnExceptionOnTruncatedEntries
/* * 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 `shouldThrowAnExceptionOnTruncatedEntries` for the issue `Compress-COMPRESS-279`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-279 // // ## Issue-Title: // TarAr...
233
28
211
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-279 ## Issue-Title: TarArchiveInputStream silently finished when unexpected EOF occured ## Issue-Description: I just found the following test case didn't raise an IOException as it used to be for a **tar trimmed on purpose** @Test public void testCorruptedBzip2() t...
211
[ "org.apache.commons.compress.archivers.tar.TarArchiveInputStream" ]
516c270a46ec9c17758e370b8a69fc64b2c46af7c2ca5353fc7c580613b6484f
@Test(expected = IOException.class) public void shouldThrowAnExceptionOnTruncatedEntries() throws Exception
// You are a professional Java test case writer, please create a test case named `shouldThrowAnExceptionOnTruncatedEntries` for the issue `Compress-COMPRESS-279`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-279 // // ## Issue-Title: // TarAr...
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 testLang299() { StrBuilder sb = new StrBuilder(1); sb.appendFixedWidthPadRight("foo", 1, '-'); assertEquals("f", sb.toString()); }
org.apache.commons.lang.text.StrBuilderAppendInsertTest::testLang299
src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
603
src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
testLang299
/* * 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 `testLang299` for the issue `Lang-LANG-299`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-299 // // ## Issue-Title: // Bug in method appendFixedWidthPadRight of class St...
603
// See: http://issues.apache.org/jira/browse/LANG-299
59
599
src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-299 ## Issue-Title: Bug in method appendFixedWidthPadRight of class StrBuilder causes an ArrayIndexOutOfBoundsException ## Issue-Description: There's a bug in method appendFixedWidthPadRight of class StrBuilder: public StrBuilder appendFixedWidthPadRight(Object obj, int width, ...
599
[ "org.apache.commons.lang.text.StrBuilder" ]
53430836691699fecf20854c46afee75a82c1a5f5b0c089ac8697fea66eba94b
public void testLang299()
// You are a professional Java test case writer, please create a test case named `testLang299` for the issue `Lang-LANG-299`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-299 // // ## Issue-Title: // Bug in method appendFixedWidthPadRight of class St...
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 littleEndianWithOverflow() throws Exception { ByteArrayInputStream in = new ByteArrayInputStream(new byte[] { 87, // 01010111 45, // 00101101 66, // 01000010 15, // 00001111 90, // 01011010 ...
org.apache.commons.compress.utils.BitInputStreamTest::littleEndianWithOverflow
src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
145
src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
littleEndianWithOverflow
/* * 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 `littleEndianWithOverflow` for the issue `Compress-COMPRESS-363`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-363 // // ## Issue-Title: // Overflow in BitInputS...
145
/** * @see "https://issues.apache.org/jira/browse/COMPRESS-363" */
40
123
src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-363 ## Issue-Title: Overflow in BitInputStream ## Issue-Description: in Class BitInputStream.java(\src\main\java\org\apache\commons\compress\utils), funcion: public long readBits(final int count) throws IOException { if (count < 0 || count > MAXIMUM\_CACHE\_SIZE...
123
[ "org.apache.commons.compress.utils.BitInputStream" ]
544fd993b5e67f8ab2fafb85e4cd638b97aa5bf78636824472999d6382284a3a
@Test public void littleEndianWithOverflow() throws Exception
// You are a professional Java test case writer, please create a test case named `littleEndianWithOverflow` for the issue `Compress-COMPRESS-363`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-363 // // ## Issue-Title: // Overflow in BitInputS...
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 testIssue1255() throws Exception { ObjectMapper mapper = new ObjectMapper(); Foo mo = new Foo(); mo.bar1 = new Bar(); mo.bar2 = mo.bar1; String json = mapper.writeValueAsString(mo); Foo result = mapper.readValue(json, Foo.class); assertNotNul...
com.fasterxml.jackson.databind.objectid.AlwaysAsReferenceFirstTest::testIssue1255
src/test/java/com/fasterxml/jackson/databind/objectid/AlwaysAsReferenceFirstTest.java
33
src/test/java/com/fasterxml/jackson/databind/objectid/AlwaysAsReferenceFirstTest.java
testIssue1255
package com.fasterxml.jackson.databind.objectid; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; public class AlwaysAsReferenceFirstTest extends BaseMapTest { @JsonPropertyOrder({ "bar1", "bar2" }) static class Foo { @JsonIdentityReference(alwaysAsId = true) ...
// You are a professional Java test case writer, please create a test case named `testIssue1255` for the issue `JacksonDatabind-1255`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1255 // // ## Issue-Title: // JsonIdentityInfo incorrectly seria...
33
49
22
src/test/java/com/fasterxml/jackson/databind/objectid/AlwaysAsReferenceFirstTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1255 ## Issue-Title: JsonIdentityInfo incorrectly serializing forward references ## Issue-Description: I wrote this small test program to demonstrate the issue: ``` import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIdent...
22
[ "com.fasterxml.jackson.databind.ser.impl.WritableObjectId" ]
5563d77ac2a1332f7942e590097a397f48539727b187ef18404b94b27b3fc6c0
public void testIssue1255() throws Exception
// You are a professional Java test case writer, please create a test case named `testIssue1255` for the issue `JacksonDatabind-1255`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1255 // // ## Issue-Title: // JsonIdentityInfo incorrectly seria...
JacksonDatabind
package com.fasterxml.jackson.databind.objectid; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; public class AlwaysAsReferenceFirstTest extends BaseMapTest { @JsonPropertyOrder({ "bar1", "bar2" }) static class Foo { @JsonIdentityReference(alwaysAsId = true) ...
public void testValidDefine() { assertTrue(testValidDefineValue("1")); assertTrue(testValidDefineValue("-3")); assertTrue(testValidDefineValue("true")); assertTrue(testValidDefineValue("false")); assertTrue(testValidDefineValue("'foo'")); assertFalse(testValidDefineValue("x")); assert...
com.google.javascript.jscomp.NodeUtilTest::testValidDefine
test/com/google/javascript/jscomp/NodeUtilTest.java
1,089
test/com/google/javascript/jscomp/NodeUtilTest.java
testValidDefine
/* * Copyright 2004 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 `testValidDefine` for the issue `Closure-255`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-255 // // ## Issue-Title: // closure-compiler @define annotation does not allow...
1,089
94
1,070
test/com/google/javascript/jscomp/NodeUtilTest.java
test
```markdown ## Issue-ID: Closure-255 ## Issue-Title: closure-compiler @define annotation does not allow line to be split on 80 characters. ## Issue-Description: **What steps will reproduce the problem?** 1. Create a JavaScript file with the followiing: /\*\* @define {string} \*/ var CONSTANT = "some very long str...
1,070
[ "com.google.javascript.jscomp.NodeUtil" ]
568bd6d640661c966c75934d3e21b23b274d58c1a9a396e2afc9d1fe8029ee25
public void testValidDefine()
// You are a professional Java test case writer, please create a test case named `testValidDefine` for the issue `Closure-255`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-255 // // ## Issue-Title: // closure-compiler @define annotation does not allow...
Closure
/* * Copyright 2004 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 public void testCrossProductCancellation() { Vector3D v1 = new Vector3D(9070467121.0, 4535233560.0, 1); Vector3D v2 = new Vector3D(9070467123.0, 4535233561.0, 1); checkVector(Vector3D.crossProduct(v1, v2), -1, 2, 1); double scale = FastMath.scalb(1.0, 100); Vect...
org.apache.commons.math.geometry.Vector3DTest::testCrossProductCancellation
src/test/java/org/apache/commons/math/geometry/Vector3DTest.java
165
src/test/java/org/apache/commons/math/geometry/Vector3DTest.java
testCrossProductCancellation
/* * 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 `testCrossProductCancellation` for the issue `Math-MATH-554`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-554 // // ## Issue-Title: // Vector3D.crossProduct is sensitiv...
165
55
154
src/test/java/org/apache/commons/math/geometry/Vector3DTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-554 ## Issue-Title: Vector3D.crossProduct is sensitive to numerical cancellation ## Issue-Description: Cross product implementation uses the naive formulas (y1 z2 - y2 z1, ...). These formulas fail when vectors are almost colinear, like in the following example: ``` Vector3D ...
154
[ "org.apache.commons.math.geometry.Vector3D" ]
5779bde6ee18d450226a96e12a75fc5e8261970311eed8e29094b77715d33cf5
@Test public void testCrossProductCancellation()
// You are a professional Java test case writer, please create a test case named `testCrossProductCancellation` for the issue `Math-MATH-554`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-554 // // ## Issue-Title: // Vector3D.crossProduct is sensitiv...
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 testEscapeSurrogatePairs() throws Exception { assertEquals("\uD83D\uDE30", StringEscapeUtils.escapeCsv("\uD83D\uDE30")); // Examples from https://en.wikipedia.org/wiki/UTF-16 assertEquals("\uD800\uDC00", StringEscapeUtils.escapeCsv("\uD800\uDC00")); assertEquals...
org.apache.commons.lang3.StringUtilsTest::testEscapeSurrogatePairs
src/test/java/org/apache/commons/lang3/StringUtilsTest.java
2,192
src/test/java/org/apache/commons/lang3/StringUtilsTest.java
testEscapeSurrogatePairs
/* * 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 `testEscapeSurrogatePairs` for the issue `Lang-LANG-857`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-857 // // ## Issue-Title: // StringIndexOutOfBoundsException in Ch...
2,192
6
2,184
src/test/java/org/apache/commons/lang3/StringUtilsTest.java
src/test/java
```markdown ## Issue-ID: Lang-LANG-857 ## Issue-Title: StringIndexOutOfBoundsException in CharSequenceTranslator ## Issue-Description: I found that there is bad surrogate pair handling in the CharSequenceTranslator This is a simple test case for this problem. \uD83D\uDE30 is a surrogate pair. ``` @Test pu...
2,184
[ "org.apache.commons.lang3.text.translate.CharSequenceTranslator" ]
577ff93581b5f08a349ed281d8c82741bd052f7b7ac119197ec6f58dad1e2282
@Test public void testEscapeSurrogatePairs() throws Exception
// You are a professional Java test case writer, please create a test case named `testEscapeSurrogatePairs` for the issue `Lang-LANG-857`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-857 // // ## Issue-Title: // StringIndexOutOfBoundsException in Ch...
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 testAtan2SpecialCases() { DerivativeStructure pp = DerivativeStructure.atan2(new DerivativeStructure(2, 2, 1, +0.0), new DerivativeStructure(2, 2, 1, +0.0)); Assert.assertEquals(0, pp.getValue(), 1.0e-15); Asser...
org.apache.commons.math3.analysis.differentiation.DerivativeStructureTest::testAtan2SpecialCases
src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java
834
src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java
testAtan2SpecialCases
/* * 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 `testAtan2SpecialCases` for the issue `Math-MATH-935`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-935 // // ## Issue-Title: // DerivativeStructure.atan2(y,x) does not ...
834
10
809
src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-935 ## Issue-Title: DerivativeStructure.atan2(y,x) does not handle special cases properly ## Issue-Description: The four special cases +/-0 for both x and y should give the same values as Math.atan2 and FastMath.atan2. However, they give NaN for the value in all cases. ``` ...
809
[ "org.apache.commons.math3.analysis.differentiation.DSCompiler" ]
578470b3dff8b94489beaf9a3cd089f444b5873e7f01f8b168fe833c2a9bac63
@Test public void testAtan2SpecialCases()
// You are a professional Java test case writer, please create a test case named `testAtan2SpecialCases` for the issue `Math-MATH-935`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-935 // // ## Issue-Title: // DerivativeStructure.atan2(y,x) does not ...
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 testEndMb() throws EncoderException { String[][] data = {{"mb", "M111111111"}, {"mbmb", "MPM1111111"}}; this.checkEncodings(data); }
org.apache.commons.codec.language.CaverphoneTest::testEndMb
src/test/org/apache/commons/codec/language/CaverphoneTest.java
335
src/test/org/apache/commons/codec/language/CaverphoneTest.java
testEndMb
/* * 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 `testEndMb` for the issue `Codec-CODEC-117`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-117 // // ## Issue-Title: // Caverphone encodes names starting and ending wit...
335
10
332
src/test/org/apache/commons/codec/language/CaverphoneTest.java
src/test
```markdown ## Issue-ID: Codec-CODEC-117 ## Issue-Title: Caverphone encodes names starting and ending with "mb" incorrectly. ## Issue-Description: Caverphone encode names starting and ending with "mb" incorrectly. According to the spec: "If the name ends with mb make it m2". This has been coded as: "If t...
332
[ "org.apache.commons.codec.language.Caverphone" ]
57e35541ebaebcf95bc4f523bfaa41aec18ea4c87366e4a7507bf84639084f4a
public void testEndMb() throws EncoderException
// You are a professional Java test case writer, please create a test case named `testEndMb` for the issue `Codec-CODEC-117`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-117 // // ## Issue-Title: // Caverphone encodes names starting and ending wit...
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 testWithEmptyStringAsNullObject1533() throws Exception { ObjectMapper mapper = new ObjectMapper().enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); AsPropertyWrapper wrapper = mapper.readValue("{ \"value\": \"\" }", AsPropertyWrapper.class); assertNull(wrappe...
com.fasterxml.jackson.databind.jsontype.TestPolymorphicWithDefaultImpl::testWithEmptyStringAsNullObject1533
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
275
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
testWithEmptyStringAsNullObject1533
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.NoClass; /** * Unit tests related to specialized handling of "default implementation" * ({@link JsonTypeInfo#def...
// You are a professional Java test case writer, please create a test case named `testWithEmptyStringAsNullObject1533` for the issue `JacksonDatabind-1533`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1533 // // ## Issue-Title: // AsPropertyTy...
275
74
270
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1533 ## Issue-Title: AsPropertyTypeDeserializer ignores DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT ## Issue-Description: The `AsPropertyTypeDeserializer` implementation does not respect the `DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT` feature. ...
270
[ "com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer" ]
589a5076ccce122a7f12dbdff4e2fd70924da2e35b596fd76f11d42cfb2ca7b0
public void testWithEmptyStringAsNullObject1533() throws Exception
// You are a professional Java test case writer, please create a test case named `testWithEmptyStringAsNullObject1533` for the issue `JacksonDatabind-1533`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1533 // // ## Issue-Title: // AsPropertyTy...
JacksonDatabind
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.NoClass; /** * Unit tests related to specialized handling of "default implementation" * ({@link JsonTypeInfo#def...
public void testGlobalCatch() throws Exception { testSame( "try {" + " throw Error();" + "} catch (e) {" + " console.log(e.name)" + "}"); }
com.google.javascript.jscomp.CheckGlobalNamesTest::testGlobalCatch
test/com/google/javascript/jscomp/CheckGlobalNamesTest.java
346
test/com/google/javascript/jscomp/CheckGlobalNamesTest.java
testGlobalCatch
/* * 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 `testGlobalCatch` for the issue `Closure-1070`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1070 // // ## Issue-Title: // catch(e) yields JSC_UNDEFINED_NAME warning when ...
346
119
339
test/com/google/javascript/jscomp/CheckGlobalNamesTest.java
test
```markdown ## Issue-ID: Closure-1070 ## Issue-Title: catch(e) yields JSC_UNDEFINED_NAME warning when e is used in catch in advanced mode ## Issue-Description: **What steps will reproduce the problem?** 1. set closure for advanced compilation 2. compile this: // ==ClosureCompiler== // @compilation\_level ADVANCE...
339
[ "com.google.javascript.jscomp.GlobalNamespace" ]
590497092ae462bd85c1eb327ef0ba90e4f3f80f4ee994b8389a8f72ea5272f6
public void testGlobalCatch() throws Exception
// You are a professional Java test case writer, please create a test case named `testGlobalCatch` for the issue `Closure-1070`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1070 // // ## Issue-Title: // catch(e) yields JSC_UNDEFINED_NAME warning when ...
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 testGoogIsArray2() throws Exception { testClosureFunction("goog.isArray", ALL_TYPE, ARRAY_TYPE, ALL_TYPE); }
com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest::testGoogIsArray2
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
209
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
testGoogIsArray2
/* * Copyright 2007 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 `testGoogIsArray2` for the issue `Closure-1114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1114 // // ## Issue-Title: // goog.isArray doesn't hint compiler // // ## Is...
209
111
204
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
test
```markdown ## Issue-ID: Closure-1114 ## Issue-Title: goog.isArray doesn't hint compiler ## Issue-Description: **What steps will reproduce the problem?** **1.** /\*\* \* @param {\*} object \* @return {\*} \*/ var test = function(object) { if (goog.isArray(object)) { /\*\* @type {Array} \*/ var x = obje...
204
[ "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter" ]
5940b8046addbff658ebf141af34fed3de1ffe4aba47f8184c8cf612f40bddd4
public void testGoogIsArray2() throws Exception
// You are a professional Java test case writer, please create a test case named `testGoogIsArray2` for the issue `Closure-1114`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1114 // // ## Issue-Title: // goog.isArray doesn't hint compiler // // ## Is...
Closure
/* * Copyright 2007 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 testUnionOfVariableAndNode() throws Exception { Document doc = DocumentBuilderFactory.newInstance() .newDocumentBuilder().parse( new InputSource(new StringReader( "<MAIN><A/><A/></MAIN>"))); JXPathContext context = ...
org.apache.commons.jxpath.ri.compiler.VariableTest::testUnionOfVariableAndNode
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
289
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
testUnionOfVariableAndNode
/* * 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 `testUnionOfVariableAndNode` for the issue `JxPath-JXPATH-89`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-89 // // ## Issue-Title: // Cannot compare pointers that ...
289
5
276
src/test/org/apache/commons/jxpath/ri/compiler/VariableTest.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-89 ## Issue-Title: Cannot compare pointers that do not belong to the same tree ## Issue-Description: For XPath "$var | /MAIN/A" exception is thrown: org.apache.commons.jxpath.JXPathException: Cannot compare pointers that do not belong to the same tree: '$var' and '' at ...
276
[ "org.apache.commons.jxpath.ri.model.NodePointer" ]
59acc5ec8cfbf8b1767269e892ab4d4538dd16c65fceebe48ca02423a160e856
public void testUnionOfVariableAndNode() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnionOfVariableAndNode` for the issue `JxPath-JXPATH-89`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-89 // // ## Issue-Title: // Cannot compare pointers that ...
JxPath
/* * 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 testBinaryAsEmbeddedObject() throws Exception { JsonGenerator g; StringWriter sw = new StringWriter(); g = JSON_F.createGenerator(sw); g.writeEmbeddedObject(WIKIPEDIA_BASE64_AS_BYTES); g.close(); assertEquals(quote(WIKIPEDIA_BASE64_ENCODED), sw.toStri...
com.fasterxml.jackson.core.base64.Base64GenerationTest::testBinaryAsEmbeddedObject
src/test/java/com/fasterxml/jackson/core/base64/Base64GenerationTest.java
108
src/test/java/com/fasterxml/jackson/core/base64/Base64GenerationTest.java
testBinaryAsEmbeddedObject
package com.fasterxml.jackson.core.base64; import java.io.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.testsupport.ThrottledInputStream; public class Base64GenerationTest extends com.fasterxml.jackson.core.BaseTest { /* The usual sample input string, from Thomas Hobbes's "Leviath...
// You are a professional Java test case writer, please create a test case named `testBinaryAsEmbeddedObject` for the issue `JacksonCore-318`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-318 // // ## Issue-Title: // Add support for writing byte[] ...
108
// for [core#318]
20
93
src/test/java/com/fasterxml/jackson/core/base64/Base64GenerationTest.java
src/test/java
```markdown ## Issue-ID: JacksonCore-318 ## Issue-Title: Add support for writing byte[] via JsonGenerator.writeEmbeddedObject() ## Issue-Description: (note: should be safe for patch, that is, 2.8.3) Default implementation of 2.8-added `writeEmbeddedObject()` throws exception (unsupported operation) for all values...
93
[ "com.fasterxml.jackson.core.JsonGenerator" ]
5ae83d482b85929c24eb634c9403e036ba0439685e62ad8adafa535a3df4e736
public void testBinaryAsEmbeddedObject() throws Exception
// You are a professional Java test case writer, please create a test case named `testBinaryAsEmbeddedObject` for the issue `JacksonCore-318`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-318 // // ## Issue-Title: // Add support for writing byte[] ...
JacksonCore
package com.fasterxml.jackson.core.base64; import java.io.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.testsupport.ThrottledInputStream; public class Base64GenerationTest extends com.fasterxml.jackson.core.BaseTest { /* The usual sample input string, from Thomas Hobbes's "Leviath...
public void testAvailableLocaleSet() { Set set = LocaleUtils.availableLocaleSet(); Set set2 = LocaleUtils.availableLocaleSet(); assertNotNull(set); assertSame(set, set2); assertUnmodifiableCollection(set); Locale[] jdkLocaleArray = Locale.getAvailableLocales(...
org.apache.commons.lang.LocaleUtilsTest::testAvailableLocaleSet
src/test/org/apache/commons/lang/LocaleUtilsTest.java
374
src/test/org/apache/commons/lang/LocaleUtilsTest.java
testAvailableLocaleSet
/* * 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 `testAvailableLocaleSet` for the issue `Lang-LANG-304`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-304 // // ## Issue-Title: // NullPointerException in isAvailableLoca...
374
/** * Test availableLocaleSet() method. */ //-----------------------------------------------------------------------
57
363
src/test/org/apache/commons/lang/LocaleUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-304 ## Issue-Title: NullPointerException in isAvailableLocale(Locale) ## Issue-Description: FindBugs pointed out: UwF: Field not initialized in constructor: org.apache.commons.lang.LocaleUtils.cAvailableLocaleSet cAvailableSet is used directly once in the source - and if ava...
363
[ "org.apache.commons.lang.LocaleUtils" ]
5c1dc02d60ffc98b5555a73193ed46532ba2d79ed6a38d70f0d516a1ac171ecd
public void testAvailableLocaleSet()
// You are a professional Java test case writer, please create a test case named `testAvailableLocaleSet` for the issue `Lang-LANG-304`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-304 // // ## Issue-Title: // NullPointerException in isAvailableLoca...
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 testForEach() { parseError( "function f(stamp, status) {\n" + " for each ( var curTiming in this.timeLog.timings ) {\n" + " if ( curTiming.callId == stamp ) {\n" + " curTiming.flag = status;\n" + " break;\n" + " }\n" + " }\n" + ...
com.google.javascript.jscomp.parsing.ParserTest::testForEach
test/com/google/javascript/jscomp/parsing/ParserTest.java
971
test/com/google/javascript/jscomp/parsing/ParserTest.java
testForEach
/* * Copyright 2007 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 `testForEach` for the issue `Closure-644`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-644 // // ## Issue-Title: // Simple "Whitespace only" compression removing "each" k...
971
42
960
test/com/google/javascript/jscomp/parsing/ParserTest.java
test
```markdown ## Issue-ID: Closure-644 ## Issue-Title: Simple "Whitespace only" compression removing "each" keyword from "for each (var x in arr)" loop ## Issue-Description: **What steps will reproduce the problem?** See below code snippet before after compression ---Before--- contactcenter.screenpop.updatePopSta...
960
[ "com.google.javascript.jscomp.parsing.IRFactory" ]
5c9935843a0ced814d855a017f06eaddbede7c05c3554c2b9ef6b33b4d4cecd0
public void testForEach()
// You are a professional Java test case writer, please create a test case named `testForEach` for the issue `Closure-644`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-644 // // ## Issue-Title: // Simple "Whitespace only" compression removing "each" k...
Closure
/* * Copyright 2007 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 testIZeroIndex() throws Exception { JsonPointer ptr = JsonPointer.compile("/0"); assertEquals(0, ptr.getMatchingIndex()); ptr = JsonPointer.compile("/00"); assertEquals(-1, ptr.getMatchingIndex()); }
com.fasterxml.jackson.core.TestJsonPointer::testIZeroIndex
src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java
51
src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java
testIZeroIndex
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 `testIZeroIndex` for the issue `JacksonCore-176`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-176 // // ## Issue-Title: // JsonPointer should not consider "00" to be ...
51
// [core#176]: do not allow leading zeroes
6
45
src/test/java/com/fasterxml/jackson/core/TestJsonPointer.java
src/test/java
```markdown ## Issue-ID: JacksonCore-176 ## Issue-Title: JsonPointer should not consider "00" to be valid index ## Issue-Description: Although `00` can be parsed as `0` in some cases, it is not a valid JSON number; and is also not legal numeric index for JSON Pointer. As such, `JsonPointer` class should ensure it c...
45
[ "com.fasterxml.jackson.core.JsonPointer" ]
5cc33ae3000157d8d842d50c1fcda83cc9bbcb0360b3a03361baf7c5d1d0b506
public void testIZeroIndex() throws Exception
// You are a professional Java test case writer, please create a test case named `testIZeroIndex` for the issue `JacksonCore-176`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonCore-176 // // ## Issue-Title: // JsonPointer should not consider "00" to be ...
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 testInnerEmptyNamespaceDOM() { doTest("b:foo/test", DocumentContainer.MODEL_DOM, "/b:foo[1]/test[1]"); }
org.apache.commons.jxpath.ri.model.JXPath154Test::testInnerEmptyNamespaceDOM
src/test/org/apache/commons/jxpath/ri/model/JXPath154Test.java
21
src/test/org/apache/commons/jxpath/ri/model/JXPath154Test.java
testInnerEmptyNamespaceDOM
package org.apache.commons.jxpath.ri.model; import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.JXPathTestCase; import org.apache.commons.jxpath.xml.DocumentContainer; public class JXPath154Test extends JXPathTestCase { protected JXPathContext context; protected DocumentContaine...
// You are a professional Java test case writer, please create a test case named `testInnerEmptyNamespaceDOM` for the issue `JxPath-JXPATH-154`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-154 // // ## Issue-Title: // Resetting the default names...
21
22
19
src/test/org/apache/commons/jxpath/ri/model/JXPath154Test.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-154 ## Issue-Title: Resetting the default namespace causes a serious endless loop when requesting .asPath() on a node. ## Issue-Description: sample smaller case: ``` <...> <b:foo xmlns:b="bla" xmlns="test111"> <!-- No nodes are placed in the tree within ns "test111" ...
19
[ "org.apache.commons.jxpath.ri.model.dom.DOMNodePointer" ]
5cc80324cf641b69b64f67e90e9aa205c5a45de20400f8117221e4a8a4b9836c
public void testInnerEmptyNamespaceDOM()
// You are a professional Java test case writer, please create a test case named `testInnerEmptyNamespaceDOM` for the issue `JxPath-JXPATH-154`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-154 // // ## Issue-Title: // Resetting the default names...
JxPath
package org.apache.commons.jxpath.ri.model; import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.JXPathTestCase; import org.apache.commons.jxpath.xml.DocumentContainer; public class JXPath154Test extends JXPathTestCase { protected JXPathContext context; protected DocumentContaine...
public void testNoPrivateAccessForProperties6() { // Overriding a private property with a non-private property // in a different file causes problems. test(new String[] { "/** @constructor */ function Foo() {} " + "/** @private */ Foo.prototype.bar_ = function() {};", "/** @constructor \...
com.google.javascript.jscomp.CheckAccessControlsTest::testNoPrivateAccessForProperties6
test/com/google/javascript/jscomp/CheckAccessControlsTest.java
408
test/com/google/javascript/jscomp/CheckAccessControlsTest.java
testNoPrivateAccessForProperties6
/* * 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 `testNoPrivateAccessForProperties6` for the issue `Closure-254`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-254 // // ## Issue-Title: // no warnings when @private prop i...
408
71
398
test/com/google/javascript/jscomp/CheckAccessControlsTest.java
test
```markdown ## Issue-ID: Closure-254 ## Issue-Title: no warnings when @private prop is redeclared on subclass ## Issue-Description: **What steps will reproduce the problem?** /\*\* @constructor \*/ function Foo() { /\*\* @private \*/ this.x\_ = 3; } then, in a separate file: /\*\* @constructor \* @extends {F...
398
[ "com.google.javascript.jscomp.CheckAccessControls" ]
5cd85d21598f8d902417a917431143ff5561bc87009f057959a782f5802bc865
public void testNoPrivateAccessForProperties6()
// You are a professional Java test case writer, please create a test case named `testNoPrivateAccessForProperties6` for the issue `Closure-254`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-254 // // ## Issue-Title: // no warnings when @private prop i...
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 testSimpleModeLeavesUnusedParams() { args.add("--compilation_level=SIMPLE_OPTIMIZATIONS"); testSame("window.f = function(a) {};"); }
com.google.javascript.jscomp.CommandLineRunnerTest::testSimpleModeLeavesUnusedParams
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
156
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
testSimpleModeLeavesUnusedParams
/* * 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 `testSimpleModeLeavesUnusedParams` for the issue `Closure-253`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-253 // // ## Issue-Title: // function arguments should not be ...
156
1
153
test/com/google/javascript/jscomp/CommandLineRunnerTest.java
test
```markdown ## Issue-ID: Closure-253 ## Issue-Title: function arguments should not be optimized away ## Issue-Description: Function arguments should not be optimized away, as this comprimizes the function's length property. **What steps will reproduce the problem?** // ==ClosureCompiler== // @compilation\_lev...
153
[ "com.google.javascript.jscomp.RemoveUnusedVars" ]
5d0a52d450c33f0e5b99bc85aa408e57f6a933e661e8b8abc23420aa3936b31e
public void testSimpleModeLeavesUnusedParams()
// You are a professional Java test case writer, please create a test case named `testSimpleModeLeavesUnusedParams` for the issue `Closure-253`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-253 // // ## Issue-Title: // function arguments should not be ...
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 testBug2495455() { PeriodFormatter pfmt1 = new PeriodFormatterBuilder() .appendLiteral("P") .appendYears() .appendSuffix("Y") .appendMonths() .appendSuffix("M") .appendWeeks() .appendSuffix("W") .appe...
org.joda.time.format.TestPeriodFormatterBuilder::testBug2495455
src/test/java/org/joda/time/format/TestPeriodFormatterBuilder.java
869
src/test/java/org/joda/time/format/TestPeriodFormatterBuilder.java
testBug2495455
/* * 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 `testBug2495455` for the issue `Time-64`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-64 // // ## Issue-Title: // #64 Different behaviour of PeriodFormatter // // // // ...
869
27
845
src/test/java/org/joda/time/format/TestPeriodFormatterBuilder.java
src/test/java
```markdown ## Issue-ID: Time-64 ## Issue-Title: #64 Different behaviour of PeriodFormatter ## Issue-Description: PeriodFormatter pfmt2 = pfmtbuilder2.append(ISOPeriodFormat.standard() ).toFormatter(); is not the same as PeriodFormatterBuilder pfmtbuilder1 = new PeriodFormatterBuilder() .appendLiteral("P...
845
[ "org.joda.time.format.PeriodFormatterBuilder" ]
5d87162d9374d20cfe3f4bf892de0b7476e1a0708b95e60690f69c1a39850e59
public void testBug2495455()
// You are a professional Java test case writer, please create a test case named `testBug2495455` for the issue `Time-64`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-64 // // ## Issue-Title: // #64 Different behaviour of PeriodFormatter // // // // ...
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 testGoogIsFunction2() throws Exception { testClosureFunction("goog.isFunction", OBJECT_NUMBER_STRING_BOOLEAN, U2U_CONSTRUCTOR_TYPE, OBJECT_NUMBER_STRING_BOOLEAN); }
com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest::testGoogIsFunction2
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
124
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
testGoogIsFunction2
/* * Copyright 2007 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 `testGoogIsFunction2` for the issue `Closure-841`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-841 // // ## Issue-Title: // Bad type inference with goog.isFunction and fr...
124
7
119
test/com/google/javascript/jscomp/ClosureReverseAbstractInterpreterTest.java
test
```markdown ## Issue-ID: Closure-841 ## Issue-Title: Bad type inference with goog.isFunction and friends ## Issue-Description: experimental/johnlenz/typeerror/test.js:16: WARNING - Property length never defined on Number var i = object.length; This is the reduced test case: /\*\* \* @param {\*} object ...
119
[ "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter" ]
5e331d80a3d6fe729f3f639f32b643f754ab721451190ed7abc0fa0812ab9b40
public void testGoogIsFunction2() throws Exception
// You are a professional Java test case writer, please create a test case named `testGoogIsFunction2` for the issue `Closure-841`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-841 // // ## Issue-Title: // Bad type inference with goog.isFunction and fr...
Closure
/* * Copyright 2007 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 testIssue291() { fold("if (true) { f.onchange(); }", "if (1) f.onchange();"); foldSame("if (f) { f.onchange(); }"); foldSame("if (f) { f.bar(); } else { f.onchange(); }"); fold("if (f) { f.bonchange(); }", "f && f.bonchange();"); foldSame("if (f) { f['x'](); }"); }
com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest::testIssue291
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
571
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
testIssue291
/* * 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 `testIssue291` for the issue `Closure-291`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-291 // // ## Issue-Title: // IE8 error: Object doesn't support this action // // ...
571
87
565
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
test
```markdown ## Issue-ID: Closure-291 ## Issue-Title: IE8 error: Object doesn't support this action ## Issue-Description: **What steps will reproduce the problem?** 1. Use script with fragment like if (e.onchange) { e.onchange({ \_extendedByPrototype: Prototype.emptyFunction, target: e }); } 2. Compile ...
565
[ "com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntax" ]
5e6dfafbdc38d10db632b54ced3765e6c708b4d9636d5b2492629d19f544440e
public void testIssue291()
// You are a professional Java test case writer, please create a test case named `testIssue291` for the issue `Closure-291`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-291 // // ## Issue-Title: // IE8 error: Object doesn't support this action // // ...
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 testIssue937() { CompilerOptions options = createCompilerOptions(); CompilationLevel level = CompilationLevel.SIMPLE_OPTIMIZATIONS; level.setOptionsForCompilationLevel(options); WarningLevel warnings = WarningLevel.DEFAULT; warnings.setOptionsForWarningLevel(options); String code ...
com.google.javascript.jscomp.IntegrationTest::testIssue937
test/com/google/javascript/jscomp/IntegrationTest.java
2,430
test/com/google/javascript/jscomp/IntegrationTest.java
testIssue937
/* * 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 `testIssue937` for the issue `Closure-937`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-937 // // ## Issue-Title: // Casting a function before calling it produces bad cod...
2,430
129
2,417
test/com/google/javascript/jscomp/IntegrationTest.java
test
```markdown ## Issue-ID: Closure-937 ## Issue-Title: Casting a function before calling it produces bad code and breaks plugin code ## Issue-Description: 1. Compile this code with ADVANCED\_OPTIMIZATIONS: console.log( /\*\* @type {function(!string):!string} \*/ ((new window.ActiveXObject( 'ShockwaveFlash.ShockwaveF...
2,417
[ "com.google.javascript.jscomp.PrepareAst" ]
5f118375a434aedd01f48bb5ea2e9e7a68f8a440f6b38d30ea630ed135d311a9
public void testIssue937()
// You are a professional Java test case writer, please create a test case named `testIssue937` for the issue `Closure-937`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-937 // // ## Issue-Title: // Casting a function before calling it produces bad cod...
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 testHWRuleEx1() { // From // http://www.archives.gov/research_room/genealogy/census/soundex.html: // Ashcraft is coded A-261 (A, 2 for the S, C ignored, 6 for the R, 1 // for the F). It is not coded A-226. Assert.assertEquals("A261", this.getStringEncode...
org.apache.commons.codec.language.SoundexTest::testHWRuleEx1
src/test/java/org/apache/commons/codec/language/SoundexTest.java
232
src/test/java/org/apache/commons/codec/language/SoundexTest.java
testHWRuleEx1
/* * 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 `testHWRuleEx1` for the issue `Codec-CODEC-199`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-199 // // ## Issue-Title: // Bug in HW rule in Soundex // // ## Issue-De...
232
/** * Consonants from the same code group separated by W or H are treated as one. */
15
222
src/test/java/org/apache/commons/codec/language/SoundexTest.java
src/test/java
```markdown ## Issue-ID: Codec-CODEC-199 ## Issue-Title: Bug in HW rule in Soundex ## Issue-Description: The Soundex algorithm says that if two characters that map to the same code are separated by H or W, the second one is not encoded. However, in the implementation (in Soundex.getMappingCode() line 191), a ch...
222
[ "org.apache.commons.codec.language.Soundex" ]
5f6f8bceffc1d4afee0c7559fcfa2296cf3ee3233158d3a916ab76b309e1feb0
@Test public void testHWRuleEx1()
// You are a professional Java test case writer, please create a test case named `testHWRuleEx1` for the issue `Codec-CODEC-199`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Codec-CODEC-199 // // ## Issue-Title: // Bug in HW rule in Soundex // // ## Issue-De...
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 testMapValueEquality() { assertXPathValue(context, "map/b != map/a", Boolean.TRUE); assertXPathValue(context, "map/a != map/b", Boolean.TRUE); assertXPathValue(context, "map/a != map/c", Boolean.FALSE); assertXPathValue(context, "map/a = map/b", Boolean.FALSE); as...
org.apache.commons.jxpath.ri.model.JXPath151Test::testMapValueEquality
src/test/org/apache/commons/jxpath/ri/model/JXPath151Test.java
49
src/test/org/apache/commons/jxpath/ri/model/JXPath151Test.java
testMapValueEquality
/* * 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 `testMapValueEquality` for the issue `JxPath-JXPATH-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-151 // // ## Issue-Title: // null handling is inconsistent // ...
49
21
41
src/test/org/apache/commons/jxpath/ri/model/JXPath151Test.java
src/test
```markdown ## Issue-ID: JxPath-JXPATH-151 ## Issue-Title: null handling is inconsistent ## Issue-Description: Comparing a vaule to null using unequals (!=) yields false! ``` Map<String, Integer> m = new HashMap<String, Integer>(); m.put("a", 1); m.put("b", null); m.put("c", 1);...
41
[ "org.apache.commons.jxpath.ri.model.beans.PropertyPointer" ]
6068a808bc8bf4a66653b9822cdc5c8d73fa455eedb7eea23c973535f04980d3
public void testMapValueEquality()
// You are a professional Java test case writer, please create a test case named `testMapValueEquality` for the issue `JxPath-JXPATH-151`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JxPath-JXPATH-151 // // ## Issue-Title: // null handling is inconsistent // ...
JxPath
/* * 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 shouldKnowIfObjectsAreEqual() throws Exception { int[] arr = new int[] {1, 2}; assertTrue(areEqual(arr, arr)); assertTrue(areEqual(new int[] {1, 2}, new int[] {1, 2})); assertTrue(areEqual(new Double[] {1.0}, new Double[] {1.0})); assertTrue(areEqual(new...
org.mockito.internal.matchers.EqualityTest::shouldKnowIfObjectsAreEqual
test/org/mockito/internal/matchers/EqualityTest.java
28
test/org/mockito/internal/matchers/EqualityTest.java
shouldKnowIfObjectsAreEqual
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.matchers; import org.mockitoutil.TestBase; import org.junit.Test; import static org.mockito.internal.matchers.Equality.areEqual; public class EqualityTest extends TestBa...
// You are a professional Java test case writer, please create a test case named `shouldKnowIfObjectsAreEqual` for the issue `Mockito-484`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-484 // // ## Issue-Title: // Can not Return deep stubs from generic...
28
22
12
test/org/mockito/internal/matchers/EqualityTest.java
test
```markdown ## Issue-ID: Mockito-484 ## Issue-Title: Can not Return deep stubs from generic method that returns generic type ## Issue-Description: Hey, if I try to mock a generic method which a generic returntype, where the returntype is derived from the generic type of the method using deep stubs I get a `ClassC...
12
[ "org.mockito.internal.matchers.Equality" ]
6135dddb4e2ee780c9e8f243d64cedf2df573fc95a961e8e78f02e3202413b44
@Test public void shouldKnowIfObjectsAreEqual() throws Exception
// You are a professional Java test case writer, please create a test case named `shouldKnowIfObjectsAreEqual` for the issue `Mockito-484`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-484 // // ## Issue-Title: // Can not Return deep stubs from generic...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.matchers; import org.mockitoutil.TestBase; import org.junit.Test; import static org.mockito.internal.matchers.Equality.areEqual; public class EqualityTest extends TestBa...
@Test public void pure_mockito_should_not_depend_JUnit() throws Exception { ClassLoader classLoader_without_JUnit = ClassLoaders.excludingClassLoader() .withCodeSourceUrlOf( Mockito.class, Matcher.class, Enhancer.cla...
org.mockitointegration.NoJUnitDependenciesTest::pure_mockito_should_not_depend_JUnit
test/org/mockitointegration/NoJUnitDependenciesTest.java
29
test/org/mockitointegration/NoJUnitDependenciesTest.java
pure_mockito_should_not_depend_JUnit
package org.mockitointegration; import org.hamcrest.Matcher; import org.junit.Test; import org.mockito.Mockito; import org.mockito.cglib.proxy.Enhancer; import org.mockitoutil.ClassLoaders; import org.objenesis.Objenesis; import java.util.Set; public class NoJUnitDependenciesTest { @Test public void pure_moc...
// You are a professional Java test case writer, please create a test case named `pure_mockito_should_not_depend_JUnit` for the issue `Mockito-152`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-152 // // ## Issue-Title: // Mockito 1.10.x timeout verifi...
29
5
12
test/org/mockitointegration/NoJUnitDependenciesTest.java
test
```markdown ## Issue-ID: Mockito-152 ## Issue-Title: Mockito 1.10.x timeout verification needs JUnit classes (VerifyError, NoClassDefFoundError) ## Issue-Description: If JUnit is not on the classpath and mockito is version 1.10.x (as of now 1.10.1 up to 1.10.19) and the code is using the timeout verification which ...
12
[ "org.mockito.internal.verification.VerificationOverTimeImpl" ]
615026ee187d94a702d0a18aab7053b758a71ec4cfde6ec016ddc02c3a1e42eb
@Test public void pure_mockito_should_not_depend_JUnit() throws Exception
// You are a professional Java test case writer, please create a test case named `pure_mockito_should_not_depend_JUnit` for the issue `Mockito-152`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-152 // // ## Issue-Title: // Mockito 1.10.x timeout verifi...
Mockito
package org.mockitointegration; import org.hamcrest.Matcher; import org.junit.Test; import org.mockito.Mockito; import org.mockito.cglib.proxy.Enhancer; import org.mockitoutil.ClassLoaders; import org.objenesis.Objenesis; import java.util.Set; public class NoJUnitDependenciesTest { @Test public void pure_moc...
public void testSafeMultiplyLongInt() { assertEquals(0L, FieldUtils.safeMultiply(0L, 0)); assertEquals(1L, FieldUtils.safeMultiply(1L, 1)); assertEquals(3L, FieldUtils.safeMultiply(1L, 3)); assertEquals(3L, FieldUtils.safeMultiply(3L, 1)); assertEquals(6L, F...
org.joda.time.field.TestFieldUtils::testSafeMultiplyLongInt
src/test/java/org/joda/time/field/TestFieldUtils.java
281
src/test/java/org/joda/time/field/TestFieldUtils.java
testSafeMultiplyLongInt
/* * 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 `testSafeMultiplyLongInt` for the issue `Time-147`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-147 // // ## Issue-Title: // #147 possibly a bug in org.joda.time.field.Field...
281
//-----------------------------------------------------------------------
15
240
src/test/java/org/joda/time/field/TestFieldUtils.java
src/test/java
```markdown ## Issue-ID: Time-147 ## Issue-Title: #147 possibly a bug in org.joda.time.field.FieldUtils.safeMultipl ## Issue-Description: It seems to me that as currently written in joda-time-2.1.jar org.joda.time.field.FieldUtils.safeMultiply(long val1, int scalar) doesn't detect the overflow if the long...
240
[ "org.joda.time.field.FieldUtils" ]
619e3bc29683e00428e4160723540b7b5f8e62e400dc70cbdae516511a689a71
public void testSafeMultiplyLongInt()
// You are a professional Java test case writer, please create a test case named `testSafeMultiplyLongInt` for the issue `Time-147`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-147 // // ## Issue-Title: // #147 possibly a bug in org.joda.time.field.Field...
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 testParseInto_monthOnly_baseStartYear() { DateTimeFormatter f = DateTimeFormat.forPattern("M").withLocale(Locale.UK); MutableDateTime result = new MutableDateTime(2004, 1, 1, 12, 20, 30, 0, TOKYO); assertEquals(1, f.parseInto(result, "5", 0)); assertEquals(new MutableDate...
org.joda.time.format.TestDateTimeFormatter::testParseInto_monthOnly_baseStartYear
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
877
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
testParseInto_monthOnly_baseStartYear
/* * 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 `testParseInto_monthOnly_baseStartYear` for the issue `Time-148`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-148 // // ## Issue-Title: // #148 DateTimeFormatter.parseInto b...
877
16
872
src/test/java/org/joda/time/format/TestDateTimeFormatter.java
src/test/java
```markdown ## Issue-ID: Time-148 ## Issue-Title: #148 DateTimeFormatter.parseInto broken when no year in format ## Issue-Description: In Joda Time 2.0, the default year was set to 2000 so that Feb 29 could be parsed correctly. However, parseInto now overwrites the given instant's year with 2000 (or whatever iD...
872
[ "org.joda.time.format.DateTimeFormatter" ]
62ae19f27460693c8211fb2e37d570a47d4d16d4cd043edab190ec0b8338ff42
public void testParseInto_monthOnly_baseStartYear()
// You are a professional Java test case writer, please create a test case named `testParseInto_monthOnly_baseStartYear` for the issue `Time-148`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-148 // // ## Issue-Title: // #148 DateTimeFormatter.parseInto b...
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...
@Test public void testCOMPRESS178() throws Exception { final File input = getFile("COMPRESS-178.tar"); final InputStream is = new FileInputStream(input); final ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream("tar", is); try { in.getNextEntr...
org.apache.commons.compress.archivers.TarTestCase::testCOMPRESS178
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
330
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
testCOMPRESS178
/* * 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 `testCOMPRESS178` for the issue `Compress-COMPRESS-301`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-301 // // ## Issue-Title: // Illegal argument exception whe...
330
31
317
src/test/java/org/apache/commons/compress/archivers/TarTestCase.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-301 ## Issue-Title: Illegal argument exception when extracting .tgz file ## Issue-Description: When attempting to unpack a .tgz file, I am receiving the illegal argument exception: java.lang.IllegalArgumentException: Invalid byte 0 at offset 5 in '05412 {NUL}11' len=8. ...
317
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
62eb4ad67cf40c260b841eff10c544998bd0f372acc47c4544ee709d8c2fc9f7
@Test public void testCOMPRESS178() throws Exception
// You are a professional Java test case writer, please create a test case named `testCOMPRESS178` for the issue `Compress-COMPRESS-301`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-301 // // ## Issue-Title: // Illegal argument exception whe...
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 ...
@Test public void testListAllFilesWithNestedArchive() throws Exception { final File input = getFile("OSX_ArchiveWithNestedArchive.zip"); final List<String> results = new ArrayList<>(); final List<ZipException> expectedExceptions = new ArrayList<>(); final InputStream is = new F...
org.apache.commons.compress.archivers.ZipTestCase::testListAllFilesWithNestedArchive
src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
281
src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
testListAllFilesWithNestedArchive
/* * 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 `testListAllFilesWithNestedArchive` for the issue `Compress-COMPRESS-367`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-367 // // ## Issue-Title: // ZipArchiveIn...
281
/** * Checks if all entries from a nested archive can be read. * The archive: OSX_ArchiveWithNestedArchive.zip contains: * NestedArchiv.zip and test.xml3. * * The nested archive: NestedArchive.zip contains test1.xml and test2.xml * * @throws Exception */
41
241
src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-367 ## Issue-Title: ZipArchiveInputStream.getNextZipEntry() should differentiate between "invalid entry encountered" and "no more entries" ## Issue-Description: ZipArchiveInputStream.getNextZipEntry() currently returns null if an invalid entry is encountered. Thus, it's n...
241
[ "org.apache.commons.compress.archivers.zip.ZipArchiveInputStream" ]
63320fce95c80deea144efc3aed252d5dc944fc7026c049d2b9a2dd14d75a0c9
@Test public void testListAllFilesWithNestedArchive() throws Exception
// You are a professional Java test case writer, please create a test case named `testListAllFilesWithNestedArchive` for the issue `Compress-COMPRESS-367`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-367 // // ## Issue-Title: // ZipArchiveIn...
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 testMissingOptionsException() throws ParseException { Options options = new Options(); options.addOption(OptionBuilder.isRequired().create("f")); options.addOption(OptionBuilder.isRequired().create("x")); try { new PosixParser().parse(options, new String[0]); ...
org.apache.commons.cli.OptionsTest::testMissingOptionsException
src/test/org/apache/commons/cli/OptionsTest.java
117
src/test/org/apache/commons/cli/OptionsTest.java
testMissingOptionsException
/** * 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 `testMissingOptionsException` for the issue `Cli-CLI-149`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-149 // // ## Issue-Title: // MissingOptionException.getMessage() ch...
117
9
107
src/test/org/apache/commons/cli/OptionsTest.java
src/test
```markdown ## Issue-ID: Cli-CLI-149 ## Issue-Title: MissingOptionException.getMessage() changed from CLI 1.0 > 1.1 ## Issue-Description: The MissingOptionException.getMessage() string changed from CLI 1.0 > 1.1. CLI 1.0 was poorly formatted but readable: Missing required options: -format-source-properties ...
107
[ "org.apache.commons.cli.Parser" ]
635d5ffc9a82a1a0bdf2c26f83b31ce8bb20c1fcc1385f0b84e127aafc4ba4a9
public void testMissingOptionsException() throws ParseException
// You are a professional Java test case writer, please create a test case named `testMissingOptionsException` for the issue `Cli-CLI-149`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Cli-CLI-149 // // ## Issue-Title: // MissingOptionException.getMessage() ch...
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 aiffFilesAreNoTARs() throws Exception { InputStream is = null; try { is = new BufferedInputStream(new FileInputStream("src/test/resources/testAIFF.aif")); new ArchiveStreamFactory().createArchiveInputStream(is); fail("created an input stream ...
org.apache.commons.compress.archivers.ArchiveStreamFactoryTest::aiffFilesAreNoTARs
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
63
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
aiffFilesAreNoTARs
/* * 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 `aiffFilesAreNoTARs` for the issue `Compress-COMPRESS-191`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-191 // // ## Issue-Title: // Too relaxed tar detection i...
63
/** * see https://issues.apache.org/jira/browse/COMPRESS-191 */
16
49
src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-191 ## Issue-Title: Too relaxed tar detection in ArchiveStreamFactory ## Issue-Description: The relaxed tar detection logic added in [~~COMPRESS-117~~](https://issues.apache.org/jira/browse/COMPRESS-117 "Certain tar files not recognised by ArchiveStreamFactory") unfortuna...
49
[ "org.apache.commons.compress.archivers.ArchiveStreamFactory" ]
63e03dd51a098763e3f4c1353fb267403303047b35235da8ef7bad8df92dd695
@Test public void aiffFilesAreNoTARs() throws Exception
// You are a professional Java test case writer, please create a test case named `aiffFilesAreNoTARs` for the issue `Compress-COMPRESS-191`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-191 // // ## Issue-Title: // Too relaxed tar detection i...
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 ...
@Test(expected = NotPositiveDefiniteMatrixException.class) public void testMath274() throws MathException { new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(new double[][] { { 0.40434286, -0.09376327, 0.30328980, 0.04909388 }, {-0.09376327, 0.10400408, 0.071379...
org.apache.commons.math.linear.CholeskyDecompositionImplTest::testMath274
src/test/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
89
src/test/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
testMath274
/* * 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 `testMath274` for the issue `Math-MATH-274`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-274 // // ## Issue-Title: // testing for symmetric positive definite matrix in ...
89
86
80
src/test/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
src/test
```markdown ## Issue-ID: Math-MATH-274 ## Issue-Title: testing for symmetric positive definite matrix in CholeskyDecomposition ## Issue-Description: I used this matrix: double[][] cv = { {0.40434286, 0.09376327, 0.30328980, 0.04909388} , {0.09376327, 0.10400408, 0.07137959, 0.04762857} , {0.30...
80
[ "org.apache.commons.math.linear.CholeskyDecompositionImpl" ]
63e151798d1601378514485c75045bcb5b13259258494f6d1376c15ffdc51d79
@Test(expected = NotPositiveDefiniteMatrixException.class) public void testMath274() throws MathException
// You are a professional Java test case writer, please create a test case named `testMath274` for the issue `Math-MATH-274`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-274 // // ## Issue-Title: // testing for symmetric positive definite matrix in ...
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 should_spy_inner_class() throws Exception { class WithMockAndSpy { @Spy private InnerStrength strength; @Mock private List<String> list; abstract class InnerStrength { private final String name; InnerStrength() { // ...
org.mockitousage.annotation.SpyAnnotationTest::should_spy_inner_class
test/org/mockitousage/annotation/SpyAnnotationTest.java
150
test/org/mockitousage/annotation/SpyAnnotationTest.java
should_spy_inner_class
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.annotation; import org.fest.assertions.Assertions; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mock; import org...
// You are a professional Java test case writer, please create a test case named `should_spy_inner_class` for the issue `Mockito-92`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-92 // // ## Issue-Title: // Allow convenient spying on abstract classes /...
150
20
122
test/org/mockitousage/annotation/SpyAnnotationTest.java
test
```markdown ## Issue-ID: Mockito-92 ## Issue-Title: Allow convenient spying on abstract classes ## Issue-Description: I posted this in GoogleCode and was asked to submit in github. Mockito is easy to use when the test needs to provide canned values for a certain method. But it gets harder when a canned value is...
122
[ "org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker" ]
64480f2dd9e55557c34ef4e7311fb676124dea3b0db219b15793d92ca01fa07d
@Test public void should_spy_inner_class() throws Exception
// You are a professional Java test case writer, please create a test case named `should_spy_inner_class` for the issue `Mockito-92`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Mockito-92 // // ## Issue-Title: // Allow convenient spying on abstract classes /...
Mockito
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.annotation; import org.fest.assertions.Assertions; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mock; import org...
public void testLang300() { NumberUtils.createNumber("-1l"); NumberUtils.createNumber("01l"); NumberUtils.createNumber("1l"); }
org.apache.commons.lang.math.NumberUtilsTest::testLang300
src/test/org/apache/commons/lang/math/NumberUtilsTest.java
1,371
src/test/org/apache/commons/lang/math/NumberUtilsTest.java
testLang300
/* * 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 `testLang300` for the issue `Lang-LANG-300`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-300 // // ## Issue-Title: // NumberUtils.createNumber throws NumberFormatExcept...
1,371
58
1,367
src/test/org/apache/commons/lang/math/NumberUtilsTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-300 ## Issue-Title: NumberUtils.createNumber throws NumberFormatException for one digit long ## Issue-Description: NumberUtils.createNumber throws a NumberFormatException when parsing "1l", "2l" .. etc... It works fine if you try to parse "01l" or "02l". The condition isDigits(...
1,367
[ "org.apache.commons.lang.math.NumberUtils" ]
64901e2907988ea67a61ff13490d286fd4ef3f677a32f1326760b9aa6c69ca1a
public void testLang300()
// You are a professional Java test case writer, please create a test case named `testLang300` for the issue `Lang-LANG-300`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-300 // // ## Issue-Title: // NumberUtils.createNumber throws NumberFormatExcept...
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 testCompress197() throws Exception { TarArchiveInputStream tar = getTestStream("/COMPRESS-197.tar"); try { TarArchiveEntry entry = tar.getNextTarEntry(); while (entry != null) { entry = tar.getNextTarEntry(); } } catch...
org.apache.commons.compress.archivers.tar.TarArchiveInputStreamTest::testCompress197
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
137
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
testCompress197
/* * 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 `testCompress197` for the issue `Compress-COMPRESS-197`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-197 // // ## Issue-Title: // Tar file for Android backup ca...
137
17
124
src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-197 ## Issue-Title: Tar file for Android backup cannot be read ## Issue-Description: Attached tar file was generated by some kind of backup tool on Android. Normal tar utilities seem to handle it fine, but Commons Compress doesn't. ``` java.lang.IllegalArgumentExcepti...
124
[ "org.apache.commons.compress.archivers.tar.TarUtils" ]
64a62aac9d236dd040053cfee153fca20409adfb4829044f2aaef09517ea8129
@Test public void testCompress197() throws Exception
// You are a professional Java test case writer, please create a test case named `testCompress197` for the issue `Compress-COMPRESS-197`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-197 // // ## Issue-Title: // Tar file for Android backup ca...
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 testLang315() { StopWatch watch = new StopWatch(); watch.start(); try {Thread.sleep(200);} catch (InterruptedException ex) {} watch.suspend(); long suspendTime = watch.getTime(); try {Thread.sleep(200);} catch (InterruptedException ex) {} w...
org.apache.commons.lang.time.StopWatchTest::testLang315
src/test/org/apache/commons/lang/time/StopWatchTest.java
120
src/test/org/apache/commons/lang/time/StopWatchTest.java
testLang315
/* * 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 `testLang315` for the issue `Lang-LANG-315`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-315 // // ## Issue-Title: // StopWatch: suspend() acts as split(), if followed ...
120
55
110
src/test/org/apache/commons/lang/time/StopWatchTest.java
src/test
```markdown ## Issue-ID: Lang-LANG-315 ## Issue-Title: StopWatch: suspend() acts as split(), if followed by stop() ## Issue-Description: In my opinion, it is a bug that suspend() acts as split(), if followed by stop(); see below: StopWatch sw = new StopWatch(); sw.start(); Thread.sleep(1000); sw.susp...
110
[ "org.apache.commons.lang.time.StopWatch" ]
6525ebf8bd2a2a51a34d04923ab6f7c884be8447f8faad3efc6e236cb71949ef
public void testLang315()
// You are a professional Java test case writer, please create a test case named `testLang315` for the issue `Lang-LANG-315`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Lang-LANG-315 // // ## Issue-Title: // StopWatch: suspend() acts as split(), if followed ...
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 testRead7ZipMultiVolumeArchiveForStream() throws IOException, URISyntaxException { URL zip = getClass().getResource("/apache-maven-2.2.1.zip.001"); FileInputStream archive = new FileInputStream( new File(new URI(zip.toString()))); ZipArchiveInputStream zi = null; try { zi = new ZipArch...
org.apache.commons.compress.archivers.zip.Maven221MultiVolumeTest::testRead7ZipMultiVolumeArchiveForStream
src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
115
src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
testRead7ZipMultiVolumeArchiveForStream
/* * 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 `testRead7ZipMultiVolumeArchiveForStream` for the issue `Compress-COMPRESS-87`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-87 // // ## Issue-Title: // ZipArchi...
115
5
68
src/test/java/org/apache/commons/compress/archivers/zip/Maven221MultiVolumeTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-87 ## Issue-Title: ZipArchiveInputStream doesn't report the end of a truncated archive ## Issue-Description: If a Zip archive is truncated, (e.g. because it is the first volume in a multi-volume archive) the ZipArchiveInputStream.read() method will not detect that fact. A...
68
[ "org.apache.commons.compress.archivers.zip.ZipArchiveInputStream" ]
65af9a4eb58087e10916f21293938615fdd2bda78e1942b99969605d51537726
public void testRead7ZipMultiVolumeArchiveForStream() throws IOException, URISyntaxException
// You are a professional Java test case writer, please create a test case named `testRead7ZipMultiVolumeArchiveForStream` for the issue `Compress-COMPRESS-87`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-87 // // ## Issue-Title: // ZipArchi...
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 testISO8601MissingSeconds() throws Exception { String inputStr; Date inputDate; Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); inputStr = "1997-07-16T19:20+01:00"; inputDate = MAPPER.readValue(quote(inputStr), java.util.Date.class); ...
com.fasterxml.jackson.databind.deser.TestDateDeserialization::testISO8601MissingSeconds
src/test/java/com/fasterxml/jackson/databind/deser/TestDateDeserialization.java
200
src/test/java/com/fasterxml/jackson/databind/deser/TestDateDeserialization.java
testISO8601MissingSeconds
package com.fasterxml.jackson.databind.deser; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.exc.InvalidFormatException; public class TestDateDeseria...
// You are a professional Java test case writer, please create a test case named `testISO8601MissingSeconds` for the issue `JacksonDatabind-570`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-570 // // ## Issue-Title: // Add Support for Parsing ...
200
6
185
src/test/java/com/fasterxml/jackson/databind/deser/TestDateDeserialization.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-570 ## Issue-Title: Add Support for Parsing All Compliant ISO-8601 Date Formats ## Issue-Description: Some providers create JSON date stamps in ISO-8601 formats that cannot be parsed by the jackson-databind library. Here is a sampling of some valid formats that do not parse ...
185
[ "com.fasterxml.jackson.databind.util.StdDateFormat" ]
65cc4b118b832545c1bb1538870bae82309f1f791a052e8790fda82f82bf92e6
public void testISO8601MissingSeconds() throws Exception
// You are a professional Java test case writer, please create a test case named `testISO8601MissingSeconds` for the issue `JacksonDatabind-570`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-570 // // ## Issue-Title: // Add Support for Parsing ...
JacksonDatabind
package com.fasterxml.jackson.databind.deser; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.exc.InvalidFormatException; public class TestDateDeseria...
@Test public void testReciprocalZero() { Assert.assertEquals(Complex.ZERO.reciprocal(), Complex.INF); }
org.apache.commons.math3.complex.ComplexTest::testReciprocalZero
src/test/java/org/apache/commons/math3/complex/ComplexTest.java
334
src/test/java/org/apache/commons/math3/complex/ComplexTest.java
testReciprocalZero
/* * 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 `testReciprocalZero` for the issue `Math-MATH-934`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-934 // // ## Issue-Title: // Complex.ZERO.reciprocal() returns NaN but s...
334
5
331
src/test/java/org/apache/commons/math3/complex/ComplexTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-934 ## Issue-Title: Complex.ZERO.reciprocal() returns NaN but should return INF. ## Issue-Description: Complex.ZERO.reciprocal() returns NaN but should return INF. Class: org.apache.commons.math3.complex.Complex; Method: reciprocal() @version $Id: Complex.java 1416643 201...
331
[ "org.apache.commons.math3.complex.Complex" ]
67ed68038737803c5cdb9706d5f614e75f06fe8eb675ac0f4e5a1fc60d648e8c
@Test public void testReciprocalZero()
// You are a professional Java test case writer, please create a test case named `testReciprocalZero` for the issue `Math-MATH-934`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-934 // // ## Issue-Title: // Complex.ZERO.reciprocal() returns NaN but s...
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 testExternalIssue1053() { testSame( "var u; function f() { u = Random(); var x = u; f(); alert(x===u)}"); }
com.google.javascript.jscomp.InlineVariablesTest::testExternalIssue1053
test/com/google/javascript/jscomp/InlineVariablesTest.java
1,070
test/com/google/javascript/jscomp/InlineVariablesTest.java
testExternalIssue1053
/* * 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 `testExternalIssue1053` for the issue `Closure-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1053 // // ## Issue-Title: // Overzealous optimization confuses variable...
1,070
121
1,067
test/com/google/javascript/jscomp/InlineVariablesTest.java
test
```markdown ## Issue-ID: Closure-1053 ## Issue-Title: Overzealous optimization confuses variables ## Issue-Description: The following code: // ==ClosureCompiler== // @compilation\_level ADVANCED\_OPTIMIZATIONS // ==/ClosureCompiler== var uid; function reset() { uid = Math.random(); } function doSt...
1,067
[ "com.google.javascript.jscomp.InlineVariables" ]
6800127fc4e69929b8a51694a75d7bc9d712a75b01886b8f554c11b166efce27
public void testExternalIssue1053()
// You are a professional Java test case writer, please create a test case named `testExternalIssue1053` for the issue `Closure-1053`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-1053 // // ## Issue-Title: // Overzealous optimization confuses variable...
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 testLeapYearRulesConstruction() { // 1500 not leap in Gregorian, but is leap in Julian DateMidnight dt = new DateMidnight(1500, 2, 29, GJChronology.getInstanceUTC()); assertEquals(dt.getYear(), 1500); assertEquals(dt.getMonthOfYear(), 2); assertEquals(dt.getDayOfM...
org.joda.time.chrono.TestGJChronology::testLeapYearRulesConstruction
src/test/java/org/joda/time/chrono/TestGJChronology.java
499
src/test/java/org/joda/time/chrono/TestGJChronology.java
testLeapYearRulesConstruction
/* * 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 `testLeapYearRulesConstruction` for the issue `Time-130`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-130 // // ## Issue-Title: // #130 GJChronology rejects valid Julian dat...
499
18
493
src/test/java/org/joda/time/chrono/TestGJChronology.java
src/test/java
```markdown ## Issue-ID: Time-130 ## Issue-Title: #130 GJChronology rejects valid Julian dates ## Issue-Description: Example: DateTime jdt = new DateTime(1500, 2, 29, 0, 0, 0, 0, JulianChronology.getInstanceUTC()); // Valid. DateTime gjdt = new DateTime(1500, 2, 29, 0, 0, 0, 0, GJChronology.getInstanceUTC(...
493
[ "org.joda.time.chrono.GJChronology" ]
6848cf447fa392de16db9dbe5089ed657df74d3ec2bf27c72bc27ecae81dbcf1
public void testLeapYearRulesConstruction()
// You are a professional Java test case writer, please create a test case named `testLeapYearRulesConstruction` for the issue `Time-130`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Time-130 // // ## Issue-Title: // #130 GJChronology rejects valid Julian dat...
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...
@Test public void testMath835() { final int numer = Integer.MAX_VALUE / 99; final int denom = 1; final double percentage = 100 * ((double) numer) / denom; final Fraction frac = new Fraction(numer, denom); // With the implementation that preceded the fix suggested in MATH-...
org.apache.commons.math3.fraction.FractionTest::testMath835
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
253
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
testMath835
/* * 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 `testMath835` for the issue `Math-MATH-835`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-835 // // ## Issue-Title: // Fraction percentageValue rare overflow // // ## I...
253
27
244
src/test/java/org/apache/commons/math3/fraction/FractionTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-835 ## Issue-Title: Fraction percentageValue rare overflow ## Issue-Description: The percentageValue() method of the Fraction class works by first multiplying the Fraction by 100, then converting the Fraction to a double. This causes overflows when the numerator is greater than I...
244
[ "org.apache.commons.math3.fraction.Fraction" ]
6876a313dfb88c3640a4aa6d3933d53308768bfd8117cd65ae85021ec9ad507d
@Test public void testMath835()
// You are a professional Java test case writer, please create a test case named `testMath835` for the issue `Math-MATH-835`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-835 // // ## Issue-Title: // Fraction percentageValue rare overflow // // ## I...
Math
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
public void testSimpleFunctionCall() { test("var a = String(23)", "var a = '' + 23"); test("var a = String('hello')", "var a = '' + 'hello'"); testSame("var a = String('hello', bar());"); testSame("var a = String({valueOf: function() { return 1; }});"); }
com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest::testSimpleFunctionCall
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
1,032
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
testSimpleFunctionCall
/* * 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 `testSimpleFunctionCall` for the issue `Closure-759`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-759 // // ## Issue-Title: // String conversion optimization is incorrect...
1,032
20
1,027
test/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntaxTest.java
test
```markdown ## Issue-ID: Closure-759 ## Issue-Title: String conversion optimization is incorrect ## Issue-Description: **What steps will reproduce the problem?** var f = { valueOf: function() { return undefined; } } String(f) **What is the expected output? What do you see instead?** Expected output: "[ob...
1,027
[ "com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntax" ]
697b2d1985d3a2a554c9dffda676578cb48c35e486d26e27a4122a7ec364f188
public void testSimpleFunctionCall()
// You are a professional Java test case writer, please create a test case named `testSimpleFunctionCall` for the issue `Closure-759`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Closure-759 // // ## Issue-Title: // String conversion optimization is incorrect...
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 testDateDefaultShape() throws Exception { ObjectMapper mapper = new ObjectMapper(); // No @JsonFormat => default to user config mapper.enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); String json = mapper.writeValueAsString(new DateAsDefaultBean(0L)); a...
com.fasterxml.jackson.databind.ser.DateSerializationTest::testDateDefaultShape
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
307
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
testDateDefaultShape
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.text.*; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; public class DateSerializationTest extends BaseMapTest { static class TimeZoneBean { private TimeZone tz; ...
// You are a professional Java test case writer, please create a test case named `testDateDefaultShape` for the issue `JacksonDatabind-1155`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1155 // // ## Issue-Title: // Fix for #1154 // // ## Iss...
307
/** * Test to ensure that the default shape is correctly inferred as string or numeric, * when this shape is not explicitly set with a <code>@JsonFormat</code> annotation */
45
265
src/test/java/com/fasterxml/jackson/databind/ser/DateSerializationTest.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1155 ## Issue-Title: Fix for #1154 ## Issue-Description: Looks pretty good, but would it be possible to have a unit test that would fail before fix, pass after? Would be great to have something to guard against regression. I may want to change the logic a little bit, howev...
265
[ "com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase" ]
698c64a37dd383f5c7f03008373bed75b791b82b6a79724d3485b9bf90a3da32
public void testDateDefaultShape() throws Exception
// You are a professional Java test case writer, please create a test case named `testDateDefaultShape` for the issue `JacksonDatabind-1155`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1155 // // ## Issue-Title: // Fix for #1154 // // ## Iss...
JacksonDatabind
package com.fasterxml.jackson.databind.ser; import java.io.*; import java.text.*; import java.util.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.*; public class DateSerializationTest extends BaseMapTest { static class TimeZoneBean { private TimeZone tz; ...
public void testParseProperInvalidMinus() { String source = "2 -2 / 3"; try { Fraction c = properFormat.parse(source); fail("invalid minus in improper fraction."); } catch (ParseException ex) { // expected } source = "2 2 / -3"; try...
org.apache.commons.math.fraction.FractionFormatTest::testParseProperInvalidMinus
src/test/org/apache/commons/math/fraction/FractionFormatTest.java
246
src/test/org/apache/commons/math/fraction/FractionFormatTest.java
testParseProperInvalidMinus
/* * Copyright 2004 The Apache Software Foundation. * * 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 appl...
// You are a professional Java test case writer, please create a test case named `testParseProperInvalidMinus` for the issue `Math-MATH-60`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-60 // // ## Issue-Title: // [math] Function math.fraction.Proper...
246
106
231
src/test/org/apache/commons/math/fraction/FractionFormatTest.java
src/test
```markdown ## Issue-ID: Math-MATH-60 ## Issue-Title: [math] Function math.fraction.ProperFractionFormat.parse(String, ParsePosition) return illogical result ## Issue-Description: Hello, I find illogical returned result from function "Fraction parse(String source, ParsePostion pos)" (in class ProperFractionF...
231
[ "org.apache.commons.math.fraction.ProperFractionFormat" ]
699ba8d6e9d2f024c08acf89bde04104e04b4caf51696158da1dc06ebbceb0cc
public void testParseProperInvalidMinus()
// You are a professional Java test case writer, please create a test case named `testParseProperInvalidMinus` for the issue `Math-MATH-60`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-60 // // ## Issue-Title: // [math] Function math.fraction.Proper...
Math
/* * Copyright 2004 The Apache Software Foundation. * * 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 appl...
@Test public void handlesLTinScript() { // https://github.com/jhy/jsoup/issues/1139 String html = "<script> var a=\"<?\"; var b=\"?>\"; </script>"; Document doc = Jsoup.parse(html, "", Parser.xmlParser()); assertEquals("<script> var a=\"\n <!--?\"; var b=\"?-->\"; </script>", doc...
org.jsoup.parser.XmlTreeBuilderTest::handlesLTinScript
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
246
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
handlesLTinScript
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.internal.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; impo...
// You are a professional Java test case writer, please create a test case named `handlesLTinScript` for the issue `Jsoup-1139`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1139 // // ## Issue-Title: // Jsoup 1.11.3: IndexOutOfBoundsException // // ## ...
246
86
240
src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
src/test/java
```markdown ## Issue-ID: Jsoup-1139 ## Issue-Title: Jsoup 1.11.3: IndexOutOfBoundsException ## Issue-Description: Hi, I am using Jsoup 1.11.3. While trying to parse HTML content, I'm getting IndexOutOfBoundsException. I am using such Jsoup call as this is the only way to parse iframe content. Jsoup call: `Jso...
240
[ "org.jsoup.nodes.Comment" ]
69ef6fbd3fcee75d102474ad2c583956f03f2ad80209435eb2d74c5c8d8526f7
@Test public void handlesLTinScript()
// You are a professional Java test case writer, please create a test case named `handlesLTinScript` for the issue `Jsoup-1139`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Jsoup-1139 // // ## Issue-Title: // Jsoup 1.11.3: IndexOutOfBoundsException // // ## ...
Jsoup
package org.jsoup.parser; import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.internal.StringUtil; import org.jsoup.nodes.CDataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.nodes.XmlDeclaration; impo...
public void testUnknownTypeIDRecovery() throws Exception { ObjectReader reader = MAPPER.readerFor(CallRecord.class).without( DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); String json = aposToQuotes("{'version':0.0,'application':'123'," +"'item':{'type':'xevent'...
com.fasterxml.jackson.databind.jsontype.TestPolymorphicWithDefaultImpl::testUnknownTypeIDRecovery
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
230
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
testUnknownTypeIDRecovery
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.Obj...
// You are a professional Java test case writer, please create a test case named `testUnknownTypeIDRecovery` for the issue `JacksonDatabind-1108`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1108 // // ## Issue-Title: // Jackson not continue t...
230
39
214
src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java
src/test/java
```markdown ## Issue-ID: JacksonDatabind-1108 ## Issue-Title: Jackson not continue to parse after DeserializationFeature.FAIL_ON_INVALID_SUBTYPE error ## Issue-Description: After FAIL\_ON\_INVALID\_SUBTYPE error, jackson should continue to parse, but seems jackson doesn't. The output: ``` CallRecord [version=0...
214
[ "com.fasterxml.jackson.databind.deser.std.NullifyingDeserializer" ]
6a39d7f3d99b9dce69511831d4ae90cfd5aba865ad3cafeba892620e943f2cc2
public void testUnknownTypeIDRecovery() throws Exception
// You are a professional Java test case writer, please create a test case named `testUnknownTypeIDRecovery` for the issue `JacksonDatabind-1108`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: JacksonDatabind-1108 // // ## Issue-Title: // Jackson not continue t...
JacksonDatabind
package com.fasterxml.jackson.databind.jsontype; import java.util.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.BaseMapTest; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.Obj...
@Test public void testPerformClusterAnalysisDegenerate() { KMeansPlusPlusClusterer<EuclideanIntegerPoint> transformer = new KMeansPlusPlusClusterer<EuclideanIntegerPoint>( new Random(1746432956321l)); EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] { ...
org.apache.commons.math.stat.clustering.KMeansPlusPlusClustererTest::testPerformClusterAnalysisDegenerate
src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
116
src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
testPerformClusterAnalysisDegenerate
/* * 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 `testPerformClusterAnalysisDegenerate` for the issue `Math-MATH-305`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-305 // // ## Issue-Title: // NPE in KMeansPlusPlusClu...
116
/** * JIRA: MATH-305 * * Two points, one cluster, one iteration */
79
101
src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
src/test/java
```markdown ## Issue-ID: Math-MATH-305 ## Issue-Title: NPE in KMeansPlusPlusClusterer unittest ## Issue-Description: When running this unittest, I am facing this NPE: java.lang.NullPointerException at org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer.assignPointsToClusters(KMeansPlusPlusClust...
101
[ "org.apache.commons.math.util.MathUtils" ]
6a52ad6338a734ba0ddd0cfbc215e4d5f81e6f976f51ea32cf5ef28c71d22d79
@Test public void testPerformClusterAnalysisDegenerate()
// You are a professional Java test case writer, please create a test case named `testPerformClusterAnalysisDegenerate` for the issue `Math-MATH-305`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Math-MATH-305 // // ## Issue-Title: // NPE in KMeansPlusPlusClu...
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 testReadWinZipArchive() throws IOException, URISyntaxException { URL zip = getClass().getResource("/utf8-winzip-test.zip"); File archive = new File(new URI(zip.toString())); ZipFile zf = null; try { zf = new ZipFile(archive, null, true); assertCanR...
org.apache.commons.compress.archivers.zip.UTF8ZipFilesTest::testReadWinZipArchive
src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
137
src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
testReadWinZipArchive
/* * 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 `testReadWinZipArchive` for the issue `Compress-COMPRESS-164`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-164 // // ## Issue-Title: // Cannot Read Winzip Archi...
137
/* * WinZIP created archive, uses Unicode Extra Fields but only in * the central directory. */
10
125
src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-164 ## Issue-Title: Cannot Read Winzip Archives With Unicode Extra Fields ## Issue-Description: I have a zip file created with WinZip containing Unicode extra fields. Upon attempting to extract it with org.apache.commons.compress.archivers.zip.ZipFile, ZipFile.getInputStr...
125
[ "org.apache.commons.compress.archivers.zip.ZipFile" ]
6a76ff01253aecbc60ee6aa5757838b163bc15b9f8c1142f2b7919644aff19cd
public void testReadWinZipArchive() throws IOException, URISyntaxException
// You are a professional Java test case writer, please create a test case named `testReadWinZipArchive` for the issue `Compress-COMPRESS-164`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-164 // // ## Issue-Title: // Cannot Read Winzip Archi...
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...
@Test(expected = NullPointerException.class) public void testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne() { ChecksumCalculatingInputStream checksumCalculatingInputStream = new ChecksumCalculatingInputStream(null,null); }
org.apache.commons.compress.utils.ChecksumCalculatingInputStreamTest::testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne
src/test/java/org/apache/commons/compress/utils/ChecksumCalculatingInputStreamTest.java
115
src/test/java/org/apache/commons/compress/utils/ChecksumCalculatingInputStreamTest.java
testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne
/* * 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 `testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne` for the issue `Compress-COMPRESS-412`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-412...
115
44
109
src/test/java/org/apache/commons/compress/utils/ChecksumCalculatingInputStreamTest.java
src/test/java
```markdown ## Issue-ID: Compress-COMPRESS-412 ## Issue-Title: NullPointerException defect in ChecksumCalculatingInputStream#getValue() ## Issue-Description: NullPointerException defect in ChecksumCalculatingInputStream#getValue() detected as stated in pull request 33: <https://github.com/apache/commons-compress/p...
109
[ "org.apache.commons.compress.utils.ChecksumCalculatingInputStream" ]
6be01a28b050ffc89a13f5690e46799a2088bedfd818e65701752bc400cea996
@Test(expected = NullPointerException.class) public void testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne()
// You are a professional Java test case writer, please create a test case named `testClassInstantiationWithParameterBeingNullThrowsNullPointerExceptionOne` for the issue `Compress-COMPRESS-412`, utilizing the provided issue report information and the following function signature. // ## Issue-ID: Compress-COMPRESS-412...
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 ...