id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
23062279_713 | {
"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 testGetLineCount ()\n {\n assertEquals (1, StringHelper.getLineCount (\"abc\"));\n assertEquals (2, StringHelper.getLineCount (\"ab\\nc\"));\n assertEquals (2, StringHelper.getLineCount (\"ab\\r\\nc\"));\n assertEquals (1, StringHelper.getLineCount (\"ab\\rc\"));\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": "@Nonnegative\n public static int getLineCount (@Nullable final String s)\n {\n return getLineCount (s, '\\n');\n }",
"class_method_signature": "StringHelper.getLineCount(@Nullable final String s)",
"constructor": false,
"full_signature": "@Nonnegative public static int getLineCount(@Nullable fi... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_206 | {
"fields": [
{
"declarator": "ELEMENT_NAME = \"element\"",
"modifier": "private static final",
"original_string": "private static final String ELEMENT_NAME = \"element\";",
"type": "String",
"var_name": "ELEMENT_NAME"
}
],
"file": "ph-xml/src/test/java/com/helger/xml/microdo... | {
"body": "@Test\n public void testMicroTypeConversion ()\n {\n assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.createGregorianCalendar (), ELEMENT_NAME));\n assertNotNull (MicroTypeConverter.convertToMicroElement (new Date (), ELEMENT_NAME));\n assertNotNull (MicroTypeConverter.convert... | {
"fields": [
{
"declarator": "s_aInstance = new MicroTypeConverter ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final MicroTypeConverter s_aInstance = new MicroTypeConverter ();",
"type": "MicroTypeConver... | {
"body": "@Nullable\n public static <T> IMicroElement convertToMicroElement (@Nullable final T aObject, @Nonnull @Nonempty final String sTagName)\n {\n // Use a null namespace\n return convertToMicroElement (aObject, null, sTagName);\n }",
"class_method_signature": "MicroTypeConverter.convertToMicroElemen... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_656 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/string/util/LevenshteinDistanceTest.java",
"identifier": "LevenshteinDistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCostsString ()\n {\n assertEquals (0, LevenshteinDistance.getDistance (\"\", \"\"));\n assertEquals (0, LevenshteinDistance.getDistance (null, \"\"));\n assertEquals (0, LevenshteinDistance.getDistance (\"\", \"\", 1, 1, 1));\n assertEquals (0, LevenshteinDistance.getD... | {
"fields": [
{
"declarator": "s_aInstance = new LevenshteinDistance ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final LevenshteinDistance s_aInstance = new LevenshteinDistance ();",
"type": "LevenshteinD... | {
"body": "public static int getDistance (@Nullable final char [] aStr1, @Nullable final char [] aStr2)\n {\n final int nLen1 = aStr1 == null ? 0 : aStr1.length;\n final int nLen2 = aStr2 == null ? 0 : aStr2.length;\n\n if (nLen1 == 0)\n return nLen2;\n if (nLen2 == 0)\n return nLen1;\n\n re... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_178 | {
"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 testSimple ()\n {\n final String s = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<verrryoot>\" +\n \"<root xmlns=\\\"myuri\\\">\" +\n \"<child xmlns=\\\"\\\">\" +\n \"<a:child2 xmlns:a=\\\"foo\\\">Value text ... | {
"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_482 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java",
"identifier": "ClassHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsCharacterClass ()\n {\n assertTrue (ClassHelper.isCharacterClass (Character.class));\n assertTrue (ClassHelper.isCharacterClass (char.class));\n assertFalse (ClassHelper.isCharacterClass (null));\n assertFalse (ClassHelper.isCharacterClass (Integer.class));\n asse... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8)",
"modifier": "private static final",
"original_string": "private static final ICommonsMap <Class <?>, Class <?>> PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8);",
"type": "ICommonsMap <Class <?>, Cla... | {
"body": "public static boolean isCharacterClass (@Nullable final Class <?> aClass)\n {\n if (aClass == null)\n return false;\n return Character.class.isAssignableFrom (aClass) || char.class.isAssignableFrom (aClass);\n }",
"class_method_signature": "ClassHelper.isCharacterClass(@Nullable final Class ... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_528 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java",
"identifier": "ABNFTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsVChar ()\n {\n for (int i = 0x21; i <= 0x7e; ++i)\n assertTrue (ABNF.isVChar (i));\n assertFalse (ABNF.isVChar (0));\n }",
"class_method_signature": "ABNFTest.testIsVChar()",
"constructor": false,
"full_signature": "@Test public void testIsVChar()",
"identifi... | {
"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 isVChar (final int nCP)\n {\n return _isBitSet (nCP, BIT_VCHAR);\n }",
"class_method_signature": "ABNF.isVChar(final int nCP)",
"constructor": false,
"full_signature": "public static boolean isVChar(final int nCP)",
"identifier": "isVChar",
"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_197 | {
"fields": [
{
"declarator": "TEST_XML = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<!DOCTYPE verrryoot>\" +\n \"<verrryoot xmlns=\\\"sthgelse\\\">\" +\n \"<!-- arg - a comment -->\" +\n ... | {
"body": "@Test\n @Ignore (\"Takes too long and was already tested with JDK 1.8 runtime parser\")\n public void testSpecialCharactersXML10Text ()\n {\n final EXMLSerializeVersion eXMLSerializeVersion = EXMLSerializeVersion.XML_10;\n\n final XMLWriterSettings aSettings = new XMLWriterSettings ().setSerialize... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (MicroWriter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MicroWriter.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static String getNodeAsString (@Nonnull final IMicroNode aNode, @Nonnull final IXMLWriterSettings aSettings)\n {\n ValueEnforcer.notNull (aNode, \"Node\");\n ValueEnforcer.notNull (aSettings, \"Settings\");\n\n try (final NonBlockingStringWriter aWriter = new NonBlockingString... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_48 | {
"fields": [],
"file": "ph-tree/src/test/java/com/helger/tree/util/TreeWithIDBuilderTest.java",
"identifier": "TreeWithIDBuilderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildTreeFromIHasID ()\n {\n final MockHasIDString [] x = new MockHasIDString [0];\n final IParentProvider <MockHasIDString> pp = o -> null;\n final DefaultTreeWithID <String, MockHasIDString> aTree = TreeWithIDBuilder.buildTree (x, pp);\n assertNotNull (aTree);\n\n ... | {
"fields": [
{
"declarator": "s_aInstance = new TreeWithIDBuilder ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final TreeWithIDBuilder s_aInstance = new TreeWithIDBuilder ();",
"type": "TreeWithIDBuilder"... | {
"body": "@Nonnull\n public static <KEYTYPE, DATATYPE extends IHasID <KEYTYPE>> DefaultTreeWithID <KEYTYPE, DATATYPE> buildTree (@Nonnull final Collection <? extends DATATYPE> aAll,\n @Nonnull final IParentP... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_744 | {
"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 testGetFirstTokenChar ()\n {\n assertEquals (\"abc\", StringHelper.getFirstToken (\"abc\", ' '));\n assertEquals (\"\", StringHelper.getFirstToken (\"abc\", 'a'));\n assertEquals (\"a\", StringHelper.getFirstToken (\"abc\", 'b'));\n assertEquals (\"a\", StringHelper.getFir... | {
"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 getFirstToken (@Nullable final String sStr, final char cSearch)\n {\n final int nIndex = getIndexOf (sStr, cSearch);\n return nIndex == StringHelper.STRING_NOT_FOUND ? sStr : sStr.substring (0, nIndex);\n }",
"class_method_signature": "StringHelper.getFirstToken(... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_314 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/streamprovider/StringInputStreamProviderTest.java",
"identifier": "StringInputStreamProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSimpleCharset ()\n {\n final String s = \"Hallo Weltäöü\";\n\n // String constructor\n InputStream aIS = new StringInputStreamProvider (s, StandardCharsets.UTF_8).getInputStream ();\n assertEquals (s, StreamHelper.getAllBytesAsString (aIS, StandardCharsets.UTF_8));\n\n... | {
"fields": [
{
"declarator": "m_sData",
"modifier": "private",
"original_string": "private String m_sData;",
"type": "String",
"var_name": "m_sData"
},
{
"declarator": "m_aCharset",
"modifier": "private",
"original_string": "private Charset m_aCharset;",
... | {
"body": "@Nonnull\n public final StringInputStream getInputStream ()\n {\n return new StringInputStream (m_sData, m_aCharset);\n }",
"class_method_signature": "StringInputStreamProvider.getInputStream()",
"constructor": false,
"full_signature": "@Nonnull public final StringInputStream getInputStream()",... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_601 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/regex/RegExHelperTest.java",
"identifier": "RegExHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressFBWarnings (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testSplitNoLimit ()\n {\n String [] x = RegExHelper.getSplitToArray (\"abc\", \"b\");\n assertNotNull (x);\n assertEquals (2, x.length);\n assertEquals (\"a\", x[0]);\n assertEquals (\"c\", x[1]);\n\n x ... | {
"fields": [
{
"declarator": "s_aInstance = new RegExHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final RegExHelper s_aInstance = new RegExHelper ();",
"type": "RegExHelper",
"var_name": "s_a... | {
"body": "@Nonnull\n public static String [] getSplitToArray (@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx)\n {\n if (sText == null)\n return ArrayHelper.EMPTY_STRING_ARRAY;\n return RegExCache.getPattern (sRegEx).split (sText);\n }",
"class_method_signature": "RegExHelper.... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_251 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/url/SimpleURLTest.java",
"identifier": "SimpleURLTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCtor ()\n {\n // only href\n SimpleURL aURL = new SimpleURL ();\n assertEquals (\"\", aURL.getAsStringWithEncodedParameters ());\n\n aURL = new SimpleURL (\"\");\n assertEquals (\"\", aURL.getAsStringWithEncodedParameters ());\n\n aURL = new SimpleURL (\"#\");\n ... | {
"fields": [
{
"declarator": "m_sPath",
"modifier": "private",
"original_string": "private String m_sPath;",
"type": "String",
"var_name": "m_sPath"
},
{
"declarator": "m_aParams = new URLParameterList ()",
"modifier": "private final",
"original_string": "p... | {
"body": "public boolean add (@Nonnull final URLParameter aParam)\n {\n return m_aParams.add (aParam);\n }",
"class_method_signature": "SimpleURL.add(@Nonnull final URLParameter aParam)",
"constructor": false,
"full_signature": "public boolean add(@Nonnull final URLParameter aParam)",
"identifier": "add... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_494 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/proxy/LoggingInvocationHandlerTest.java",
"identifier": "LoggingInvocationHandlerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\")\n public void testDefaultMethod ()\n {\n LoggingInvocationHandler.proxying (ITest.class, new TestImpl ()).foo ();\n LoggingInvocationHandler.proxying (ITest.class, new TestImpl2 ()).foo ();\n }",
"class_method_signature": ... | {
"fields": [
{
"declarator": "DEFAULT_PROXY_RETURN_VALUES = true",
"modifier": "public static final",
"original_string": "public static final boolean DEFAULT_PROXY_RETURN_VALUES = true;",
"type": "boolean",
"var_name": "DEFAULT_PROXY_RETURN_VALUES"
},
{
"declarator": "... | {
"body": "@Nonnull\n public static <T> T proxying (@Nonnull final Class <? extends T> aInterfaceClass, @Nonnull final T aActualTarget)\n {\n return proxying (aInterfaceClass, aActualTarget, LoggingInvocationHandler::new);\n }",
"class_method_signature": "LoggingInvocationHandler.proxying(@Nonnull final Class... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_181 | {
"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 testNamespaces3 ()\n {\n final XMLWriterSettings xs = new XMLWriterSettings ();\n xs.setIndent (EXMLSerializeIndent.NONE);\n xs.setUseDoubleQuotesForAttributes (false);\n\n final String s = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<verrryoot xmlns='uri1' x... | {
"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_882 | {
"fields": [],
"file": "ph-security/src/test/java/com/helger/security/certificate/CertificateHelperTest.java",
"identifier": "CertificateHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertStringToCertficate () throws CertificateException\n {\n assertNull (CertificateHelper.convertStringToCertficate (null));\n assertNull (CertificateHelper.convertStringToCertficate (\"\"));\n\n // The web page certificate from Google\n final String sValidCert = \"... | {
"fields": [
{
"declarator": "BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\"",
"modifier": "public static final",
"original_string": "public static final String BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\";",
"type": "String",
"var_name": "BEGIN_CERTIFICATE"
},
{... | {
"body": "@Nullable\n public static X509Certificate convertStringToCertficate (@Nullable final String sCertString) throws CertificateException\n {\n if (StringHelper.hasNoText (sCertString))\n {\n // No string -> no certificate\n return null;\n }\n\n final CertificateFactory aCertificateFacto... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_302 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/mime/MimeTypeParserTest.java",
"identifier": "MimeTypeParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseValidURLEscape ()\n {\n final String [] aValid = new String [] { \"text/x;param1=%2c%2c%2c%2c%2c%2c\",\n \"text/x;param1=%2c%2c%2c%2c%2c%2c;param2=%2c%2c%2c%2c%2c%2c\",\n \" text / x ; ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (MimeTypeParser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MimeTypeParser.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static MimeType parseMimeType (@Nullable final String sMimeType)\n {\n return parseMimeType (sMimeType, CMimeType.DEFAULT_QUOTING);\n }",
"class_method_signature": "MimeTypeParser.parseMimeType(@Nullable final String sMimeType)",
"constructor": false,
"full_signature": "@Null... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_752 | {
"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 testAppendQuotedWriter () throws IOException\n {\n final IThrowingFunction <String, String, IOException> quote = x -> {\n final NonBlockingStringWriter aSB = new NonBlockingStringWriter ();\n StringHelper.appendQuoted (aSB, x);\n return aSB.getAsString ();\n };\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 void appendQuoted (@Nonnull final StringBuilder aTarget, @Nullable final String sSource)\n {\n if (sSource == null)\n aTarget.append (\"null\");\n else\n aTarget.append ('\\'').append (sSource).append ('\\'');\n }",
"class_method_signature": "StringHelper.appendQuoted(@Non... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_247 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/charset/CharsetHelperTest.java",
"identifier": "CharsetHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAsStringInOtherCharsetCharset ()\n {\n final String s = \"äbc\";\n assertEquals (3, CharsetHelper.getAsStringInOtherCharset (s, StandardCharsets.ISO_8859_1, StandardCharsets.UTF_8).length ());\n assertEquals (4, CharsetHelper.getAsStringInOtherCharset (s, StandardChars... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (CharsetHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (CharsetHelper.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static String getAsStringInOtherCharset (@Nullable final String sText,\n @Nonnull final Charset aCurrentCharset,\n @Nonnull final Charset aNewCharset)\n {\n ValueEnforcer.notNull (aCurr... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_617 | {
"fields": [
{
"declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ... | {
"body": "@Test\n public void testToString ()\n {\n // Check conversion with explicit converters defined\n final Object [] aDefinedObjs = new Object [] { BigDecimal.ONE,\n MathHelper.toBigDecimal (Double.MAX_VALUE),\n ... | {
"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_139 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/XMLFactoryTest.java",
"identifier": "XMLFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateDocumentBuilder ()\n {\n final Schema sch = XMLSchemaCache.getInstance ().getSchema (new ClassPathResource (\"xml/schema1.xsd\"));\n assertNotNull (sch);\n DocumentBuilder db = XMLFactory.createDocumentBuilder (sch);\n assertNotNull (db);\n assertNotNull (db.g... | {
"fields": [
{
"declarator": "DEFAULT_DOM_NAMESPACE_AWARE = true",
"modifier": "public static final",
"original_string": "public static final boolean DEFAULT_DOM_NAMESPACE_AWARE = true;",
"type": "boolean",
"var_name": "DEFAULT_DOM_NAMESPACE_AWARE"
},
{
"declarator": "... | {
"body": "@Nonnull\n public static DocumentBuilder createDocumentBuilder ()\n {\n return createDocumentBuilder (getDocumentBuilderFactory ());\n }",
"class_method_signature": "XMLFactory.createDocumentBuilder()",
"constructor": false,
"full_signature": "@Nonnull public static DocumentBuilder createDocume... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_569 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java",
"identifier": "CSVReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEscapedQuote () throws IOException\n {\n\n final StringBuilder aSB = new StringBuilder ();\n\n // a,123\"4\",aReader\n aSB.append (\"a,\\\"123\\\\\\\"4567\\\",aReader\").append ('\\n');\n\n try (final CSVReader aReader = new CSVReader (new NonBlockingStringReader (aSB.... | {
"fields": [
{
"declarator": "m_aReader",
"modifier": "private final",
"original_string": "private final Reader m_aReader;",
"type": "Reader",
"var_name": "m_aReader"
},
{
"declarator": "m_aLineReader",
"modifier": "private final",
"original_string": "priva... | {
"body": "@Nullable\n public ICommonsList <String> readNext () throws IOException\n {\n ICommonsList <String> ret = null;\n do\n {\n final String sNextLine = _getNextLine ();\n if (!m_bHasNext)\n {\n // should throw if still pending?\n return ret;\n }\n final ICommon... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_586 | {
"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 testADoubleQuoteAsDataElement () throws IOException\n {\n final ICommonsList <String> aNextLine = m_aParser.parseLine (\"a,\\\"\\\"\\\"\\\",c\");// a,\"\"\"\",c\n\n assertEquals (3, aNextLine.size ());\n\n assertEquals (\"a\", aNextLine.get (0));\n assertEquals (1, aNextLi... | {
"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_705 | {
"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 testTrimStart ()\n {\n assertEquals (\"Hallo Welt\", StringHelper.trimStart (\"Hallo Welt\", \"\"));\n assertEquals (\"Hallo Welt\", StringHelper.trimStart (\"Hallo Welt\", \"asd\"));\n assertEquals (\"allo Welt\", StringHelper.trimStart (\" Hallo Welt\", \" H\"));\n asser... | {
"fields": [
{
"declarator": "STRING_NOT_FOUND = -1",
"modifier": "public static final",
"original_string": "public static final int STRING_NOT_FOUND = -1;",
"type": "int",
"var_name": "STRING_NOT_FOUND"
},
{
"declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ... | {
"body": "@Nullable\n @CheckReturnValue\n public static String trimStart (@Nullable final String sSrc, @Nullable final String sLead)\n {\n return startsWith (sSrc, sLead) ? sSrc.substring (sLead.length (), sSrc.length ()) : sSrc;\n }",
"class_method_signature": "StringHelper.trimStart(@Nullable final 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_355 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/PathOperationsTest.java",
"identifier": "PathOperationsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeleteFile ()\n {\n _expectedError (PathOperations.deleteFile (Paths.get (\"warum sollte es diese Datei geben\")), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST);\n final Path f = Paths.get (\"delfile.test\");\n try\n {\n SimpleFileIO.writeFile (f.toFile (), \"abc\".getB... | {
"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 deleteFile (@Nonnull final Path aFile)\n {\n ValueEnforcer.notNull (aFile, \"Path\");\n\n final Path aRealFile = _getUnifiedPath (aFile);\n\n if (!aRealFile.toFile ().isFile ())\n return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperati... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_640 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (SystemPropertiesTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (SystemPropertiesTest.class);",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "@Test\n @Ignore (\"Too verbose\")\n public void testPrintAll ()\n {\n for (final Map.Entry <String, String> aEntry : CollectionHelper.getSortedByKey (SystemProperties.getAllProperties ()).entrySet ())\n LOGGER.info (\"[all] \" + aEntry.getKey () + \"=\" + aEntry.getValue ());\n }",
"class_met... | {
"fields": [
{
"declarator": "SYSTEM_PROPERTY_FILE_SEPARATOR = \"file.separator\"",
"modifier": "public static final",
"original_string": "public static final String SYSTEM_PROPERTY_FILE_SEPARATOR = \"file.separator\";",
"type": "String",
"var_name": "SYSTEM_PROPERTY_FILE_SEPARATOR"... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static ICommonsMap <String, String> getAllProperties ()\n {\n final Properties aProperties = IPrivilegedAction.systemGetProperties ().invokeSafe ();\n if (aProperties == null)\n return new CommonsHashMap <> ();\n return PropertiesHelper.getAsStringMa... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_210 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/serialize/write/XMLCharHelperTest.java",
"identifier": "XMLCharHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAttributeValue ()\n {\n assertFalse (XMLCharHelper.isInvalidXMLAttributeValueChar (EXMLSerializeVersion.XML_10, '<'));\n assertFalse (XMLCharHelper.isInvalidXMLAttributeValueChar (EXMLSerializeVersion.XML_11, '<'));\n assertFalse (XMLCharHelper.isInvalidXMLAttributeValueC... | {
"fields": [
{
"declarator": "INVALID_NAME_START_CHAR_XML10 = new BitSet (0x10000)",
"modifier": "private static final",
"original_string": "private static final BitSet INVALID_NAME_START_CHAR_XML10 = new BitSet (0x10000);",
"type": "BitSet",
"var_name": "INVALID_NAME_START_CHAR_XML... | {
"body": "public static boolean isInvalidXMLAttributeValueChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c)\n {\n switch (eXMLVersion)\n {\n case XML_10:\n return INVALID_VALUE_CHAR_XML10.get (c);\n case XML_11:\n return INVALID_ATTR_VALUE_CHAR_XML11.get (c);\n 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_704 | {
"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 testTrimEndInt ()\n {\n assertEquals (\"Hallo Welt\", StringHelper.trimEnd (\"Hallo Welt\", 0));\n assertEquals (\"Hallo Welt\", StringHelper.trimEnd (\"Hallo Welt\", -3));\n assertEquals (\" Hallo We\", StringHelper.trimEnd (\" Hallo Welt\", 2));\n assertEquals (\"Hallo W... | {
"fields": [
{
"declarator": "STRING_NOT_FOUND = -1",
"modifier": "public static final",
"original_string": "public static final int STRING_NOT_FOUND = -1;",
"type": "int",
"var_name": "STRING_NOT_FOUND"
},
{
"declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ... | {
"body": "@Nullable\n @CheckReturnValue\n public static String trimEnd (@Nullable final String sSrc, @Nullable final String sTail)\n {\n return endsWith (sSrc, sTail) ? sSrc.substring (0, sSrc.length () - sTail.length ()) : sSrc;\n }",
"class_method_signature": "StringHelper.trimEnd(@Nullable final String 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_354 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/PathOperationsTest.java",
"identifier": "PathOperationsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeleteDirRecursive ()\n {\n final Path aDir = Paths.get (\"deldirrec2.test\");\n try\n {\n assertFalse (Files.isDirectory (aDir));\n _expectedError (PathOperations.deleteDirRecursive (aDir), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST);\n _expectedSuccess (PathO... | {
"fields": [
{
"declarator": "DEFAULT_EXCEPTION_ON_DELETE_ROOT = true",
"modifier": "public static final",
"original_string": "public static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT = true;",
"type": "boolean",
"var_name": "DEFAULT_EXCEPTION_ON_DELETE_ROOT"
},
{
... | {
"body": "@Nonnull\n public static FileIOError deleteDirRecursive (@Nonnull final Path aDir)\n {\n ValueEnforcer.notNull (aDir, \"Directory\");\n\n final Path aRealDir = _getUnifiedPath (aDir);\n\n // Non-existing directory?\n if (!aRealDir.toFile ().isDirectory ())\n return EFileIOErrorCode.SOURC... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_641 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (SystemPropertiesTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (SystemPropertiesTest.class);",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "@Test\n public void testGetAllJavaNetSystemProperties ()\n {\n final String [] aData1 = SystemProperties.getAllJavaNetSystemProperties ();\n assertNotNull (aData1);\n final String [] aData2 = SystemProperties.getAllJavaNetSystemProperties ();\n assertNotNull (aData2);\n assertNotSame (aDat... | {
"fields": [
{
"declarator": "SYSTEM_PROPERTY_FILE_SEPARATOR = \"file.separator\"",
"modifier": "public static final",
"original_string": "public static final String SYSTEM_PROPERTY_FILE_SEPARATOR = \"file.separator\";",
"type": "String",
"var_name": "SYSTEM_PROPERTY_FILE_SEPARATOR"... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static String [] getAllJavaNetSystemProperties ()\n {\n // http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/ReadDebug.html\n // http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html\n // The first 2 (*.debug) should... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_211 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/serialize/write/XMLCharHelperTest.java",
"identifier": "XMLCharHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testText ()\n {\n assertFalse (XMLCharHelper.isInvalidXMLTextChar (EXMLSerializeVersion.XML_10, '<'));\n assertFalse (XMLCharHelper.isInvalidXMLTextChar (EXMLSerializeVersion.XML_11, '<'));\n assertFalse (XMLCharHelper.isInvalidXMLTextChar (EXMLSerializeVersion.HTML, '<'));\n... | {
"fields": [
{
"declarator": "INVALID_NAME_START_CHAR_XML10 = new BitSet (0x10000)",
"modifier": "private static final",
"original_string": "private static final BitSet INVALID_NAME_START_CHAR_XML10 = new BitSet (0x10000);",
"type": "BitSet",
"var_name": "INVALID_NAME_START_CHAR_XML... | {
"body": "public static boolean isInvalidXMLTextChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c)\n {\n switch (eXMLVersion)\n {\n case XML_10:\n return INVALID_VALUE_CHAR_XML10.get (c);\n case XML_11:\n return INVALID_TEXT_VALUE_CHAR_XML11.get (c);\n case HTML:\... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_138 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/XMLFactoryTest.java",
"identifier": "XMLFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetDOMImplementation ()\n {\n assertNotNull (XMLFactory.getDOMImplementation ());\n }",
"class_method_signature": "XMLFactoryTest.testGetDOMImplementation()",
"constructor": false,
"full_signature": "@Test public void testGetDOMImplementation()",
"identifier": "testGet... | {
"fields": [
{
"declarator": "DEFAULT_DOM_NAMESPACE_AWARE = true",
"modifier": "public static final",
"original_string": "public static final boolean DEFAULT_DOM_NAMESPACE_AWARE = true;",
"type": "boolean",
"var_name": "DEFAULT_DOM_NAMESPACE_AWARE"
},
{
"declarator": "... | {
"body": "@Nonnull\n public static DOMImplementation getDOMImplementation ()\n {\n return getDocumentBuilder ().getDOMImplementation ();\n }",
"class_method_signature": "XMLFactory.getDOMImplementation()",
"constructor": false,
"full_signature": "@Nonnull public static DOMImplementation getDOMImplementat... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_568 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/csv/CSVReaderTest.java",
"identifier": "CSVReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalParsedLine () throws IOException\n {\n\n final StringBuilder aSB = new StringBuilder (CCSV.INITIAL_STRING_SIZE);\n\n aSB.append (\"a,1234567,aReader\").append ('\\n');// a,1234,aReader\n\n try (final CSVReader aReader = new CSVReader (new NonBlockingStringReader (aS... | {
"fields": [
{
"declarator": "m_aReader",
"modifier": "private final",
"original_string": "private final Reader m_aReader;",
"type": "Reader",
"var_name": "m_aReader"
},
{
"declarator": "m_aLineReader",
"modifier": "private final",
"original_string": "priva... | {
"body": "@Nullable\n public ICommonsList <String> readNext () throws IOException\n {\n ICommonsList <String> ret = null;\n do\n {\n final String sNextLine = _getNextLine ();\n if (!m_bHasNext)\n {\n // should throw if still pending?\n return ret;\n }\n final ICommon... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_587 | {
"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 testEscapedDoubleQuoteAsDataElement () throws IOException\n {\n\n final ICommonsList <String> aNextLine = m_aParser.parseLine (\"\\\"test\\\",\\\"this,test,is,good\\\",\\\"\\\\\\\"test\\\\\\\"\\\",\\\"\\\\\\\"quote\\\\\\\"\\\"\"); // \"test\",\"this,test,is,good\",\"\\\"test\\\",\\... | {
"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_303 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/mime/MimeTypeParserTest.java",
"identifier": "MimeTypeParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseInvalid ()\n {\n final String [] aInvalid = new String [] { \"text\",\n \"text/;\",\n \"text/; \",\n \"foo/bar\",\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (MimeTypeParser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MimeTypeParser.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static MimeType parseMimeType (@Nullable final String sMimeType)\n {\n return parseMimeType (sMimeType, CMimeType.DEFAULT_QUOTING);\n }",
"class_method_signature": "MimeTypeParser.parseMimeType(@Nullable final String sMimeType)",
"constructor": false,
"full_signature": "@Null... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_753 | {
"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 testParseBool ()\n {\n assertTrue (StringParser.parseBool (\"true\"));\n assertTrue (StringParser.parseBool (\"TRUE\"));\n assertTrue (StringParser.parseBool (Boolean.TRUE.toString ()));\n assertFalse (StringParser.parseBool (\"false\"));\n assertFalse (StringParser.par... | {
"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 boolean parseBool (@Nullable final Object aObject)\n {\n return parseBool (aObject, false);\n }",
"class_method_signature": "StringParser.parseBool(@Nullable final Object aObject)",
"constructor": false,
"full_signature": "public static boolean parseBool(@Nullable final Object aObj... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_246 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/charset/CharsetHelperTest.java",
"identifier": "CharsetHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressFBWarnings (value = \"NP_NONNULL_PARAM_VIOLATION\")\n public void testCharsetFromName ()\n {\n assertNotNull (CharsetHelper.getCharsetFromName (\"UTF-8\"));\n try\n {\n CharsetHelper.getCharsetFromName (null);\n fail ();\n }\n catch (final NullPointerException e... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (CharsetHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (CharsetHelper.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nonnull\n public static Charset getCharsetFromName (@Nonnull @Nonempty final String sCharsetName)\n {\n ValueEnforcer.notNull (sCharsetName, \"CharsetName\");\n try\n {\n return Charset.forName (sCharsetName);\n }\n catch (final IllegalCharsetNameException ex)\n {\n // Not su... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_616 | {
"fields": [
{
"declarator": "CONVERTIBLE_CLASSES = new Class <?> [] { Boolean.class,\n Byte.class,\n Character.class,\n ... | {
"body": "@Test\n public void testFromNonNumericString ()\n {\n // Test non numeric string\n for (final Class <?> aDstClass : ArrayHelper.getConcatenated (CONVERTIBLE_CLASSES, new Class <?> [] { Enum.class }))\n try\n {\n TypeConverter.convert (\"not a number\", aDstClass);\n }\n c... | {
"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_495 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/BooleanHelperTest.java",
"identifier": "BooleanHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBooleanValue ()\n {\n assertTrue (BooleanHelper.getBooleanValue (Boolean.TRUE, true));\n assertTrue (BooleanHelper.getBooleanValue (Boolean.TRUE, false));\n assertFalse (BooleanHelper.getBooleanValue (Boolean.FALSE, true));\n assertFalse (BooleanHelper.getBooleanVal... | {
"fields": [
{
"declarator": "s_aInstance = new BooleanHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final BooleanHelper s_aInstance = new BooleanHelper ();",
"type": "BooleanHelper",
"var_nam... | {
"body": "public static boolean getBooleanValue (@Nullable final Boolean aObj, final boolean bDefault)\n {\n return aObj == null ? bDefault : aObj.booleanValue ();\n }",
"class_method_signature": "BooleanHelper.getBooleanValue(@Nullable final Boolean aObj, final boolean bDefault)",
"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_180 | {
"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 testNamespaces2 ()\n {\n final XMLWriterSettings xs = new XMLWriterSettings ();\n xs.setIndent (EXMLSerializeIndent.NONE);\n\n final String s = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<verrryoot xmlns='uri1'>\" +\n \"<root>\" +\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_883 | {
"fields": [],
"file": "ph-security/src/test/java/com/helger/security/certificate/CertificateHelperTest.java",
"identifier": "CertificateHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetRFC1421CompliantString ()\n {\n assertNull (CertificateHelper.getRFC1421CompliantString (null, true));\n assertNull (CertificateHelper.getRFC1421CompliantString (null, false));\n assertNull (CertificateHelper.getRFC1421CompliantString (\"\", true));\n assertNull (Ce... | {
"fields": [
{
"declarator": "BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\"",
"modifier": "public static final",
"original_string": "public static final String BEGIN_CERTIFICATE = \"-----BEGIN CERTIFICATE-----\";",
"type": "String",
"var_name": "BEGIN_CERTIFICATE"
},
{... | {
"body": "@Nullable\n public static String getRFC1421CompliantString (@Nullable final String sCertificate, final boolean bIncludePEMHeader)\n {\n return getRFC1421CompliantString (sCertificate, bIncludePEMHeader, CRLF);\n }",
"class_method_signature": "CertificateHelper.getRFC1421CompliantString(@Nullable fi... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_49 | {
"fields": [],
"file": "ph-tree/src/test/java/com/helger/tree/util/TreeWithIDSearcherTest.java",
"identifier": "TreeWithIDSearcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSearch ()\n {\n final DefaultTreeWithID <String, MockHasParent> aTree = TreeWithIDBuilder.buildTree (CollectionHelper.newList (new MockHasParent (\"a\"),\n new Mock... | {
"fields": [
{
"declarator": "s_aInstance = new TreeWithIDSearcher ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final TreeWithIDSearcher s_aInstance = new TreeWithIDSearcher ();",
"type": "TreeWithIDSearc... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree,\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_745 | {
"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 testGetFirstTokenString ()\n {\n assertEquals (\"abc\", StringHelper.getFirstToken (\"abc\", \" \"));\n assertEquals (\"\", StringHelper.getFirstToken (\"abc\", \"a\"));\n assertEquals (\"a\", StringHelper.getFirstToken (\"abc\", \"b\"));\n assertEquals (\"a\", StringHelpe... | {
"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 getFirstToken (@Nullable final String sStr, final char cSearch)\n {\n final int nIndex = getIndexOf (sStr, cSearch);\n return nIndex == StringHelper.STRING_NOT_FOUND ? sStr : sStr.substring (0, nIndex);\n }",
"class_method_signature": "StringHelper.getFirstToken(... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_315 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/streamprovider/ByteArrayInputStreamProviderTest.java",
"identifier": "ByteArrayInputStreamProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSimple ()\n {\n final byte [] aBytes = \"Hallo Weltäöü\".getBytes (StandardCharsets.ISO_8859_1);\n final ByteArrayInputStreamProvider aISP = new ByteArrayInputStreamProvider (aBytes);\n final InputStream aIS = aISP.getInputStream ();\n assertArrayEquals (aBytes, Stream... | {
"fields": [
{
"declarator": "DEFAULT_COPY_NEEDED = false",
"modifier": "public static final",
"original_string": "public static final boolean DEFAULT_COPY_NEEDED = false;",
"type": "boolean",
"var_name": "DEFAULT_COPY_NEEDED"
},
{
"declarator": "m_aBytes",
"modi... | {
"body": "@Override\n public String toString ()\n {\n return new ToStringGenerator (null).append (\"Bytes\", m_aBytes).getToString ();\n }",
"class_method_signature": "ByteArrayInputStreamProvider.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"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_600 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/regex/RegExPatternTest.java",
"identifier": "RegExPatternTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckPatternConsistency ()\n {\n RegExPattern.checkPatternConsistency (\"any\\\\$here\");\n RegExPattern.checkPatternConsistency (\"at the end$\");\n RegExPattern.checkPatternConsistency (\"group $1 of $0\");\n RegExPattern.checkPatternConsistency (\"$1 and $2 are OK\"... | {
"fields": [
{
"declarator": "s_aCheckConsistencyEnabled = new AtomicBoolean (false)",
"modifier": "private static final",
"original_string": "private static final AtomicBoolean s_aCheckConsistencyEnabled = new AtomicBoolean (false);",
"type": "AtomicBoolean",
"var_name": "s_aCheckC... | {
"body": "public static void checkPatternConsistency (@Nonnull @RegEx final String sRegEx)\n {\n // Check if a '$' is escaped if no digits follow\n int nIndex = 0;\n while (nIndex >= 0)\n {\n nIndex = sRegEx.indexOf ('$', nIndex);\n if (nIndex != -1)\n {\n if (nIndex == sRegEx.leng... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_250 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/charset/CharsetHelperTest.java",
"identifier": "CharsetHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasic ()\n {\n assertNotNull (CharsetHelper.getAllCharsets ());\n assertTrue (CharsetHelper.getAllCharsets ().size () > 0);\n }",
"class_method_signature": "CharsetHelperTest.testBasic()",
"constructor": false,
"full_signature": "@Test public void testBasic()",
"ide... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (CharsetHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (CharsetHelper.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static ICommonsOrderedMap <String, Charset> getAllCharsets ()\n {\n return new CommonsLinkedHashMap <> (s_aAllCharsets);\n }",
"class_method_signature": "CharsetHelper.getAllCharsets()",
"constructor": false,
"full_signature": "@Nonnull @ReturnsMutableCo... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_179 | {
"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 testNamespaces ()\n {\n final XMLWriterSettings xs = new XMLWriterSettings ();\n xs.setIndent (EXMLSerializeIndent.NONE);\n\n final String s = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<verrryoot>\" +\n \"<root xmlns=\\\"myuri\\\" xmlns:a='... | {
"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_483 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/ClassHelperTest.java",
"identifier": "ClassHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsBooleanClass ()\n {\n assertTrue (ClassHelper.isBooleanClass (Boolean.class));\n assertTrue (ClassHelper.isBooleanClass (boolean.class));\n assertFalse (ClassHelper.isBooleanClass (null));\n assertFalse (ClassHelper.isBooleanClass (Integer.class));\n assertFalse (... | {
"fields": [
{
"declarator": "PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8)",
"modifier": "private static final",
"original_string": "private static final ICommonsMap <Class <?>, Class <?>> PRIMITIVE_TO_WRAPPER = new CommonsWeakHashMap <> (8);",
"type": "ICommonsMap <Class <?>, Cla... | {
"body": "public static boolean isBooleanClass (@Nullable final Class <?> aClass)\n {\n if (aClass == null)\n return false;\n return Boolean.class.isAssignableFrom (aClass) || boolean.class.isAssignableFrom (aClass);\n }",
"class_method_signature": "ClassHelper.isBooleanClass(@Nullable final Class <?>... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_529 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/text/util/ABNFTest.java",
"identifier": "ABNFTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsWSP ()\n {\n assertTrue (ABNF.isWSP (0x09));\n assertTrue (ABNF.isWSP (0x20));\n assertFalse (ABNF.isWSP (0));\n }",
"class_method_signature": "ABNFTest.testIsWSP()",
"constructor": false,
"full_signature": "@Test public void testIsWSP()",
"identifier": "testIs... | {
"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 isWSP (final int nCP)\n {\n return _isBitSet (nCP, BIT_WSP);\n }",
"class_method_signature": "ABNF.isWSP(final int nCP)",
"constructor": false,
"full_signature": "public static boolean isWSP(final int nCP)",
"identifier": "isWSP",
"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_196 | {
"fields": [
{
"declarator": "TEST_XML = \"<?xml version=\\\"1.0\\\"?>\" +\n \"<!DOCTYPE verrryoot>\" +\n \"<verrryoot xmlns=\\\"sthgelse\\\">\" +\n \"<!-- arg - a comment -->\" +\n ... | {
"body": "@Test\n public void testWithoutEmitNamespaces ()\n {\n final XMLWriterSettings aSettings = new XMLWriterSettings ().setIndent (EXMLSerializeIndent.NONE)\n .setCharset (StandardCharsets.ISO_8859_1);\n final IMicroDocument aDoc = new Micr... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (MicroWriter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (MicroWriter.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static String getNodeAsString (@Nonnull final IMicroNode aNode, @Nonnull final IXMLWriterSettings aSettings)\n {\n ValueEnforcer.notNull (aNode, \"Node\");\n ValueEnforcer.notNull (aSettings, \"Settings\");\n\n try (final NonBlockingStringWriter aWriter = new NonBlockingString... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_342 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/resourceresolver/DefaultResourceResolverTest.java",
"identifier": "DefaultResourceResolverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasic () throws IOException\n {\n final String sBaseDir = new File (\".\").getCanonicalFile ().getAbsolutePath () + File.separatorChar;\n final String sBaseDirParent = new File (\".\").getCanonicalFile ().getParentFile ().getAbsolutePath () + File.separatorChar;\n\n IRead... | {
"fields": [
{
"declarator": "s_aDebugResolve = new AtomicBoolean (false)",
"modifier": "private static final",
"original_string": "private static final AtomicBoolean s_aDebugResolve = new AtomicBoolean (false);",
"type": "AtomicBoolean",
"var_name": "s_aDebugResolve"
},
{
... | {
"body": "@Nonnull\n public static IReadableResource getResolvedResource (@Nullable final String sSystemId, @Nullable final String sBaseURI)\n {\n return getResolvedResource (sSystemId, sBaseURI, (ClassLoader) null);\n }",
"class_method_signature": "DefaultResourceResolver.getResolvedResource(@Nullable final... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_712 | {
"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 testGetCharCount ()\n {\n assertEquals (0, StringHelper.getCharCount (\"abc\", 'x'));\n assertEquals (1, StringHelper.getCharCount (\"xabc\", 'x'));\n assertEquals (1, StringHelper.getCharCount (\"abxc\", 'x'));\n assertEquals (1, StringHelper.getCharCount (\"abcx\", 'x'))... | {
"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 getCharCount (@Nullable final String s, final char cSearch)\n {\n return s == null ? 0 : getCharCount (s.toCharArray (), cSearch);\n }",
"class_method_signature": "StringHelper.getCharCount(@Nullable final String s, final char cSearch)",
"constructor": false,
"f... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_207 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/serialize/write/XMLMaskHelperTest.java",
"identifier": "XMLMaskHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMaskedXMLText ()\n {\n // Emit as usual\n assertEquals (\"\\u0001\",\n new String (XMLMaskHelper.getMaskedXMLText (EXMLSerializeVersion.XML_10,\n EXMLCharMode.ATTRIBUTE_VALUE_DOUBLE_QUOTES,\n ... | {
"fields": [
{
"declarator": "TAB = '\\t'",
"modifier": "private static final",
"original_string": "private static final char TAB = '\\t';",
"type": "char",
"var_name": "TAB"
},
{
"declarator": "CR = '\\r'",
"modifier": "private static final",
"original_str... | {
"body": "@Nonnull\n public static char [] getMaskedXMLText (@Nonnull final EXMLSerializeVersion eXMLVersion,\n @Nonnull final EXMLCharMode eXMLCharMode,\n @Nonnull final EXMLIncorrectCharacterHandling eIncorrectCharHandling,\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_657 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/string/util/LevenshteinDistanceTest.java",
"identifier": "LevenshteinDistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCostsCharArray ()\n {\n final char [] _empty = \"\".toCharArray ();\n final char [] abc = \"abc\".toCharArray ();\n final char [] abcd = \"abcd\".toCharArray ();\n final char [] acc = \"acc\".toCharArray ();\n\n assertEquals (0, LevenshteinDistance.getDistance (_emp... | {
"fields": [
{
"declarator": "s_aInstance = new LevenshteinDistance ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final LevenshteinDistance s_aInstance = new LevenshteinDistance ();",
"type": "LevenshteinD... | {
"body": "public static int getDistance (@Nullable final char [] aStr1, @Nullable final char [] aStr2)\n {\n final int nLen1 = aStr1 == null ? 0 : aStr1.length;\n final int nLen2 = aStr2 == null ? 0 : aStr2.length;\n\n if (nLen1 == 0)\n return nLen2;\n if (nLen2 == 0)\n return nLen1;\n\n re... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_591 | {
"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 testIssue2726363 () throws IOException\n {\n final ICommonsList <String> aNextLine = m_aParser.parseLine (\"\\\"804503689\\\",\\\"London\\\",\\\"\\\"London\\\"shop\\\",\\\"address\\\",\\\"116.453182\\\",\\\"39.918884\\\"\");\n\n assertEquals (6, aNextLine.size ());\n\n assert... | {
"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_786 | {
"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 testGetConcatenated ()\n {\n {\n final String [] a = new String [] { \"a\", \"b\" };\n final String [] b = new String [] { \"c\", \"c2\" };\n assertArrayEquals (new String [] { \"a\", \"b\", \"c\", \"c2\" }, getConcatenated (a, b));\n assertArrayEquals (new Stri... | {
"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 <ELEMENTTYPE> ELEMENTTYPE [] getConcatenated (@Nullable final ELEMENTTYPE [] aHeadArray,\n @Nullable final ELEMENTTYPE [] aTailArray)\n {\n // If first array is invalid, simply\n if (isEmpt... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_339 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/stream/BitInputStreamTest.java",
"identifier": "BitInputStreamTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadBitLittleEndian () throws IOException\n {\n final NonBlockingByteArrayInputStream aBAIS = new NonBlockingByteArrayInputStream (new byte [] { (byte) 0x80 });\n try (final BitInputStream aBIS = new BitInputStream (aBAIS, ByteOrder.LITTLE_ENDIAN))\n {\n assertEquals... | {
"fields": [
{
"declarator": "m_aLock = new SimpleLock ()",
"modifier": "private final",
"original_string": "private final SimpleLock m_aLock = new SimpleLock ();",
"type": "SimpleLock",
"var_name": "m_aLock"
}
],
"file": "ph-commons/src/main/java/com/helger/commons/io/strea... | {
"body": "@Override\n public int readBit () throws IOException\n {\n // Cannot used \"locked\" because there is not IThrowingIntSupplier interface\n m_aLock.lock ();\n try\n {\n return super.readBit ();\n }\n finally\n {\n m_aLock.unlock ();\n }\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_65 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (SimpleGraphTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (SimpleGraphTest.class);",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "@Test\n public void testCycles ()\n {\n SimpleGraph sg = _buildGraph ();\n assertTrue (sg.isSelfContained ());\n\n sg = new SimpleGraph ();\n final IMutableGraphNode n1 = sg.createNode (null);\n final IMutableGraphNode n2 = sg.createNode (null);\n sg.createRelation (n1, n2);\n sg.cre... | {
"fields": [],
"file": "ph-graph/src/main/java/com/helger/graph/simple/SimpleGraph.java",
"identifier": "SimpleGraph",
"interfaces": "implements ISimpleGraph",
"methods": [
{
"class_method_signature": "SimpleGraph.SimpleGraph()",
"constructor": true,
"full_signature": "public SimpleGra... | {
"body": "@Nonnull\n public IMutableGraphRelation createRelation (@Nonnull final String sFromNodeID, @Nonnull final String sToNodeID)\n {\n final IMutableGraphNode aFromNode = getNodeOfID (sFromNodeID);\n if (aFromNode == null)\n throw new IllegalArgumentException (\"Failed to resolve from node ID '\" +... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_769 | {
"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 testIsLong ()\n {\n assertTrue (StringParser.isLong (\"1\"));\n assertFalse (StringParser.isLong (\"1.2\"));\n assertTrue (StringParser.isLong (\"0\"));\n assertTrue (StringParser.isLong (\"0000\"));\n assertTrue (StringParser.isLong (\"-1\"));\n assertTrue (StringPa... | {
"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 boolean isLong (@Nullable final String sStr)\n {\n if (sStr != null)\n try\n {\n Long.parseLong (sStr, DEFAULT_RADIX);\n return true;\n }\n catch (final NumberFormatException ex)\n {\n // fall through\n }\n return false;\n }",
"clas... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_293 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/statistics/util/StatisticsVisitorTest.java",
"identifier": "StatisticsVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWalkStatistics ()\n {\n // Just walk and do nothing :)\n StatisticsVisitor.visitStatistics (new IStatisticsVisitorCallback ()\n {});\n }",
"class_method_signature": "StatisticsVisitorTest.testWalkStatistics()",
"constructor": false,
"full_signature": "@Test public ... | {
"fields": [
{
"declarator": "s_aInstance = new StatisticsVisitor ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final StatisticsVisitor s_aInstance = new StatisticsVisitor ();",
"type": "StatisticsVisitor"... | {
"body": "public static void visitStatistics (@Nonnull final IStatisticsVisitorCallback aCallback)\n {\n ValueEnforcer.notNull (aCallback, \"Callback\");\n\n // For all cache handler\n ICommonsList <String> aHandlers = StatisticsManager.getAllCacheHandler ().getSorted (Comparator.naturalOrder ());\n for... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_440 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/base64/Base64Test.java",
"identifier": "Base64Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEncodeCharBuffer ()\n {\n final ByteBuffer aSrc = ByteBuffer.wrap (\"Hallo Wält\".getBytes (StandardCharsets.UTF_8));\n final CharBuffer aDst = CharBuffer.allocate (aSrc.capacity () * 2);\n Base64.encode (aSrc, aDst);\n assertEquals (\"Hallo Wält\", Base64.safeDecodeAs... | {
"fields": [
{
"declarator": "NO_OPTIONS = 0",
"modifier": "public static final",
"original_string": "public static final int NO_OPTIONS = 0;",
"type": "int",
"var_name": "NO_OPTIONS"
},
{
"declarator": "ENCODE = 1",
"modifier": "public static final",
"orig... | {
"body": "public static void encode (@Nonnull final ByteBuffer raw, @Nonnull final ByteBuffer encoded)\n {\n final byte [] raw3 = new byte [3];\n final byte [] enc4 = new byte [4];\n\n while (raw.hasRemaining ())\n {\n final int rem = Math.min (3, raw.remaining ());\n raw.get (raw3, 0, rem);\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_856 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/log/LogHelperTest.java",
"identifier": "LogHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAll ()\n {\n final Logger aLogger = LoggerFactory.getLogger (LogHelperTest.class);\n for (final EErrorLevel eLevel : EErrorLevel.values ())\n {\n LogHelper.log (aLogger, eLevel, \"my message\");\n LogHelper.log (aLogger, eLevel, \"my message with exception\", ne... | {
"fields": [
{
"declarator": "s_aInstance = new LogHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final LogHelper s_aInstance = new LogHelper ();",
"type": "LogHelper",
"var_name": "s_aInstance... | {
"body": "public static void log (@Nonnull final Class <?> aLoggingClass,\n @Nonnull final IHasErrorLevel aErrorLevelProvider,\n @Nonnull final String sMsg)\n {\n log (aLoggingClass, aErrorLevelProvider.getErrorLevel (), sMsg, null);\n }",
"class_method_signat... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_505 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/ClassPathHelperTest.java",
"identifier": "ClassPathHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPrintClassPathEntries () throws UnsupportedEncodingException\n {\n // Use default separator\n NonBlockingByteArrayOutputStream baos = new NonBlockingByteArrayOutputStream ();\n ClassPathHelper.printClassPathEntries (new PrintStream (baos, false, StandardCharsets.ISO_8859_... | {
"fields": [
{
"declarator": "s_aInstance = new ClassPathHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final ClassPathHelper s_aInstance = new ClassPathHelper ();",
"type": "ClassPathHelper",
... | {
"body": "public static void printClassPathEntries (@Nonnull final PrintStream aPS)\n {\n printClassPathEntries (aPS, ENewLineMode.DEFAULT.getText ());\n }",
"class_method_signature": "ClassPathHelper.printClassPathEntries(@Nonnull final PrintStream aPS)",
"constructor": false,
"full_signature": "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_155 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/microdom/MicroDocumentTest.java",
"identifier": "MicroDocumentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsStandalone ()\n {\n final IMicroDocument aDoc = new MicroDocument ();\n assertFalse (aDoc.isStandalone ());\n final IMicroElement eRoot = aDoc.appendElement (\"root\");\n assertFalse (aDoc.isStandalone ());\n eRoot.setAttribute (\"any\", \"Value\");\n assertFal... | {
"fields": [
{
"declarator": "DEFAULT_STANDALONE = ETriState.UNDEFINED",
"modifier": "public static final",
"original_string": "public static final ETriState DEFAULT_STANDALONE = ETriState.UNDEFINED;",
"type": "ETriState",
"var_name": "DEFAULT_STANDALONE"
},
{
"declara... | {
"body": "public void setStandalone (@Nonnull final ETriState eStandalone)\n {\n ValueEnforcer.notNull (eStandalone, \"Standalone\");\n m_eStandalone = eStandalone;\n }",
"class_method_signature": "MicroDocument.setStandalone(@Nonnull final ETriState eStandalone)",
"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_381 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java",
"identifier": "FilenameHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetIndexOfLastSeparator ()\n {\n assertEquals (-1, FilenameHelper.getIndexOfLastSeparator (null));\n assertEquals (-1, FilenameHelper.getIndexOfLastSeparator (\"\"));\n assertEquals (-1, FilenameHelper.getIndexOfLastSeparator (\"xyz\"));\n assertEquals (-1, FilenameHel... | {
"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 int getIndexOfLastSeparator (@Nullable final String sFilename)\n {\n return sFilename == null ? CGlobal.ILLEGAL_UINT\n : Math.max (sFilename.lastIndexOf (UNIX_SEPARATOR), sFilename.lastIndexOf (WINDOWS_SEPARATOR));\n }",
"class_method_signature": "FilenameHe... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_32 | {
"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 testRequiredOption ()\n {\n final Options options = new Options ();\n options.addOption (Option.builder (\"a\").longOpt (\"aaa\").desc (\"aaaaaaa\"));\n options.addOption (Option.builder (null).longOpt (\"bbb\").desc (\"bbbbbbb\"));\n options.addOption (Option.builder (\"c... | {
"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_694 | {
"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 testContainsIgnoreCaseString ()\n {\n final Locale aLocale = Locale.ENGLISH;\n assertTrue (StringHelper.containsIgnoreCase (\"Test\", \"Test\", aLocale));\n assertTrue (StringHelper.containsIgnoreCase (\"Test\", \"est\", aLocale));\n assertTrue (StringHelper.containsIgnore... | {
"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 containsIgnoreCase (@Nullable final String sText, @Nullable final String sSearch, @Nonnull final Locale aSortLocale)\n {\n return getIndexOfIgnoreCase (sText, sSearch, aSortLocale) != STRING_NOT_FOUND;\n }",
"class_method_signature": "StringHelper.containsIgnoreCase(@Nullable f... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_417 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FileOperationManagerTest.java",
"identifier": "FileOperationManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCopyFile ()\n {\n final IFileOperationManager aFOM = new FileOperationManager ();\n final File aFile = new File (\"copyfile.test\");\n final File aFile2 = new File (\"copyfile.copied\");\n try\n {\n assertFalse (FileHelper.existsFile (aFile));\n _expectedE... | {
"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 copyFile (@Nonnull final File aSourceFile, @Nonnull final File aTargetFile)\n {\n m_aLastError = FileOperations.copyFile (aSourceFile, aTargetFile);\n _handleLastError (m_aLastError);\n return m_aLastError;\n }",
"class_method_signature": "FileOperationManager.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_102 | {
"fields": [
{
"declarator": "FILL_FACTORS = { 0.25f, 0.5f, 0.75f, 0.9f, 0.99f }",
"modifier": "private static final",
"original_string": "private static final float [] FILL_FACTORS = { 0.25f, 0.5f, 0.75f, 0.9f, 0.99f };",
"type": "float []",
"var_name": "FILL_FACTORS"
}
],
... | {
"body": "@Test\n public void testRemove ()\n {\n for (final float ff : FILL_FACTORS)\n _testRemoveHelper (ff);\n }",
"class_method_signature": "IntObjectMapTest.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 = new Object ()",
"modifier": "public static final",
... | {
"body": "@Nullable\n public T remove (final int key)\n {\n if (key == FREE_KEY)\n {\n if (!m_bHasFreeKey)\n return null;\n\n m_bHasFreeKey = false;\n final T ret = m_aFreeValue;\n m_aFreeValue = m_aNoValue;\n --m_nSize;\n return _getOld (ret);\n }\n\n final int idx... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_552 | {
"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 testGetFormatted_Double ()\n {\n assertEquals (\"1,1\", LocaleFormatter.getFormatted (1.1, L_DE));\n assertEquals (\"1.1\", LocaleFormatter.getFormatted (1.1, L_EN));\n }",
"class_method_signature": "LocaleFormatterTest.testGetFormatted_Double()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "s_aInstance = new LocaleFormatter ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final LocaleFormatter s_aInstance = new LocaleFormatter ();",
"type": "LocaleFormatter",
... | {
"body": "@Nonnull\n public static String getFormatted (final double dValue, @Nonnull final Locale aDisplayLocale)\n {\n ValueEnforcer.notNull (aDisplayLocale, \"DisplayLocale\");\n\n return NumberFormat.getNumberInstance (aDisplayLocale).format (dValue);\n }",
"class_method_signature": "LocaleFormatter.g... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_801 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/collection/IteratorHelperTest.java",
"identifier": "IteratorHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetReverseIterator ()\n {\n assertNotNull (getReverseIterator (null));\n assertFalse (getReverseIterator (null).hasNext ());\n\n final List <String> aList = newList (\"d\", \"c\", \"b\", \"a\");\n final Iterator <String> it = getReverseIterator (aList);\n assertTrue... | {
"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> Iterator <ELEMENTTYPE> getReverseIterator (@Nullable final List <? extends ELEMENTTYPE> aCont)\n {\n if (CollectionHelper.isEmpty (aCont))\n return new EmptyIterator <> ();\n\n /**\n * Performance note: this implementation is much faster than building... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_6 | {
"fields": [
{
"declarator": "BASE64_ALPHABET = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" + \"abcdefghijklmnopqrstuvwxyz\" + \"0123456789+/\"",
"modifier": "private static final",
"original_string": "private static final String BASE64_ALPHABET = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" + \"abcdefghijklmnopqrstuvwxy... | {
"body": "@Test\n public void testGetSextet ()\n {\n assertEquals (0, tested.getSextet ((byte) 'A'));\n assertEquals (63, tested.getSextet ((byte) '/'));\n assertEquals (-1, tested.getSextet ((byte) ','));\n }",
"class_method_signature": "UTF7Base64HelperTest.testGetSextet()",
"constructor": false,
... | {
"fields": [
{
"declarator": "ALPHABET_LENGTH = 64",
"modifier": "private static final",
"original_string": "private static final int ALPHABET_LENGTH = 64;",
"type": "int",
"var_name": "ALPHABET_LENGTH"
},
{
"declarator": "m_aAlphabet",
"modifier": "private final... | {
"body": "public int getSextet (final int ch)\n {\n if (ch >= 128)\n return -1;\n return m_aInverseAlphabet[ch];\n }",
"class_method_signature": "UTF7Base64Helper.getSextet(final int ch)",
"constructor": false,
"full_signature": "public int getSextet(final int ch)",
"identifier": "getSextet",
... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_397 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java",
"identifier": "FilenameHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCleanPath_String ()\n {\n assertNull (FilenameHelper.getCleanPath ((String) null));\n assertEquals (\"\", FilenameHelper.getCleanPath (\"\"));\n assertEquals (\"/\", FilenameHelper.getCleanPath (\"/\"));\n assertEquals (\"target/file\", FilenameHelper.getCleanPath (... | {
"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": "@Nonnull\n public static String getCleanPath (@Nonnull final File aFile)\n {\n ValueEnforcer.notNull (aFile, \"File\");\n\n // getCanoncialPath fails for Windows local UNC paths\n if (!isUNCPath (aFile))\n try\n {\n // This works only if the file exists\n // Note: getCano... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_378 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java",
"identifier": "FilenameHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBaseName ()\n {\n assertNull (FilenameHelper.getBaseName ((String) null));\n assertNull (FilenameHelper.getBaseName ((File) null));\n assertEquals (\"\", FilenameHelper.getBaseName (\"\"));\n assertEquals (\"xyz\", FilenameHelper.getBaseName (\"xyz\"));\n assertE... | {
"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 getBaseName (@Nullable final File aFile)\n {\n return aFile == null ? null : getWithoutExtension (aFile.getName ());\n }",
"class_method_signature": "FilenameHelper.getBaseName(@Nullable final File aFile)",
"constructor": false,
"full_signature": "@Nullable publ... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_682 | {
"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 testGetExplodedArray ()\n {\n assertArrayEquals (new String [] { \"a\", \"b\", \"\", \"c\" }, StringHelper.getExplodedArray ('@', \"a@b@@c\", 5));\n assertArrayEquals (new String [] { \"a\", \"b\", \"\", \"c\" }, StringHelper.getExplodedArray ('@', \"a@b@@c\", 4));\n assertAr... | {
"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 [] getExplodedArray (final char cSep, @Nullable final String sElements, @CheckForSigned final int nMaxItems)\n {\n if (nMaxItems == 1)\n return new String [] { sElements };\n if (hasNoText (sElements))\n return ArrayHelper.EMPTY_STRING_ARRAY;\n\n final i... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_24 | {
"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 testPrintOptionGroupUsage ()\n {\n final OptionGroup group = new OptionGroup ().addOption (Option.builder (\"a\"))\n .addOption (Option.builder (\"b\"))\n .addOption (Option.builder (\"c\"... | {
"fields": [
{
"declarator": "DEFAULT_WIDTH = 74",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_WIDTH = 74;",
"type": "int",
"var_name": "DEFAULT_WIDTH"
},
{
"declarator": "DEFAULT_LEFT_PAD = 1",
"modifier": "public stati... | {
"body": "public void printUsage (@Nonnull final PrintWriter aPW, final int nWidth, final String sAppName, final Options aOptions)\n {\n // initialise the string buffer\n final StringBuilder aSB = new StringBuilder (getSyntaxPrefix ()).append (sAppName).append (' ');\n\n // create a list for processed opti... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_728 | {
"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 testRemoveAllString ()\n {\n assertEquals (\"abc\", StringHelper.removeAll (\"abc\", \"d\"));\n assertEquals (\"abc\", StringHelper.removeAll (\"abc\", \"ac\"));\n assertEquals (\"ab\", StringHelper.removeAll (\"abc\", \"c\"));\n assertEquals (\"a\", StringHelper.removeAll... | {
"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 removeAll (@Nullable final String sInputString, final char cRemoveChar)\n {\n // Is input string empty?\n if (hasNoText (sInputString))\n return sInputString;\n\n // Does the char occur anywhere?\n final int nFirstIndex = sInputString.indexOf (cRemoveChar... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_401 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FilenameHelperTest.java",
"identifier": "FilenameHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEnsurePathEndingWithSeparator ()\n {\n assertNull (FilenameHelper.ensurePathEndingWithSeparator (null));\n assertEquals (File.separator, FilenameHelper.ensurePathEndingWithSeparator (\"\"));\n assertEquals (\"abc\" + File.separator, FilenameHelper.ensurePathEndingWithSepa... | {
"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 @CheckReturnValue\n public static String ensurePathEndingWithSeparator (@Nullable final String sPath)\n {\n if (sPath == null)\n return null;\n return endsWithPathSeparatorChar (sPath) ? sPath : sPath + File.separator;\n }",
"class_method_signature": "FilenameHelper.ensurePathE... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_817 | {
"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 testNewMap_MapArray ()\n {\n final Map <String, Integer> aMapA = newMap (\"Hallo\", I5);\n final Map <String, Integer> aMapB = newMap (\"Welt\", I3);\n\n Map <String, Integer> aMap2 = newMap (ArrayHelper.newArray (aMapA, aMapB));\n assertEquals (2, aMap2.size ());\n ass... | {
"fields": [
{
"declarator": "s_aInstance = new CollectionHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final CollectionHelper s_aInstance = new CollectionHelper ();",
"type": "CollectionHelper",
... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static <KEYTYPE, VALUETYPE> CommonsHashMap <KEYTYPE, VALUETYPE> newMap (@Nonnegative final int nInitialCapacity)\n {\n return new CommonsHashMap <> (nInitialCapacity);\n }",
"class_method_signature": "CollectionHelper.newMap(@Nonnegative final int nInitialCa... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_544 | {
"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 testIsSpecialLocaleCode ()\n {\n assertTrue (LocaleHelper.isSpecialLocaleCode (LocaleHelper.LOCALE_ALL.toString ()));\n assertTrue (LocaleHelper.isSpecialLocaleCode (LocaleHelper.LOCALE_INDEPENDENT.toString ()));\n assertFalse (LocaleHelper.isSpecialLocaleCode (null));\n a... | {
"fields": [
{
"declarator": "LOCALE_SEPARATOR = '_'",
"modifier": "public static final",
"original_string": "public static final char LOCALE_SEPARATOR = '_';",
"type": "char",
"var_name": "LOCALE_SEPARATOR"
},
{
"declarator": "STR_ALL = \"all\"",
"modifier": "pu... | {
"body": "public static boolean isSpecialLocaleCode (@Nullable final String sLocale)\n {\n return LOCALE_ALL_STR.equalsIgnoreCase (sLocale) || LOCALE_INDEPENDENT_STR.equalsIgnoreCase (sLocale);\n }",
"class_method_signature": "LocaleHelper.isSpecialLocaleCode(@Nullable final String sLocale)",
"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_114 | {
"fields": [],
"file": "ph-config/src/test/java/com/helger/config/ConfigFactoryTest.java",
"identifier": "ConfigFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSysPropFileResourceProperties ()\n {\n SystemProperties.setPropertyValue (\"config.file\",\n new File (\"src/test/resources/sysprops/file.properties\").getAbsolutePath ());\n try\n {\n final IConfig aConfig = Config.create (Confi... | {
"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_790 | {
"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 testGetAllExceptFirst ()\n {\n // Generic\n {\n final String [] x = new String [] { \"s1\", \"s2\", \"s3\" };\n final String [] y = new String [] { \"s2\", \"s3\" };\n final String [] z = new String [] { \"s3\" };\n assertArrayEquals (y, getAllExceptFirst (x)... | {
"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 @SafeVarargs\n public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExceptFirst (@Nullable final ELEMENTTYPE... aArray)\n {\n return getAllExceptFirst (aArray, 1);\n }",
"class_method_signature": "ArrayHelper.getAllExceptFirst(@Nullable final ELEMENTTYPE... 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_285 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/ValueEnforcerTest.java",
"identifier": "ValueEnforcerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testNotEmpty2 ()\n {\n ValueEnforcer.notEmpty (\"\", \"null\");\n }",
"class_method_signature": "ValueEnforcerTest.testNotEmpty2()",
"constructor": false,
"full_signature": "@Test (expected = IllegalArgumentException.class) public ... | {
"fields": [
{
"declarator": "s_aEnabled = new AtomicBoolean (true)",
"modifier": "private static final",
"original_string": "private static final AtomicBoolean s_aEnabled = new AtomicBoolean (true);",
"type": "AtomicBoolean",
"var_name": "s_aEnabled"
},
{
"declarator"... | {
"body": "public static <T extends CharSequence> T notEmpty (final T aValue, final String sName)\n {\n if (isEnabled ())\n return notEmpty (aValue, () -> sName);\n return aValue;\n }",
"class_method_signature": "ValueEnforcer.notEmpty(final T aValue, final String sName)",
"constructor": false,
"fu... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_73 | {
"fields": [],
"file": "ph-json/src/test/java/com/helger/json/JsonValueTest.java",
"identifier": "JsonValueTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAsValue ()\n {\n assertNull (new JsonArray ().getAsValue ());\n assertNull (new JsonObject ().getAsValue ());\n assertNotNull (JsonValue.create (true).getAsValue ());\n }",
"class_method_signature": "JsonValueTest.testGetAsValue()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "NULL = new JsonValue (null)",
"modifier": "public static final",
"original_string": "public static final JsonValue NULL = new JsonValue (null);",
"type": "JsonValue",
"var_name": "NULL"
},
{
"declarator": "TRUE = new JsonValue (Boolean.TRU... | {
"body": "@Nonnull\n public static JsonValue create (final boolean bValue)\n {\n return bValue ? TRUE : FALSE;\n }",
"class_method_signature": "JsonValue.create(final boolean bValue)",
"constructor": false,
"full_signature": "@Nonnull public static JsonValue create(final boolean bValue)",
"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_456 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/math/MathHelperTest.java",
"identifier": "MathHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMaxFloat ()\n {\n CommonsAssert.assertEquals (5, MathHelper.getMaxFloat (5));\n CommonsAssert.assertEquals (5, MathHelper.getMaxFloat (5, 5, 5, 5));\n CommonsAssert.assertEquals (5, MathHelper.getMaxFloat (5, 3, 2, 1));\n CommonsAssert.assertEquals (7, MathHelper.ge... | {
"fields": [
{
"declarator": "LONG_HIGH_BITS = 0xFFFFFFFF80000000L",
"modifier": "private static final",
"original_string": "private static final long LONG_HIGH_BITS = 0xFFFFFFFF80000000L;",
"type": "long",
"var_name": "LONG_HIGH_BITS"
},
{
"declarator": "s_aInstance =... | {
"body": "public static double getMaxFloat (final float fValue, @Nonnull final float... aValues)\n {\n float ret = fValue;\n for (final float f : aValues)\n ret = Math.max (ret, f);\n return ret;\n }",
"class_method_signature": "MathHelper.getMaxFloat(final float fValue, @Nonnull final float... aVa... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_143 | {
"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 testGetOwnerDocument ()\n {\n assertNull (XMLHelper.getOwnerDocument (null));\n\n final Document doc = XMLFactory.newDocument ();\n assertEquals (doc, XMLHelper.getOwnerDocument (doc));\n\n final Element e = (Element) doc.appendChild (doc.createElement (\"root\"));\n as... | {
"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 Document getOwnerDocument (@Nullable final Node aNode)\n {\n if (aNode == null)\n return null;\n if (aNode instanceof Document)\n return (Document) aNode;\n return aNode.getOwnerDocument ();\n }",
"class_method_signature": "XMLHelper.getOwnerDocument(@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_513 | {
"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 testGetCopyWithLocales ()\n {\n final MultilingualText aMLT = new MultilingualText ();\n assertTrue (aMLT.setText (Locale.ENGLISH, \"Hi\").isChanged ());\n assertTrue (aMLT.setText (Locale.GERMAN, \"Moin\").isChanged ());\n assertEquals (2, aMLT.texts ().size ());\n\n f... | {
"fields": [
{
"declarator": "DE = LocaleCache.getInstance ().getLocale (\"de\")",
"modifier": "public static final",
"original_string": "public static final Locale DE = LocaleCache.getInstance ().getLocale (\"de\");",
"type": "Locale",
"var_name": "DE"
},
{
"declarato... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public static MultilingualText getCopyWithLocales (@Nonnull final IMultilingualText aMLT,\n @Nonnull final Collection <Locale> aContentLocales)\n {\n final MultilingualText ret = new MultilingualText ();\n for (fi... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_840 | {
"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 testContainsOnly ()\n {\n assertTrue (containsOnly (new CommonsArrayList <> (\"a\"), StringHelper::hasText));\n assertTrue (containsOnly (new CommonsArrayList <> (\"a\", \"b\"), StringHelper::hasText));\n assertTrue (containsOnly (new CommonsArrayList <> (\"a\"), null));\n ... | {
"fields": [
{
"declarator": "s_aInstance = new CollectionHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final CollectionHelper s_aInstance = new CollectionHelper ();",
"type": "CollectionHelper",
... | {
"body": "public static <ELEMENTTYPE> boolean containsOnly (@Nullable final Iterable <? extends ELEMENTTYPE> aCollection,\n @Nullable final Predicate <? super ELEMENTTYPE> aFilter)\n {\n if (isEmpty (aCollection))\n return false;\n\n if (aFilter == 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_837 | {
"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 testGetCombinedMap ()\n {\n final Map <String, Integer> m1 = newMap (\"Hallo\", I1);\n final Map <String, Integer> m2 = newMap (\"Welt\", I2);\n assertTrue (getCombinedMap (null, null).isEmpty ());\n assertEquals (m1, getCombinedMap (m1, null));\n assertEquals (m2, getC... | {
"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 <KEY, VALUE> ICommonsMap <KEY, VALUE> getCombinedMap (@Nullable final Map <KEY, VALUE> aMap1,\n @Nullable final Map <KEY, VALUE> aMap2)\n {\n if (isEmpty (aMap1))\n return newMap (... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_564 | {
"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 testStreamFlushing () throws IOException\n {\n final String WRITE_FILE = \"target/myfile.csv\";\n final String [] nextLine = new String [] { \"aaaa\", \"bbbb\", \"cccc\", \"dddd\" };\n\n try (final Writer fileWriter = new NonClosingWriter (new OutputStreamWriter (new FileOutp... | {
"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 writeNext (@Nullable final Iterator <String> aNextLine, final boolean bApplyQuotesToAll)\n {\n if (aNextLine != null)\n {\n final StringBuilder aSB = new StringBuilder (CCSV.INITIAL_STRING_SIZE);\n\n if (m_bAvoidFinalLineEnd && m_nWrittenLines > 0)\n {\n // End prev... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_134 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/transform/XMLTransformerFactoryTest.java",
"identifier": "XMLTransformerFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNewTemplates ()\n {\n // Read valid XSLT\n Templates t1 = XMLTransformerFactory.newTemplates (new ClassPathResource (\"xml/test1.xslt\"));\n assertNotNull (t1);\n\n // Read valid XSLT (with import)\n t1 = XMLTransformerFactory.newTemplates (new ClassPathResource (\"... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (XMLTransformerFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (XMLTransformerFactory.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "@Nullable\n public static Templates newTemplates (@Nonnull final IReadableResource aResource)\n {\n return newTemplates (s_aDefaultFactory, aResource);\n }",
"class_method_signature": "XMLTransformerFactory.newTemplates(@Nonnull final IReadableResource aResource)",
"constructor": false,
"full_s... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_421 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/dimension/SizeDoubleTest.java",
"identifier": "SizeDoubleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressFBWarnings (\"RV_RETURN_VALUE_IGNORED\")\n public void testGetBestMatchingSize ()\n {\n final SizeDouble aID = new SizeDouble (320, 240);\n\n // Width\n SizeDouble aID2 = aID.getBestMatchingSize (160, 180);\n CommonsAssert.assertEquals (160, aID2.getWidth ());\n CommonsAs... | {
"fields": [
{
"declarator": "m_dWidth",
"modifier": "private final",
"original_string": "private final double m_dWidth;",
"type": "double",
"var_name": "m_dWidth"
},
{
"declarator": "m_dHeight",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Nonnull\n @CheckReturnValue\n public SizeDouble getBestMatchingSize (@Nonnegative final double dMaxWidth, @Nonnegative final double dMaxHeight)\n {\n ValueEnforcer.isGT0 (dMaxWidth, \"MaxWidth\");\n ValueEnforcer.isGT0 (dMaxHeight, \"MaxHeight\");\n\n final double dRelWidth = m_dWidth / dMaxWi... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_358 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/io/file/FileHelperTest.java",
"identifier": "FileHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressFBWarnings (value = \"DMI_HARDCODED_ABSOLUTE_FILENAME\")\n public void testEnsureParentDirectoryIsPresent ()\n {\n // Root directory (no parent)\n assertTrue (FileHelper.ensureParentDirectoryIsPresent (new File (\"/\")).isUnchanged ());\n // Existing folder\n assertTrue (Fil... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (FileHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (FileHelper.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"d... | {
"body": "@Nonnull\n public static EChange ensureParentDirectoryIsPresent (@Nonnull final File aFile)\n {\n ValueEnforcer.notNull (aFile, \"File\");\n\n // If the file has no parent, it is located in the root...\n final File aParent = aFile.getParentFile ();\n if (aParent == null || aParent.exists ())\... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_708 | {
"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 testTrimStartInt ()\n {\n assertEquals (\"Hallo Welt\", StringHelper.trimStart (\"Hallo Welt\", 0));\n assertEquals (\"Hallo Welt\", StringHelper.trimStart (\"Hallo Welt\", -3));\n assertEquals (\"allo Welt \", StringHelper.trimStart (\" Hallo Welt \", 2));\n assertEquals ... | {
"fields": [
{
"declarator": "STRING_NOT_FOUND = -1",
"modifier": "public static final",
"original_string": "public static final int STRING_NOT_FOUND = -1;",
"type": "int",
"var_name": "STRING_NOT_FOUND"
},
{
"declarator": "s_aSizeTableInt = { 9, 99, 999, 9999, 99999, ... | {
"body": "@Nullable\n @CheckReturnValue\n public static String trimStart (@Nullable final String sSrc, @Nullable final String sLead)\n {\n return startsWith (sSrc, sLead) ? sSrc.substring (sLead.length (), sSrc.length ()) : sSrc;\n }",
"class_method_signature": "StringHelper.trimStart(@Nullable final 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_163 | {
"fields": [],
"file": "ph-xml/src/test/java/com/helger/xml/microdom/util/MicroHelperTest.java",
"identifier": "MicroHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertToMicroNode () throws SAXException, IOException, ParserConfigurationException\n {\n final String sXML = \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE root [ <!ENTITY sc \\\"sc.exe\\\"> <!ELEMENT root (child, child2)> <!ELEMENT child (#PCDATA)> <!ELEMEN... | {
"fields": [
{
"declarator": "s_aInstance = new MicroHelper ()",
"modifier": "@PresentForCodeCoverage\n private static final",
"original_string": "@PresentForCodeCoverage\n private static final MicroHelper s_aInstance = new MicroHelper ();",
"type": "MicroHelper",
"var_name": "s_a... | {
"body": "@Nonnull\n public static IMicroNode convertToMicroNode (@Nonnull final Node aNode)\n {\n ValueEnforcer.notNull (aNode, \"Node\");\n\n IMicroNode ret;\n final short nNodeType = aNode.getNodeType ();\n switch (nNodeType)\n {\n case Node.DOCUMENT_NODE:\n {\n ret = new MicroDo... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_499 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/lang/GenericReflectionTest.java",
"identifier": "GenericReflectionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testForName () throws ClassNotFoundException\n {\n assertSame (GenericReflectionTest.class,\n GenericReflection.<GenericReflectionTest> getClassFromName (GenericReflectionTest.class.getName ()));\n try\n {\n GenericReflection.getClassFromName (\"There ain'... | {
"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": "@Nonnull\n public static <DATATYPE> Class <DATATYPE> getClassFromName (@Nonnull final ClassLoader aClassLoader,\n @Nonnull final String sName) throws ClassNotFoundException\n {\n ValueEnforcer.notNull (aClassLoader, \"ClassLoader\");\n re... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_533 | {
"fields": [
{
"declarator": "MLH_NULL = (k, l, c, v) -> null",
"modifier": "private static final",
"original_string": "private static final LocaleCache.IMissingLocaleHandler MLH_NULL = (k, l, c, v) -> null;",
"type": "LocaleCache.IMissingLocaleHandler",
"var_name": "MLH_NULL"
}... | {
"body": "@Test\n public void testGetAllLanguages ()\n {\n for (final Locale aLocale : LocaleCache.getInstance ().getAllLanguages ())\n {\n assertNotNull (aLocale);\n assertTrue (StringHelper.hasText (aLocale.getLanguage ()));\n assertTrue (StringHelper.hasNoText (aLocale.getCountry ()));\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (LocaleCache.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (LocaleCache.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public ICommonsSet <Locale> getAllLanguages ()\n {\n final ICommonsSet <Locale> ret = new CommonsHashSet <> ();\n for (final Locale aLocale : getAllLocales ())\n {\n final String sLanguage = aLocale.getLanguage ();\n if (StringHelper.hasText (sLanguage... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_860 | {
"fields": [],
"file": "ph-commons/src/test/java/com/helger/commons/version/VersionRangeTest.java",
"identifier": "VersionRangeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAsString ()\n {\n final String [] aTrueTests = new String [] { \"[1.2.3]\",\n \"(1.2.3)\",\n \"[1.2)\",\n \"(3.4]\",\n ... | {
"fields": [
{
"declarator": "DEFAULT_VERSION_RANGE_STRING = \"[0)\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_VERSION_RANGE_STRING = \"[0)\";",
"type": "String",
"var_name": "DEFAULT_VERSION_RANGE_STRING"
},
{
"declara... | {
"body": "@Nonnull\n public String getAsString ()\n {\n return getAsString (Version.DEFAULT_PRINT_ZERO_ELEMENTS);\n }",
"class_method_signature": "VersionRange.getAsString()",
"constructor": false,
"full_signature": "@Nonnull public String getAsString()",
"identifier": "getAsString",
"invocations": [... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_476 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger (CombinationGeneratorFlexibleTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger (CombinationGeneratorFlexibleTest.class);",
"type": "Logger",
... | {
"body": "@Ignore (\"Simply wrong assumption\")\n @Test\n public void testRedundancy ()\n {\n final ICommonsList <String> aInputList = new CommonsArrayList <> (\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\");\n\n // Build all permutations of the input list, using all available slots\n final IComm... | {
"fields": [
{
"declarator": "m_bAllowEmpty",
"modifier": "private final",
"original_string": "private final boolean m_bAllowEmpty;",
"type": "boolean",
"var_name": "m_bAllowEmpty"
},
{
"declarator": "m_nSlotCount",
"modifier": "private final",
"original_st... | {
"body": "@Nonnull\n @ReturnsMutableCopy\n public ICommonsSet <ICommonsList <DATATYPE>> getCombinations (@Nonnull final ICommonsList <DATATYPE> aElements)\n {\n ValueEnforcer.notNull (aElements, \"Elements\");\n\n final ICommonsSet <ICommonsList <DATATYPE>> aAllResults = new CommonsHashSet <> ();\n itera... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_53 | {
"fields": [],
"file": "ph-tree/src/test/java/com/helger/tree/withid/folder/DefaultFolderTreeTest.java",
"identifier": "DefaultFolderTreeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasic ()\n {\n final IAggregator <String, String> aCombinator = x -> StringHelper.getImploded ('/', x);\n final DefaultFolderTree <String, Integer, ICommonsSet <Integer>> ft = DefaultFolderTree.createForSet (aCombinator);\n assertNotNull (ft.getRootItem ());\n\n final ... | {
"fields": [],
"file": "ph-tree/src/main/java/com/helger/tree/withid/folder/DefaultFolderTree.java",
"identifier": "DefaultFolderTree",
"interfaces": "",
"methods": [
{
"class_method_signature": "DefaultFolderTree.DefaultFolderTree(@Nullable final IAggregator <KEYTYPE, KEYTYPE> aKeyCombinator)",
... | {
"body": "@Nonnull\n public static <KEYTYPE, DATATYPE> DefaultFolderTree <KEYTYPE, DATATYPE, ICommonsSet <DATATYPE>> createForSet (@Nonnull final IAggregator <KEYTYPE, KEYTYPE> aKeyCombinator)\n {\n return new DefaultFolderTree <> (aKeyCombinator);\n }",
"class_method_signature": "DefaultFolderTree.createFor... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
23062279_876 | {
"fields": [],
"file": "ph-security/src/test/java/com/helger/security/password/hash/PasswordHashCreatorBCryptTest.java",
"identifier": "PasswordHashCreatorBCryptTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasicDifferentSalt ()\n {\n final String sPlainTextPassword = \"123456\";\n final PasswordHashCreatorBCrypt a = new PasswordHashCreatorBCrypt ();\n final String sPW1 = a.createPasswordHash (new PasswordSaltBCrypt (), sPlainTextPassword);\n final String sPW2 = a.createP... | {
"fields": [
{
"declarator": "ALGORITHM = \"BCrypt\"",
"modifier": "public static final",
"original_string": "public static final String ALGORITHM = \"BCrypt\";",
"type": "String",
"var_name": "ALGORITHM"
}
],
"file": "ph-security/src/main/java/com/helger/security/password/h... | {
"body": "@Nonnull\n public String createPasswordHash (@Nonnull final IPasswordSalt aSalt, @Nonnull final String sPlainTextPassword)\n {\n ValueEnforcer.notNull (aSalt, \"Salt\");\n ValueEnforcer.isInstanceOf (aSalt, PasswordSaltBCrypt.class, \"Salt\");\n ValueEnforcer.notNull (sPlainTextPassword, \"Plain... | {
"created": "8/18/2014 7:21:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 23062279,
"size": null,
"stargazer_count": null,
"stars": 20,
"updates": "2020-01-27T18:40:50+00:00",
"url": "https://github.com/phax/ph-commons"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.