id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
28858344_85
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralFlash() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS0, false);\n assertEquals(dataCoding.toByte(), (byte) 0x10);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralFlash()", "constructor": false, "fu...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_45
{ "fields": [ { "declarator": "pendingResponse", "modifier": "private", "original_string": "private PendingResponse<Command> pendingResponse;", "type": "PendingResponse<Command>", "var_name": "pendingResponse" } ], "file": "jsmpp/src/test/java/org/jsmpp/extra/PendingResponseT...
{ "body": "@Test(groups=\"checkintest\")\n public void testDoneWithInvalidResponse() {\n try {\n notifyInvalidResponse(90, pendingResponse);\n pendingResponse.waitDone();\n fail(\"Should throw InvalidResponseException\");\n } catch (ResponseTimeoutException e) {\n ...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void doneWithInvalidResponse(InvalidResponseException e) {\n lock.lock();\n try {\n illegalResponseException = e;\n condition.signal();\n } finally {\n lock.unlock();\n }\n }", "class_method_signature": "PendingResponse.doneWithInvali...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_12
{ "fields": [ { "declarator": "CHARSET_US_ASCII = Charset.forName(\"US-ASCII\")", "modifier": "private final static", "original_string": "private final static Charset CHARSET_US_ASCII = Charset.forName(\"US-ASCII\");", "type": "Charset", "var_name": "CHARSET_US_ASCII" }, { ...
{ "body": "@Test\n public void decompose_replace_sm() throws Exception {\n ByteArrayOutputStream data = new ByteArrayOutputStream();\n // command_length\n data.write(new byte[]{ 0x00, 0x00, 0x00, 0x54 });\n // command_id\n data.write(new byte[]{ 0x00, 0x00, 0x00, 0x07 });\n // command_status\n d...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DefaultDecomposer.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(DefaultDecomposer.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "public ReplaceSm replaceSm(byte[] data) throws PDUStringException {\n ReplaceSm req = new ReplaceSm();\n SequentialBytesReader reader = new SequentialBytesReader(data);\n assignHeader(req, reader);\n req.setMessageId(reader.readCString());\n StringValidator.validateString...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_53
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory00xx factory;", "type": "DataCodingFactory00xx", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory00xxTest.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodingFactory00xxUCS2() {\n byte expected = (byte) 0x08;\n DataCoding dataCoding = factory.newInstance(expected);\n\n assertEquals(dataCoding.toByte(), expected);\n assertEquals(Alphabet.parseDataCoding(dataCoding.toByte()), Alphabet.ALPHA_UCS2);\n }", "class_met...
{ "fields": [ { "declarator": "GROUP = 0x00", "modifier": "public static final", "original_string": "public static final byte GROUP = 0x00;", "type": "byte", "var_name": "GROUP" }, { "declarator": "MASK = (byte)0xc0", "modifier": "public static final", "orig...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n boolean compressed = isCompressed(dataCoding);\n boolean containMessageClass = DataCodings.containsMessageClass(dataCoding);\n MessageClass messageClass = null;\n if (containMessageClass) {\n // ignore Message Class i...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_28
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/HexUtilTest.java", "identifier": "HexUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testEncode()\n\t{\n\t\tString res = HexUtil.convertStringToHexString(\"hello world\");\n\t\t\n\t\tassertEquals(\"68656c6c6f20776f726c64\", res);\n\t}", "class_method_signature": "HexUtilTest.testEncode()", "constructor": false, "full_signature": "@Test public void testEncode()", ...
{ "fields": [ { "declarator": "hexChar = { '0', '1', '2', '3', '4', '5', '6',\n '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }", "modifier": "private static final", "original_string": "private static final char[] hexChar = { '0', '1', '2', '3', '4', '5', '6',\n '7', '8', '9'...
{ "body": "public static String convertStringToHexString(String data) {\n return conventBytesToHexString(data.getBytes());\n }", "class_method_signature": "HexUtil.convertStringToHexString(String data)", "constructor": false, "full_signature": "public static String convertStringToHexString(String data...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_86
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralMeSpecific() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1, false);\n assertEquals(dataCoding.toByte(), (byte) 0x11);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralMeSpecific()", "constructor": fa...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_69
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory1110 factory;", "type": "DataCodingFactory1110", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory1110Test.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodingVoicemailActive() {\n byte dataCodingByte = (byte) 0xd8;\n DataCoding dataCoding = factory.newInstance(dataCodingByte);\n assertEquals(dataCoding.getClass(), MessageWaitingDataCoding.class);\n assertEquals(IndicationSense.parseDataCoding(dataCoding.toByte()), ...
{ "fields": [ { "declarator": "MASK = (byte)0xf0", "modifier": "public static final", "original_string": "public static final byte MASK = (byte)0xf0;", "type": "byte", "var_name": "MASK" }, { "declarator": "GROUP = (byte)0xe0", "modifier": "public static final", ...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n // it's uncompressed UCS2\n IndicationSense indicationSense = IndicationSense.parseDataCoding(dataCoding);\n IndicationType indicationType = IndicationType.parseDataCoding(dataCoding);\n return new MessageWaitingDataCoding(indic...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_49
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingsTest.java", "identifier": "DataCodingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDataCodingsFactories() {\n for (int i = 0; i < 256; i++) {\n byte expected = (byte) (0xff & i);\n DataCoding dataCoding = DataCodings.newInstance(expected);\n if (i < 64) {\n assertEquals(DataCodings.newInstance(expected).getClass().getName(), \"org.jsmpp.b...
{ "fields": [ { "declarator": "MASK_CONTAIN_MESSAGE_CLASS = 0x10", "modifier": "public static final", "original_string": "public static final byte MASK_CONTAIN_MESSAGE_CLASS = 0x10;", "type": "byte", "var_name": "MASK_CONTAIN_MESSAGE_CLASS" }, { "declarator": "factories...
{ "body": "public static DataCoding newInstance(byte dataCoding) {\n for (DataCodingFactory factory : factories) {\n if (factory.isRecognized(dataCoding)) {\n return factory.newInstance(dataCoding);\n }\n }\n return new RawDataCoding(dataCoding);\n }", "c...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_2
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/StringValidatorTest.java", "identifier": "StringValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups=\"checkintest\")\n public void validateStringOctetStringWithByteArray() throws Exception {\n StringValidator.validateString(\"\".getBytes(\"UTF-8\"), StringParameter.SHORT_MESSAGE);\n StringValidator.validateString(\"short messages\".getBytes(\"UTF-8\"), StringParameter.SHORT_...
{ "fields": [ { "declarator": "ACTUAL_LENGTH_IS = \". Actual length is \"", "modifier": "private static final", "original_string": "private static final String ACTUAL_LENGTH_IS = \". Actual length is \";", "type": "String", "var_name": "ACTUAL_LENGTH_IS" }, { "declarato...
{ "body": "public static void validateString(String value, StringParameter param)\n throws PDUStringException {\n if (param.getType() == StringType.C_OCTET_STRING) {\n if (param.isRangeMinAndMax()) {\n if (!isCOctetStringValid(value, param.getMax())) {\n ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_24
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatRelativeTimeSecond() {\n GregorianCalendar smscDate = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n\n GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n date.setTimeInMillis(smscDate....
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_73
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetDefault() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_DEFAULT);\n assertEquals(dataCoding.toByte(), (byte) 0x00);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetDefault()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_65
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/RawDataCodingTest.java", "identifier": "RawDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAllRawDataCodings() {\n for (int i = 0; i < 256; i++) {\n byte expected = (byte) (0xff & i);\n RawDataCoding dataCoding = new RawDataCoding(expected);\n assertEquals(dataCoding.toByte(), expected);\n assertEquals(dataCoding, new RawDataCoding(expected));\n ...
{ "fields": [ { "declarator": "value", "modifier": "private final", "original_string": "private final byte value;", "type": "byte", "var_name": "value" } ], "file": "jsmpp/src/main/java/org/jsmpp/bean/RawDataCoding.java", "identifier": "RawDataCoding", "interfaces": "impl...
{ "body": "public byte toByte() {\n return value;\n }", "class_method_signature": "RawDataCoding.toByte()", "constructor": false, "full_signature": "public byte toByte()", "identifier": "toByte", "invocations": [], "modifiers": "public", "parameters": "()", "return": "byte", "signature": "...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_32
{ "fields": [ { "declarator": "defaultPDUReader", "modifier": "", "original_string": "DefaultPDUReader defaultPDUReader;", "type": "DefaultPDUReader", "var_name": "defaultPDUReader" } ], "file": "jsmpp/src/test/java/org/jsmpp/DefaultPDUReaderTest.java", "identifier": "Defau...
{ "body": "@Test(groups = \"checkintest\", expectedExceptions = InvalidCommandLengthException.class)\n public void testInvalidPDUHeaderWithCommandLengthEigth() throws Exception {\n\n DefaultPDUReader defaultPDUReader = new DefaultPDUReader();\n\n DataInputStream in = new DataInputStream(\n new ByteArray...
{ "fields": [], "file": "jsmpp/src/main/java/org/jsmpp/DefaultPDUReader.java", "identifier": "DefaultPDUReader", "interfaces": "implements PDUReader", "methods": [ { "class_method_signature": "DefaultPDUReader.readPDUHeader(DataInputStream in)", "constructor": false, "full_signature": "@...
{ "body": "@Override\n public Command readPDUHeader(DataInputStream in)\n throws InvalidCommandLengthException, IOException {\n Command header = new Command();\n header.setCommandLength(in.readInt());\n\n if (header.getCommandLength() < PDU_HEADER_LENGTH) {\n // command l...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_33
{ "fields": [ { "declarator": "defaultPDUReader", "modifier": "", "original_string": "DefaultPDUReader defaultPDUReader;", "type": "DefaultPDUReader", "var_name": "defaultPDUReader" } ], "file": "jsmpp/src/test/java/org/jsmpp/DefaultPDUReaderTest.java", "identifier": "Defau...
{ "body": "@Test(groups = \"checkintest\", expectedExceptions = InvalidCommandLengthException.class)\n public void testInvalidPDUHeaderWithCommandLengthFifteen() throws Exception {\n\n DefaultPDUReader defaultPDUReader = new DefaultPDUReader();\n\n DataInputStream in = new DataInputStream(\n new ByteArr...
{ "fields": [], "file": "jsmpp/src/main/java/org/jsmpp/DefaultPDUReader.java", "identifier": "DefaultPDUReader", "interfaces": "implements PDUReader", "methods": [ { "class_method_signature": "DefaultPDUReader.readPDUHeader(DataInputStream in)", "constructor": false, "full_signature": "@...
{ "body": "@Override\n public Command readPDUHeader(DataInputStream in)\n throws InvalidCommandLengthException, IOException {\n Command header = new Command();\n header.setCommandLength(in.readInt());\n\n if (header.getCommandLength() < PDU_HEADER_LENGTH) {\n // command l...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_25
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatRelativeTimeHours() {\n GregorianCalendar smscDate = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n\n GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n date.setTimeInMillis(smscDate.g...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_3
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/StringValidatorTest.java", "identifier": "StringValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups=\"checkintest\")\n public void validateStringCOctetStringWithString() throws Exception {\n StringValidator.validateString(\"\", StringParameter.SYSTEM_ID);\n StringValidator.validateString(\"System ID\", StringParameter.SYSTEM_ID);\n StringValidator.validateString(\"123...
{ "fields": [ { "declarator": "ACTUAL_LENGTH_IS = \". Actual length is \"", "modifier": "private static final", "original_string": "private static final String ACTUAL_LENGTH_IS = \". Actual length is \";", "type": "String", "var_name": "ACTUAL_LENGTH_IS" }, { "declarato...
{ "body": "public static void validateString(String value, StringParameter param)\n throws PDUStringException {\n if (param.getType() == StringType.C_OCTET_STRING) {\n if (param.isRangeMinAndMax()) {\n if (!isCOctetStringValid(value, param.getMax())) {\n ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_48
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory1101 factory;", "type": "DataCodingFactory1101", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory1101Test.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodingVoicemailActive() {\n byte dataCodingByte = (byte) 0xd8;\n DataCoding dataCoding = factory.newInstance(dataCodingByte);\n assertEquals(dataCoding.getClass(), MessageWaitingDataCoding.class);\n assertEquals(IndicationSense.parseDataCoding(dataCoding.toByte()), ...
{ "fields": [ { "declarator": "MASK = (byte)0xf0", "modifier": "public static final", "original_string": "public static final byte MASK = (byte)0xf0;", "type": "byte", "var_name": "MASK" }, { "declarator": "GROUP = (byte)0xd0", "modifier": "public static final", ...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n /*\n * Mobile shall store the text message of the SMS in addition to setting\n * indication\n */\n IndicationSense indicationSense = IndicationSense.parseDataCoding(dataCoding);\n IndicationType indicationType =...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_87
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralSimUsimSpecific() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS2, false);\n assertEquals(dataCoding.toByte(), (byte) 0x12);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralSimUsimSpecific()", "constr...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_68
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory1110 factory;", "type": "DataCodingFactory1110", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory1110Test.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodingVoicemailInactive() {\n byte dataCodingByte = (byte) 0xd0;\n DataCoding dataCoding = factory.newInstance(dataCodingByte);\n assertEquals(dataCoding.getClass(), MessageWaitingDataCoding.class);\n assertEquals(IndicationSense.parseDataCoding(dataCoding.toByte())...
{ "fields": [ { "declarator": "MASK = (byte)0xf0", "modifier": "public static final", "original_string": "public static final byte MASK = (byte)0xf0;", "type": "byte", "var_name": "MASK" }, { "declarator": "GROUP = (byte)0xe0", "modifier": "public static final", ...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n // it's uncompressed UCS2\n IndicationSense indicationSense = IndicationSense.parseDataCoding(dataCoding);\n IndicationType indicationType = IndicationType.parseDataCoding(dataCoding);\n return new MessageWaitingDataCoding(indic...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_29
{ "fields": [ { "declarator": "defaultPDUReader", "modifier": "", "original_string": "DefaultPDUReader defaultPDUReader;", "type": "DefaultPDUReader", "var_name": "defaultPDUReader" } ], "file": "jsmpp/src/test/java/org/jsmpp/DefaultPDUReaderTest.java", "identifier": "Defau...
{ "body": "@Test\n public void testPDUHeader() throws Exception {\n\n DataInputStream in = new DataInputStream(\n new ByteArrayInputStream(\n new byte[]{ 0x00, 0x00, 0x00, 0x10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c }));\n\n Command command = defaultPDUReader....
{ "fields": [], "file": "jsmpp/src/main/java/org/jsmpp/DefaultPDUReader.java", "identifier": "DefaultPDUReader", "interfaces": "implements PDUReader", "methods": [ { "class_method_signature": "DefaultPDUReader.readPDUHeader(DataInputStream in)", "constructor": false, "full_signature": "@...
{ "body": "@Override\n public Command readPDUHeader(DataInputStream in)\n throws InvalidCommandLengthException, IOException {\n Command header = new Command();\n header.setCommandLength(in.readInt());\n\n if (header.getCommandLength() < PDU_HEADER_LENGTH) {\n // command l...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_52
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory00xx factory;", "type": "DataCodingFactory00xx", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory00xxTest.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodingFactory00xxIA5() {\n byte expected = (byte) 0x01;\n DataCoding dataCoding = factory.newInstance(expected);\n\n assertEquals(dataCoding.toByte(), expected);\n assertEquals(Alphabet.parseDataCoding(dataCoding.toByte()), Alphabet.ALPHA_IA5);\n }", "class_metho...
{ "fields": [ { "declarator": "GROUP = 0x00", "modifier": "public static final", "original_string": "public static final byte GROUP = 0x00;", "type": "byte", "var_name": "GROUP" }, { "declarator": "MASK = (byte)0xc0", "modifier": "public static final", "orig...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n boolean compressed = isCompressed(dataCoding);\n boolean containMessageClass = DataCodings.containsMessageClass(dataCoding);\n MessageClass messageClass = null;\n if (containMessageClass) {\n // ignore Message Class i...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_13
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void testStaticRelativeFormatter() {\n String formatted = RelativeTimeFormatter.format(07, 12, 26, 12, 46, 10);\n assertEquals(formatted, \"071226124610000R\");\n }", "class_method_signature": "RelativeTimeFormatterTest.testStaticRelativeFormatter()", "c...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_44
{ "fields": [ { "declarator": "pendingResponse", "modifier": "private", "original_string": "private PendingResponse<Command> pendingResponse;", "type": "PendingResponse<Command>", "var_name": "pendingResponse" } ], "file": "jsmpp/src/test/java/org/jsmpp/extra/PendingResponseT...
{ "body": "@Test(groups=\"checkintest\")\n public void testUnreachTimeout() {\n try {\n notifyDone(90, pendingResponse);\n pendingResponse.waitDone();\n } catch (ResponseTimeoutException e) {\n fail(\"Should be done with valid response\");\n } catch (InvalidRes...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void waitDone() throws ResponseTimeoutException,\n InvalidResponseException {\n lock.lock();\n try {\n if (!isDoneResponse()) {\n try {\n condition.await(timeout, TimeUnit.MILLISECONDS);\n } catch (InterruptedExcept...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_4
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/StringValidatorTest.java", "identifier": "StringValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups=\"checkintest\")\n public void validateStringCOctetStringWithByteArray() throws Exception {\n StringValidator.validateString(\"\".getBytes(\"UTF-8\"), StringParameter.SYSTEM_ID);\n StringValidator.validateString(\"System ID\".getBytes(\"UTF-8\"), StringParameter.SYSTEM_ID);\n ...
{ "fields": [ { "declarator": "ACTUAL_LENGTH_IS = \". Actual length is \"", "modifier": "private static final", "original_string": "private static final String ACTUAL_LENGTH_IS = \". Actual length is \";", "type": "String", "var_name": "ACTUAL_LENGTH_IS" }, { "declarato...
{ "body": "public static void validateString(String value, StringParameter param)\n throws PDUStringException {\n if (param.getType() == StringType.C_OCTET_STRING) {\n if (param.isRangeMinAndMax()) {\n if (!isCOctetStringValid(value, param.getMax())) {\n ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_18
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\", expectedExceptions = IllegalArgumentException.class)\n public void formatRelativeDateWhenExceedsCentury() {\n RelativeTimeFormatter timeFormatter = new RelativeTimeFormatter();\n\n // relative date more then 100 years ahead\n GregorianCalendar date = new GregorianC...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_22
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatRelativeDateMonthMay() {\n GregorianCalendar smscDate = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n smscDate.set(2015, Calendar.MAY, 1, 13, 14, 15);\n\n GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone(\...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_75
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetLatin1() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_LATIN1);\n assertEquals(dataCoding.toByte(), (byte) 0x03);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetLatin1()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_34
{ "fields": [ { "declarator": "responseHandler", "modifier": "private", "original_string": "private DummyResponseHandler responseHandler;", "type": "DummyResponseHandler", "var_name": "responseHandler" }, { "declarator": "bindRequest", "modifier": "private", ...
{ "body": "@Test(groups=\"checkintest\")\n public void testSucceedAccept() {\n try {\n bindRequest.accept(\"sys\");\n } catch (PDUStringException e) {\n fail(\"Should succes accepting bind request\");\n } catch (IllegalStateException e1) {\n fail(\"Should succe...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void accept(String systemId) throws PDUStringException, IllegalStateException, IOException {\n \taccept(systemId, null);\n }", "class_method_signature": "BindRequest.accept(String systemId)", "constructor": false, "full_signature": "public void accept(String systemId)", "identifier": "...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_43
{ "fields": [ { "declarator": "pendingResponse", "modifier": "private", "original_string": "private PendingResponse<Command> pendingResponse;", "type": "PendingResponse<Command>", "var_name": "pendingResponse" } ], "file": "jsmpp/src/test/java/org/jsmpp/extra/PendingResponseT...
{ "body": "@Test(groups=\"checkintest\")\n public void testReachTimeout() {\n try {\n notifyDone(1010, pendingResponse);\n pendingResponse.waitDone();\n fail(\"Timeout should be reached\");\n } catch (ResponseTimeoutException e) {\n } catch (InvalidResponseExce...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void waitDone() throws ResponseTimeoutException,\n InvalidResponseException {\n lock.lock();\n try {\n if (!isDoneResponse()) {\n try {\n condition.await(timeout, TimeUnit.MILLISECONDS);\n } catch (InterruptedExcept...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_14
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatNullDate() {\n assertNull(relativeTimeFormatter.format((Date) null));\n assertNull(relativeTimeFormatter.format((Calendar) null));\n }", "class_method_signature": "RelativeTimeFormatterTest.formatNullDate()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_8
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/OctetUtilTest.java", "identifier": "OctetUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testShortEncodeFromIgor() {\n assertEquals(0x1D4, OctetUtil.bytesToShort(new byte[] {1, (byte)0xD4}, 0));\n }", "class_method_signature": "OctetUtilTest.testShortEncodeFromIgor()", "constructor": false, "full_signature": "@Test public void testShortEncodeFromIgor()", ...
{ "fields": [], "file": "jsmpp/src/main/java/org/jsmpp/util/OctetUtil.java", "identifier": "OctetUtil", "interfaces": "", "methods": [ { "class_method_signature": "OctetUtil.OctetUtil()", "constructor": true, "full_signature": "private OctetUtil()", "identifier": "OctetUtil", ...
{ "body": "public static short bytesToShort(byte[] bytes) {\n return bytesToShort(bytes, 0);\n }", "class_method_signature": "OctetUtil.bytesToShort(byte[] bytes)", "constructor": false, "full_signature": "public static short bytesToShort(byte[] bytes)", "identifier": "bytesToShort", "invocations"...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_55
{ "fields": [ { "declarator": "factory", "modifier": "", "original_string": "DataCodingFactory1100 factory;", "type": "DataCodingFactory1100", "var_name": "factory" } ], "file": "jsmpp/src/test/java/org/jsmpp/bean/DataCodingFactory1100Test.java", "identifier": "DataCodingFa...
{ "body": "@Test\n public void testDataCodings1100() {\n for (byte dataCodingByte = (byte) 0xc0; dataCodingByte < (byte) 0xd0; dataCodingByte++) {\n DataCoding dataCoding = factory.newInstance(dataCodingByte);\n assertEquals(dataCoding.getClass(), MessageWaitingDataCoding.class);\n // assertEquals(...
{ "fields": [ { "declarator": "MASK = (byte)0xf0", "modifier": "public static final", "original_string": "public static final byte MASK = (byte)0xf0;", "type": "byte", "var_name": "MASK" }, { "declarator": "GROUP = (byte)0xc0", "modifier": "public static final", ...
{ "body": "public DataCoding newInstance(byte dataCoding) {\n /*\n * Mobile may discard the contents of the message, and only present the\n * indication to the user.\n */\n IndicationSense indicationSense = IndicationSense.parseDataCoding(dataCoding);\n IndicationType indi...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_79
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetLatinHebrew() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_LATIN_HEBREW);\n assertEquals(dataCoding.toByte(), (byte) 0x07);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetLatinHebrew()", "constructor": false, ...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_80
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetUCS2() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_UCS2);\n assertEquals(dataCoding.toByte(), (byte) 0x08);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetUCS2()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_38
{ "fields": [ { "declarator": "responseHandler", "modifier": "private", "original_string": "private DummyResponseHandler responseHandler;", "type": "DummyResponseHandler", "var_name": "responseHandler" }, { "declarator": "bindRequest", "modifier": "private", ...
{ "body": "@Test(groups=\"checkintest\")\n public void testNonSingleAccept() {\n try {\n bindRequest.accept(\"sys\");\n } catch (PDUStringException e) {\n fail(\"Should success accepting bind request\");\n } catch (IllegalStateException e1) {\n fail(\"Should su...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void accept(String systemId) throws PDUStringException, IllegalStateException, IOException {\n \taccept(systemId, null);\n }", "class_method_signature": "BindRequest.accept(String systemId)", "constructor": false, "full_signature": "public void accept(String systemId)", "identifier": "...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_39
{ "fields": [ { "declarator": "responseHandler", "modifier": "private", "original_string": "private DummyResponseHandler responseHandler;", "type": "DummyResponseHandler", "var_name": "responseHandler" }, { "declarator": "bindRequest", "modifier": "private", ...
{ "body": "@Test(groups=\"checkintest\")\n public void testNonSingleReject() {\n try {\n bindRequest.reject(-1);\n } catch (IllegalStateException e1) {\n fail(\"Should success rejecting bind request\");\n } catch (IOException e1) {\n fail(\"Should success rejec...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void reject(int errorCode) throws IllegalStateException, IOException {\n lock.lock();\n try {\n if (done) {\n throw new IllegalStateException(\"Response already initiated\");\n } else {\n done = true;\n try {\n ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_81
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetPictogramEncoding() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_PICTOGRAM_ENCODING);\n assertEquals(dataCoding.toByte(), (byte) 0x09);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetPictogramEncoding()", "con...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_78
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetCyrillic() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_CYRILLIC);\n assertEquals(dataCoding.toByte(), (byte) 0x06);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetCyrillic()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_54
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/RegisteredDeliveryTest.java", "identifier": "RegisteredDeliveryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups=\"checkintest\")\n\tpublic void testSMSCDeliveryReceipt() {\n\t\tRegisteredDelivery regDel = new RegisteredDelivery();\n\t\tassertTrue(SMSCDeliveryReceipt.DEFAULT.containedIn(regDel));\n\t\t\n\t\tregDel.setSMSCDeliveryReceipt(SMSCDeliveryReceipt.SUCCESS_FAILURE);\n\t\tassertTrue(SMSCDeliveryRe...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte value;", "type": "byte", "var_name": "value" } ], "file": "jsmpp/src/main/java/org/jsmpp/bean/RegisteredDelivery.java", "identifier": "RegisteredDelivery", "interfaces": "", "...
{ "body": "public RegisteredDelivery setSMSCDeliveryReceipt(\n SMSCDeliveryReceipt smscDeliveryReceipt) {\n value = SMSCDeliveryReceipt.compose(value, smscDeliveryReceipt);\n return this;\n }", "class_method_signature": "RegisteredDelivery.setSMSCDeliveryReceipt(\n SMSCDeliver...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_15
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void validateRelativeDate() throws Exception {\n String formatted = RelativeTimeFormatter.format(07, 12, 26, 12, 46, 10);\n StringValidator.validateString(formatted, StringParameter.SCHEDULE_DELIVERY_TIME);\n StringValidator.validateString(formatted, Strin...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_42
{ "fields": [ { "declarator": "requestReceiver", "modifier": "private", "original_string": "private BindRequestReceiver requestReceiver;", "type": "BindRequestReceiver", "var_name": "requestReceiver" } ], "file": "jsmpp/src/test/java/org/jsmpp/session/BindRequestReceiverTest....
{ "body": "@Test(groups=\"checkintest\")\n public void testNonSingleWait() {\n \n try {\n requestReceiver.waitForRequest(1000);\n fail(\"Should throw TimeoutException\");\n } catch (IllegalStateException e) {\n fail(\"Should throw TimeoutException\");\n ...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "requestCondition = lock.newCondition()", "modifier"...
{ "body": "BindRequest waitForRequest(long timeout) throws IllegalStateException, TimeoutException {\n lock.lock();\n try {\n if (alreadyWaitForRequest) {\n throw new IllegalStateException(\"waitForRequest(long) method already invoked\");\n } else if (request == null...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_35
{ "fields": [ { "declarator": "responseHandler", "modifier": "private", "original_string": "private DummyResponseHandler responseHandler;", "type": "DummyResponseHandler", "var_name": "responseHandler" }, { "declarator": "bindRequest", "modifier": "private", ...
{ "body": "@Test(groups=\"checkintest\")\n public void testFailedAccept() {\n responseHandler.closeConnection();\n try {\n bindRequest.accept(\"sys\");\n fail(\"Should throw IOException\");\n } catch (PDUStringException e) {\n fail(\"Should throw IOException\")...
{ "fields": [ { "declarator": "lock = new ReentrantLock()", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock();", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifier": "priv...
{ "body": "public void accept(String systemId) throws PDUStringException, IllegalStateException, IOException {\n \taccept(systemId, null);\n }", "class_method_signature": "BindRequest.accept(String systemId)", "constructor": false, "full_signature": "public void accept(String systemId)", "identifier": "...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_74
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/bean/GeneralDataCodingTest.java", "identifier": "GeneralDataCodingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneralAlphabetIA5() {\n DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_IA5);\n assertEquals(dataCoding.toByte(), (byte) 0x01);\n }", "class_method_signature": "GeneralDataCodingTest.testGeneralAlphabetIA5()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "DEFAULT = new GeneralDataCoding()", "modifier": "public static final", "original_string": "public static final GeneralDataCoding DEFAULT = new GeneralDataCoding();", "type": "GeneralDataCoding", "var_name": "DEFAULT" }, { "declarator": "co...
{ "body": "public byte toByte() {\n byte value = compressed ? DataCodingFactory00xx.MASK_COMPRESSED : 0;\n value |= alphabet.value();\n if (messageClass != null) {\n value |= DataCodings.MASK_CONTAIN_MESSAGE_CLASS;\n value |= messageClass.value();\n }\n return ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_23
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatRelativeDateWeek() {\n GregorianCalendar smscDate = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n smscDate.set(2016, Calendar.FEBRUARY, 15, 16, 17, 18);\n\n GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_19
{ "fields": [ { "declarator": "relativeTimeFormatter", "modifier": "private", "original_string": "private RelativeTimeFormatter relativeTimeFormatter;", "type": "RelativeTimeFormatter", "var_name": "relativeTimeFormatter" } ], "file": "jsmpp/src/test/java/org/jsmpp/util/Relat...
{ "body": "@Test(groups = \"checkintest\")\n public void formatRelativeDateSame() {\n GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone(\"America/Denver\"));\n assertEquals(relativeTimeFormatter.format(date, date), \"000000000000000R\");\n }", "class_method_signature": "RelativeTimeFormatt...
{ "fields": [ { "declarator": "utcTimeZone = TimeZone.getTimeZone(\"UTC\")", "modifier": "private static", "original_string": "private static TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "utcTimeZone" }, { "declarator": "DATE_F...
{ "body": "public String format(Calendar calendar) {\n // As the relative period is calculated on epoch (timeInMillis), no TimeZone information is needed\n Calendar smscCalendar = Calendar.getInstance();\n return format(calendar, smscCalendar);\n }", "class_method_signature": "RelativeTimeFormatter.format...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
28858344_5
{ "fields": [], "file": "jsmpp/src/test/java/org/jsmpp/util/StringValidatorTest.java", "identifier": "StringValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups=\"checkintest\")\n public void validateStringCOctetStringWithStringAndWithoutARange() throws Exception {\n StringValidator.validateString(\"\", StringParameter.SCHEDULE_DELIVERY_TIME);\n StringValidator.validateString(\"020610233429000R\", StringParameter.SCHEDULE_DELIVERY_TIM...
{ "fields": [ { "declarator": "ACTUAL_LENGTH_IS = \". Actual length is \"", "modifier": "private static final", "original_string": "private static final String ACTUAL_LENGTH_IS = \". Actual length is \";", "type": "String", "var_name": "ACTUAL_LENGTH_IS" }, { "declarato...
{ "body": "public static void validateString(String value, StringParameter param)\n throws PDUStringException {\n if (param.getType() == StringType.C_OCTET_STRING) {\n if (param.isRangeMinAndMax()) {\n if (!isCOctetStringValid(value, param.getMax())) {\n ...
{ "created": "1/6/2015 10:29:43 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 28858344, "size": null, "stargazer_count": null, "stars": 106, "updates": "2020-01-19T23:01:52+00:00", "url": "https://github.com/opentelecoms-org...
49445030_1
{ "fields": [], "file": "runtime/src/test/java/com/github/imasahiro/stringformatter/runtime/integers/HexIntegerFormatterTest.java", "identifier": "HexIntegerFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void formatTo() {\n assertEquals(Integer.toHexString(Short.MAX_VALUE), run(Short.MAX_VALUE, 0, false));\n assertEquals(\"18000\", run(Short.MIN_VALUE, 0, false));\n assertEquals(Integer.toHexString(Integer.MAX_VALUE), run(Integer.MAX_VALUE, 0, false));\n assert...
{ "fields": [ { "declarator": "PADDED_WITH_ZEROS = 1", "modifier": "public static final", "original_string": "public static final int PADDED_WITH_ZEROS = 1;", "type": "int", "var_name": "PADDED_WITH_ZEROS" } ], "file": "runtime/src/main/java/com/github/imasahiro/stringformatt...
{ "body": "public static StringBuilder formatTo(StringBuilder sb, short v, int flags, int width) {\n long unsigned = Math.abs(v);\n unsigned += v < 0 ? 1L << 16 : 0;\n return format0(sb, unsigned, flags, width);\n }", "class_method_signature": "HexIntegerFormatter.formatTo(StringBuilder sb, ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49445030, "size": 20417, "stargazer_count": 11, "stars": null, "updates": null, "url": "https://github.com/imasahiro/auto-string-formatter" }
49445030_0
{ "fields": [], "file": "runtime/src/test/java/com/github/imasahiro/stringformatter/runtime/integers/IntegerUtilsTest.java", "identifier": "IntegerUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLog10() throws Exception {\n assertEquals(1, IntegerUtils.log10(1));\n assertEquals(1, IntegerUtils.log10(9));\n\n assertEquals(2, IntegerUtils.log10(10));\n assertEquals(2, IntegerUtils.log10(11));\n assertEquals(2, IntegerUtils.log10(99));\n\n...
{ "fields": [ { "declarator": "powersOf10 = {\n 1L,\n 10L,\n 100L,\n 1000L,\n 10000L,\n 100000L,\n 1000000L,\n 10000000L,\n 100000000L,\n 1000000000L,\n 10000000000L,\n 1000000...
{ "body": "public static int log10(long unsigned) {\n if (unsigned != 0) {\n int digits = maxLog10ForLeadingZeros[Long.numberOfLeadingZeros(unsigned)];\n return digits + (unsigned >= powersOf10[digits] ? 1 : 0);\n } else {\n return 1;\n }\n }", "class_method_...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49445030, "size": 20417, "stargazer_count": 11, "stars": null, "updates": null, "url": "https://github.com/imasahiro/auto-string-formatter" }
3460824_51
{ "fields": [ { "declarator": "TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \"-h\", \"handlers.package1\", \"handlers.package2\"}", "modifier": "private static final", "original_string": "private static final String[] TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \...
{ "body": "@Test\n public void testPathsWithHyphens() throws InterpreterPropertyException {\n Map<ExecutionProperty, List<String>> parsedArgs = new CommandLineParser(TestConfigProperty.getAll()).parseProperties(propertyMap, TEST_PATH_ARG_WITH_INLINE_HYPHEN);\n Assert.assertTrue(\"-h flag not found\",...
{ "fields": [], "file": "interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java", "identifier": "CommandLineParser", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineParser.CommandLineParser(List<ExecutionProperty> properties)", "constr...
{ "body": "public Map<ExecutionProperty, List<String>> parseProperties(Map<ExecutionProperty, List<String>> propertyMap, String... args) throws InterpreterPropertyException {\n\n //if some command line switches were specified\n if ( args.length > 0 ) {\n //easiest to build the args back up in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_47
{ "fields": [ { "declarator": "TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \"-h\", \"handlers.package1\", \"handlers.package2\"}", "modifier": "private static final", "original_string": "private static final String[] TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \...
{ "body": "@Test\n public void testArgWithNoValues() throws InterpreterPropertyException {\n propertyMap = new HashMap<>();\n Map<ExecutionProperty, List<String>> parsedArgs = new CommandLineParser(TestConfigProperty.getAll()).parseProperties(propertyMap, TEST_ARGS);\n Assert.assertTrue(\"-sho...
{ "fields": [], "file": "interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java", "identifier": "CommandLineParser", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineParser.CommandLineParser(List<ExecutionProperty> properties)", "constr...
{ "body": "public Map<ExecutionProperty, List<String>> parseProperties(Map<ExecutionProperty, List<String>> propertyMap, String... args) throws InterpreterPropertyException {\n\n //if some command line switches were specified\n if ( args.length > 0 ) {\n //easiest to build the args back up in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_10
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java", "identifier": "PolledAssertionTest", "interfaces": "", "superclass": "extends Assert" }
{ "body": "@Test\n public void testPolledConditionPasses() throws Exception {\n final boolean[] condition = {false};\n\n new Thread(new Runnable() {\n public void run() {\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n ...
{ "fields": [], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java", "identifier": "PolledAssertion", "interfaces": "", "methods": [ { "class_method_signature": "PolledAssertion.getTimeoutSeconds()", "constructor": false, "full_signature": "prot...
{ "body": "public int await() {\n return await(getTimeoutSeconds());\n }", "class_method_signature": "PolledAssertion.await()", "constructor": false, "full_signature": "public int await()", "identifier": "await", "invocations": [ "await", "getTimeoutSeconds" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_7
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkTheImplementationClassCannotBeAnInterface() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmockimplclassisaninterface\"), chorusLog);\n\n verify(chorusLog).warn(\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_30
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testAMandatoryPropertyMustBeProvidedIfADefaultDoesNotExist() {\n Properties p = new Properties();\n try {\n configBuilder.buildConfig(ConfigClassPropertyWithNoDefault.class, p);\n fail(\"Should not validate\");\n } catch (Exception e) {\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_26
{ "fields": [ { "declarator": "filterFactory = new ClassFilterDecorator()", "modifier": "private", "original_string": "private ClassFilterDecorator filterFactory = new ClassFilterDecorator();", "type": "ClassFilterDecorator", "var_name": "filterFactory" } ], "file": "interpre...
{ "body": "@Test\n public void testCoreHandlersIfUserPackagesSpecified() {\n ClassFilter classFilter = filterFactory.decorateWithPackageNameFilters(new HandlerAnnotationFilter(), Arrays.asList(\"com.test\"));\n assertTrue(\"Allow standard handlers even if users sets handler package prefixes\", classFil...
{ "fields": [], "file": "interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/filter/ClassFilterDecorator.java", "identifier": "ClassFilterDecorator", "interfaces": "", "methods": [ { "class_method_signature": "ClassFilterDecorator.decorateWithPackageNameFilters(ClassFilter ...
{ "body": "public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {\n DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);\n\n //if user has specified package prefixes, restrict to those\n ClassFilter pac...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_27
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testICanBuildABeanProvidingASimpleStringProperty() throws ConfigBuilderException {\n Properties p = new Properties();\n p.setProperty(\"stringProperty\", \"My Provided Value\");\n ConfigClassWithSimpleProperty c = configBuilder.buildConfig(ConfigClassWithSimplePr...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_31
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testConfigPropertiesWithEnumField() throws ConfigBuilderException {\n Properties p = new Properties();\n p.setProperty(\"enumField\", \"feature\");\n p.setProperty(\"enumFieldCaseInsensitive\", \"ScEnArIo\");\n\n\n ConfigClassWithEnumTypes c = configBuilde...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_6
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkAnErrorIsRaisedWhenTheSubsystemIdIsAnEmptyString() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmocknoid\"), chorusLog);\n\n verify(chorusLog).warn(\n \"The ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_11
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java", "identifier": "PolledAssertionTest", "interfaces": "", "superclass": "extends Assert" }
{ "body": "@Test\n public void testPolledConditionFails() throws Exception {\n final boolean[] condition = {false};\n try {\n new PolledAssertion() {\n @Override\n protected void validate() {\n assertTrue(condition[0]);\n }\n ...
{ "fields": [], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java", "identifier": "PolledAssertion", "interfaces": "", "methods": [ { "class_method_signature": "PolledAssertion.getTimeoutSeconds()", "constructor": false, "full_signature": "prot...
{ "body": "public int await() {\n return await(getTimeoutSeconds());\n }", "class_method_signature": "PolledAssertion.await()", "constructor": false, "full_signature": "public int await()", "identifier": "await", "invocations": [ "await", "getTimeoutSeconds" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_46
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/test/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtilsTest.java", "identifier": "ConfigPropertyUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEnumWithBadCharacters() {\n Pattern actual = ConfigPropertyUtils.createValidationPatternFromEnumType(BadBadEnum.class);\n assertEquals(\"(?i)This_Enum_Val_Cointains_Really_\\\\$_BAD_CHARS_£\", actual.pattern());\n assertTrue(actual.matcher(BadBadEnum.This_Enu...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtils.java", "identifier": "ConfigPropertyUtils", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyUtils.createValidationPatternFromEnumTyp...
{ "body": "public static <T extends Enum<T>> Pattern createValidationPatternFromEnumType(Class<T> enumType) {\n\n String regEx = Stream.of(enumType.getEnumConstants())\n .map(Enum::name)\n .collect(Collectors.joining(\"|\", \"(?i)\", \"\"));\n\n //Enum constants may contain...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_50
{ "fields": [ { "declarator": "TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \"-h\", \"handlers.package1\", \"handlers.package2\"}", "modifier": "private static final", "original_string": "private static final String[] TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \...
{ "body": "@Test\n public void testArgWithMultipleValues() throws InterpreterPropertyException {\n Map<ExecutionProperty, List<String>> parsedArgs = new CommandLineParser(TestConfigProperty.getAll()).parseProperties(propertyMap, TEST_ARGS);\n Assert.assertTrue(\"-h flag not found\", parsedArgs.contai...
{ "fields": [], "file": "interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java", "identifier": "CommandLineParser", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineParser.CommandLineParser(List<ExecutionProperty> properties)", "constr...
{ "body": "public Map<ExecutionProperty, List<String>> parseProperties(Map<ExecutionProperty, List<String>> propertyMap, String... args) throws InterpreterPropertyException {\n\n //if some command line switches were specified\n if ( args.length > 0 ) {\n //easiest to build the args back up in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_36
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test(expected = ConfigBuilderException.class)\n public void anAnnotationOnAMethodWithNoArgumentThrowsAnException() throws ConfigBuilderException {\n configPropertyParser.getConfigProperties(ConfigBeanWithAnnotationOnSetterWithNoArgument.class);\n }", "class_method_signature": "ConfigPropert...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_20
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/handler/HandlerPatternsTest.java", "identifier": "HandlerPatternsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testICanMatchAProcessNameListWithTabsAndExtraWhiteSpace() throws Exception {\n Pattern p = Pattern.compile(HandlerPatterns.nameListPattern);\n String listOfProcessNames = \"processOne, processTwo, processThree\";\n assertTrue(p.matcher(listOfProcessNames).m...
{ "fields": [ { "declarator": "namePermittedChars = \"a-zA-Z0-9-_\"", "modifier": "public static final", "original_string": "public static final String namePermittedChars = \"a-zA-Z0-9-_\";", "type": "String", "var_name": "namePermittedChars" }, { "declarator": "namePat...
{ "body": "public static List<String> getNames(String nameList) {\n String[] names = nameList.split(\",\");\n List<String> results = new LinkedList<>();\n for ( String p : names) {\n String configName = p.trim();\n if ( configName.length() > 0) {\n results.add...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_41
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void testDefaultValuesWhichCannotBeConvertedToJavaTypeThrowsException() {\n try {\n configPropertyParser.getConfigProperties(ConfigBeanWithADefaultValueWhichCannotConvertToJavaType.class);\n fail(\"Should fail to convert\");\n } catch (Exception e) {\n ...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_16
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/properties/PropertyOperationsTest.java", "identifier": "PropertyOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilterKeys() throws IOException {\n Properties p = properties(mockProperties()).filterKeys(new Predicate<String>() {\n public boolean test(String k) {\n return k.equals(\"PropertyB\");\n }\n }).loadProperties();\n\n assertEqua...
{ "fields": [ { "declarator": "propertyLoader", "modifier": "private", "original_string": "private PropertyLoader propertyLoader;", "type": "PropertyLoader", "var_name": "propertyLoader" } ], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/...
{ "body": "public PropertyOperations filterKeys(final Predicate<String> keyPredicate) {\n return new PropertyOperations(new FilteringPropertyLoader(propertyLoader, new BiPredicate<String, String>() {\n @Override\n public boolean test(String key, String value) {\n return key...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_1
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void testASubsystemCanBeLoaded() throws Exception {\n \n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.mock\"), chorusLog); \n \n assertTrue(scanResult.containsKey(\"mockSubsystemId\"));\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_0
{ "fields": [], "file": "extensions/chorus-websockets/src/test/java/org/chorusbdd/chorus/websockets/client/TimeoutStepExecutorTest.java", "identifier": "TimeoutStepExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAStepExecutionCanBeInterrupted() throws Exception {\n\n CountDownLatch countDownLatch = new CountDownLatch(1);\n\n TimeoutStepExecutor stepExecutor = new TimeoutStepExecutor((a, b) -> {});\n stepExecutor.runWithinPeriod(() -> {\n try {\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(TimeoutStepExecutor.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(TimeoutStepExecutor.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "...
{ "body": "void runWithinPeriod(Runnable runnable, ExecuteStepMessage executeStepMessage) {\n runWithinPeriod(\n runnable,\n executeStepMessage,\n executeStepMessage.getTimeoutPeriodSeconds(),\n TimeUnit.SECONDS\n );\n }", "class_method_signature": "Timeo...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_17
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/properties/PropertyOperationsTest.java", "identifier": "PropertyOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilterValues() throws IOException {\n Properties p = properties(mockProperties()).filterValues(new Predicate<String>() {\n public boolean test(String v) {\n return (! v.equals(\"ValueA\"));\n }\n }).loadProperties();\n ass...
{ "fields": [ { "declarator": "propertyLoader", "modifier": "private", "original_string": "private PropertyLoader propertyLoader;", "type": "PropertyLoader", "var_name": "propertyLoader" } ], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/...
{ "body": "public PropertyOperations filterValues(final Predicate<String> valuePredicate) {\n return new PropertyOperations(new FilteringPropertyLoader(propertyLoader, new BiPredicate<String, String>() {\n @Override\n public boolean test(String key, String value) {\n return...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_40
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void enumFieldsCanBeParsed() throws ConfigBuilderException {\n List<ConfigurationProperty> properties = configPropertyParser.getConfigProperties(ConfigBeanWithEnumTypes.class);\n assertEquals(1, properties.size());\n ConfigurationProperty p = properties.get(0);\n ...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_21
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/handler/HandlerPatternsTest.java", "identifier": "HandlerPatternsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testICanMatchProcessesWithAliasesWithTabsAndExtraWhiteSpace() throws Exception {\n Pattern p = Pattern.compile(HandlerPatterns.nameListPattern);\n String listOfProcessNames = \"processOne as one, processTwo as two, processThree as three\";\n assertTrue...
{ "fields": [ { "declarator": "namePermittedChars = \"a-zA-Z0-9-_\"", "modifier": "public static final", "original_string": "public static final String namePermittedChars = \"a-zA-Z0-9-_\";", "type": "String", "var_name": "namePermittedChars" }, { "declarator": "namePat...
{ "body": "public static Map<String,String> getNamesWithAliases(String nameList) {\n String[] names = nameList.split(\",\");\n Map<String,String> results = new LinkedHashMap<>(); //retain ordering / determinism\n for ( String p : names) {\n String configName = p.trim();\n\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_37
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void aPropertyIsMandatoryByDefault() throws ConfigBuilderException {\n List<ConfigurationProperty> properties = configPropertyParser.getConfigProperties(ConfigBeanWithAValidAnnotation.class);\n assertEquals(1, properties.size());\n ConfigurationProperty p = properties...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_22
{ "fields": [ { "declarator": "filterFactory = new ClassFilterDecorator()", "modifier": "private", "original_string": "private ClassFilterDecorator filterFactory = new ClassFilterDecorator();", "type": "ClassFilterDecorator", "var_name": "filterFactory" } ], "file": "interpre...
{ "body": "@Test\n public void testChorusBuildInHandlersPermitted() {\n ClassFilter classFilter = filterFactory.decorateWithPackageNameFilters(new HandlerAnnotationFilter(), Collections.<String>emptyList());\n assertTrue(\"Allows built in handler\", classFilter.acceptByName(\"org.chorusbdd.chorus.han...
{ "fields": [], "file": "interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/filter/ClassFilterDecorator.java", "identifier": "ClassFilterDecorator", "interfaces": "", "methods": [ { "class_method_signature": "ClassFilterDecorator.decorateWithPackageNameFilters(ClassFilter ...
{ "body": "public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {\n DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);\n\n //if user has specified package prefixes, restrict to those\n ClassFilter pac...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_34
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void aBeanWithNoAnnotatedMethodsProducesAnEmptyList() throws ConfigBuilderException {\n List properties = configPropertyParser.getConfigProperties(ConfigBeanWithNoAnnotatedProperties.class);\n assertEquals(0, properties.size());\n }", "class_method_signature": "ConfigPr...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_18
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/properties/PropertyOperationsTest.java", "identifier": "PropertyOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilter() throws IOException {\n Properties p = properties(mockProperties()).filter(new BiPredicate<String, String>() {\n @Override\n public boolean test(String key, String value) {\n return key.equals(\"PropertyA\") || value.equals(\"Va...
{ "fields": [ { "declarator": "propertyLoader", "modifier": "private", "original_string": "private PropertyLoader propertyLoader;", "type": "PropertyLoader", "var_name": "propertyLoader" } ], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/...
{ "body": "public PropertyOperations filter(final BiPredicate<String,String> keyAndValueFilter) {\n return new PropertyOperations(new FilteringPropertyLoader(propertyLoader, keyAndValueFilter));\n }", "class_method_signature": "PropertyOperations.filter(final BiPredicate<String,String> keyAndValueFilter)"...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_3
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkTheAnnotatedInterfaceMustExtendSubsystem() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmockdoesnotextendsubsystem\"), chorusLog);\n\n verify(chorusLog).warn(\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_38
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void aPropertyCanBeConfiguredNotMandatory() throws ConfigBuilderException {\n List<ConfigurationProperty> properties = configPropertyParser.getConfigProperties(ConfigBeanPropertyCanBeConfiguredNotMandatory.class);\n assertEquals(1, properties.size());\n ConfigurationP...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_14
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java", "identifier": "PolledAssertionTest", "interfaces": "", "superclass": "extends Assert" }
{ "body": "@Test\n public void testICanFailImmediatelyWhileAwaiting() throws Exception {\n long timeStart = System.currentTimeMillis();\n try {\n new PolledAssertion() {\n protected void validate() {\n throw new FailImmediatelyException(\"Fail Immediately\"...
{ "fields": [], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java", "identifier": "PolledAssertion", "interfaces": "", "methods": [ { "class_method_signature": "PolledAssertion.getTimeoutSeconds()", "constructor": false, "full_signature": "prot...
{ "body": "public int check() {\n return check(getTimeoutSeconds());\n }", "class_method_signature": "PolledAssertion.check()", "constructor": false, "full_signature": "public int check()", "identifier": "check", "invocations": [ "check", "getTimeoutSeconds" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_43
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void testAValidationPatternWhichCannotCompileThrowsException() {\n try {\n configPropertyParser.getConfigProperties(ConfigBeanWithAValidationPatternWhichCannotBeCompiled.class);\n fail(\"Should fail to convert\");\n } catch (Exception e) {\n ...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_55
{ "fields": [ { "declarator": "stepCatalogueWriter = new StepCatalogueWriter()", "modifier": "private", "original_string": "private StepCatalogueWriter stepCatalogueWriter = new StepCatalogueWriter();", "type": "StepCatalogueWriter", "var_name": "stepCatalogueWriter" }, { ...
{ "body": "@Test\n public void printStepCatalogue() throws Exception {\n String output = captureOutput(this::writeTestOutput);\n assertEquals(expected, output);\n }", "class_method_signature": "StepCatalogueWriterTest.printStepCatalogue()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [], "file": "interpreter/chorus-output/src/main/java/org/chorusbdd/chorus/output/StepCatalogueWriter.java", "identifier": "StepCatalogueWriter", "interfaces": "", "methods": [ { "class_method_signature": "StepCatalogueWriter.printStepCatalogue(Set<CataloguedStep> cataloguedSteps, Consume...
{ "body": "void printStepCatalogue(Set<CataloguedStep> cataloguedSteps, Consumer<String> messageWriter) {\n \n messageWriter.accept(\"\");\n messageWriter.accept(\"Step Catalogue: (All Steps By Category) --> \");\n messageWriter.accept(\"\");\n\n Map<String, List<CataloguedStep>> in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_54
{ "fields": [], "file": "interpreter/chorus-config/src/test/java/org/chorusbdd/chorus/config/TestConfigReader.java", "identifier": "TestConfigReader", "interfaces": "", "superclass": "extends ChorusAssert" }
{ "body": "@Test\n public void mandatoryPropertyMustBeSet() {\n System.clearProperty(TestConfigProperty.FEATURE_PATHS.getSystemProperty()); //in case set\n String[] switches = new String[] { \"-d\" };\n ConfigReader c = new ConfigReader(TestConfigProperty.getAll(), switches);\n try {\n...
{ "fields": [ { "declarator": "properties", "modifier": "private", "original_string": "private List<ExecutionProperty> properties;", "type": "List<ExecutionProperty>", "var_name": "properties" }, { "declarator": "args", "modifier": "private", "original_strin...
{ "body": "public ConfigReader readConfiguration() throws InterpreterPropertyException {\n for ( ExecutionConfigSource s : propertySources) {\n Map<ExecutionProperty, List<String>> propertyMap = new HashMap<>();\n propertyMap = s.parseProperties(propertyMap, args);\n sourceToPr...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_42
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void testDefaultValuesWhichDoNotMatchValidationPatternThrowException() {\n try {\n configPropertyParser.getConfigProperties(ConfigBeanWithADefaultValueWhichDoesNotSatisfyValidation.class);\n fail(\"Should fail to convert\");\n } catch (Exception e) {\n ...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_15
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java", "identifier": "PolledAssertionTest", "interfaces": "", "superclass": "extends Assert" }
{ "body": "@Test\n public void testICanFailImmediatelyIfFailImmediatelyIsCause() throws Exception {\n long timeStart = System.currentTimeMillis();\n try {\n new PolledAssertion() {\n protected void validate() throws InvocationTargetException {\n FailImmedi...
{ "fields": [], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java", "identifier": "PolledAssertion", "interfaces": "", "methods": [ { "class_method_signature": "PolledAssertion.getTimeoutSeconds()", "constructor": false, "full_signature": "prot...
{ "body": "public int check() {\n return check(getTimeoutSeconds());\n }", "class_method_signature": "PolledAssertion.check()", "constructor": false, "full_signature": "public int check()", "identifier": "check", "invocations": [ "check", "getTimeoutSeconds" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_39
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test\n public void defaultValuesCanBeConvertedToSimpleTypes() throws ConfigBuilderException {\n Map<String, ConfigurationProperty> m = configPropertyParser.getConfigPropertiesByName(ConfigBeanWithPrimitiveTypedProperties.class);\n assertEquals(7, m.size());\n assertEquals(1, m.get(...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "Map<String, ConfigurationProperty> getConfigPropertiesByName(Class configClass) throws ConfigBuilderException {\n List<ConfigurationProperty> properties = getConfigProperties(configClass);\n return properties.stream().collect(toMap(ConfigurationProperty::getName, identity()));\n }", "cla...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_2
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkTheSubsystemConfigAnotationMustBeOnAnInterfaceNotConcreteClass() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmocknotaninterface\"), chorusLog);\n \n verify(chorusLo...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_19
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/properties/PropertyOperationsTest.java", "identifier": "PropertyOperationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTransform() throws IOException {\n Properties p = properties(mockProperties()).transform(new BiFunction<String, String, Tuple2<String, String>>() {\n @Override\n public Tuple2<String, String> apply(String key, String value) {\n return t...
{ "fields": [ { "declarator": "propertyLoader", "modifier": "private", "original_string": "private PropertyLoader propertyLoader;", "type": "PropertyLoader", "var_name": "propertyLoader" } ], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/...
{ "body": "public PropertyOperations transform(final BiFunction<String,String,Tuple2<String,String>> transform) {\n return new PropertyOperations(new TransformingPropertyLoader(propertyLoader, transform));\n }", "class_method_signature": "PropertyOperations.transform(final BiFunction<String,String,Tuple2<...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_35
{ "fields": [ { "declarator": "configPropertyParser = new ConfigPropertyParser()", "modifier": "private", "original_string": "private ConfigPropertyParser configPropertyParser = new ConfigPropertyParser();", "type": "ConfigPropertyParser", "var_name": "configPropertyParser" } ]...
{ "body": "@Test(expected = ConfigBuilderException.class)\n public void anAnnotationOnAMethodWhichDoesNotStartWithSetThrowsAnException() throws ConfigBuilderException {\n configPropertyParser.getConfigProperties(ConfigBeanWithAnnotationOnMethodWhichDoesNotStartWithSet.class);\n }", "class_method_signat...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyParser.java", "identifier": "ConfigPropertyParser", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyParser.getConfigPropertiesByName(Class...
{ "body": "public List<ConfigurationProperty> getConfigProperties(Class configClass) throws ConfigBuilderException {\n Method[] methods = getMethodsFromConfigClass(configClass);\n\n List<ConfigurationProperty> result = new LinkedList<>();\n List<Method> l = Arrays.stream(methods)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_23
{ "fields": [ { "declarator": "filterFactory = new ClassFilterDecorator()", "modifier": "private", "original_string": "private ClassFilterDecorator filterFactory = new ClassFilterDecorator();", "type": "ClassFilterDecorator", "var_name": "filterFactory" } ], "file": "interpre...
{ "body": "@Test\n public void testChorusInterpreterPackagesDenied() {\n ClassFilter classFilter = filterFactory.decorateWithPackageNameFilters(new HandlerAnnotationFilter(), Collections.<String>emptyList());\n assertFalse(\"Denies other interpreter packages\", classFilter.acceptByName(ChorusConstant...
{ "fields": [], "file": "interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/filter/ClassFilterDecorator.java", "identifier": "ClassFilterDecorator", "interfaces": "", "methods": [ { "class_method_signature": "ClassFilterDecorator.decorateWithPackageNameFilters(ClassFilter ...
{ "body": "public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {\n DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);\n\n //if user has specified package prefixes, restrict to those\n ClassFilter pac...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_5
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkAnErrorIsRaisedWhenTheImplementationClassIsAnEmptyString() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmocknoimplclass\"), chorusLog);\n\n verify(chorusLog).warn(\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_28
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testADefaultValueIsUsedIfIDoNotProvideAValue() throws ConfigBuilderException {\n Properties p = new Properties();\n ConfigClassWithSimpleProperty c = configBuilder.buildConfig(ConfigClassWithSimpleProperty.class, p);\n assertEquals(\"My Default Value\", c.getStri...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_12
{ "fields": [], "file": "interpreter/chorus-util/src/test/java/org/chorusbdd/chorus/util/PolledAssertionTest.java", "identifier": "PolledAssertionTest", "interfaces": "", "superclass": "extends Assert" }
{ "body": "@Test\n public void testCheckedConditionPasses() throws Exception {\n final boolean[] condition = {true};\n final AtomicLong count = new AtomicLong();\n\n new PolledAssertion() {\n protected void validate() {\n count.incrementAndGet();\n asse...
{ "fields": [], "file": "interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java", "identifier": "PolledAssertion", "interfaces": "", "methods": [ { "class_method_signature": "PolledAssertion.getTimeoutSeconds()", "constructor": false, "full_signature": "prot...
{ "body": "public int check() {\n return check(getTimeoutSeconds());\n }", "class_method_signature": "PolledAssertion.check()", "constructor": false, "full_signature": "public int check()", "identifier": "check", "invocations": [ "check", "getTimeoutSeconds" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_45
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/test/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtilsTest.java", "identifier": "ConfigPropertyUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEnumWithPermittedCharacters() {\n Pattern actual = ConfigPropertyUtils.createValidationPatternFromEnumType(Scope.class);\n assertEquals(\"(?i)SCENARIO|FEATURE\", actual.pattern());\n }", "class_method_signature": "ConfigPropertyUtilsTest.testEnumWithPermittedCh...
{ "fields": [], "file": "interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtils.java", "identifier": "ConfigPropertyUtils", "interfaces": "", "methods": [ { "class_method_signature": "ConfigPropertyUtils.createValidationPatternFromEnumTyp...
{ "body": "public static <T extends Enum<T>> Pattern createValidationPatternFromEnumType(Class<T> enumType) {\n\n String regEx = Stream.of(enumType.getEnumConstants())\n .map(Enum::name)\n .collect(Collectors.joining(\"|\", \"(?i)\", \"\"));\n\n //Enum constants may contain...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_53
{ "fields": [], "file": "interpreter/chorus-config/src/test/java/org/chorusbdd/chorus/config/TestConfigReader.java", "identifier": "TestConfigReader", "interfaces": "", "superclass": "extends ChorusAssert" }
{ "body": "@Test\n public void testCannotSetMoreThanMaxValues() {\n ExecutionProperty propertyWithMinValues = new TestProperty(TestConfigProperty.HANDLER_PACKAGES) {\n public int getMaxValueCount() {\n return 1;\n }\n };\n\n ConfigReader c = new ConfigReade...
{ "fields": [ { "declarator": "properties", "modifier": "private", "original_string": "private List<ExecutionProperty> properties;", "type": "List<ExecutionProperty>", "var_name": "properties" }, { "declarator": "args", "modifier": "private", "original_strin...
{ "body": "public ConfigReader readConfiguration() throws InterpreterPropertyException {\n for ( ExecutionConfigSource s : propertySources) {\n Map<ExecutionProperty, List<String>> propertyMap = new HashMap<>();\n propertyMap = s.parseProperties(propertyMap, args);\n sourceToPr...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_9
{ "fields": [ { "declarator": "EXPECTED_PATTERN = \".[\\\\w]\"", "modifier": "public static final", "original_string": "public static final String EXPECTED_PATTERN = \".[\\\\w]\";", "type": "String", "var_name": "EXPECTED_PATTERN" } ], "file": "interpreter/chorus-remoting/src...
{ "body": "@Test\n\tpublic void canExtractStepHandlersFromAStepInvokerProvider() {\n\n\t\tStepInvoker mockStepInvoker = mock(StepInvoker.class);\n\t\twhen(mockStepInvoker.getStepPattern()).thenReturn(Pattern.compile(EXPECTED_PATTERN));\n\t\twhen(mockStepInvoker.getRetry()).thenReturn(StepRetry.NO_RETRY);\n\n\t\tStepI...
{ "fields": [ { "declarator": "DEFAULT_STEP_PATTERN_PREPROCESSOR = UnaryOperator.identity()", "modifier": "private static final", "original_string": "private static final UnaryOperator<Pattern> DEFAULT_STEP_PATTERN_PREPROCESSOR = UnaryOperator.identity();", "type": "UnaryOperator<Pattern>"...
{ "body": "public List<JmxInvokerResult> getStepInvokers() {\n List<JmxInvokerResult> invokers = new ArrayList<>();\n for ( StepInvoker s : stepInvokers.values() ) {\n JmxInvokerResult jmxInvoker = new JmxInvokerResult(s);\n invokers.add(jmxInvoker);\n }\n return invo...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_24
{ "fields": [ { "declarator": "filterFactory = new ClassFilterDecorator()", "modifier": "private", "original_string": "private ClassFilterDecorator filterFactory = new ClassFilterDecorator();", "type": "ClassFilterDecorator", "var_name": "filterFactory" } ], "file": "interpre...
{ "body": "@Test\n public void testDoesNotAllowNonChorusIfNoUserPackagesSpecified() {\n ClassFilter classFilter = filterFactory.decorateWithPackageNameFilters(new HandlerAnnotationFilter(), Collections.<String>emptyList());\n assertFalse(\"Does not allow non-chorus if no user packages specified\", cl...
{ "fields": [], "file": "interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/filter/ClassFilterDecorator.java", "identifier": "ClassFilterDecorator", "interfaces": "", "methods": [ { "class_method_signature": "ClassFilterDecorator.decorateWithPackageNameFilters(ClassFilter ...
{ "body": "public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {\n DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);\n\n //if user has specified package prefixes, restrict to those\n ClassFilter pac...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_32
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testAnEnumValueWhichCantBeMappedThrowsException() {\n Properties p = new Properties();\n p.setProperty(\"enumField\", \"rgioergergerg\");\n\n try {\n ConfigClassWithEnumTypes c = configBuilder.buildConfig(ConfigClassWithEnumTypes.class, p);\n ...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_49
{ "fields": [ { "declarator": "TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \"-h\", \"handlers.package1\", \"handlers.package2\"}", "modifier": "private static final", "original_string": "private static final String[] TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \...
{ "body": "@Test\n public void testValueOfWithSingleArg() throws InterpreterPropertyException {\n Map<ExecutionProperty, List<String>> parsedArgs = new CommandLineParser(TestConfigProperty.getAll()).parseProperties(propertyMap, TEST_ARGS);\n List<String> fValues = parsedArgs.get(TestConfigProperty.FE...
{ "fields": [], "file": "interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java", "identifier": "CommandLineParser", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineParser.CommandLineParser(List<ExecutionProperty> properties)", "constr...
{ "body": "public Map<ExecutionProperty, List<String>> parseProperties(Map<ExecutionProperty, List<String>> propertyMap, String... args) throws InterpreterPropertyException {\n\n //if some command line switches were specified\n if ( args.length > 0 ) {\n //easiest to build the args back up in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_48
{ "fields": [ { "declarator": "TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \"-h\", \"handlers.package1\", \"handlers.package2\"}", "modifier": "private static final", "original_string": "private static final String[] TEST_ARGS = new String[]{\"-showErrors\", \"-f\", \"file1\", \...
{ "body": "@Test\n public void testArgWithSingleValue() throws InterpreterPropertyException {\n Map<ExecutionProperty, List<String>> parsedArgs = new CommandLineParser(TestConfigProperty.getAll()).parseProperties(propertyMap, TEST_ARGS);\n List<String> fValues = parsedArgs.get(TestConfigProperty.FEAT...
{ "fields": [], "file": "interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java", "identifier": "CommandLineParser", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineParser.CommandLineParser(List<ExecutionProperty> properties)", "constr...
{ "body": "public Map<ExecutionProperty, List<String>> parseProperties(Map<ExecutionProperty, List<String>> propertyMap, String... args) throws InterpreterPropertyException {\n\n //if some command line switches were specified\n if ( args.length > 0 ) {\n //easiest to build the args back up in...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_33
{ "fields": [ { "declarator": "configBuilder = new ConfigBuilder()", "modifier": "private", "original_string": "private ConfigBuilder configBuilder = new ConfigBuilder();", "type": "ConfigBuilder", "var_name": "configBuilder" } ], "file": "interpreter/chorus-handlerconfig/src...
{ "body": "@Test\n public void testUnvalidatedConfigSettersCanAcceptEmptyStringAsValidPropertyValue() throws ConfigBuilderException {\n Properties p = new Properties();\n p.setProperty(\"stringProperty\", \"\");\n\n ConfigClassWithUnvalidatedStringProperty c = configBuilder.buildConfig(ConfigC...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(ConfigBuilder.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(ConfigBuilder.class);", "type": "ChorusLog", "var_name": "log" }, { "declarator": "configProper...
{ "body": "public <C> C buildConfig(Class<C> configClass, Properties properties) throws ConfigBuilderException {\n\n Map<String, ConfigurationProperty> configPropertiesByName = configPropertyParser.getConfigPropertiesByName(configClass);\n\n C configInstance;\n try {\n configInstance =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_25
{ "fields": [ { "declarator": "filterFactory = new ClassFilterDecorator()", "modifier": "private", "original_string": "private ClassFilterDecorator filterFactory = new ClassFilterDecorator();", "type": "ClassFilterDecorator", "var_name": "filterFactory" } ], "file": "interpre...
{ "body": "@Test\n public void testUserPrefixesSpecified() {\n ClassFilter classFilter = filterFactory.decorateWithPackageNameFilters(new HandlerAnnotationFilter(), Arrays.asList(\"com.test\"));\n assertFalse(\"Denies non-specified if user restricted\", classFilter.acceptByName(\"com.mynew.google\"))...
{ "fields": [], "file": "interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/filter/ClassFilterDecorator.java", "identifier": "ClassFilterDecorator", "interfaces": "", "methods": [ { "class_method_signature": "ClassFilterDecorator.decorateWithPackageNameFilters(ClassFilter ...
{ "body": "public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {\n DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);\n\n //if user has specified package prefixes, restrict to those\n ClassFilter pac...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_8
{ "fields": [ { "declarator": "chorusLog = Mockito.mock(ChorusLog.class)", "modifier": "private", "original_string": "private ChorusLog chorusLog = Mockito.mock(ChorusLog.class);", "type": "ChorusLog", "var_name": "chorusLog" }, { "declarator": "subsystemDiscovery = new...
{ "body": "@Test\n public void checkTheImplementationClassCannotBeLoaded() throws Exception {\n HashMap<String, Class> scanResult = subsystemDiscovery.discoverSubsystems(asList(\"org.chorusbdd.chorus.subsystem.badmockimplclasscannotload\"), chorusLog);\n\n verify(chorusLog).warn(\n \"T...
{ "fields": [ { "declarator": "log = ChorusLogFactory.getLog(SubsystemDiscovery.class)", "modifier": "private", "original_string": "private ChorusLog log = ChorusLogFactory.getLog(SubsystemDiscovery.class);", "type": "ChorusLog", "var_name": "log" } ], "file": "interpreter/ch...
{ "body": "public HashMap<String, Class> discoverSubsystems(List<String> basePackages) {\n return discoverSubsystems(basePackages, log);\n }", "class_method_signature": "SubsystemDiscovery.discoverSubsystems(List<String> basePackages)", "constructor": false, "full_signature": "public HashMap<String, C...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }
3460824_52
{ "fields": [], "file": "interpreter/chorus-config/src/test/java/org/chorusbdd/chorus/config/TestConfigReader.java", "identifier": "TestConfigReader", "interfaces": "", "superclass": "extends ChorusAssert" }
{ "body": "@Test\n public void testCannotSetLessThanMinimumValues() {\n ExecutionProperty propertyWithMinValues = new TestProperty(TestConfigProperty.HANDLER_PACKAGES) {\n public int getMinValueCount() {\n return 2;\n }\n };\n\n ConfigReader c = new ConfigR...
{ "fields": [ { "declarator": "properties", "modifier": "private", "original_string": "private List<ExecutionProperty> properties;", "type": "List<ExecutionProperty>", "var_name": "properties" }, { "declarator": "args", "modifier": "private", "original_strin...
{ "body": "public ConfigReader readConfiguration() throws InterpreterPropertyException {\n for ( ExecutionConfigSource s : propertySources) {\n Map<ExecutionProperty, List<String>> propertyMap = new HashMap<>();\n propertyMap = s.parseProperties(propertyMap, args);\n sourceToPr...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3460824, "size": 6796, "stargazer_count": 33, "stars": null, "updates": null, "url": "https://github.com/Chorus-bdd/Chorus" }