id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
43734923_90 | {
"fields": [
{
"declarator": "log = Logger.getLogger(CopyToolTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CopyToolTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "IS_MOCK ... | {
"body": "@Test\n public void testCopyTool() throws Exception {\n final RyaStatement ryaStatementOutOfTimeRange = createRyaStatement(\"coach\", \"called\", \"timeout\", LAST_MONTH);\n\n final RyaStatement ryaStatementShouldCopy1 = createRyaStatement(\"bob\", \"catches\", \"ball\", YESTERDAY);\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CopyTool.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CopyTool.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "COPY_TABLE_LIST_... | {
"body": "public AccumuloInstanceDriver getChildAccumuloInstanceDriver() {\n return childAccumuloInstanceDriver;\n }",
"class_method_signature": "CopyTool.getChildAccumuloInstanceDriver()",
"constructor": false,
"full_signature": "public AccumuloInstanceDriver getChildAccumuloInstanceDriver()",
"id... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_235 | {
"fields": [],
"file": "extras/rya.prospector/src/test/java/org/apache/rya/prospector/mr/ProspectorTest.java",
"identifier": "ProspectorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCount() throws Exception {\n // Load some data into a mock Accumulo and run the Prospector MapReduce job.\n final Instance mock = new MockInstance(\"accumulo\");\n\n final Connector connector = mock.getConnector(\"user\", new PasswordToken(\"pass\"));\n ... | {
"fields": [
{
"declarator": "NOW = System.currentTimeMillis()",
"modifier": "private static",
"original_string": "private static long NOW = System.currentTimeMillis();",
"type": "long",
"var_name": "NOW"
},
{
"declarator": "truncatedDate",
"modifier": "private",... | {
"body": "@Override\n public int run(String[] args) throws Exception {\n final Configuration conf = getConf();\n\n truncatedDate = DateUtils.truncate(new Date(NOW), Calendar.MINUTE);\n\n final Path configurationPath = new Path(args[0]);\n conf.addResource(configurationPath);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_370 | {
"fields": [
{
"declarator": "INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS =\n ImmutableList.of(\n Pair.of(\"A\", \"A\"),\n Pair.of(\"A&B\", \"A&B\"),\n Pair.of(\"A|B\", \"A|B\"),\n Pair.of(\"A&(B|C)\", \"(A&B)|(A&C)\"),\n Pair.of(\"A|(B&C)\", \"A|(B&... | {
"body": "@Test\n public void testConvertToDnf() {\n for (final Pair<String, String> pair : INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS) {\n final String input = pair.getLeft();\n final String expected = pair.getRight();\n\n final DocumentVisibility inputDv = new DocumentVisibil... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DisjunctiveNormalFormConverter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DisjunctiveNormalFormConverter.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "public static DocumentVisibility convertToDisjunctiveNormalForm(final DocumentVisibility documentVisibility) {\n // Find all the terms used in the expression\n final List<String> terms = findNodeTerms(documentVisibility.getParseTree(), documentVisibility.getExpression());\n // Create a... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_28 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java",
"identifier": "RyaCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSparqlQuery() throws InstanceDoesNotExistException, RyaClientException, IOException {\n // Mock the object that performs the create operation.\n final String instanceName = \"unitTest\";\n final String queryFile = \"src/test/resources/Query1.sparql\";\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaCommands.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@CliCommand(value = SPARQL_QUERY_CMD, help = \"Executes the provided SPARQL Query on the connected Rya instance.\")\n public String sparqlQuery(\n @CliOption(key = { \"file\" }, mandatory = false, help = \"A local file containing the SPARQL Query that is to be read and executed.\")\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_262 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "adapter... | {
"body": "@Test\n public void equalsInstantAfterInterval_GeoTemporalOneEach() throws Exception {\n final String query =\n \"PREFIX time: <http://www.w3.org/2006/time#> \\n\"\n + \"PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \\n\"\n + \"PREFIX geo: <http://www.ope... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public Document getFilterQuery(final Collection<IndexingExpr> geoFilters, final Collection<IndexingExpr> temporalFilters) throws GeoTemporalIndexException {\n final QueryBuilder builder = QueryBuilder.start();\n if(!geoFilters.isEmpty()) {\n final Document[] geo = getGeoObjs(geoFil... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_327 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LANGUAG... | {
"body": "@Test\n public void testConvertLiteral_normalString() {\n final String expectedData = \"Hello\";\n final Literal literal = VF.createLiteral(expectedData);\n final RyaType ryaType = RdfToRyaConversions.convertLiteral(literal);\n assertEquals(XMLSchema.STRING, ryaType.getDataTy... | {
"fields": [
{
"declarator": "log = Logger.getLogger(RdfToRyaConversions.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(RdfToRyaConversions.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "common... | {
"body": "public static RyaType convertLiteral(final Literal literal) {\n if (literal == null) {\n return null;\n }\n if (literal.getDatatype() != null) {\n if (Literals.isLanguageLiteral(literal)) {\n final String language = literal.getLanguage().get();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_274 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.pcj.fluo... | {
"body": "@Test\n public void testConstructGraph() throws MalformedQueryException, UnsupportedEncodingException {\n String query = \"select ?x where { ?x <uri:talksTo> <uri:Bob>. ?y <uri:worksAt> ?z }\";\n\n SPARQLParser parser = new SPARQLParser();\n ParsedQuery pq = parser.parseQuery(query,... | {
"fields": [
{
"declarator": "projections",
"modifier": "private",
"original_string": "private Set<ConstructProjection> projections;",
"type": "Set<ConstructProjection>",
"var_name": "projections"
},
{
"declarator": "bNodeNames",
"modifier": "private",
"ori... | {
"body": "public ConstructGraph(Set<ConstructProjection> projections) {\n Preconditions.checkNotNull(projections);\n Preconditions.checkArgument(projections.size() > 0);\n this.projections = projections;\n this.bNodeNames = getBNodeNames(projections);\n }",
"class_method_signature": ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_331 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LANGUAG... | {
"body": "@Test\n public void testConvertLiteral_undeterminedLanguage() {\n final String expectedData = \"Hello\";\n final String language = LiteralLanguageUtils.UNDETERMINED_LANGUAGE;\n assertTrue(Literals.isValidLanguageTag(language));\n final RyaType ryaType = new RyaType(RDF.LANGST... | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "common/rya.api/src/... | {
"body": "public static Literal convertLiteral(final RyaType ryaType) {\n if (XMLSchema.STRING.equals(ryaType.getDataType())) {\n return VF.createLiteral(ryaType.getData());\n } else if (RDF.LANGSTRING.equals(ryaType.getDataType())) {\n final String data = ryaType.getData();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_86 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void fromString_varOrderTooLong() throws BindingSetConversionException {\n // Setup the String that will be converted.\n final String bindingSetString =\n \"http://a<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::\" +\... | {
"fields": [
{
"declarator": "BINDING_DELIM = \":::\"",
"modifier": "public static final",
"original_string": "public static final String BINDING_DELIM = \":::\";",
"type": "String",
"var_name": "BINDING_DELIM"
},
{
"declarator": "TYPE_DELIM = \"<<~>>\"",
"modifi... | {
"body": "@Override\n public String convert(final BindingSet bindingSet, final VariableOrder varOrder) {\n requireNonNull(bindingSet);\n requireNonNull(varOrder);\n\n // Convert each Binding to a String.\n final List<String> bindingStrings = new ArrayList<>();\n for(final String... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_69 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test\n\tpublic void basicShortMixLiteralBsTest() throws BindingSetConversionException {\n\t\tfinal QueryBindingSet bs = new QueryBindingSet();\n\t\tbs.addBinding(\"X\",VF.createLiteral(\"literal1\"));\n\t\tbs.addBinding(\"Y\",VF.createLiteral(\"5\", VF.createIRI(\"http://www.w3.org/2001/XMLSchema#integer\... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/AccumuloPcjSerializer.java",
"identifier": "AccumuloPcjSerializer",
"interfaces": "implements BindingSetConverter<byte[]>",
"methods": [
{
"class_method_signature": "AccumuloPcjSerializer.conv... | {
"body": "@Override\n public byte[] convert(BindingSet bindingSet, VariableOrder varOrder) throws BindingSetConversionException {\n checkNotNull(bindingSet);\n checkNotNull(varOrder);\n\n // A list that holds all of the byte segments that will be concatenated at the end.\n // This mini... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_389 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LUBM = ... | {
"body": "@Test\n public void testRequireSourceTimestamp() {\n final AggregationPipelineQueryNode base = new AggregationPipelineQueryNode(\n collection,\n new LinkedList<>(),\n Sets.newHashSet(\"x\", \"y\"),\n Sets.newHashSet(\"x\", \"y\", \"opt\"... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "VALUES = \"<VALUES>\"",
"modifier":... | {
"body": "public void requireSourceTimestamp(final long t) {\n pipeline.add(Aggregates.match(Filters.gte(TIMESTAMP, t)));\n }",
"class_method_signature": "AggregationPipelineQueryNode.requireSourceTimestamp(final long t)",
"constructor": false,
"full_signature": "public void requireSourceTimestamp(fi... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_223 | {
"fields": [
{
"declarator": "accumuloConn = null",
"modifier": "protected static",
"original_string": "protected static Connector accumuloConn = null;",
"type": "Connector",
"var_name": "accumuloConn"
},
{
"declarator": "ryaRepo = null",
"modifier": "protected",... | {
"body": "@Test\n public void accumuloIndexSetTestWithNoBindingSet() throws RepositoryException, PcjException, TableNotFoundException,\n RyaTypeResolverException, MalformedQueryException, SailException, QueryEvaluationException, AccumuloException, AccumuloSecurityException {\n // Load some Triples into ... | {
"fields": [
{
"declarator": "accCon",
"modifier": "private final",
"original_string": "private final Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n\tpublic CloseableIteration<BindingSet, QueryEvaluationException> evaluate(\n\t\t\tfinal BindingSet bindingset) throws QueryEvaluationException {\n\t\treturn this.evaluate(Collections.singleton(bindingset));\n\t}",
"class_method_signature": "AccumuloIndexSet.evaluate(\n\t\t\tfinal BindingSet b... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_5 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java",
"identifier": "RyaDetailsFormatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void format_accumulo() {\n // This test failed if the default timezone was not EST, so now it's fixed at EST.\n TimeZone.setDefault(TimeZone.getTimeZone(\"America/New_York\"));\n // Create the object that will be formatted.\n final RyaDetails details = RyaDetai... | {
"fields": [],
"file": "extras/shell/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java",
"identifier": "RyaDetailsFormatter",
"interfaces": "",
"methods": [
{
"class_method_signature": "RyaDetailsFormatter.format(final StorageType storageType, final RyaDetails details)",
"const... | {
"body": "public String format(final StorageType storageType, final RyaDetails details) {\n requireNonNull(details);\n\n final StringBuilder report = new StringBuilder();\n\n report.append(\"General Metadata:\\n\");\n report.append(\" Instance Name: \").append(details.getRyaInstanceName(... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_366 | {
"fields": [
{
"declarator": "INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS =\n ImmutableList.of(\n Pair.of(\"A\", \"A\"),\n Pair.of(\"A&B\", \"A&B\"),\n Pair.of(\"A|B\", \"A|B\"),\n Pair.of(\"A&(B|C)\", \"(A&B)|(A&C)\"),\n Pair.of(\"A|(B&C)\", \"A|(B&... | {
"body": "@Test\n public void testTruthTableSize() {\n final byte[][] truthTable = DisjunctiveNormalFormConverter.createTruthTableInputs(0);\n final byte[][] expected =\n {\n {}\n };\n assertArrayEquals(expected, truthTable);\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DisjunctiveNormalFormConverter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DisjunctiveNormalFormConverter.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "public static byte[][] createTruthTableInputs(final Node node, final byte[] expression) {\n final List<String> terms = findNodeTerms(node, expression);\n return createTruthTableInputs(terms);\n }",
"class_method_signature": "DisjunctiveNormalFormConverter.createTruthTableInputs(final Nod... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_171 | {
"fields": [
{
"declarator": "provider",
"modifier": "private final",
"original_string": "private final AbstractPcjIndexSetProvider provider;",
"type": "AbstractPcjIndexSetProvider",
"var_name": "provider"
}
],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/I... | {
"body": "@Test\n public void testEvaluateTwoIndexTwoVarOrder1()\n throws Exception {\n\n\n final String indexSparqlString = \"\"//\n + \"SELECT ?c ?e ?l \" //\n + \"{\" //\n + \" ?e a ?c . \"//\n + \" ?e <http://www.w3.org/2000/01/r... | {
"fields": [
{
"declarator": "omitCrossProd = false",
"modifier": "private",
"original_string": "private boolean omitCrossProd = false;",
"type": "boolean",
"var_name": "omitCrossProd"
}
],
"file": "extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/Ind... | {
"body": "@Override\n public boolean isValid(TupleExpr te) {\n\n TupleValidateVisitor tv = new TupleValidateVisitor();\n te.visit(tv);\n\n return tv.isValid();\n }",
"class_method_signature": "IndexPlanValidator.isValid(TupleExpr te)",
"constructor": false,
"full_signature": "@Overri... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_12 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaStreamsCommandsTest.java",
"identifier": "RyaStreamsCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void addQuery_doNotInsertQuery() throws Exception {\n // Mock the object that performs the rya streams operation.\n final RyaStreamsClient mockClient = mock(RyaStreamsClient.class);\n final AddQuery addQuery = mock(AddQuery.class);\n when(mockClient.getAddQuery... | {
"fields": [
{
"declarator": "STREAMS_CONFIGURE_CMD = \"streams-configure\"",
"modifier": "public static final",
"original_string": "public static final String STREAMS_CONFIGURE_CMD = \"streams-configure\";",
"type": "String",
"var_name": "STREAMS_CONFIGURE_CMD"
},
{
"... | {
"body": "@CliCommand(value = STREAM_QUERIES_ADD_CMD, help = \"Add a SPARQL query to the Rya Streams subsystem.\")\n public String addQuery(\n @CliOption(key = {\"inactive\"}, mandatory = false, unspecifiedDefaultValue = \"false\", specifiedDefaultValue = \"true\",\n help = \"Sett... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_258 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "adapter... | {
"body": "@Test\n public void equalsInstantAfterInterval_onlyOneGeo() throws Exception {\n final String query =\n \"PREFIX geo: <http://www.opengis.net/ont/geosparql#>\"\n + \"PREFIX geof: <http://www.opengis.net/def/function/geosparql/>\"\n + \"SELECT ?point ?wkt \"\n + \"WHE... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public Document getFilterQuery(final Collection<IndexingExpr> geoFilters, final Collection<IndexingExpr> temporalFilters) throws GeoTemporalIndexException {\n final QueryBuilder builder = QueryBuilder.start();\n if(!geoFilters.isEmpty()) {\n final Document[] geo = getGeoObjs(geoFil... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_45 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java",
"identifier": "RyaAdminCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void install() throws DuplicateInstanceNameException, RyaClientException, IOException {\n // Mock the object that performs the install operation.\n final Install mockInstall = mock(Install.class);\n\n final RyaClient mockCommands = mock(RyaClient.class);\n when... | {
"fields": [
{
"declarator": "CREATE_PCJ_CMD = \"create-pcj\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_PCJ_CMD = \"create-pcj\";",
"type": "String",
"var_name": "CREATE_PCJ_CMD"
},
{
"declarator": "CREATE_PERIODIC_PCJ_C... | {
"body": "@CliCommand(value = INSTALL_CMD, help = \"Create a new instance of Rya interactively.\")\n public String install() {\n // Fetch the commands that are connected to the store.\n final RyaClient commands = state.getShellState().getConnectedCommands().get();\n\n String instanceName = nu... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_126 | {
"fields": [
{
"declarator": "accCon",
"modifier": "private",
"original_string": "private Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename = \"table\"",
"modifier": "",
"original_string": "String tablename = \"tabl... | {
"body": "@Test\n public void testBasicColumnObj() throws Exception {\n\n BatchWriter bw = null;\n\n bw = accCon.createBatchWriter(tablename, 500L * 1024L * 1024L, Long.MAX_VALUE, 30);\n\n for (int i = 0; i < 100; i++) {\n\n Mutation m = new Mutation(new Text(\"\" + i));\n ... | {
"fields": [
{
"declarator": "nullText = new Text()",
"modifier": "protected",
"original_string": "protected Text nullText = new Text();",
"type": "Text",
"var_name": "nullText"
},
{
"declarator": "log = Logger.getLogger(DocumentIndexIntersectingIterator.class)",
... | {
"body": "public static void setColumnFamilies(IteratorSetting cfg, TextColumn[] columns) {\n if (columns.length < 2)\n throw new IllegalArgumentException(\"Must supply at least two terms to intersect\");\n \n boolean[] prefix = new boolean[columns.length];\n \n for(int i = 0; i < columns.length;... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_130 | {
"fields": [
{
"declarator": "accCon",
"modifier": "private",
"original_string": "private Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename = \"table\"",
"modifier": "",
"original_string": "String tablename = \"tabl... | {
"body": "@Test\n public void testOneHundredColumnObjPrefix() throws Exception {\n\n BatchWriter bw = null;\n\n bw = accCon.createBatchWriter(tablename, 500L * 1024L * 1024L, Long.MAX_VALUE, 30);\n\n for (int i = 0; i < 100; i++) {\n\n Mutation m = new Mutation(new Text(\"\" + i));... | {
"fields": [
{
"declarator": "nullText = new Text()",
"modifier": "protected",
"original_string": "protected Text nullText = new Text();",
"type": "Text",
"var_name": "nullText"
},
{
"declarator": "log = Logger.getLogger(DocumentIndexIntersectingIterator.class)",
... | {
"body": "public static void setColumnFamilies(IteratorSetting cfg, TextColumn[] columns) {\n if (columns.length < 2)\n throw new IllegalArgumentException(\"Must supply at least two terms to intersect\");\n \n boolean[] prefix = new boolean[columns.length];\n \n for(int i = 0; i < columns.length;... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_53 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java",
"identifier": "RyaAdminCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void uninstall_no() throws Exception {\n // Mock the object that performs the Uninstall command.\n final Uninstall mockUninstall = mock(Uninstall.class);\n\n // Mock a prompt that says the user does want to uninstall it.\n final UninstallPrompt uninstallPrompt ... | {
"fields": [
{
"declarator": "CREATE_PCJ_CMD = \"create-pcj\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_PCJ_CMD = \"create-pcj\";",
"type": "String",
"var_name": "CREATE_PCJ_CMD"
},
{
"declarator": "CREATE_PERIODIC_PCJ_C... | {
"body": "@CliCommand(value = UNINSTALL_CMD, help = \"Uninstall an instance of Rya.\")\n public String uninstall() {\n // Fetch the command that is connected to the store.\n final ShellState shellState = state.getShellState();\n final RyaClient commands = shellState.getConnectedCommands().get... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_219 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/external/tupleSet/ParsedQueryUtilTest.java",
"identifier": "ParsedQueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void findProjection_projectionIsTopNode() throws MalformedQueryException {\n // A SPARQL query that will result in the Projection node being the top node.\n String sparql =\n \"SELECT ?a ?b \" +\n \"WHERE {\" +\n \"?a <http://... | {
"fields": [],
"file": "extras/indexing/src/main/java/org/apache/rya/indexing/external/tupleSet/ParsedQueryUtil.java",
"identifier": "ParsedQueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ParsedQueryUtil.findProjection(final ParsedQuery query)",
"constructor": false,
... | {
"body": "public Optional<Projection> findProjection(final ParsedQuery query) {\n checkNotNull(query);\n\n // When a projection is encountered for the requested index, store it in atomic reference and quit searching.\n final AtomicReference<Projection> projectionRef = new AtomicReference<>();\n\... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_167 | {
"fields": [
{
"declarator": "q1 = \"\"//\n + \"SELECT ?s ?t ?u \" //\n + \"{\" //\n + \" ?s a ?t .\"//\n + \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n + \" ?u <uri:talksTo> ?s . \"//\n + \"}\"",
"modifier": "priva... | {
"body": "@Test\n public void testThreeNodeOrderFilter() {\n\n SPARQLParser parser = new SPARQLParser();\n\n ParsedQuery pq1 = null;\n ParsedQuery pq2 = null;\n ParsedQuery pq3 = null;\n ParsedQuery pq4 = null;\n ParsedQuery pq5 = null;\n ParsedQuery pq6 = null;\n ... | {
"fields": [],
"file": "extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/TupleExecutionPlanGenerator.java",
"identifier": "TupleExecutionPlanGenerator",
"interfaces": "implements IndexTupleGenerator",
"methods": [
{
"class_method_signature": "TupleExecutionPlanGenerator.getP... | {
"body": "@Override\n public Iterator<TupleExpr> getPlans(final Iterator<TupleExpr> indexPlans) {\n\n final Iterator<TupleExpr> iter = indexPlans;\n\n return new Iterator<TupleExpr>() {\n\n private TupleExpr next = null;\n private boolean hasNextCalled = false;\n pri... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_188 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testSingleIndex() throws Exception {\n\n\t\tSPARQLParser parser = new SPARQLParser();\n\n\t\tParsedQuery pq1 = parser.parseQuery(q15, null);\n\t\tParsedQuery pq2 = parser.parseQuery(q7, null);\n\t\tParsedQuery pq3 = parser.parseQuery(q8, null);\n\t\tParsedQuery pq4 = parser.parseQuery(... | {
"fields": [
{
"declarator": "query",
"modifier": "private",
"original_string": "private TupleExpr query;",
"type": "TupleExpr",
"var_name": "query"
},
{
"declarator": "queryNodeCount = 0",
"modifier": "private",
"original_string": "private int queryNodeCou... | {
"body": "@Override\n public TupleExpr getThreshholdQueryPlan(Iterator<TupleExpr> tuples, double threshhold, double indexWeight,\n double commonVarWeight, double extProdWeight) {\n\n if (threshhold < 0 || threshhold > 1) {\n throw new IllegalArgumentException(\"Threshhold must be betw... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_166 | {
"fields": [
{
"declarator": "q1 = \"\"//\n + \"SELECT ?s ?t ?u \" //\n + \"{\" //\n + \" ?s a ?t .\"//\n + \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n + \" ?u <uri:talksTo> ?s . \"//\n + \"}\"",
"modifier": "priva... | {
"body": "@Test\n public void testThreeNodeOrder() {\n\n SPARQLParser parser = new SPARQLParser();\n\n ParsedQuery pq1 = null;\n ParsedQuery pq2 = null;\n ParsedQuery pq3 = null;\n ParsedQuery pq4 = null;\n ParsedQuery pq5 = null;\n ParsedQuery pq6 = null;\n\n ... | {
"fields": [],
"file": "extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/TupleExecutionPlanGenerator.java",
"identifier": "TupleExecutionPlanGenerator",
"interfaces": "implements IndexTupleGenerator",
"methods": [
{
"class_method_signature": "TupleExecutionPlanGenerator.getP... | {
"body": "@Override\n public Iterator<TupleExpr> getPlans(final Iterator<TupleExpr> indexPlans) {\n\n final Iterator<TupleExpr> iter = indexPlans;\n\n return new Iterator<TupleExpr>() {\n\n private TupleExpr next = null;\n private boolean hasNextCalled = false;\n pri... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_189 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testSingleIndex2() throws Exception {\n\n\t\tString q1 = \"\"//\n\t\t\t\t+ \"SELECT ?f ?m ?d ?e ?l ?c \" //\n\t\t\t\t+ \"{\" //\n\t\t\t\t+ \" ?f a ?m .\"//\n\t\t\t\t+ \" ?c a ?l .\"//\n\t\t\t\t+ \" ?d <uri:talksTo> ?f . \"//\n\t\t\t\t+ \" ?e <uri:talksTo> ?c . \"//\n\t\t\t\t+ \" ?... | {
"fields": [
{
"declarator": "query",
"modifier": "private",
"original_string": "private TupleExpr query;",
"type": "TupleExpr",
"var_name": "query"
},
{
"declarator": "queryNodeCount = 0",
"modifier": "private",
"original_string": "private int queryNodeCou... | {
"body": "@Override\n public TupleExpr getThreshholdQueryPlan(Iterator<TupleExpr> tuples, double threshhold, double indexWeight,\n double commonVarWeight, double extProdWeight) {\n\n if (threshhold < 0 || threshhold > 1) {\n throw new IllegalArgumentException(\"Threshhold must be betw... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_218 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/external/tupleSet/ParsedQueryUtilTest.java",
"identifier": "ParsedQueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void findProjection_distinctIsTopNode() throws MalformedQueryException {\n // A SPARQL query that uses the DISTINCT keyword.\n String sparql =\n \"SELECT DISTINCT ?a ?b \" +\n \"WHERE {\" +\n \"?a <http://talksTo> ?b\" +\n ... | {
"fields": [],
"file": "extras/indexing/src/main/java/org/apache/rya/indexing/external/tupleSet/ParsedQueryUtil.java",
"identifier": "ParsedQueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ParsedQueryUtil.findProjection(final ParsedQuery query)",
"constructor": false,
... | {
"body": "public Optional<Projection> findProjection(final ParsedQuery query) {\n checkNotNull(query);\n\n // When a projection is encountered for the requested index, store it in atomic reference and quit searching.\n final AtomicReference<Projection> projectionRef = new AtomicReference<>();\n\... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_131 | {
"fields": [
{
"declarator": "accCon",
"modifier": "private",
"original_string": "private Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename = \"table\"",
"modifier": "",
"original_string": "String tablename = \"tabl... | {
"body": "@Test\n public void testOneHundredColumnMultipleEntriesPerSubject() throws Exception {\n\n BatchWriter bw = null;\n\n bw = accCon.createBatchWriter(tablename, 500L * 1024L * 1024L, Long.MAX_VALUE, 30);\n\n for (int i = 0; i < 100; i++) {\n\n Mutation m = new Mutation(new ... | {
"fields": [
{
"declarator": "nullText = new Text()",
"modifier": "protected",
"original_string": "protected Text nullText = new Text();",
"type": "Text",
"var_name": "nullText"
},
{
"declarator": "log = Logger.getLogger(DocumentIndexIntersectingIterator.class)",
... | {
"body": "public static void setColumnFamilies(IteratorSetting cfg, TextColumn[] columns) {\n if (columns.length < 2)\n throw new IllegalArgumentException(\"Must supply at least two terms to intersect\");\n \n boolean[] prefix = new boolean[columns.length];\n \n for(int i = 0; i < columns.length;... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_52 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java",
"identifier": "RyaAdminCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void uninstall_yes() throws Exception {\n // Mock the object that performs the Uninstall command.\n final Uninstall mockUninstall = mock(Uninstall.class);\n\n // Mock a prompt that says the user does want to uninstall it.\n final UninstallPrompt uninstallPrompt... | {
"fields": [
{
"declarator": "CREATE_PCJ_CMD = \"create-pcj\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_PCJ_CMD = \"create-pcj\";",
"type": "String",
"var_name": "CREATE_PCJ_CMD"
},
{
"declarator": "CREATE_PERIODIC_PCJ_C... | {
"body": "@CliCommand(value = UNINSTALL_CMD, help = \"Uninstall an instance of Rya.\")\n public String uninstall() {\n // Fetch the command that is connected to the store.\n final ShellState shellState = state.getShellState();\n final RyaClient commands = shellState.getConnectedCommands().get... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_44 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java",
"identifier": "RyaAdminCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void deletePeriodicPCJ() throws InstanceDoesNotExistException, RyaClientException {\n // Mock the object that performs the delete operation.\n final DeletePeriodicPCJ mockDeletePCJ = mock(DeletePeriodicPCJ.class);\n\n final RyaClient mockCommands = mock(RyaClient.clas... | {
"fields": [
{
"declarator": "CREATE_PCJ_CMD = \"create-pcj\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_PCJ_CMD = \"create-pcj\";",
"type": "String",
"var_name": "CREATE_PCJ_CMD"
},
{
"declarator": "CREATE_PERIODIC_PCJ_C... | {
"body": "@CliCommand(value = DELETE_PERIODIC_PCJ_CMD, help = \"Deletes and halts maintenance of a Periodic PCJ.\")\n public String deletePeriodicPcj(\n @CliOption(key = {\"pcjId\"}, mandatory = true, help = \"The ID of the PCJ that will be deleted.\")\n final String pcjId,\n @Cli... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_127 | {
"fields": [
{
"declarator": "accCon",
"modifier": "private",
"original_string": "private Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename = \"table\"",
"modifier": "",
"original_string": "String tablename = \"tabl... | {
"body": "@Test\n public void testBasicColumnObjPrefix() throws Exception {\n\n BatchWriter bw = null;\n\n bw = accCon.createBatchWriter(tablename, 500L * 1024L * 1024L, Long.MAX_VALUE, 30);\n\n for (int i = 0; i < 100; i++) {\n\n Mutation m = new Mutation(new Text(\"\" + i));\n ... | {
"fields": [
{
"declarator": "nullText = new Text()",
"modifier": "protected",
"original_string": "protected Text nullText = new Text();",
"type": "Text",
"var_name": "nullText"
},
{
"declarator": "log = Logger.getLogger(DocumentIndexIntersectingIterator.class)",
... | {
"body": "public static void setColumnFamilies(IteratorSetting cfg, TextColumn[] columns) {\n if (columns.length < 2)\n throw new IllegalArgumentException(\"Must supply at least two terms to intersect\");\n \n boolean[] prefix = new boolean[columns.length];\n \n for(int i = 0; i < columns.length;... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_259 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "adapter... | {
"body": "@Test\n public void equalsInstantAfterInterval_onlyGeos() throws Exception {\n\n /*\n * TODO: change filter functions for coverage\n */\n\n\n final String query =\n \"PREFIX geo: <http://www.opengis.net/ont/geosparql#>\"\n + \"PREFIX geof: <http:... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public Document getFilterQuery(final Collection<IndexingExpr> geoFilters, final Collection<IndexingExpr> temporalFilters) throws GeoTemporalIndexException {\n final QueryBuilder builder = QueryBuilder.start();\n if(!geoFilters.isEmpty()) {\n final Document[] geo = getGeoObjs(geoFil... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_170 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testTwoIndexFilter2() throws Exception {\n\n\t\tString q18 = \"\"//\n\t\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t\t+ \"{\" //\n\t\t\t\t+ \" Filter(?s > 1 && ?t > 8).\" //\n\t\t\t\t+ \" ?s a ?t .\"//\n\t\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t\t+ \" ?... | {
"fields": [
{
"declarator": "queryConstantMap",
"modifier": "private",
"original_string": "private Map<String, Integer> queryConstantMap;",
"type": "Map<String, Integer>",
"var_name": "queryConstantMap"
},
{
"declarator": "querySpCount",
"modifier": "private",
... | {
"body": "@Override\n\tpublic List<ExternalTupleSet> getRelevantIndices(List<ExternalTupleSet> indexList) {\n\n List<ExternalTupleSet> relIndexSet = new ArrayList<>();\n\n for (ExternalTupleSet e : indexList) {\n\n if (isRelevant(e.getTupleExpr())) {\n relIndexSet.add(e);\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_13 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaStreamsCommandsTest.java",
"identifier": "RyaStreamsCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void addQuery_insertConstructQuery() throws Exception {\n // Mock the object that performs the rya streams operation.\n final RyaStreamsClient mockClient = mock(RyaStreamsClient.class);\n final AddQuery addQuery = mock(AddQuery.class);\n when(mockClient.getAddQ... | {
"fields": [
{
"declarator": "STREAMS_CONFIGURE_CMD = \"streams-configure\"",
"modifier": "public static final",
"original_string": "public static final String STREAMS_CONFIGURE_CMD = \"streams-configure\";",
"type": "String",
"var_name": "STREAMS_CONFIGURE_CMD"
},
{
"... | {
"body": "@CliCommand(value = STREAM_QUERIES_ADD_CMD, help = \"Add a SPARQL query to the Rya Streams subsystem.\")\n public String addQuery(\n @CliOption(key = {\"inactive\"}, mandatory = false, unspecifiedDefaultValue = \"false\", specifiedDefaultValue = \"true\",\n help = \"Sett... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_388 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LUBM = ... | {
"body": "@Test\n public void testFilter() {\n final AggregationPipelineQueryNode base = new AggregationPipelineQueryNode(\n collection,\n new LinkedList<>(),\n Sets.newHashSet(\"x\", \"y\"),\n Sets.newHashSet(\"x\", \"y\", \"opt\"),\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "VALUES = \"<VALUES>\"",
"modifier":... | {
"body": "public boolean filter(final ValueExpr condition) {\n if (condition instanceof Compare) {\n final Compare compare = (Compare) condition;\n final Compare.CompareOp operator = compare.getOperator();\n final Object leftArg = valueFieldExpr(compare.getLeftArg());\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_222 | {
"fields": [
{
"declarator": "accumuloConn = null",
"modifier": "protected static",
"original_string": "protected static Connector accumuloConn = null;",
"type": "Connector",
"var_name": "accumuloConn"
},
{
"declarator": "ryaRepo = null",
"modifier": "protected",... | {
"body": "@Test\n public void accumuloIndexSetTestWithTwoBindingSets() throws RepositoryException, PcjException, TableNotFoundException,\n RyaTypeResolverException, MalformedQueryException, SailException, QueryEvaluationException, AccumuloException, AccumuloSecurityException {\n // Load some Triples int... | {
"fields": [
{
"declarator": "accCon",
"modifier": "private final",
"original_string": "private final Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n\tpublic CloseableIteration<BindingSet, QueryEvaluationException> evaluate(\n\t\t\tfinal BindingSet bindingset) throws QueryEvaluationException {\n\t\treturn this.evaluate(Collections.singleton(bindingset));\n\t}",
"class_method_signature": "AccumuloIndexSet.evaluate(\n\t\t\tfinal BindingSet b... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_4 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java",
"identifier": "InstanceNamesFormatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void format() {\n final List<String> instanceNames = Lists.newArrayList(\"a\", \"b\", \"c\", \"d\");\n\n final String formatted = new InstanceNamesFormatter().format(instanceNames);\n\n final String expected =\n \"Rya instance names:\\n\" +\n ... | {
"fields": [],
"file": "extras/shell/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java",
"identifier": "InstanceNamesFormatter",
"interfaces": "",
"methods": [
{
"class_method_signature": "InstanceNamesFormatter.format(final List<String> names, final String connectedName)",
... | {
"body": "public String format(final List<String> names, final String connectedName) {\n requireNonNull(names);\n requireNonNull(connectedName);\n\n // Will be -1 if the connected name isn't in the list of names, so none will be starred.\n final int connectedIndex = names.indexOf( connect... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_367 | {
"fields": [
{
"declarator": "INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS =\n ImmutableList.of(\n Pair.of(\"A\", \"A\"),\n Pair.of(\"A&B\", \"A&B\"),\n Pair.of(\"A|B\", \"A|B\"),\n Pair.of(\"A&(B|C)\", \"(A&B)|(A&C)\"),\n Pair.of(\"A|(B&C)\", \"A|(B&... | {
"body": "@Test\n public void testTruthTableSize1() {\n final byte[][] truthTable = DisjunctiveNormalFormConverter.createTruthTableInputs(1);\n final byte[][] expected=\n {\n {0},\n {1}\n };\n assertArrayEquals(expected, truthTable);\n }"... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DisjunctiveNormalFormConverter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DisjunctiveNormalFormConverter.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "public static byte[][] createTruthTableInputs(final Node node, final byte[] expression) {\n final List<String> terms = findNodeTerms(node, expression);\n return createTruthTableInputs(terms);\n }",
"class_method_signature": "DisjunctiveNormalFormConverter.createTruthTableInputs(final Nod... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_87 | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/test/java/org/apache/rya/indexing/pcj/storage/accumulo/ShiftVarOrderFactoryTest.java",
"identifier": "ShiftVarOrderFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void makeVarOrders_fromSPARQL() throws MalformedQueryException {\n // The SPARQL whose PCJ var orders will be generated from.\n final String sparql =\n \"SELECT ?a ?b ?c \" +\n \"WHERE { \" +\n \"?a <http://talksTo> ?b. \" +\n... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/ShiftVarOrderFactory.java",
"identifier": "ShiftVarOrderFactory",
"interfaces": "implements PcjVarOrderFactory",
"methods": [
{
"class_method_signature": "ShiftVarOrderFactory.makeVarOrders(fi... | {
"body": "@Override\n public Set<VariableOrder> makeVarOrders(final String sparql) throws MalformedQueryException {\n requireNonNull(sparql);\n\n final Set<String> bindingNames = new SPARQLParser().parseQuery(sparql, null)\n .getTupleExpr()\n .getBindingNames();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_68 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test\n\tpublic void basicShortStringLiteralBsTest() throws BindingSetConversionException {\n\t\tfinal QueryBindingSet bs = new QueryBindingSet();\n\t\tbs.addBinding(\"X\", VF.createLiteral(\"literal1\"));\n\t\tbs.addBinding(\"Y\", VF.createLiteral(\"literal2\"));\n\t\tfinal VariableOrder varOrder = new Va... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/AccumuloPcjSerializer.java",
"identifier": "AccumuloPcjSerializer",
"interfaces": "implements BindingSetConverter<byte[]>",
"methods": [
{
"class_method_signature": "AccumuloPcjSerializer.conv... | {
"body": "@Override\n public byte[] convert(BindingSet bindingSet, VariableOrder varOrder) throws BindingSetConversionException {\n checkNotNull(bindingSet);\n checkNotNull(varOrder);\n\n // A list that holds all of the byte segments that will be concatenated at the end.\n // This mini... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_275 | {
"fields": [],
"file": "extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/export/rya/RyaExportParametersTest.java",
"identifier": "RyaExportParametersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void notConfigured() {\n final Map<String, String> params = new HashMap<>();\n\n // Ensure an unconfigured parameters map will say rya export is disabled.\n final RyaExportParameters ryaParams = new RyaExportParameters(params);\n assertFalse(ryaParams.getUseRya... | {
"fields": [
{
"declarator": "CONF_USE_RYA_BINDING_SET_EXPORTER = \"pcj.fluo.export.rya.bindingset.enabled\"",
"modifier": "public static final",
"original_string": "public static final String CONF_USE_RYA_BINDING_SET_EXPORTER = \"pcj.fluo.export.rya.bindingset.enabled\";",
"type": "Strin... | {
"body": "public boolean getUseRyaBindingSetExporter() {\n return getBoolean(params, CONF_USE_RYA_BINDING_SET_EXPORTER, false);\n }",
"class_method_signature": "RyaExportParameters.getUseRyaBindingSetExporter()",
"constructor": false,
"full_signature": "public boolean getUseRyaBindingSetExporter()",
... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_330 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LANGUAG... | {
"body": "@Test\n public void testConvertLiteral_validLanguage() {\n final String expectedData = \"Hello\";\n for (final String language : LANGUAGE_CODES) {\n // This only checks the validity of the format. Not that the language tag actually exists.\n assertTrue(Literals.isVali... | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "common/rya.api/src/... | {
"body": "public static Literal convertLiteral(final RyaType ryaType) {\n if (XMLSchema.STRING.equals(ryaType.getDataType())) {\n return VF.createLiteral(ryaType.getData());\n } else if (RDF.LANGSTRING.equals(ryaType.getDataType())) {\n final String data = ryaType.getData();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_263 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "adapter... | {
"body": "@Test\n public void equalsInstantAfterInterval_GeoTemporalTwoEach() throws Exception {\n final String query =\n \"PREFIX time: <http://www.w3.org/2006/time#> \\n\"\n + \"PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \\n\"\n + \"PREFIX geo: <http://www.ope... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(GeoTemporalMongoDBStorageStrategy.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public Document getFilterQuery(final Collection<IndexingExpr> geoFilters, final Collection<IndexingExpr> temporalFilters) throws GeoTemporalIndexException {\n final QueryBuilder builder = QueryBuilder.start();\n if(!geoFilters.isEmpty()) {\n final Document[] geo = getGeoObjs(geoFil... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_326 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LANGUAG... | {
"body": "@Test\n public void testConvertLiteral_invalidLanguage() {\n final String expectedData = \"Hello\";\n final List<String> badLanguages = Lists.newArrayList(\n \"bad language\",\n \"en-\",\n \"en-US-\"\n );\n for (final String badLan... | {
"fields": [
{
"declarator": "log = Logger.getLogger(RdfToRyaConversions.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(RdfToRyaConversions.class);",
"type": "Logger",
"var_name": "log"
}
],
"file": "common... | {
"body": "public static RyaType convertLiteral(final Literal literal) {\n if (literal == null) {\n return null;\n }\n if (literal.getDatatype() != null) {\n if (Literals.isLanguageLiteral(literal)) {\n final String language = literal.getLanguage().get();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_29 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java",
"identifier": "RyaCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void testSparqlQuery_nonexistentFile() throws InstanceDoesNotExistException, RyaClientException, IOException {\n // Mock the object that performs the create operation.\n final String instanceName = \"unitTest\";\n final String queryF... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaCommands.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@CliCommand(value = SPARQL_QUERY_CMD, help = \"Executes the provided SPARQL Query on the connected Rya instance.\")\n public String sparqlQuery(\n @CliOption(key = { \"file\" }, mandatory = false, help = \"A local file containing the SPARQL Query that is to be read and executed.\")\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_234 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/external/PrecomputedJoinStorageSupplierTest.java",
"identifier": "PrecomputedJoinStorageSupplierTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void configuredForAccumulo() {\n // Create a supplier that does not return any configuration.\n final Supplier<Configuration> configSupplier = mock(Supplier.class);\n final Configuration config = new Configuration();\n config.set(PrecomputedJoinIndexerConfig.PC... | {
"fields": [
{
"declarator": "configSupplier",
"modifier": "private final",
"original_string": "private final Supplier<Configuration> configSupplier;",
"type": "Supplier<Configuration>",
"var_name": "configSupplier"
},
{
"declarator": "accumuloSupplier",
"modifie... | {
"body": "@Override\n public PrecomputedJoinStorage get() {\n // Ensure a configuration has been set.\n final Configuration config = configSupplier.get();\n checkNotNull(config, \"Could not build the PrecomputedJoinStorage until the PrecomputedJoinIndexer has been configured.\");\n\n f... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_371 | {
"fields": [],
"file": "dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/document/visibility/DocumentVisibilityAdapterTest.java",
"identifier": "DocumentVisibilityAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToDocument() {\n final DocumentVisibility dv = new DocumentVisibility(\"A\");\n final Document document = DocumentVisibilityAdapter.toDocument(dv);\n final Document expected = Document.parse(\n \"{\" +\n \"documentVisibility : [[\\\"... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DocumentVisibilityAdapter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DocumentVisibilityAdapter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public static Document toDocument(final byte[] expression) {\n DocumentVisibility dv;\n if (expression == null) {\n dv = MongoDbRdfConstants.EMPTY_DV;\n } else {\n dv = new DocumentVisibility(expression);\n }\n return toDocument(dv);\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_91 | {
"fields": [
{
"declarator": "log = Logger.getLogger(CopyToolTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CopyToolTest.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "IS_MOCK ... | {
"body": "@Test\n public void testImportDirectoryTool() throws Exception {\n log.info(\"\");\n log.info(\"Setting up initial state of parent before importing directory to child...\");\n log.info(\"Adding data to parent...\");\n\n log.info(\"Starting import directory tool. Importing all... | {
"fields": [
{
"declarator": "log = Logger.getLogger(CopyTool.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(CopyTool.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "COPY_TABLE_LIST_... | {
"body": "public AccumuloInstanceDriver getChildAccumuloInstanceDriver() {\n return childAccumuloInstanceDriver;\n }",
"class_method_signature": "CopyTool.getChildAccumuloInstanceDriver()",
"constructor": false,
"full_signature": "public AccumuloInstanceDriver getChildAccumuloInstanceDriver()",
"id... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_185 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/IndexPlanValidator/TupleReArrangerTest.java",
"identifier": "TupleReArrangerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void tupleReArrangeTest2() throws MalformedQueryException {\n\n String queryString = \"\"//\n + \"SELECT ?a ?b ?c ?d ?e ?x ?y\" //\n + \"{\" //\n + \" ?e <uri:laughsAt> ?x .\" //\n + \" ?e <uri:livesIn> ?y . \"//\n ... | {
"fields": [
{
"declarator": "joinArgs",
"modifier": "private static",
"original_string": "private static Map<Join, List<List<TupleExpr>>> joinArgs;",
"type": "Map<Join, List<List<TupleExpr>>>",
"var_name": "joinArgs"
},
{
"declarator": "filterArgs",
"modifier": ... | {
"body": "public static List<TupleExpr> getTupleReOrderings(TupleExpr te) {\n\n joinArgs = Maps.newHashMap();\n filterArgs = Maps.newHashMap();\n \n NodeCollector nc = new NodeCollector();\n te.visit(nc);\n joinArgs = nc.getPerms();\n List<Join> joins = Lists.newArray... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_306 | {
"fields": [],
"file": "common/rya.api.model/src/test/java/org/apache/rya/api/model/VisibilityBindingSetTest.java",
"identifier": "VisibilityBindingSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void hashcode() {\n // Create a BindingSet, decorate it, and grab its hash code.\n final ValueFactory vf = SimpleValueFactory.getInstance();\n final MapBindingSet bSet = new MapBindingSet();\n bSet.addBinding(\"name\", vf.createLiteral(\"alice\"));\n\n f... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "visibility",
"modifier": "private",... | {
"body": "@Override\n public int hashCode() {\n return Objects.hash(visibility, super.getBindingSet());\n }",
"class_method_signature": "VisibilityBindingSet.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"invocations": [
"... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_243 | {
"fields": [],
"file": "extras/rya.streams/query-manager/src/test/java/org/apache/rya/streams/querymanager/kafka/LocalQueryExecutorTest.java",
"identifier": "LocalQueryExecutorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void getRunningQueryIds_serviceNotStarted() throws Exception {\n final QueryExecutor executor = new LocalQueryExecutor(mock(CreateKafkaTopic.class), mock(KafkaStreamsFactory.class));\n executor.getRunningQueryIds();\n }",
"class_m... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LocalQueryExecutor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LocalQueryExecutor.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Set<UUID> getRunningQueryIds() throws QueryExecutorException {\n lock.lock();\n checkState(state() == State.RUNNING, \"The service must be RUNNING to execute this method.\");\n\n try {\n return new HashSet<>( byQueryId.keySet() );\n } finally {\n... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_351 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "TRUE = ... | {
"body": "@Test\n public void testMinutes() throws DatatypeConfigurationException, ValueExprEvaluationException {\n\n DatatypeFactory dtf = DatatypeFactory.newInstance();\n\n ZonedDateTime zTime = testThisTimeDate;\n String time = zTime.format(DateTimeFormatter.ISO_INSTANT);\n\n ZonedD... | {
"fields": [
{
"declarator": "FUNCTION_IRI = FN.NAMESPACE + \"dateTimeWithin\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_IRI = FN.NAMESPACE + \"dateTimeWithin\";",
"type": "String",
"var_name": "FUNCTION_IRI"
}
],
"file": ... | {
"body": "@Override\n public Value evaluate(ValueFactory valueFactory, Value... values) throws ValueExprEvaluationException {\n checkNotNull(valueFactory);\n checkNotNull(values);\n try {\n // general validation of input\n checkArgument(values.length == 4);\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_214 | {
"fields": [
{
"declarator": "provider",
"modifier": "private final",
"original_string": "private final AbstractPcjIndexSetProvider provider;",
"type": "AbstractPcjIndexSetProvider",
"var_name": "provider"
}
],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/p... | {
"body": "@Test\n public void testSegmentWithLargeUnion() throws Exception {\n\n final String query1 = \"\"//\n + \"SELECT ?e ?c ?l\" //\n + \"{\" //\n + \" {?e <uri:p1> <uri:o1>. } UNION { \" //\n + \" ?e <uri:p0> ?l .\" //\n + \"... | {
"fields": [
{
"declarator": "factory = new PCJExternalSetMatcherFactory()",
"modifier": "private static final",
"original_string": "private static final PCJExternalSetMatcherFactory factory = new PCJExternalSetMatcherFactory();",
"type": "PCJExternalSetMatcherFactory",
"var_name": ... | {
"body": "@Override\n public void optimize(TupleExpr tupleExpr, final Dataset dataset, final BindingSet bindings) {\n checkNotNull(tupleExpr);\n // first standardize query by pulling all filters to top of query if\n // they exist using TopOfQueryFilterRelocator\n tupleExpr = TopOfQuery... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_48 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java",
"identifier": "RyaAdminCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void installWithMongoParameters() throws DuplicateInstanceNameException, RyaClientException, IOException {\n // Mock the object that performs the install operation.\n final Install mockInstall = mock(Install.class);\n\n final RyaClient mockCommands = mock(RyaClient.cl... | {
"fields": [
{
"declarator": "CREATE_PCJ_CMD = \"create-pcj\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_PCJ_CMD = \"create-pcj\";",
"type": "String",
"var_name": "CREATE_PCJ_CMD"
},
{
"declarator": "CREATE_PERIODIC_PCJ_C... | {
"body": "@CliCommand(value = INSTALL_MONGO_PARAMETERS_CMD, help = \"Create a new MongoDB instance of Rya with command line parameters.\")\n public String installWithMongoParameters(\n @CliOption(key = {\"instanceName\"}, mandatory = true, help = \"The name of the Rya instance to create.\")\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_347 | {
"fields": [],
"file": "common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java",
"identifier": "QueryInvestigatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isInsert_false_notAnInsertWithKeywords() throws Exception {\n final String sparql =\n \"DELETE\" +\n \"{ \" +\n \" ?bookInsert ?p ?o\" +\n \"}\" +\n \"WHERE\" +\n \"{ \" +\n ... | {
"fields": [
{
"declarator": "PARSER = new SPARQLParser()",
"modifier": "private static final",
"original_string": "private static final SPARQLParser PARSER = new SPARQLParser();",
"type": "SPARQLParser",
"var_name": "PARSER"
}
],
"file": "common/rya.api/src/main/java/org/ap... | {
"body": "public static boolean isInsertWhere(final String sparql) throws MalformedQueryException {\n requireNonNull(sparql);\n\n try {\n // Inserts are updated, so try to create a ParsedUpdate.\n PARSER.parseUpdate(sparql, null);\n\n // Check to see if the SPARQL looks... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_202 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java",
"identifier": "TypeDocumentConverterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void fromDocument() throws DocumentConverterException {\n // Convert a Document into a Type.\n final Document document = new Document()\n .append(TypeDocumentConverter.ID, \"urn:icecream\")\n .append(TypeDocumentConverter.PROPERTY_NAMES, Lists.n... | {
"fields": [
{
"declarator": "ID = \"_id\"",
"modifier": "public static final",
"original_string": "public static final String ID = \"_id\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "PROPERTY_NAMES = \"propertyNames\"",
"modifier": "public static f... | {
"body": "@Override\n public Type fromDocument(final Document document) throws DocumentConverterException {\n requireNonNull(document);\n\n if(!document.containsKey(ID)) {\n throw new DocumentConverterException(\"Could not convert document '\" + document +\n \"' because... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_193 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testCost1() throws Exception {\n\n\t\tString q1 = \"\"//\n\t\t\t\t+ \"SELECT ?f ?m ?d ?h ?i \" //\n\t\t\t\t+ \"{\" //\n\t\t\t\t+ \" ?f a ?m .\"//\n\t\t\t\t+ \" ?m <http://www.w3.org/2000/01/rdf-schema#label> ?d .\"//\n\t\t\t\t+ \" ?d <uri:talksTo> ?f . \"//\n\t\t\t\t+ \" ?d <uri:ha... | {
"fields": [
{
"declarator": "query",
"modifier": "private",
"original_string": "private TupleExpr query;",
"type": "TupleExpr",
"var_name": "query"
},
{
"declarator": "queryNodeCount = 0",
"modifier": "private",
"original_string": "private int queryNodeCou... | {
"body": "public double getCost(TupleExpr te, double indexWeight, double commonVarWeight, double dirProdWeight) {\n\n if (indexWeight + commonVarWeight + dirProdWeight != 1) {\n throw new IllegalArgumentException(\"Weights must sum to 1!\");\n }\n \n if(te == null) {\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_310 | {
"fields": [],
"file": "common/rya.api.function/src/test/java/org/apache/rya/api/function/sp/StatementPatternMatcherTest.java",
"identifier": "StatementPatternMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void doesNotMatchPredicate() throws Exception {\n // Create the matcher against a pattern that matches a specific predicate.\n final StatementPatternMatcher matcher = new StatementPatternMatcher(getSp(\n \"SELECT * WHERE {\" +\n \"?s <urn:ta... | {
"fields": [
{
"declarator": "pattern",
"modifier": "private final",
"original_string": "private final StatementPattern pattern;",
"type": "StatementPattern",
"var_name": "pattern"
}
],
"file": "common/rya.api.function/src/main/java/org/apache/rya/api/function/sp/StatementPa... | {
"body": "public Optional<BindingSet> match(final Statement statement) {\n requireNonNull(statement);\n\n // Setup the resulting binding set that could be built from this Statement.\n final QueryBindingSet bs = new QueryBindingSet();\n\n if(matchesValue(pattern.getSubjectVar(), statement.... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_255 | {
"fields": [],
"file": "extras/kafka.connect/api/src/test/java/org/apache/rya/kafka/connect/api/StatementsSerdeTest.java",
"identifier": "StatementsSerdeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void deserializeEmptyData() {\n try(final Serde<Set<Statement>> serde = new StatementsSerde()) {\n assertNull( serde.deserializer().deserialize(\"topic\", new byte[0]) );\n }\n }",
"class_method_signature": "StatementsSerdeTest.deserializeEmptyData()",
"con... | {
"fields": [],
"file": "extras/kafka.connect/api/src/main/java/org/apache/rya/kafka/connect/api/StatementsSerde.java",
"identifier": "StatementsSerde",
"interfaces": "implements Serde<Set<Statement>>",
"methods": [
{
"class_method_signature": "StatementsSerde.configure(final Map<String, ?> configs,... | {
"body": "@Override\n public Deserializer<Set<Statement>> deserializer() {\n return new StatementsDeserializer();\n }",
"class_method_signature": "StatementsSerde.deserializer()",
"constructor": false,
"full_signature": "@Override public Deserializer<Set<Statement>> deserializer()",
"identifier"... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_64 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test\n public void serialize_bindingsSubsetOfVarOrder() throws BindingSetConversionException {\n // Setup the Binding Set.\n final MapBindingSet originalBindingSet = new MapBindingSet();\n originalBindingSet.addBinding(\"x\", VF.createIRI(\"http://a\"));\n originalBindingSet... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/AccumuloPcjSerializer.java",
"identifier": "AccumuloPcjSerializer",
"interfaces": "implements BindingSetConverter<byte[]>",
"methods": [
{
"class_method_signature": "AccumuloPcjSerializer.conv... | {
"body": "@Override\n public byte[] convert(BindingSet bindingSet, VariableOrder varOrder) throws BindingSetConversionException {\n checkNotNull(bindingSet);\n checkNotNull(varOrder);\n\n // A list that holds all of the byte segments that will be concatenated at the end.\n // This mini... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_107 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "EX = \"... | {
"body": "@Test\n public void testComplexQuery() throws Exception {\n String text = \"PREFIX foaf: <\" + FOAF.NAMESPACE + \">\\n\"\n + \"PREFIX ex: <\" + EX + \">\\n\"\n + \"SELECT * WHERE {\\n\"\n + \" { ?x a foaf:Person } UNION {\\n\"\n + \" ... | {
"fields": [
{
"declarator": "antecedentStatementPatterns = new HashSet<>()",
"modifier": "private",
"original_string": "private Set<StatementPattern> antecedentStatementPatterns = new HashSet<>();",
"type": "Set<StatementPattern>",
"var_name": "antecedentStatementPatterns"
}
... | {
"body": "public Set<StatementPattern> getAntecedents() {\n return antecedentStatementPatterns;\n }",
"class_method_signature": "AntecedentVisitor.getAntecedents()",
"constructor": false,
"full_signature": "public Set<StatementPattern> getAntecedents()",
"identifier": "getAntecedents",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_8 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaStreamsCommandsTest.java",
"identifier": "RyaStreamsCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void printRyaStreamsDetails_noRyaDetails() throws Exception {\n // Mock the object that performs the configure operation.\n final RyaClient mockCommands = mock(RyaClient.class);\n final GetInstanceDetails getDetails = mock(GetInstanceDetails.class);\n when(mock... | {
"fields": [
{
"declarator": "STREAMS_CONFIGURE_CMD = \"streams-configure\"",
"modifier": "public static final",
"original_string": "public static final String STREAMS_CONFIGURE_CMD = \"streams-configure\";",
"type": "String",
"var_name": "STREAMS_CONFIGURE_CMD"
},
{
"... | {
"body": "@CliCommand(value = STREAMS_DETAILS_CMD, help = \"Print information about which Rya Streams subsystem the Rya instance is connected to.\")\n public String printRyaStreamsDetails() {\n final String ryaInstance = state.getShellState().getRyaInstanceName().get();\n final RyaClient client = st... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_384 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LUBM = ... | {
"body": "@Test\n public void testClone() {\n final AggregationPipelineQueryNode base = new AggregationPipelineQueryNode(\n collection,\n new LinkedList<>(),\n Sets.newHashSet(\"x\", \"y\"),\n Sets.newHashSet(\"x\", \"y\", \"opt\"),\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "VALUES = \"<VALUES>\"",
"modifier":... | {
"body": "@Override\n public AggregationPipelineQueryNode clone() {\n return new AggregationPipelineQueryNode(collection,\n new LinkedList<>(pipeline),\n new HashSet<>(assuredBindingNames),\n new HashSet<>(bindingNames),\n HashBiMap.create(varToOr... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_150 | {
"fields": [
{
"declarator": "conf",
"modifier": "",
"original_string": "Configuration conf;",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "tIndexer",
"modifier": "",
"original_string": "AccumuloTemporalIndexer tIndexer;",
"type": "... | {
"body": "@Test\n public void testStoreStatement() throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, NoSuchAlgorithmException {\n // count rows expected to store:\n int rowsStoredExpected = 0;\n\n ValueFactory vf = SimpleValueFacto... | {
"fields": [
{
"declarator": "TABLE_SUFFIX = \"temporal\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_SUFFIX = \"temporal\";",
"type": "String",
"var_name": "TABLE_SUFFIX"
},
{
"declarator": "logger = Logger.getLogger(Acc... | {
"body": "private void storeStatement(final Statement statement) throws IOException, IllegalArgumentException {\n \tObjects.requireNonNull(temporalIndexBatchWriter,\"This is not initialized for writing. Must call setMultiTableBatchWriter() and init().\");\n // if the predicate list is empty, accept all pr... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_33 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/SharedShellStateTest.java",
"identifier": "SharedShellStateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void connectToStorageAgain() {\n final SharedShellState state = new SharedShellState();\n\n // Connect to Accumulo.\n final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);\n final RyaC... | {
"fields": [
{
"declarator": "lock = new ReentrantLock()",
"modifier": "private final",
"original_string": "private final ReentrantLock lock = new ReentrantLock();",
"type": "ReentrantLock",
"var_name": "lock"
},
{
"declarator": "shellState = ShellState.builder()\n ... | {
"body": "public void connectedToAccumulo(\n final AccumuloConnectionDetails connectionDetails,\n final RyaClient connectedCommands) throws IllegalStateException {\n requireNonNull(connectionDetails);\n requireNonNull(connectedCommands);\n\n lock.lock();\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_279 | {
"fields": [
{
"declarator": "DELIM = \"\\u0000\"",
"modifier": "private static final",
"original_string": "private static final String DELIM = \"\\u0000\";",
"type": "String",
"var_name": "DELIM"
},
{
"declarator": "EMPTY_BYTE = new byte[0]",
"modifier": "privat... | {
"body": "@Test\n public void testOptimizeQ1() throws Exception {\n\n RdfEvalStatsDAO<RdfCloudTripleStoreConfiguration> res = new ProspectorServiceEvalStatsDAO(conn, arc);\n AccumuloSelectivityEvalDAO accc = new AccumuloSelectivityEvalDAO();\n accc.setConf(arc);\n accc.setConnector(conn);\n accc.setR... | {
"fields": [
{
"declarator": "statistics",
"modifier": "private final",
"original_string": "private final EvaluationStatistics statistics;",
"type": "EvaluationStatistics",
"var_name": "statistics"
},
{
"declarator": "eval",
"modifier": "private final",
"or... | {
"body": "public void optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings) {\n tupleExpr.visit(new JoinVisitor());\n }",
"class_method_signature": "QueryJoinSelectOptimizer.optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)",
"constructor": false,
"full_signature": "public v... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_296 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "NT_INPU... | {
"body": "@Test\n public void testTrigInput() throws Exception {\n RdfFileInputFormat.setRDFFormat(job, RDFFormat.TRIG);\n init(TRIG_INPUT);\n Assert.assertTrue(reader.nextKeyValue());\n Assert.assertEquals(1, reader.getCurrentKey().get());\n Statement expected = VF.createStatem... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(RdfFileInputFormat.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(RdfFileInputFormat.class);",
"type": "Logger",
"var_name": "logger"
},
{
"d... | {
"body": "public static void setRDFFormat(Job job, RDFFormat format) {\n job.getConfiguration().set(FORMAT_PROP, format.getName());\n }",
"class_method_signature": "RdfFileInputFormat.setRDFFormat(Job job, RDFFormat format)",
"constructor": false,
"full_signature": "public static void setRDFFormat(Jo... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_25 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java",
"identifier": "RyaCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLoadData_specifyFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {\n // Mock the object that performs the create operation.\n final String instanceName = \"unitTest\";\n final String statementsFile = \"/path/to/statements.nt\";\n... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaCommands.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@CliCommand(value = LOAD_DATA_CMD, help = \"Loads RDF Statement data from a local file to the connected Rya instance.\")\n public String loadData(\n @CliOption(key = { \"file\" }, mandatory = true, help = \"A local file containing RDF Statements that is to be loaded.\")\n final Str... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_146 | {
"fields": [
{
"declarator": "ryaStatement",
"modifier": "private static",
"original_string": "private static RyaStatement ryaStatement;",
"type": "RyaStatement",
"var_name": "ryaStatement"
},
{
"declarator": "subjectCentricKey",
"modifier": "private static",
... | {
"body": "@Test\n public void testSerializeStatement() throws RyaTypeResolverException {\n Collection<Mutation> indexMutations = EntityCentricIndex.createMutations(ryaStatement);\n Assert.assertEquals(\"Serialization should produce two rows: subject-centric and object-centric.\",\n 2,... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(EntityCentricIndex.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(EntityCentricIndex.class);",
"type": "Logger",
"var_name": "logger"
},
{
"d... | {
"body": "private static List<TripleRow> serializeStatement(final RyaStatement stmt) throws RyaTypeResolverException {\n final RyaIRI subject = stmt.getSubject();\n final RyaIRI predicate = stmt.getPredicate();\n final RyaType object = stmt.getObject();\n final RyaIRI context = stmt.getCo... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_280 | {
"fields": [
{
"declarator": "DELIM = \"\\u0000\"",
"modifier": "private static final",
"original_string": "private static final String DELIM = \"\\u0000\";",
"type": "String",
"var_name": "DELIM"
},
{
"declarator": "EMPTY_BYTE = new byte[0]",
"modifier": "privat... | {
"body": "@Test\n public void testOptimizeQ2() throws Exception {\n\n System.out.println(\"*********************QUERY2********************\");\n\n RdfEvalStatsDAO<RdfCloudTripleStoreConfiguration> res = new ProspectorServiceEvalStatsDAO(conn, arc);\n AccumuloSelectivityEvalDAO accc = new AccumuloSelectivit... | {
"fields": [
{
"declarator": "statistics",
"modifier": "private final",
"original_string": "private final EvaluationStatistics statistics;",
"type": "EvaluationStatistics",
"var_name": "statistics"
},
{
"declarator": "eval",
"modifier": "private final",
"or... | {
"body": "public void optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings) {\n tupleExpr.visit(new JoinVisitor());\n }",
"class_method_signature": "QueryJoinSelectOptimizer.optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)",
"constructor": false,
"full_signature": "public v... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_111 | {
"fields": [],
"file": "extras/rya.forwardchain/src/test/java/org/apache/rya/forwardchain/rule/ConstructConsequentVisitorTest.java",
"identifier": "ConstructConsequentVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConcreteSP() {\n Extension extension = new Extension(new SingletonSet(),\n new ExtensionElem(new ValueConstant(FOAF.PERSON), \"x\"),\n new ExtensionElem(new ValueConstant(RDF.TYPE), \"y\"),\n new ExtensionElem(new ValueConstant(... | {
"fields": [
{
"declarator": "consequentStatementPatterns = new HashSet<>()",
"modifier": "private",
"original_string": "private Set<StatementPattern> consequentStatementPatterns = new HashSet<>();",
"type": "Set<StatementPattern>",
"var_name": "consequentStatementPatterns"
},
... | {
"body": "public Set<StatementPattern> getConsequents() {\n return consequentStatementPatterns;\n }",
"class_method_signature": "ConstructConsequentVisitor.getConsequents()",
"constructor": false,
"full_signature": "public Set<StatementPattern> getConsequents()",
"identifier": "getConsequents",
"... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_72 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file":... | {
"body": "@Test\n public void rejectUnexpectedClass() throws Exception {\n // cannot use VisibilityBindingSetSerDe.serialize here since it only serializes VisibilityBindingSet.\n final ByteArrayOutputStream boas = new ByteArrayOutputStream();\n try (final ObjectOutputStream oos = new ObjectOu... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/VisibilityBindingSetSerDe.java",
"identifier": "VisibilityBindingSetSerDe",
"interfaces": "",
"methods": [
{
"class_method_signature": "VisibilityBindingSetSerDe.serialize(final VisibilityBind... | {
"body": "public VisibilityBindingSet deserialize(final Bytes bytes) throws Exception {\n requireNonNull(bytes);\n try (final ValidatingObjectInputStream vois = new ValidatingObjectInputStream(new ByteArrayInputStream(bytes.toArray()))) {\n // Perform input validation. Only the following cl... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_392 | {
"fields": [],
"file": "dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/instance/MongoDetailsAdapterTest.java",
"identifier": "MongoDetailsAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void absentOptionalToRyaDetailsTest() throws MalformedRyaDetailsException {\n // Convert the Mongo object into a RyaDetails.\n final Document mongo = Document.parse(\n \"{ \"\n + \"instanceName : \\\"test\\\",\"\n ... | {
"fields": [
{
"declarator": "INSTANCE_KEY = \"instanceName\"",
"modifier": "public static final",
"original_string": "public static final String INSTANCE_KEY = \"instanceName\";",
"type": "String",
"var_name": "INSTANCE_KEY"
},
{
"declarator": "VERSION_KEY = \"version... | {
"body": "public static RyaDetails toRyaDetails(final Document doc) throws MalformedRyaDetailsException {\n requireNonNull(doc);\n try {\n final RyaDetails.Builder builder = RyaDetails.builder()\n .setRyaInstanceName(doc.getString(INSTANCE_KEY))\n .setRyaVersion... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_238 | {
"fields": [],
"file": "extras/rya.streams/query-manager/src/test/java/org/apache/rya/streams/querymanager/kafka/LocalQueryExecutorTest.java",
"identifier": "LocalQueryExecutorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void stopQuery_serviceNotStarted() throws Exception {\n final QueryExecutor executor = new LocalQueryExecutor(mock(CreateKafkaTopic.class), mock(KafkaStreamsFactory.class));\n executor.stopQuery(UUID.randomUUID());\n }",
"class_me... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LocalQueryExecutor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LocalQueryExecutor.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void stopQuery(final UUID queryId) throws QueryExecutorException {\n requireNonNull(queryId);\n checkState(state() == State.RUNNING, \"The service must be RUNNING to execute this method.\");\n\n lock.lock();\n try {\n if(byQueryId.containsKey(que... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
10195984_2 | {
"fields": [
{
"declarator": "dir",
"modifier": "private",
"original_string": "private File dir, src, clz;",
"type": "File",
"var_name": "dir"
},
{
"declarator": "loader",
"modifier": "private",
"original_string": "private ClassLoader loader;",
"type"... | {
"body": "@Test public void defaultValues() throws Exception {\n TestUtils.makeSource(src, \"x.A\",\n \"import java.lang.annotation.*;\",\n \"@Retention(RetentionPolicy.RUNTIME)\",\n \"@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})\",\n ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(Index.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(Index.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declara... | {
"body": "public static <A extends Annotation,I> Index<A,I> load(Class<A> annotation, Class<I> instanceType) throws IllegalArgumentException {\n return load(annotation, instanceType, Thread.currentThread().getContextClassLoader());\n }",
"class_method_signature": "Index.load(Class<A> annotation, Class<I>... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10195984,
"size": 457,
"stargazer_count": 22,
"stars": null,
"updates": null,
"url": "https://github.com/jglick/sezpoz"
} |
10195984_1 | {
"fields": [
{
"declarator": "dir",
"modifier": "private",
"original_string": "private File dir, src, clz;",
"type": "File",
"var_name": "dir"
},
{
"declarator": "loader",
"modifier": "private",
"original_string": "private ClassLoader loader;",
"type"... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test public void methodsAndFields() throws Exception {\n TestUtils.makeSource(src, \"x.A\",\n \"import java.lang.annotation.*;\",\n \"@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})\",\n \"@net.jav... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(Index.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(Index.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declara... | {
"body": "public static <A extends Annotation,I> Index<A,I> load(Class<A> annotation, Class<I> instanceType) throws IllegalArgumentException {\n return load(annotation, instanceType, Thread.currentThread().getContextClassLoader());\n }",
"class_method_signature": "Index.load(Class<A> annotation, Class<I>... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10195984,
"size": 457,
"stargazer_count": 22,
"stars": null,
"updates": null,
"url": "https://github.com/jglick/sezpoz"
} |
10195984_0 | {
"fields": [
{
"declarator": "dir",
"modifier": "private",
"original_string": "private File dir, src, clz;",
"type": "File",
"var_name": "dir"
},
{
"declarator": "loader",
"modifier": "private",
"original_string": "private ClassLoader loader;",
"type"... | {
"body": "@Test public void staticallyKnownAnnotation() throws Exception {\n TestUtils.makeSource(src, \"impl.C\",\n \"import \" + Marker.class.getName().replace('$', '.') + \";\",\n \"@Marker(stuff=\\\"hello\\\")\",\n \"public class C {}\");\n TestUtils.run... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(Index.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(Index.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declara... | {
"body": "public static <A extends Annotation,I> Index<A,I> load(Class<A> annotation, Class<I> instanceType) throws IllegalArgumentException {\n return load(annotation, instanceType, Thread.currentThread().getContextClassLoader());\n }",
"class_method_signature": "Index.load(Class<A> annotation, Class<I>... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10195984,
"size": 457,
"stargazer_count": 22,
"stars": null,
"updates": null,
"url": "https://github.com/jglick/sezpoz"
} |
42446819_0 | {
"fields": [
{
"declarator": "gen = new RandomKVOperationGenerator()",
"modifier": "private",
"original_string": "private RandomKVOperationGenerator gen = new RandomKVOperationGenerator();",
"type": "RandomKVOperationGenerator",
"var_name": "gen"
}
],
"file": "streamkv-java/... | {
"body": "@Test\n\tpublic void testCopy() {\n\n\t\tRandom rnd = new Random();\n\n\t\tKVOperation<Integer, Integer>[] ops = gen.generate(1000);\n\t\tKVOperationSerializer<Integer, Integer> serializer = gen.getSerializer();\n\n\t\tfor (KVOperation<Integer, Integer> op : ops) {\n\t\t\tassertEquals(op, serializer.copy(o... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "keySerializer",
"modifier": "public... | {
"body": "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic KVOperation<K, V> copy(KVOperation<K, V> from, KVOperation<K, V> to) {\n\t\tKVOperationType type = from.type;\n\n\t\tto.type = from.type;\n\t\tto.queryID = from.queryID;\n\t\tto.isPartOfTransaction = from.isPartOfTransaction;\n\t\tif (to.isPartOfTrans... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42446819,
"size": 644,
"stargazer_count": 21,
"stars": null,
"updates": null,
"url": "https://github.com/gyfora/StreamKV"
} |
16970593_125 | {
"fields": [
{
"declarator": "COUNTER = true",
"modifier": "private static final",
"original_string": "private static final boolean COUNTER = true;",
"type": "boolean",
"var_name": "COUNTER"
},
{
"declarator": "adapter",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testGaugeAsCounters() throws Exception {\n String source = this.getClass().getResource(\n \"/com/cloudera/csd/tools/codahale/valid_with_counter_gauges.json\").getPath();\n adapter.init(source, CodahaleMetricAdapter.DEFAULT_CONVENTIONS);\n assertEquals(2, adapter.getRole... | {
"fields": [
{
"declarator": "LOG =\n LoggerFactory.getLogger(CodahaleMetricAdapter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG =\n LoggerFactory.getLogger(CodahaleMetricAdapter.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void init(String fixtureFile,\n @Nullable String conventionsFile) throws Exception {\n Preconditions.checkNotNull(fixtureFile);\n\n FileInputStream in = null;\n try {\n in = FileUtils.openInputStream(new File(fixtureFile));\n fixture = JsonUtil.value... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_5 | {
"fields": [
{
"declarator": "locale = Locale.getDefault()",
"modifier": "private",
"original_string": "private Locale locale = Locale.getDefault();",
"type": "Locale",
"var_name": "locale"
},
{
"declarator": "delegate",
"modifier": "@Mock\n private",
"ori... | {
"body": "@Test\n public void testTranslateStripBrackets() {\n String key = \"{javax.validation.constraint.myconstraint.message}\";\n String output = interpolator.translate(key);\n assertEquals(\"javax.validation.constraint.myconstraint.message\",\n output);\n }",
"class_method_signature": "M... | {
"fields": [
{
"declarator": "source",
"modifier": "private final",
"original_string": "private final MessageSource source;",
"type": "MessageSource",
"var_name": "source"
}
],
"file": "cm-schema/src/main/java/com/cloudera/validation/MessageSourceInterpolator.java",
"ident... | {
"body": "@VisibleForTesting\n String translate(String templateKey) {\n // remove wrapping {..} brackets\n if (templateKey.startsWith(\"{\") && templateKey.endsWith(\"}\")) {\n templateKey = templateKey.substring(1, templateKey.length() - 1);\n }\n\n try {\n Object[] args = {};\n return s... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_133 | {
"fields": [
{
"declarator": "objects = ImmutableMap.of(\"var1\", \"value1\",\n \"var2\", \"value2\")",
"modifier": "private",
"original_string": "private Map<String, String> objects = ImmutableMap.of(\"var1\", \"value1\",\n \"var2\", \"value2\");",
"type": "Map<String, ... | {
"body": "@Test\n public void testInterpolateValues() {\n Map<String, String> map = ImmutableMap.of(\n \"key1\", \"This is ${var1}\",\n \"key2\", \"This is ${var2}\");\n\n Map<String, String> convertedMap = ImmutableMap.of(\n \"key1\", \"This is value1\",\n \"key2\"... | {
"fields": [
{
"declarator": "START_TOKEN = \"\\\\$\\\\{\"",
"modifier": "private static final",
"original_string": "private static final String START_TOKEN = \"\\\\$\\\\{\";",
"type": "String",
"var_name": "START_TOKEN"
},
{
"declarator": "END_TOKEN = \"\\\\}\"",
... | {
"body": "public Map<String, String> interpolateValues(@Nullable Map<String, String> templates,\n VariableProvider provider) {\n if (templates == null) {\n return ImmutableMap.of();\n }\n Function<String, String> transformer = transformer(provider);\n re... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_21 | {
"fields": [
{
"declarator": "validator",
"modifier": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private",
"original_string": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private ServiceDescriptorValidatorImpl validator;",
... | {
"body": "@Test\n public void testBadBoundsOnParameters() {\n Set<String> errors = validate(\"service_badBoundsParameter.sdl\");\n assertEquals(\"service.parameters[0].my_param must satisfy \\\"\" +\n BoundedParameter.class.getAnnotation(Expression.List.class).value()[0].value() + \"\\\"\",\n It... | {
"fields": [
{
"declarator": "validator",
"modifier": "private final",
"original_string": "private final Validator validator;",
"type": "Validator",
"var_name": "validator"
},
{
"declarator": "refValidator",
"modifier": "private final",
"original_string": "... | {
"body": "@Override\n public Set<String> validate(ServiceDescriptor descriptor) {\n Set<ConstraintViolation<ServiceDescriptor>> constraintViolations;\n constraintViolations = getViolations(descriptor);\n\n ImmutableSet.Builder<String> violations = ImmutableSet.builder();\n for (ConstraintViolation<Servi... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_76 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private CounterMetricNameValidator validator;",
"type": "CounterMetricNameValidator",
"var_name": "validator"
},
{
"declarator": "context",
"modifier": "private",
"original... | {
"body": "@Test\n public void testNonCounterWithRateSuffix() {\n setName(\"bytes_read\");\n setIsCounter(false);\n assertTrue(validator.validate(context, metric, root).isEmpty());\n }",
"class_method_signature": "CounterMetricNameValidatorTest.testNonCounterWithRateSuffix()",
"constructor": false,
"... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/monitoring/constraints/CounterMetricNameValidator.java",
"identifier": "CounterMetricNameValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "CounterMetricNameValidator.getDescription()",
"construct... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n MetricDescriptor metricDescriptor,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n Preconditions.checkNotNull(metricDescriptor);\n if (!metricDescriptor.isCo... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_99 | {
"fields": [
{
"declarator": "visitor = new DescriptorVisitorImpl()",
"modifier": "private",
"original_string": "private DescriptorVisitorImpl visitor = new DescriptorVisitorImpl();",
"type": "DescriptorVisitorImpl",
"var_name": "visitor"
}
],
"file": "cm-schema/src/test/jav... | {
"body": "@Test\n public void testVisit() {\n\n NamedSubDescriptor childSub = new NamedSubDescriptor(\"child\");\n SubDescriptor sub = new SubDescriptor(\"foo\", ImmutableSet.of(childSub));\n\n final Set<String> beforePaths = Sets.newHashSet();\n final Set<String> afterPaths = Sets.newHashSet();\n\n ... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/references/components/DescriptorVisitorImpl.java",
"identifier": "DescriptorVisitorImpl",
"interfaces": "implements DescriptorVisitor",
"methods": [
{
"class_method_signature": "DescriptorVisitorImpl.visit(Object rootObject... | {
"body": "@Override\n public <T> T visit(Object rootObject, NodeProcessor<T> processor) {\n DescriptorPathImpl root = new DescriptorPathImpl();\n visit(rootObject, root, processor);\n return processor.getResult();\n }",
"class_method_signature": "DescriptorVisitorImpl.visit(Object rootObject, NodeProces... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_148 | {
"fields": [
{
"declarator": "app",
"modifier": "private",
"original_string": "private Main app;",
"type": "Main",
"var_name": "app"
},
{
"declarator": "appName = \"myapp\"",
"modifier": "private",
"original_string": "private String appName = \"myapp\";",
... | {
"body": "@Test\n public void testGoodAlternatives() throws Exception {\n String[] args = {\"-a\", goodAlternatives};\n app.run(args);\n assertEquals(\"\", err.toString());\n assertTrue(out.toString().contains(goodAlternatives));\n }",
"class_method_signature": "MainTest.testGoodAlternatives()",
"c... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Main.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Main.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "outStream"... | {
"body": "public int run(String[] args) throws IOException {\n Writer writer = new OutputStreamWriter(outStream, Constants.CHARSET_UTF_8);\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n try {\n BeanDefinition cmdOptsbeanDefinition = BeanDefinitionBuilder\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_60 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private WeightingMetricValidator validator;",
"type": "WeightingMetricValidator",
"var_name": "validator"
},
{
"declarator": "context",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testWeightingMetricReferringToSelf() {\n setName(\"bytes_read\");\n setServiceMetrics(ImmutableList.of(metric));\n context = new MonitoringValidationContext(serviceDescriptor);\n setWeightingMetric(\"bytes_read\");\n assertFalse(validator.validate(context, metric, root).... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/monitoring/constraints/WeightingMetricValidator.java",
"identifier": "WeightingMetricValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "WeightingMetricValidator.getDescription()",
"constructor": f... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n MetricDescriptor metricDescriptor,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n Preconditions.checkNotNull(metricDescriptor);\n Preconditions.checkNotNull... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_37 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private ParentsAreReachableUsingAttributesValidator validator;",
"type": "ParentsAreReachableUsingAttributesValidator",
"var_name": "validator"
},
{
"declarator": "context",
"mod... | {
"body": "@Test\n public void testParentWithoutNameParts() {\n MetricEntityTypeDescriptor entity2 = mockEntity(\"foobar_entity_two\");\n doReturn(ImmutableList.of(\"foobar_entity_two\")).when(entity)\n .getParentMetricEntityTypeNames();\n addEntity(entity);\n addEntity(entity2);\n context = ne... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/monitoring/constraints/ParentsAreReachableUsingAttributesValidator.java",
"identifier": "ParentsAreReachableUsingAttributesValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "ParentsAreReachableUsingAttr... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n MetricEntityTypeDescriptor entity,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n Preconditions.checkNotNull(entity);\n Preconditions.checkNotNull(path);\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_109 | {
"fields": [
{
"declarator": "parser = new JsonMdlParser(new JsonSdlObjectMapper())",
"modifier": "private",
"original_string": "private JsonMdlParser parser = new JsonMdlParser(new JsonSdlObjectMapper());",
"type": "JsonMdlParser",
"var_name": "parser"
}
],
"file": "cm-sche... | {
"body": "@Test(expected = IOException.class)\n public void testBadJson() throws Exception {\n parser.parse(getMdl(\"service_badjson.sdl\"));\n }",
"class_method_signature": "JsonMdlParserTest.testBadJson()",
"constructor": false,
"full_signature": "@Test(expected = IOException.class) public void testBadJ... | {
"fields": [
{
"declarator": "OBJECT_WRITER",
"modifier": "static final",
"original_string": "static final ObjectWriter OBJECT_WRITER;",
"type": "ObjectWriter",
"var_name": "OBJECT_WRITER"
},
{
"declarator": "PRETTY_OBJECT_WRITER",
"modifier": "static final",
... | {
"body": "@Override\n public ServiceMonitoringDefinitionsDescriptor parse(byte[] data)\n throws IOException {\n Preconditions.checkNotNull(data);\n return mapper.readValue(data, ServiceMonitoringDefinitionsDescriptor.class);\n }",
"class_method_signature": "JsonMdlParser.parse(byte[] data)",
"constr... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_40 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private ParentsAreReachableUsingAttributesValidator validator;",
"type": "ParentsAreReachableUsingAttributesValidator",
"var_name": "validator"
},
{
"declarator": "context",
"mod... | {
"body": "@Test\n public void testMissingTwoAttribute() {\n MetricEntityTypeDescriptor entity2 = mockEntity(\"foobar_entity_two\");\n doReturn(ImmutableList.of(\"foobar_entity_two\")).when(entity)\n .getParentMetricEntityTypeNames();\n doReturn(ImmutableList.of(\"attr1\", \"attr2\")).when(entity2)\n... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/monitoring/constraints/ParentsAreReachableUsingAttributesValidator.java",
"identifier": "ParentsAreReachableUsingAttributesValidator",
"interfaces": "",
"methods": [
{
"class_method_signature": "ParentsAreReachableUsingAttr... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n MetricEntityTypeDescriptor entity,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n Preconditions.checkNotNull(entity);\n Preconditions.checkNotNull(path);\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_9 | {
"fields": [
{
"declarator": "validator",
"modifier": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private",
"original_string": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private ServiceDescriptorValidatorImpl validator;",
... | {
"body": "@Test\n public void testKmsSdl() {\n assertEquals(ImmutableSet.of(),\n validator.getViolations(SdlTestUtils.getParserSdl(\"service_kms.sdl\")));\n }",
"class_method_signature": "ServiceDescriptorValidatorImplTest.testKmsSdl()",
"constructor": false,
"full_signature": "@Test public void te... | {
"fields": [
{
"declarator": "validator",
"modifier": "private final",
"original_string": "private final Validator validator;",
"type": "Validator",
"var_name": "validator"
},
{
"declarator": "refValidator",
"modifier": "private final",
"original_string": "... | {
"body": "@VisibleForTesting\n public Set<ConstraintViolation<ServiceDescriptor>> getViolations(\n ServiceDescriptor descriptor) {\n Set<ConstraintViolation<ServiceDescriptor>> violations =\n validator.validate(descriptor);\n if (enforceDependencyCheck) {\n Set<ConstraintViolation<ServiceDesc... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_129 | {
"fields": [
{
"declarator": "COUNTER = true",
"modifier": "private static final",
"original_string": "private static final boolean COUNTER = true;",
"type": "boolean",
"var_name": "COUNTER"
},
{
"declarator": "adapter",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testTimerMetrics() throws Exception {\n String source = this.getClass().getResource(\n \"/com/cloudera/csd/tools/codahale/timers.json\").getPath();\n adapter.init(source, CodahaleMetricAdapter.DEFAULT_CONVENTIONS);\n List<MetricDescriptor> metrics = adapter.getServiceMe... | {
"fields": [
{
"declarator": "LOG =\n LoggerFactory.getLogger(CodahaleMetricAdapter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG =\n LoggerFactory.getLogger(CodahaleMetricAdapter.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void init(String fixtureFile,\n @Nullable String conventionsFile) throws Exception {\n Preconditions.checkNotNull(fixtureFile);\n\n FileInputStream in = null;\n try {\n in = FileUtils.openInputStream(new File(fixtureFile));\n fixture = JsonUtil.value... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_17 | {
"fields": [
{
"declarator": "validator",
"modifier": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private",
"original_string": "@Qualifier(\"serviceDescriptorValidatorWithDependencyCheck\")\n @Autowired\n private ServiceDescriptorValidatorImpl validator;",
... | {
"body": "@Test\n public void testCompatibilty() {\n Set<String> errors = validate(\"service_badCompatibility.sdl\");\n assertEquals(\"service.compatibility.generation must be more than 1\", Iterables.getOnlyElement(errors));\n }",
"class_method_signature": "ServiceDescriptorValidatorImplTest.testCompatibi... | {
"fields": [
{
"declarator": "validator",
"modifier": "private final",
"original_string": "private final Validator validator;",
"type": "Validator",
"var_name": "validator"
},
{
"declarator": "refValidator",
"modifier": "private final",
"original_string": "... | {
"body": "@Override\n public Set<String> validate(ServiceDescriptor descriptor) {\n Set<ConstraintViolation<ServiceDescriptor>> constraintViolations;\n constraintViolations = getViolations(descriptor);\n\n ImmutableSet.Builder<String> violations = ImmutableSet.builder();\n for (ConstraintViolation<Servi... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_56 | {
"fields": [
{
"declarator": "SERVICE_NODE = true",
"modifier": "private static final",
"original_string": "private static final Boolean SERVICE_NODE = true;",
"type": "Boolean",
"var_name": "SERVICE_NODE"
},
{
"declarator": "validator",
"modifier": "private",
... | {
"body": "@Test\n public void testBuiltInsNames() {\n validator = new NameForCrossEntityAggregatesPrefixedWithServiceNameValidator(\n ImmutableSet.of(SERVICE_NAME.toLowerCase().substring(1)),\n SERVICE_NODE);\n assertTrue(validator.validate(\n context, SERVICE_NAME.toLowerCase().substring... | {
"fields": [
{
"declarator": "builtInNamesForCrossEntityAggregateMetrics",
"modifier": "private final",
"original_string": "private final ImmutableSet<String> builtInNamesForCrossEntityAggregateMetrics;",
"type": "ImmutableSet<String>",
"var_name": "builtInNamesForCrossEntityAggrega... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n String nameForCrossEntityAggregateMetrics,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n if (null == nameForCrossEntityAggregateMetrics) {\n // This is v... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_113 | {
"fields": [
{
"declarator": "mapper = new JsonSdlObjectMapper()",
"modifier": "private",
"original_string": "private JsonSdlObjectMapper mapper = new JsonSdlObjectMapper();",
"type": "JsonSdlObjectMapper",
"var_name": "mapper"
},
{
"declarator": "parser = new JsonSdlP... | {
"body": "@Test(expected = UnrecognizedPropertyException.class)\n public void testParseUnknownElementStrictly() throws Exception {\n try {\n mapper.setFailOnUnknownProperties(true);\n parser.parse(getSdl(\"service_unknown_elements.sdl\"));\n } finally {\n mapper.setFailOnUnknownProperties(false... | {
"fields": [
{
"declarator": "mapper",
"modifier": "private final",
"original_string": "private final JsonSdlObjectMapper mapper;",
"type": "JsonSdlObjectMapper",
"var_name": "mapper"
}
],
"file": "cm-schema/src/main/java/com/cloudera/csd/components/JsonSdlParser.java",
"i... | {
"body": "@Override\n public ServiceDescriptor parse(byte[] data) throws IOException {\n Preconditions.checkNotNull(data);\n return mapper.readValue(data, ServiceDescriptor.class);\n }",
"class_method_signature": "JsonSdlParser.parse(byte[] data)",
"constructor": false,
"full_signature": "@Override pub... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_144 | {
"fields": [
{
"declarator": "app",
"modifier": "private",
"original_string": "private Main app;",
"type": "Main",
"var_name": "app"
},
{
"declarator": "appName = \"myapp\"",
"modifier": "private",
"original_string": "private String appName = \"myapp\";",
... | {
"body": "@Test\n public void testFailUnknownElements() throws IOException {\n String[] args = {\"-x\", \"-s\", unknownSdl};\n app.run(args);\n assertEquals(\"\", err.toString());\n assertTrue(out.toString().contains(\"Unrecognized field \\\"unknown\\\"\"));\n }",
"class_method_signature": "MainTest.... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Main.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Main.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "outStream"... | {
"body": "public int run(String[] args) throws IOException {\n Writer writer = new OutputStreamWriter(outStream, Constants.CHARSET_UTF_8);\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n try {\n BeanDefinition cmdOptsbeanDefinition = BeanDefinitionBuilder\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_95 | {
"fields": [
{
"declarator": "parentAgetInt = method(ParentA.class, \"getInt\")",
"modifier": "private",
"original_string": "private Method parentAgetInt = method(ParentA.class, \"getInt\");",
"type": "Method",
"var_name": "parentAgetInt"
},
{
"declarator": "parentAget... | {
"body": "@Test\n public void testGetterMethods() {\n assertEquals(Sets.newHashSet(parentAgetInt,\n parentAgetInt2,\n childAgetVar,\n childAisVar2),\n ReflectionHelper.getterMethods(childA));\n asse... | {
"fields": [
{
"declarator": "GETTER_PREFIXES = ImmutableSet.of(\"get\", \"is\")",
"modifier": "private static final",
"original_string": "private static final Set<String> GETTER_PREFIXES = ImmutableSet.of(\"get\", \"is\");",
"type": "Set<String>",
"var_name": "GETTER_PREFIXES"
... | {
"body": "public static Set<Method> getterMethods(Class<?> clazz) {\n Preconditions.checkNotNull(clazz);\n try {\n ImmutableSet.Builder<Method> builder = ImmutableSet.builder();\n BeanInfo info = Introspector.getBeanInfo(clazz);\n for (PropertyDescriptor p : info.getPropertyDescriptors()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_152 | {
"fields": [
{
"declarator": "app",
"modifier": "private",
"original_string": "private Main app;",
"type": "Main",
"var_name": "app"
},
{
"declarator": "appName = \"myapp\"",
"modifier": "private",
"original_string": "private String appName = \"myapp\";",
... | {
"body": "@Test\n public void testGoodManifest() throws Exception {\n String[] args = {\"-m\", goodManifest};\n app.run(args);\n assertEquals(\"\", err.toString());\n assertTrue(out.toString().contains(goodManifest));\n }",
"class_method_signature": "MainTest.testGoodManifest()",
"constructor": fal... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Main.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Main.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "outStream"... | {
"body": "public int run(String[] args) throws IOException {\n Writer writer = new OutputStreamWriter(outStream, Constants.CHARSET_UTF_8);\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n try {\n BeanDefinition cmdOptsbeanDefinition = BeanDefinitionBuilder\n ... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_83 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private AttributesReferToExistingAttributesValidator validator;",
"type": "AttributesReferToExistingAttributesValidator",
"var_name": "validator"
},
{
"declarator": "context",
"m... | {
"body": "@Test\n public void testMutableDefinedAttributes() {\n doReturn(ImmutableList.of(\"attr1\", \"attr2\", \"builtIn1\", \"builtIn2\"))\n .when(entity).getMutableAttributeNames();\n addEntity(entity);\n assertTrue(validator.validate(context, entity, root).isEmpty());\n }",
"class_method_sig... | {
"fields": [
{
"declarator": "builtInAttributes",
"modifier": "private final",
"original_string": "private final ImmutableSet<String> builtInAttributes;",
"type": "ImmutableSet<String>",
"var_name": "builtInAttributes"
}
],
"file": "cm-schema/src/main/java/com/cloudera/csd/v... | {
"body": "@Override\n public <T> List<ConstraintViolation<T>> validate(\n MonitoringValidationContext context,\n MetricEntityTypeDescriptor entity,\n DescriptorPathImpl path) {\n Preconditions.checkNotNull(context);\n Preconditions.checkNotNull(entity);\n Preconditions.checkNotNull(path);\n\... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_105 | {
"fields": [
{
"declarator": "context",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ConstraintValidatorContext context;",
"type": "ConstraintValidatorContext",
"var_name": "context"
},
{
"declarator": "mp1",
"modifier": "@Mock\n private"... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testTooMuch() {\n assertFalse(validator.isValid(ImmutableSet.of(mp1, mp2, mp3, mp4, p1, p2), context));\n }",
"class_method_signature": "AutoConfigSharesValidValidatorImplTest.testTooMuch()",
"constructor": false,
"full_signature": "@Suppre... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/constraints/components/AutoConfigSharesValidValidatorImpl.java",
"identifier": "AutoConfigSharesValidValidatorImpl",
"interfaces": "implements AutoConfigSharesValidValidator",
"methods": [
{
"class_method_signature": "AutoC... | {
"body": "@Override\n public boolean isValid(Collection<?> list, ConstraintValidatorContext context) {\n if (list == null) {\n return true;\n }\n boolean test = false;\n int total = 0;\n for (Object o : list) {\n if (o instanceof MemoryParameter) {\n MemoryParameter memory = (MemoryP... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
16970593_104 | {
"fields": [
{
"declarator": "context",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ConstraintValidatorContext context;",
"type": "ConstraintValidatorContext",
"var_name": "context"
},
{
"declarator": "mp1",
"modifier": "@Mock\n private"... | {
"body": "@Test\n public void testTooLittle() {\n assertFalse(validator.isValid(ImmutableSet.of(mp1, mp2, p1, p2), context));\n }",
"class_method_signature": "AutoConfigSharesValidValidatorImplTest.testTooLittle()",
"constructor": false,
"full_signature": "@Test public void testTooLittle()",
"identifier... | {
"fields": [],
"file": "cm-schema/src/main/java/com/cloudera/csd/validation/constraints/components/AutoConfigSharesValidValidatorImpl.java",
"identifier": "AutoConfigSharesValidValidatorImpl",
"interfaces": "implements AutoConfigSharesValidValidator",
"methods": [
{
"class_method_signature": "AutoC... | {
"body": "@Override\n public boolean isValid(Collection<?> list, ConstraintValidatorContext context) {\n if (list == null) {\n return true;\n }\n boolean test = false;\n int total = 0;\n for (Object o : list) {\n if (o instanceof MemoryParameter) {\n MemoryParameter memory = (MemoryP... | {
"created": null,
"fork": null,
"fork_count": 78,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 16970593,
"size": 855,
"stargazer_count": 132,
"stars": null,
"updates": null,
"url": "https://github.com/cloudera/cm_ext"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.