id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
23062279_761
{ "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 testParseLongObj ()\n {\n // Object\n assertEquals (L1, StringParser.parseLongObj ((Object) \"1\"));\n assertNull (StringParser.parseLongObj ((Object) \"abc\"));\n assertEquals (L1, StringParser.parseLongObj ((Object) \"1\", L0));\n assertEquals (L0, StringParser.parseL...
{ "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 parseLongObj (@Nullable final Object aObject)\n {\n return parseLongObj (aObject, DEFAULT_RADIX, null);\n }", "class_method_signature": "StringParser.parseLongObj(@Nullable final Object aObject)", "constructor": false, "full_signature": "@Nullable public static Lo...
{ "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_331
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAllBytesAsString ()\n {\n final IReadableResource aRes = new ClassPathResource (\"streamutils-bytes\");\n assertEquals (\"abc\", StreamHelper.getAllBytesAsString (aRes, StandardCharsets.UTF_8));\n // Non existing\n assertNull (StreamHelper.getAllBytesAsString (new C...
{ "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": "@Nullable\n public static String getAllBytesAsString (@Nullable final IHasInputStream aISP, @Nonnull @Nonempty final Charset aCharset)\n {\n if (aISP == null)\n return null;\n\n return getAllBytesAsString (aISP.getInputStream (), aCharset);\n }", "class_method_signature": "StreamHelper.getA...
{ "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_624
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testBooleanArray ()\n {\n final boolean [] aBooleans = new boolean [] { true, false, true };\n assertFalse (TypeConverter.convert (aBooleans, List.class).isEmpty ());\n assertFalse (TypeConverter.convert (aBooleans, CommonsArrayList.class).isEmpty ());\n assertFalse (TypeC...
{ "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_82
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (JsonReaderTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (JsonReaderTest.class);", "type": "Logger", "var_name": "LOGGER" } ], ...
{ "body": "@Test\n public void testFilesFailure ()\n {\n for (final File f : new FileSystemIterator (\"src/test/resources/json/fail\"))\n if (f.isFile () && f.getName ().endsWith (\".json\"))\n try (final JsonReader.Builder aBuilder = JsonReader.builder ().setSource (f))\n {\n LOGGER....
{ "fields": [ { "declarator": "DEFAULT_CHARSET = StandardCharsets.UTF_8", "modifier": "public static final", "original_string": "public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;", "type": "Charset", "var_name": "DEFAULT_CHARSET" }, { "declarator": "...
{ "body": "@Nonnull\n public static Builder builder ()\n {\n return new Builder ();\n }", "class_method_signature": "JsonReader.builder()", "constructor": false, "full_signature": "@Nonnull public static Builder builder()", "identifier": "builder", "invocations": [], "modifiers": "@Nonnull public st...
{ "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_274
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/codec/RFC2616CodecTest.java", "identifier": "RFC2616CodecTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecode ()\n {\n final RFC2616Codec aCodec = new RFC2616Codec ();\n assertNull (aCodec.getDecodedAsString ((char []) null));\n assertNull (aCodec.getDecodedAsString ((String) null));\n assertEquals (\"\", aCodec.getDecodedAsString (\"\\\"\\\"\"));\n assertEquals (\"a...
{ "fields": [ { "declarator": "QUOTE_CHAR = '\"'", "modifier": "private static final", "original_string": "private static final char QUOTE_CHAR = '\"';", "type": "char", "var_name": "QUOTE_CHAR" }, { "declarator": "ESCAPE_CHAR = '\\\\'", "modifier": "private stati...
{ "body": "public void decode (@Nullable final char [] aEncodedBuffer,\n @Nonnegative final int nOfs,\n @Nonnegative final int nLen,\n @Nonnull @WillNotClose final Writer aWriter)\n {\n if (aEncodedBuffer == null)\n return;\n\n if (nLen < 2)\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_448
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/RoundHelperTest.java", "identifier": "RoundHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetFormattedExp ()\n {\n assertEquals (\"9E-1\", RoundHelper.getFormattedExp (0.9, 0, Locale.US));\n assertEquals (\"1E0\", RoundHelper.getFormattedExp (1.0, 0, Locale.US));\n assertEquals (\"1E0\", RoundHelper.getFormattedExp (1.1, 0, Locale.US));\n assertEquals (\"1E...
{ "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 getFormattedExp (final double dValue, @Nonnegative final int nScale, final Locale aLocale)\n {\n return getFormatted (dValue, nScale, EDecimalType.EXP, aLocale);\n }", "class_method_signature": "RoundHelper.getFormattedExp(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_16
{ "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 testRenderWrappedTextSingleLinePadded ()\n {\n // single line padded text\n final int width = 12;\n final int padding = 4;\n final String text = \"This is a test.\";\n final String expected = \"This is a\" + EOL + \" test.\";\n\n final StringBuilder sb = new Strin...
{ "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_599
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/format/FormatterStringSkipPrefixAndSuffixTest.java", "identifier": "FormatterStringSkipPrefixAndSuffixTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAll ()\n {\n final FormatterStringSkipPrefixAndSuffix fp = new FormatterStringSkipPrefixAndSuffix (\"a\", \"o\");\n assertEquals (\"bc\", fp.apply (\"abco\"));\n assertEquals (\"bc\", fp.apply (\"abc\"));\n assertEquals (\"bc\", fp.apply (\"bco\"));\n assertEquals (...
{ "fields": [ { "declarator": "m_sPrefix", "modifier": "private final", "original_string": "private final String m_sPrefix;", "type": "String", "var_name": "m_sPrefix" }, { "declarator": "m_sSuffix", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public String apply (@Nullable final Object aValue)\n {\n String sValue = getValueAsString (aValue);\n // strip prefix and suffix\n if (m_sPrefix.length () > 0)\n sValue = StringHelper.trimStart (sValue, m_sPrefix);\n if (m_sSuffix.length () > 0)\n sValue = StringHelper....
{ "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_433
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/base64/Base64Test.java", "identifier": "Base64Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeBytes () throws IOException\n {\n final String sSource = \"Hallo Welt! Ümläüte\";\n final String sEncoded = Base64.encodeBytes (sSource.getBytes (StandardCharsets.ISO_8859_1));\n final byte [] aDecoded = Base64.decode (sEncoded);\n\n assertArrayEquals (sSource.ge...
{ "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": "@Nonnull\n public static String encodeBytes (@Nonnull final byte [] source)\n {\n // Since we're not going to have the GZIP encoding turned on,\n // we're not going to have an IOException thrown, so\n // we should not force the user to have to catch it.\n String encoded = null;\n try\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_126
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/util/mime/MimeTypeInfoManagerTest.java", "identifier": "MimeTypeInfoManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAllMimeTypes ()\n {\n final MimeTypeInfoManager aMgr = MimeTypeInfoManager.getDefaultInstance ();\n for (final IMimeType aMimeType : aMgr.getAllMimeTypes ())\n assertNotNull (aMimeType);\n for (final String sMimeType : aMgr.getAllMimeTypeStrings ())\n assertT...
{ "fields": [ { "declarator": "MIME_TYPE_INFO_XML = \"codelists/mime-type-info.xml\"", "modifier": "public static final", "original_string": "public static final String MIME_TYPE_INFO_XML = \"codelists/mime-type-info.xml\";", "type": "String", "var_name": "MIME_TYPE_INFO_XML" }, ...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public ICommonsOrderedSet <IMimeType> getAllMimeTypes ()\n {\n final ICommonsOrderedSet <IMimeType> ret = new CommonsLinkedHashSet <> ();\n m_aRWLock.readLocked ( () -> m_aList.forEach (i -> ret.addAll (i.getAllMimeTypes ())));\n return ret;\n }", "class_meth...
{ "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_576
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java", "identifier": "CSVReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCanCloseReader () throws IOException\n {\n _createCSVReader ().close ();\n }", "class_method_signature": "CSVReaderTest.testCanCloseReader()", "constructor": false, "full_signature": "@Test public void testCanCloseReader()", "identifier": "testCanCloseReader", "invoc...
{ "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": "public void close () throws IOException\n {\n m_aReader.close ();\n }", "class_method_signature": "CSVReader.close()", "constructor": false, "full_signature": "public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "public", "parameters": "()", "ret...
{ "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_825
{ "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 testNewOrderedSetEmpty ()\n {\n final Set <String> aOrderedSet = newOrderedSet ();\n assertNotNull (aOrderedSet);\n assertEquals (0, aOrderedSet.size ());\n }", "class_method_signature": "CollectionHelperTest.testNewOrderedSetEmpty()", "constructor": false, "full_signa...
{ "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 <ELEMENTTYPE> CommonsLinkedHashSet <ELEMENTTYPE> newOrderedSet (@Nonnegative final int nInitialCapacity)\n {\n return new CommonsLinkedHashSet <> (nInitialCapacity);\n }", "class_method_signature": "CollectionHelper.newOrderedSet(@Nonnegative final in...
{ "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_258
{ "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 public void testGetApplicationFormEncoded ()\n {\n final URLParameterEncoder enc = new URLParameterEncoder (StandardCharsets.UTF_8);\n assertNull (URLHelper.getQueryParametersAsString ((URLParameterList) null, enc));\n assertNull (URLHelper.getQueryParametersAsString (new URLParameterLis...
{ "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 String getQueryParametersAsString (@Nullable final List <? extends URLParameter> aQueryParams,\n @Nullable final IEncoder <String, String> aQueryParameterEncoder)\n {\n if (CollectionHelper.isEmpty (aQueryParams))\n retur...
{ "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_608
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/regex/RegExHelperTest.java", "identifier": "RegExHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStringReplacePattern ()\n {\n assertEquals (\"xy\", RegExHelper.stringReplacePattern (\"\\\\$email\", \"$emaily\", \"x\"));\n }", "class_method_signature": "RegExHelperTest.testStringReplacePattern()", "constructor": false, "full_signature": "@Test public void testString...
{ "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": "@Nonnull\n public static String stringReplacePattern (@Nonnull @RegEx final String sRegEx,\n @Nonnull final String sValue,\n @Nullable final String sReplacement)\n {\n // Avoid NPE on invalid replacement parameter\...
{ "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_41
{ "fields": [], "file": "ph-cli/src/test/java/com/helger/cli/CmdLineParserTest.java", "identifier": "CmdLineParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseNotRepeatable () throws CmdLineParseException\n {\n final Options aOptions = new Options ().addOption (Option.builder (\"D\").args (2).valueSeparator ('=').repeatable (false).build ());\n final CmdLineParser p = new CmdLineParser (aOptions);\n\n try\n {\n p.p...
{ "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_464
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAbsFloat ()\n {\n CommonsAssert.assertEquals (0F, MathHelper.abs (0F));\n CommonsAssert.assertEquals (5F, MathHelper.abs (-5F));\n CommonsAssert.assertEquals (5F, MathHelper.abs (5F));\n CommonsAssert.assertEquals (Float.MAX_VALUE, MathHelper.abs (-Float.MAX_VALUE));\n...
{ "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": "@Nonnegative\n public static int abs (final int nValue)\n {\n // As Integer.MIN_VALUE is -2^31 and Integer.MAX_VALUE is 2^31-1 it means\n // that there is not integer value matching 2^31!!!\n if (nValue == Integer.MIN_VALUE)\n throw new IllegalArgumentException (\"There is not absolute valu...
{ "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_872
{ "fields": [], "file": "ph-security/src/test/java/com/helger/security/password/salt/PasswordSaltTest.java", "identifier": "PasswordSaltTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNotEquals ()\n {\n final PasswordSalt aSalt = new PasswordSalt ();\n for (int i = 0; i < 100; ++i)\n assertFalse (aSalt.equals (new PasswordSalt ()));\n }", "class_method_signature": "PasswordSaltTest.testNotEquals()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "DEFAULT_SALT_BYTES = 512", "modifier": "public static final", "original_string": "public static final int DEFAULT_SALT_BYTES = 512;", "type": "int", "var_name": "DEFAULT_SALT_BYTES" }, { "declarator": "m_aBytes", "modifier": "private...
{ "body": "@Override\n public boolean equals (final Object o)\n {\n if (o == this)\n return true;\n if (o == null || !getClass ().equals (o.getClass ()))\n return false;\n final PasswordSalt rhs = (PasswordSalt) o;\n return Arrays.equals (m_aBytes, rhs.m_aBytes);\n }", "class_method_signatu...
{ "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_521
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java", "identifier": "ABNFTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsDQuote ()\n {\n assertTrue (ABNF.isDQuote ('\"'));\n assertFalse (ABNF.isDQuote (0));\n }", "class_method_signature": "ABNFTest.testIsDQuote()", "constructor": false, "full_signature": "@Test public void testIsDQuote()", "identifier": "testIsDQuote", "invocation...
{ "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 isDQuote (final int nCP)\n {\n return _isBitSet (nCP, BIT_DQUOTE);\n }", "class_method_signature": "ABNF.isDQuote(final int nCP)", "constructor": false, "full_signature": "public static boolean isDQuote(final int nCP)", "identifier": "isDQuote", "invocations": [ "_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_171
{ "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 testGetChildElements ()\n {\n IMicroElement eRoot = new MicroElement (\"root\");\n assertNotNull (eRoot.getAllChildElements ());\n assertTrue (eRoot.getAllChildElements ().isEmpty ());\n assertFalse (eRoot.hasChildElements ());\n CommonsTestHelper.testToStringImplementa...
{ "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": "@Nullable\n public IMicroElement getFirstChildElement (@Nullable final Predicate <? super IMicroElement> aFilter)\n {\n return _findFirstChildElement (this, aFilter);\n }", "class_method_signature": "MicroElement.getFirstChildElement(@Nullable final Predicate <? super IMicroElement> aFilter)", "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_57
{ "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 testBasic ()\n {\n final SimpleDirectedGraph g = new SimpleDirectedGraph (new SimpleDirectedGraphObjectFastFactory ());\n g.createNode (\"O\");\n g.createNode (\"A\");\n g.createNode (\"B\");\n g.createNode (\"C\");\n g.createNode (\"D\");\n g.createNode (\"E\");\...
{ "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_472
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsExactlyOneBitSetToOneInt ()\n {\n for (int i = 0; i < 32; ++i)\n {\n final int nValue = 1 << i;\n assertTrue (MathHelper.isExactlyOneBitSetToOne (nValue));\n if (i > 0)\n {\n // for i == 0, nValue is 1 and 1+1 is 2 which is also a single bit\n ...
{ "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 boolean isExactlyOneBitSetToOne (final int n)\n {\n return n != 0 && (n & (n - 1)) == 0;\n }", "class_method_signature": "MathHelper.isExactlyOneBitSetToOne(final int n)", "constructor": false, "full_signature": "public static boolean isExactlyOneBitSetToOne(final int n)", "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_188
{ "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 testIsEqualContent ()\n {\n final String s = \"<?xml version=\\\"1.1\\\"?>\\n\" +\n \"<!DOCTYPE root [ <!ENTITY sc \\\"value\\\"> ]>\" +\n \"<root>\" +\n \"<![CDATA[x<>]]>\" +\n INDENT +\n ...
{ "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_167
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/microdom/util/MicroHelperTest.java", "identifier": "MicroHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetChildTextContentWithConversionAndNS ()\n {\n final String sNSURI = \"my-namespace-uri\";\n final IMicroElement e = new MicroElement (sNSURI, \"x\");\n assertNull (MicroHelper.getChildTextContentWithConversion (e, sNSURI, \"y\", BigInteger.class));\n final IMicroElem...
{ "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": "@Nullable\n public static <DSTTYPE> DSTTYPE getChildTextContentWithConversion (@Nonnull final IMicroElement eParentElement,\n @Nonnull final String sChildElementName,\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_537
{ "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 testGetLocaleDisplayName ()\n {\n assertNotNull (LocaleHelper.getLocaleDisplayName (null, L_DE));\n assertNotNull (LocaleHelper.getLocaleDisplayName (LocaleHelper.LOCALE_ALL, L_DE));\n assertNotNull (LocaleHelper.getLocaleDisplayName (LocaleHelper.LOCALE_INDEPENDENT, 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 getLocaleDisplayName (@Nullable final Locale aLocale, @Nonnull final Locale aContentLocale)\n {\n ValueEnforcer.notNull (aContentLocale, \"ContentLocale\");\n\n if (aLocale == null || aLocale.equals (LOCALE_INDEPENDENT))\n return ELocaleName.ID_LANGUAGE_INDEPEND...
{ "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_864
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/version/VersionTest.java", "identifier": "VersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAsString ()\n {\n Version v = new Version (1, 2, 3);\n assertEquals (\"1.2.3\", v.getAsString ());\n assertEquals (v, Version.parse (v.getAsString ()));\n\n v = Version.parse (\"1.2.3.\");\n assertEquals (\"1.2.3\", v.getAsString ());\n assertEquals (v, Versio...
{ "fields": [ { "declarator": "DEFAULT_VERSION_STRING = \"0\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_VERSION_STRING = \"0\";", "type": "String", "var_name": "DEFAULT_VERSION_STRING" }, { "declarator": "DEFAULT_VERSION...
{ "body": "@Nonnull\n public String getAsString ()\n {\n return getAsString (DEFAULT_PRINT_ZERO_ELEMENTS);\n }", "class_method_signature": "Version.getAsString()", "constructor": false, "full_signature": "@Nonnull public String getAsString()", "identifier": "getAsString", "invocations": [ "getAsSt...
{ "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_219
{ "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 testHTML4BracketMode ()\n {\n final String sINDENT = XMLWriterSettings.DEFAULT_INDENTATION_STRING;\n\n final Document aDoc = XMLFactory.newDocument (\"html\", DOCTYPE_XHTML10_QNAME, DOCTYPE_XHTML10_URI);\n final Element aHead = (Element) aDoc.getDocumentElement ().appendChild...
{ "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" ...
23062279_649
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mutable/MutableBooleanTest.java", "identifier": "MutableBooleanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMutableBoolean ()\n {\n final MutableBoolean x = new MutableBoolean (false);\n assertFalse (x.booleanValue ());\n assertSame (Boolean.FALSE, x.getAsBoolean ());\n assertTrue (x.set (true).isChanged ());\n assertTrue (x.booleanValue ());\n assertSame (Boolean.TRUE...
{ "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 MutableBoolean (final boolean bValue)\n {\n m_bValue = bValue;\n }", "class_method_signature": "MutableBoolean.MutableBoolean(final boolean bValue)", "constructor": true, "full_signature": "public MutableBoolean(final boolean bValue)", "identifier": "MutableBoolean", "invocations": [...
{ "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_425
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/datetime/PDTFormatterTest.java", "identifier": "PDTFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDefault ()\n {\n // Must be smart because \"year or era\" is used internally\n assertEquals (LocalDate.of (2015, Month.FEBRUARY, 28),\n PDTFormatter.getFormatterDate (PDTFormatter.DEFAULT_STYLE, Locale.GERMANY, EDTFormatterMode.PARSE)\n ...
{ "fields": [ { "declarator": "DEFAULT_STYLE = FormatStyle.MEDIUM", "modifier": "public static final", "original_string": "public static final FormatStyle DEFAULT_STYLE = FormatStyle.MEDIUM;", "type": "FormatStyle", "var_name": "DEFAULT_STYLE" }, { "declarator": "s_aPar...
{ "body": "@Nonnull\n public static DateTimeFormatter getFormatterDate (@Nonnull final FormatStyle eStyle,\n @Nullable final Locale aDisplayLocale,\n @Nonnull final EDTFormatterMode eMode)\n {\n return _getForma...
{ "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_833
{ "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 testGetSortedByValue ()\n {\n assertNotNull (getSortedByValue ((Map <?, String>) null));\n assertNotNull (getSortedByValue (null, IComparator.getComparatorCollating (Locale.US).reversed ()));\n\n try\n {\n // null Comparator\n getSortedByValue (newMap (), (Compar...
{ "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 extends Comparable <? super VALUETYPE>> ICommonsOrderedMap <KEYTYPE, VALUETYPE> getSortedByValue (@Nullable final Map <KEYTYPE, VALUETYPE> aMap)\n {\n if (isEmpty (aMap))\n return newOrderedMap (0);\n\n // get sorted entry lis...
{ "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_560
{ "fields": [ { "declarator": "CHARSET = StandardCharsets.ISO_8859_1", "modifier": "private static final", "original_string": "private static final Charset CHARSET = StandardCharsets.ISO_8859_1;", "type": "Charset", "var_name": "CHARSET" } ], "file": "ph-commons/src/test/java...
{ "body": "@Test\n public void testWriteAll () throws IOException\n {\n final ICommonsList <ICommonsList <String>> allElements = new CommonsArrayList <> ();\n allElements.add (StringHelper.getExploded ('#', \"Name#Phone#Email\"));\n allElements.add (StringHelper.getExploded ('#', \"Glen#1234#glen@abcd.com\...
{ "fields": [ { "declarator": "NO_QUOTE_CHARACTER = CCSV.NULL_CHARACTER", "modifier": "public static final", "original_string": "public static final char NO_QUOTE_CHARACTER = CCSV.NULL_CHARACTER;", "type": "char", "var_name": "NO_QUOTE_CHARACTER" }, { "declarator": "NO_...
{ "body": "public void writeAll (@Nonnull final List <? extends List <String>> aAllLines, final boolean bApplyQuotesToAll)\n {\n for (final List <String> aLine : aAllLines)\n writeNext (aLine, bApplyQuotesToAll);\n }", "class_method_signature": "CSVWriter.writeAll(@Nonnull final List <? extends List <Stri...
{ "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_130
{ "fields": [ { "declarator": "L_EN = new Locale (\"en\")", "modifier": "public static final", "original_string": "public static final Locale L_EN = new Locale (\"en\");", "type": "Locale", "var_name": "L_EN" } ], "file": "ph-xml/src/test/java/com/helger/xml/transform/Collect...
{ "body": "@Test\n public void testAll () throws TransformerConfigurationException, TransformerException\n {\n final CollectingTransformErrorListener el = new CollectingTransformErrorListener ();\n final TransformerFactory fac = XMLTransformerFactory.createTransformerFactory (el.andThen (new LoggingTransformE...
{ "fields": [ { "declarator": "m_aRWLock = new SimpleReadWriteLock ()", "modifier": "protected final", "original_string": "protected final SimpleReadWriteLock m_aRWLock = new SimpleReadWriteLock ();", "type": "SimpleReadWriteLock", "var_name": "m_aRWLock" }, { "declarat...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public ErrorList getErrorList ()\n {\n return m_aRWLock.readLockedGet (m_aErrors::getClone);\n }", "class_method_signature": "CollectingTransformErrorListener.getErrorList()", "constructor": false, "full_signature": "@Nonnull @ReturnsMutableCopy public ErrorLis...
{ "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_147
{ "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 testRemoveAllChildElements ()\n {\n final Document doc = _getTestDoc ();\n final Element e = doc.getDocumentElement ();\n assertEquals (10, e.getChildNodes ().getLength ());\n XMLHelper.removeAllChildElements (e);\n assertEquals (0, e.getChildNodes ().getLength ());\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": "public static void removeAllChildElements (@Nonnull final Element aElement)\n {\n ValueEnforcer.notNull (aElement, \"Element\");\n\n while (aElement.getChildNodes ().getLength () > 0)\n aElement.removeChild (aElement.getChildNodes ().item (0));\n }", "class_method_signature": "XMLHelper.remo...
{ "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_517
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java", "identifier": "ABNFTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsChar ()\n {\n for (int i = 1; i <= 0x7f; ++i)\n assertTrue (ABNF.isChar (i));\n assertFalse (ABNF.isChar (0));\n }", "class_method_signature": "ABNFTest.testIsChar()", "constructor": false, "full_signature": "@Test public void testIsChar()", "identifier": "te...
{ "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 isChar (final int nCP)\n {\n return _isBitSet (nCP, BIT_CHAR);\n }", "class_method_signature": "ABNF.isChar(final int nCP)", "constructor": false, "full_signature": "public static boolean isChar(final int nCP)", "identifier": "isChar", "invocations": [ "_isBitSet" ...
{ "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_844
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSet ()\n {\n final ICommonsSet <String> aCont = new CommonsHashSet <> (\"a\", \"b\", \"c\");\n assertTrue (EqualsHelper.equalsCollection (aCont, aCont));\n assertTrue (EqualsHelper.equalsCollection (aCont, CollectionHelper.makeUnmodifiable (aCont)));\n assertTrue (Equa...
{ "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_452
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\")\n public void testGetDividedBigDecimal ()\n {\n assertEquals (MathHelper.toBigDecimal (1.5), MathHelper.getDividedBigDecimal (3, 2));\n\n try\n {\n MathHelper.getDividedBigDecimal (5, 0);\n fail ();\n }\n c...
{ "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": "@Nonnull\n public static BigDecimal getDividedBigDecimal (final long nDividend, final long nDivisor)\n {\n final BigDecimal aDividend = BigDecimal.valueOf (nDividend);\n final BigDecimal aDivisor = BigDecimal.valueOf (nDivisor);\n return aDividend.divide (aDivisor);\n }", "class_method_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_77
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (JsonParserTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (JsonParserTest.class);", "type": "Logger", "var_name": "LOGGER" } ], ...
{ "body": "@Test\n public void testAlwaysUseBigNumberDecimal ()\n {\n final String sJson = \"5.1\";\n\n assertEquals (Double.class, ((IJsonValue) _read (sJson, null)).getValueClass ());\n assertEquals (BigDecimal.class, ((IJsonValue) _read (sJson, aParser -> aParser.setAlwaysUseBigNumber (true))).getValueC...
{ "fields": [ { "declarator": "EOI = -1", "modifier": "public static final", "original_string": "public static final int EOI = -1;", "type": "int", "var_name": "EOI" }, { "declarator": "DEFAULT_TRACK_POSITION = false", "modifier": "public static final", "ori...
{ "body": "@Nonnull\n public JsonParser setAlwaysUseBigNumber (final boolean bAlwaysUseBigNumber)\n {\n m_bAlwaysUseBigNumber = bAlwaysUseBigNumber;\n return this;\n }", "class_method_signature": "JsonParser.setAlwaysUseBigNumber(final boolean bAlwaysUseBigNumber)", "constructor": false, "full_signatur...
{ "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_281
{ "fields": [ { "declarator": "L_DE = new Locale (\"de\")", "modifier": "public static final", "original_string": "public static final Locale L_DE = new Locale (\"de\");", "type": "Locale", "var_name": "L_DE" }, { "declarator": "L_EN = new Locale (\"en\")", "modif...
{ "body": "@Test\n public void testSort ()\n {\n final int nMax = 10000;\n CommonsTestHelper.testInParallel (nMax, () -> {\n Collator c = CollatorHelper.getCollatorSpaceBeforeDot (L_DE);\n assertEquals (-1, CompareHelper.compare (\"1.1 a\", \"1.1.1 a\", c));\n c = CollatorHelper.getCollatorSpac...
{ "fields": [ { "declarator": "s_aCache = new CollatorCache ()", "modifier": "private static final", "original_string": "private static final CollatorCache s_aCache = new CollatorCache ();", "type": "CollatorCache", "var_name": "s_aCache" }, { "declarator": "s_aInstance...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public static Collator getCollatorSpaceBeforeDot (@Nullable final Locale aLocale)\n {\n // Ensure to not pass null locale in\n final Locale aRealLocale = aLocale == null ? SystemHelper.getSystemLocale () : aLocale;\n\n // Always create a clone!\n return (Coll...
{ "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_98
{ "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 testRemove ()\n {\n final Map <String, Integer> aMap = new SingleElementMap <> (\"any\", I5);\n assertNull (aMap.remove (\"dummy\"));\n assertEquals (I5, aMap.remove (\"any\"));\n assertEquals (0, aMap.size ());\n assertTrue (aMap.isEmpty ());\n assertFalse (aMap.con...
{ "fields": [ { "declarator": "m_bHasElement = false", "modifier": "private", "original_string": "private boolean m_bHasElement = false;", "type": "boolean", "var_name": "m_bHasElement" }, { "declarator": "m_aKey", "modifier": "private", "original_string": "...
{ "body": "@Nullable\n public VALUETYPE remove (@Nullable final Object aKey)\n {\n if (!containsKey (aKey))\n return null;\n final VALUETYPE aOldElement = m_aValue;\n m_bHasElement = false;\n m_aValue = null;\n m_aKey = null;\n return aOldElement;\n }", "class_method_signature": "SingleEle...
{ "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_794
{ "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 testStartsWith ()\n {\n assertTrue (startsWith (new byte [] { 0, 1, 2, 3 }, new byte [] {}));\n assertTrue (startsWith (new byte [] { 0, 1, 2, 3 }, new byte [] { 0 }));\n assertTrue (startsWith (new byte [] { 0, 1, 2, 3 }, new byte [] { 0, 1 }));\n assertTrue (startsWith (...
{ "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 startsWith (@Nonnull final byte [] aArray, @Nullable final byte [] aSearch)\n {\n if (aSearch == null)\n return false;\n return startsWith (aArray, aArray.length, aSearch, 0, aSearch.length);\n }", "class_method_signature": "ArrayHelper.startsWith(@Nonnull final byte []...
{ "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_813
{ "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 testMakeUnmodifiable ()\n {\n assertNull (makeUnmodifiable ((Collection <?>) null));\n assertNull (makeUnmodifiable ((ICommonsList <?>) null));\n assertNull (makeUnmodifiable ((Set <?>) null));\n assertNull (makeUnmodifiable ((SortedSet <?>) null));\n assertNull (makeUn...
{ "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": "@SafeVarargs\n @Nullable\n @ReturnsImmutableObject\n @CodingStyleguideUnaware\n public static <ELEMENTTYPE> List <ELEMENTTYPE> makeUnmodifiable (@Nullable final ELEMENTTYPE... aArray)\n {\n return aArray == null ? null : Collections.unmodifiableList (newList (aArray));\n }", "class_method_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_540
{ "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 testGetCalculatedLocaleListForResolving ()\n {\n try\n {\n LocaleHelper.getCalculatedLocaleListForResolving (null);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n\n // Neither language, country not variant\n List <Locale> aList = LocaleHel...
{ "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 @ReturnsImmutableObject\n @CodingStyleguideUnaware\n public static List <Locale> getCalculatedLocaleListForResolving (@Nonnull final Locale aLocale)\n {\n ValueEnforcer.notNull (aLocale, \"Locale\");\n\n return s_aLocaleListCache.getFromCache (aLocale);\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_110
{ "fields": [], "file": "ph-config/src/test/java/com/helger/config/ConfigFactoryTest.java", "identifier": "ConfigFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSystemPropertyBoolean ()\n {\n // Not present -> null -> default\n assertTrue (ConfigFactory.getDefaultConfig ().getAsBoolean (\"key.key2\", true));\n assertFalse (ConfigFactory.getDefaultConfig ().getAsBoolean (\"key.key2\", false));\n\n // Set to true\n SystemProp...
{ "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 IConfig getDefaultConfig ()\n {\n return DEFAULT_INSTANCE;\n }", "class_method_signature": "ConfigFactory.getDefaultConfig()", "constructor": false, "full_signature": "@Nonnull public static IConfig getDefaultConfig()", "identifier": "getDefaultConfig", "invocations...
{ "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_405
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAbsoluteWithEnsuredParentDirectory ()\n {\n final File aParentDir = new File (\".\");\n final String sParentBaseDir = FilenameHelper.getCleanPath (aParentDir);\n assertEquals (sParentBaseDir + \"/test.txt\", FilenameHelper.getAbsoluteWithEnsuredParentDirectory (aParent...
{ "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 public static String getAbsoluteWithEnsuredParentDirectory (@Nonnull final File aParentDirectory, @Nonnull final String sFilePath)\n {\n ValueEnforcer.notNull (aParentDirectory, \"ParentDirectory\");\n ValueEnforcer.notNull (sFilePath, \"FilePath\");\n\n final File aSubFile = new Fil...
{ "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_686
{ "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 testConcatenateOnDemand ()\n {\n assertEquals (\"abc\", StringHelper.getConcatenatedOnDemand (\"a\", \"b\", \"c\"));\n assertEquals (\"a\", StringHelper.getConcatenatedOnDemand (\"a\", \"b\", null));\n assertEquals (\"a\", StringHelper.getConcatenatedOnDemand (\"a\", \"b\", \...
{ "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 getConcatenatedOnDemand (@Nullable final String sFront, @Nullable final String sEnd)\n {\n if (sFront == null)\n return sEnd == null ? \"\" : sEnd;\n if (sEnd == null)\n return sFront;\n return sFront + sEnd;\n }", "class_method_signature": "StringHel...
{ "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_20
{ "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 testPrintOptions ()\n {\n final StringBuilder sb = new StringBuilder ();\n final HelpFormatter hf = new HelpFormatter ();\n final int leftPad = 1;\n final int descPad = 3;\n final String lpad = HelpFormatter.createPadding (leftPad);\n final String dpad = HelpFormatte...
{ "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 printOptions (@Nonnull final PrintWriter aPW,\n final int nWidth,\n @Nonnull final Options aOptions,\n final int nLeftPad,\n final int nDescPad)\n {\n final StringBuilder aSB = new St...
{ "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_2
{ "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 testUTF7optional ()\n {\n final Charset charset = tested.charsetForName (\"X-UTF-7-OPTIONAL\");\n assertNotNull (\"charset not found\", charset);\n assertEquals (UTF7Charset.class, charset.getClass ());\n assertEquals (charset, tested.charsetForName (\"x-utf-7-optional\"))...
{ "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_239
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/schema/XMLSchemaCacheTest.java", "identifier": "XMLSchemaCacheTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefault ()\n {\n final XMLSchemaCache sc = XMLSchemaCache.getInstance ();\n assertNotNull (sc);\n\n // Valid schema\n Schema aSchema = sc.getSchema (new ClassPathResource (\"xml/schema1.xsd\"));\n assertNotNull (aSchema);\n assertNotNull (sc.getValidatorFromSchem...
{ "fields": [ { "declarator": "s_bDefaultInstantiated = false", "modifier": "private static", "original_string": "private static boolean s_bDefaultInstantiated = false;", "type": "boolean", "var_name": "s_bDefaultInstantiated" }, { "declarator": "s_aRWLock = new SimpleR...
{ "body": "@Nonnull\n public static XMLSchemaCache getInstance ()\n {\n final XMLSchemaCache ret = SingletonHolder.s_aInstance;\n s_bDefaultInstantiated = true;\n return ret;\n }", "class_method_signature": "XMLSchemaCache.getInstance()", "constructor": false, "full_signature": "@Nonnull public stat...
{ "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_669
{ "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 testHexStringShort ()\n {\n assertEquals (\"fffe\", StringHelper.getHexString ((short) -2));\n assertEquals (\"ffff\", StringHelper.getHexString ((short) -1));\n assertEquals (\"0\", StringHelper.getHexString ((short) 0));\n assertEquals (\"9\", StringHelper.getHexString (...
{ "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 getHexString (final byte nValue)\n {\n // Bytes are always handled unsigned\n return Integer.toString (nValue & 0xff, CGlobal.HEX_RADIX);\n }", "class_method_signature": "StringHelper.getHexString(final byte nValue)", "constructor": false, "full_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_393
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (value = \"DMI_HARDCODED_ABSOLUTE_FILENAME\")\n public void testHasExtensionFile ()\n {\n assertTrue (FilenameHelper.hasExtension (new File (\"/usr/local/myfile.htm\"), \"htm\"));\n assertTrue (FilenameHelper.hasExtension (new File (\"/usr/local/myfile.htm\"), \"HTM\"))...
{ "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 hasExtension (@Nullable final File aFile, @Nonnull final String... aExtensions)\n {\n ValueEnforcer.notNull (aExtensions, \"Extensions\");\n\n // determine current extension.\n final String sExt = getExtension (aFile);\n for (final String sExtension : aExtensions)\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_106
{ "fields": [ { "declarator": "DELTA = 0.0001", "modifier": "private static final", "original_string": "private static final double DELTA = 0.0001;", "type": "double", "var_name": "DELTA" }, { "declarator": "FILL_FACTORS = { 0.25f, 0.5f, 0.75f, 0.9f, 0.99f }", "mo...
{ "body": "@Test\n public void testPut ()\n {\n for (final float ff : FILL_FACTORS)\n _testPutHelper (ff);\n }", "class_method_signature": "IntDoubleMapTest.testPut()", "constructor": false, "full_signature": "@Test public void testPut()", "identifier": "testPut", "invocations": [ "_testPutHe...
{ "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 = Double.NEGATIVE_INFINITY", "modifier": "public stati...
{ "body": "public double put (final int key, final double value)\n {\n if (key == FREE_KEY)\n {\n final double ret = m_dFreeValue;\n if (!m_bHasFreeKey)\n {\n ++m_nSize;\n m_bHasFreeKey = true;\n }\n m_dFreeValue = value;\n return ret;\n }\n\n int idx = _getPut...
{ "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_556
{ "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 testGetFormattedPercent ()\n {\n if (EJavaVersion.JDK_9.isSupportedVersion ())\n {\n assertEquals (\"12\\u00A0%\", LocaleFormatter.getFormattedPercent (0.123, L_DE));\n assertEquals (\"12\\u00A0%\", LocaleFormatter.getFormattedPercent (0.123, L_DE_AT));\n assertEq...
{ "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 getFormattedPercent (final double dValue, @Nonnull final Locale aDisplayLocale)\n {\n ValueEnforcer.notNull (aDisplayLocale, \"DisplayLocale\");\n\n return NumberFormat.getPercentInstance (aDisplayLocale).format (dValue);\n }", "class_method_signature": "LocaleFor...
{ "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_805
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java", "identifier": "IteratorHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIteratorFromEnumeration ()\n {\n final Enumeration <String> aSourceEnum = Collections.enumeration (newList (\"a\", \"b\", \"c\", \"d\"));\n IIterableIterator <String> it = getIterator (aSourceEnum);\n assertNotNull (it);\n assertSame (it, it.iterator ());\n asser...
{ "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": "@Nonnull\n public static <ELEMENTTYPE> IIterableIterator <ELEMENTTYPE> getIterator (@Nullable final Enumeration <? extends ELEMENTTYPE> aEnum)\n {\n return new IterableIteratorFromEnumeration <> (aEnum);\n }", "class_method_signature": "IteratorHelper.getIterator(@Nullable final Enumeration <? exte...
{ "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_413
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteFileIfExisting ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aFile = new File (\"delfile.test\");\n try\n {\n assertFalse (FileHelper.existsFile (aFile));\n _expectedSuccess (aFOM.deleteFileIfExisting (aFile));\n ...
{ "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 deleteFileIfExisting (@Nonnull final File aFile)\n {\n m_aLastError = FileOperations.deleteFileIfExisting (aFile);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.deleteFileIfExisting(@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_36
{ "fields": [], "file": "ph-cli/src/test/java/com/helger/cli/CmdLineParserTest.java", "identifier": "CmdLineParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValuesValueSepUnbounded () throws CmdLineParseException\n {\n final Options aOptions = new Options ().addOption (Option.builder (\"D\")\n .longOpt (\"def\")\n ...
{ "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_690
{ "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 testGetLastIndexOfChar ()\n {\n assertEquals (-1, StringHelper.getLastIndexOf (null, '\\0'));\n assertEquals (-1, StringHelper.getLastIndexOf (null, 'a'));\n assertEquals (-1, StringHelper.getLastIndexOf (\"b\", '\\0'));\n assertEquals (-1, StringHelper.getLastIndexOf (\"b...
{ "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 getLastIndexOf (@Nullable final String sText, @Nullable final String sSearch)\n {\n return sText != null && sSearch != null && sText.length () >= sSearch.length () ? sText.lastIndexOf (sSearch) : STRING_NOT_FOUND;\n }", "class_method_signature": "StringHelper.getLastIndexOf(@Nullab...
{ "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_385
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsValidFilenameWithPaths ()\n {\n assertFalse (FilenameHelper.isValidFilenameWithPaths (null));\n assertFalse (FilenameHelper.isValidFilenameWithPaths (\"\"));\n assertFalse (FilenameHelper.isValidFilenameWithPaths (\" \"));\n assertFalse (FilenameHelper.isValidFilenam...
{ "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 isValidFilenameWithPaths (@Nullable final String sFilename)\n {\n if (StringHelper.hasNoText (sFilename))\n return false;\n\n // Iterate filename path by path\n File aFile = new File (sFilename);\n while (aFile != null)\n {\n final String sCurFilename = aFile...
{ "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_852
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEqualsAsCollection ()\n {\n assertTrue (EqualsHelper.equalsAsList (null, null));\n assertTrue (EqualsHelper.equalsAsList (new CommonsArrayList <> (\"a\", \"b\"), ArrayHelper.newArray (\"a\", \"b\")));\n assertTrue (EqualsHelper.equalsAsList (new CommonsArrayList <> (\"a\"...
{ "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 equalsAsList (@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 // Convert...
{ "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_501
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/GenericReflectionTest.java", "identifier": "GenericReflectionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvokeMethod () throws NoSuchMethodException, IllegalAccessException, InvocationTargetException\n {\n final MockGenericInvoke gi = new MockGenericInvoke ();\n assertEquals (0, gi.getNoArgs ());\n assertEquals (0, gi.getTwoArgs ());\n GenericReflection.invokeMethod (gi,...
{ "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 invokeMethod (@Nonnull final Object aSrcObj,\n @Nonnull final String sMethodName,\n @Nullable final Object... aArgs) throws NoSuchMethodException,\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_151
{ "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 testGetAllAttributesAsMap ()\n {\n assertNotNull (XMLHelper.getAllAttributesAsMap (null));\n final Document doc = XMLFactory.newDocument ();\n final Element eRoot = (Element) doc.appendChild (doc.createElement (\"root\"));\n assertTrue (XMLHelper.getAllAttributesAsMap (eRo...
{ "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 @ReturnsMutableCopy\n public static ICommonsOrderedMap <String, String> getAllAttributesAsMap (@Nullable final Element aSrcNode)\n {\n final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();\n // Cast needed for Oracle JDK 8\n forAllAttributes (aSrcNode, (BiCo...
{ "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_444
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/RoundHelperTest.java", "identifier": "RoundHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetRoundedUpFix ()\n {\n CommonsAssert.assertEquals (0, RoundHelper.getRoundedUpFix (0, 0));\n CommonsAssert.assertEquals (0, RoundHelper.getRoundedUpFix (0.4, 0));\n CommonsAssert.assertEquals (0, RoundHelper.getRoundedUpFix (-0.4, 0));\n CommonsAssert.assertEquals (0...
{ "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": "public static double getRoundedUpFix (final double dValue, @Nonnegative final int nScale)\n {\n return getRounded (dValue, nScale, RoundingMode.HALF_UP, EDecimalType.FIX);\n }", "class_method_signature": "RoundHelper.getRoundedUpFix(final double dValue, @Nonnegative final int nScale)", "constructo...
{ "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_297
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/statistics/StatisticsHandlerKeyedSizeTest.java", "identifier": "StatisticsHandlerKeyedSizeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAll ()\n {\n final StatisticsHandlerKeyedSize sh = new StatisticsHandlerKeyedSize ();\n assertEquals (0, sh.getInvocationCount ());\n assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin (\"key1\"));\n assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin (\"key2\"));\n\n sh.add...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (StatisticsHandlerKeyedSize.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (StatisticsHandlerKeyedSize.class);", "type": "Logger", "var_name"...
{ "body": "public void addSize (@Nullable final String sKey, @Nonnegative final long nSize)\n {\n if (nSize < 0)\n if (LOGGER.isWarnEnabled ())\n LOGGER.warn (\"A negative value (\" + nSize + \") for key '\" + sKey + \"' is added to \" + getClass ().getName ());\n addValue (sKey, nSize);\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_61
{ "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 testCities ()\n {\n final SimpleGraph g = new SimpleGraph (new SimpleGraphObjectFastFactory ());\n g.createNode (\"Barcelona\");\n g.createNode (\"Narbonne\");\n g.createNode (\"Marseille\");\n g.createNode (\"Toulouse\");\n g.createNode (\"Geneve\");\n g.createNo...
{ "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_278
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/codec/ASCIIHexCodecTest.java", "identifier": "ASCIIHexCodecTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecode ()\n {\n final String sEncoded = \"616263\\n\" + \"414243>\";\n assertEquals (\"abcABC\", new ASCIIHexCodec ().getDecodedAsString (sEncoded, StandardCharsets.US_ASCII));\n }", "class_method_signature": "ASCIIHexCodecTest.testDecode()", "constructor": false, "fu...
{ "fields": [], "file": "ph-commons/src/main/java/com/helger/commons/codec/ASCIIHexCodec.java", "identifier": "ASCIIHexCodec", "interfaces": "implements IByteArrayStreamDecoder", "methods": [ { "class_method_signature": "ASCIIHexCodec.ASCIIHexCodec()", "constructor": true, "full_signatur...
{ "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_782
{ "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 testArrayEquals ()\n {\n assertTrue (isArrayEquals (null, null));\n assertFalse (isArrayEquals (new boolean [0], null));\n assertFalse (isArrayEquals (null, new boolean [0]));\n assertTrue (isArrayEquals (new boolean [0], new boolean [0]));\n assertFalse (isArrayEquals ...
{ "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 isArrayEquals (@Nullable final Object aHeadArray, @Nullable final Object aTailArray)\n {\n // Same objects?\n if (EqualsHelper.identityEqual (aHeadArray, aTailArray))\n return true;\n\n // Any of the null -> different because they are not both null\n if (aHeadArray =...
{ "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_628
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testFloatArray ()\n {\n final float [] aFloats = new float [] { 5, 1.1f, 12234.5f };\n assertFalse (TypeConverter.convert (aFloats, List.class).isEmpty ());\n assertFalse (TypeConverter.convert (aFloats, CommonsArrayList.class).isEmpty ());\n assertFalse (TypeConverter.con...
{ "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_595
{ "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 testWhitespaceBeforeEscape () throws IOException\n {\n final ICommonsList <String> nextItem = m_aParser.parseLine (\"\\\"this\\\", \\\"is\\\",\\\"a test\\\"\"); // \"this\",\n // \"is\",\"a test\"\n assertEquals (\"this\", nextItem.get (0));\n assertEquals (\"is\", nextIte...
{ "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_829
{ "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 testGetSortedArrayWithCompi ()\n {\n assertNotNull (getSorted ((String []) null, new MyStringCompi ()));\n\n try\n {\n // null comparator not allowed\n getSorted (new String [0], null);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n\n ...
{ "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 <ELEMENTTYPE extends Comparable <? super ELEMENTTYPE>> CommonsArrayList <ELEMENTTYPE> getSorted (@Nullable final IIterableIterator <? extends ELEMENTTYPE> aIter)\n {\n return getSortedInline (newList (aIter));\n }", "class_method_signature": "Collecti...
{ "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_203
{ "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 testOrderNamespaces ()\n {\n XMLWriterSettings aSettings = new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE).setUseDoubleQuotesForAttributes (false);\n\n // default order\n final IMicroElement e = new MicroElement (\"urn:stringdefault\", \"a\");\n e.setAttribut...
{ "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_653
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/vendor/VendorInfoTest.java", "identifier": "VendorInfoTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHeaderLines ()\n {\n final List <String> aList = VendorInfo.getFileHeaderLines ();\n assertNotNull (aList);\n assertFalse (aList.isEmpty ());\n }", "class_method_signature": "VendorInfoTest.testHeaderLines()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [ { "declarator": "DEFAULT_VENDOR_LOCATION = \"Vienna, Austria, Europe, World, Milky Way, Universe\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_VENDOR_LOCATION = \"Vienna, Austria, Europe, World, Milky Way, Universe\";", "type": ...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public static ICommonsList <String> getFileHeaderLines ()\n {\n final int nYear = PDTFactory.getCurrentYear ();\n return new CommonsArrayList <> (\"THIS FILE IS GENERATED - DO NOT EDIT\",\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_346
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/PathOperationsTest.java", "identifier": "PathOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDir ()\n {\n final Path aDir1 = Paths.get (\"TestDir\");\n assertFalse (Files.isDirectory (aDir1));\n _expectedSuccess (PathOperations.createDir (aDir1));\n try\n {\n assertTrue (Files.isDirectory (aDir1));\n\n // directory already exists\n _exp...
{ "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 createDir (@Nonnull final Path aDir)\n {\n ValueEnforcer.notNull (aDir, \"Directory\");\n\n final Path aRealDir = _getUnifiedPath (aDir);\n return FileOperations.createDir (aRealDir.toFile ());\n\n // // Does the directory already exist?\n // if (Files....
{ "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_716
{ "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 testCutAfterLength ()\n {\n assertEquals (\"abc...\", StringHelper.getCutAfterLength (\"abc die Katze lief im Schnee\", 3, \"...\"));\n assertEquals (\"ab\", StringHelper.getCutAfterLength (\"ab\", 3, \"...\"...
{ "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 getCutAfterLength (@Nonnull final String sValue, @Nonnegative final int nMaxLength)\n {\n return getCutAfterLength (sValue, nMaxLength, null);\n }", "class_method_signature": "StringHelper.getCutAfterLength(@Nonnull final String sValue, @Nonnegative final int nMaxLen...
{ "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_891
{ "fields": [], "file": "ph-datetime/src/test/java/com/helger/datetime/util/PDTDisplayHelperTest.java", "identifier": "PDTDisplayHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPeriodTextNumericDE ()\n {\n final IPeriodTextProvider aTP = IPeriodTextProvider.DE;\n assertEquals (\"0 Sekunden\", PDTDisplayHelper.getPeriodText (0, 0, 0, 0, 0, 0, aTP));\n assertEquals (\"1 Sekunde\", PDTDisplayHelper.getPeriodText (0, 0, 0, 0, 0, 1, aTP));\n as...
{ "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 getPeriodText (final int nYears,\n final int nMonths,\n final int nDays,\n final long nHours,\n final long nMinut...
{ "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_468
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetFractionDigits ()\n {\n assertEquals (0, MathHelper.getFractionDigits (new BigDecimal (\"-1\")));\n assertEquals (0, MathHelper.getFractionDigits (BigDecimal.ZERO));\n assertEquals (0, MathHelper.getFractionDigits (BigDecimal.ONE));\n assertEquals (0, MathHelper.get...
{ "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": "@Nonnegative\n public static int getFractionDigits (@Nonnull final BigDecimal aBD)\n {\n return getWithoutTrailingZeroes (aBD).scale ();\n }", "class_method_signature": "MathHelper.getFractionDigits(@Nonnull final BigDecimal aBD)", "constructor": false, "full_signature": "@Nonnegative public st...
{ "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_192
{ "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 testXMLVersion ()\n {\n for (final EXMLSerializeVersion eVersion : EXMLSerializeVersion.values ())\n {\n final IMicroDocument aDoc = MicroReader.readMicroXML (TEST_XML);\n final XMLWriterSettings aSettings = new XMLWriterSettings ();\n aSettings.setSerializeVersio...
{ "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_487
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java", "identifier": "ClassHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetClassPackageName ()\n {\n assertEquals (\"java.lang\", ClassHelper.getClassPackageName (String.class));\n assertEquals (\"a.b\", ClassHelper.getClassPackageName (\"a.b.c\"));\n assertEquals (\"a.b\", ClassHelper.getClassPackageName (\"a.b.c2\"));\n assertEquals (\"a...
{ "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": "@Nullable\n public static String getClassPackageName (@Nullable final Object aObject)\n {\n return aObject == null ? null : getClassPackageName (aObject.getClass ());\n }", "class_method_signature": "ClassHelper.getClassPackageName(@Nullable final Object aObject)", "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_604
{ "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 testSplitToListWithLimit ()\n {\n List <String> x = RegExHelper.getSplitToList (\"abc\", \"b\", 2);\n assertNotNull (x);\n assertEquals (2, x.size ());\n assertEquals (\"a\", x.get (0));\n assertEquals (\"c...
{ "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": "@Nonnull\n public static ICommonsList <String> getSplitToList (@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx)\n {\n return new CommonsArrayList <> (getSplitToArray (sText, sRegEx));\n }", "class_method_signature": "RegExHelper.getSplitToList(@Nullable final CharSequence sT...
{ "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_254
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/url/URLParameterDecoderTest.java", "identifier": "URLParameterDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecode ()\n {\n final URLParameterDecoder aPD = new URLParameterDecoder (StandardCharsets.ISO_8859_1);\n assertEquals (\"a b c\", aPD.getDecoded (\"a%20b+c\"));\n assertEquals (\"a b c:d\", aPD.getDecoded (\"a%20b+c%3Ad\"));\n assertEquals (\"a b c:d\", aPD.getDecoded ...
{ "fields": [ { "declarator": "m_aCharset", "modifier": "private final", "original_string": "private final Charset m_aCharset;", "type": "Charset", "var_name": "m_aCharset" } ], "file": "ph-commons/src/main/java/com/helger/commons/url/URLParameterDecoder.java", "identifier"...
{ "body": "@Nullable\n public String getDecoded (@Nullable final String sInput)\n {\n return URLHelper.urlDecodeOrNull (sInput, m_aCharset);\n }", "class_method_signature": "URLParameterDecoder.getDecoded(@Nullable final String sInput)", "constructor": false, "full_signature": "@Nullable public String get...
{ "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_741
{ "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 testGetFromFirstIncl ()\n {\n assertEquals (\"abc@def.com\", StringHelper.getFromFirstIncl (\"abc@def.com\", 'a'));\n assertEquals (\"c@def.com\", StringHelper.getFromFirstIncl (\"abc@def.com\", 'c'));\n assertEquals (\"@def.com\", StringHelper.getFromFirstIncl (\"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 getFromFirstIncl (@Nullable final String sStr, final char cSearch)\n {\n return _getFromFirst (sStr, cSearch, true);\n }", "class_method_signature": "StringHelper.getFromFirstIncl(@Nullable final String sStr, final char cSearch)", "constructor": false, "full_sig...
{ "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_311
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/misc/SizeHelperTest.java", "identifier": "SizeHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAsTB ()\n {\n // Use fixed locale for constant decimal separator\n final SizeHelper aSH = SizeHelper.getSizeHelperOfLocale (Locale.ENGLISH);\n\n // default\n assertEquals (\"0TB\", aSH.getAsTB (0));\n assertEquals (\"5TB\", aSH.getAsTB (5 * CGlobal.BYTES_PER_TERA...
{ "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 getAsTB (final long nSize)\n {\n return _format (nSize / CGlobal.BYTES_PER_TERABYTE) + TB_SUFFIX;\n }", "class_method_signature": "SizeHelper.getAsTB(final long nSize)", "constructor": false, "full_signature": "@Nonnull public String getAsTB(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_184
{ "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 testReadProcessingInstruction ()\n {\n // Read file with processing instruction\n final IMicroDocument doc = MicroReader.readMicroXML (new ClassPathResource (\"xml/xml-processing-instruction.xml\"));\n assertNotNull (doc);\n\n // Write again\n assertNotNull (MicroWriter...
{ "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_887
{ "fields": [], "file": "ph-datetime/src/test/java/com/helger/datetime/util/PDTHelperTest.java", "identifier": "PDTHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetWeekDaysBetweenl ()\n {\n final Locale aLocale = Locale.GERMANY;\n final LocalDate aWeekendDate = PDTFactory.getCurrentLocalDate ()\n .with (WeekFields.of (aLocale).dayOfWeek (), DayOfWeek.SUNDAY.getValue ());\n final LocalDa...
{ "fields": [ { "declarator": "s_aInstance = new PDTHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final PDTHelper s_aInstance = new PDTHelper ();", "type": "PDTHelper", "var_name": "s_aInstance...
{ "body": "public static int getWeekDays (@Nonnull final LocalDate aStartDate, @Nonnull final LocalDate aEndDate)\n {\n ValueEnforcer.notNull (aStartDate, \"StartDate\");\n ValueEnforcer.notNull (aEndDate, \"EndDate\");\n\n final boolean bFlip = aStartDate.isAfter (aEndDate);\n LocalDate aCurDate = bFlip...
{ "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_868
{ "fields": [ { "declarator": "JKS = EKeyStoreType.JKS.getID ()", "modifier": "private static final", "original_string": "private static final String JKS = EKeyStoreType.JKS.getID ();", "type": "String", "var_name": "JKS" }, { "declarator": "TRUSTSTORE_PRODUCTION_ALIAS_...
{ "body": "@Test\n public void testLoadKeyStore () throws Exception\n {\n LoadedKeyStore ks = KeyStoreHelper.loadKeyStore (EKeyStoreType.JKS, \"keystores/keystore-no-pw.jks\", (String) null);\n assertNotNull (ks);\n assertTrue (ks.isSuccess ());\n assertNotNull (ks.getKeyStore ());\n assertNull (ks.g...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (KeyStoreHelper.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (KeyStoreHelper.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nonnull\n public static LoadedKeyStore loadKeyStore (@Nonnull final IKeyStoreType aKeyStoreType,\n @Nullable final String sKeyStorePath,\n @Nullable final String sKeyStorePassword)\n {\n ValueEnforcer.notNull (aKe...
{ "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_491
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java", "identifier": "ClassHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetClassFromPath ()\n {\n assertEquals (\"java.lang.String\", ClassHelper.getClassFromPath (\"java/lang/String\"));\n assertEquals (\"\", ClassHelper.getClassFromPath (\"\"));\n assertEquals (\"x\", ClassHelper.getClassFromPath (\"x\"));\n assertEquals (\"x.y\", ClassH...
{ "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": "@Nullable\n public static String getClassFromPath (@Nullable final String sPath)\n {\n return sPath == null ? null : StringHelper.replaceMultipleAsString (sPath, new char [] { '\\\\', '/' }, '.');\n }", "class_method_signature": "ClassHelper.getClassFromPath(@Nullable final String sPath)", "const...
{ "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_242
{ "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 testValidateSchemaPresent ()\n {\n final Schema aSchema1 = XMLSchemaCache.getInstance ().getSchema (XSD1);\n final Schema aSchema2 = XMLSchemaCache.getInstance ().getSchema (XSD2, XSD1);\n\n // Different source type\n Document aDoc = DOMReader.readXMLDOM (XML1);\n IErro...
{ "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_612
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (HashCodeGeneratorTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (HashCodeGeneratorTest.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "@Test\n public void testAppend ()\n {\n final HashCodeGenerator aHC = new HashCodeGenerator (this);\n _appendFields (aHC);\n final HashCodeGenerator aHC2 = new HashCodeGenerator (getClass ());\n _appendFields (aHC2);\n assertEquals (aHC.getHashCode (), aHC2.getHashCode ());\n\n try\n ...
{ "fields": [ { "declarator": "INITIAL_HASHCODE = 17", "modifier": "public static final", "original_string": "public static final int INITIAL_HASHCODE = 17;", "type": "int", "var_name": "INITIAL_HASHCODE" }, { "declarator": "m_bClosed = false", "modifier": "privat...
{ "body": "@Nonnull\n public HashCodeGenerator append (final boolean x)\n {\n _checkClosed ();\n m_nHC = HashCodeCalculator.append (m_nHC, x);\n return this;\n }", "class_method_signature": "HashCodeGenerator.append(final boolean x)", "constructor": false, "full_signature": "@Nonnull public HashCode...
{ "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_307
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mime/MimeTypeParserTest.java", "identifier": "MimeTypeParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmptyValue ()\n {\n final MimeType aMT = MimeTypeParser.parseMimeType (\"application/soap+xml; action=\\\"\\\";charset=utf-8\");\n assertEquals (\"application/soap+xml;action=\\\"\\\";charset=utf-8\", aMT.getAsString ());\n }", "class_method_signature": "MimeTypeParserTes...
{ "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_757
{ "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 testParseByteObj ()\n {\n final Byte b_1 = Byte.valueOf ((byte) -1);\n final Byte b0 = Byte.valueOf ((byte) 0);\n final Byte b1 = Byte.valueOf ((byte) 1);\n\n // Object\n assertEquals (b1, StringParser.parseByteObj ((Object) \"1\"));\n assertNull (StringParser.parseB...
{ "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 Byte parseByteObj (@Nullable final Object aObject)\n {\n return parseByteObj (aObject, DEFAULT_RADIX, null);\n }", "class_method_signature": "StringParser.parseByteObj(@Nullable final Object aObject)", "constructor": false, "full_signature": "@Nullable public static By...
{ "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_583
{ "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 testParseEmptyElements () throws IOException\n {\n final ICommonsList <String> aNextLine = m_aParser.parseLine (\",,\");\n assertEquals (3, aNextLine.size ());\n assertEquals (\"\", aNextLine.get (0));\n assertEquals (\"\", aNextLine.get (1));\n assertEquals (\"\", aNex...
{ "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_429
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/datetime/PDTFromStringTest.java", "identifier": "PDTFromStringTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDateTimeFromString ()\n {\n assertEquals (LocalDateTime.of (2000, Month.JULY, 6, 0, 0),\n PDTFromString.getLocalDateTimeFromString (\"2000.07.06 00:00\", \"uuuu.MM.dd HH:mm\"));\n assertNull (PDTFromString.getLocalDateTimeFromString (\"2000.07.06\", \"uuuu.M...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (PDTFromString.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (PDTFromString.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nullable\n public static LocalDateTime getLocalDateTimeFromString (@Nullable final String sValue, @Nullable final Locale aParseLocale)\n {\n return getLocalDateTimeFromString (sValue,\n PDTFormatter.getFormatterDateTime (PDTFormatter.DEFAULT_STYLE,\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_645
{ "fields": [ { "declarator": "DELTA = 0.00001", "modifier": "private static final", "original_string": "private static final double DELTA = 0.00001;", "type": "double", "var_name": "DELTA" } ], "file": "ph-commons/src/test/java/com/helger/commons/mutable/MutableDoubleTest.ja...
{ "body": "@Test\n public void testMutableDouble ()\n {\n final MutableDouble x = new MutableDouble (0);\n assertEquals (0, x.doubleValue (), DELTA);\n assertEquals (Double.valueOf (0), x.getAsDouble ());\n assertFalse (x.isNot0 ());\n assertTrue (x.is0 ());\n\n x.inc ();\n assertEquals (1, x.d...
{ "fields": [ { "declarator": "m_dValue", "modifier": "private", "original_string": "private double m_dValue;", "type": "double", "var_name": "m_dValue" } ], "file": "ph-commons/src/main/java/com/helger/commons/mutable/MutableDouble.java", "identifier": "MutableDouble", "...
{ "body": "public MutableDouble (@Nonnull final Number aValue)\n {\n this (aValue.doubleValue ());\n }", "class_method_signature": "MutableDouble.MutableDouble(@Nonnull final Number aValue)", "constructor": true, "full_signature": "public MutableDouble(@Nonnull final Number aValue)", "identifier": "Muta...
{ "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_215
{ "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 testWithNamespaceContext ()\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 (aD...
{ "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" ...
23062279_700
{ "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 testTrimTrailingWhitespaces ()\n {\n assertEquals (\"Hallo Welt\", StringHelper.trimTrailingWhitespaces (\"Hallo Welt\"));\n assertEquals (\" Hallo Welt\", StringHelper.trimTrailingWhitespaces (\" Hallo Welt \"));\n assertEquals (\" Hallo Welt\", StringHelper.trimTrailingWhi...
{ "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 trimTrailingWhitespaces (@Nullable final String s)\n {\n final int n = getTrailingWhitespaceCount (s);\n return n == 0 ? s : s.substring (0, s.length () - n);\n }", "class_method_signature": "StringHelper.trimTrailingWhitespaces(@Nullable fin...
{ "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_350
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/PathOperationsTest.java", "identifier": "PathOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameDir ()\n {\n final Path aSrcDir = Paths.get (\"SourceDir\");\n final Path aDstDir = Paths.get (\"DestDir\");\n assertNotEquals (aSrcDir, aDstDir);\n assertFalse (Files.isDirectory (aSrcDir));\n assertFalse (Files.isDirectory (aDstDir));\n\n // create source...
{ "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 renameDir (@Nonnull final Path aSourceDir, @Nonnull final Path aTargetDir)\n {\n ValueEnforcer.notNull (aSourceDir, \"SourceDirectory\");\n ValueEnforcer.notNull (aTargetDir, \"TargetDirectory\");\n\n final Path aRealSourceDir = _getUnifiedPath (aSourceDir);\...
{ "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_422
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/dimension/SizeIntTest.java", "identifier": "SizeIntTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED\")\n public void testGetBestMatchingSize ()\n {\n final SizeInt aID = new SizeInt (320, 240);\n\n // Width\n SizeInt aID2 = aID.getBestMatchingSize (160, 180);\n assertEquals (160, aID2.getWidth ());\n assertEquals (120, aID2.getHeigh...
{ "fields": [ { "declarator": "m_nWidth", "modifier": "private final", "original_string": "private final int m_nWidth;", "type": "int", "var_name": "m_nWidth" }, { "declarator": "m_nHeight", "modifier": "private final", "original_string": "private final int ...
{ "body": "@Nonnull\n @CheckReturnValue\n public SizeInt getBestMatchingSize (@Nonnegative final int nMaxWidth, @Nonnegative final int nMaxHeight)\n {\n ValueEnforcer.isGT0 (nMaxWidth, \"MaxWidth\");\n ValueEnforcer.isGT0 (nMaxHeight, \"MaxHeight\");\n\n final double dRelWidth = MathHelper.getDividedDoubl...
{ "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_588
{ "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 testParseQuotedQuoteCharacters () throws IOException\n {\n final ICommonsList <String> aNextLine = m_aParser.parseLineMulti (\"\\\"Glen \\\"\\\"The Man\\\"\\\" Smith\\\",Athlete,Developer\\n\");\n assertEquals (3, aNextLine.size ());\n assertEquals (\"Glen \\\"The Man\\\" Smi...
{ "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> parseLineMulti (@Nullable final String sNextLine) throws IOException\n {\n return _parseLine (sNextLine, true);\n }", "class_method_signature": "CSVParser.parseLineMulti(@Nullable final String sNextLine)", "constructor": false, "full_signature": "@Nullab...
{ "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_567
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java", "identifier": "CSVReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseAll () throws IOException\n {\n try (final CSVReader aReader = _createCSVReader ())\n {\n assertEquals (7, aReader.readAll ().size ());\n }\n }", "class_method_signature": "CSVReaderTest.testParseAll()", "constructor": false, "full_signature": "@Test publ...
{ "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": "@Nonnull\n @ReturnsMutableCopy\n public ICommonsList <ICommonsList <String>> readAll () throws IOException\n {\n final ICommonsList <ICommonsList <String>> ret = new CommonsArrayList <> ();\n while (m_bHasNext)\n {\n final ICommonsList <String> aNextLineAsTokens = readNext ();\n if (a...
{ "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_137
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/XMLFactoryTest.java", "identifier": "XMLFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDocumentBuilder ()\n {\n assertNotNull (XMLFactory.getDocumentBuilder ());\n assertSame (XMLFactory.getDocumentBuilder (), XMLFactory.getDocumentBuilder ());\n }", "class_method_signature": "XMLFactoryTest.testGetDocumentBuilder()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "DEFAULT_DOM_NAMESPACE_AWARE = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_DOM_NAMESPACE_AWARE = true;", "type": "boolean", "var_name": "DEFAULT_DOM_NAMESPACE_AWARE" }, { "declarator": "...
{ "body": "@Nonnull\n public static DocumentBuilder getDocumentBuilder ()\n {\n // Lazily init\n final DocumentBuilder ret = s_aRWLock.readLockedGet ( () -> s_aDefaultDocBuilder);\n if (ret != null)\n return ret;\n\n return s_aRWLock.writeLockedGet ( () -> {\n if (s_aDefaultDocBuilder == 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_834
{ "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 testGetReverseList ()\n {\n assertNotNull (getReverseList (null));\n assertTrue (getReverseList (null).isEmpty ());\n\n // Make it not sorted :)\n final ICommonsList <String> aList = newList (\"1\", \"3\", \"2\");\n final ICommonsList <String> aReverse = getReverseList ...
{ "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": "@Nullable\n @ReturnsMutableCopy\n public static <ELEMENTTYPE> CommonsArrayList <ELEMENTTYPE> getReverseList (@Nullable final Collection <? extends ELEMENTTYPE> aCollection)\n {\n if (isEmpty (aCollection))\n return newList (0);\n\n final CommonsArrayList <ELEMENTTYPE> ret = newList (aCollecti...
{ "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_475
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (CombinationGeneratorFlexibleTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (CombinationGeneratorFlexibleTest.class);", "type": "Logger", ...
{ "body": "@Ignore (\"Takes too long\")\n @Test\n public void testHugeDataSet ()\n {\n final StopWatch aSW = StopWatch.createdStarted ();\n try\n {\n // Takes approx. 490ms on PH main machine (2012-01-21)\n // With one element more the time is at approx. 1500ms\n final Set <ICommonsList <St...
{ "fields": [ { "declarator": "m_bAllowEmpty", "modifier": "private final", "original_string": "private final boolean m_bAllowEmpty;", "type": "boolean", "var_name": "m_bAllowEmpty" }, { "declarator": "m_nSlotCount", "modifier": "private final", "original_st...
{ "body": "@Nonnull\n @ReturnsMutableCopy\n public ICommonsSet <ICommonsList <DATATYPE>> getCombinations (@Nonnull final ICommonsList <DATATYPE> aElements)\n {\n ValueEnforcer.notNull (aElements, \"Elements\");\n\n final ICommonsSet <ICommonsList <DATATYPE>> aAllResults = new CommonsHashSet <> ();\n itera...
{ "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_863
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/version/VersionTest.java", "identifier": "VersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompareTo ()\n {\n final Version v1 = new Version (1, 2, 3);\n final Version v2 = new Version (1, 2, 3);\n final Version v3 = Version.parse (\"1.2.3\");\n final Version v4 = Version.parse (\"1.2.3.alpha\");\n final Version v5 = Version.parse (\"1.2.3.beta\");\n f...
{ "fields": [ { "declarator": "DEFAULT_VERSION_STRING = \"0\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_VERSION_STRING = \"0\";", "type": "String", "var_name": "DEFAULT_VERSION_STRING" }, { "declarator": "DEFAULT_VERSION...
{ "body": "public int compareTo (@Nonnull final Version rhs)\n {\n ValueEnforcer.notNull (rhs, \"Rhs\");\n\n // compare major version\n int ret = m_nMajor - rhs.m_nMajor;\n if (ret == 0)\n {\n // compare minor version\n ret = m_nMinor - rhs.m_nMinor;\n if (ret == 0)\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" ...