id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
67934497_1 | {
"fields": [
{
"declarator": "server = TestServer.getInstance()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TestServer server = TestServer.getInstance();",
"type": "TestServer",
"var_name": "server"
},
{
"declarator"... | {
"body": "@Test\n public void testDataGetHandlerTest() throws ClientException, ApiException {\n /*\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection =... | {
"fields": [
{
"declarator": "CONFIG_NAME = \"api_b\"",
"modifier": "static",
"original_string": "static String CONFIG_NAME = \"api_b\";",
"type": "String",
"var_name": "CONFIG_NAME"
},
{
"declarator": "logger = LoggerFactory.getLogger(DataGetHandler.class)",
"mo... | {
"body": "public DataGetHandler() {\n try {\n connection = client.connect(new URI(apicHost), Http2Client.WORKER, Http2Client.SSL, Http2Client.BUFFER_POOL, OptionMap.create(UndertowOptions.ENABLE_HTTP2, true)).get();\n } catch (Exception e) {\n logger.error(\"Exeption:\", e);\n ... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
67934497_45 | {
"fields": [
{
"declarator": "server = TestServer.getInstance()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TestServer server = TestServer.getInstance();",
"type": "TestServer",
"var_name": "server"
},
{
"declarator"... | {
"body": "@Test\n public void testPetsPetIdGetHandlerTest() throws ClientException, ApiException {\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client... | {
"fields": [],
"file": "middleware-performance/endpoint-source/src/main/java/com/networknt/petstore/handler/PetsPetIdGetHandler.java",
"identifier": "PetsPetIdGetHandler",
"interfaces": "implements LightHttpHandler",
"methods": [
{
"class_method_signature": "PetsPetIdGetHandler.PetsPetIdGetHandler(... | {
"body": "public PetsPetIdGetHandler() {\n System.out.println(\"*********************Constructor is called.\");\n }",
"class_method_signature": "PetsPetIdGetHandler.PetsPetIdGetHandler()",
"constructor": true,
"full_signature": "public PetsPetIdGetHandler()",
"identifier": "PetsPetIdGetHandler",
... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
67934497_44 | {
"fields": [
{
"declarator": "ds",
"modifier": "public static",
"original_string": "public static DataSource ds;",
"type": "DataSource",
"var_name": "ds"
},
{
"declarator": "customerRepository = (CustomerViewRepository) SingletonServiceFactory.getBean(CustomerViewRepos... | {
"body": "@Test\n public void testFindByEmail() {\n List<QuerySideCustomer> result = customerRepository.findByEmailLike(\"%aaa%\");\n assertNotNull(result);\n // System.out.println(\"customer name:\" + result.get(0).getName().getFirstName());\n\n }",
"class_method_signature": "CustomerVie... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(getClass())",
"modifier": "protected",
"original_string": "protected Logger logger = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "dataSource",
"mod... | {
"body": "public List<QuerySideCustomer> findByEmailLike(String email){\n\n Objects.requireNonNull(email);\n String psSelect = \"SELECT c.customer_Id,first_name, last_name, email, password, ssn, phoneNumber, street1, street2, city, state, country, zipCode \" +\n \"FROM customer c join a... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
67934497_13 | {
"fields": [
{
"declarator": "server = TestServer.getInstance()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TestServer server = TestServer.getInstance();",
"type": "TestServer",
"var_name": "server"
},
{
"declarator"... | {
"body": "@Test\n public void testDataGetHandlerTest() throws ClientException {\n\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client.connect(new URI(... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(DataGetHandler.class)",
"modifier": "static",
"original_string": "static Logger logger = LoggerFactory.getLogger(DataGetHandler.class);",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "cluster =... | {
"body": "public DataGetHandler() {\n }",
"class_method_signature": "DataGetHandler.DataGetHandler()",
"constructor": true,
"full_signature": "public DataGetHandler()",
"identifier": "DataGetHandler",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " Dat... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
67934497_0 | {
"fields": [
{
"declarator": "server = TestServer.getInstance()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TestServer server = TestServer.getInstance();",
"type": "TestServer",
"var_name": "server"
},
{
"declarator"... | {
"body": "@Test\n public void testDataGetHandlerTest() throws ClientException, ApiException {\n /*\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection =... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(DataGetHandler.class)",
"modifier": "static",
"original_string": "static Logger logger = LoggerFactory.getLogger(DataGetHandler.class);",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "cluster =... | {
"body": "public DataGetHandler() {\n try {\n abHost = cluster.serviceToUrl(\"https\", \"com.networknt.ab-1.0.0\", null, null);\n acHost = cluster.serviceToUrl(\"https\", \"com.networknt.ac-1.0.0\", null, null);\n adHost = cluster.serviceToUrl(\"https\", \"com.networknt.ad-1.0... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
67934497_25 | {
"fields": [
{
"declarator": "server = TestServer.getInstance()",
"modifier": "@ClassRule\n public static",
"original_string": "@ClassRule\n public static TestServer server = TestServer.getInstance();",
"type": "TestServer",
"var_name": "server"
},
{
"declarator"... | {
"body": "@Test\n public void testDataGetHandlerTest() throws ClientException {\n\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client.connect(new URI(... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(DataGetHandler.class)",
"modifier": "static",
"original_string": "static Logger logger = LoggerFactory.getLogger(DataGetHandler.class);",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "cluster =... | {
"body": "public DataGetHandler() {\n try {\n apibHost = cluster.serviceToUrl(\"https\", \"com.networknt.ab-1.0.0\", tag, null);\n apicHost = cluster.serviceToUrl(\"https\", \"com.networknt.ac-1.0.0\", tag, null);\n connectionB = client.connect(new URI(apibHost), Http2Client.W... | {
"created": null,
"fork": null,
"fork_count": 59,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 67934497,
"size": 5724,
"stargazer_count": 130,
"stars": null,
"updates": null,
"url": "https://github.com/networknt/light-example-4j"
} |
23831132_16 | {
"fields": [
{
"declarator": "EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>())",
"modifier": "static final",
"original_string": "static final IteratorWithPrevious<String> EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>());",
... | {
"body": "@Test\n public void testParseParams() throws Exception {\n Pair<List<Object>, String> params = PipelineScriptParser\n .parseParams(new IteratorWithPrevious<String>(\n newArrayList(\" a: bla\")));\n assertEquals(2, params.getKey().size());\n asse... | {
"fields": [
{
"declarator": "LOG = getLogger(PipelineScriptParser.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(PipelineScriptParser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_scripting/src/m... | {
"body": "static Pair<List<Object>, String> parseParams(\n IteratorWithPrevious<String> it) throws ParseException {\n List<Object> params = new ArrayList<Object>();\n String xml = \"\";\n while (it.hasNext()) {\n String current = it.next();\n if (StringUtils.isBl... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_100 | {
"fields": [],
"file": "modules/bluima_pubmed_ws/src/test/java/ch/epfl/bbp/uima/pubmed/PubmedSearchTest.java",
"identifier": "PubmedSearchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPmidArticle() throws Exception {\n List<PubmedArticleType> articles = newArrayList(new PubmedSearch()\n .search(\"23447503[pmid]\"));\n assertTrue(articles.size() == 1);\n assertEquals(\"23447503\", articles.get(0).getMedlineCitation().getPMID(... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PubmedSearch.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(PubmedSearch.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "servic... | {
"body": "public Iterator<PubmedArticleType> search(String query)\n\t\t\tthrows RemoteException {\n\t\treturn search(query, Integer.MAX_VALUE);\n\t}",
"class_method_signature": "PubmedSearch.search(String query)",
"constructor": false,
"full_signature": "public Iterator<PubmedArticleType> search(String query)"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_41 | {
"fields": [
{
"declarator": "LOG = getLogger(MongoPipelineBuilderTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(MongoPipelineBuilderTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_mongodb... | {
"body": "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test() throws Exception {\n\n\t\tString[] conn = MongoTest.getTestConn(\"MongoPipelineBuilderTest\");\n\t\tLOG.debug(\"using conn {}\", conn);\n\n\t\tLOG.debug(\"PUT SOME INITIAL DATA\");\n\t\tJCas jCas = UimaTests.getTestCas();\n\t\tBlueCasUtil.setD... | {
"fields": [
{
"declarator": "connection",
"modifier": "private",
"original_string": "private String[] connection;",
"type": "String[]",
"var_name": "connection"
},
{
"declarator": "updateAnnotations",
"modifier": "private",
"original_string": "private Stri... | {
"body": "@Override\n public Boolean process() throws ResourceInitializationException,\n CpeDescriptorException {\n try {\n add(MongoUpdateWriter.class, PARAM_DB_CONNECTION, connection,\n PARAM_UPDATE_ANNOTATIONS, updateAnnotations);\n } catch (Exception e) {... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_116 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/triechar/VocabularyTest.java",
"identifier": "VocabularyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHello2() {\n Vocabulary v = new Vocabulary(true);\n int he = v.addWord(\"he\");\n assertEquals(1, v.getSize());\n assertEquals(0, he);\n int h = v.addWord(\"h\");\n assertEquals(1, h);\n assertEquals(2, v.getSize());\n int h... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "nodes",
"modifier": "",
"orig... | {
"body": "public String getWord(int id) {\n if (nodes == null)\n updateBacktracking();\n TrieNodeData<Integer> node = nodes[id];\n\n StringBuilder sb = new StringBuilder();\n node.getWord(sb);\n\n return sb.toString();\n }",
"class_method_signature": "Vocabulary.get... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_57 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/filter/KeepsCleanerTest.java",
"identifier": "KeepsCleanerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOnlyPunctAndNumbers() {\n assertFalse(isOnlyPunctAndNumbers(\"a{b}c(dd[e]v)g\"));\n assertTrue(isOnlyPunctAndNumbers(\"10(-10\"));\n assertTrue(isOnlyPunctAndNumbers(\"1:200,000\"));\n\n }",
"class_method_signature": "KeepsCleanerTest.testOnlyPunctAndNum... | {
"fields": [
{
"declarator": "minLength = 3",
"modifier": "private final",
"original_string": "private final int minLength = 3;",
"type": "int",
"var_name": "minLength"
},
{
"declarator": "PARAM_TRANSFORM_LOWERCASE = \"transformLowercase\"",
"modifier": "private ... | {
"body": "public static boolean isOnlyPunctAndNumbers(String txt) {\n return onlyPunctAndNumbers.matcher(txt).matches();\n }",
"class_method_signature": "KeepsCleaner.isOnlyPunctAndNumbers(String txt)",
"constructor": false,
"full_signature": "public static boolean isOnlyPunctAndNumbers(String txt)",... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_94 | {
"fields": [
{
"declarator": "pmId16196030 = \"This paper describes the quantitative areal and laminar distribution of identified neuron populations projecting from areas of prefrontal cortex (PFC) to subcortical autonomic, motor, and limbic sites in the rat. Injections of the retrograde pathway tracer whe... | {
"body": "@Test\n public void testTwoDefs() throws Exception {\n\n String txt = \"The subthalamic nucleus (STh) is a brain region. The STh (subthalamic nucleus) is here.\";\n assertEquals(\n \"two definitions, should work\",\n \"The subthalamic nucleus is a brain region... | {
"fields": [
{
"declarator": "LOG = getLogger(AbbreviationExpander.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = getLogger(AbbreviationExpander.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "mo... | {
"body": "static public String expand(String txt) {\n return expand(txt, getAbbrevs(txt));\n }",
"class_method_signature": "AbbreviationExpander.expand(String txt)",
"constructor": false,
"full_signature": "static public String expand(String txt)",
"identifier": "expand",
"invocations": [
"ex... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_82 | {
"fields": [
{
"declarator": "LOG = getLogger(OscarAnnotatorTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(OscarAnnotatorTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_oscar4/src/test/jav... | {
"body": "@Test\n public void test() throws Exception {\n\n JCas jCas = getTestCas(\"Synthesis of the brown dropwise Hyperbranched Macroligands via Michael Addition of Butyl or Ethyl Acrylate with HPEI. The synthetic procedure for partially EA- or BA-modified HPEI is exemplified for HPEI25K-EA0.79: 1.00 g ... | {
"fields": [
{
"declarator": "oscar = new Oscar()",
"modifier": "private",
"original_string": "private Oscar oscar = new Oscar();",
"type": "Oscar",
"var_name": "oscar"
},
{
"declarator": "RELEVANT_TYPES = Arrays\n .asList(new NamedEntityType[] { //\n ... | {
"body": "public static AnalysisEngineDescription getAED()\n throws ResourceInitializationException {\n return createEngineDescription(OscarAnnotator.class);\n }",
"class_method_signature": "OscarAnnotator.getAED()",
"constructor": false,
"full_signature": "public static AnalysisEngineDesc... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_0 | {
"fields": [],
"file": "modules/bluima_protein_concentrations/src/test/java/ch/epfl/bbp/nlp/ie/proteinconc/ae/ChunkAdapterTest.java",
"identifier": "ChunkAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void endOfSentenceTest() throws Exception {\n\t\tSimplePipelineBuilder builder = new SimplePipelineBuilder(\n\t\t\t\tcreateReaderDescription(PdfCollectionReader.class,//\n\t\t\t\t\t\tPARAM_INPUT_DIRECTORY, EXTRACT_ROOT\n\t\t\t\t\t\t\t\t+ \"src/test/resources/test_pdfs/chunk_adapter\"));\n\n... | {
"fields": [],
"file": "modules/bluima_protein_concentrations/src/main/java/ch/epfl/bbp/nlp/ie/proteinconc/ae/ChunkAdapter.java",
"identifier": "ChunkAdapter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ChunkAdapter.process(JCas cas)",
"constructor": false,
"full_signat... | {
"body": "@Override\n public void process(JCas cas) throws AnalysisEngineProcessException {\n int casEnd = cas.getDocumentText().length() - 1;\n final List<Chunk> oldChunksToDelete = new LinkedList<Chunk>();\n for (Chunk chunk : select(cas, Chunk.class)) {\n\n //OpenNLP sometimes s... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_77 | {
"fields": [],
"file": "modules/bluima_units/src/test/java/ch/epfl/bbp/uima/units/normalizers/NumberNormalizerTest.java",
"identifier": "NumberNormalizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test() {\n\t\tassertEquals(\"500\", NumberNormalizer.normalizeExponents(\"5E2\"));\n\t\tassertEquals(\"0.05\", NumberNormalizer.normalizeExponents(\"5E-2\"));\n\t\tassertEquals(\"1200\", NumberNormalizer.normalizeExponents(\"12x10(2)\"));\n\t\tassertEquals(\"0.0005\", NumberNormalizer.... | {
"fields": [
{
"declarator": "writtenNumbersNormalizer",
"modifier": "private",
"original_string": "private WrittenNumbersNormalizer writtenNumbersNormalizer;",
"type": "WrittenNumbersNormalizer",
"var_name": "writtenNumbersNormalizer"
},
{
"declarator": "FORMATTER = n... | {
"body": "public static String normalizeExponents(String input) {\n Matcher m = eExp.matcher(input);\n if (m.find()) {\n\n Float number = Float.parseFloat(m.group(1));\n int exp = Integer.parseInt(m.group(3));\n boolean negative = m.group(2) != null && m.group(2).equals... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_98 | {
"fields": [],
"file": "modules/bluima_pubmed_ws/src/test/java/ch/epfl/bbp/uima/pubmed/PubmedSearchTest.java",
"identifier": "PubmedSearchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMesh() throws Exception {\n List<Integer> articles = new PubmedSearch().searchIds(\"Axons[mesh]\");\n assertTrue(articles.size() > 10000);\n }",
"class_method_signature": "PubmedSearchTest.testMesh()",
"constructor": false,
"full_signature": "@Test public v... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PubmedSearch.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(PubmedSearch.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "servic... | {
"body": "public List<Integer> searchIds(String query) throws RemoteException {\n\n\t\tEUtilsServiceStub.ESearchRequest req = new EUtilsServiceStub.ESearchRequest();\n\t\treq.setDb(\"pubmed\");\n\t\treq.setEmail(\"georges@gmail.com\");\n\t\treq.setTerm(query);\n\t\treq.setRetStart(\"0\");\n\t\treq.setRetMax(Integer.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_20 | {
"fields": [
{
"declarator": "EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>())",
"modifier": "static final",
"original_string": "static final IteratorWithPrevious<String> EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>());",
... | {
"body": "@Test\n public void testParseAe_fromCleanup_simpleName() throws Exception {\n PipelineScriptParser.parseAE(\"ae: \" + BartWriter.class.getSimpleName(),\n EMPTY_ARGS, new Pipeline());\n }",
"class_method_signature": "PipelineScriptParserTest.testParseAe_fromCleanup_simpleName()... | {
"fields": [
{
"declarator": "LOG = getLogger(PipelineScriptParser.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(PipelineScriptParser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_scripting/src/m... | {
"body": "@SuppressWarnings(\"unchecked\")\n static void parseAE(String line, IteratorWithPrevious<String> it,\n Pipeline pipeline) throws ParseException {\n LOG.info(\"+-parsing line '{}'\", line);\n\n String aeName = line.replaceFirst(\"ae: \", \"\").trim();\n if (aeName.endsWith... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_36 | {
"fields": [
{
"declarator": "LOG = getLogger(BlueBioLemmatizerTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(BlueBioLemmatizerTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_commons/src/t... | {
"body": "@Test\n public void test() throws Exception {\n\n String[] expected = StringUtils.split(\n \"long form pressure hydrocephalus (NPH) be classify\", \" \");\n\n JCas jCas = getTokenizedTestCas(//\n \"longs forms pressure hydrocephalus (NPH) was classifying\");\n\n ... | {
"fields": [
{
"declarator": "bioLemmatizer = null",
"modifier": "private static",
"original_string": "private static BioLemmatizer bioLemmatizer = null;",
"type": "BioLemmatizer",
"var_name": "bioLemmatizer"
}
],
"file": "modules/bluima_commons/src/main/java/ch/epfl/bbp/uim... | {
"body": "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n for (Token t : JCasUtil.select(jCas, Token.class)) {\n String pos = BlueCasUtil.getSinglePosTag(t);\n String lemma = lemmatize(t.getCoveredText(), pos);\n if (lemma != null)\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_61 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/utils/StructuredDirectoryTest.java",
"identifier": "StructuredDirectoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeFileName() throws Exception {\n\n File outDir = new File(\"target/testStoreFile2\");\n\n File inputFile = new File(\"target/12345678.txt\");\n inputFile.createNewFile();\n\n File newFile = StructuredDirectory.storeFile(outDir, inputFile);\n\n ... | {
"fields": [],
"file": "modules/bluima_utils/src/main/java/ch/epfl/bbp/uima/utils/StructuredDirectory.java",
"identifier": "StructuredDirectory",
"interfaces": "",
"methods": [
{
"class_method_signature": "StructuredDirectory.getSplit(int docId)",
"constructor": false,
"full_signature":... | {
"body": "public static int decodeFileName(File inputFile) throws IOException {\n try {\n int ret = parseInt(removeExtension(inputFile.getName()));\n ret += 1000 * parseInt(inputFile.getParentFile().getName());\n ret += 1000000 * parseInt(inputFile.getParentFile().getParentFil... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_120 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/FileParseUtilsTest.java",
"identifier": "FileParseUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NumberFormatException.class)\n public void testWrongInput() {\n parseToIntegerList(\"1.1\", \" \");\n }",
"class_method_signature": "FileParseUtilsTest.testWrongInput()",
"constructor": false,
"full_signature": "@Test(expected = NumberFormatException.class) public void t... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/FileParseUtils.java",
"identifier": "FileParseUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "FileParseUtils.parseToDoubleList(String txt, String separator)",
"constructor": false,
"full_signature":... | {
"body": "public static List<Integer> parseToIntegerList(String txt, String separator) {\n if (txt.length() == 0)\n return new ArrayList<Integer>();\n String[] split = txt.trim().split(separator);\n List<Integer> ret = new ArrayList<Integer>(split.length);\n for (String s : spl... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_60 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/utils/StructuredDirectoryTest.java",
"identifier": "StructuredDirectoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStoreFile() throws Exception {\n\n File outDir = new File(\"target/testStoreFile\");\n\n // first test\n File inputFile = new File(\"target/2345678.txt\");\n inputFile.createNewFile();\n\n File newFile = StructuredDirectory.storeFile(outDir, inp... | {
"fields": [],
"file": "modules/bluima_utils/src/main/java/ch/epfl/bbp/uima/utils/StructuredDirectory.java",
"identifier": "StructuredDirectory",
"interfaces": "",
"methods": [
{
"class_method_signature": "StructuredDirectory.getSplit(int docId)",
"constructor": false,
"full_signature":... | {
"body": "public static File storeFile(File outDir, File inputFile)\n throws IOException {\n\n int docId = parseInt(removeExtension(inputFile.getName()));\n int[] paths = getSplit(docId);\n\n forceMkdir(outDir);\n File dir1 = new File(outDir, paths[0] + \"\");\n forceMkd... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_121 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/FileParseUtilsTest.java",
"identifier": "FileParseUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NumberFormatException.class)\n public void testWrongInput2() {\n parseToIntegerList(\"1\", \"\");\n }",
"class_method_signature": "FileParseUtilsTest.testWrongInput2()",
"constructor": false,
"full_signature": "@Test(expected = NumberFormatException.class) public void te... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/FileParseUtils.java",
"identifier": "FileParseUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "FileParseUtils.parseToDoubleList(String txt, String separator)",
"constructor": false,
"full_signature":... | {
"body": "public static List<Integer> parseToIntegerList(String txt, String separator) {\n if (txt.length() == 0)\n return new ArrayList<Integer>();\n String[] split = txt.trim().split(separator);\n List<Integer> ret = new ArrayList<Integer>(split.length);\n for (String s : spl... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_37 | {
"fields": [
{
"declarator": "LOG = getLogger(BlueBioLemmatizerTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(BlueBioLemmatizerTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_commons/src/t... | {
"body": "@Test\n public void testText() throws Exception {\n assertEquals(\"thalamic\", BlueBioLemmatizer.lemmatize(\"Thalamic\", null));\n assertEquals(\"thalamus\", BlueBioLemmatizer.lemmatize(\"thalamus\", null));\n \n assertEquals(\"conditioning\", BlueBioLemmatizer.lemmatize(\"co... | {
"fields": [
{
"declarator": "bioLemmatizer = null",
"modifier": "private static",
"original_string": "private static BioLemmatizer bioLemmatizer = null;",
"type": "BioLemmatizer",
"var_name": "bioLemmatizer"
}
],
"file": "modules/bluima_commons/src/main/java/ch/epfl/bbp/uim... | {
"body": "public synchronized static String lemmatize(String text, String posTag) {\n LemmataEntry lemmata = getLemmatizer().lemmatizeByLexiconAndRules(text,\n posTag);\n\n Collection<edu.ucdenver.ccp.nlp.biolemmatizer.LemmataEntry.Lemma> lemmas = lemmata\n .getLemmas();\n... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_21 | {
"fields": [
{
"declarator": "EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>())",
"modifier": "static final",
"original_string": "static final IteratorWithPrevious<String> EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>());",
... | {
"body": "@Test\n public void testMultiline() throws Exception {\n Pair<List<Object>, String> params = PipelineScriptParser\n .parseParams(new IteratorWithPrevious<String>(newArrayList(\n \" a: bla\\\\\", \" bli \")));\n assertEquals(2, params.getKey().size(... | {
"fields": [
{
"declarator": "LOG = getLogger(PipelineScriptParser.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(PipelineScriptParser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_scripting/src/m... | {
"body": "static Pair<List<Object>, String> parseParams(\n IteratorWithPrevious<String> it) throws ParseException {\n List<Object> params = new ArrayList<Object>();\n String xml = \"\";\n while (it.hasNext()) {\n String current = it.next();\n if (StringUtils.isBl... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_76 | {
"fields": [],
"file": "modules/bluima_units/src/test/java/ch/epfl/bbp/uima/units/normalizers/FractionNormalizerTest.java",
"identifier": "FractionNormalizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() {\n assertEquals(\"0.5\", normalizeFraction(\"1/2\", null));\n assertEquals(0.12, new Float(normalizeFraction(\"1.2/10\", null)),\n 0.00001);\n }",
"class_method_signature": "FractionNormalizerTest.test()",
"constructor": false,
"full_sign... | {
"fields": [],
"file": "modules/bluima_units/src/main/java/ch/epfl/bbp/uima/units/normalizers/FractionNormalizer.java",
"identifier": "FractionNormalizer",
"interfaces": "implements Normalization",
"methods": [
{
"class_method_signature": "FractionNormalizer.normalize(String input, String ruleId)",... | {
"body": "public static String normalizeFraction(String input, String ruleId) {\n String[] split = input.split(\"/\");\n return \"\" + (parseFloat(split[0]) / parseFloat(split[1]));\n }",
"class_method_signature": "FractionNormalizer.normalizeFraction(String input, String ruleId)",
"constructor"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_99 | {
"fields": [],
"file": "modules/bluima_pubmed_ws/src/test/java/ch/epfl/bbp/uima/pubmed/PubmedSearchTest.java",
"identifier": "PubmedSearchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPmid() throws Exception {\n List<Integer> articles = new PubmedSearch().searchIds(\"16381840[pmid]\");\n assertTrue(articles.size() == 1);\n articles = new PubmedSearch().searchIds(\"16381840\");\n assertTrue(articles.size() == 1);\n articles = ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PubmedSearch.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(PubmedSearch.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "servic... | {
"body": "public List<Integer> searchIds(String query) throws RemoteException {\n\n\t\tEUtilsServiceStub.ESearchRequest req = new EUtilsServiceStub.ESearchRequest();\n\t\treq.setDb(\"pubmed\");\n\t\treq.setEmail(\"georges@gmail.com\");\n\t\treq.setTerm(query);\n\t\treq.setRetStart(\"0\");\n\t\treq.setRetMax(Integer.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_1 | {
"fields": [],
"file": "modules/bluima_xml/src/test/java/ch/epfl/bbp/uima/xml/ConceptMapperParserTest.java",
"identifier": "ConceptMapperParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n\n File age = new File(XmlHelper.XML_TEST_RESOURCES\n + \"ConceptMapperParser/age.xml\");\n\n Map<String, Concept> onto = ConceptMapperParser.parse(age);\n assertEquals(46, onto.size());\n Concept infant = onto.get... | {
"fields": [],
"file": "modules/bluima_xml/src/main/java/ch/epfl/bbp/uima/xml/ConceptMapperParser.java",
"identifier": "ConceptMapperParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConceptMapperParser.parse(File f)",
"constructor": false,
"full_signature": "public s... | {
"body": "public static Map<String, Concept> parse(File f) throws JDOMException,\n IOException {\n\n Map<String, Concept> concepts = newHashMap();\n\n InputStream corpusIs = new FileInputStream(f);\n\n SAXBuilder builder = new SAXBuilder();\n Document doc = builder.build(corpus... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_83 | {
"fields": [
{
"declarator": "LOG = getLogger(OscarAnnotatorTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(OscarAnnotatorTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_oscar4/src/test/jav... | {
"body": "@Test\n public void testDihydrotestosterone() throws Exception {\n\n //JCas jCas = getTestCas(\"Synthesis of 5 alpha-DHT is difficult to realise in laboratory.\");\n JCas jCas = getTestCas(\"Synthesis of 5 α-DHT is difficult to realise in laboratory.\");\n\n runPipeline(jCas, OscarA... | {
"fields": [
{
"declarator": "oscar = new Oscar()",
"modifier": "private",
"original_string": "private Oscar oscar = new Oscar();",
"type": "Oscar",
"var_name": "oscar"
},
{
"declarator": "RELEVANT_TYPES = Arrays\n .asList(new NamedEntityType[] { //\n ... | {
"body": "public static AnalysisEngineDescription getAED()\n throws ResourceInitializationException {\n return createEngineDescription(OscarAnnotator.class);\n }",
"class_method_signature": "OscarAnnotator.getAED()",
"constructor": false,
"full_signature": "public static AnalysisEngineDesc... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_95 | {
"fields": [
{
"declarator": "pmId16196030 = \"This paper describes the quantitative areal and laminar distribution of identified neuron populations projecting from areas of prefrontal cortex (PFC) to subcortical autonomic, motor, and limbic sites in the rat. Injections of the retrograde pathway tracer whe... | {
"body": "@Test\n public void testPmId16196030() throws Exception {\n\n String txt = pmId16196030;\n assertEquals(4, countMatches(txt, \"LH\"));\n\n String txtOut = expand(txt);\n assertEquals(\"should not contain LH: \" + txtOut, 0,\n countMatches(txtOut, \"LH\"));\n ... | {
"fields": [
{
"declarator": "LOG = getLogger(AbbreviationExpander.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = getLogger(AbbreviationExpander.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "mo... | {
"body": "static public String expand(String txt) {\n return expand(txt, getAbbrevs(txt));\n }",
"class_method_signature": "AbbreviationExpander.expand(String txt)",
"constructor": false,
"full_signature": "static public String expand(String txt)",
"identifier": "expand",
"invocations": [
"ex... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_117 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/triechar/TrieIdTest.java",
"identifier": "TrieIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testEmptyString() {\n TrieId t = new TrieId();\n t.addWord(\"\");\n }",
"class_method_signature": "TrieIdTest.testEmptyString()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "protected static final",
"original_string": "protected static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "trie",
"modifier": "protected",... | {
"body": "public int addWord(String word) {\n if (word == null || word.length() == 0)\n throw new IllegalArgumentException(\"word cannot be null or empty\");\n Integer id = trie.getWordData(word);\n if (id == null) {\n id = maxId;\n trie.addWord(word, id);\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_56 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/filter/KeepsCleanerTest.java",
"identifier": "KeepsCleanerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBalancedParenth() {\n assertTrue(isBalanced(\"a{b}c(dd[e]v)g\"));\n assertFalse(isBalanced(\"([}])\"));\n assertTrue(isBalanced(\"([])\"));\n assertTrue(isBalanced(\"()[]{}[][]\"));\n }",
"class_method_signature": "KeepsCleanerTest.testBalancedPar... | {
"fields": [
{
"declarator": "minLength = 3",
"modifier": "private final",
"original_string": "private final int minLength = 3;",
"type": "int",
"var_name": "minLength"
},
{
"declarator": "PARAM_TRANSFORM_LOWERCASE = \"transformLowercase\"",
"modifier": "private ... | {
"body": "public static boolean isBalanced(final String expression) {\n\n final char LEFT_NORMAL = '(', RIGHT_NORMAL = ')';\n final char LEFT_CURLY = '{', RIGHT_CURLY = '}';\n final char LEFT_SQUARE = '[', RIGHT_SQUARE = ']';\n\n Stack<Character> stack = new Stack<Character>();\n i... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_101 | {
"fields": [],
"file": "modules/bluima_pubmed_ws/src/test/java/ch/epfl/bbp/uima/pubmed/PubmedSearchTest.java",
"identifier": "PubmedSearchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @Ignore\n public void testLayers() throws Exception {\n PubmedSearch searcher = new PubmedSearch();\n for (String layer : new LineReader(new FileInputStream(\n \"src/test/resources/20130208_layers.txt\"))) {\n searcher.search(\"\\\"\" + layer + \"\\\"\"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PubmedSearch.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(PubmedSearch.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "servic... | {
"body": "public Iterator<PubmedArticleType> search(String query)\n\t\t\tthrows RemoteException {\n\t\treturn search(query, Integer.MAX_VALUE);\n\t}",
"class_method_signature": "PubmedSearch.search(String query)",
"constructor": false,
"full_signature": "public Iterator<PubmedArticleType> search(String query)"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_40 | {
"fields": [
{
"declarator": "LOG = getLogger(MongoCollectionRemoverTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(MongoCollectionRemoverTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_mon... | {
"body": "@Test\n\tpublic void test() throws Exception {\n\n\t\tString[] conn = MongoTest.getTestConn(\"MongoCollectionRemoverTest\");\n\t\tLOG.debug(\"using conn {}\", conn);\n\n\t\tLOG.debug(\"PUT SOME INITIAL DATA, WITH TOKENS\");\n\t\tJCas jCas = getTestCas();\n\t\tsetDocId(jCas, 17);\n\t\tPipelineBuilder pO = n... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n\t\t\t.getLogger(MongoCollectionRemover.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = LoggerFactory\n\t\t\t.getLogger(MongoCollectionRemover.class);",
"type": "Logger",
"var_n... | {
"body": "public static void removeAnnotations(String[] conn,\n\t\t\tString... annotationsToDelete) throws UIMAException, IOException {\n\t\tCollectionReader cr = createReader(\n\t\t\t\tMongoCollectionRemover.class, PARAM_DB_CONNECTION,\n\t\t\t\tconn, PARAM_DELETE_ANNOTATIONS, annotationsToDelete);\n\t\tAnalysisEng... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_17 | {
"fields": [
{
"declarator": "EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>())",
"modifier": "static final",
"original_string": "static final IteratorWithPrevious<String> EMPTY_ARGS = new IteratorWithPrevious<String>(\n new ArrayList<String>());",
... | {
"body": "@Test\n public void testParseAe() throws Exception {\n Pipeline p = new Pipeline();\n PipelineScriptParser.parseAE(\"ae: \"\n + WhitespaceTokenizerAnnotator.class.getName(), EMPTY_ARGS, p);\n }",
"class_method_signature": "PipelineScriptParserTest.testParseAe()",
"con... | {
"fields": [
{
"declarator": "LOG = getLogger(PipelineScriptParser.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(PipelineScriptParser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_scripting/src/m... | {
"body": "@SuppressWarnings(\"unchecked\")\n static void parseAE(String line, IteratorWithPrevious<String> it,\n Pipeline pipeline) throws ParseException {\n LOG.info(\"+-parsing line '{}'\", line);\n\n String aeName = line.replaceFirst(\"ae: \", \"\").trim();\n if (aeName.endsWith... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_6 | {
"fields": [],
"file": "modules/bluima_xml/src/test/java/ch/epfl/bbp/uima/xml/PmcNxmlParserTest.java",
"identifier": "PmcNxmlParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\t@Ignore\n\tpublic void testMatMet() throws Exception {\n\n\t\tArticle article = new PmcNxmlParser().parse(new FileInputStream(\n\t\t\t\tnew File(XmlHelper.XML_TEST_RESOURCES + \"nxml/18446507.nxml\")));\n\n\t\tBody body = article.getBody();\n\t\tif (body != null) {\n\t\t\tfor (Sec sec : body.getSe... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PmcNxmlParser.class)",
"modifier": "",
"original_string": "Logger LOG = LoggerFactory.getLogger(PmcNxmlParser.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "unmarshaller",
"modifier": ... | {
"body": "public Article parse(InputStream is) throws FileNotFoundException,\n\t\t\tJAXBException {\n\t\ttry {\n\t\t\tInputSource inputSource = new InputSource(new InputStreamReader(is));\n\t\t\tSAXSource source = new SAXSource(xmlReader, inputSource);\n\n\t\t\treturn (Article) unmarshaller.unmarshal(source);\n\t\t}... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_71 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testDoesntContainNonexistantNode() {\n assertFalse(trie.contains(\"apple\"));\n }",
"class_method_signature": "RadixTreeImplTest.testDoesntContainNonexistantNode()",
"constructor": false,
"full_signature": "@Test public void testDoesntContainNonexistantNode()",
"ide... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public boolean contains(String key) {\n Visitor<T, Boolean> visitor = new VisitorImpl<T,Boolean>(Boolean.FALSE) {\n public void visit(String key, RadixTreeNode<T> parent,\n RadixTreeNode<T> node) {\n result = node.isReal();\n }\n };\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_26 | {
"fields": [],
"file": "modules/bluima_pdf/src/test/java/ch/epfl/bbp/uima/pdf/cleanup/HyphenRemoverTest.java",
"identifier": "HyphenRemoverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDehyphenate() {\n assertEquals(\"Not yet implemented\\n\",\n dehyphenate(\"Not yet implem-\\nented\", \"a\"));\n\n assertEquals(\"Not yet implemented\\n\",\n dehyphenate(\"Not yet implem-\\nented\", \"a\"));\n\n assertEquals(\"No... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HyphenRemover.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(HyphenRemover.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "patt... | {
"body": "public static String dehyphenate(LineNumberReader reader, String docId) {\n\n String line;\n StringBuilder sb = new StringBuilder();\n\n try {\n while ((line = reader.readLine()) != null) {\n String lineOut = line;\n Matcher matcher = patternHyp... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_30 | {
"fields": [],
"file": "modules/bluima_commons/src/test/java/ch/epfl/bbp/uima/ae/WordnetAnnotatorTest.java",
"identifier": "WordnetAnnotatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n\n JCas jcas = getTokenizedTestCas(\"rhinoceroses\");\n\n AnalysisEngine ae = createEngine(WordnetAnnotator.class);\n ae.process(jcas);\n\n Collection<WordnetDictTerm> w = select(jcas, WordnetDictTerm.class);\n Prin.t(w);\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(WordnetAnnotator.class)",
"modifier": "private static",
"original_string": "private static org.slf4j.Logger LOG = LoggerFactory\n .getLogger(WordnetAnnotator.class);",
"type": "org.slf4j.Logger",
"v... | {
"body": "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n\n for (Token t : JCasUtil.select(jCas, Token.class)) {\n try {\n\n if (t.getPos() != null\n && POS.getPartOfSpeech(t.getPos().charAt(0)) != null) {\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_67 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testDuplicatesNotAllowed() {\n RadixTreeImpl<String> trie = new RadixTreeImpl<String>();\n\n trie.insert(\"apple\", \"apple\");\n\n try {\n trie.insert(\"apple\", \"apple2\");\n fail(\"Duplicate should not have been allowed\");\n } ca... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public void insert(String key, T value) throws DuplicateKeyException {\n try {\n\t\t\tinsert(key, root, value);\n\t\t} catch (DuplicateKeyException e) {\n\t\t\t// re-throw the exception with 'key' in the message\n\t\t\tthrow new DuplicateKeyException(\"Duplicate key: '\" + key + \"'\");\n\t\t}\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_126 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSortByValue() {\n Random random = new Random(System.currentTimeMillis());\n Map<String, Integer> testMap = new HashMap<String, Integer>(1000);\n for (int i = 0; i < 1000; ++i) {\n testMap.put(\"SomeString\" + random.nextInt(), random.nextInt());\n ... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.keyOfHighestValue(Map<K, V> map)",
"constructor": false,
"full_signature": "public static K keyOfHighestVal... | {
"body": "public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(\n Map<K, V> map) {\n return sortByValue(map, false);\n }",
"class_method_signature": "MapUtils.sortByValue(\n Map<K, V> map)",
"constructor": false,
"full_signature": "public static Map<K, V> sor... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_88 | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "haystack = \"T... | {
"body": "@Test\n public void testSimilarity2() {\n \n Map<Integer, String> queries = newHashMap();\n queries.put(\n 1,\n \"This is a remarkably good book on graphical models. Filled with lots of examples and really takes its time trying to build intuition. Serio... | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "CONTENT_FIELD = \"text... | {
"body": "public static Map<Integer, Float> computeSimilarity2(\n final Map<Integer, String> queries, String haystack, int gramLength) {\n\n if (queries == null || queries.isEmpty() || haystack == null\n || haystack.length() == 0)\n return null;\n\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_10 | {
"fields": [
{
"declarator": "LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\";",
"type": "String",
... | {
"body": "@Test\n public void testBeanshell() throws Exception {\n Launcher.main(new String[] { TESTS_ROOT + \"laucher/beanshell.pipeline\" });\n }",
"class_method_signature": "LauncherTest.testBeanshell()",
"constructor": false,
"full_signature": "@Test public void testBeanshell()",
"identifier... | {
"fields": [
{
"declarator": "LOG = getLogger(Launcher.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Launcher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "OK_MESSAGE = \"Pipeline completed successf... | {
"body": "public static void main(String[] args) throws IOException, UIMAException,\n ParseException {\n\n // no pipeline --> list and ask\n if (args == null || args.length == 0) {\n String home = System.getProperty(\"basedir\");\n listPipelinesAndAsk(new File(home + \"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_106 | {
"fields": [],
"file": "utils/mallet_utils/src/test/java/cc/mallet/pipe/tsf/transform/CommonNerTokenTransformersTest.java",
"identifier": "CommonNerTokenTransformersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMorphologyContiguousNumbersGroupedOrRejectedTransformer() {\n\t\tTokenTransformer transformer = \n\t\t\t\tCommonNerTokenTransformers.getMorphologyContiguousNumbersGroupedOrRejectedTransformer();\n\t\t\n\t\tassertEquals(null, transformer.transform(\"\"));\n\t\tassertEquals(null, tra... | {
"fields": [
{
"declarator": "ToLowerCaseTransformer = new TokenTransformer() {\t\t\n\t\t@Override\n\t\tpublic String transform(String token) {\n\t\t\treturn token.toLowerCase();\t\t\t\n\t\t}\n\t}",
"modifier": "private static final",
"original_string": "private static final TokenTransformer To... | {
"body": "public static TokenTransformer getMorphologyContiguousNumbersGroupedOrRejectedTransformer() {\n\t\treturn morphologyContiguousNumbersGroupedOrRejected;\n\t}",
"class_method_signature": "CommonNerTokenTransformers.getMorphologyContiguousNumbersGroupedOrRejectedTransformer()",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_47 | {
"fields": [
{
"declarator": "testDir",
"modifier": "private static",
"original_string": "private static String testDir;",
"type": "String",
"var_name": "testDir"
}
],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/cr/ZipXmiCollectionReaderTest.java",
"identi... | {
"body": "@Test\n public void testStructured() throws Exception {\n\n for (int docId : new int[] { 12345678, 1234, 12345 }) {\n\n JCas jCas = UimaTests.getTestCas(\"bla blahh \" + docId);\n Header header = new Header(jCas);\n header.setDocId(docId + \"\");\n head... | {
"fields": [
{
"declarator": "XMI = \"XMI\"",
"modifier": "public static final",
"original_string": "public static final String XMI = \"XMI\";",
"type": "String",
"var_name": "XMI"
},
{
"declarator": "XCAS = \"XCAS\"",
"modifier": "public static final",
"or... | {
"body": "public static void deserialize(File currentZipFile, JCas jCas,\n String _xmlScheme) throws IOException {\n\n InputStream inputStream = unzipUniqueFileAsStream(currentZipFile);\n try {\n if (_xmlScheme.equals(XMI))\n XmiCasDeserializer.deserialize(inputStre... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_110 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/io/LineReaderTest.java",
"identifier": "LineReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadLines() throws Exception {\n\n List<String> theints = LineReader.linesFrom(LineReader.class\n .getResourceAsStream(\"LineReader_ints.txt\"));\n assertEquals(4, theints.size());\n assertEquals(\"1\", theints.get(0));\n assertEquals(\"... | {
"fields": [
{
"declarator": "reader",
"modifier": "private",
"original_string": "private BufferedReader reader;",
"type": "BufferedReader",
"var_name": "reader"
}
],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/io/LineReader.java",
"identifier": "LineReader",
"... | {
"body": "public static List<String> linesFrom(String filePath)\n throws FileNotFoundException {\n return linesFrom(new FileInputStream(filePath));\n }",
"class_method_signature": "LineReader.linesFrom(String filePath)",
"constructor": false,
"full_signature": "public static List<String> l... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_51 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/ae/relations/WriteCoocurrencesToLoadfile2Test.java",
"identifier": "WriteCoocurrencesToLoadfile2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSnippet() throws Exception {\n\n JCas jCas = getTokenizedTestCas(\"Test sentence for snippetting great\");\n Protein a1 = createAnnot(jCas, Protein.class, 5, 13);\n Protein a2 = createAnnot(jCas, Protein.class, 18, 29);\n\n String snippet = snippet(jCa... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class);",
"type": "Logger",
... | {
"body": "public static String snippet(JCas jCas, int snippetBegin, int snippetEnd,\n Annotation a1, Annotation a2) {\n\n final String T_BEGIN = \"<strong class=\\\"\";\n final String T_END = \"</strong>\";\n\n String s = jCas.getDocumentText().substring(snippetBegin, snippetEnd);\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_92 | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(AbbreviationsExpanderAnnotatorTest.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = LoggerFactory\n .getLogger(AbbreviationsExpanderAnnotatorTest.class);",
... | {
"body": "@Test\n public void testAbrevs() throws Exception {\n\n JCas jCas = getTestCas(SAMPLE_TXT);\n\n PipelineBuilder p = new JcasPipelineBuilder(jCas);\n p.add(AbbreviationsExpanderAnnotatorTest.class);\n p.add(AbbreviationsAnnotator.class);\n p.add(AbbreviationsExpanderAnn... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(AbbreviationsExpanderAnnotator.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = LoggerFactory\n .getLogger(AbbreviationsExpanderAnnotator.class);",
"t... | {
"body": "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n expandAbbreviations(jCas);\n }",
"class_method_signature": "AbbreviationsExpanderAnnotator.process(JCas jCas)",
"constructor": false,
"full_signature": "@Override public void process(JCas jCas)",
"iden... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_84 | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "haystack = \"T... | {
"body": "@Test\n public void test() {\n\n String haystack = \"This is a remarkably good book on graphical models. Filled with lots of examples and really takes its time trying to build intuition. Seriously, consider this book if the idea of going through Koller’s 1400 page tome feels intimidating. The boo... | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "CONTENT_FIELD = \"text... | {
"body": "public static float subsumes(String haystack, final String needle) {\n\n if (needle == null || needle.length() < 0 || haystack == null\n || haystack.length() < 0)\n return 0f;\n\n try {\n // index the cleaned text\n RAMDirectory idx = new RAMDir... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_85 | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "haystack = \"T... | {
"body": "@Test\n public void test733() {\n\n String haystack = \"Neurotransmitters and Temperature Regulation \\nPETER LOMAX AND MARTIN DAVID GREEN\\n\\nDepartment of Pharmacology, School of Medicine and the Brain Research Institute, University of\\n Calif... | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "CONTENT_FIELD = \"text... | {
"body": "public static float subsumes(String haystack, final String needle) {\n\n if (needle == null || needle.length() < 0 || haystack == null\n || haystack.length() < 0)\n return 0f;\n\n try {\n // index the cleaned text\n RAMDirectory idx = new RAMDir... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_93 | {
"fields": [
{
"declarator": "pmId16196030 = \"This paper describes the quantitative areal and laminar distribution of identified neuron populations projecting from areas of prefrontal cortex (PFC) to subcortical autonomic, motor, and limbic sites in the rat. Injections of the retrograde pathway tracer whe... | {
"body": "@Test\n public void testShouldNotExpand() throws Exception {\n\n String txt = \"The subthalamic nucleus (STh) is a brain region. The medialSTh is here.\";\n assertEquals(\n \"should not expand, since Sth is glued to medial\",\n \"The subthalamic nucleus is a b... | {
"fields": [
{
"declarator": "LOG = getLogger(AbbreviationExpander.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOG = getLogger(AbbreviationExpander.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "mo... | {
"body": "static public String expand(String txt) {\n return expand(txt, getAbbrevs(txt));\n }",
"class_method_signature": "AbbreviationExpander.expand(String txt)",
"constructor": false,
"full_signature": "static public String expand(String txt)",
"identifier": "expand",
"invocations": [
"ex... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_111 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/io/LineReaderTest.java",
"identifier": "LineReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadInts() throws Exception {\n\n int[] theints = LineReader.intsFrom(LineReader.class\n .getResourceAsStream(\"LineReader_ints.txt\"));\n assertEquals(4, theints.length);\n assertEquals(1, theints[0]);\n assertEquals(2, theints[1]);\n ... | {
"fields": [
{
"declarator": "reader",
"modifier": "private",
"original_string": "private BufferedReader reader;",
"type": "BufferedReader",
"var_name": "reader"
}
],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/io/LineReader.java",
"identifier": "LineReader",
"... | {
"body": "public static int[] intsFrom(String file) throws FileNotFoundException {\n return intsFrom(new FileInputStream(file));\n }",
"class_method_signature": "LineReader.intsFrom(String file)",
"constructor": false,
"full_signature": "public static int[] intsFrom(String file)",
"identifier": "in... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_50 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/io/DirectoryIteratorTest.java",
"identifier": "DirectoryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLarge() throws Exception {\n\n if (IS_OS_LINUX || IS_OS_MAC) {\n\n File dir = Resources.getFile(\"directoryIterator/default\");\n Iterator<File> it = DirectoryIterator.get(\n LargeDirectoryIterator.class.getSimpleName(), dir, null,\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(DirectoryIterator.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(DirectoryIterator.class);",
"type": "Logger",
"var_name": "LOG... | {
"body": "public static Iterator<File> get(String directoryIteratorType, File dir,\n String extensionFilter, boolean recursive) throws IOException {\n\n try {\n // add package name to e.g. \"DefaultDirectoryIterator\"\n if (directoryIteratorType.indexOf('.') == -1) {\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_107 | {
"fields": [],
"file": "utils/mallet_utils/src/test/java/cc/mallet/pipe/tsf/transform/CommonNerTokenTransformersTest.java",
"identifier": "CommonNerTokenTransformersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testEnglishVowelsTransformer() {\n\t\tTokenTransformer transformer = \n\t\t\t\tCommonNerTokenTransformers.getEnglishVowelsTransformer();\n\t\t\n\t\tassertEquals(\"\", transformer.transform(\"\"));\n\t\tassertEquals(\"*iau\", transformer.transform(\"miau\"));\n\t\tassertEquals(\"****\",... | {
"fields": [
{
"declarator": "ToLowerCaseTransformer = new TokenTransformer() {\t\t\n\t\t@Override\n\t\tpublic String transform(String token) {\n\t\t\treturn token.toLowerCase();\t\t\t\n\t\t}\n\t}",
"modifier": "private static final",
"original_string": "private static final TokenTransformer To... | {
"body": "public static TokenTransformer getEnglishVowelsTransformer() {\n\t\treturn englishVowelsTransformer;\n\t}",
"class_method_signature": "CommonNerTokenTransformers.getEnglishVowelsTransformer()",
"constructor": false,
"full_signature": "public static TokenTransformer getEnglishVowelsTransformer()",
"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_46 | {
"fields": [
{
"declarator": "testDir",
"modifier": "private static",
"original_string": "private static String testDir;",
"type": "String",
"var_name": "testDir"
}
],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/cr/ZipXmiCollectionReaderTest.java",
"identi... | {
"body": "@Test\n public void testSerializeDeserializeXmi() throws Exception {\n\n CollectionReader cr = createReader(TextArrayReader.class,\n PARAM_INPUT, new String[] { \"this is a test\" });\n AnalysisEngine serializer = createEngine(ZipXWriter.class,\n BlueUima.PAR... | {
"fields": [
{
"declarator": "XMI = \"XMI\"",
"modifier": "public static final",
"original_string": "public static final String XMI = \"XMI\";",
"type": "String",
"var_name": "XMI"
},
{
"declarator": "XCAS = \"XCAS\"",
"modifier": "public static final",
"or... | {
"body": "@Override\n public void getNext(JCas jCas) throws IOException, CollectionException {\n File currentZipFile = fileIterator.next();\n deserialize(currentZipFile, jCas, xmlScheme);\n }",
"class_method_signature": "ZipXmiCollectionReader.getNext(JCas jCas)",
"constructor": false,
"ful... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_11 | {
"fields": [
{
"declarator": "LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\";",
"type": "String",
... | {
"body": "@Test\n public void testArgs() throws Exception {\n // should not throw an exception\n Launcher.runPipeline(new File(TESTS_ROOT + \"laucher/args.pipeline\"),\n newArrayList(\"two words\", \"2\", \"10\"));\n }",
"class_method_signature": "LauncherTest.testArgs()",
"con... | {
"fields": [
{
"declarator": "LOG = getLogger(Launcher.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Launcher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "OK_MESSAGE = \"Pipeline completed successf... | {
"body": "public static void runPipeline(File scriptFile, List<String> cliArgs)\n throws IOException, UIMAException, ParseException {\n if (!scriptFile.exists()) {\n throw new IOException(\"Script file does not exist (\"\n + scriptFile.getAbsolutePath() + \")\");\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_66 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testInsert() {\n trie.insert(\"apple\", \"apple\");\n trie.insert(\"bat\", \"bat\");\n trie.insert(\"ape\", \"ape\");\n trie.insert(\"bath\", \"bath\");\n trie.insert(\"banana\", \"banana\"); \n \n assertEquals(trie.find(\"apple\"), \"... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public void insert(String key, T value) throws DuplicateKeyException {\n try {\n\t\t\tinsert(key, root, value);\n\t\t} catch (DuplicateKeyException e) {\n\t\t\t// re-throw the exception with 'key' in the message\n\t\t\tthrow new DuplicateKeyException(\"Duplicate key: '\" + key + \"'\");\n\t\t}\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_127 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSortByReverseValue() {\n Random random = new Random(System.currentTimeMillis());\n Map<String, Integer> testMap = new HashMap<String, Integer>(1000);\n for (int i = 0; i < 1000; ++i) {\n testMap.put(\"SomeString\" + random.nextInt(), random.nextInt... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.keyOfHighestValue(Map<K, V> map)",
"constructor": false,
"full_signature": "public static K keyOfHighestVal... | {
"body": "public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(\n Map<K, V> map) {\n return sortByValue(map, false);\n }",
"class_method_signature": "MapUtils.sortByValue(\n Map<K, V> map)",
"constructor": false,
"full_signature": "public static Map<K, V> sor... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_89 | {
"fields": [],
"file": "modules/bluima_text2pmid/src/test/java/ch/epfl/bbp/uima/txt2pmid/Txt2PubmedIdTest.java",
"identifier": "Txt2PubmedIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEvaluate() throws IOException {\n\n String base = \"/Volumes/HDD2/ren_data/data_hdd/_papers_etc/pubmed/txt_to_pmid-evaluation_sample/pdfs\";\n\n Txt2PubmedId txt2PubmedId = new Txt2PubmedId(new File(\n Txt2PubmedIdIndexer.INDEX_PATH));\n int hi... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Txt2PubmedId.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(Txt2PubmedId.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "HIGH_C... | {
"body": "public PmId extract(File pdfF) {\n\t\ttry {\n\t\t\t// parse pdf\n\t\t\tJCas jCas = JCasFactory.createJCas();\n\t\t\tPDFTextStream pdf = new PDFTextStream(pdfF);\n\t\t\tBlockHandler blueHandler = new BlockHandler();\n\t\t\tpdf.pipe(blueHandler);\n\t\t\tPdfCollectionReader.extractText(jCas, blueHandler.getDo... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_31 | {
"fields": [],
"file": "modules/bluima_commons/src/test/java/ch/epfl/bbp/uima/ae/BioAdiAbreviationAnnotatorTest.java",
"identifier": "BioAdiAbreviationAnnotatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n\n\tJCas jCas = getTestCas(//\n\t\t\"shunting for normal pressure hydrocephalus (NPH) was classified\");\n\t\n\tAnalysisEngine ae = createEngine(BioAdiAbreviationAnnotator.class);\n\tae.process(jCas);\n\n\tCollection<Abbreviation> a = select(jCas, Abbreviat... | {
"fields": [
{
"declarator": "dummy",
"modifier": "public",
"original_string": "public String dummy;",
"type": "String",
"var_name": "dummy"
}
],
"file": "modules/bluima_commons/src/main/java/ch/epfl/bbp/uima/ae/BioAdiAbreviationAnnotator.java",
"identifier": "BioAdiAbrevi... | {
"body": "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\t\tif (text.length() > 0) {\n\n\t\t\tList<String> abrevs = Utility.performTest(\"\", text);\n\t\t\tfor (String abrevArr : abrevs) {\n\n\t\t\t\ttry {\n\t\t\t\t\t// e.g. NPH|norm... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_27 | {
"fields": [],
"file": "modules/bluima_pdf/src/test/java/ch/epfl/bbp/uima/pdf/cleanup/HyphenRemoverTest.java",
"identifier": "HyphenRemoverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDehyphenate2() {\n assertEquals(\"The basal nucleus of the hypocampus\\n\",\n dehyphenate(\"The basal nu-\\ncleus of the hypocampus\", \"a\"));\n }",
"class_method_signature": "HyphenRemoverTest.testDehyphenate2()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HyphenRemover.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(HyphenRemover.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "patt... | {
"body": "public static String dehyphenate(LineNumberReader reader, String docId) {\n\n String line;\n StringBuilder sb = new StringBuilder();\n\n try {\n while ((line = reader.readLine()) != null) {\n String lineOut = line;\n Matcher matcher = patternHyp... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_70 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testCantFindNonexistantNode() {\n assertNull(trie.find(\"apple\"));\n }",
"class_method_signature": "RadixTreeImplTest.testCantFindNonexistantNode()",
"constructor": false,
"full_signature": "@Test public void testCantFindNonexistantNode()",
"identifier": "testCantF... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public T find(String key) {\n Visitor<T,T> visitor = new VisitorImpl<T,T>() {\n\n public void visit(String key, RadixTreeNode<T> parent,\n RadixTreeNode<T> node) {\n if (node.isReal()) \n result = node.getValue();\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_7 | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(GeniaCorpusParserTest.class)",
"modifier": "",
"original_string": "Logger LOG = LoggerFactory.getLogger(GeniaCorpusParserTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_xml/src/test/j... | {
"body": "@Test\n public void test() throws Exception {\n\n\tInputStream is = this.getClass().getResourceAsStream(\n\t\t\"/GENIAcorpus3.02.xml/test_sample.xml\");\n\n\tSet parse = new GeniaCorpusParser().parse(is);\n\n\tassertEquals(1, parse.getArticle().size());\n\n\tArticle a = parse.getArticle().get(0);\n\tass... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(GeniaCorpusParser.class)",
"modifier": "",
"original_string": "Logger LOG = LoggerFactory.getLogger(GeniaCorpusParser.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "unmarshaller",
"mod... | {
"body": "public Set parse(InputStream is) throws FileNotFoundException,\n JAXBException {\n LOG.debug(\"parsing genia\");\n try {\n return (Set) unmarshaller.unmarshal(is);\n } finally {\n IOUtils.closeQuietly(is);\n }\n }",
"class_method_signature":... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_124 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testKeyOfHighestValue() {\n\n Map<String, Double> mapp = new HashMap<String, Double>();\n mapp.put(\"s3.5\", 3.5);\n mapp.put(\"s1.5\", 1.5);\n mapp.put(\"s0.5\", 0.5);\n mapp.put(\"s0.6\", 0.6);\n mapp.put(\"2s3.5\", 3.5);\n mapp.put(... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.keyOfHighestValue(Map<K, V> map)",
"constructor": false,
"full_signature": "public static K keyOfHighestVal... | {
"body": "public static <K, V extends Comparable<V>> K keyOfHighestValue(Map<K, V> map) {\n K bestKey = null;\n V bestValue = null;\n for (Entry<K, V> entry : map.entrySet()) {\n if (bestValue == null || entry.getValue().compareTo(bestValue) > 0) {\n bestKey = entry.get... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_65 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/word2vec/Word2VecUtilsTest.java",
"identifier": "Word2VecUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @Ignore\n public void testBrainRegions() throws Exception {\n\n assertNotNull(Word2VecUtils.getClass(\"brain\"));\n\n String[] proteins = { \"acetylcholinesterase\", \"acrosin\",\n \"adenosylhomocysteinase\", \"adipogenin\", \"adiponectin\",\n \"adi... | {
"fields": [
{
"declarator": "LOG = getLogger(Word2VecUtils.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Word2VecUtils.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "MODEL_FILE = \"/Users/richarde/d... | {
"body": "public static int getClass(String word) {\n if (w2c == null) {\n try {\n w2c = Word2Vec.loadClassModel(MODEL_FILE_CLASS);\n } catch (IOException e) {\n System.err.println(\"could not load w2c\");\n }\n }\n if (w2c.containsK... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_32 | {
"fields": [],
"file": "modules/bluima_commons/src/test/java/ch/epfl/bbp/uima/ae/BioLemmatizerNormalizerAnnotatorTest.java",
"identifier": "BioLemmatizerNormalizerAnnotatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n JCas jCas = UimaTests.getTokenizedTestCas(\"AMPAR is Regulated by GABA\");\n\n PipelineBuilder builder = new JcasPipelineBuilder(jCas);\n builder.add(BlueBioLemmatizer.class);\n builder.add(Tokens2KeepAnnotator.class);\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(BioLemmatizerNormalizerAnnotator.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory\n .getLogger(BioLemmatizerNormalizerAnnotator.class);",
"type": "Logge... | {
"body": "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n\n for (Keep k : select(jCas, Keep.class)) {\n\n Annotation a = k.getEnclosedAnnot(); \n String normalized = null;\n \n // sometimes, Tokens already have a lemma form,... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_24 | {
"fields": [],
"file": "modules/bluima_bbp/src/test/java/ch/epfl/bbp/uima/projects/brainregions/bams/FindSynonyms3Test.java",
"identifier": "FindSynonyms3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n\n FindSynonyms3 fs3 = new FindSynonyms3();\n\n Set<String> s = fs3.getSynonyms(\"dentate gyrus\");\n System.out.println(join(s, \"; \"));\n assertEquals(5, s.size());\n // assertEquals(\"dentate gyrus\", s.get(0));\n\n ... | {
"fields": [
{
"declarator": "lexiconName = { \"bams2004\", \"bams2013\", \"dong\", \"hof\",\n \"neuronames\", \"paxinos\", \"swanson\" }",
"modifier": "final",
"original_string": "final String[] lexiconName = { \"bams2004\", \"bams2013\", \"dong\", \"hof\",\n \"neuronames... | {
"body": "public Set<String> getSynonyms(final String canonical) {\n Set<String> syn = Sets.newHashSet();\n\n for (Map<String, Concept> lexica : lexicon) {\n for (String lexCanonical : lexica.keySet()) {\n Set<String> variants = lexica.get(lexCanonical).getVariants();\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_73 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testComplete() {\n // create a new Trie\n RadixTree<String> trie = new RadixTreeImpl<String>();\n \n trie.insert(\"apple\", \"apple\");\n trie.insert(\"appleshack\", \"appleshack\");\n trie.insert(\"applepie\", \"applepie\");\n trie.in... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public String complete(String prefix) {\n\t\treturn complete(prefix, root, \"\");\n\t}",
"class_method_signature": "RadixTreeImpl.complete(String prefix)",
"constructor": false,
"full_signature": "public String complete(String prefix)",
"identifier": "complete",
"invocations": [
"complete"
... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_49 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/io/DirectoryIteratorTest.java",
"identifier": "DirectoryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testZip() throws Exception {\n\n File dir = Resources.getFile(\"directoryIterator/zipFileIterator.zip\");\n Iterator<File> it = DirectoryIterator.get(\n ZipDirectoryIterator.class.getSimpleName(), dir, null, false);\n ArrayList<File> list = newArra... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(DirectoryIterator.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(DirectoryIterator.class);",
"type": "Logger",
"var_name": "LOG... | {
"body": "public static Iterator<File> get(String directoryIteratorType, File dir,\n String extensionFilter, boolean recursive) throws IOException {\n\n try {\n // add package name to e.g. \"DefaultDirectoryIterator\"\n if (directoryIteratorType.indexOf('.') == -1) {\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_108 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/MissingUtilsTest.java",
"identifier": "MissingUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFormat() {\n\n assertEquals(\"a1b2c\", MissingUtils.format(\"a{}b{}c\", 1, 2));\n assertEquals(\"1 b 2 c\", MissingUtils.format(\"{} b {} c\", 1, 2));\n\n assertEquals(\"ok not to have brackets\", \"\",\n MissingUtils.format(\"\", 1, 2));\n ... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/MissingUtils.java",
"identifier": "MissingUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MissingUtils.sleep(long millis)",
"constructor": false,
"full_signature": "public static void sleep(long mil... | {
"body": "public static String format(String msg, Object... args) {\n\n if (args == null || args.length == 0)\n return msg;\n\n StringBuilder sb = new StringBuilder();\n int argId = 0;\n for (int i = 0; i < msg.length(); i++) {\n\n final char c = msg.charAt(i);\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_4 | {
"fields": [],
"file": "modules/bluima_xml/src/test/java/ch/epfl/bbp/uima/xml/PubmedXmlParserTest.java",
"identifier": "PubmedXmlParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParsePubmedXmls() throws Exception {\n\n InputStream is = ResourceHelper\n .getInputStream(\"pubmed_abstracts/medline13n0787.xml\");\n List<MedlineCitation> arts = new PubmedXmlParser().parseAsArticles(is);\n assertEquals(3, arts.size());\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PubmedXmlParser.class)",
"modifier": "",
"original_string": "Logger LOG = LoggerFactory.getLogger(PubmedXmlParser.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "unmarshaller",
"modifie... | {
"body": "public List<MedlineCitation> parseAsArticles(InputStream is) {\n try {\n MedlineCitationSet parse = (MedlineCitationSet) unmarshaller\n .unmarshal(is);\n return parse.getMedlineCitation();\n } catch (Exception e) {\n LOG.warn(\"could not par... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_86 | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "haystack = \"T... | {
"body": "@Test\n @Ignore\n public void testSpeed() {\n\n long start = System.currentTimeMillis();\n float s = 0;\n for (int i = 0; i < 1000; i++) {\n s += LuceneHelper.subsumes(haystack, //\n \"This is a remarkably good book on graphical models\");\n }... | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "CONTENT_FIELD = \"text... | {
"body": "public static float subsumes(String haystack, final String needle) {\n\n if (needle == null || needle.length() < 0 || haystack == null\n || haystack.length() < 0)\n return 0f;\n\n try {\n // index the cleaned text\n RAMDirectory idx = new RAMDir... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_69 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testCantFindRootNode() {\n assertNull(trie.find(\"\"));\n }",
"class_method_signature": "RadixTreeImplTest.testCantFindRootNode()",
"constructor": false,
"full_signature": "@Test public void testCantFindRootNode()",
"identifier": "testCantFindRootNode",
"invocatio... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public T find(String key) {\n Visitor<T,T> visitor = new VisitorImpl<T,T>() {\n\n public void visit(String key, RadixTreeNode<T> parent,\n RadixTreeNode<T> node) {\n if (node.isReal()) \n result = node.getValue();\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_28 | {
"fields": [],
"file": "modules/bluima_pdf/src/test/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patchTest.java",
"identifier": "diff_match_patchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSimple() {\n assertEquals(0, diff_match_patch.match_main(\"hello\", \"hello\", 0));\n assertEquals(-1, diff_match_patch.match_main(\"hello\", \"world\", 0));\n assertEquals(\n -1,\n diff_match_patch\n .matc... | {
"fields": [
{
"declarator": "Diff_Timeout = 1.0f",
"modifier": "private",
"original_string": "private float Diff_Timeout = 1.0f;",
"type": "float",
"var_name": "Diff_Timeout"
},
{
"declarator": "Diff_EditCost = 4",
"modifier": "private",
"original_string":... | {
"body": "public static int match_main(String text, String pattern, int loc) {\n // Check for null inputs.\n if (text == null || pattern == null) {\n throw new IllegalArgumentException(\"Null inputs. (match_main)\");\n }\n\n loc = Math.max(0, Math.min(loc, text.length()));\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_90 | {
"fields": [],
"file": "modules/bluima_text2pmid/src/test/java/ch/epfl/bbp/uima/txt2pmid/Txt2PubmedIdTest.java",
"identifier": "Txt2PubmedIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @Deprecated\n public void testEvaluateFromLabPeople() throws IOException {\n\n String index = \"index_pubmed\";\n String base = \"/Users/richarde/Desktop/people/\";\n\n for (String user : new File(base).list()) {\n\n System.out.println(\"\\n\\n___________\\npro... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Txt2PubmedId.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(Txt2PubmedId.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "HIGH_C... | {
"body": "public PmId extract(File pdfF) {\n\t\ttry {\n\t\t\t// parse pdf\n\t\t\tJCas jCas = JCasFactory.createJCas();\n\t\t\tPDFTextStream pdf = new PDFTextStream(pdfF);\n\t\t\tBlockHandler blueHandler = new BlockHandler();\n\t\t\tpdf.pipe(blueHandler);\n\t\t\tPdfCollectionReader.extractText(jCas, blueHandler.getDo... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_53 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/ae/relations/WriteCoocurrencesToLoadfile2Test.java",
"identifier": "WriteCoocurrencesToLoadfile2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAEFilter() throws Exception {\n\n JCas jCas = FilterCoocurrencesByDistanceTest.doTest(5);\n assertTrue(\"one cooc, distance ok\", exists(jCas, Cooccurrence.class));\n Cooccurrence cooc = JCasUtil.selectSingle(jCas, Cooccurrence.class);\n cooc.setCooccu... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class);",
"type": "Logger",
... | {
"body": "@Override\n public void collectionProcessComplete()\n throws AnalysisEngineProcessException {\n super.collectionProcessComplete();\n try {\n writer.close();\n } catch (IOException e) {\n throw new AnalysisEngineProcessException(e);\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_112 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/io/LineReaderTest.java",
"identifier": "LineReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadIntsQuoted() throws Exception {\n\n int[] theints = LineReader.intsFrom(LineReader.class\n .getResourceAsStream(\"LineReader_ints_quoted.txt\"));\n assertEquals(4, theints.length);\n assertEquals(1, theints[0]);\n assertEquals(2, the... | {
"fields": [
{
"declarator": "reader",
"modifier": "private",
"original_string": "private BufferedReader reader;",
"type": "BufferedReader",
"var_name": "reader"
}
],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/io/LineReader.java",
"identifier": "LineReader",
"... | {
"body": "public static int[] intsFrom(String file) throws FileNotFoundException {\n return intsFrom(new FileInputStream(file));\n }",
"class_method_signature": "LineReader.intsFrom(String file)",
"constructor": false,
"full_signature": "public static int[] intsFrom(String file)",
"identifier": "in... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_45 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/BlueCasUtilTest.java",
"identifier": "BlueCasUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsContained() throws Exception {\n JCas jCas = getTestCas();\n\n Protein p1 = new Protein(jCas, 7, 10);\n p1.addToIndexes();\n Protein p2 = new Protein(jCas, 6, 10);\n p2.addToIndexes();\n\n assertTrue(isContained(p1, p2));\n asser... | {
"fields": [
{
"declarator": "LOG = getLogger(BlueCasUtil.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(BlueCasUtil.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_utils/src/main/java/ch/epfl/bbp/u... | {
"body": "public static boolean isContained(Annotation a1, Annotation a2) {\n return a1.getBegin() >= a2.getBegin() && a1.getEnd() <= a2.getEnd();\n }",
"class_method_signature": "BlueCasUtil.isContained(Annotation a1, Annotation a2)",
"constructor": false,
"full_signature": "public static boolean is... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_104 | {
"fields": [],
"file": "utils/mallet_utils/src/test/java/cc/mallet/pipe/tsf/transform/CommonNerTokenTransformersTest.java",
"identifier": "CommonNerTokenTransformersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMorphologyUpperLowerNumberTransformer() {\n\t\tTokenTransformer transformer = CommonNerTokenTransformers.getMorphologyUpperLowerNumberTransformer();\n\t\t\n\t\tassertEquals(\"\", transformer.transform(\"\"));\n\t\tassertEquals(\"aaaa\", transformer.transform(\"miau\"));\n\t\tassert... | {
"fields": [
{
"declarator": "ToLowerCaseTransformer = new TokenTransformer() {\t\t\n\t\t@Override\n\t\tpublic String transform(String token) {\n\t\t\treturn token.toLowerCase();\t\t\t\n\t\t}\n\t}",
"modifier": "private static final",
"original_string": "private static final TokenTransformer To... | {
"body": "public static TokenTransformer getMorphologyUpperLowerNumberTransformer() {\n\t\treturn morphologyUpperLowerNumber;\n\t}",
"class_method_signature": "CommonNerTokenTransformers.getMorphologyUpperLowerNumberTransformer()",
"constructor": false,
"full_signature": "public static TokenTransformer getMorp... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_8 | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(ReferencesClassifierAnnotatorTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory\n .getLogger(ReferencesClassifierAnnotatorTest.class);",
"type": "Log... | {
"body": "@Test\n public void test() throws Exception {\n\n JcasPipelineBuilder builder = new JcasPipelineBuilder();\n builder.add(ReferencesClassifierAnnotator.class,//\n PARAM_MODEL, DEFAULT_MODEL_NAME);\n\n // test\n for (String goldLabel : new String[] { LABEL_INSIDE... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PrintStates.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(PrintStates.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "LABEL_IN... | {
"body": "public void process(JCas jCas) throws AnalysisEngineProcessException {\n\n try {\n for (DocumentBlock block : select(jCas, DocumentBlock.class)) {\n String label = classify(block.getCoveredText());\n if (label.equals(LABEL_INSIDE)) {\n bloc... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_12 | {
"fields": [
{
"declarator": "LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\";",
"type": "String",
... | {
"body": "@Test(expected = ParseException.class)\n public void testArgsFail() throws Exception {\n\n // \"because of: ERROR parsing 'args.pipeline' cannot compile and \"\n // + \"run '__java' parameter with value '1asfdafsd0\",\n Launcher.runPipeline(new File(TESTS_ROOT + \"laucher/args.pipel... | {
"fields": [
{
"declarator": "LOG = getLogger(Launcher.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Launcher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "OK_MESSAGE = \"Pipeline completed successf... | {
"body": "public static void runPipeline(File scriptFile, List<String> cliArgs)\n throws IOException, UIMAException, ParseException {\n if (!scriptFile.exists()) {\n throw new IOException(\"Script file does not exist (\"\n + scriptFile.getAbsolutePath() + \")\");\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_13 | {
"fields": [
{
"declarator": "LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\";",
"type": "String",
... | {
"body": "@Test(expected = IOException.class)\n public void testArgsFail2() throws Exception {\n // no file\n Launcher.runPipeline(new File(\"blablalba\"), new ArrayList<String>());\n }",
"class_method_signature": "LauncherTest.testArgsFail2()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "LOG = getLogger(Launcher.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Launcher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "OK_MESSAGE = \"Pipeline completed successf... | {
"body": "public static void runPipeline(File scriptFile, List<String> cliArgs)\n throws IOException, UIMAException, ParseException {\n if (!scriptFile.exists()) {\n throw new IOException(\"Script file does not exist (\"\n + scriptFile.getAbsolutePath() + \")\");\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_9 | {
"fields": [
{
"declarator": "LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\"",
"modifier": "public static final",
"original_string": "public static final String LAUNCHER_ROOT = BLUE_UIMA_ROOT\n + \"modules/bluima_scripting/\";",
"type": "String",
... | {
"body": "@Test\n public void testSimple() throws Exception {\n Launcher.main(new String[] { TESTS_ROOT + \"laucher/simple.pipeline\" });\n }",
"class_method_signature": "LauncherTest.testSimple()",
"constructor": false,
"full_signature": "@Test public void testSimple()",
"identifier": "testSimp... | {
"fields": [
{
"declarator": "LOG = getLogger(Launcher.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Launcher.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "OK_MESSAGE = \"Pipeline completed successf... | {
"body": "public static void main(String[] args) throws IOException, UIMAException,\n ParseException {\n\n // no pipeline --> list and ask\n if (args == null || args.length == 0) {\n String home = System.getProperty(\"basedir\");\n listPipelinesAndAsk(new File(home + \"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_44 | {
"fields": [],
"file": "modules/bluima_mongodb/src/test/java/ch/epfl/bbp/uima/mongo/MongoUtilsTest.java",
"identifier": "MongoUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQueryFlag() throws Exception {\n String[] conn = MongoTest.getTestConn(\"MongoAddFlag\");\n\n MongoConnection mongo = new MongoConnection(conn);\n MongoUtils.addFlag(17, \"blih\", mongo);\n MongoUtils.addFlag(18, \"blih\", mongo);\n MongoUtils.a... | {
"fields": [],
"file": "modules/bluima_mongodb/src/main/java/ch/epfl/bbp/uima/mongo/MongoUtils.java",
"identifier": "MongoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MongoUtils.addFlag(int pmid, String flag, MongoConnection mongo)",
"constructor": false,
"full_si... | {
"body": "public static void addFlag(int pmid, String flag, MongoConnection mongo) {\n BasicDBObject updateQuery = new BasicDBObject(ID, pmid + \"\");\n BasicDBObject fList = new BasicDBObject(MongoFieldMapping.FILTER,\n new BasicDBObject(flag, 1));\n mongo.coll.update(updateQuery... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_105 | {
"fields": [],
"file": "utils/mallet_utils/src/test/java/cc/mallet/pipe/tsf/transform/CommonNerTokenTransformersTest.java",
"identifier": "CommonNerTokenTransformersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMorphologyUpperLowerNumberNonContiguousTransformer() {\n\t\tTokenTransformer transformer = \n\t\t\t\tCommonNerTokenTransformers.getMorphologyUpperLowerNumberNonContiguousTransformer();\n\t\t\n\t\tassertEquals(\"\", transformer.transform(\"\"));\n\t\tassertEquals(\"a\", transformer.... | {
"fields": [
{
"declarator": "ToLowerCaseTransformer = new TokenTransformer() {\t\t\n\t\t@Override\n\t\tpublic String transform(String token) {\n\t\t\treturn token.toLowerCase();\t\t\t\n\t\t}\n\t}",
"modifier": "private static final",
"original_string": "private static final TokenTransformer To... | {
"body": "public static TokenTransformer getMorphologyUpperLowerNumberNonContiguousTransformer() {\n\t\treturn morphologyUpperLowerNumberNonContiguous;\n\t}",
"class_method_signature": "CommonNerTokenTransformers.getMorphologyUpperLowerNumberNonContiguousTransformer()",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_52 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/ae/relations/WriteCoocurrencesToLoadfile2Test.java",
"identifier": "WriteCoocurrencesToLoadfile2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAE() throws Exception {\n\n JCas jCas = FilterCoocurrencesByDistanceTest.doTest(5);\n assertTrue(\"one cooc, distance ok\", exists(jCas, Cooccurrence.class));\n\n String ouputFile = \"target/WriteCoocurrencesToLoadfile2Test_\"\n + currentTimeMi... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(WriteCoocurrencesToLoadfile2.class);",
"type": "Logger",
... | {
"body": "@Override\n public void collectionProcessComplete()\n throws AnalysisEngineProcessException {\n super.collectionProcessComplete();\n try {\n writer.close();\n } catch (IOException e) {\n throw new AnalysisEngineProcessException(e);\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_113 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/io/TsvUtilsTest.java",
"identifier": "TsvUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n\n Map<Integer, String> map = TsvUtils.loadIntString(\n TsvUtils.class.getResourceAsStream(\"TsvUtils_int_string.tsv\"),\n false);\n assertEquals(3, map.size());\n assertEquals(\"bb\", map.get(2));\n ... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/io/TsvUtils.java",
"identifier": "TsvUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "TsvUtils.loadIntString(InputStream is,\n boolean hasHeader)",
"constructor": false,
"full_signature": ... | {
"body": "public static Map<Integer, String> loadIntString(InputStream is,\n boolean hasHeader) throws IOException {\n Map<Integer, String> map = new HashMap<Integer, String>();\n for (List<String> line : new TSVReader(is, hasHeader)) {\n map.put(parseInt(line.get(0)), line.get(1)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_91 | {
"fields": [],
"file": "modules/bluima_text2pmid/src/test/java/ch/epfl/bbp/uima/txt2pmid/Txt2PubmedIdTest.java",
"identifier": "Txt2PubmedIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractFromLabPeople() throws IOException {\n\n String index = Txt2PubmedIdIndexer.INDEX_PATH;\n String base = \"/Users/richarde/Desktop/people/\";\n String out = \"/Users/richarde/Desktop/people_extracted/\";\n\n for (String user : new File(base).list... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Txt2PubmedId.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(Txt2PubmedId.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "HIGH_C... | {
"body": "public PmId extract(File pdfF) {\n\t\ttry {\n\t\t\t// parse pdf\n\t\t\tJCas jCas = JCasFactory.createJCas();\n\t\t\tPDFTextStream pdf = new PDFTextStream(pdfF);\n\t\t\tBlockHandler blueHandler = new BlockHandler();\n\t\t\tpdf.pipe(blueHandler);\n\t\t\tPdfCollectionReader.extractText(jCas, blueHandler.getDo... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_29 | {
"fields": [],
"file": "modules/bluima_pdf/src/test/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patchTest.java",
"identifier": "diff_match_patchTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @Ignore\n // TODO fails diff_match_patchTest.testRefs:24 Pattern too long for this\n // application.\n public void testRefs() {\n assertEquals(\n 10,\n diff_match_patch\n .match_main(\n //\n ... | {
"fields": [
{
"declarator": "Diff_Timeout = 1.0f",
"modifier": "private",
"original_string": "private float Diff_Timeout = 1.0f;",
"type": "float",
"var_name": "Diff_Timeout"
},
{
"declarator": "Diff_EditCost = 4",
"modifier": "private",
"original_string":... | {
"body": "public static int match_main(String text, String pattern, int loc) {\n // Check for null inputs.\n if (text == null || pattern == null) {\n throw new IllegalArgumentException(\"Null inputs. (match_main)\");\n }\n\n loc = Math.max(0, Math.min(loc, text.length()));\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_87 | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelperTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "haystack = \"T... | {
"body": "@Test\n public void testSimilarity() {\n\n Map<Integer, String> haystack = newHashMap();\n haystack.put(\n 1,\n \"This is a remarkably good book on graphical models. Filled with lots of examples and really takes its time trying to build intuition. Seriously, c... | {
"fields": [
{
"declarator": "LOG = getLogger(LuceneHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(LuceneHelper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "CONTENT_FIELD = \"text... | {
"body": "public static Map<Integer, Float> computeSimilarity(\n final Map<Integer, String> corpus, String needle, int gramLength) {\n\n if (corpus == null || corpus.isEmpty() || needle == null\n || needle.length() == 0)\n return null;\n\n try {\n // inde... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_68 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testCantDeleteSomethingThatDoesntExist() {\n RadixTreeImpl<String> trie = new RadixTreeImpl<String>();\n assertFalse(trie.delete(\"apple\"));\n }",
"class_method_signature": "RadixTreeImplTest.testCantDeleteSomethingThatDoesntExist()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public boolean delete(String key) {\n Visitor<T, Boolean> visitor = new VisitorImpl<T, Boolean>(Boolean.FALSE) {\n public void visit(String key, RadixTreeNode<T> parent,\n RadixTreeNode<T> node) {\n result = node.isReal();\n\n // if it is a... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_5 | {
"fields": [],
"file": "modules/bluima_xml/src/test/java/ch/epfl/bbp/uima/xml/NeuronamesXmlParserTest.java",
"identifier": "NeuronamesXmlParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n Map<String, Concept> nn = NeuronamesXmlParser.parse();\n assertEquals(2861, nn.size());\n\n Concept brain = nn.get(\"brain\");\n assertNotNull(brain);\n assertEquals(5, brain.getVariants().size());\n }",
"class_metho... | {
"fields": [],
"file": "modules/bluima_xml/src/main/java/ch/epfl/bbp/uima/xml/NeuronamesXmlParser.java",
"identifier": "NeuronamesXmlParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "NeuronamesXmlParser.parse()",
"constructor": false,
"full_signature": "public static ... | {
"body": "public static Map<String, Concept> parse() throws JDOMException,\n\t\t\tIOException {\n\t\treturn parse(new File(XmlHelper.XML_RESOURCES\n\t\t\t\t+ \"neuronames/NeuroNames.xml\"));\n\t}",
"class_method_signature": "NeuronamesXmlParser.parse()",
"constructor": false,
"full_signature": "public static M... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_48 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/io/DirectoryIteratorTest.java",
"identifier": "DirectoryIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefault() throws Exception {\n\n File dir = Resources.getFile(\"directoryIterator/default\");\n Iterator<File> it = DirectoryIterator.get(\n DefaultDirectoryIterator.class.getSimpleName(), dir, null,\n false);\n ArrayList<File> l... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(DirectoryIterator.class)",
"modifier": "protected static",
"original_string": "protected static Logger LOG = LoggerFactory\n .getLogger(DirectoryIterator.class);",
"type": "Logger",
"var_name": "LOG... | {
"body": "public static Iterator<File> get(String directoryIteratorType, File dir,\n String extensionFilter, boolean recursive) throws IOException {\n\n try {\n // add package name to e.g. \"DefaultDirectoryIterator\"\n if (directoryIteratorType.indexOf('.') == -1) {\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_109 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/HistogramTest.java",
"identifier": "HistogramTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAdd() throws Exception {\n\n Histogram<String> h = new Histogram<String>();\n h.add(\"a\", 10);\n h.add(\"b\", 100);\n h.add(\"c\", 1000);\n\n Histogram<String> h2 = new Histogram<String>();\n h2.add(\"a\", 1);\n h2.add(\"b\", 2);\... | {
"fields": [
{
"declarator": "map = new HashMap<T, Long>()",
"modifier": "",
"original_string": "Map<T, Long> map = new HashMap<T, Long>();",
"type": "Map<T, Long>",
"var_name": "map"
}
],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/Histogram.java",
"identifier":... | {
"body": "public void add(T value) {\n if (value == null)\n return;\n\n if (map.containsKey(value)) {\n map.put(value, map.get(value) + 1);\n } else {\n map.put(value, 1l);\n }\n }",
"class_method_signature": "Histogram.add(T value)",
"constructor":... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_72 | {
"fields": [
{
"declarator": "trie",
"modifier": "",
"original_string": "RadixTreeImpl<String> trie;",
"type": "RadixTreeImpl<String>",
"var_name": "trie"
}
],
"file": "modules/bluima_utils/src/test/java/ds/tree/RadixTreeImplTest.java",
"identifier": "RadixTreeImplTest",
... | {
"body": "@Test\n public void testGetSize() {\n trie.insert(\"apple\", \"apple\");\n trie.insert(\"appleshack\", \"appleshack\");\n trie.insert(\"appleshackcream\", \"appleshackcream\");\n trie.insert(\"applepie\", \"applepie\");\n trie.insert(\"ape\", \"ape\");\n \n ... | {
"fields": [
{
"declarator": "root",
"modifier": "protected",
"original_string": "protected RadixTreeNode<T> root;",
"type": "RadixTreeNode<T>",
"var_name": "root"
},
{
"declarator": "size",
"modifier": "protected",
"original_string": "protected long size;"... | {
"body": "public long getSize() {\n return size;\n }",
"class_method_signature": "RadixTreeImpl.getSize()",
"constructor": false,
"full_signature": "public long getSize()",
"identifier": "getSize",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_25 | {
"fields": [
{
"declarator": "LOG = getLogger(PdfCollectionReaderTest.class)",
"modifier": "",
"original_string": "Logger LOG = getLogger(PdfCollectionReaderTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_pdf/src/test/java/ch/epfl/bbp/uima/pdf... | {
"body": "@Test\n @Ignore\n // TODO fails\n public void tesTextractReferencesNaively() throws Exception {\n assertFalse(extractReferencesNaively(getTestCas(\"no\\nrefs\\nhere\")));\n assertTrue(extractReferencesNaively(getTestCas(\"some\\nReferences\\nhere\")));\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(PdfCollectionReader.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory\n .getLogger(PdfCollectionReader.class);",
"type": "Logger",
"var_name": "LOG... | {
"body": "static boolean extractReferencesNaively(JCas jCas) {\n\n // match potential sections\n List<Section> sections = newArrayList();\n Matcher m = REFERENCES.matcher(jCas.getDocumentText());\n while (m.find()) {\n Section section = new Section(jCas, m.start(), m.end());\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_33 | {
"fields": [],
"file": "modules/bluima_commons/src/test/java/ch/epfl/bbp/uima/ae/BioLemmatizerNormalizerAnnotatorTest.java",
"identifier": "BioLemmatizerNormalizerAnnotatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNonTokensIncluded() throws Exception{\n JCas jCas = UimaTests.getTestCas(\"is regulated\");\n\n Measure m = createAnnot(jCas, Measure.class, 0, 1);\n Keep k = createAnnot(jCas, Keep.class, 0, 1);\n k.setEnclosedAnnot(m);\n k.setNormalizedText(\"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory\n .getLogger(BioLemmatizerNormalizerAnnotator.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory\n .getLogger(BioLemmatizerNormalizerAnnotator.class);",
"type": "Logge... | {
"body": "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n\n for (Keep k : select(jCas, Keep.class)) {\n\n Annotation a = k.getEnclosedAnnot(); \n String normalized = null;\n \n // sometimes, Tokens already have a lemma form,... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_125 | {
"fields": [],
"file": "utils/blue_commons/src/test/java/ch/epfl/bbp/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testKeyOfHighestValues() {\n\n Map<String, Double> mapp = new HashMap<String, Double>();\n mapp.put(\"s3.5\", 3.5);\n mapp.put(\"s1.5\", 1.5);\n mapp.put(\"s0.5\", 0.5);\n mapp.put(\"s0.6\", 0.6);\n mapp.put(\"2s3.5\", 3.5);\n mapp.put... | {
"fields": [],
"file": "utils/blue_commons/src/main/java/ch/epfl/bbp/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.keyOfHighestValue(Map<K, V> map)",
"constructor": false,
"full_signature": "public static K keyOfHighestVal... | {
"body": "public static <K, V extends Comparable<V>> LinkedHashMap<K, V> keysOfHighestValues(\n Map<K, V> map, int topN) {\n return keysOfHighestValues(map, topN, true);\n }",
"class_method_signature": "MapUtils.keysOfHighestValues(\n Map<K, V> map, int topN)",
"constructor": fals... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_64 | {
"fields": [],
"file": "modules/bluima_utils/src/test/java/ch/epfl/bbp/uima/word2vec/Word2VecUtilsTest.java",
"identifier": "Word2VecUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() {\n assertNotNull(Word2VecUtils.getWordVector(\"brain\"));\n assertNotNull(Word2VecUtils.getWordVector(\"thalamic\"));\n\n }",
"class_method_signature": "Word2VecUtilsTest.test()",
"constructor": false,
"full_signature": "@Test public void test()",
"id... | {
"fields": [
{
"declarator": "LOG = getLogger(Word2VecUtils.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(Word2VecUtils.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "MODEL_FILE = \"/Users/richarde/d... | {
"body": "public static float[] getWordVector(String word) {\n return w2v.getWordVector(word.toLowerCase());\n }",
"class_method_signature": "Word2VecUtils.getWordVector(String word)",
"constructor": false,
"full_signature": "public static float[] getWordVector(String word)",
"identifier": "getWord... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_80 | {
"fields": [
{
"declarator": "LOG = getLogger(LexicaHelperTest.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = getLogger(LexicaHelperTest.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "modules/bluima_lexica/src/test/java/ch... | {
"body": "@Test\n public void testBrainregions() throws Exception {\n\n String[] brs = { \"bams2004\", \"bams2013\", \"dong\", \"hof\", \"paxinos\",\n \"swanson\", \"neuronames\" };\n for (String br : brs) {\n\n JCas jCas = getTokenizedTestCas(\"with claustrum and\");\n ... | {
"fields": [
{
"declarator": "LEXICA_ROOT = BlueUima.BLUE_UIMA_ROOT\n + \"modules/bluima_lexica/\"",
"modifier": "public final static",
"original_string": "public final static String LEXICA_ROOT = BlueUima.BLUE_UIMA_ROOT\n + \"modules/bluima_lexica/\";",
"type": "Str... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static AnalysisEngineDescription getConceptMapper(String path,\n String[] args) throws UIMAException, IOException, SAXException {\n\n String conceptMapper = LEXICA_ROOT + \"desc/\" + path\n + \"ConceptMapper.xml\";\n if (!... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
23831132_38 | {
"fields": [],
"file": "modules/bluima_commons/src/test/java/ch/epfl/bbp/uima/ae/LinnaeusAnnotatorTest.java",
"identifier": "LinnaeusAnnotatorTest",
"interfaces": "",
"superclass": "extends TestWithBluimaResource"
} | {
"body": "@Test\n public void test() throws Exception {\n String file = \"/linnaeus/pmcA1239921.txt\";\n InputStream stream = getClass().getResourceAsStream(file);\n String testtext = IOUtils.toString(stream);\n\n JCas jCas = getTestCas(testtext);\n\n createLinnaeusEngine().proc... | {
"fields": [
{
"declarator": "matcher",
"modifier": "private",
"original_string": "private Matcher matcher;",
"type": "Matcher",
"var_name": "matcher"
},
{
"declarator": "logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)",
"modifier": "private",
"origina... | {
"body": "@Override\n public void process(JCas cas) throws AnalysisEngineProcessException {\n\n String text = cas.getDocumentText();\n List<Mention> mentions = matcher.match(text);\n for (Mention mention : mentions) {\n\n String mostProbableID = mention.getMostProbableID();\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23831132,
"size": 220469,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/BlueBrain/bluima"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.