id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
23062279_525
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java", "identifier": "ABNFTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsLF ()\n {\n assertTrue (ABNF.isLF ('\\n'));\n assertFalse (ABNF.isLF (0));\n }", "class_method_signature": "ABNFTest.testIsLF()", "constructor": false, "full_signature": "@Test public void testIsLF()", "identifier": "testIsLF", "invocations": [ "assertTrue",...
{ "fields": [ { "declarator": "CHECK_RANGE_MIN_INCL = 0x00", "modifier": "public static final", "original_string": "public static final int CHECK_RANGE_MIN_INCL = 0x00;", "type": "int", "var_name": "CHECK_RANGE_MIN_INCL" }, { "declarator": "CHECK_RANGE_MAX_INCL = 0x7f",...
{ "body": "public static boolean isLF (final int nCP)\n {\n return _isBitSet (nCP, BIT_LF);\n }", "class_method_signature": "ABNF.isLF(final int nCP)", "constructor": false, "full_signature": "public static boolean isLF(final int nCP)", "identifier": "isLF", "invocations": [ "_isBitSet" ], "mod...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_175
{ "fields": [ { "declarator": "m_aRule = new DebugModeTestRule ()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TestRule m_aRule = new DebugModeTestRule ();", "type": "TestRule", "var_name": "m_aRule" } ], "file": "ph-xml/src/test/java/com/h...
{ "body": "@Test\n public void testIsEqualContent ()\n {\n final IMicroElement eRoot = new MicroElement (\"root\");\n final IMicroElement e1 = eRoot.appendElement (\"c1a\");\n e1.appendElement (\"c2\");\n eRoot.appendElement (\"c1b\");\n // No children at all\n assertFalse (new MicroElement (\"roo...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (MicroElement.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MicroElement.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public boolean isEqualContent (@Nullable final IMicroNode o)\n {\n if (o == this)\n return true;\n if (!super.isEqualContent (o))\n return false;\n final MicroElement rhs = (MicroElement) o;\n return EqualsHelper.equals (m_sNamespaceURI, rhs.m_sNamespaceURI) &&\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_460
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMinFloat ()\n {\n CommonsAssert.assertEquals (5, MathHelper.getMinFloat (5));\n CommonsAssert.assertEquals (5, MathHelper.getMinFloat (5, 5, 5, 5));\n CommonsAssert.assertEquals (1, MathHelper.getMinFloat (5, 3, 2, 1));\n CommonsAssert.assertEquals (3, MathHelper.ge...
{ "fields": [ { "declarator": "LONG_HIGH_BITS = 0xFFFFFFFF80000000L", "modifier": "private static final", "original_string": "private static final long LONG_HIGH_BITS = 0xFFFFFFFF80000000L;", "type": "long", "var_name": "LONG_HIGH_BITS" }, { "declarator": "s_aInstance =...
{ "body": "public static double getMinFloat (final float fValue, @Nonnull final float... aValues)\n {\n float ret = fValue;\n for (final float f : aValues)\n ret = Math.min (ret, f);\n return ret;\n }", "class_method_signature": "MathHelper.getMinFloat(final float fValue, @Nonnull final float... aVa...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_319
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/WrappedOutputStreamTest.java", "identifier": "WrappedOutputStreamTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings (\"resource\")\n @Test\n public void testAll () throws IOException\n {\n final NonBlockingByteArrayOutputStream baos = new NonBlockingByteArrayOutputStream ();\n try (final WrappedOutputStream ws = new WrappedOutputStream (baos))\n {\n ws.write ('a');\n ws.write (\"b...
{ "fields": [], "file": "ph-commons/src/main/java/com/helger/commons/io/stream/WrappedOutputStream.java", "identifier": "WrappedOutputStream", "interfaces": "", "methods": [ { "class_method_signature": "WrappedOutputStream.WrappedOutputStream(@Nonnull final OutputStream aWrappedOS)", "construc...
{ "body": "@Override\n public void write (@Nonnull final byte [] aBuf, final int nOfs, final int nLen) throws IOException\n {\n ValueEnforcer.isArrayOfsLen (aBuf, nOfs, nLen);\n out.write (aBuf, nOfs, nLen);\n }", "class_method_signature": "WrappedOutputStream.write(@Nonnull final byte [] aBuf, final int n...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_45
{ "fields": [], "file": "ph-tree/src/test/java/com/helger/tree/xml/TreeXMLConverterTest.java", "identifier": "TreeXMLConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTree ()\n {\n final DefaultTree <MockHasName> aTree = new DefaultTree <> ();\n aTree.getRootItem ().createChildItem (new MockHasName (\"name2\"));\n aTree.getRootItem ().createChildItem (new MockHasName (\"name1\"));\n\n final IMicroElement aElement = TreeXMLConverter....
{ "fields": [ { "declarator": "ELEMENT_ROOT = \"root\"", "modifier": "public static final", "original_string": "public static final String ELEMENT_ROOT = \"root\";", "type": "String", "var_name": "ELEMENT_ROOT" }, { "declarator": "ELEMENT_ITEM = \"item\"", "modifi...
{ "body": "@Nonnull\n public static <DATATYPE, ITEMTYPE extends ITreeItem <DATATYPE, ITEMTYPE>> IMicroElement getTreeAsXML (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree,\n @Nonnull final Comparator <? super...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_749
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testIsAllWhitespace ()\n {\n assertTrue (StringHelper.isAllWhitespace (\" \"));\n assertTrue (StringHelper.isAllWhitespace (\" \\t\\r\\n\"));\n assertTrue (StringHelper.isAllWhitespace (\"\\n\"));\n\n assertFalse (StringHelper.isAllWhitespace (\"\"));\n assertFalse (S...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "public static boolean isAllWhitespace (@Nullable final CharSequence s)\n {\n return containsOnly (s, Character::isWhitespace);\n }", "class_method_signature": "StringHelper.isAllWhitespace(@Nullable final CharSequence s)", "constructor": false, "full_signature": "public static boolean isAllWhite...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_122
{ "fields": [ { "declarator": "FIELD1 = \"field1\"", "modifier": "private static final", "original_string": "private static final String FIELD1 = \"field1\";", "type": "String", "var_name": "FIELD1" }, { "declarator": "FIELD2 = \"field2\"", "modifier": "private st...
{ "body": "@Test\n public void testCopy ()\n {\n final Settings s = new Settings (\"s1\");\n assertTrue (s.putIn (FIELD1, \"My value\").isChanged ());\n\n final Settings s2 = new Settings (s);\n assertTrue (s2.keySet ().contains (FIELD1));\n assertFalse (s2.keySet ().contains (FIELD2));\n\n assert...
{ "fields": [ { "declarator": "m_sName", "modifier": "private final", "original_string": "private final String m_sName;", "type": "String", "var_name": "m_sName" } ], "file": "ph-settings/src/main/java/com/helger/settings/Settings.java", "identifier": "Settings", "interfa...
{ "body": "@Nonnull\n @Override\n public EChange putIn (@Nonnull @Nonempty final String sName, @Nullable final Object aNewValue)\n {\n // Additional check, that name may not be empty\n ValueEnforcer.notEmpty (sName, \"Name\");\n\n return super.putIn (sName, aNewValue);\n }", "class_method_signature": "...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_572
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java", "identifier": "CSVReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIssue2992134OutOfPlaceQuotes () throws IOException\n {\n final StringBuilder aSB = new StringBuilder (CCSV.INITIAL_STRING_SIZE);\n\n aSB.append (\"a,b,aReader,ddd\\\\\\\"eee\\nf,g,h,\\\"iii,jjj\\\"\");\n\n try (final CSVReader aReader = new CSVReader (new NonBlockingStrin...
{ "fields": [ { "declarator": "m_aReader", "modifier": "private final", "original_string": "private final Reader m_aReader;", "type": "Reader", "var_name": "m_aReader" }, { "declarator": "m_aLineReader", "modifier": "private final", "original_string": "priva...
{ "body": "@Nullable\n public ICommonsList <String> readNext () throws IOException\n {\n ICommonsList <String> ret = null;\n do\n {\n final String sNextLine = _getNextLine ();\n if (!m_bHasNext)\n {\n // should throw if still pending?\n return ret;\n }\n final ICommon...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_821
{ "fields": [ { "declarator": "I1 = Integer.valueOf (1)", "modifier": "private static final", "original_string": "private static final Integer I1 = Integer.valueOf (1);", "type": "Integer", "var_name": "I1" }, { "declarator": "I2 = Integer.valueOf (2)", "modifier"...
{ "body": "@Test\n public void testNewOrderedMap_KeyValue ()\n {\n final Map <String, Integer> aMap = newOrderedMap (\"Hallo\", I5);\n assertNotNull (aMap);\n assertEquals (1, aMap.size ());\n assertNotNull (aMap.get (\"Hallo\"));\n assertEquals (I5, aMap.get (\"Hallo\"));\n }", "class_method_sign...
{ "fields": [ { "declarator": "s_aInstance = new CollectionHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final CollectionHelper s_aInstance = new CollectionHelper ();", "type": "CollectionHelper", ...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public static <KEYTYPE, VALUETYPE> CommonsLinkedHashMap <KEYTYPE, VALUETYPE> newOrderedMap (@Nonnegative final int nInitialCapacity)\n {\n return new CommonsLinkedHashMap <> (nInitialCapacity);\n }", "class_method_signature": "CollectionHelper.newOrderedMap(@Nonneg...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_437
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/base64/Base64Test.java", "identifier": "Base64Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecodeFileToFile () throws IOException\n {\n final File f1 = new File (\"base64.encoded\");\n final File f2 = new File (\"base64.decoded\");\n try\n {\n assertFalse (FileHelper.existsFile (f2));\n SimpleFileIO.writeFile (f1, Base64.safeEncode (\"Hallo Wält\",...
{ "fields": [ { "declarator": "NO_OPTIONS = 0", "modifier": "public static final", "original_string": "public static final int NO_OPTIONS = 0;", "type": "int", "var_name": "NO_OPTIONS" }, { "declarator": "ENCODE = 1", "modifier": "public static final", "orig...
{ "body": "public static void decodeFileToFile (@Nonnull final String aInFile, @Nonnull final File aOutFile) throws IOException\n {\n final byte [] decoded = decodeFromFile (aInFile);\n try (final OutputStream out = FileHelper.getBufferedOutputStream (aOutFile))\n {\n out.write (decoded);\n }\n }",...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_12
{ "fields": [], "file": "ph-wsclient/src/test/java/com/helger/wsclient/WSHelperTest.java", "identifier": "WSHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDebuggingOnOff ()\n {\n WSHelper.setMetroDebugSystemProperties (true);\n WSHelper.setMetroDebugSystemProperties (false);\n }", "class_method_signature": "WSHelperTest.testDebuggingOnOff()", "constructor": false, "full_signature": "@Test public void testDebuggingOnOff(...
{ "fields": [], "file": "ph-wsclient/src/main/java/com/helger/wsclient/WSHelper.java", "identifier": "WSHelper", "interfaces": "", "methods": [ { "class_method_signature": "WSHelper.WSHelper()", "constructor": true, "full_signature": "private WSHelper()", "identifier": "WSHelper",...
{ "body": "public static void setMetroDebugSystemProperties (final boolean bDebug)\n {\n // Depending on the used JAX-WS version, the property names are\n // different....\n enableSoapLogging (bDebug);\n\n SystemProperties.setPropertyValue (\"com.sun.xml.ws.transport.http.HttpAdapter.dump\", Boolean.toSt...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_159
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/microdom/util/MicroRecursiveIteratorTest.java", "identifier": "MicroRecursiveIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBasic ()\n {\n final String sXML = \"<?xml version='1.0'?><root attr='value'>text<child xmlns='http://myns'/><!-- comment --><?stylesheet x y z?></root>\";\n final IMicroDocument aDoc = MicroReader.readMicroXML (sXML);\n assertNotNull (aDoc);\n final MicroRecursiveIter...
{ "fields": [ { "declarator": "m_aOpen = new CommonsArrayList <> ()", "modifier": "private final", "original_string": "private final ICommonsList <IMicroNode> m_aOpen = new CommonsArrayList <> ();", "type": "ICommonsList <IMicroNode>", "var_name": "m_aOpen" } ], "file": "ph-x...
{ "body": "public IMicroNode next ()\n {\n if (m_aOpen.isEmpty ())\n throw new NoSuchElementException ();\n\n final IMicroNode ret = m_aOpen.remove (0);\n if (ret.hasChildren ())\n m_aOpen.addAll (0, ret.getAllChildren ());\n return ret;\n }", "class_method_signature": "MicroRecursiveIterato...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_509
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/text/re...
{ "body": "@Test\n public void testAll ()\n {\n assertNotNull (Utf8ResourceBundle.getBundle (\"properties/test-utf8\"));\n assertNotNull (Utf8ResourceBundle.getBundle (\"properties/test-utf8\", L_DE));\n final ResourceBundle rb = Utf8ResourceBundle.getBundle (\"properties/test-utf8\", L_DE, ClassLoaderHelp...
{ "fields": [ { "declarator": "s_aInstance = new Utf8ResourceBundle ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final Utf8ResourceBundle s_aInstance = new Utf8ResourceBundle ();", "type": "Utf8ResourceBun...
{ "body": "@Nonnull\n public static ResourceBundle getBundle (@Nonnull final String sBaseName)\n {\n return _createUtf8PropertyResourceBundle (ResourceBundle.getBundle (sBaseName, Locale.getDefault ()));\n }", "class_method_signature": "Utf8ResourceBundle.getBundle(@Nonnull final String sBaseName)", "constr...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_620
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testBigX ()\n {\n BigInteger aBI = BigInteger.valueOf (1234);\n BigDecimal aBD = TypeConverter.convert (aBI, BigDecimal.class);\n assertEquals (1234, aBD.intValue ());\n assertEquals (aBI, aBD.toBigInteger ());\n\n aBD = new BigDecimal (\"4567.891\");\n aBI = TypeCon...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (TypeConverter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (TypeConverter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nullable\n public static <DSTTYPE> DSTTYPE convert (final boolean aSrcValue, @Nonnull final Class <DSTTYPE> aDstClass)\n {\n return convert (Boolean.valueOf (aSrcValue), aDstClass);\n }", "class_method_signature": "TypeConverter.convert(final boolean aSrcValue, @Nonnull final Class <DSTTYPE> aDstC...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_270
{ "fields": [ { "declarator": "CHARSET = StandardCharsets.UTF_8", "modifier": "private static final", "original_string": "private static final Charset CHARSET = StandardCharsets.UTF_8;", "type": "Charset", "var_name": "CHARSET" } ], "file": "ph-commons/src/test/java/com/helge...
{ "body": "@Test\n public void testDecode ()\n {\n final RunLengthCodec c = new RunLengthCodec ();\n assertEquals (\"WWWWWWWWWWWWTFF\", c.getDecodedAsString (new byte [] { (byte) (257 - 12), 'W', 0x03, 'T', 'F', 'F' }, CHARSET));\n assertEquals (\"WWWWWWWWWWTFF\",\n c.getDecodedAsString (n...
{ "fields": [ { "declarator": "RUN_LENGTH_EOD = 0x80", "modifier": "protected static final", "original_string": "protected static final int RUN_LENGTH_EOD = 0x80;", "type": "int", "var_name": "RUN_LENGTH_EOD" } ], "file": "ph-commons/src/main/java/com/helger/commons/codec/Run...
{ "body": "public void decode (@Nullable final byte [] aEncodedBuffer,\n @Nonnegative final int nOfs,\n @Nonnegative final int nLen,\n @Nonnull @WillNotClose final OutputStream aOS)\n {\n if (aEncodedBuffer == null || nLen == 0)\n return;\n\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_86
{ "fields": [ { "declarator": "STRING_UNESCAPED = \"this is a \\\"test\\\" containing \\b \\t \\n \\f \\r \\\\ / <>\\n##+{}()\"", "modifier": "private static final", "original_string": "private static final String STRING_UNESCAPED = \"this is a \\\"test\\\" containing \\b \\t \\n \\f \\r \\\\ / ...
{ "body": "@Test\n public void testUnscape ()\n {\n assertEquals (STRING_UNESCAPED, JsonEscapeHelper.jsonUnescape (STRING_ESCAPED));\n assertEquals (\"\", JsonEscapeHelper.jsonUnescape (\"\"));\n }", "class_method_signature": "JsonEscapeHelperTest.testUnscape()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "MASK_CHAR = '\\\\'", "modifier": "public static final", "original_string": "public static final char MASK_CHAR = '\\\\';", "type": "char", "var_name": "MASK_CHAR" }, { "declarator": "MASK_STRING = Character.toString (MASK_CHAR)", "mo...
{ "body": "@Nonnull\n public static String jsonUnescape (@Nonnull final String sInput)\n {\n ValueEnforcer.notNull (sInput, \"Input\");\n\n if (sInput.indexOf (MASK_CHAR) < 0)\n {\n // Nothing to unescape\n return sInput;\n }\n\n // Perform unescape\n final StringBuilder aSB = new String...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_69
{ "fields": [], "file": "ph-graph/src/test/java/com/helger/graph/impl/GraphNodeTest.java", "identifier": "GraphNodeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCtor ()\n {\n final GraphNode n = new GraphNode ();\n assertNotNull (n.getID ());\n assertTrue (StringHelper.hasText (n.getID ()));\n\n final GraphNode n1 = new GraphNode (\"\");\n assertNotNull (n1.getID ());\n assertTrue (StringHelper.hasText (n1.getID ()));\n ...
{ "fields": [ { "declarator": "m_aRelations", "modifier": "private", "original_string": "private ICommonsOrderedMap <String, IMutableGraphRelation> m_aRelations;", "type": "ICommonsOrderedMap <String, IMutableGraphRelation>", "var_name": "m_aRelations" } ], "file": "ph-graph/...
{ "body": "public boolean hasRelations ()\n {\n return m_aRelations != null && m_aRelations.isNotEmpty ();\n }", "class_method_signature": "GraphNode.hasRelations()", "constructor": false, "full_signature": "public boolean hasRelations()", "identifier": "hasRelations", "invocations": [ "isNotEmpty"...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_765
{ "fields": [ { "declarator": "I_1 = Integer.valueOf (-1)", "modifier": "private static final", "original_string": "private static final Integer I_1 = Integer.valueOf (-1);", "type": "Integer", "var_name": "I_1" }, { "declarator": "I0 = Integer.valueOf (0)", "modi...
{ "body": "@Test\n public void testParseFloatObj ()\n {\n final Float aDefault = Float.valueOf (3.145667f);\n\n // Object\n assertNull (StringParser.parseFloatObj ((Object) null));\n assertEquals (aDefault, StringParser.parseFloatObj ((Object) null, aDefault));\n CommonsAssert.assertEquals (1, String...
{ "fields": [ { "declarator": "DEFAULT_RADIX = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_RADIX = 10;", "type": "int", "var_name": "DEFAULT_RADIX" }, { "declarator": "s_aInstance = new StringParser ()", "modifier": ...
{ "body": "@Nullable\n public static Float parseFloatObj (@Nullable final Object aObject)\n {\n return parseFloatObj (aObject, null);\n }", "class_method_signature": "StringParser.parseFloatObj(@Nullable final Object aObject)", "constructor": false, "full_signature": "@Nullable public static Float parseFl...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_335
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testWriteStream ()\n {\n final byte [] buf = \"abcde\".getBytes (StandardCharsets.ISO_8859_1);\n final NonBlockingByteArrayOutputStream os = new NonBlockingByteArrayOutputStream ();\n assertTrue (StreamHel...
{ "fields": [ { "declarator": "DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE;", "type": "int", "var_name": "DEFAULT_BUFSIZE" }, { "decl...
{ "body": "@Nonnull\n public static ESuccess writeStream (@WillClose @Nonnull final OutputStream aOS,\n @Nonnull final byte [] aBuf,\n @Nonnegative final int nOfs,\n @Nonnegative final int nLen)\n {\n t...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_227
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (DOMReaderTest.class)", "modifier": "@SuppressWarnings (\"unused\")\n private static final", "original_string": "@SuppressWarnings (\"unused\")\n private static final Logger LOGGER = LoggerFactory.getLogger (DOMReaderTest.class);"...
{ "body": "@Test\n public void testReadXMLDOMString ()\n {\n Document doc = DOMReader.readXMLDOM (\"<root/>\");\n assertNotNull (doc);\n doc = DOMReader.readXMLDOM (\"<?xml version=\\\"1.0\\\"?>\\n\" + \"<root/>\");\n assertNotNull (doc);\n doc = DOMReader.readXMLDOM (\"<?xml version=\\\"1.0\\\"?>\\n...
{ "fields": [ { "declarator": "s_aDomTimerHdl = StatisticsManager.getTimerHandler (DOMReader.class.getName () +\n \"$DOM\")", "modifier": "private static final", "original_string": "private s...
{ "body": "@Nullable\n public static Document readXMLDOM (@WillClose @Nonnull final InputSource aIS)\n {\n return readXMLDOM (aIS, new DOMReaderSettings ());\n }", "class_method_signature": "DOMReader.readXMLDOM(@WillClose @Nonnull final InputSource aIS)", "constructor": false, "full_signature": "@Nullabl...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_677
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testImplodeMap ()\n {\n final ICommonsOrderedMap <String, String> aMap = CollectionHelper.newOrderedMap (\"a\", \"true\", \"b\", \"true\", \"c\", \"false\");\n assertEquals (\"atruebtruecfalse\", StringHelper.getImploded (\"\", \"\", aMap));\n assertEquals (\"atrue,btrue,cfal...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnull\n public static String getImploded (@Nullable final Iterable <?> aElements)\n {\n return getImplodedMapped (aElements, String::valueOf);\n }", "class_method_signature": "StringHelper.getImploded(@Nullable final Iterable <?> aElements)", "constructor": false, "full_signature": "@Nonnull...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_362
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileHelperTest.java", "identifier": "FileHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetInputStream ()\n {\n try\n {\n FileHelper.getInputStream ((File) null);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n\n final InputStream aIS = FileHelper.getInputStream (new File (\"pom.xml\"));\n assertNotNull (aIS);\n StreamH...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (FileHelper.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (FileHelper.class);", "type": "Logger", "var_name": "LOGGER" }, { "d...
{ "body": "@Nullable\n public static FileInputStream getInputStream (@Nonnull final File aFile)\n {\n ValueEnforcer.notNull (aFile, \"File\");\n\n try\n {\n return new CountingFileInputStream (aFile);\n }\n catch (final FileNotFoundException ex)\n {\n return null;\n }\n }", "class_...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_698
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetOccurrenceCountIgnoreCaseChar ()\n {\n final Locale aLocale = Locale.ENGLISH;\n assertEquals (0, StringHelper.getOccurrenceCountIgnoreCase (null, 'x', aLocale));\n assertEquals (0, StringHelper.getOccurrenceCountIgnoreCase (\"e\", 'f', aLocale));\n assertEquals (0, ...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnegative\n public static int getOccurrenceCountIgnoreCase (@Nullable final String sText,\n @Nullable final String sSearch,\n @Nonnull final Locale aSortLocale)\n {\n return sText != null && sSearch !=...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_732
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetWithoutLeadingChars ()\n {\n assertEquals (\"cd\", StringHelper.getWithoutLeadingChars (\"abcd\", 2));\n assertEquals (\"d\", StringHelper.getWithoutLeadingChars (\"abcd\", 3));\n assertEquals (\"c\", StringHelper.getWithoutLeadingChars (\"abc\", 2));\n assertEquals...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnull\n public static String getWithoutLeadingChars (@Nullable final String sStr, @Nonnegative final int nCount)\n {\n ValueEnforcer.isGE0 (nCount, \"Count\");\n\n if (nCount == 0)\n return sStr;\n return getLength (sStr) <= nCount ? \"\" : sStr.substring (nCount);\n }", "class_method...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_118
{ "fields": [], "file": "ph-config/src/test/java/com/helger/config/source/MultiConfigurationValueProviderTest.java", "identifier": "MultiConfigurationValueProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmpty ()\n {\n final MultiConfigurationValueProvider aMCSVP = new MultiConfigurationValueProvider ();\n // Resolve\n assertNull (aMCSVP.getConfigurationValue (\"key1\"));\n assertNull (aMCSVP.getConfigurationValue (\"key2\"));\n assertNull (aMCSVP.getConfigurationVa...
{ "fields": [ { "declarator": "DEFAULT_USE_ONLY_INTIIALIZED_CONFIG_SOURCES = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_USE_ONLY_INTIIALIZED_CONFIG_SOURCES = true;", "type": "boolean", "var_name": "DEFAULT_USE_ONLY_INTIIALIZED_CO...
{ "body": "@Nullable\n public ConfiguredValue getConfigurationValue (@Nonnull @Nonempty final String sKey)\n {\n ConfiguredValue ret = null;\n for (final CS aSource : m_aSources)\n {\n ret = aSource.m_aCVP.getConfigurationValue (sKey);\n if (ret != null)\n {\n // Use the first one tha...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_548
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "mod...
{ "body": "@Test\n public void testParseDouble ()\n {\n CommonsAssert.assertEquals (1.1, LocaleParser.parseDouble (\"1,1\", L_DE, CGlobal.ILLEGAL_DOUBLE));\n CommonsAssert.assertEquals (1.1, LocaleParser.parseDouble (\"1.1\", L_EN, CGlobal.ILLEGAL_DOUBLE));\n CommonsAssert.assertEquals (CGlobal.ILLEGAL_DOU...
{ "fields": [ { "declarator": "s_aInstance = new LocaleParser ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final LocaleParser s_aInstance = new LocaleParser ();", "type": "LocaleParser", "var_name": ...
{ "body": "public static double parseDouble (@Nullable final String sStr, @Nonnull final Locale aParseLocale, final double dDefault)\n {\n return parseDouble (sStr, NumberFormat.getInstance (aParseLocale), dDefault);\n }", "class_method_signature": "LocaleParser.parseDouble(@Nullable final String sStr, @Nonnul...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_661
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetHexChar ()\n {\n assertEquals ('0', StringHelper.getHexChar (0));\n assertEquals ('9', StringHelper.getHexChar (9));\n assertEquals ('a', StringHelper.getHexChar (10));\n assertEquals ('f', StringHelper.getHexChar (15));\n assertEquals ('\\0', StringHelper.getHex...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "public static char getHexChar (final int n)\n {\n return Character.forDigit (n, CGlobal.HEX_RADIX);\n }", "class_method_signature": "StringHelper.getHexChar(final int n)", "constructor": false, "full_signature": "public static char getHexChar(final int n)", "identifier": "getHexChar", "invoc...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_231
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (DOMReaderTest.class)", "modifier": "@SuppressWarnings (\"unused\")\n private static final", "original_string": "@SuppressWarnings (\"unused\")\n private static final Logger LOGGER = LoggerFactory.getLogger (DOMReaderTest.class);"...
{ "body": "@Test\n public void testReadNotation ()\n {\n // Read file with processing instruction\n final Document doc = DOMReader.readXMLDOM (new ClassPathResource (\"xml/xml-notation.xml\"));\n assertNotNull (doc);\n\n // Write again\n assertNotNull (XMLWriter.getNodeAsString (doc));\n }", "clas...
{ "fields": [ { "declarator": "s_aDomTimerHdl = StatisticsManager.getTimerHandler (DOMReader.class.getName () +\n \"$DOM\")", "modifier": "private static final", "original_string": "private s...
{ "body": "@Nullable\n public static Document readXMLDOM (@WillClose @Nonnull final InputSource aIS)\n {\n return readXMLDOM (aIS, new DOMReaderSettings ());\n }", "class_method_signature": "DOMReader.readXMLDOM(@WillClose @Nonnull final InputSource aIS)", "constructor": false, "full_signature": "@Nullabl...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_28
{ "fields": [ { "declarator": "EOL = System.getProperty (\"line.separator\")", "modifier": "private static final", "original_string": "private static final String EOL = System.getProperty (\"line.separator\");", "type": "String", "var_name": "EOL" } ], "file": "ph-cli/src/tes...
{ "body": "@Test\n public void testHeaderStartingWithLineSeparator ()\n {\n // related to Bugzilla #21215\n final Options options = new Options ();\n final HelpFormatter formatter = new HelpFormatter ();\n final String header = EOL + \"Header\";\n final String footer = \"Footer\";\n try (final Non...
{ "fields": [ { "declarator": "DEFAULT_WIDTH = 74", "modifier": "public static final", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "declarator": "DEFAULT_LEFT_PAD = 1", "modifier": "public stati...
{ "body": "public void printHelp (@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final Options aOptions)\n {\n printHelp (getWidth (), sCmdLineSyntax, null, aOptions, null, false);\n }", "class_method_signature": "HelpFormatter.printHelp(@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_724
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testReplaceMultipleCharArrays ()\n {\n assertArrayEquals (\"bb\".toCharArray (),\n StringHelper.replaceMultiple (\"a\", new char [] { 'a' }, new char [] [] { \"bb\".toCharArray () }));\n assertArrayEquals (\"bbbb\".toCharArray (),\n St...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnull\n public static char [] replaceMultiple (@Nullable final String sInputString,\n @Nonnull final char [] aSearchChars,\n @Nonnull final char [] [] aReplacementStrings)\n {\n // Any input text?\n if (hasNoText (sI...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_374
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteDirRecursive ()\n {\n final File aDir = new File (\"deldirrec1.test\");\n try\n {\n assertFalse (FileHelper.existsDir (aDir));\n _expectedError (FileOperations.deleteDirRecursive (aDir), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST);\n _expectedSuccess (Fil...
{ "fields": [ { "declarator": "DEFAULT_EXCEPTION_ON_DELETE_ROOT = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT = true;", "type": "boolean", "var_name": "DEFAULT_EXCEPTION_ON_DELETE_ROOT" }, { ...
{ "body": "@Nonnull\n public static FileIOError deleteDirRecursive (@Nonnull final File aDir)\n {\n ValueEnforcer.notNull (aDir, \"Directory\");\n\n // Non-existing directory?\n if (!FileHelper.existsDir (aDir))\n return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_DIR_...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_90
{ "fields": [], "file": "ph-collection/src/test/java/com/helger/collection/safe/SafeVectorTest.java", "identifier": "SafeVectorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSafeVectorNullFactory ()\n {\n // create with a \"null\"-creating factory\n final SafeVector <String> sv = new SafeVector <> ();\n assertEquals (0, sv.size ());\n\n // no such index 0 -> create using the factory\n assertNull (sv.get (0));\n assertEquals (1, sv.si...
{ "fields": [ { "declarator": "m_aFactory", "modifier": "@MustImplementEqualsAndHashcode\n private final", "original_string": "@MustImplementEqualsAndHashcode\n private final Supplier <? extends ELEMENTTYPE> m_aFactory;", "type": "Supplier <? extends ELEMENTTYPE>", "var_name": "m_a...
{ "body": "@Override\n public synchronized ELEMENTTYPE get (@Nonnegative final int nIndex)\n {\n _ensureSize (nIndex);\n return super.get (nIndex);\n }", "class_method_signature": "SafeVector.get(@Nonnegative final int nIndex)", "constructor": false, "full_signature": "@Override public synchronized ELE...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_266
{ "fields": [ { "declarator": "CHARSET = StandardCharsets.UTF_8", "modifier": "private static final", "original_string": "private static final Charset CHARSET = StandardCharsets.UTF_8;", "type": "Charset", "var_name": "CHARSET" } ], "file": "ph-commons/src/test/java/com/helge...
{ "body": "@Test\n public void testEncode ()\n {\n final Base32Codec aBase32 = new Base32Codec ();\n assertNull (aBase32.getEncodedAsString ((byte []) null, CHARSET));\n assertNull (aBase32.getEncodedAsString ((String) null, CHARSET));\n assertEquals (\"\", aBase32.getEncodedAsString (new byte [0], CHAR...
{ "fields": [ { "declarator": "DECODE_TABLE = { // 00-0f\n -1,\n -1,\n -1,\n -1,\n ...
{ "body": "public void encode (@Nullable final byte [] aDecodedBuffer,\n @Nonnegative final int nOfs,\n @Nonnegative final int nLen,\n @Nonnull @WillNotClose final OutputStream aOS)\n {\n if (aDecodedBuffer == null || nLen == 0)\n return;\n\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_636
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/id/factory/MemoryIntIDFactoryTest.java", "identifier": "MemoryIntIDFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testAll ()\n {\n final MemoryIntIDFactory x = new MemoryIntIDFactory (9);\n assertEquals (9, x.getNewID ());\n CommonsTestHelper.testDefaultImplementationWithEqualContentObject (x, new MemoryIntIDFactory (...
{ "fields": [ { "declarator": "DEFAULT_START_ID = 10000", "modifier": "public static final", "original_string": "public static final int DEFAULT_START_ID = 10000;", "type": "int", "var_name": "DEFAULT_START_ID" }, { "declarator": "m_aID", "modifier": "private fina...
{ "body": "public int getNewID ()\n {\n return m_aID.getAndIncrement ();\n }", "class_method_signature": "MemoryIntIDFactory.getNewID()", "constructor": false, "full_signature": "public int getNewID()", "identifier": "getNewID", "invocations": [ "getAndIncrement" ], "modifiers": "public", "pa...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_323
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsKnownEOFException ()\n {\n assertFalse (StreamHelper.isKnownEOFException ((Throwable) null));\n assertFalse (StreamHelper.isKnownEOFException ((Class <?>) null));\n assertTrue (StreamHelper.isKnownEOFException (new EOFException ()));\n assertTrue (StreamHelper.isKnow...
{ "fields": [ { "declarator": "DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE;", "type": "int", "var_name": "DEFAULT_BUFSIZE" }, { "decl...
{ "body": "public static boolean isKnownEOFException (@Nullable final Throwable t)\n {\n return t != null && isKnownEOFException (t.getClass ());\n }", "class_method_signature": "StreamHelper.isKnownEOFException(@Nullable final Throwable t)", "constructor": false, "full_signature": "public static boolean i...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_773
{ "fields": [ { "declarator": "I_1 = Integer.valueOf (-1)", "modifier": "private static final", "original_string": "private static final Integer I_1 = Integer.valueOf (-1);", "type": "Integer", "var_name": "I_1" }, { "declarator": "I0 = Integer.valueOf (0)", "modi...
{ "body": "@Test\n public void testParseUnsignedIntegerObj ()\n {\n for (final long l : new long [] { 0, 1, 2, 10, 100, Integer.MAX_VALUE, 0x8000_0000L, 0xffff_ffffL })\n assertEquals (Long.valueOf (l), StringParser.parseUnsignedIntObj (Long.toString (l)));\n assertNull (StringParser.parseUnsignedIntObj ...
{ "fields": [ { "declarator": "DEFAULT_RADIX = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_RADIX = 10;", "type": "int", "var_name": "DEFAULT_RADIX" }, { "declarator": "s_aInstance = new StringParser ()", "modifier": ...
{ "body": "@Nullable\n public static Long parseUnsignedIntObj (@Nullable final String sStr)\n {\n return parseUnsignedIntObj (sStr, DEFAULT_RADIX, null);\n }", "class_method_signature": "StringParser.parseUnsignedIntObj(@Nullable final String sStr)", "constructor": false, "full_signature": "@Nullable publ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_289
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/ValueEnforcerTest.java", "identifier": "ValueEnforcerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test (expected = IllegalArgumentException.class)\n public void testNotEmpty6 ()\n {\n ValueEnforcer.notEmpty (new short [0], \"null\");\n }", "class_method_signature": "ValueEnforcerTest.testNotEmpty6()", "constructor": false, "full_signature": "@Test (expected = IllegalArgumentException.class...
{ "fields": [ { "declarator": "s_aEnabled = new AtomicBoolean (true)", "modifier": "private static final", "original_string": "private static final AtomicBoolean s_aEnabled = new AtomicBoolean (true);", "type": "AtomicBoolean", "var_name": "s_aEnabled" }, { "declarator"...
{ "body": "public static <T extends CharSequence> T notEmpty (final T aValue, final String sName)\n {\n if (isEnabled ())\n return notEmpty (aValue, () -> sName);\n return aValue;\n }", "class_method_signature": "ValueEnforcer.notEmpty(final T aValue, final String sName)", "constructor": false, "fu...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_451
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDividedDouble ()\n {\n CommonsAssert.assertEquals (1.5, MathHelper.getDividedDouble (3, 2));\n CommonsAssert.assertEquals (Double.NaN, MathHelper.getDividedDouble (5, 0));\n CommonsAssert.assertEquals (Double.NaN, MathHelper.getDividedDouble (0, 0));\n }", "class_me...
{ "fields": [ { "declarator": "LONG_HIGH_BITS = 0xFFFFFFFF80000000L", "modifier": "private static final", "original_string": "private static final long LONG_HIGH_BITS = 0xFFFFFFFF80000000L;", "type": "long", "var_name": "LONG_HIGH_BITS" }, { "declarator": "s_aInstance =...
{ "body": "public static double getDividedDouble (final int nDividend, final int nDivisor)\n {\n final double dDividend = nDividend;\n final double dDivisor = nDivisor;\n return dDividend / dDivisor;\n }", "class_method_signature": "MathHelper.getDividedDouble(final int nDividend, final int nDivisor)", ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_847
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testArrayComplex ()\n {\n final ICommonsList <String> [] aArray = ArrayHelper.newArray (new CommonsArrayList <> (\"a\", \"b\"), new CommonsArrayList <> (\"c\", \"d\"));\n assertTrue (EqualsHelper.equalsCollection (aArray, aArray));\n assertTrue (EqualsHelper.equalsCollection ...
{ "fields": [ { "declarator": "s_aInstance = new EqualsHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final EqualsHelper s_aInstance = new EqualsHelper ();", "type": "EqualsHelper", "var_name": ...
{ "body": "public static boolean equalsCollection (@Nullable final Object aObj1, @Nullable final Object aObj2)\n {\n // Same object - check first\n if (identityEqual (aObj1, aObj2))\n return true;\n\n // Is only one value null?\n if (aObj1 == null || aObj2 == null)\n return false;\n\n final ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_144
{ "fields": [ { "declarator": "TEST_NS = \"http://www.helger.com/dev/unittests/commons/\"", "modifier": "private static final", "original_string": "private static final String TEST_NS = \"http://www.helger.com/dev/unittests/commons/\";", "type": "String", "var_name": "TEST_NS" } ...
{ "body": "@Test\n public void testAppend ()\n {\n final Document doc = XMLFactory.newDocument ();\n final Element eRoot = (Element) doc.appendChild (doc.createElement (\"root\"));\n final Document doc2 = XMLFactory.newDocument ();\n XMLHelper.append (eRoot, doc2.createElement (\"child\"));\n XMLHelp...
{ "fields": [ { "declarator": "s_aInstance = new XMLHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final XMLHelper s_aInstance = new XMLHelper ();", "type": "XMLHelper", "var_name": "s_aInstance...
{ "body": "@Nonnull\n public static Node append (@Nonnull final Node aParentNode, @Nullable final Object aChild)\n {\n ValueEnforcer.notNull (aParentNode, \"ParentNode\");\n\n if (aChild != null)\n if (aChild instanceof Document)\n {\n // Special handling for Document comes first, as this is ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_514
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "mod...
{ "body": "@Test\n public void testCreateMultilingualTextFromMap ()\n {\n final ICommonsMap <String, String> aParamNames = new CommonsHashMap <> ();\n IMultilingualText aMLT = TextHelper.createMultilingualTextFromMap (aParamNames);\n assertEquals (0, aMLT.texts ().size ());\n\n aParamNames.put (\"de\", ...
{ "fields": [ { "declarator": "DE = LocaleCache.getInstance ().getLocale (\"de\")", "modifier": "public static final", "original_string": "public static final Locale DE = LocaleCache.getInstance ().getLocale (\"de\");", "type": "Locale", "var_name": "DE" }, { "declarato...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public static MultilingualText createMultilingualTextFromMap (@Nonnull final Map <String, String> aMap)\n {\n ValueEnforcer.notNull (aMap, \"Map\");\n\n final MultilingualText ret = new MultilingualText ();\n final LocaleCache aLC = LocaleCache.getInstance ();\n...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_797
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java", "identifier": "IteratorHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsEmpty_IIterableIterator ()\n {\n assertTrue (isEmpty ((IIterableIterator <?>) null));\n assertTrue (isEmpty (new IterableIterator <> (new CommonsArrayList <> ())));\n assertTrue (isEmpty (IterableIterator.<String> createEmpty ()));\n assertFalse (isEmpty (new Iterabl...
{ "fields": [], "file": "ph-commons/src/main/java/com/helger/commons/collection/IteratorHelper.java", "identifier": "IteratorHelper", "interfaces": "", "methods": [ { "class_method_signature": "IteratorHelper.IteratorHelper()", "constructor": true, "full_signature": "private IteratorHel...
{ "body": "public static boolean isEmpty (@Nullable final Iterator <?> aIter)\n {\n return aIter == null || !aIter.hasNext ();\n }", "class_method_signature": "IteratorHelper.isEmpty(@Nullable final Iterator <?> aIter)", "constructor": false, "full_signature": "public static boolean isEmpty(@Nullable final...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_74
{ "fields": [], "file": "ph-json/src/test/java/com/helger/json/JsonArrayTest.java", "identifier": "JsonArrayTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testContains ()\n {\n final JsonArray aArray = new JsonArray ();\n assertFalse (aArray.contains (5));\n assertFalse (aArray.contains (5L));\n assertFalse (aArray.contains (3.1234));\n assertFalse (aArray.contains ((IJson) null));\n assertFalse (aArray.contains (false...
{ "fields": [ { "declarator": "m_aValues", "modifier": "private", "original_string": "private ICommonsList <IJson> m_aValues;", "type": "ICommonsList <IJson>", "var_name": "m_aValues" } ], "file": "ph-json/src/main/java/com/helger/json/JsonArray.java", "identifier": "JsonAr...
{ "body": "public boolean contains (@Nullable final IJson aValue)\n {\n return aValue != null && m_aValues.contains (aValue);\n }", "class_method_signature": "JsonArray.contains(@Nullable final IJson aValue)", "constructor": false, "full_signature": "public boolean contains(@Nullable final IJson aValue)", ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_778
{ "fields": [ { "declarator": "I1 = Integer.valueOf (1)", "modifier": "private static final", "original_string": "private static final Integer I1 = Integer.valueOf (1);", "type": "Integer", "var_name": "I1" }, { "declarator": "I2 = Integer.valueOf (2)", "modifier"...
{ "body": "@Test\n public void testSize ()\n {\n assertEquals (0, getSize ((Object []) null));\n assertEquals (2, getSize (new Object [] { \"x\", Boolean.FALSE }));\n\n assertEquals (0, getSize ((boolean []) null));\n assertEquals (2, getSize (new boolean [] { true, false }));\n\n assertEquals (0, ge...
{ "fields": [ { "declarator": "EMPTY_BOOLEAN_ARRAY = new boolean [0]", "modifier": "public static final", "original_string": "public static final boolean [] EMPTY_BOOLEAN_ARRAY = new boolean [0];", "type": "boolean []", "var_name": "EMPTY_BOOLEAN_ARRAY" }, { "declarator...
{ "body": "@Nonnegative\n public static int getSize (@Nullable final boolean... aArray)\n {\n return aArray == null ? 0 : aArray.length;\n }", "class_method_signature": "ArrayHelper.getSize(@Nullable final boolean... aArray)", "constructor": false, "full_signature": "@Nonnegative public static int getSize...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_282
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/http/HttpHeaderMapTest.java", "identifier": "HttpHeaderMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetUnifiedValues ()\n {\n assertEquals (\"\", HttpHeaderMap.getUnifiedValue (\"\", false));\n assertEquals (\"\\\"\\\"\", HttpHeaderMap.getUnifiedValue (\"\", true));\n\n assertEquals (\"abc\", HttpHeaderMap.getUnifiedValue (\"abc\", false));\n assertEquals (\"abc\", H...
{ "fields": [ { "declarator": "SEPARATOR_KEY_VALUE = \": \"", "modifier": "public static final", "original_string": "public static final String SEPARATOR_KEY_VALUE = \": \";", "type": "String", "var_name": "SEPARATOR_KEY_VALUE" }, { "declarator": "DEFAULT_QUOTE_IF_NECES...
{ "body": "@Nonnull\n public static String getUnifiedValue (@Nullable final String sValue)\n {\n return getUnifiedValue (sValue, DEFAULT_QUOTE_IF_NECESSARY);\n }", "class_method_signature": "HttpHeaderMap.getUnifiedValue(@Nullable final String sValue)", "constructor": false, "full_signature": "@Nonnull pu...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_328
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testCopyInputStreamToOutputStreamWithLimit ()\n {\n final byte [] aInput = \"Hello12Bytes\".getBytes (StandardCharsets.ISO_8859_1);\n final NonBlockingByteArrayOutputStream aBAOS = new NonBlockingByteArrayOut...
{ "fields": [ { "declarator": "DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE;", "type": "int", "var_name": "DEFAULT_BUFSIZE" }, { "decl...
{ "body": "@Nonnull\n public static ESuccess copyInputStreamToOutputStreamWithLimit (@WillClose @Nullable final InputStream aIS,\n @WillNotClose @Nullable final OutputStream aOS,\n @Nonnega...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_406
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDir ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aDir1 = new File (\"TestDir\");\n assertFalse (FileHelper.existsDir (aDir1));\n _expectedSuccess (aFOM.createDir (aDir1));\n assertEquals (EFileIOOperation.CREATE_DIR, aF...
{ "fields": [ { "declarator": "INSTANCE", "modifier": "public static final", "original_string": "public static final IFileOperationManager INSTANCE;", "type": "IFileOperationManager", "var_name": "INSTANCE" }, { "declarator": "m_aLastError", "modifier": "private",...
{ "body": "@Nonnull\n public FileIOError createDir (@Nonnull final File aDir)\n {\n m_aLastError = FileOperations.createDir (aDir);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.createDir(@Nonnull final File aDir)", "constructor": false...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_543
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "mod...
{ "body": "@Test\n public void testIsSpecialLocale ()\n {\n assertTrue (LocaleHelper.isSpecialLocale (LocaleHelper.LOCALE_ALL));\n assertTrue (LocaleHelper.isSpecialLocale (LocaleHelper.LOCALE_INDEPENDENT));\n assertFalse (LocaleHelper.isSpecialLocale (null));\n assertFalse (LocaleHelper.isSpecialLocale...
{ "fields": [ { "declarator": "LOCALE_SEPARATOR = '_'", "modifier": "public static final", "original_string": "public static final char LOCALE_SEPARATOR = '_';", "type": "char", "var_name": "LOCALE_SEPARATOR" }, { "declarator": "STR_ALL = \"all\"", "modifier": "pu...
{ "body": "public static boolean isSpecialLocale (@Nullable final Locale aLocale)\n {\n return LOCALE_ALL.equals (aLocale) || LOCALE_INDEPENDENT.equals (aLocale);\n }", "class_method_signature": "LocaleHelper.isSpecialLocale(@Nullable final Locale aLocale)", "constructor": false, "full_signature": "public ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_113
{ "fields": [], "file": "ph-config/src/test/java/com/helger/config/ConfigFactoryTest.java", "identifier": "ConfigFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSysPropFileResourceJson ()\n {\n SystemProperties.setPropertyValue (\"config.file\",\n new File (\"src/test/resources/sysprops/file.json\").getAbsolutePath ());\n try\n {\n final IConfig aConfig = Config.create (ConfigFactory.cre...
{ "fields": [ { "declarator": "PRIVATE_APPLICATION_JSON_PRIORITY = EConfigSourceType.RESOURCE.getDefaultPriority () - 5", "modifier": "public static final", "original_string": "public static final int PRIVATE_APPLICATION_JSON_PRIORITY = EConfigSourceType.RESOURCE.getDefaultPriority () - 5;", ...
{ "body": "@Nonnull\n public static MultiConfigurationValueProvider createDefaultValueProvider ()\n {\n final MultiConfigurationValueProvider aMCSVP = new MultiConfigurationValueProvider ();\n // Prio 400\n aMCSVP.addConfigurationSource (new ConfigurationSourceSystemProperty ());\n // Prio 300\n aMCS...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_810
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/StackHelperTest.java", "identifier": "StackHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNewStackSingleValue ()\n {\n NonBlockingStack <String> aStack = StackHelper.newStack ();\n assertNotNull (aStack);\n aStack = StackHelper.newStack (\"Hallo\");\n assertNotNull (aStack);\n assertEquals (1, aStack.size ());\n assertTrue (aStack.contains (\"Hallo\")...
{ "fields": [], "file": "ph-commons/src/main/java/com/helger/commons/collection/StackHelper.java", "identifier": "StackHelper", "interfaces": "", "methods": [ { "class_method_signature": "StackHelper.StackHelper()", "constructor": true, "full_signature": "private StackHelper()", "...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public static <ELEMENTTYPE> NonBlockingStack <ELEMENTTYPE> newStack (@Nonnegative final int nInitialCapacity)\n {\n return new NonBlockingStack <> (nInitialCapacity);\n }", "class_method_signature": "StackHelper.newStack(@Nonnegative final int nInitialCapacity)", ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_390
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEndsWithPathSeparatorChar ()\n {\n assertTrue (FilenameHelper.endsWithPathSeparatorChar (\"/usr/local/\"));\n assertTrue (FilenameHelper.endsWithPathSeparatorChar (\"\\\\windows\\\\system32\\\\\"));\n assertFalse (FilenameHelper.endsWithPathSeparatorChar (\"~/desktop.ini\...
{ "fields": [ { "declarator": "EXTENSION_SEPARATOR = '.'", "modifier": "public static final", "original_string": "public static final char EXTENSION_SEPARATOR = '.';", "type": "char", "var_name": "EXTENSION_SEPARATOR" }, { "declarator": "ILLEGAL_FILENAME_CHAR_REPLACEMEN...
{ "body": "public static boolean endsWithPathSeparatorChar (@Nullable final CharSequence s)\n {\n return isPathSeparatorChar (StringHelper.getLastChar (s));\n }", "class_method_signature": "FilenameHelper.endsWithPathSeparatorChar(@Nullable final CharSequence s)", "constructor": false, "full_signature": "p...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_1
{ "fields": [ { "declarator": "tested = new UTF7CharsetProviderSPI ()", "modifier": "private final", "original_string": "private final UTF7CharsetProviderSPI tested = new UTF7CharsetProviderSPI ();", "type": "UTF7CharsetProviderSPI", "var_name": "tested" } ], "file": "ph-char...
{ "body": "@Test\n public void testUTF7 ()\n {\n final Charset charset = tested.charsetForName (\"UTF-7\");\n assertNotNull (\"charset not found\", charset);\n assertEquals (UTF7Charset.class, charset.getClass ());\n assertEquals (charset, tested.charsetForName (\"utf-7\"));\n assertEquals (charset, ...
{ "fields": [ { "declarator": "UTF7_NAME = \"UTF-7\"", "modifier": "private static final", "original_string": "private static final String UTF7_NAME = \"UTF-7\";", "type": "String", "var_name": "UTF7_NAME" }, { "declarator": "UTF7_O_NAME = \"X-UTF-7-OPTIONAL\"", "...
{ "body": "@Override\n @Nullable\n public Charset charsetForName (@Nonnull final String sCharsetName)\n {\n final String sRealCharsetName = sCharsetName.toUpperCase (Locale.US);\n for (final Charset aCharset : m_aCharsets)\n if (aCharset.name ().equals (sRealCharsetName))\n return aCharset;\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_685
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testGetRepeated ()\n {\n assertEquals (\"\", StringHelper.getRepeated ('a', 0));\n assertEquals (\"a\", StringHelper.getRepeated ('a', 1));\n assertEquals (\"aaa\", StringHelper.getRepeated ('a', 3));\n ...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnull\n public static String getRepeated (final char cElement, @Nonnegative final int nRepeats)\n {\n ValueEnforcer.isGE0 (nRepeats, \"Repeats\");\n\n if (nRepeats == 0)\n return \"\";\n if (nRepeats == 1)\n return Character.toString (cElement);\n\n final char [] aElement = new c...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_23
{ "fields": [ { "declarator": "EOL = System.getProperty (\"line.separator\")", "modifier": "private static final", "original_string": "private static final String EOL = System.getProperty (\"line.separator\");", "type": "String", "var_name": "EOL" } ], "file": "ph-cli/src/tes...
{ "body": "@Test\n public void testPrintUsage ()\n {\n final Option optionA = Option.builder (\"a\").desc (\"first\").build ();\n final Option optionB = Option.builder (\"b\").desc (\"second\").build ();\n final Option optionC = Option.builder (\"c\").desc (\"third\").build ();\n final Options opts = ne...
{ "fields": [ { "declarator": "DEFAULT_WIDTH = 74", "modifier": "public static final", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "declarator": "DEFAULT_LEFT_PAD = 1", "modifier": "public stati...
{ "body": "public void printUsage (@Nonnull final PrintWriter aPW, final int nWidth, final String sAppName, final Options aOptions)\n {\n // initialise the string buffer\n final StringBuilder aSB = new StringBuilder (getSyntaxPrefix ()).append (sAppName).append (' ');\n\n // create a list for processed opti...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_410
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameDir ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aSrcDir = new File (\"SourceDir\");\n final File aDstDir = new File (\"DestDir\");\n try\n {\n assertNotEquals (aSrcDir, aDstDir);\n assertFalse (FileHelper.exi...
{ "fields": [ { "declarator": "INSTANCE", "modifier": "public static final", "original_string": "public static final IFileOperationManager INSTANCE;", "type": "IFileOperationManager", "var_name": "INSTANCE" }, { "declarator": "m_aLastError", "modifier": "private",...
{ "body": "@Nonnull\n public FileIOError renameDir (@Nonnull final File aSourceDir, @Nonnull final File aTargetDir)\n {\n m_aLastError = FileOperations.renameDir (aSourceDir, aTargetDir);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.rena...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_806
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/iterate/ArrayIteratorTest.java", "identifier": "ArrayIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStdMethods ()\n {\n final ArrayIterator <String> ae = new ArrayIterator <> (ArrayHelper.newArray (\"Hallo\", \"Welt\", \"from\", \"Copenhagen\"));\n CommonsTestHelper.testDefaultImplementationWithEqualContentObject (ae,\n ...
{ "fields": [ { "declarator": "m_aArray", "modifier": "private final", "original_string": "private final ELEMENTTYPE [] m_aArray;", "type": "ELEMENTTYPE []", "var_name": "m_aArray" }, { "declarator": "m_nIndex = 0", "modifier": "private", "original_string": ...
{ "body": "@Nullable\n public ELEMENTTYPE next ()\n {\n if (!hasNext ())\n throw new NoSuchElementException ();\n return m_aArray[m_nIndex++];\n }", "class_method_signature": "ArrayIterator.next()", "constructor": false, "full_signature": "@Nullable public ELEMENTTYPE next()", "identifier": "nex...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_105
{ "fields": [ { "declarator": "FILL_FACTORS = { 0.25f, 0.5f, 0.75f, 0.9f, 0.99f }", "modifier": "private static final", "original_string": "private static final float [] FILL_FACTORS = { 0.25f, 0.5f, 0.75f, 0.9f, 0.99f };", "type": "float []", "var_name": "FILL_FACTORS" } ], ...
{ "body": "@Test\n public void testRemove ()\n {\n for (final float ff : FILL_FACTORS)\n _testRemoveHelper (ff);\n }", "class_method_signature": "IntIntMapTest.testRemove()", "constructor": false, "full_signature": "@Test public void testRemove()", "identifier": "testRemove", "invocations": [ ...
{ "fields": [ { "declarator": "FREE_KEY = 0", "modifier": "private static final", "original_string": "private static final int FREE_KEY = 0;", "type": "int", "var_name": "FREE_KEY" }, { "declarator": "NO_VALUE = 0", "modifier": "public static final", "origin...
{ "body": "public int remove (final int key)\n {\n if (key == FREE_KEY)\n {\n if (!m_bHasFreeKey)\n return NO_VALUE;\n m_bHasFreeKey = false;\n final int ret = m_nFreeValue;\n m_nFreeValue = NO_VALUE;\n --m_nSize;\n return ret;\n }\n\n final int idx = _getReadIndex (k...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_555
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "mod...
{ "body": "@Test\n public void testGetFormattedBigInteger ()\n {\n assertEquals (\"9.223.372.036.854.775.807\", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE), L_DE));\n assertEquals (\"9,223,372,036,854,775,807\", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE), L_EN));\n...
{ "fields": [ { "declarator": "s_aInstance = new LocaleFormatter ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final LocaleFormatter s_aInstance = new LocaleFormatter ();", "type": "LocaleFormatter", ...
{ "body": "@Nonnull\n public static String getFormatted (final double dValue, @Nonnull final Locale aDisplayLocale)\n {\n ValueEnforcer.notNull (aDisplayLocale, \"DisplayLocale\");\n\n return NumberFormat.getNumberInstance (aDisplayLocale).format (dValue);\n }", "class_method_signature": "LocaleFormatter.g...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_386
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAsValidFilename ()\n {\n assertNull (FilenameHelper.getAsSecureValidFilename (null));\n assertNull (FilenameHelper.getAsSecureValidFilename (\"\"));\n assertNull (FilenameHelper.getAsSecureValidFilename (\" \"));\n assertNull (FilenameHelper.getAsSecureValidFilename...
{ "fields": [ { "declarator": "EXTENSION_SEPARATOR = '.'", "modifier": "public static final", "original_string": "public static final char EXTENSION_SEPARATOR = '.';", "type": "char", "var_name": "EXTENSION_SEPARATOR" }, { "declarator": "ILLEGAL_FILENAME_CHAR_REPLACEMEN...
{ "body": "@Nullable\n @Nonempty\n public static String getAsSecureValidFilename (@Nullable final String sFilename)\n {\n // First secure it, by cutting everything behind the '\\0'\n String ret = getSecureFilename (sFilename);\n\n // empty not allowed\n if (StringHelper.hasText (ret))\n {\n // ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_35
{ "fields": [], "file": "ph-cli/src/test/java/com/helger/cli/CmdLineParserTest.java", "identifier": "CmdLineParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValuesValueSep () throws CmdLineParseException\n {\n final Options aOptions = new Options ().addOption (Option.builder (\"D\")\n .args (2)\n .valueSeparator (...
{ "fields": [ { "declarator": "PREFIX_SHORT_OPT = \"-\"", "modifier": "public static final", "original_string": "public static final String PREFIX_SHORT_OPT = \"-\";", "type": "String", "var_name": "PREFIX_SHORT_OPT" }, { "declarator": "PREFIX_LONG_OPT = \"--\"", ...
{ "body": "@Nonnull\n public ParsedCmdLine parse (@Nullable final String [] aArgs) throws CmdLineParseException\n {\n return parseStatic (m_aOptions, aArgs);\n }", "class_method_signature": "CmdLineParser.parse(@Nullable final String [] aArgs)", "constructor": false, "full_signature": "@Nonnull public Par...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_739
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetFromFirstExcl ()\n {\n assertEquals (\"bc@def.com\", StringHelper.getFromFirstExcl (\"abc@def.com\", 'a'));\n assertEquals (\"@def.com\", StringHelper.getFromFirstExcl (\"abc@def.com\", 'c'));\n assertEquals (\"def.com\", StringHelper.getFromFirstExcl (\"abc@def.com\",...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nullable\n public static String getFromFirstExcl (@Nullable final String sStr, final char cSearch)\n {\n return _getFromFirst (sStr, cSearch, false);\n }", "class_method_signature": "StringHelper.getFromFirstExcl(@Nullable final String sStr, final char cSearch)", "constructor": false, "full_si...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_369
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDirRecursiveIfNotExisting ()\n {\n final File aDir1 = new File (\"TestDir\");\n final File aDir11 = new File (aDir1, \"TestSubDir\");\n assertFalse (FileHelper.existsDir (aDir1));\n assertFalse (FileHelper.existsDir (aDir11));\n _expectedSuccess (FileOperation...
{ "fields": [ { "declarator": "DEFAULT_EXCEPTION_ON_DELETE_ROOT = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT = true;", "type": "boolean", "var_name": "DEFAULT_EXCEPTION_ON_DELETE_ROOT" }, { ...
{ "body": "@Nonnull\n public static FileIOError createDirRecursiveIfNotExisting (@Nonnull final File aDir)\n {\n final FileIOError aError = createDirRecursive (aDir);\n if (aError.getErrorCode ().equals (EFileIOErrorCode.TARGET_ALREADY_EXISTS))\n return EFileIOErrorCode.NO_ERROR.getAsIOError (EFileIOOper...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_693
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testIndexOfIgnoreCaseString ()\n {\n assertEquals (-1, StringHelper.getIndexOfIgnoreCase (null, null, L_DE));\n assertEquals (-1, StringHelper.getIndexOfIgnoreCase (null, \"a\", L_DE));\n assertEquals (-1, StringHelper.getIndexOfIgnoreCase (\"b\", null, L_DE));\n assertEqu...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "public static int getIndexOfIgnoreCase (@Nullable final String sText, @Nullable final String sSearch, @Nonnull final Locale aSortLocale)\n {\n return sText != null && sSearch != null && sText.length () >= sSearch.length ()\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_447
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/RoundHelperTest.java", "identifier": "RoundHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetFormattedFix ()\n {\n assertEquals (\"1\", RoundHelper.getFormattedFix (0.9, 0, Locale.US));\n assertEquals (\"1\", RoundHelper.getFormattedFix (1.0, 0, Locale.US));\n assertEquals (\"1\", RoundHelper.getFormattedFix (1.1, 0, Locale.US));\n assertEquals (\"1\", Roun...
{ "fields": [ { "declarator": "s_aInstance = new RoundHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final RoundHelper s_aInstance = new RoundHelper ();", "type": "RoundHelper", "var_name": "s_a...
{ "body": "@Nonnull\n public static String getFormattedFix (final double dValue, @Nonnegative final int nScale, final Locale aLocale)\n {\n return getFormatted (dValue, nScale, EDecimalType.FIX, aLocale);\n }", "class_method_signature": "RoundHelper.getFormattedFix(final double dValue, @Nonnegative final int ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_502
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/GenericReflectionTest.java", "identifier": "GenericReflectionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvokeStaticMethod () throws NoSuchMethodException,\n IllegalAccessException,\n InvocationTargetException,\n ClassNotFoundException\n {\n assertEquals (0, MockGe...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (GenericReflection.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (GenericReflection.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Nullable\n public static <RETURNTYPE> RETURNTYPE invokeStaticMethod (@Nonnull final String sClassName,\n @Nonnull final String sMethodName,\n @Nullable final Object... aArgs) throws NoSuc...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_152
{ "fields": [ { "declarator": "TEST_NS = \"http://www.helger.com/dev/unittests/commons/\"", "modifier": "private static final", "original_string": "private static final String TEST_NS = \"http://www.helger.com/dev/unittests/commons/\";", "type": "String", "var_name": "TEST_NS" } ...
{ "body": "@Test\n public void testGetNamespaceURI ()\n {\n assertNull (XMLHelper.getNamespaceURI (null));\n\n Document doc = XMLFactory.newDocument ();\n assertNull (XMLHelper.getNamespaceURI (doc));\n doc.appendChild (doc.createElement (\"any\"));\n assertNull (XMLHelper.getNamespaceURI (doc));\n\n...
{ "fields": [ { "declarator": "s_aInstance = new XMLHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final XMLHelper s_aInstance = new XMLHelper ();", "type": "XMLHelper", "var_name": "s_aInstance...
{ "body": "@Nullable\n public static String getNamespaceURI (@Nullable final Node aNode)\n {\n if (aNode instanceof Document)\n {\n // Recurse into document element\n return getNamespaceURI (((Document) aNode).getDocumentElement ());\n }\n if (aNode != null)\n return aNode.getNamespaceURI...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_851
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEnumeration ()\n {\n final ICommonsList <String> aCont = new CommonsArrayList <> (\"a\", \"b\", \"c\");\n assertTrue (EqualsHelper.equalsCollection (IteratorHelper.getEnumeration (aCont), IteratorHelper.getEnumeration (aCont)));\n assertTrue (EqualsHelper.equalsCollection...
{ "fields": [ { "declarator": "s_aInstance = new EqualsHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final EqualsHelper s_aInstance = new EqualsHelper ();", "type": "EqualsHelper", "var_name": ...
{ "body": "public static boolean equalsCollection (@Nullable final Object aObj1, @Nullable final Object aObj2)\n {\n // Same object - check first\n if (identityEqual (aObj1, aObj2))\n return true;\n\n // Is only one value null?\n if (aObj1 == null || aObj2 == null)\n return false;\n\n final ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_781
{ "fields": [ { "declarator": "I1 = Integer.valueOf (1)", "modifier": "private static final", "original_string": "private static final Integer I1 = Integer.valueOf (1);", "type": "Integer", "var_name": "I1" }, { "declarator": "I2 = Integer.valueOf (2)", "modifier"...
{ "body": "@Test\n public void testIsArray ()\n {\n assertTrue (isArray (new String [] { \"Hallo\" }));\n assertTrue (isArray (new String [0]));\n assertTrue (isArray (new boolean [1]));\n assertTrue (isArray (new boolean [0]));\n assertFalse (isArray ((boolean []) null));\n assertFalse (isArray (...
{ "fields": [ { "declarator": "EMPTY_BOOLEAN_ARRAY = new boolean [0]", "modifier": "public static final", "original_string": "public static final boolean [] EMPTY_BOOLEAN_ARRAY = new boolean [0];", "type": "boolean []", "var_name": "EMPTY_BOOLEAN_ARRAY" }, { "declarator...
{ "body": "public static boolean isArray (@Nullable final Object aObject)\n {\n return aObject != null && ClassHelper.isArrayClass (aObject.getClass ());\n }", "class_method_signature": "ArrayHelper.isArray(@Nullable final Object aObject)", "constructor": false, "full_signature": "public static boolean isA...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_294
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/statistics/StatisticsHandlerSizeTest.java", "identifier": "StatisticsHandlerSizeTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n @Test\n public void testAll ()\n {\n final StatisticsHandlerSize sh = new StatisticsHandlerSize ();\n assertEquals (0, sh.getInvocationCount ());\n assertEquals (CGlobal.ILLEGAL_UINT, sh.getMin ());\n assertEquals (CGlobal...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (StatisticsHandlerSize.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (StatisticsHandlerSize.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void addSize (@Nonnegative final long nSize)\n {\n if (nSize < 0)\n if (LOGGER.isWarnEnabled ())\n LOGGER.warn (\"A negative value (\" + nSize + \") is added to \" + getClass ().getName ());\n addValue (nSize);\n }", "class_method_signature": "StatisticsHandlerSize.addSize(@Non...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_62
{ "fields": [], "file": "ph-graph/src/test/java/com/helger/graph/simple/SimpleDirectedGraphTest.java", "identifier": "SimpleDirectedGraphTest", "interfaces": "", "superclass": "extends AbstractGraphTestCase" }
{ "body": "@Test\n public void testCycles ()\n {\n SimpleDirectedGraph sg = _buildDirectedGraph ();\n assertTrue (sg.isSelfContained ());\n assertFalse (sg.containsCycles ());\n assertFalse (sg.containsCycles ());\n\n sg = new SimpleDirectedGraph ();\n final IMutableDirectedGraphNode n1 = sg.creat...
{ "fields": [], "file": "ph-graph/src/main/java/com/helger/graph/simple/SimpleDirectedGraph.java", "identifier": "SimpleDirectedGraph", "interfaces": "implements ISimpleDirectedGraph", "methods": [ { "class_method_signature": "SimpleDirectedGraph.SimpleDirectedGraph()", "constructor": true, ...
{ "body": "@Nonnull\n public IMutableDirectedGraphRelation createRelation (@Nonnull final String sFromNodeID, @Nonnull final String sToNodeID)\n {\n final IMutableDirectedGraphNode aFromNode = getNodeOfID (sFromNodeID);\n if (aFromNode == null)\n throw new IllegalArgumentException (\"Failed to resolve fr...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_579
{ "fields": [ { "declarator": "STRINGS = CollectionHelper.newList (\"test1\", \"test2\")", "modifier": "private static final", "original_string": "private static final List <String> STRINGS = CollectionHelper.newList (\"test1\", \"test2\");", "type": "List <String>", "var_name": "STR...
{ "body": "@Test\n public void testInitialReadReturnsStrings () throws IOException\n {\n final CSVIterator aIterator = new CSVIterator (m_aMockReader);\n assertEquals (STRINGS, aIterator.next ());\n }", "class_method_signature": "CSVIteratorTest.testInitialReadReturnsStrings()", "constructor": false, "...
{ "fields": [ { "declarator": "m_aReader", "modifier": "private final", "original_string": "private final CSVReader m_aReader;", "type": "CSVReader", "var_name": "m_aReader" }, { "declarator": "m_aNextLine", "modifier": "private", "original_string": "private...
{ "body": "@Nonnull\n public ICommonsList <String> next ()\n {\n final ICommonsList <String> ret = m_aNextLine;\n if (ret == null)\n throw new NoSuchElementException ();\n\n try\n {\n m_aNextLine = m_aReader.readNext ();\n }\n catch (final IOException ex)\n {\n throw new IllegalS...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_129
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/transform/ResourceStreamSourceTest.java", "identifier": "ResourceStreamSourceTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings (\"unused\")\n @Test\n public void testCreationError ()\n {\n try\n {\n new ResourceStreamSource (null);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n try\n {\n new ResourceStreamSource (null, \"systid\");\n fail ();\n }\n ...
{ "fields": [ { "declarator": "m_aISP", "modifier": "private final", "original_string": "private final IHasInputStream m_aISP;", "type": "IHasInputStream", "var_name": "m_aISP" } ], "file": "ph-xml/src/main/java/com/helger/xml/transform/ResourceStreamSource.java", "identifi...
{ "body": "@Override\n public InputStream getInputStream ()\n {\n final InputStream aIS = m_aISP.getInputStream ();\n if (aIS == null)\n throw new IllegalStateException (\"Failed to open input stream for \" + m_aISP);\n return aIS;\n }", "class_method_signature": "ResourceStreamSource.getInputStrea...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_596
{ "fields": [ { "declarator": "ESCAPE_TEST_STRING = \"\\\\\\\\1\\\\2\\\\\\\"3\\\\\"", "modifier": "private static final", "original_string": "private static final String ESCAPE_TEST_STRING = \"\\\\\\\\1\\\\2\\\\\\\"3\\\\\";", "type": "String", "var_name": "ESCAPE_TEST_STRING" }, ...
{ "body": "@Test (expected = UnsupportedOperationException.class)\n public void testSeparatorCharacterCannotBeNull ()\n {\n new CSVParser ().setSeparatorChar (CCSV.NULL_CHARACTER);\n }", "class_method_signature": "CSVParserTest.testSeparatorCharacterCannotBeNull()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "m_cSeparatorChar = CCSV.DEFAULT_SEPARATOR", "modifier": "private", "original_string": "private char m_cSeparatorChar = CCSV.DEFAULT_SEPARATOR;", "type": "char", "var_name": "m_cSeparatorChar" }, { "declarator": "m_cQuoteChar = CCSV.DEFAULT...
{ "body": "@Nonnull\n public CSVParser setSeparatorChar (final char cSeparator)\n {\n if (cSeparator == CCSV.NULL_CHARACTER)\n throw new UnsupportedOperationException (\"The separator character must be defined!\");\n m_cSeparatorChar = cSeparator;\n if (_anyCharactersAreTheSame ())\n throw new Un...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_345
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/SimpleFileIOTest.java", "identifier": "SimpleFileIOTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteFile ()\n {\n final File aFile = new File (\"hahatwf.txt\");\n try\n {\n assertTrue (SimpleFileIO.writeFile (aFile, new byte [10]).isSuccess ());\n assertTrue (SimpleFileIO.writeFile (aFile, new byte [10], 0, 5).isSuccess ());\n assertTrue (SimpleFileI...
{ "fields": [ { "declarator": "s_aInstance = new SimpleFileIO ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final SimpleFileIO s_aInstance = new SimpleFileIO ();", "type": "SimpleFileIO", "var_name": ...
{ "body": "@Nonnull\n public static ESuccess writeFile (@Nonnull final File aFile, @Nonnull final byte [] aContent)\n {\n final OutputStream aFOS = FileHelper.getOutputStream (aFile);\n return aFOS == null ? ESuccess.FAILURE : StreamHelper.writeStream (aFOS, aContent);\n }", "class_method_signature": "Simp...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_19
{ "fields": [ { "declarator": "EOL = System.getProperty (\"line.separator\")", "modifier": "private static final", "original_string": "private static final String EOL = System.getProperty (\"line.separator\");", "type": "String", "var_name": "EOL" } ], "file": "ph-cli/src/tes...
{ "body": "@Test\n public void testRenderWrappedTextMultiLinePadded ()\n {\n // multi-line padded text\n final int width = 16;\n final int padding = 4;\n final String text = \"aaaa aaaa aaaa\" + EOL + \"aaaaaa\" + EOL + \"aaaaa\";\n final String expected = \"aaaa aaaa aaaa\" + EOL + \" aaaaaa\" + ...
{ "fields": [ { "declarator": "DEFAULT_WIDTH = 74", "modifier": "public static final", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "declarator": "DEFAULT_LEFT_PAD = 1", "modifier": "public stati...
{ "body": "protected StringBuilder renderWrappedText (final StringBuilder aSB, final int nWidth, final int nNextLineTabStop, final String sText)\n {\n String text = sText;\n int pos = findWrapPos (text, nWidth, 0);\n if (pos == -1)\n {\n aSB.append (rtrim (text));\n return aSB;\n }\n\n aS...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_715
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetCharacterCountLong ()\n {\n long lVal = 1;\n for (int i = 1; i <= 19; ++i)\n {\n assertEquals (i, StringHelper.getCharacterCount (lVal));\n lVal *= 10;\n }\n lVal = -1;\n for (int i = 1; i <= 19; ++i)\n {\n assertEquals (1 + i, StringHelper.g...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnegative\n public static int getCharacterCount (final int nValue)\n {\n // index is always one character less than the real size; that's why nPrefix\n // is 1 more!\n final int nPrefix = nValue < 0 ? 2 : 1;\n final int nRealValue = MathHelper.abs (nValue);\n\n for (int nIndex = 0;; nIn...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_200
{ "fields": [ { "declarator": "TEST_XML = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<!DOCTYPE verrryoot>\" +\n \"<verrryoot xmlns=\\\"sthgelse\\\">\" +\n \"<!-- arg - a comment -->\" +\n ...
{ "body": "@Test\n @Ignore (\"Takes too long and was already tested with JDK 1.8 runtime parser\")\n public void testSpecialCharactersXML11CDATA ()\n {\n final EXMLSerializeVersion eXMLSerializeVersion = EXMLSerializeVersion.XML_11;\n\n final XMLWriterSettings aSettings = new XMLWriterSettings ().setSerializ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (MicroWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MicroWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nullable\n public static String getNodeAsString (@Nonnull final IMicroNode aNode, @Nonnull final IXMLWriterSettings aSettings)\n {\n ValueEnforcer.notNull (aNode, \"Node\");\n ValueEnforcer.notNull (aSettings, \"Settings\");\n\n try (final NonBlockingStringWriter aWriter = new NonBlockingString...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_650
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mutable/MutableBooleanTest.java", "identifier": "MutableBooleanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTypeConversion ()\n {\n final MutableBoolean x = new MutableBoolean (true);\n final Boolean b = TypeConverter.convert (x, Boolean.class);\n assertNotNull (b);\n assertTrue (b.booleanValue ());\n assertTrue (TypeConverter.convertToBoolean (x));\n CommonsTestHelper...
{ "fields": [ { "declarator": "m_bValue", "modifier": "private", "original_string": "private boolean m_bValue;", "type": "boolean", "var_name": "m_bValue" } ], "file": "ph-commons/src/main/java/com/helger/commons/mutable/MutableBoolean.java", "identifier": "MutableBoolean",...
{ "body": "public boolean booleanValue ()\n {\n return m_bValue;\n }", "class_method_signature": "MutableBoolean.booleanValue()", "constructor": false, "full_signature": "public boolean booleanValue()", "identifier": "booleanValue", "invocations": [], "modifiers": "public", "parameters": "()", "r...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_484
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java", "identifier": "ClassHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsFloatingPointClass ()\n {\n assertTrue (ClassHelper.isFloatingPointClass (Double.class));\n assertTrue (ClassHelper.isFloatingPointClass (double.class));\n assertTrue (ClassHelper.isFloatingPointClass (Float.class));\n assertTrue (ClassHelper.isFloatingPointClass (fl...
{ "fields": [ { "declarator": "PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8)", "modifier": "private static final", "original_string": "private static final ICommonsMap <Class <?>, Class <?>> PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8);", "type": "ICommonsMap <Class <?>, Cla...
{ "body": "public static boolean isFloatingPointClass (@Nullable final Class <?> aClass)\n {\n if (aClass == null)\n return false;\n return Double.class.isAssignableFrom (aClass) ||\n double.class.isAssignableFrom (aClass) ||\n Float.class.isAssignableFrom (aClass) ||\n float...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_191
{ "fields": [ { "declarator": "TEST_XML = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<!DOCTYPE verrryoot>\" +\n \"<verrryoot xmlns=\\\"sthgelse\\\">\" +\n \"<!-- arg - a comment -->\" +\n ...
{ "body": "@Test\n public void testSaveToStream ()\n {\n try\n {\n MicroWriter.writeToStream (null, new NonBlockingByteArrayOutputStream (), XMLWriterSettings.DEFAULT_XML_SETTINGS);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n try\n {\n MicroWriter.writeToStream ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (MicroWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MicroWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nonnull\n public static ESuccess writeToStream (@Nonnull final IMicroNode aNode, @Nonnull @WillClose final OutputStream aOS)\n {\n return writeToStream (aNode, aOS, XMLWriterSettings.DEFAULT_XML_SETTINGS);\n }", "class_method_signature": "MicroWriter.writeToStream(@Nonnull final IMicroNode aNode, ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_892
{ "fields": [], "file": "ph-datetime/src/test/java/com/helger/datetime/util/PDTDisplayHelperTest.java", "identifier": "PDTDisplayHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPeriodTextLocalDateTime ()\n {\n final LocalDateTime aLDT = PDTFactory.createLocalDateTime (2019, Month.DECEMBER, 31, 9, 0, 0);\n assertEquals (\"0 seconds\", PDTDisplayHelper.getPeriodTextEN (aLDT, aLDT));\n assertEquals (\"15 minutes and 12 seconds\",\n ...
{ "fields": [ { "declarator": "s_aInstance = new PDTDisplayHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final PDTDisplayHelper s_aInstance = new PDTDisplayHelper ();", "type": "PDTDisplayHelper", ...
{ "body": "@Nonnull\n @Nonempty\n public static String getPeriodTextEN (@Nonnull final LocalDateTime aNowLDT, @Nonnull final LocalDateTime aNotAfter)\n {\n return getPeriodText (aNowLDT, aNotAfter, IPeriodTextProvider.EN);\n }", "class_method_signature": "PDTDisplayHelper.getPeriodTextEN(@Nonnull final Local...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_742
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testGetFromLastIncl ()\n {\n assertEquals (\"abc@def.com\", StringHelper.getFromLastIncl (\"abc@def.com\", 'a'));\n assertEquals (\"com\", StringHelper.getFromLastIncl (\"abc@def.com\", 'c'));\n assertEquals (\"@def.com\", StringHelper.getFromLastIncl (\"abc@def.com\", '@'));...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nullable\n public static String getFromLastIncl (@Nullable final String sStr, final char cSearch)\n {\n return _getFromLast (sStr, cSearch, true);\n }", "class_method_signature": "StringHelper.getFromLastIncl(@Nullable final String sStr, final char cSearch)", "constructor": false, "full_signat...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_312
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/misc/SizeHelperTest.java", "identifier": "SizeHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAsPB ()\n {\n // Use fixed locale for constant decimal separator\n final SizeHelper aSH = SizeHelper.getSizeHelperOfLocale (Locale.ENGLISH);\n\n // default\n assertEquals (\"0PB\", aSH.getAsPB (0));\n assertEquals (\"5PB\", aSH.getAsPB (5 * CGlobal.BYTES_PER_PETA...
{ "fields": [ { "declarator": "B_SUFFIX = \"B\"", "modifier": "public static final", "original_string": "public static final String B_SUFFIX = \"B\";", "type": "String", "var_name": "B_SUFFIX" }, { "declarator": "KB_SUFFIX = \"KB\"", "modifier": "public static fin...
{ "body": "@Nonnull\n public String getAsPB (final long nSize)\n {\n return _format (nSize / CGlobal.BYTES_PER_PETABYTE) + PB_SUFFIX;\n }", "class_method_signature": "SizeHelper.getAsPB(final long nSize)", "constructor": false, "full_signature": "@Nonnull public String getAsPB(final long nSize)", "ident...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_607
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/regex/RegExHelperTest.java", "identifier": "RegExHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testStringMatchesPattern ()\n {\n assertTrue (RegExHelper.stringMatchesPattern (\"[0-9]+\", \"1234\"));\n assertTrue (RegExHelper.stringMatchesPattern (\"[0-9]+\", \"0\"));\n assertFalse (RegExHelper.stringMatche...
{ "fields": [ { "declarator": "s_aInstance = new RegExHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final RegExHelper s_aInstance = new RegExHelper ();", "type": "RegExHelper", "var_name": "s_a...
{ "body": "public static boolean stringMatchesPattern (@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue)\n {\n return getMatcher (sRegEx, sValue).matches ();\n }", "class_method_signature": "RegExHelper.stringMatchesPattern(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue)", ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_257
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (URLHelperTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (URLHelperTest.class);", "type": "Logger", "var_name": "LOGGER" } ], "f...
{ "body": "@Test\n @Ignore (\"Works only when being online\")\n public void testGetInputStream ()\n {\n try\n {\n final InputStream aIS = URLHelper.getInputStream (new URL (\"http://www.orf.at\"), 3000, -1, null, null);\n final byte [] aContent = StreamHelper.getAllBytes (aIS);\n LOGGER.info (...
{ "fields": [ { "declarator": "CHARSET_URL_OBJ = StandardCharsets.UTF_8", "modifier": "public static final", "original_string": "public static final Charset CHARSET_URL_OBJ = StandardCharsets.UTF_8;", "type": "Charset", "var_name": "CHARSET_URL_OBJ" }, { "declarator": "...
{ "body": "@Nullable\n public static InputStream getInputStream (@Nonnull final URL aURL,\n @CheckForSigned final int nConnectTimeoutMS,\n @CheckForSigned final int nReadTimeoutMS,\n @Null...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_538
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "mod...
{ "body": "@Test\n public void testGetLocaleNativeDisplayName ()\n {\n assertNull (LocaleHelper.getLocaleNativeDisplayName (LocaleHelper.LOCALE_ALL));\n assertNull (LocaleHelper.getLocaleNativeDisplayName (LocaleHelper.LOCALE_INDEPENDENT));\n assertNotNull (LocaleHelper.getLocaleNativeDisplayName (L_DE));\...
{ "fields": [ { "declarator": "LOCALE_SEPARATOR = '_'", "modifier": "public static final", "original_string": "public static final char LOCALE_SEPARATOR = '_';", "type": "char", "var_name": "LOCALE_SEPARATOR" }, { "declarator": "STR_ALL = \"all\"", "modifier": "pu...
{ "body": "@Nonnull\n public static String getLocaleNativeDisplayName (@Nonnull final Locale aLocale)\n {\n ValueEnforcer.notNull (aLocale, \"Locale\");\n return getLocaleDisplayName (aLocale, aLocale);\n }", "class_method_signature": "LocaleHelper.getLocaleNativeDisplayName(@Nonnull final Locale aLocale)"...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_168
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/microdom/util/MicroHelperTest.java", "identifier": "MicroHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testConvertToMicroElementWithNS ()\n {\n final String sNS = \"<root xmlns='blafoo'><ns2:element xmlns:ns2='ns2:uri' ns2:attr='value'>content</ns2:element></root>\";\n final Document aDoc = DOMReader.readXMLDOM (sNS);\n assertNotNull (aDoc);\n final IMicroDocument aMicroDoc...
{ "fields": [ { "declarator": "s_aInstance = new MicroHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final MicroHelper s_aInstance = new MicroHelper ();", "type": "MicroHelper", "var_name": "s_a...
{ "body": "@Nonnull\n public static IMicroNode convertToMicroNode (@Nonnull final Node aNode)\n {\n ValueEnforcer.notNull (aNode, \"Node\");\n\n IMicroNode ret;\n final short nNodeType = aNode.getNodeType ();\n switch (nNodeType)\n {\n case Node.DOCUMENT_NODE:\n {\n ret = new MicroDo...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_492
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java", "identifier": "ClassHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetObjectAddress ()\n {\n assertEquals (\"0x00000000\", ClassHelper.getObjectAddress (null));\n assertNotNull (ClassHelper.getObjectAddress (\"\"));\n assertNotNull (ClassHelper.getObjectAddress (String.class));\n assertNotNull (ClassHelper.getObjectAddress (Double.val...
{ "fields": [ { "declarator": "PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8)", "modifier": "private static final", "original_string": "private static final ICommonsMap <Class <?>, Class <?>> PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8);", "type": "ICommonsMap <Class <?>, Cla...
{ "body": "@Nonnull\n @Nonempty\n public static String getObjectAddress (@Nullable final Object aObject)\n {\n if (aObject == null)\n return \"0x00000000\";\n return \"0x\" + StringHelper.getHexStringLeadingZero (System.identityHashCode (aObject), 8);\n }", "class_method_signature": "ClassHelper.getO...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_884
{ "fields": [], "file": "ph-security/src/test/java/com/helger/security/certificate/CertificateHelperTest.java", "identifier": "CertificateHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Ignore (\"No key present\")\n public void testParsePrivateKey () throws GeneralSecurityException\n {\n final PrivateKey pk = CertificateHelper.convertStringToPrivateKey (\"test key here\");\n assertNotNull (pk);\n }", "class_method_signature": "CertificateHelperTest.testParsePrivateKey...
{ "fields": [ { "declarator": "BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\"", "modifier": "public static final", "original_string": "public static final String BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\";", "type": "String", "var_name": "BEGIN_CERTIFICATE" }, {...
{ "body": "@Nullable\n public static PrivateKey convertStringToPrivateKey (@Nullable final String sPrivateKey) throws GeneralSecurityException\n {\n if (StringHelper.hasNoText (sPrivateKey))\n return null;\n\n String sRealPrivateKey = StringHelper.trimStart (sPrivateKey, BEGIN_PRIVATE_KEY);\n sRealPri...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_187
{ "fields": [ { "declarator": "CRLF = ENewLineMode.DEFAULT.getText ()", "modifier": "private static final", "original_string": "private static final String CRLF = ENewLineMode.DEFAULT.getText ();", "type": "String", "var_name": "CRLF" }, { "declarator": "INDENT = XMLWri...
{ "body": "@Test\n public void testRealInvalid ()\n {\n assertNull (MicroReader.readMicroXML (\"not XML!\"));\n }", "class_method_signature": "MicroReaderTest.testRealInvalid()", "constructor": false, "full_signature": "@Test public void testRealInvalid()", "identifier": "testRealInvalid", "invocation...
{ "fields": [ { "declarator": "s_aInstance = new MicroReader ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final MicroReader s_aInstance = new MicroReader ();", "type": "MicroReader", "var_name": "s_a...
{ "body": "@Nullable\n public static IMicroDocument readMicroXML (@WillClose @Nullable final InputSource aInputSource)\n {\n return readMicroXML (aInputSource, (ISAXReaderSettings) null);\n }", "class_method_signature": "MicroReader.readMicroXML(@WillClose @Nullable final InputSource aInputSource)", "constr...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_304
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mime/MimeTypeParserTest.java", "identifier": "MimeTypeParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseInvalidQuotedString ()\n {\n final String [] aInvalid = new String [] { // Incorrectly quoted\n \"text/plain;param=\\\"\",\n \"text/plain;param= \\\"\",\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (MimeTypeParser.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MimeTypeParser.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nullable\n public static MimeType parseMimeType (@Nullable final String sMimeType)\n {\n return parseMimeType (sMimeType, CMimeType.DEFAULT_QUOTING);\n }", "class_method_signature": "MimeTypeParser.parseMimeType(@Nullable final String sMimeType)", "constructor": false, "full_signature": "@Null...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_58
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (DijkstraTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (DijkstraTest.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Test\n public void testExample1aDirected ()\n {\n final SimpleDirectedGraph g = new SimpleDirectedGraph (new SimpleDirectedGraphObjectFastFactory ());\n for (int i = 1; i <= 6; ++i)\n g.createNode (Integer.toString (i));\n g.createRelation (\"1\", \"2\").attrs ().putIn (ATTR_WEIGHT, 3);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (Dijkstra.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (Dijkstra.class);", "type": "Logger", "var_name": "LOGGER" } ], "file": "ph-...
{ "body": "@Nonnull\n public static <N extends IMutableBaseGraphNode <N, R>, R extends IMutableBaseGraphRelation <N, R>> Dijkstra.Result <N> applyDijkstra (@Nonnull final IMutableBaseGraph <N, R> aGraph,\n ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_754
{ "fields": [ { "declarator": "I_1 = Integer.valueOf (-1)", "modifier": "private static final", "original_string": "private static final Integer I_1 = Integer.valueOf (-1);", "type": "Integer", "var_name": "I_1" }, { "declarator": "I0 = Integer.valueOf (0)", "modi...
{ "body": "@Test\n public void testParseBoolObj ()\n {\n assertSame (Boolean.TRUE, StringParser.parseBoolObj (\"true\"));\n assertSame (Boolean.TRUE, StringParser.parseBoolObj (\"TRUE\"));\n assertSame (Boolean.TRUE, StringParser.parseBoolObj (Boolean.TRUE.toString ()));\n assertSame (Boolean.FALSE, Str...
{ "fields": [ { "declarator": "DEFAULT_RADIX = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_RADIX = 10;", "type": "int", "var_name": "DEFAULT_RADIX" }, { "declarator": "s_aInstance = new StringParser ()", "modifier": ...
{ "body": "@Nullable\n public static Boolean parseBoolObj (@Nullable final Object aObject)\n {\n return parseBoolObj (aObject, null);\n }", "class_method_signature": "StringParser.parseBoolObj(@Nullable final Object aObject)", "constructor": false, "full_signature": "@Nullable public static Boolean parseB...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_241
{ "fields": [ { "declarator": "XSD1 = new ClassPathResource (\"xml/schema1.xsd\")", "modifier": "private static final", "original_string": "private static final IReadableResource XSD1 = new ClassPathResource (\"xml/schema1.xsd\");", "type": "IReadableResource", "var_name": "XSD1" ...
{ "body": "@Test\n public void testValidateDOMSource ()\n {\n // Different source type\n Document aDoc = DOMReader.readXMLDOM (XML1);\n IErrorList aErrors = XMLSchemaValidationHelper.validate (XSD1, new DOMSource (aDoc));\n assertNotNull (aErrors);\n assertEquals (0, aErrors.size ());\n aErrors = ...
{ "fields": [ { "declarator": "s_aInstance = new XMLSchemaValidationHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final XMLSchemaValidationHelper s_aInstance = new XMLSchemaValidationHelper ();", "ty...
{ "body": "@Nonnull\n public static IErrorList validate (@Nonnull final IReadableResource aSchema, @Nonnull final IReadableResource aXML)\n {\n return validate (new IReadableResource [] { aSchema }, aXML);\n }", "class_method_signature": "XMLSchemaValidationHelper.validate(@Nonnull final IReadableResource aSc...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_611
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/regex/RegExCacheTest.java", "identifier": "RegExCacheTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testGetPattern ()\n {\n assertNotNull (RegExCache.getPattern (\"xy\"));\n assertSame (RegExCache.getPattern (\"xy\"), RegExCache.getPattern (\"xy\"));\n assertNotSame (RegExCache.getPattern (\"xy\"), RegExCache.g...
{ "fields": [ { "declarator": "MAX_CACHE_SIZE = 1000", "modifier": "public static final", "original_string": "public static final int MAX_CACHE_SIZE = 1000;", "type": "int", "var_name": "MAX_CACHE_SIZE" }, { "declarator": "s_bDefaultInstantiated = false", "modifie...
{ "body": "@Nonnull\n public static Pattern getPattern (@Nonnull @Nonempty @RegEx final String sRegEx)\n {\n return getInstance ().getFromCache (new RegExPattern (sRegEx));\n }", "class_method_signature": "RegExCache.getPattern(@Nonnull @Nonempty @RegEx final String sRegEx)", "constructor": false, "full_s...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_580
{ "fields": [ { "declarator": "ESCAPE_TEST_STRING = \"\\\\\\\\1\\\\2\\\\\\\"3\\\\\"", "modifier": "private static final", "original_string": "private static final String ESCAPE_TEST_STRING = \"\\\\\\\\1\\\\2\\\\\\\"3\\\\\";", "type": "String", "var_name": "ESCAPE_TEST_STRING" }, ...
{ "body": "@Test\n public void testParseLine () throws Exception\n {\n final ICommonsList <String> nextItem = m_aParser.parseLine (\"This, is, a, test.\");\n assertEquals (4, nextItem.size ());\n assertEquals (\"This\", nextItem.get (0));\n assertEquals (\" is\", nextItem.get (1));\n assertEquals (\"...
{ "fields": [ { "declarator": "m_cSeparatorChar = CCSV.DEFAULT_SEPARATOR", "modifier": "private", "original_string": "private char m_cSeparatorChar = CCSV.DEFAULT_SEPARATOR;", "type": "char", "var_name": "m_cSeparatorChar" }, { "declarator": "m_cQuoteChar = CCSV.DEFAULT...
{ "body": "@Nullable\n public ICommonsList <String> parseLine (@Nullable final String sNextLine) throws IOException\n {\n return _parseLine (sNextLine, false);\n }", "class_method_signature": "CSVParser.parseLine(@Nullable final String sNextLine)", "constructor": false, "full_signature": "@Nullable public...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_703
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "private static final", "original_string": "private static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" } ], "file": "ph-commons/src/test/java/com/helger/commons/string/...
{ "body": "@Test\n public void testTrimEndRepeatedlyChar ()\n {\n assertEquals (\"Hallo Welt\", StringHelper.trimEndRepeatedly (\"Hallo Welt\", 'a'));\n assertEquals (\"Hallo Wel\", StringHelper.trimEndRepeatedly (\"Hallo Welt\", 't'));\n assertEquals (\"Hallo Wel\", StringHelper.trimEndRepeatedly (\"Hallo...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nullable\n @CheckReturnValue\n public static String trimEndRepeatedly (@Nullable final String sSrc, @Nullable final String sTail)\n {\n if (hasNoText (sSrc))\n return sSrc;\n\n final int nTailLength = getLength (sTail);\n if (nTailLength == 0)\n return sSrc;\n\n String ret = sSrc;...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_353
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/PathOperationsTest.java", "identifier": "PathOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteDir ()\n {\n final Path aDir = Paths.get (\"deldir.test\");\n try\n {\n _expectedError (PathOperations.deleteDir (aDir), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST);\n assertFalse (Files.isDirectory (aDir));\n _expectedSuccess (PathOperations.createDir (a...
{ "fields": [ { "declarator": "DEFAULT_EXCEPTION_ON_DELETE_ROOT = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT = true;", "type": "boolean", "var_name": "DEFAULT_EXCEPTION_ON_DELETE_ROOT" }, { ...
{ "body": "@Nonnull\n public static FileIOError deleteDir (@Nonnull final Path aDir)\n {\n ValueEnforcer.notNull (aDir, \"Directory\");\n\n final Path aRealDir = _getUnifiedPath (aDir);\n\n // Does the directory not exist?\n if (!aRealDir.toFile ().isDirectory ())\n return EFileIOErrorCode.SOURCE_D...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_646
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mutable/MutableCharTest.java", "identifier": "MutableCharTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMutableChar ()\n {\n final MutableChar x = new MutableChar ('\\0');\n assertEquals (0, x.charValue ());\n assertEquals (Character.valueOf ((char) 0), x.getAsCharacter ());\n assertFalse (x.isNot0 ());\n assertTrue (x.is0 ());\n\n x.inc ();\n assertEquals (1, x...
{ "fields": [ { "declarator": "m_cValue", "modifier": "private", "original_string": "private char m_cValue;", "type": "char", "var_name": "m_cValue" } ], "file": "ph-commons/src/main/java/com/helger/commons/mutable/MutableChar.java", "identifier": "MutableChar", "interfac...
{ "body": "public MutableChar (final int cValue)\n {\n this ((char) cValue);\n }", "class_method_signature": "MutableChar.MutableChar(final int cValue)", "constructor": true, "full_signature": "public MutableChar(final int cValue)", "identifier": "MutableChar", "invocations": [], "modifiers": "publi...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_216
{ "fields": [ { "declarator": "DOCTYPE_XHTML10_QNAME = \"-//W3C//DTD XHTML 1.0 Strict//EN\"", "modifier": "private static final", "original_string": "private static final String DOCTYPE_XHTML10_QNAME = \"-//W3C//DTD XHTML 1.0 Strict//EN\";", "type": "String", "var_name": "DOCTYPE_XHT...
{ "body": "@Test\n public void testWithoutEmitNamespaces ()\n {\n final Document aDoc = XMLFactory.newDocument ();\n final Element eRoot = (Element) aDoc.appendChild (aDoc.createElementNS (\"ns1url\", \"root\"));\n eRoot.appendChild (aDoc.createElementNS (\"ns2url\", \"child1\"));\n eRoot.appendChild (a...
{ "fields": [ { "declarator": "DEFAULT_XML_VERSION = EXMLVersion.XML_10", "modifier": "public static final", "original_string": "public static final EXMLVersion DEFAULT_XML_VERSION = EXMLVersion.XML_10;", "type": "EXMLVersion", "var_name": "DEFAULT_XML_VERSION" }, { "de...
{ "body": "@Nullable\n public static String getNodeAsString (@Nonnull final Node aNode, @Nonnull final IXMLWriterSettings aSettings)\n {\n // start serializing\n try (final NonBlockingStringWriter aWriter = new NonBlockingStringWriter (50 * CGlobal.BYTES_PER_KILOBYTE))\n {\n if (writeToWriter (aNode, ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...