id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
23062279_60
{ "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 testExample2a ()\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_279
{ "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 testNullSafeCompare ()\n {\n final String s1 = \"A\";\n final String s2 = \"B\";\n assertEquals (-1, CompareHelper.compare (s1, s2));\n assertEquals (+1, CompareHelper.compare (s2, s1));\n assertEquals (0, CompareHelper.compare (s1, s1));\n assertEquals (0, CompareHe...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUES_COME_FIRST = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_NULL_VALUES_COME_FIRST = true;", "type": "boolean", "var_name": "DEFAULT_NULL_VALUES_COME_FIRST" }, { "decla...
{ "body": "public static int compare (final byte n1, final byte n2)\n {\n return Byte.compare (n1, n2);\n }", "class_method_signature": "CompareHelper.compare(final byte n1, final byte n2)", "constructor": false, "full_signature": "public static int compare(final byte n1, final byte n2)", "identifier": "...
{ "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_783
{ "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 testGetCopy ()\n {\n {\n final Object [] x = new Object [] { \"Any\", Integer.valueOf (1), \" is \", Double.valueOf (1) };\n assertNull (getCopy ((Object []) null));\n assertTrue (isArrayEquals (x, getCopy (x)));\n assertNull (getCopy ((Object []) null, 1));\n ...
{ "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": "@Nullable\n @ReturnsMutableCopy\n public static boolean [] getCopy (@Nullable final boolean... aArray)\n {\n return aArray == null ? null : getCopy (aArray, 0, aArray.length);\n }", "class_method_signature": "ArrayHelper.getCopy(@Nullable final boolean... aArray)", "constructor": false, "full_...
{ "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_629
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testIntArray ()\n {\n final int [] aInts = new int [] { 6, 8, 110 };\n assertFalse (TypeConverter.convert (aInts, List.class).isEmpty ());\n assertFalse (TypeConverter.convert (aInts, CommonsArrayList.class).isEmpty ());\n assertFalse (TypeConverter.convert (aInts, Set.cla...
{ "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_853
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEqualsCustom ()\n {\n final MutableBoolean aPredCalled = new MutableBoolean (false);\n final BiPredicate <String, String> aPredicate = (x, y) -> {\n aPredCalled.set (true);\n return true;\n };\n\n assertTrue (EqualsHelper.equalsCustom (null, null, aPredicate)...
{ "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 <T> boolean equalsCustom (@Nullable final T aObj1, @Nullable final T aObj2, @Nonnull final BiPredicate <T, T> aPredicate)\n {\n ValueEnforcer.notNull (aPredicate, \"Predicate\");\n\n // Same object - check first\n if (identityEqual (aObj1, aObj2))\n return true;\n\n // Is on...
{ "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_500
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/lang/GenericReflectionTest.java", "identifier": "GenericReflectionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSafeForName ()\n {\n assertSame (GenericReflectionTest.class,\n GenericReflection.<GenericReflectionTest> getClassFromNameSafe (GenericReflectionTest.class.getName ()));\n assertNull (GenericReflection.getClassFromNameSafe (\"There ain't no such class\"));\n ...
{ "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 <DATATYPE> Class <DATATYPE> getClassFromNameSafe (@Nonnull final ClassLoader aClassLoader, @Nonnull final String sName)\n {\n ValueEnforcer.notNull (aClassLoader, \"ClassLoader\");\n try\n {\n return getClassFromName (aClassLoader, sName);\n }\n catch (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_150
{ "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 @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\")\n public void testGetAttributeValue ()\n {\n final Document doc = XMLFactory.newDocument ();\n final Element root = (Element) doc.appendChild (doc.createElement (\"root\"));\n assertNull (XMLHelper.getAttributeValue (root,...
{ "fields": [ { "declarator": "s_aInstance = new XMLHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final XMLHelper s_aInstance = new XMLHelper ();", "type": "XMLHelper", "var_name": "s_aInstance...
{ "body": "@Nullable\n public static String getAttributeValue (@Nonnull final Element aElement, @Nonnull final String sAttrName)\n {\n return getAttributeValue (aElement, sAttrName, null);\n }", "class_method_signature": "XMLHelper.getAttributeValue(@Nonnull final Element aElement, @Nonnull final String sAttr...
{ "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_445
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/RoundHelperTest.java", "identifier": "RoundHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n @Test\n public void testGetFormatted ()\n {\n final double d = 1.1;\n try\n {\n RoundHelper.getFormatted (d, -1, EDecimalType.FIX, Locale.US);\n fail ();\n }\n catch (final IllegalArgumentException ex)\n {}...
{ "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 getFormatted (final double dValue,\n @Nonnegative final int nScale,\n @Nonnull final EDecimalType eType,\n @Nonnull final Locale aLocale)\n {\n ValueEnforcer.isGE...
{ "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_37
{ "fields": [], "file": "ph-cli/src/test/java/com/helger/cli/CmdLineParserTest.java", "identifier": "CmdLineParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValuesValueSepUnboundedRepeatable () 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_691
{ "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 testContainsString ()\n {\n assertTrue (StringHelper.contains (\"Test\", \"Test\"));\n assertTrue (StringHelper.contains (\"Test\", \"est\"));\n assertTrue (StringHelper.contains (\"Test\", \"Tes\"));\n assertTrue (StringHelper.contains (\"Test\", \"es\"));\n assertTrue...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "public static boolean contains (@Nullable final String sText, @Nullable final String sSearch)\n {\n return getIndexOf (sText, sSearch) != STRING_NOT_FOUND;\n }", "class_method_signature": "StringHelper.contains(@Nullable final String sText, @Nullable final String sSearch)", "constructor": false, ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_384
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsValidFilename ()\n {\n assertFalse (FilenameHelper.isValidFilename (null));\n assertFalse (FilenameHelper.isValidFilename (\"\"));\n assertFalse (FilenameHelper.isValidFilename (\" \"));\n assertFalse (FilenameHelper.isValidFilename (\"abc.\"));\n assertTrue (File...
{ "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 isValidFilename (@Nullable final String sFilename)\n {\n // empty not allowed\n if (StringHelper.hasNoText (sFilename))\n return false;\n\n // path separator chars are not allowed in filenames!\n if (containsPathSeparatorChar (sFilename))\n return false;\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_107
{ "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 testRemove ()\n {\n for (final float ff : FILL_FACTORS)\n _testRemoveHelper (ff);\n }", "class_method_signature": "IntDoubleMapTest.testRemove()", "constructor": false, "full_signature": "@Test public void testRemove()", "identifier": "testRemove", "invocations": [ ...
{ "fields": [ { "declarator": "FREE_KEY = 0", "modifier": "private static final", "original_string": "private static final int FREE_KEY = 0;", "type": "int", "var_name": "FREE_KEY" }, { "declarator": "NO_VALUE = Double.NEGATIVE_INFINITY", "modifier": "public stati...
{ "body": "public double remove (final int key)\n {\n if (key == FREE_KEY)\n {\n if (!m_bHasFreeKey)\n return NO_VALUE;\n m_bHasFreeKey = false;\n final double ret = m_dFreeValue;\n m_dFreeValue = NO_VALUE;\n --m_nSize;\n return ret;\n }\n\n final int idx = _getReadIn...
{ "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_557
{ "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_Scale ()\n {\n if (EJavaVersion.JDK_9.isSupportedVersion ())\n {\n assertEquals (\"12,3\\u00A0%\", LocaleFormatter.getFormattedPercent (0.123, 1, L_DE));\n assertEquals (\"12,3\\u00A0%\", LocaleFormatter.getFormattedPercent (0.123, 1, L_DE_AT));...
{ "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_804
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java", "identifier": "IteratorHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIterator_Array ()\n {\n assertNotNull (getIterator (new String [0]));\n assertFalse (getIterator (new String [0]).hasNext ());\n assertTrue (getIterator (\"a\").hasNext ());\n }", "class_method_signature": "IteratorHelperTest.testGetIterator_Array()", "constructor...
{ "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_412
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteFile ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aFile = new File (\"delfile.test\");\n try\n {\n assertFalse (FileHelper.existsFile (aFile));\n _expectedError (aFOM.deleteFile (aFile), EFileIOErrorCode.SOURCE_D...
{ "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 deleteFile (@Nonnull final File aFile)\n {\n m_aLastError = FileOperations.deleteFile (aFile);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.deleteFile(@Nonnull final File aFile)", "constructor":...
{ "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_687
{ "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 testGetIndexOfString ()\n {\n assertEquals (-1, StringHelper.getIndexOf (null, null));\n assertEquals (-1, StringHelper.getIndexOf (null, \"a\"));\n assertEquals (-1, StringHelper.getIndexOf (\"b\", null));\n assertEquals (-1, StringHelper.getIndexOf (\"b\", \"cd\"));\n ...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "public static int getIndexOf (@Nullable final String sText, @Nullable final String sSearch)\n {\n return sText != null && sSearch != null && sText.length () >= sSearch.length () ? sText.indexOf (sSearch) : STRING_NOT_FOUND;\n }", "class_method_signature": "StringHelper.getIndexOf(@Nullable final Str...
{ "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_21
{ "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 testPrintHelpWithEmptySyntax ()\n {\n final HelpFormatter formatter = new HelpFormatter ();\n try\n {\n formatter.printHelp (null, new Options ());\n fail (\"null command line syntax should be rejected\");\n }\n catch (final NullPointerException e)\n {\n ...
{ "fields": [ { "declarator": "DEFAULT_WIDTH = 74", "modifier": "public static final", "original_string": "public static final int DEFAULT_WIDTH = 74;", "type": "int", "var_name": "DEFAULT_WIDTH" }, { "declarator": "DEFAULT_LEFT_PAD = 1", "modifier": "public stati...
{ "body": "public void printHelp (@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final Options aOptions)\n {\n printHelp (getWidth (), sCmdLineSyntax, null, aOptions, null, false);\n }", "class_method_signature": "HelpFormatter.printHelp(@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_3
{ "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 testNotHere ()\n {\n assertNull (tested.charsetForName (\"X-DOES-NOT-EXIST\"));\n }", "class_method_signature": "UTF7CharsetProviderSPITest.testNotHere()", "constructor": false, "full_signature": "@Test public void testNotHere()", "identifier": "testNotHere", "invocation...
{ "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_238
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/XMLDebugTest.java", "identifier": "XMLDebugTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNodeTypeAsString ()\n {\n assertNotNull (XMLDebug.getNodeTypeAsString (Node.ELEMENT_NODE));\n assertNotNull (XMLDebug.getNodeTypeAsString (Node.ATTRIBUTE_NODE));\n assertNotNull (XMLDebug.getNodeTypeAsString (Node.TEXT_NODE));\n assertNotNull (XMLDebug.getNodeTypeAs...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (XMLDebug.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (XMLDebug.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "@Nonnull\n public static String getNodeTypeAsString (final int nNodeType)\n {\n final EXMLDOMNodeType eNodeType = EXMLDOMNodeType.getFromIDOrNull (nNodeType);\n if (eNodeType != null)\n return eNodeType.name ();\n\n if (LOGGER.isWarnEnabled ())\n LOGGER.warn (\"Unknown Node type \" + 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_668
{ "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 testHexStringLeadingZeroLong ()\n {\n assertEquals (\"-10\", StringHelper.getHexStringLeadingZero (-16L, 2));\n assertEquals (\"-01\", StringHelper.getHexStringLeadingZero (-1L, 3));\n assertEquals (\"000\", StringHelper.getHexStringLeadingZero (0L, 3));\n assertEquals (\"...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnull\n public static String getHexStringLeadingZero (final byte nValue, final int nDigits)\n {\n return getLeadingZero (getHexString (nValue), nDigits);\n }", "class_method_signature": "StringHelper.getHexStringLeadingZero(final byte nValue, final int nDigits)", "constructor": false, "full_...
{ "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_392
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHasExtensionString ()\n {\n assertTrue (FilenameHelper.hasExtension (\"/usr/local/myfile.htm\", \"htm\"));\n assertTrue (FilenameHelper.hasExtension (\"/usr/local/myfile.htm\", \"HTM\"));\n assertFalse (FilenameHelper.hasExtension (\"/usr/local/myfile.htm\", \"html\"));\n...
{ "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_812
{ "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 testGetIntersected ()\n {\n final ICommonsList <String> l1 = newList (\"Hallo\", \"Welt\", \"from\", \"Vienna\");\n final ICommonsList <String> l2 = newList (\"Welt\", \"from\");\n\n // Result should be \"Hello\" and \"Vienna\"\n final Set <String> ret = getIntersected (l1...
{ "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> ICommonsSet <ELEMENTTYPE> getIntersected (@Nullable final Collection <? extends ELEMENTTYPE> aCollection1,\n @Nullable final Collection <? extends ELEMENTTYPE> aCollection2...
{ "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_541
{ "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 testGetLocaleFromString ()\n {\n assertEquals (SystemHelper.getSystemLocale (), LocaleHelper.getLocaleFromString (\"\"));\n assertEquals (LocaleCache.getInstance ().getLocale (\"de\"), LocaleHelper.getLocaleFromString (\"de\"));\n assertEquals (LocaleCache.getInstance ().getL...
{ "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 Locale getLocaleFromString (@Nullable final String sLocaleAsString)\n {\n if (StringHelper.hasNoText (sLocaleAsString))\n {\n // not specified => getDefault\n return SystemHelper.getSystemLocale ();\n }\n\n String sLanguage;\n String sCountry;\n String...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_111
{ "fields": [], "file": "ph-config/src/test/java/com/helger/config/ConfigFactoryTest.java", "identifier": "ConfigFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSysPropConfigResourceJson ()\n {\n SystemProperties.setPropertyValue (\"config.resource\", \"sysprops/resource.json\");\n try\n {\n final IConfig aConfig = Config.create (ConfigFactory.createDefaultValueProvider ());\n assertEquals (\"from-sysprop-resource-json0...
{ "fields": [ { "declarator": "PRIVATE_APPLICATION_JSON_PRIORITY = EConfigSourceType.RESOURCE.getDefaultPriority () - 5", "modifier": "public static final", "original_string": "public static final int PRIVATE_APPLICATION_JSON_PRIORITY = EConfigSourceType.RESOURCE.getDefaultPriority () - 5;", ...
{ "body": "@Nonnull\n public static MultiConfigurationValueProvider createDefaultValueProvider ()\n {\n final MultiConfigurationValueProvider aMCSVP = new MultiConfigurationValueProvider ();\n // Prio 400\n aMCSVP.addConfigurationSource (new ConfigurationSourceSystemProperty ());\n // Prio 300\n aMCS...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_404
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetRelativeToParentDirectory ()\n {\n final File aParentDir = new File (\".\");\n assertEquals (\"file.txt\", FilenameHelper.getRelativeToParentDirectory (new File (\"file.txt\"), aParentDir));\n assertEquals (\"dir/file.txt\", FilenameHelper.getRelativeToParentDirectory ...
{ "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 getRelativeToParentDirectory (@Nonnull final File aFile, @Nullable final File aParentDirectory)\n {\n ValueEnforcer.notNull (aFile, \"File\");\n\n final String sCleanedFile = getCleanPath (aFile);\n if (aParentDirectory == null)\n return sCleanedFile;\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_76
{ "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 testAlwaysUseBigNumberInt ()\n {\n final String sJson = \"5\";\n\n assertEquals (Integer.class, ((IJsonValue) _read (sJson, null)).getValueClass ());\n assertEquals (BigInteger.class, ((IJsonValue) _read (sJson, aParser -> aParser.setAlwaysUseBigNumber (true))).getValueClass ...
{ "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_280
{ "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 testGetCollatorSpaceBeforeDot ()\n {\n final Collator c = CollatorHelper.getCollatorSpaceBeforeDot (L_DE);\n assertNotNull (c);\n final Collator c2 = CollatorHelper.getCollatorSpaceBeforeDot (L_DE);\n assertNotNull (c2);\n assertNotSame (c, c2);\n CommonsTestHelper.t...
{ "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_99
{ "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 testPut ()\n {\n final Map <String, Integer> aMap = new SingleElementMap <> ();\n assertEquals (0, aMap.size ());\n assertNull (aMap.put (\"any\", I1));\n assertEquals (1, aMap.size ());\n assertEquals (I1, aMap.put (\"any\", I1));\n assertEquals (1, aMap.size ());\n...
{ "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 final VALUETYPE put (@Nullable final KEYTYPE aKey, @Nullable final VALUETYPE aElement)\n {\n VALUETYPE aOldElement = null;\n if (EqualsHelper.equals (aKey, m_aKey))\n {\n // Key is the same as before -> return old value\n aOldElement = m_aValue;\n }\n else\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_795
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/NonBlockingStackTest.java", "identifier": "NonBlockingStackTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCtor ()\n {\n NonBlockingStack <String> st = new NonBlockingStack <> ();\n assertTrue (st.isEmpty ());\n assertFalse (st.iterator ().hasNext ());\n st = new NonBlockingStack <> (\"s\", \"t\");\n assertEquals (2, st.size ());\n assertEquals (\"s\", st.firstElement...
{ "fields": [], "file": "ph-commons/src/main/java/com/helger/commons/collection/NonBlockingStack.java", "identifier": "NonBlockingStack", "interfaces": "", "methods": [ { "class_method_signature": "NonBlockingStack.NonBlockingStack()", "constructor": true, "full_signature": "public NonB...
{ "body": "@Nullable\n public ELEMENTTYPE firstElement ()\n {\n if (isEmpty ())\n throw new EmptyStackException ();\n return getFirst ();\n }", "class_method_signature": "NonBlockingStack.firstElement()", "constructor": false, "full_signature": "@Nullable public ELEMENTTYPE firstElement()", "ide...
{ "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_146
{ "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 testGetPathToNode ()\n {\n final Document doc = _getTestDoc ();\n assertEquals (doc.getNodeName () + \"/\", XMLHelper.getPathToNode (doc));\n assertEquals (doc.getNodeName () + \"$$\", XMLHelper.getPathToNode (doc, \"$$\"));\n\n Node e = doc.getDocumentElement ();\n ass...
{ "fields": [ { "declarator": "s_aInstance = new XMLHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final XMLHelper s_aInstance = new XMLHelper ();", "type": "XMLHelper", "var_name": "s_aInstance...
{ "body": "@Nonnull\n public static String getPathToNode (@Nonnull final Node aNode)\n {\n return getPathToNode (aNode, \"/\");\n }", "class_method_signature": "XMLHelper.getPathToNode(@Nonnull final Node aNode)", "constructor": false, "full_signature": "@Nonnull public static String getPathToNode(@Nonnul...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_516
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java", "identifier": "ABNFTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsBit ()\n {\n assertTrue (ABNF.isBit ('0'));\n assertTrue (ABNF.isBit ('1'));\n assertFalse (ABNF.isBit (0));\n }", "class_method_signature": "ABNFTest.testIsBit()", "constructor": false, "full_signature": "@Test public void testIsBit()", "identifier": "testIsBi...
{ "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 isBit (final int nCP)\n {\n return _isBitSet (nCP, BIT_BIT);\n }", "class_method_signature": "ABNF.isBit(final int nCP)", "constructor": false, "full_signature": "public static boolean isBit(final int nCP)", "identifier": "isBit", "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_845
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMap ()\n {\n final StringMap aMap = new StringMap (\"a\", \"b\").add (\"c\", \"d\");\n assertTrue (EqualsHelper.equalsCollection (aMap, aMap));\n assertTrue (EqualsHelper.equalsCollection (aMap, CollectionHelper.makeUnmodifiable (aMap)));\n assertTrue (EqualsHelper.equ...
{ "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_453
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLongToInt ()\n {\n assertEquals (Integer.MIN_VALUE, MathHelper.getLongAsInt (Integer.MIN_VALUE, 5));\n assertEquals (-1, MathHelper.getLongAsInt (-1, 5));\n assertEquals (0, MathHelper.getLongAsInt (0, 5));\n assertEquals (1, MathHelper.getLongAsInt (1, 5));\n asser...
{ "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": "@CheckReturnValue\n public static int getLongAsInt (final long nValue, final int nFallback)\n {\n return canConvertLongToInt (nValue) ? (int) nValue : nFallback;\n }", "class_method_signature": "MathHelper.getLongAsInt(final long nValue, final int nFallback)", "constructor": false, "full_signat...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_424
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/datetime/PDTFormatterTest.java", "identifier": "PDTFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetForPattern ()\n {\n for (final Locale aLocale : LocaleCache.getInstance ().getAllLocales ())\n assertNotNull (PDTFormatter.getForPattern (\"uuuu-MM-dd\", aLocale));\n assertNotNull (PDTFormatter.getForPattern (\"uuuu-MM-dd\"));\n assertNotNull (PDTFormatter.getFor...
{ "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 getForPattern (@Nonnull final String sPattern)\n {\n return getForPattern (sPattern, null);\n }", "class_method_signature": "PDTFormatter.getForPattern(@Nonnull final String sPattern)", "constructor": false, "full_signature": "@Nonnull public static Da...
{ "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_832
{ "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 testGetSortedByKey ()\n {\n assertNotNull (getSortedByKey ((Map <String, ?>) null));\n assertNotNull (getSortedByKey (null, IComparator.getComparatorCollating (Locale.US).reversed ()));\n\n try\n {\n // null Comparator\n getSortedByKey (newMap (), (Comparator <St...
{ "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 extends Comparable <? super KEYTYPE>, VALUETYPE> ICommonsOrderedMap <KEYTYPE, VALUETYPE> getSortedByKey (@Nullable final Map <KEYTYPE, VALUETYPE> aMap)\n {\n if (isEmpty (aMap))\n return newOrderedMap (0);\n\n // get sorted entry list\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_561
{ "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 testWriteAllObjects () 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@ab...
{ "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_131
{ "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 testSecure () throws TransformerConfigurationException, TransformerException\n {\n final CollectingTransformErrorListener el = new CollectingTransformErrorListener ();\n final TransformerFactory fac = XMLTransformerFactory.createTransformerFactory (el.andThen (new LoggingTransfo...
{ "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_218
{ "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 testAttributesWithNamespaces ()\n {\n final XMLWriterSettings aSettings = new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE)\n .setCharset (StandardCharsets.ISO_8859_1);\n final Document aDoc = XMLFactory....
{ "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_648
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/mutable/MutableIntTest.java", "identifier": "MutableIntTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMutableInt ()\n {\n final MutableInt x = new MutableInt (0);\n assertEquals (0, x.intValue ());\n assertEquals (Integer.valueOf (0), x.getAsInteger ());\n assertFalse (x.isNot0 ());\n assertTrue (x.is0 ());\n\n x.inc ();\n assertEquals (1, x.intValue ());\n ...
{ "fields": [ { "declarator": "m_nValue", "modifier": "private", "original_string": "private int m_nValue;", "type": "int", "var_name": "m_nValue" } ], "file": "ph-commons/src/main/java/com/helger/commons/mutable/MutableInt.java", "identifier": "MutableInt", "interfaces":...
{ "body": "public MutableInt (@Nonnull final Number aValue)\n {\n this (aValue.intValue ());\n }", "class_method_signature": "MutableInt.MutableInt(@Nonnull final Number aValue)", "constructor": true, "full_signature": "public MutableInt(@Nonnull final Number aValue)", "identifier": "MutableInt", "inv...
{ "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_473
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsExactlyOneBitSetToOneLong ()\n {\n for (int i = 0; i < 64; ++i)\n {\n final long nValue = 1L << 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_189
{ "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 testSpecialXMLAttrs ()\n {\n final String s = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" +\n \"<root xml:lang=\\\"en\\\" xml:space=\\\"preserve\\\" xml:base=\\\"baseuri\\\" xml:id=\\\"4711\\\">\" +\n \"Bla\" +\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_166
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/microdom/util/MicroHelperTest.java", "identifier": "MicroHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetChildTextContentWithNS ()\n {\n final String sNSURI = \"my-namespace-uri\";\n final IMicroElement e = new MicroElement (sNSURI, \"x\");\n assertNull (MicroHelper.getChildTextContent (e, sNSURI, \"y\"));\n final IMicroElement y = e.appendElement (sNSURI, \"y\");\n ...
{ "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 String getChildTextContent (@Nonnull final IMicroElement eParentElement, @Nonnull final String sChildElementName)\n {\n final IMicroElement eChildElement = eParentElement.getFirstChildElement (sChildElementName);\n return eChildElement != null ? eChildElement.getTextConten...
{ "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_536
{ "fields": [ { "declarator": "LOCALE = new Locale (\"de\", \"AT\", \"\")", "modifier": "private static final", "original_string": "private static final Locale LOCALE = new Locale (\"de\", \"AT\", \"\");", "type": "Locale", "var_name": "LOCALE" } ], "file": "ph-commons/src/te...
{ "body": "@Test\n public void testAddLanguage ()\n {\n assertTrue (LanguageCache.getInstance ().addLanguage (\"yx\").isChanged ());\n }", "class_method_signature": "LanguageCacheTest.testAddLanguage()", "constructor": false, "full_signature": "@Test public void testAddLanguage()", "identifier": "testAd...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (LanguageCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (LanguageCache.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Nonnull\n @VisibleForTesting\n EChange addLanguage (@Nonnull final String sLanguage)\n {\n ValueEnforcer.notNull (sLanguage, \"Language\");\n final String sValidLanguage = LocaleHelper.getValidLanguageCode (sLanguage);\n ValueEnforcer.isTrue (sValidLanguage != null, () -> \"illegal language co...
{ "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_865
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/version/VersionTest.java", "identifier": "VersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHashCode ()\n {\n CommonsTestHelper.testDefaultImplementationWithEqualContentObject (new Version (1, 2, 3, \"4\"), new Version (1, 2, 3, \"4\"));\n CommonsTestHelper.testDefaultImplementationWithEqualContentObject (new Version (1, 2, 3, \"4\"), Version.parse (\"1.2.3.4\"));\...
{ "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": "@Override\n public int hashCode ()\n {\n return new HashCodeGenerator (this).append (m_nMajor).append (m_nMinor).append (m_nMicro).append (m_sQualifier).getHashCode ();\n }", "class_method_signature": "Version.hashCode()", "constructor": false, "full_signature": "@Override public int 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_56
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (KruskalTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (KruskalTest.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Test\n public void testExample2a ()\n {\n final SimpleGraph g = new SimpleGraph ();\n g.createNode (\"O\");\n g.createNode (\"A\");\n g.createNode (\"B\");\n g.createNode (\"C\");\n g.createNode (\"D\");\n g.createNode (\"E\");\n g.createNode (\"F\");\n g.createNode (\"H\");\n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (Kruskal.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (Kruskal.class);", "type": "Logger", "var_name": "LOGGER" }, { "declara...
{ "body": "@Nonnull\n public static Kruskal.Result applyKruskal (@Nonnull final ISimpleGraph aGraph, @Nonnull @Nonempty final String sRelationCostAttr)\n {\n final ICommonsList <IMutableGraphRelation> aSortedRelations = aGraph.getAllRelationObjs ()\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_465
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java", "identifier": "MathHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAbsDouble ()\n {\n CommonsAssert.assertEquals (0D, MathHelper.abs (0D));\n CommonsAssert.assertEquals (5D, MathHelper.abs (-5D));\n CommonsAssert.assertEquals (5D, MathHelper.abs (5D));\n CommonsAssert.assertEquals (Double.MAX_VALUE, MathHelper.abs (-Double.MAX_VALUE))...
{ "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_873
{ "fields": [], "file": "ph-security/src/test/java/com/helger/security/password/salt/PasswordSaltBCryptTest.java", "identifier": "PasswordSaltBCryptTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNotEquals ()\n {\n final PasswordSaltBCrypt aSalt = new PasswordSaltBCrypt ();\n for (int i = 0; i < 100; ++i)\n assertFalse (aSalt.equals (new PasswordSaltBCrypt ()));\n }", "class_method_signature": "PasswordSaltBCryptTest.testNotEquals()", "constructor": false, ...
{ "fields": [ { "declarator": "m_aBytes", "modifier": "private final", "original_string": "private final byte [] m_aBytes;", "type": "byte []", "var_name": "m_aBytes" }, { "declarator": "m_sSalt", "modifier": "private final", "original_string": "private fina...
{ "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 PasswordSaltBCrypt rhs = (PasswordSaltBCrypt) o;\n return Arrays.equals (m_aBytes, rhs.m_aBytes);\n }", "class_me...
{ "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_520
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java", "identifier": "ABNFTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsDigit ()\n {\n for (int i = '0'; i < '9'; ++i)\n assertTrue (ABNF.isDigit (i));\n assertFalse (ABNF.isDigit (0));\n }", "class_method_signature": "ABNFTest.testIsDigit()", "constructor": false, "full_signature": "@Test public void testIsDigit()", "identifier"...
{ "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 isDigit (final int nCP)\n {\n return _isBitSet (nCP, BIT_DIGIT);\n }", "class_method_signature": "ABNF.isDigit(final int nCP)", "constructor": false, "full_signature": "public static boolean isDigit(final int nCP)", "identifier": "isDigit", "invocations": [ "_isBitS...
{ "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_170
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/microdom/util/XMLListHandlerTest.java", "identifier": "XMLListHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteInvalid ()\n {\n final ICommonsList <String> aList = new CommonsArrayList <> ();\n try\n {\n XMLListHandler.writeList (aList, (IHasOutputStream) null);\n fail ();\n }\n catch (final NullPointerException ex)\n {}\n try\n {\n XMLListHandle...
{ "fields": [ { "declarator": "ELEMENT_LIST = \"list\"", "modifier": "public static final", "original_string": "public static final String ELEMENT_LIST = \"list\";", "type": "String", "var_name": "ELEMENT_LIST" }, { "declarator": "ELEMENT_ITEM = \"item\"", "modifi...
{ "body": "@Nonnull\n public static ESuccess writeList (@Nonnull final Collection <String> aCollection, @Nonnull final IHasOutputStream aOSP)\n {\n ValueEnforcer.notNull (aOSP, \"OutputStreamProvider\");\n\n return writeList (aCollection, aOSP.getOutputStream (EAppend.DEFAULT));\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_259
{ "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 testIsClassPathURLExisting ()\n {\n assertTrue (URLHelper.isClassPathURLExisting (\"/test1.txt\"));\n assertFalse (URLHelper.isClassPathURLExisting (\"/test1 not existing.txt\"));\n }", "class_method_signature": "URLHelperTest.testIsClassPathURLExisting()", "constructor": f...
{ "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": "public static boolean isClassPathURLExisting (@Nonnull @Nonempty final String sPath)\n {\n return getClassPathURL (sPath) != null;\n }", "class_method_signature": "URLHelper.isClassPathURLExisting(@Nonnull @Nonempty final String sPath)", "constructor": false, "full_signature": "public static boo...
{ "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_609
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/regex/RegExHelperTest.java", "identifier": "RegExHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsValidPattern ()\n {\n assertTrue (RegExHelper.isValidPattern (\"\"));\n assertTrue (RegExHelper.isValidPattern (\"abc\"));\n assertTrue (RegExHelper.isValidPattern (\"ab.+c\"));\n assertTrue (RegExHelper.isValidPattern (\"^ab.+c\"));\n assertTrue (RegExHelper.isVa...
{ "fields": [ { "declarator": "s_aInstance = new RegExHelper ()", "modifier": "@PresentForCodeCoverage\n private static final", "original_string": "@PresentForCodeCoverage\n private static final RegExHelper s_aInstance = new RegExHelper ();", "type": "RegExHelper", "var_name": "s_a...
{ "body": "public static boolean isValidPattern (@Nonnull @RegEx final String sRegEx)\n {\n try\n {\n Pattern.compile (sRegEx);\n return true;\n }\n catch (final PatternSyntaxException ex)\n {\n return false;\n }\n }", "class_method_signature": "RegExHelper.isValidPattern(@Nonnull...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_40
{ "fields": [], "file": "ph-cli/src/test/java/com/helger/cli/CmdLineParserTest.java", "identifier": "CmdLineParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseRequired () throws CmdLineParseException\n {\n final Options aOptions = new Options ().addOption (Option.builder (\"D\").args (2).valueSeparator ('=').required (true).build ());\n final CmdLineParser p = new CmdLineParser (aOptions);\n\n try\n {\n p.parse (ne...
{ "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_598
{ "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 testParserHandlesNullInString () throws IOException\n {\n final ICommonsList <String> aNextLine = m_aParser.parseLine (\"because we are using\\0 parseLineMulti.\");\n\n assertEquals (1, aNextLine.size ());\n assertEquals (\"because we are using\\0 parseLineMulti.\", aNextLine...
{ "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_432
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/factory/FactoryNewInstanceTest.java", "identifier": "FactoryNewInstanceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEqualsAndHashCode ()\n {\n CommonsTestHelper.testDefaultImplementationWithEqualContentObject (FactoryNewInstance.create (String.class),\n FactoryNewInstance.create (String.class));\n CommonsTestHelper.test...
{ "fields": [ { "declarator": "m_aClass", "modifier": "private final", "original_string": "private final Class <? extends DATATYPE> m_aClass;", "type": "Class <? extends DATATYPE>", "var_name": "m_aClass" } ], "file": "ph-commons/src/main/java/com/helger/commons/factory/Facto...
{ "body": "@Nonnull\n public static <DATATYPE> FactoryNewInstance <DATATYPE> create (@Nullable final Class <DATATYPE> aClass)\n {\n return create (aClass, false);\n }", "class_method_signature": "FactoryNewInstance.create(@Nullable final Class <DATATYPE> aClass)", "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_127
{ "fields": [], "file": "ph-xml/src/test/java/com/helger/xml/RecursiveChildNodeIteratorTest.java", "identifier": "RecursiveChildNodeIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBasic ()\n {\n final Document doc = XMLFactory.newDocument ();\n\n // No children present\n assertFalse (new RecursiveChildNodeIterator (doc).hasNext ());\n\n // 1 child\n final Element eRoot = (Element) doc.appendChild (doc.createElement (\"root\"));\n int nCoun...
{ "fields": [ { "declarator": "m_aIter", "modifier": "private final", "original_string": "private final Iterator <Node> m_aIter;", "type": "Iterator <Node>", "var_name": "m_aIter" } ], "file": "ph-xml/src/main/java/com/helger/xml/RecursiveChildNodeIterator.java", "identifie...
{ "body": "public boolean hasNext ()\n {\n return m_aIter.hasNext ();\n }", "class_method_signature": "RecursiveChildNodeIterator.hasNext()", "constructor": false, "full_signature": "public boolean hasNext()", "identifier": "hasNext", "invocations": [ "hasNext" ], "modifiers": "public", "para...
{ "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_577
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java", "identifier": "CSVReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCanCreateIteratorFromReader () throws IOException\n {\n try (final CSVReader aReader = _createCSVReader ())\n {\n assertNotNull (aReader.iterator ());\n }\n }", "class_method_signature": "CSVReaderTest.testCanCreateIteratorFromReader()", "constructor": false, ...
{ "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 public Iterator <ICommonsList <String>> iterator ()\n {\n try\n {\n return new CSVIterator (this);\n }\n catch (final IOException e)\n {\n throw new UncheckedIOException (\"Error creating CSVIterator\", e);\n }\n }", "class_method_signature": "CSVReader.iterator(...
{ "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_824
{ "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 testNewSortedSet_Empty ()\n {\n final SortedSet <String> aSet = newSortedSet ();\n assertNotNull (aSet);\n assertEquals (0, aSet.size ());\n }", "class_method_signature": "CollectionHelperTest.testNewSortedSet_Empty()", "constructor": false, "full_signature": "@Test pu...
{ "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>> CommonsTreeSet <ELEMENTTYPE> newSortedSet ()\n {\n return new CommonsTreeSet <> (Comparator.nullsFirst (Comparator.naturalOrder ()));\n }", "class_method_signature": "CollectionHelper.newSortedSet...
{ "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_17
{ "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 testRenderWrappedTextSingleLinePadded2 ()\n {\n // single line padded text 2\n final int width = 53;\n final int padding = 24;\n final String text = \" -p,--period <PERIOD> PERIOD is time duration of form \" + \"DATE[-DATE] where DATE has form YYYY[MM[DD]]\";\n final ...
{ "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_449
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/math/FactorialHelperTest.java", "identifier": "FactorialHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testGetAnyFactorialLinear ()\n {\n final BigInteger y = FactorialHelper.getAnyFactorialLinear (FactorialHelper.PREDEFINED_MAX_INDEX + 1);\n assertEquals (FactorialHelper.getAnyFactorialLinear (FactorialHelper...
{ "fields": [ { "declarator": "PREDEFINED_FACTORIALS_LONG = { 1,\n 1,\n 2,\n 6,\n ...
{ "body": "@Nonnull\n public static BigInteger getAnyFactorialLinear (@Nonnegative final int n)\n {\n return new FactorialSplit ().getFactorial (n);\n }", "class_method_signature": "FactorialHelper.getAnyFactorialLinear(@Nonnegative final int n)", "constructor": false, "full_signature": "@Nonnull public 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_760
{ "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 testParseLong ()\n {\n // Object\n assertEquals (1L, StringParser.parseLong ((Object) \"1\", 0));\n assertEquals (0L, StringParser.parseLong ((Object) \"1.2\", 0));\n assertEquals (0L, StringParser.parseLong ((Object) \"0\", 0));\n assertEquals (0L, StringParser.parseLo...
{ "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": "public static long parseLong (@Nullable final Object aObject, final long nDefault)\n {\n return parseLong (aObject, DEFAULT_RADIX, nDefault);\n }", "class_method_signature": "StringParser.parseLong(@Nullable final Object aObject, final long nDefault)", "constructor": false, "full_signature": "pu...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_330
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED\")\n public void testReadLines ()\n {\n assertNull (StreamHelper.readStreamLines ((IReadableResource) null, StandardCharsets.ISO_8859_1));\n assertNull (StreamHelper.readStreamLines (new ClassPathResource (\"gibts-ned\"), Sta...
{ "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 @ReturnsMutableCopy\n public static ICommonsList <String> readStreamLines (@Nullable final IHasInputStream aISP, @Nonnull final Charset aCharset)\n {\n return readStreamLines (aISP, aCharset, 0, CGlobal.ILLEGAL_UINT);\n }", "class_method_signature": "StreamHelper.readStreamLines(@Nulla...
{ "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_625
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testByteArray ()\n {\n final byte [] aBytes = new byte [] { 5, 6, 7 };\n assertFalse (TypeConverter.convert (aBytes, List.class).isEmpty ());\n assertFalse (TypeConverter.convert (aBytes, CommonsArrayList.class).isEmpty ());\n assertFalse (TypeConverter.convert (aBytes, Se...
{ "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_83
{ "fields": [], "file": "ph-json/src/test/java/com/helger/json/serialize/JsonWriterTest.java", "identifier": "JsonWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIndent ()\n {\n final String sCRLF = JsonWriterSettings.DEFAULT_NEWLINE_STRING;\n final JsonWriter aWriter = new JsonWriter (JsonWriterSettings.DEFAULT_SETTINGS_FORMATTED);\n assertEquals (\"{}\", aWriter.writeAsString (new JsonObject ()));\n assertEquals (\"{\" + sCRL...
{ "fields": [ { "declarator": "m_aSettings", "modifier": "private final", "original_string": "private final IJsonWriterSettings m_aSettings;", "type": "IJsonWriterSettings", "var_name": "m_aSettings" } ], "file": "ph-json/src/main/java/com/helger/json/serialize/JsonWriter.jav...
{ "body": "@Nonnull\n public String writeAsString (@Nonnull final IJson aJson)\n {\n ValueEnforcer.notNull (aJson, \"Json\");\n\n try (final NonBlockingStringWriter aWriter = new NonBlockingStringWriter (1024))\n {\n writeToWriter (aJson, aWriter);\n return aWriter.getAsString ();\n }\n cat...
{ "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_275
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/codec/RFC2616CodecTest.java", "identifier": "RFC2616CodecTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsToken ()\n {\n assertFalse (RFC2616Codec.isToken (\"\"));\n assertFalse (RFC2616Codec.isToken ((String) null));\n assertFalse (RFC2616Codec.isToken ((char []) null));\n assertFalse (RFC2616Codec.isToken (\"abc \"));\n assertFalse (RFC2616Codec.isToken (\" abc\"));...
{ "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 static boolean isToken (@Nullable final String s)\n {\n // May not be empty\n if (s == null)\n return false;\n\n return isToken (s.toCharArray ());\n }", "class_method_signature": "RFC2616Codec.isToken(@Nullable final String s)", "constructor": false, "full_signature": "public ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_808
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/iterate/FilterIteratorTest.java", "identifier": "FilterIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIteration4 ()\n {\n // filtered elements at the end\n final List <String> aList = CollectionHelper.newList (\"s1\", \"s2\", \"s3\", null, null);\n final FilterIterator <String> it = new FilterIterator <> (aList, Objects::nonNull);\n assertNotNull (it);\n\n assertEqu...
{ "fields": [ { "declarator": "m_aBaseIter", "modifier": "private final", "original_string": "private final Iterator <? extends ELEMENTTYPE> m_aBaseIter;", "type": "Iterator <? extends ELEMENTTYPE>", "var_name": "m_aBaseIter" }, { "declarator": "m_aFilter", "modif...
{ "body": "@Nullable\n public ELEMENTTYPE next ()\n {\n if (!hasNext ())\n throw new NoSuchElementException ();\n final ELEMENTTYPE aRet = m_aCurrent;\n _gotoNextCurrent ();\n return aRet;\n }", "class_method_signature": "FilterIterator.next()", "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_367
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDirIfNotExisting ()\n {\n final File aDir1 = new File (\"TestDir\");\n assertFalse (FileHelper.existsDir (aDir1));\n _expectedSuccess (FileOperations.createDirIfNotExisting (aDir1));\n try\n {\n assertTrue (FileHelper.existsDir (aDir1));\n\n // direc...
{ "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 createDirIfNotExisting (@Nonnull final File aDir)\n {\n final FileIOError aError = createDir (aDir);\n if (aError.getErrorCode ().equals (EFileIOErrorCode.TARGET_ALREADY_EXISTS))\n return EFileIOErrorCode.NO_ERROR.getAsIOError (EFileIOOperation.CREATE_DIR, ...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_737
{ "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 testGetUntilFirstIncl ()\n {\n assertEquals (\"a\", StringHelper.getUntilFirstIncl (\"abc@def.com\", 'a'));\n assertEquals (\"abc\", StringHelper.getUntilFirstIncl (\"abc@def.com\", 'c'));\n assertEquals (\"abc@\", StringHelper.getUntilFirstIncl (\"abc@def.com\", '@'));\n ...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nullable\n public static String getUntilFirstIncl (@Nullable final String sStr, final char cSearch)\n {\n return _getUntilFirst (sStr, cSearch, true);\n }", "class_method_signature": "StringHelper.getUntilFirstIncl(@Nullable final String sStr, final char cSearch)", "constructor": false, "full_...
{ "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_222
{ "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 testOrderAttributes ()\n {\n XMLWriterSettings aSettings = new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE).setUseDoubleQuotesForAttributes (false);\n\n // default order\n final Document aDoc = XMLFactory.newDocument ();\n final Element e = (Element) aDoc.appe...
{ "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_672
{ "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 testGetTrailingWhitespaceCount ()\n {\n assertEquals (0, StringHelper.getTrailingWhitespaceCount (\"Hallo Welt\"));\n assertEquals (1, StringHelper.getTrailingWhitespaceCount (\" Hallo Welt \"));\n assertEquals (2, StringHelper.getTrailingWhitespaceCount (\" Hallo Welt \"))...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnegative\n public static int getTrailingWhitespaceCount (@Nullable final String s)\n {\n int ret = 0;\n if (s != null)\n {\n int nLast = s.length () - 1;\n while (nLast >= 0 && Character.isWhitespace (s.charAt (nLast)))\n {\n ++ret;\n --nLast;\n }\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_388
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsPathSeparatorChar ()\n {\n assertTrue (FilenameHelper.isPathSeparatorChar ('\\\\'));\n assertTrue (FilenameHelper.isPathSeparatorChar ('/'));\n assertFalse (FilenameHelper.isPathSeparatorChar (';'));\n }", "class_method_signature": "FilenameHelperTest.testIsPathSepar...
{ "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 isPathSeparatorChar (final char c)\n {\n return c == UNIX_SEPARATOR || c == WINDOWS_SEPARATOR;\n }", "class_method_signature": "FilenameHelper.isPathSeparatorChar(final char c)", "constructor": false, "full_signature": "public static boolean isPathSeparatorChar(final char 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_408
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDirRecursive ()\n {\n final IFileOperationManager aFOM = FileOperationManager.INSTANCE;\n final File aDir1 = new File (\"TestDir\");\n final File aDir11 = new File (aDir1, \"TestSubDir\");\n try\n {\n assertFalse (FileHelper.existsDir (aDir1));\n ass...
{ "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 createDirRecursive (@Nonnull final File aDir)\n {\n m_aLastError = FileOperations.createDirRecursive (aDir);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.createDirRecursive(@Nonnull final File aDi...
{ "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_721
{ "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 (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testReplaceAllSafe ()\n {\n assertEquals (\"abc\", StringHelper.replaceAllSafe (\"abc\", \"d\", \"e\"));\n assertEquals (\"abd\", StringHelper.replaceAllSafe (\"abc\", \"c\", \"d\"));\n assertEquals (\"adc\", Str...
{ "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 String replaceAllSafe (@Nullable final String sInputString,\n @Nonnull final String sSearchText,\n @Nullable final CharSequence aReplacementText)\n {\n return replaceAll (sInputString, sSearchText, getNotNull (aRe...
{ "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_371
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameFile ()\n {\n final File aFile = new File (\"dummy.txt\");\n final File aFile2 = new File (\"dummy2.txt\");\n assertFalse (FileHelper.existsFile (aFile));\n try\n {\n SimpleFileIO.writeFile (aFile, \"abc\".getBytes (StandardCharsets.ISO_8859_1));\n a...
{ "fields": [ { "declarator": "DEFAULT_EXCEPTION_ON_DELETE_ROOT = true", "modifier": "public static final", "original_string": "public static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT = true;", "type": "boolean", "var_name": "DEFAULT_EXCEPTION_ON_DELETE_ROOT" }, { ...
{ "body": "@Nonnull\n public static FileIOError renameFile (@Nonnull final File aSourceFile, @Nonnull final File aTargetFile)\n {\n ValueEnforcer.notNull (aSourceFile, \"SourceFile\");\n ValueEnforcer.notNull (aTargetFile, \"TargetFile\");\n\n // Does the source file exist?\n if (!FileHelper.existsFile ...
{ "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_664
{ "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 testHexStringLeadingZero2Byte ()\n {\n assertEquals (\"ff\", StringHelper.getHexStringLeadingZero2 ((byte) -1));\n assertEquals (\"00\", StringHelper.getHexStringLeadingZero2 ((byte) 0));\n assertEquals (\"09\", StringHelper.getHexStringLeadingZero2 ((byte) 9));\n assertEq...
{ "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 getHexStringLeadingZero2 (final byte nValue)\n {\n final String ret = getHexString (nValue);\n return ret.length () >= 2 ? ret : '0' + ret;\n }", "class_method_signature": "StringHelper.getHexStringLeadingZero2(final byte nValue)", "constructor": false, "full_...
{ "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_234
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (DOMReaderTest.class)", "modifier": "@SuppressWarnings (\"unused\")\n private static final", "original_string": "@SuppressWarnings (\"unused\")\n private static final Logger LOGGER = LoggerFactory.getLogger (DOMReaderTest.class);"...
{ "body": "@Test\n public void testExternalEntityExpansion ()\n {\n // Include a dummy file\n final File aFile = new File (\"src/test/resources/test1.txt\");\n assertTrue (aFile.exists ());\n final String sFileContent = StreamHelper.getAllBytesAsString (new FileSystemResource (aFile), StandardCharsets.I...
{ "fields": [ { "declarator": "s_aDomTimerHdl = StatisticsManager.getTimerHandler (DOMReader.class.getName () +\n \"$DOM\")", "modifier": "private static final", "original_string": "private s...
{ "body": "@Nullable\n public static Document readXMLDOM (@WillClose @Nonnull final InputSource aIS)\n {\n return readXMLDOM (aIS, new DOMReaderSettings ());\n }", "class_method_signature": "DOMReader.readXMLDOM(@WillClose @Nonnull final InputSource aIS)", "constructor": false, "full_signature": "@Nullabl...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_849
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIterator ()\n {\n final ICommonsList <String> aCont = new CommonsArrayList <> (\"a\", \"b\", \"c\");\n assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), aCont.iterator ()));\n assertTrue (EqualsHelper.equalsCollection (aCont.iterator (), CollectionHelper.makeU...
{ "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_326
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFlush ()\n {\n // flush null stream\n assertFalse (StreamHelper.flush ((Flushable) null).isSuccess ());\n\n // flush stream with exception\n assertFalse (StreamHelper.flush (new MockThrowingFlushable ()).isSuccess ());\n\n // flush without exception\n assertTrue ...
{ "fields": [ { "declarator": "DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE;", "type": "int", "var_name": "DEFAULT_BUFSIZE" }, { "decl...
{ "body": "@Nonnull\n public static ESuccess flush (@Nullable final Flushable aFlushable)\n {\n if (aFlushable != null)\n try\n {\n aFlushable.flush ();\n return ESuccess.SUCCESS;\n }\n catch (final NullPointerException ex)\n {\n // Happens if a java.io.FilterOutputS...
{ "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_776
{ "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 testLastElement ()\n {\n assertEquals (\"a\", getLast (\"d\", \"c\", \"b\", \"a\"));\n assertNull (getLast ((String []) null));\n assertNull (getLast (new String [0]));\n }", "class_method_signature": "ArrayHelperTest.testLastElement()", "constructor": false, "full_sig...
{ "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 getLast (@Nullable final boolean [] aArray, final boolean aDefaultValue)\n {\n final int nSize = getSize (aArray);\n return nSize == 0 ? aDefaultValue : aArray[nSize - 1];\n }", "class_method_signature": "ArrayHelper.getLast(@Nullable final boolean [] aArray, final boolean 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_263
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/url/URLProtocolRegistryTest.java", "identifier": "URLProtocolRegistryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReinitialize ()\n {\n final String sPrefix = \"xyz://\";\n final URLProtocol aCustom = new URLProtocol (sPrefix, false);\n final String sTestURL = sPrefix + \"abZZ\";\n assertFalse (URLProtocolRegistry.getInstance ().hasKnownProtocol (sTestURL));\n URLProtocolRegist...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (URLProtocolRegistry.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (URLProtocolRegistry.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "public void reinitialize ()\n {\n m_aRWLock.writeLocked ( () -> {\n m_aProtocols.clear ();\n\n // Add all default protocols\n for (final EURLProtocol aProtocol : EURLProtocol.values ())\n m_aProtocols.put (aProtocol.getProtocol (), aProtocol);\n });\n\n // Load all SPI imple...
{ "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_95
{ "fields": [], "file": "ph-collection/src/test/java/com/helger/collection/single/SingleElementListTest.java", "identifier": "SingleElementListTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\")\n public void testSubList ()\n {\n final SingleElementList <String> aList = new SingleElementList <> (\"init\");\n assertEquals (0, aList.subList (0, 0).size ());\n assertEquals (1, aList.subList (0, 1).size ());\n asse...
{ "fields": [ { "declarator": "m_bHasElement", "modifier": "private", "original_string": "private boolean m_bHasElement;", "type": "boolean", "var_name": "m_bHasElement" }, { "declarator": "m_aElement", "modifier": "private", "original_string": "private ELEM...
{ "body": "@Nonnull\n @CodingStyleguideUnaware\n public ICommonsList <ELEMENTTYPE> subList (@Nonnegative final int nFromIndex, @Nonnegative final int nToIndex)\n {\n if (nFromIndex < 0 || nFromIndex > (m_bHasElement ? 1 : 0))\n throw new IndexOutOfBoundsException (\"Invalid from index \" + nFromIndex);\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_799
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java", "identifier": "IteratorHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSize_Iterator ()\n {\n assertEquals (0, getSize ((Iterator <?>) null));\n assertEquals (0, getSize (new CommonsArrayList <String> ().iterator ()));\n assertEquals (1, getSize (newList (\"any\").iterator ()));\n }", "class_method_signature": "IteratorHelperTest.testG...
{ "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": "@Nonnegative\n public static int getSize (@Nullable final IIterableIterator <?> aIterator)\n {\n return aIterator == null ? 0 : getSize (aIterator.iterator ());\n }", "class_method_signature": "IteratorHelper.getSize(@Nullable final IIterableIterator <?> aIterator)", "constructor": false, "full...
{ "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_633
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testSpecials ()\n {\n // Test 9.2.2 changes\n assertEquals (Byte.valueOf ((byte) 1), TypeConverter.convert (\"1\", Byte.class));\n assertEquals (Byte.valueOf ((byte) 1), TypeConverter.convert (\"00000000000000001\", Byte.class));\n assertEquals (Byte.valueOf ((byte) -1), T...
{ "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_327
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java", "identifier": "StreamHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressFBWarnings (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testCopyInputStreamToOutputStream ()\n {\n final byte [] aInput = \"Hallo\".getBytes (StandardCharsets.ISO_8859_1);\n final NonBlockingByteArrayInputStream aBAIS = new NonBlockingByteArrayInputStream (aInput);\n ...
{ "fields": [ { "declarator": "DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFSIZE = 16 * CGlobal.BYTES_PER_KILOBYTE;", "type": "int", "var_name": "DEFAULT_BUFSIZE" }, { "decl...
{ "body": "@Nonnull\n public static ESuccess copyInputStreamToOutputStream (@Nullable final InputStream aIS,\n final boolean bCloseIS,\n @Nullable final OutputStream aOS,\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_777
{ "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 testIsEmpty ()\n {\n assertTrue (isEmpty ((Object []) null));\n assertTrue (isEmpty (new Boolean [0]));\n\n assertTrue (isEmpty ((Object []) null));\n assertFalse (isEmpty (new Object [] { \"x\", Boolean.FALSE }));\n\n assertTrue (isEmpty ((boolean []) null));\n asse...
{ "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 isEmpty (@Nullable final boolean... aArray)\n {\n return getSize (aArray) == 0;\n }", "class_method_signature": "ArrayHelper.isEmpty(@Nullable final boolean... aArray)", "constructor": false, "full_signature": "public static boolean isEmpty(@Nullable final boolean... aArray...
{ "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_262
{ "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 @SuppressFBWarnings (\"DMI_HARDCODED_ABSOLUTE_FILENAME\")\n public void testGetAsFile ()\n {\n final URL u = URLHelper.getAsURL (\"file:/../dir/include.xml\");\n final File f = URLHelper.getAsFile (u);\n assertNotNull (f);\n assertEquals (new File (\"/../dir/include.xml\").getAbsolut...
{ "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": "@Nonnull\n public static File getAsFile (@Nonnull final URL aURL)\n {\n ValueEnforcer.notNull (aURL, \"URL\");\n ValueEnforcer.isEqual (PROTOCOL_FILE, aURL.getProtocol (), () -> \"Not a file URL: \" + aURL.toExternalForm ());\n\n String sPath;\n File aFile;\n try\n {\n sPath = aURL...
{ "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_94
{ "fields": [], "file": "ph-collection/src/test/java/com/helger/collection/single/SingleElementListTest.java", "identifier": "SingleElementListTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddAll ()\n {\n final SingleElementList <String> aList = new SingleElementList <> (\"init\");\n\n try\n {\n // list already contains sthg.\n aList.addAll (new CommonsArrayList <> (\"Hallo\", \"Welt\"));\n fail ();\n }\n catch (final IllegalArgumentExc...
{ "fields": [ { "declarator": "m_bHasElement", "modifier": "private", "original_string": "private boolean m_bHasElement;", "type": "boolean", "var_name": "m_bHasElement" }, { "declarator": "m_aElement", "modifier": "private", "original_string": "private ELEM...
{ "body": "public boolean addAll (@Nonnull final Collection <? extends ELEMENTTYPE> aElements)\n {\n ValueEnforcer.notNull (aElements, \"Elements\");\n ValueEnforcer.isTrue (aElements.size () <= 1, \"Cannot add lists with more than one element!\");\n if (m_bHasElement)\n throw new IllegalStateException...
{ "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_798
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java", "identifier": "IteratorHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSize_IterableIterator ()\n {\n assertEquals (0, getSize ((IIterableIterator <?>) null));\n assertEquals (0, getSize (IterableIterator.createEmpty ()));\n assertEquals (1, getSize (new IterableIterator <> (newList (\"any\"))));\n }", "class_method_signature": "Iterat...
{ "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": "@Nonnegative\n public static int getSize (@Nullable final IIterableIterator <?> aIterator)\n {\n return aIterator == null ? 0 : getSize (aIterator.iterator ());\n }", "class_method_signature": "IteratorHelper.getSize(@Nullable final IIterableIterator <?> aIterator)", "constructor": false, "full...
{ "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_632
{ "fields": [ { "declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ...
{ "body": "@Test\n public void testPrimitives ()\n {\n // boolean\n assertEquals (\"true\", TypeConverter.convert (true, String.class));\n assertEquals (\"false\", TypeConverter.convert (false, String.class));\n\n // byte\n assertEquals (\"5\", TypeConverter.convert ((byte) 5, String.class));\n as...
{ "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_848
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/equals/EqualsHelperTest.java", "identifier": "EqualsHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplex ()\n {\n final ICommonsMap <ICommonsList <String>, ICommonsSet <String>> aMap = new CommonsHashMap <> ();\n aMap.put (new CommonsArrayList <> (\"a\", \"b\", \"c\"), new CommonsHashSet <> (\"a\", \"b\", \"c\"));\n aMap.put (new CommonsArrayList <> (\"a\", \"b\", \"...
{ "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_720
{ "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 (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testReplaceAllChar ()\n {\n assertEquals (\"abc\", StringHelper.replaceAll (\"abc\", 'd', 'e'));\n assertEquals (\"abd\", StringHelper.replaceAll (\"abc\", 'c', 'd'));\n assertEquals (\"adc\", StringHelper.replac...
{ "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 replaceAll (@Nullable final String sInputString,\n @Nonnull final String sSearchText,\n @Nonnull final CharSequence aReplacementText)\n {\n ValueEnforcer.notEmpty (sSearchText, \"SearchText\");\n Va...
{ "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_370
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameDir ()\n {\n final File aSrcDir = new File (\"SourceDir\");\n final File aDstDir = new File (\"DestDir\");\n assertNotEquals (aSrcDir, aDstDir);\n assertFalse (FileHelper.existsDir (aSrcDir));\n assertFalse (FileHelper.existsDir (aDstDir));\n\n // create so...
{ "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 File aSourceDir, @Nonnull final File aTargetDir)\n {\n ValueEnforcer.notNull (aSourceDir, \"SourceDirectory\");\n ValueEnforcer.notNull (aTargetDir, \"TargetDirectory\");\n\n // Does the source directory exist?\n if (!FileHelper.e...
{ "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_665
{ "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 testHexStringInt ()\n {\n assertEquals (\"-10\", StringHelper.getHexString (-16));\n assertEquals (\"-1\", StringHelper.getHexString (-1));\n assertEquals (\"0\", StringHelper.getHexString (0));\n assertEquals (\"9\", StringHelper.getHexString (9));\n assertEquals (\"a\...
{ "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_235
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger (DOMReaderTest.class)", "modifier": "@SuppressWarnings (\"unused\")\n private static final", "original_string": "@SuppressWarnings (\"unused\")\n private static final Logger LOGGER = LoggerFactory.getLogger (DOMReaderTest.class);"...
{ "body": "@Test\n public void testEntityExpansionLimit ()\n {\n // 64.000 is the default value for JDK7+\n assertEquals (64000, XMLSystemProperties.getXMLEntityExpansionLimit ());\n\n // The XML with XXE problem\n final String sXMLEntities = \"<?xml version='1.0' encoding='utf-8'?>\" +\n ...
{ "fields": [ { "declarator": "s_aDomTimerHdl = StatisticsManager.getTimerHandler (DOMReader.class.getName () +\n \"$DOM\")", "modifier": "private static final", "original_string": "private s...
{ "body": "@Nullable\n public static Document readXMLDOM (@WillClose @Nonnull final InputSource aIS)\n {\n return readXMLDOM (aIS, new DOMReaderSettings ());\n }", "class_method_signature": "DOMReader.readXMLDOM(@WillClose @Nonnull final InputSource aIS)", "constructor": false, "full_signature": "@Nullabl...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_409
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java", "identifier": "FileOperationManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDirRecursiveIfNotExisting ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aDir1 = new File (\"TestDir\");\n final File aDir11 = new File (aDir1, \"TestSubDir\");\n try\n {\n assertFalse (FileHelper.existsDir (aDir1));...
{ "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 createDirRecursiveIfNotExisting (@Nonnull final File aDir)\n {\n m_aLastError = FileOperations.createDirRecursiveIfNotExisting (aDir);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }", "class_method_signature": "FileOperationManager.createDirRecursi...
{ "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_366
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationsTest.java", "identifier": "FileOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDir ()\n {\n final File aDir1 = new File (\"TestDir\");\n assertFalse (FileHelper.existsDir (aDir1));\n _expectedSuccess (FileOperations.createDir (aDir1));\n try\n {\n assertTrue (FileHelper.existsDir (aDir1));\n\n // directory already exists\n ...
{ "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 File aDir)\n {\n ValueEnforcer.notNull (aDir, \"Directory\");\n\n // Does the directory already exist?\n if (aDir.exists ())\n return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR, aDir);\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_736
{ "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 testGetUntilLastExcl ()\n {\n assertEquals (\"\", StringHelper.getUntilLastExcl (\"abc@def.com\", 'a'));\n assertEquals (\"abc@def.\", StringHelper.getUntilLastExcl (\"abc@def.com\", 'c'));\n assertEquals (\"abc\", StringHelper.getUntilLastExcl (\"abc@def.com\", '@'));\n a...
{ "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 getUntilLastExcl (@Nullable final String sStr, final char cSearch)\n {\n return _getUntilLast (sStr, cSearch, false);\n }", "class_method_signature": "StringHelper.getUntilLastExcl(@Nullable final String sStr, final char cSearch)", "constructor": false, "full_si...
{ "created": "8/18/2014 7:21:36 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 23062279, "size": null, "stargazer_count": null, "stars": 20, "updates": "2020-01-27T18:40:50+00:00", "url": "https://github.com/phax/ph-commons" ...
23062279_223
{ "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 testOrderNamespaces ()\n {\n XMLWriterSettings aSettings = new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE).setUseDoubleQuotesForAttributes (false);\n\n // default order\n final Document aDoc = XMLFactory.newDocument ();\n final Element e = (Element) aDoc.appe...
{ "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_673
{ "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 testGetLeadingCharCount ()\n {\n assertEquals (0, StringHelper.getLeadingCharCount (\"Hallo Welt\", 'x'));\n assertEquals (1, StringHelper.getLeadingCharCount (\"xHallo Welt\", 'x'));\n assertEquals (2, StringHelper.getLeadingCharCount (\"xxHallo Welt\", 'x'));\n assertEqu...
{ "fields": [ { "declarator": "STRING_NOT_FOUND = -1", "modifier": "public static final", "original_string": "public static final int STRING_NOT_FOUND = -1;", "type": "int", "var_name": "STRING_NOT_FOUND" }, { "declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ...
{ "body": "@Nonnegative\n public static int getLeadingCharCount (@Nullable final String s, final char c)\n {\n int ret = 0;\n if (s != null)\n {\n final int nMax = s.length ();\n while (ret < nMax && s.charAt (ret) == c)\n ++ret;\n }\n return ret;\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_389
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java", "identifier": "FilenameHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStartsWithPathSeparatorChar ()\n {\n assertTrue (FilenameHelper.startsWithPathSeparatorChar (\"/usr/local/perl\"));\n assertTrue (FilenameHelper.startsWithPathSeparatorChar (\"\\\\windows\\\\system32\\\\any.exe\"));\n assertFalse (FilenameHelper.startsWithPathSeparatorCha...
{ "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 startsWithPathSeparatorChar (@Nullable final CharSequence s)\n {\n return isPathSeparatorChar (StringHelper.getFirstChar (s));\n }", "class_method_signature": "FilenameHelper.startsWithPathSeparatorChar(@Nullable final CharSequence s)", "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_809
{ "fields": [], "file": "ph-commons/src/test/java/com/helger/commons/collection/iterate/FilterIteratorTest.java", "identifier": "FilterIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIteration5 ()\n {\n // filtered elements at the beginning\n final List <String> aList = CollectionHelper.newList (null, null, \"s1\", \"s2\", \"s3\");\n final FilterIterator <String> it = new FilterIterator <> (aList, Objects::nonNull);\n assertNotNull (it);\n\n ass...
{ "fields": [ { "declarator": "m_aBaseIter", "modifier": "private final", "original_string": "private final Iterator <? extends ELEMENTTYPE> m_aBaseIter;", "type": "Iterator <? extends ELEMENTTYPE>", "var_name": "m_aBaseIter" }, { "declarator": "m_aFilter", "modif...
{ "body": "@Nullable\n public ELEMENTTYPE next ()\n {\n if (!hasNext ())\n throw new NoSuchElementException ();\n final ELEMENTTYPE aRet = m_aCurrent;\n _gotoNextCurrent ();\n return aRet;\n }", "class_method_signature": "FilterIterator.next()", "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" ...