id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
152655369_12 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testGetPublicSuffixWithNegativeAdditionalPartCountThrows() {\n PublicSuffix.getPublicSuffix(RuntimeEnvironment.application, \"whatever-doesnt-matter\", -1);\n }",
"class_method_signature": "TestPublicSuffix.testGetPublicSuffixWit... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount) {\n if (context == null) {\n throw new NullPointerException(\"Expected non-nu... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_32 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isInternalErrorURL() {\n assertTrue(UrlUtils.isInternalErrorURL(\"data:text/html;charset=utf-8;base64,\"));\n\n assertFalse(UrlUtils.isInternalErrorURL(\"http://www.mozilla.org\"));\n assertFalse(UrlUtils.isInternalErrorURL(\"https://www.mozilla.org/en-us/about\"... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isInternalErrorURL(final String url) {\n return \"data:text/html;charset=utf-8;base64,\".equals(url);\n }",
"class_method_signature": "UrlUtils.isInternalErrorURL(final String url)",
"constructor": false,
"full_signature": "public static boolean isInternalErrorURL(fina... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_24 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isValidSearchQueryUrl() {\n assertTrue(UrlUtils.isValidSearchQueryUrl(\"https://example.com/search/?q=%s\"));\n assertTrue(UrlUtils.isValidSearchQueryUrl(\"http://example.com/search/?q=%s\"));\n assertTrue(UrlUtils.isValidSearchQueryUrl(\"http-test-site.com/searc... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isValidSearchQueryUrl(String url) {\n String trimmedUrl = url.trim();\n if (!trimmedUrl.matches(\"^.+?://.+?\")) {\n // UI hint url doesn't have http scheme, so add it if necessary\n trimmedUrl = \"http://\" + trimmedUrl;\n }\n\n if (!... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
92632486_6 | {
"fields": [
{
"declarator": "tuples1",
"modifier": "",
"original_string": "ArrayList<ArrayList<Integer>> tuples1;",
"type": "ArrayList<ArrayList<Integer>>",
"var_name": "tuples1"
},
{
"declarator": "f1",
"modifier": "",
"original_string": "HeapFile f1;",
... | {
"body": "@Test(timeout=60000) public void bigOrderJoinsTest() throws IOException, DbException, TransactionAbortedException, ParsingException {\n\t\tfinal int IO_COST = 103;\n\t\t\n\t\tJoinOptimizer j;\n\t\tHashMap<String, TableStats> stats = new HashMap<String,TableStats>();\n\t\tVector<LogicalJoinNode> result;\n\t... | {
"fields": [
{
"declarator": "p",
"modifier": "",
"original_string": "LogicalPlan p;",
"type": "LogicalPlan",
"var_name": "p"
},
{
"declarator": "joins",
"modifier": "",
"original_string": "Vector<LogicalJoinNode> joins;",
"type": "Vector<LogicalJoinN... | {
"body": "public Vector<LogicalJoinNode> orderJoins(\n HashMap<String, TableStats> stats,\n HashMap<String, Double> filterSelectivities, boolean explain)\n throws ParsingException {\n\n // some code goes here\n //Replace the following\n // 1. j = set of join node... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_7 | {
"fields": [
{
"declarator": "tuples1",
"modifier": "",
"original_string": "ArrayList<ArrayList<Integer>> tuples1;",
"type": "ArrayList<ArrayList<Integer>>",
"var_name": "tuples1"
},
{
"declarator": "f1",
"modifier": "",
"original_string": "HeapFile f1;",
... | {
"body": "@Test public void nonequalityOrderJoinsTest() throws IOException, DbException, TransactionAbortedException, ParsingException {\n\t\tfinal int IO_COST = 103;\n\t\t\n\t\tJoinOptimizer j;\n\t\tHashMap<String, TableStats> stats = new HashMap<String,TableStats>();\n\t\tVector<LogicalJoinNode> result;\n\t\tVecto... | {
"fields": [
{
"declarator": "p",
"modifier": "",
"original_string": "LogicalPlan p;",
"type": "LogicalPlan",
"var_name": "p"
},
{
"declarator": "joins",
"modifier": "",
"original_string": "Vector<LogicalJoinNode> joins;",
"type": "Vector<LogicalJoinN... | {
"body": "public Vector<LogicalJoinNode> orderJoins(\n HashMap<String, TableStats> stats,\n HashMap<String, Double> filterSelectivities, boolean explain)\n throws ParsingException {\n\n // some code goes here\n //Replace the following\n // 1. j = set of join node... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_0 | {
"fields": [
{
"declarator": "IO_COST = 71",
"modifier": "public static final",
"original_string": "public static final int IO_COST = 71;",
"type": "int",
"var_name": "IO_COST"
},
{
"declarator": "tuples",
"modifier": "",
"original_string": "ArrayList<Array... | {
"body": "@Test public void estimateScanCostTest() throws IOException, DbException, TransactionAbortedException {\n\t\tObject[] ret;\n\t\tint[] ioCosts = new int[20];\n\t\tint[] pageNums = new int[ioCosts.length];\n\t\t// IO_COST constant, numPages change\n\t\tfor(int i = 0; i < ioCosts.length; ++i) {\n\t\t\tioCosts... | {
"fields": [
{
"declarator": "statsMap = new ConcurrentHashMap<String, TableStats>()",
"modifier": "private static final",
"original_string": "private static final ConcurrentHashMap<String, TableStats> statsMap = new ConcurrentHashMap<String, TableStats>();",
"type": "ConcurrentHashMap<St... | {
"body": "public double estimateScanCost() {\n // some code goes here\n return table.numPages() * ioCostPerPage;\n }",
"class_method_signature": "TableStats.estimateScanCost()",
"constructor": false,
"full_signature": "public double estimateScanCost()",
"identifier": "estimateScanCost",
"i... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_12 | {
"fields": [
{
"declarator": "width1 = 2",
"modifier": "",
"original_string": "int width1 = 2;",
"type": "int",
"var_name": "width1"
},
{
"declarator": "width2 = 3",
"modifier": "",
"original_string": "int width2 = 3;",
"type": "int",
"var_name"... | {
"body": "@Test public void eqJoin() throws Exception {\n JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0);\n Join op = new Join(pred, scan1, scan2);\n op.open();\n eqJoin.open();\n TestUtil.matchAllTuples(eqJoin, op);\n }",
"class_method_signature": "JoinTest.eqJoin()",
"constru... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "joinPredicate",
"modifier": "privat... | {
"body": "public void open() throws DbException, NoSuchElementException,\n TransactionAbortedException {\n // some code goes here\n child1.open();\n child2.open();\n super.open();\n// joinResults = nestedLoopJoin();\n joinResults = blockNestedLoopJoin();\n// ... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_1 | {
"fields": [
{
"declarator": "IO_COST = 71",
"modifier": "public static final",
"original_string": "public static final int IO_COST = 71;",
"type": "int",
"var_name": "IO_COST"
},
{
"declarator": "tuples",
"modifier": "",
"original_string": "ArrayList<Array... | {
"body": "@Test public void estimateTableCardinalityTest() {\n\t\tTableStats s = new TableStats(this.tableId, IO_COST);\n\t\t\n\t\t// Try a random selectivity\n\t\tAssert.assertEquals(306, s.estimateTableCardinality(0.3));\n\t\t\n\t\t// Make sure we get all rows with 100% selectivity, and none with 0%\n\t\tAssert.as... | {
"fields": [
{
"declarator": "statsMap = new ConcurrentHashMap<String, TableStats>()",
"modifier": "private static final",
"original_string": "private static final ConcurrentHashMap<String, TableStats> statsMap = new ConcurrentHashMap<String, TableStats>();",
"type": "ConcurrentHashMap<St... | {
"body": "public int estimateTableCardinality(double selectivityFactor) {\n // some code goes here\n return (int) Math.ceil(totalTuples() * selectivityFactor);\n }",
"class_method_signature": "TableStats.estimateTableCardinality(double selectivityFactor)",
"constructor": false,
"full_signature... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_2 | {
"fields": [
{
"declarator": "IO_COST = 71",
"modifier": "public static final",
"original_string": "public static final int IO_COST = 71;",
"type": "int",
"var_name": "IO_COST"
},
{
"declarator": "tuples",
"modifier": "",
"original_string": "ArrayList<Array... | {
"body": "@Test public void estimateSelectivityTest() {\n\t\tfinal int maxCellVal = 32;\t// Tuple values are randomized between 0 and this number\n\t\t\n\t\tfinal Field aboveMax = new IntField(maxCellVal + 10);\n\t\tfinal Field atMax = new IntField(maxCellVal);\n\t\tfinal Field halfMaxMin = new IntField(maxCellVal/2... | {
"fields": [
{
"declarator": "statsMap = new ConcurrentHashMap<String, TableStats>()",
"modifier": "private static final",
"original_string": "private static final ConcurrentHashMap<String, TableStats> statsMap = new ConcurrentHashMap<String, TableStats>();",
"type": "ConcurrentHashMap<St... | {
"body": "public double estimateSelectivity(int field, Predicate.Op op, Field constant) {\n // some code goes here\n String fieldName = td.getFieldName(field);\n if (constant.getType() == Type.INT_TYPE) {\n int value = ((IntField)constant).getValue();\n IntHistogram histogr... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_10 | {
"fields": [
{
"declarator": "width1 = 2",
"modifier": "",
"original_string": "int width1 = 2;",
"type": "int",
"var_name": "width1"
},
{
"declarator": "width2 = 3",
"modifier": "",
"original_string": "int width2 = 3;",
"type": "int",
"var_name"... | {
"body": "@Test public void rewind() throws Exception {\n JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0);\n Join op = new Join(pred, scan1, scan2);\n op.open();\n while (op.hasNext()) {\n assertNotNull(op.next());\n }\n assertTrue(TestUtil.checkExhausted(op));\n op.rewind... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "joinPredicate",
"modifier": "privat... | {
"body": "public void rewind() throws DbException, TransactionAbortedException {\n // some code goes here\n child1.rewind();\n child2.rewind();\n joinResults.rewind();\n }",
"class_method_signature": "Join.rewind()",
"constructor": false,
"full_signature": "public void rewind()",... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_11 | {
"fields": [
{
"declarator": "width1 = 2",
"modifier": "",
"original_string": "int width1 = 2;",
"type": "int",
"var_name": "width1"
},
{
"declarator": "width2 = 3",
"modifier": "",
"original_string": "int width2 = 3;",
"type": "int",
"var_name"... | {
"body": "@Test public void gtJoin() throws Exception {\n JoinPredicate pred = new JoinPredicate(0, Predicate.Op.GREATER_THAN, 0);\n Join op = new Join(pred, scan1, scan2);\n op.open();\n gtJoin.open();\n TestUtil.matchAllTuples(gtJoin, op);\n }",
"class_method_signature": "JoinTest.gtJoin()",
"c... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "joinPredicate",
"modifier": "privat... | {
"body": "public void open() throws DbException, NoSuchElementException,\n TransactionAbortedException {\n // some code goes here\n child1.open();\n child2.open();\n super.open();\n// joinResults = nestedLoopJoin();\n joinResults = blockNestedLoopJoin();\n// ... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_3 | {
"fields": [
{
"declarator": "tuples1",
"modifier": "",
"original_string": "ArrayList<ArrayList<Integer>> tuples1;",
"type": "ArrayList<ArrayList<Integer>>",
"var_name": "tuples1"
},
{
"declarator": "f1",
"modifier": "",
"original_string": "HeapFile f1;",
... | {
"body": "@Test public void estimateJoinCostTest() throws ParsingException {\n\t\t// It's hard to narrow these down much at all, because students \n\t\t// may have implemented custom join algorithms.\n\t\t// So, just make sure the orders of the return values make sense.\n\t\t\t\t\t\t\n TransactionId tid = new... | {
"fields": [
{
"declarator": "p",
"modifier": "",
"original_string": "LogicalPlan p;",
"type": "LogicalPlan",
"var_name": "p"
},
{
"declarator": "joins",
"modifier": "",
"original_string": "Vector<LogicalJoinNode> joins;",
"type": "Vector<LogicalJoinN... | {
"body": "public double estimateJoinCost(LogicalJoinNode j, int card1, int card2,\n double cost1, double cost2) {\n if (j instanceof LogicalSubplanJoinNode) {\n // A LogicalSubplanJoinNode represents a subquery.\n // You do not need to implement proper s... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_8 | {
"fields": [
{
"declarator": "p0",
"modifier": "private",
"original_string": "private PageId p0, p1, p2;",
"type": "PageId",
"var_name": "p0"
},
{
"declarator": "tid1",
"modifier": "private",
"original_string": "private TransactionId tid1, tid2;",
"ty... | {
"body": "@Test public void attemptTransactionTwice() throws Exception {\n bp.getPage(tid1, p0, Permissions.READ_ONLY);\n bp.getPage(tid1, p1, Permissions.READ_WRITE);\n bp.transactionComplete(tid1, true);\n\n bp.getPage(tid2, p0, Permissions.READ_WRITE);\n bp.getPage(tid2, p0, Permissions.READ_WRITE)... | {
"fields": [
{
"declarator": "tid",
"modifier": "private final",
"original_string": "private final TransactionId tid;",
"type": "TransactionId",
"var_name": "tid"
},
{
"declarator": "started = false",
"modifier": "volatile",
"original_string": "volatile boo... | {
"body": "public void transactionComplete(boolean abort) throws IOException {\n\n if (started) {\n //write commit / abort records\n if (abort) {\n Database.getLogFile().logAbort(tid); //does rollback too\n } else {\n //write all the dirty pages fo... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_4 | {
"fields": [
{
"declarator": "tuples1",
"modifier": "",
"original_string": "ArrayList<ArrayList<Integer>> tuples1;",
"type": "ArrayList<ArrayList<Integer>>",
"var_name": "tuples1"
},
{
"declarator": "f1",
"modifier": "",
"original_string": "HeapFile f1;",
... | {
"body": "@Test public void estimateJoinCardinality() throws ParsingException {\n TransactionId tid = new TransactionId();\n Parser p = new Parser();\n\t\tJoinOptimizer j = new JoinOptimizer(p.generateLogicalPlan(tid, \"SELECT * FROM \" + tableName2 + \" t1, \" + tableName2 + \" t2 WHERE t1.c8 = t2.c7;... | {
"fields": [
{
"declarator": "p",
"modifier": "",
"original_string": "LogicalPlan p;",
"type": "LogicalPlan",
"var_name": "p"
},
{
"declarator": "joins",
"modifier": "",
"original_string": "Vector<LogicalJoinNode> joins;",
"type": "Vector<LogicalJoinN... | {
"body": "public int estimateJoinCardinality(LogicalJoinNode j, int card1, int card2,\n boolean t1pkey, boolean t2pkey, Map<String, TableStats> stats) {\n if (j instanceof LogicalSubplanJoinNode) {\n // A LogicalSubplanJoinNode represents a subquery.\n ... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_5 | {
"fields": [
{
"declarator": "tuples1",
"modifier": "",
"original_string": "ArrayList<ArrayList<Integer>> tuples1;",
"type": "ArrayList<ArrayList<Integer>>",
"var_name": "tuples1"
},
{
"declarator": "f1",
"modifier": "",
"original_string": "HeapFile f1;",
... | {
"body": "@Test public void orderJoinsTest() throws ParsingException, IOException, DbException, TransactionAbortedException {\n\t\t// This test is intended to approximate the join described in the\n\t\t// \"Query Planning\" section of 2009 Quiz 1,\n\t\t// though with some minor variation due to limitations in simple... | {
"fields": [
{
"declarator": "p",
"modifier": "",
"original_string": "LogicalPlan p;",
"type": "LogicalPlan",
"var_name": "p"
},
{
"declarator": "joins",
"modifier": "",
"original_string": "Vector<LogicalJoinNode> joins;",
"type": "Vector<LogicalJoinN... | {
"body": "public Vector<LogicalJoinNode> orderJoins(\n HashMap<String, TableStats> stats,\n HashMap<String, Double> filterSelectivities, boolean explain)\n throws ParsingException {\n\n // some code goes here\n //Replace the following\n // 1. j = set of join node... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
92632486_9 | {
"fields": [
{
"declarator": "width1 = 2",
"modifier": "",
"original_string": "int width1 = 2;",
"type": "int",
"var_name": "width1"
},
{
"declarator": "width2 = 3",
"modifier": "",
"original_string": "int width2 = 3;",
"type": "int",
"var_name"... | {
"body": "@Test public void getTupleDesc() {\n JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0);\n Join op = new Join(pred, scan1, scan2);\n TupleDesc expected = Utility.getTupleDesc(width1 + width2);\n TupleDesc actual = op.getTupleDesc();\n assertEquals(expected, actual);\n }",
"... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "joinPredicate",
"modifier": "privat... | {
"body": "public TupleDesc getTupleDesc() {\n // some code goes here\n return td;\n }",
"class_method_signature": "Join.getTupleDesc()",
"constructor": false,
"full_signature": "public TupleDesc getTupleDesc()",
"identifier": "getTupleDesc",
"invocations": [],
"modifiers": "public",
"p... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92632486,
"size": 7772,
"stargazer_count": 136,
"stars": null,
"updates": null,
"url": "https://github.com/iamxpy/SimpleDB"
} |
184471389_25 | {
"fields": [
{
"declarator": "context = new AemContext(ResourceResolverType.JCR_MOCK)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext(ResourceResolverType.JCR_MOCK);",
"type": "AemContext",
"var_name": "context"
},
... | {
"body": "@Test\n public void testReferer_invalidPage() throws IOException {\n // mock referer and page\n when(request.getHeader(HttpHeaders.REFERER)).thenReturn(\"/editor.html/path/to/invalid/page.html\");\n String path = \"/path/to/invalid/page.html\";\n when(resourceResolver.resolve... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PreviewServlet.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PreviewServlet.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {\n\n if (WCMMode.DISABLED == WCMMode.fromRequest(request)) {\n response.sendError(HttpServletResponse.SC_FORBIDDEN, \"The request not permitted\");\n return;\n }\... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_72 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testSorting() {\n context.request().setParameterMap(Collections.singletonMap(\"search_query\", \"glove\"));\n searchResultsModel = context.request().adaptTo(SearchResultsImpl.class);\n SearchResultsSet resultSet = searchResultsModel.getSearchResultsSet();\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SearchResultsImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SearchResultsImpl.class);",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "@Nonnull\n @Override\n public SearchResultsSet getSearchResultsSet() {\n if (searchResultsSet == null) {\n searchResultsSet = searchResultsService.performSearch(searchOptions, resource, productPage, request);\n }\n return searchResultsSet;\n }",
"class_method_sign... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_64 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "button",
"modifier": "privat... | {
"body": "@Test\n public void testGetLinkForExternalLink() {\n\n final String expResult = \"http://sample-link.com\";\n context.currentResource(\"/content/linkTypeExternalLink\");\n button = context.request().adaptTo(Button.class);\n\n String result = button.getLink();\n assertE... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\";",
"type": "String",
"var_name": ... | {
"body": "@Override\n public String getLink() {\n return StringUtils.isNotBlank(url) ? url : DEFAULT_LINK;\n }",
"class_method_signature": "ButtonImpl.getLink()",
"constructor": false,
"full_signature": "@Override public String getLink()",
"identifier": "getLink",
"invocations": [
"isNotBl... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_33 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testQueryExtensions() throws Exception {\n setUp(RelationType.RELATED_PRODUCTS, \"graphql/magento-graphql-relatedproducts-result.json\", false);\n AbstractProductsRetriever retriever = relatedProducts.getProductsRetriever();\n retriever.extendProductQueryWith(p -... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\";",
... | {
"body": "@Override\n public AbstractProductsRetriever getProductsRetriever() {\n return productsRetriever;\n }",
"class_method_signature": "RelatedProductsImpl.getProductsRetriever()",
"constructor": false,
"full_signature": "@Override public AbstractProductsRetriever getProductsRetriever()",
"... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_48 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testCalculateCurrentPageCursor() {\n productCollectionModel = context.request().adaptTo(ProductCollectionImpl.class);\n Assert.assertEquals(\"negative page indexes are not allowed\", 1, productCollectionModel.calculateCurrentPageCursor(\"-1\").intValue());\n Asse... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productcollection/v1/productcollection\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productcollection/v1/productcollection\"... | {
"body": "public Integer calculateCurrentPageCursor(final String currentPageIndexCandidate) {\n // make sure the current page from the query string is reasonable i.e. numeric and over 0\n try {\n int i = Integer.parseInt(currentPageIndexCandidate);\n if (i < 1) {\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_103 | {
"fields": [
{
"declarator": "modelUnderTest",
"modifier": "private",
"original_string": "private SearchResultsSetImpl modelUnderTest;",
"type": "SearchResultsSetImpl",
"var_name": "modelUnderTest"
},
{
"declarator": "searchOptions = new SearchOptionsImpl()",
"mo... | {
"body": "@Test\n public void testGetAvailableAggregations() {\n final List<SearchAggregation> availableAggregations = modelUnderTest.getAppliedAggregations();\n Assert.assertEquals(\"Identifies available aggregations\", 1, modelUnderTest.getAvailableAggregations().size());\n\n SearchResultsS... | {
"fields": [
{
"declarator": "searchOptions",
"modifier": "private",
"original_string": "private SearchOptions searchOptions;",
"type": "SearchOptions",
"var_name": "searchOptions"
},
{
"declarator": "totalResults",
"modifier": "private",
"original_string":... | {
"body": "@Nonnull\n @Override\n public List<SearchAggregation> getAvailableAggregations() {\n return searchAggregations\n .stream()\n .filter(searchAggregation -> !searchAggregation.getAppliedFilterValue().isPresent()\n && searchAggregation.getFilterable())\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_29 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testRelatedProducts() throws Exception {\n setUp(RelationType.RELATED_PRODUCTS, \"graphql/magento-graphql-relatedproducts-result.json\", false);\n assertProducts();\n Assert.assertEquals(\"h2\", relatedProducts.getTitleType()); // titleType is coming from resourc... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\";",
... | {
"body": "@Override\n public String getTitleType() {\n return TitleTypeProvider.getTitleType(currentStyle, properties);\n }",
"class_method_signature": "RelatedProductsImpl.getTitleType()",
"constructor": false,
"full_signature": "@Override public String getTitleType()",
"identifier": "getTitleT... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_91 | {
"fields": [
{
"declarator": "attribute",
"modifier": "@Mock",
"original_string": "@Mock\n Attribute attribute;",
"type": "Attribute",
"var_name": "attribute"
},
{
"declarator": "inputField",
"modifier": "@Mock(answer = Answers.RETURNS_DEEP_STUBS)",
"ori... | {
"body": "@Test\n public void testConverteOnlyMatchesAttributeCodes() {\n\n final String CODE = \"cool_attribute\";\n final String DIFFERENT_CODE = \"uncool_attribute\";\n final String TYPE_NAME = \"AWildInputAppears\";\n final String ATTRIBUTE_TYPE = \"Int\";\n final String INP... | {
"fields": [
{
"declarator": "allAttributeMetadata",
"modifier": "private",
"original_string": "private List<Attribute> allAttributeMetadata;",
"type": "List<Attribute>",
"var_name": "allAttributeMetadata"
}
],
"file": "bundles/core/src/main/java/com/adobe/cq/commerce/core/s... | {
"body": "@Override\n public FilterAttributeMetadata apply(final __InputValue inputField) {\n FilterAttributeMetadataImpl metadata = new FilterAttributeMetadataImpl();\n\n metadata.setAttributeCode(inputField.getName());\n metadata.setFilterInputType(inputField.getType().getName());\n\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_68 | {
"fields": [
{
"declarator": "MOCK_CONFIGURATION = new ValueMapDecorator(ImmutableMap.of(\"cq:graphqlClient\", \"default\", \"magentoStore\",\n \"my-store\"))",
"modifier": "private static final",
"original_string": "private static final ValueMap MOCK_CONFIGURATION = new ValueMapDecorato... | {
"body": "@Test\n public void verifyIgnoreInvalidAsset() throws Exception {\n setupTest(COMPONENT_PATH);\n\n categories = featuredCategoryList.getCategories();\n Assert.assertNotNull(categories);\n Assert.assertEquals(categories.get(2).getImage(), TEST_IMAGE_URL);\n }",
"class_met... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/featuredcategorylist/v1/featuredca... | {
"body": "@Override\n public List<CategoryTree> getCategories() {\n if (categoriesRetriever == null) {\n return Collections.emptyList();\n }\n List<CategoryTree> categories = categoriesRetriever.fetchCategories();\n for (CategoryTree category : categories) {\n Map... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_87 | {
"fields": [
{
"declarator": "BLACK_COUNT = 10",
"modifier": "private final static",
"original_string": "private final static Integer BLACK_COUNT = 10;",
"type": "Integer",
"var_name": "BLACK_COUNT"
},
{
"declarator": "BLACK_ATTRIBUTE = \"color\"",
"modifier": "p... | {
"body": "@Test\n public void testShouldSetFilterValue() {\n FilterAttributeMetadataImpl filterAttributeMetadata = new FilterAttributeMetadataImpl();\n filterAttributeMetadata.setAttributeInputType(FilterAttributeMetadataImpl.INPUT_TYPE_SELECT);\n filterAttributeMetadata.setAttributeCode(BLAC... | {
"fields": [
{
"declarator": "filterAttributeMetadata",
"modifier": "private final",
"original_string": "private final FilterAttributeMetadata filterAttributeMetadata;",
"type": "FilterAttributeMetadata",
"var_name": "filterAttributeMetadata"
},
{
"declarator": "attrib... | {
"body": "@Override\n public SearchAggregationOption apply(final AggregationOption aggregationOption) {\n SearchAggregationOptionImpl searchAggregationOption = new SearchAggregationOptionImpl();\n\n // Special case handling for boolean values to return a friendlier \"yes/no\" response\n if (f... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_44 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testNoGraphqlClient() throws Exception {\n prepareModel(\"/content/venia/us/en/products/product-page\");\n when(breadcrumbResource.adaptTo(ComponentsConfiguration.class)).thenReturn(ComponentsConfiguration.EMPTY);\n\n breadcrumbModel = context.request().adaptTo(B... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_13 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testInvalidPageType() {\n request.getResource().getValueMap().put(\"pageType\", \"something\");\n request.setQueryString(\"item=/content/product-page/sub-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.d... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_0 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testProductUrlWithOldSyntax() {\n MockUrlProviderConfiguration config = new MockUrlProviderConfiguration(true);\n Assert.assertTrue(config.productUrlTemplate().contains(\"${\"));\n urlProvider = new UrlProviderImpl();\n urlProvider.activate(config);\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Activate\n public void activate(UrlProviderConfiguration conf) {\n productUrlTemplate = conf.productUrlTemplate();\n productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType());\n\n categoryUrlTemplate = conf.categoryUrlTemplate();\n cat... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_52 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testPriceRange() {\n productModel = context.request().adaptTo(ProductImpl.class);\n Price price = productModel.getPriceRange();\n\n Assert.assertTrue(price.isRange());\n Assert.assertFalse(price.isDiscounted());\n Assert.assertEquals(58.0, price.get... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\";",
"type": "String",
"var_n... | {
"body": "@Override\n public Price getPriceRange() {\n return new PriceImpl(productRetriever.fetchProduct().getPriceRange(), locale);\n }",
"class_method_signature": "ProductImpl.getPriceRange()",
"constructor": false,
"full_signature": "@Override public Price getPriceRange()",
"identifier": "ge... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_53 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testVirtualProduct() throws IOException {\n Utils.setupHttpResponse(\"graphql/magento-graphql-virtualproduct-result.json\", httpClient, 200);\n productModel = context.request().adaptTo(ProductImpl.class);\n Assert.assertNotNull(\"Product model is not null\", prod... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\";",
"type": "String",
"var_n... | {
"body": "@Override\n public Boolean isVirtualProduct() {\n if (isVirtualProduct == null) {\n isVirtualProduct = productRetriever != null && productRetriever.fetchProduct() instanceof VirtualProduct;\n }\n return isVirtualProduct;\n }",
"class_method_signature": "ProductImpl.i... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_1 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testCategoryUrlWithOldSyntax() {\n MockUrlProviderConfiguration config = new MockUrlProviderConfiguration(true);\n Assert.assertTrue(config.categoryUrlTemplate().contains(\"${\"));\n urlProvider = new UrlProviderImpl();\n urlProvider.activate(config);\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Activate\n public void activate(UrlProviderConfiguration conf) {\n productUrlTemplate = conf.productUrlTemplate();\n productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType());\n\n categoryUrlTemplate = conf.categoryUrlTemplate();\n cat... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_12 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testNoPageType() {\n request.setQueryString(\"item=/content/product-page/ignored\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doGet(request, null);\n\n SimpleRenderCondition condition = (SimpleRenderCondit... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_45 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductNotFound() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-product-not-found-result.json\");\n prepareModel(\"/content/venia/us/en/products/product-page\");\n\n MockRequestPathInfo requestPath... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_69 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testMissingSearchTerm() {\n searchResultsModel = context.request().adaptTo(SearchResultsImpl.class);\n\n Collection<ProductListItem> products = searchResultsModel.getProducts();\n\n // Check that we get an empty list of products and the GraphQL client is never ca... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SearchResultsImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SearchResultsImpl.class);",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "@Nonnull\n @Override\n public Collection<ProductListItem> getProducts() {\n return getSearchResultsSet().getProductListItems();\n }",
"class_method_signature": "SearchResultsImpl.getProducts()",
"constructor": false,
"full_signature": "@Nonnull @Override public Collection<ProductListI... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_86 | {
"fields": [
{
"declarator": "BLACK_COUNT = 10",
"modifier": "private final static",
"original_string": "private final static Integer BLACK_COUNT = 10;",
"type": "Integer",
"var_name": "BLACK_COUNT"
},
{
"declarator": "BLACK_ATTRIBUTE = \"color\"",
"modifier": "p... | {
"body": "@Test\n public void testShouldSetDisplayLabelForBooleanValues() {\n\n FilterAttributeMetadataImpl filterAttributeMetadata = new FilterAttributeMetadataImpl();\n filterAttributeMetadata.setAttributeInputType(FilterAttributeMetadataImpl.INPUT_TYPE_BOOLEAN);\n filterAttributeMetadata.s... | {
"fields": [
{
"declarator": "filterAttributeMetadata",
"modifier": "private final",
"original_string": "private final FilterAttributeMetadata filterAttributeMetadata;",
"type": "FilterAttributeMetadata",
"var_name": "filterAttributeMetadata"
},
{
"declarator": "attrib... | {
"body": "@Override\n public SearchAggregationOption apply(final AggregationOption aggregationOption) {\n SearchAggregationOptionImpl searchAggregationOption = new SearchAggregationOptionImpl();\n\n // Special case handling for boolean values to return a friendlier \"yes/no\" response\n if (f... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_90 | {
"fields": [
{
"declarator": "attribute",
"modifier": "@Mock",
"original_string": "@Mock\n Attribute attribute;",
"type": "Attribute",
"var_name": "attribute"
},
{
"declarator": "inputField",
"modifier": "@Mock(answer = Answers.RETURNS_DEEP_STUBS)",
"ori... | {
"body": "@Test\n public void testConvertsForInputWithMatchingAttribute() {\n\n final String CODE = \"cool_attribute\";\n final String TYPE_NAME = \"AWildInputAppears\";\n final String ATTRIBUTE_TYPE = \"Int\";\n final String INPUT_TYPE = \"boolean\";\n\n when(inputField.getName... | {
"fields": [
{
"declarator": "allAttributeMetadata",
"modifier": "private",
"original_string": "private List<Attribute> allAttributeMetadata;",
"type": "List<Attribute>",
"var_name": "allAttributeMetadata"
}
],
"file": "bundles/core/src/main/java/com/adobe/cq/commerce/core/s... | {
"body": "@Override\n public FilterAttributeMetadata apply(final __InputValue inputField) {\n FilterAttributeMetadataImpl metadata = new FilterAttributeMetadataImpl();\n\n metadata.setAttributeCode(inputField.getName());\n metadata.setFilterInputType(inputField.getType().getName());\n\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_28 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "servlet",
"modifier": "priva... | {
"body": "@Test\n public void testDataSource() throws ServletException, IOException {\n servlet.doGet(context.request(), context.response());\n\n // Verify data source\n DataSource dataSource = (DataSource) context.request().getAttribute(DataSource.class.getName());\n Assert.assertNotN... | {
"fields": [],
"file": "bundles/core/src/main/java/com/adobe/cq/commerce/core/components/internal/models/v1/relatedproducts/RelationTypesDataSourceServlet.java",
"identifier": "RelationTypesDataSourceServlet",
"interfaces": "",
"methods": [
{
"class_method_signature": "RelationTypesDataSourceServle... | {
"body": "@Override\n protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {\n\n ResourceBundle resourceBundle = request.getResourceBundle(null);\n List<Resource> values = new ArrayList<>();\n\n for (RelationType relatio... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_102 | {
"fields": [
{
"declarator": "modelUnderTest",
"modifier": "private",
"original_string": "private SearchResultsSetImpl modelUnderTest;",
"type": "SearchResultsSetImpl",
"var_name": "modelUnderTest"
},
{
"declarator": "searchOptions = new SearchOptionsImpl()",
"mo... | {
"body": "@Test\n public void testGetAppliedAggregations() {\n final List<SearchAggregation> appliedAggregations = modelUnderTest.getAppliedAggregations();\n Assert.assertEquals(\"identifies applied aggregations\", 1, modelUnderTest.getAppliedAggregations().size());\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "searchOptions",
"modifier": "private",
"original_string": "private SearchOptions searchOptions;",
"type": "SearchOptions",
"var_name": "searchOptions"
},
{
"declarator": "totalResults",
"modifier": "private",
"original_string":... | {
"body": "@Nonnull\n @Override\n public List<SearchAggregation> getAppliedAggregations() {\n return searchAggregations\n .stream()\n .filter(searchAggregation -> searchAggregation.getAppliedFilterValue().isPresent())\n .collect(Collectors.toList());\n }",
"class_met... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_49 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void getProducts() {\n\n Assert.assertEquals(\"h2\", productCarousel.getTitleType());\n\n List<ProductListItem> items = productCarousel.getProducts();\n Assert.assertEquals(4, items.size()); // one product is not found and the JSON response contains a \"faulty\" produ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productcarousel/v1/productcarousel\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productcarousel/v1/productcarousel\";",
... | {
"body": "@Override\n public List<ProductListItem> getProducts() {\n if (productsRetriever == null) {\n return Collections.emptyList();\n }\n\n List<ProductInterface> products = productsRetriever.fetchProducts();\n Collections.sort(products, Comparator.comparing(item -> base... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_32 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testNoGraphqlClient() throws Exception {\n setUp(RelationType.UPSELL_PRODUCTS, null, true);\n Assert.assertTrue(relatedProducts.getProducts().isEmpty());\n }",
"class_method_signature": "RelatedProductsImplTest.testNoGraphqlClient()",
"constructor": false,
"ful... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\";",
... | {
"body": "@Override\n public List<ProductListItem> getProducts() {\n if (productsRetriever == null || !isConfigured()) {\n return Collections.emptyList();\n }\n\n List<ProductInterface> products = productsRetriever.fetchProducts();\n if (products.isEmpty()) {\n re... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_65 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "button",
"modifier": "privat... | {
"body": "@Test\n public void testGetLinkForLinkTo() {\n\n final String expResult = \"/content/venia/language-masters/en.html\";\n context.currentResource(\"/content/linkTypeLinkToPage\");\n button = context.request().adaptTo(Button.class);\n String result = button.getLink();\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\";",
"type": "String",
"var_name": ... | {
"body": "@Override\n public String getLink() {\n return StringUtils.isNotBlank(url) ? url : DEFAULT_LINK;\n }",
"class_method_signature": "ButtonImpl.getLink()",
"constructor": false,
"full_signature": "@Override public String getLink()",
"identifier": "getLink",
"invocations": [
"isNotBl... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_73 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-searchbar.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-searchbar.json\");",
"type": "AemContext",
"var_name": "conte... | {
"body": "@Test\n public void testSearchResultPage() {\n SearchbarImpl searchbar = new SearchbarImpl();\n\n Whitebox.setInternalState(searchbar, \"currentPage\", context.currentPage(\"/content/pageA\"));\n\n Assert.assertEquals(\"/content/pageB.html\", searchbar.getSearchResultsPageUrl());\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/searchbar/v1/searchbar\"",
"modifier": "static final",
"original_string": "static final String RESOURCE_TYPE = \"core/cif/components/commerce/searchbar/v1/searchbar\";",
"type": "String",
"var_name": "RESOU... | {
"body": "@Override\n public String getSearchResultsPageUrl() {\n if (searchResultsPage == null) {\n searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage);\n }\n\n return searchResultsPage.getPath() + \".html\";\n }",
"class_method_signature": "SearchbarImpl.get... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_24 | {
"fields": [
{
"declarator": "context = new AemContext(ResourceResolverType.JCR_MOCK)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext(ResourceResolverType.JCR_MOCK);",
"type": "AemContext",
"var_name": "context"
},
... | {
"body": "@Test\n public void testReferer_invalidContext() throws IOException {\n // mock referer\n when(request.getHeader(HttpHeaders.REFERER)).thenReturn(\"/invalid/path\");\n\n // handle request\n servlet.doGet(request, response);\n\n // verify error\n verify(response)... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PreviewServlet.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PreviewServlet.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {\n\n if (WCMMode.DISABLED == WCMMode.fromRequest(request)) {\n response.sendError(HttpServletResponse.SC_FORBIDDEN, \"The request not permitted\");\n return;\n }\... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_78 | {
"fields": [
{
"declarator": "CATALOG_PAGE_PATH = \"catalog_page_path\"",
"modifier": "private static final",
"original_string": "private static final String CATALOG_PAGE_PATH = \"catalog_page_path\";",
"type": "String",
"var_name": "CATALOG_PAGE_PATH"
},
{
"declarator... | {
"body": "@Test\n public void testStructureDepthProperty() {\n\n // set up\n ValueMapDecorator properties = new ValueMapDecorator(new HashMap<>());\n Whitebox.setInternalState(navigation, \"properties\", properties);\n Style style = mock(Style.class);\n Whitebox.setInternalState... | {
"fields": [
{
"declarator": "PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\"",
"modifier": "static final",
"original_string": "static final String PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\";",
"type": "String",
"var_name": "PN_MAGENTO_ROOT_CATEGORY_ID"
},
... | {
"body": "@PostConstruct\n void initModel() {\n graphQLCategoryProvider = new GraphQLCategoryProvider(resource, currentPage);\n structureDepth = properties.get(PN_STRUCTURE_DEPTH, currentStyle.get(PN_STRUCTURE_DEPTH, DEFAULT_STRUCTURE_DEPTH));\n if (structureDepth < MIN_STRUCTURE_DEPTH) {\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_97 | {
"fields": [
{
"declarator": "PARAMETER_KEY = \"param-key\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_KEY = \"param-key\";",
"type": "String",
"var_name": "PARAMETER_KEY"
},
{
"declarator": "PARAMETER_VALUE = \"para... | {
"body": "@Test\n public void testGetNextPageParameters() {\n PagerImpl pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE), TOTAL_PAGES, CURRENT_PAGE);\n final Map<String, String> previousPageParameters = pager.getNextPageParameters();\n assertThat(previousPagePara... | {
"fields": [
{
"declarator": "MAXIMUM_PAGE_DISPLAY_COUNT = 7",
"modifier": "public static final",
"original_string": "public static final int MAXIMUM_PAGE_DISPLAY_COUNT = 7;",
"type": "int",
"var_name": "MAXIMUM_PAGE_DISPLAY_COUNT"
},
{
"declarator": "PAGINATION_RANGE_... | {
"body": "@Nonnull\n @Override\n public Map<String, String> getNextPageParameters() {\n Integer nextPage = currentPageIndex >= totalPages ? totalPages : currentPageIndex + 1;\n Map<String, String> parameters = new HashMap<>(existingQueryParameters);\n parameters.put(\"page\", nextPage.toSt... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_81 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testGetNavigationRootPage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(SiteNavigation.PN_NAV_ROOT, true);\n Page navRootPage = mockPage(properties);\n Page page0 = mockPage(null);\n Page page1 = mockPage(null);\n w... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SiteNavigation.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SiteNavigation.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Nullable\n public static Page getNavigationRootPage(Page page) {\n page = toLaunchProductionPage(page);\n\n while (page != null) {\n if (page.getContentResource().getValueMap().get(PN_NAV_ROOT, false)) {\n break;\n }\n\n page = page.getParen... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_39 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testCategorySpecificPage() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-category-breadcrumb-result.json\");\n prepareModel(\"/content/venia/us/en/products/category-page/category-specific-page\");\n\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_42 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductPageWithoutIdentifier() throws Exception {\n prepareModel(\"/content/venia/us/en/products/product-page\");\n\n // In AEM editor, there isn't any selector in the page URL\n breadcrumbModel = context.request().adaptTo(BreadcrumbImpl.class);\n List... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_15 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "servlet",
"modifier": "priva... | {
"body": "@Test\n public void testGetGraphqlClientsNoEmptyOption() throws IOException, InvalidSyntaxException {\n // Stub i18n\n I18n i18n = mock(I18n.class);\n Mockito.doReturn(\"inherit-translated\").when(i18n).get(eq(\"Inherit\"), any());\n Whitebox.setInternalState(servlet, \"i18n\... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\";",
"type": "String",
... | {
"body": "List<Resource> getGraphqlClients(@Nonnull SlingHttpServletRequest request) {\n ResourceResolver resolver = request.getResourceResolver();\n List<Resource> graphqlClients = new ArrayList<>();\n\n final Config cfg = new Config(request.getResource().getChild(Config.DATASOURCE));\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_6 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testCategoryPage() {\n request.getResource().getValueMap().put(\"pageType\", \"category\");\n request.setQueryString(\"item=/content/category-page/sub-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doGe... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_54 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testBundleProduct() throws IOException {\n Utils.setupHttpResponse(\"graphql/magento-graphql-bundleproduct-result.json\", httpClient, 200);\n productModel = context.request().adaptTo(ProductImpl.class);\n Assert.assertNotNull(\"Product model is not null\", produc... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\";",
"type": "String",
"var_n... | {
"body": "@Override\n public Boolean isBundleProduct() {\n if (isBundleProduct == null) {\n isBundleProduct = productRetriever != null && productRetriever.fetchProduct() instanceof BundleProduct;\n }\n return isBundleProduct;\n }",
"class_method_signature": "ProductImpl.isBund... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_23 | {
"fields": [
{
"declarator": "context = new AemContext(ResourceResolverType.JCR_MOCK)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext(ResourceResolverType.JCR_MOCK);",
"type": "AemContext",
"var_name": "context"
},
... | {
"body": "@Test\n public void testInvalidMode() throws IOException {\n // mock WCMMode\n request.setAttribute(WCMMode.class.getName(), WCMMode.DISABLED);\n\n // handle request\n servlet.doGet(request, response);\n\n // verify error\n verify(response).sendError(HttpServlet... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PreviewServlet.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PreviewServlet.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {\n\n if (WCMMode.DISABLED == WCMMode.fromRequest(request)) {\n response.sendError(HttpServletResponse.SC_FORBIDDEN, \"The request not permitted\");\n return;\n }\... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_74 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testMissingMagentoGraphqlClient() throws IOException {\n Page page = Mockito.spy(context.currentPage(\"/content/pageA\"));\n GraphQLCategoryProvider categoryProvider = new GraphQLCategoryProvider(page\n .getContentResource(), null);\n Assert.assertNull... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class);",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "List<CategoryTree> getChildCategories(Integer categoryId, Integer depth) {\n if (magentoGraphqlClient == null || categoryId == null) {\n LOGGER.debug(\"No Graphql client present, cannot retrieve top categories\");\n return Collections.emptyList();\n }\n\n QueryQue... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_62 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "button",
"modifier": "privat... | {
"body": "@Test\n public void testGetLinkForProduct() {\n\n final String expResult = \"/content/sample-page.blast-mini-pump.html\";\n context.currentResource(\"/content/linkTypeProduct\");\n button = context.request().adaptTo(Button.class);\n\n String result = button.getLink();\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\";",
"type": "String",
"var_name": ... | {
"body": "@Override\n public String getLink() {\n return StringUtils.isNotBlank(url) ? url : DEFAULT_LINK;\n }",
"class_method_signature": "ButtonImpl.getLink()",
"constructor": false,
"full_signature": "@Override public String getLink()",
"identifier": "getLink",
"invocations": [
"isNotBl... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_35 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductPage() throws Exception {\n graphqlClient = Mockito.spy(Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-product-breadcrumb-result.json\"));\n prepareModel(\"/content/venia/us/en/products/product-page\");\n\n MockRequestPathInfo r... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_19 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testFilterNoopWcmmode() throws IOException, ServletException {\n request.setResource(context.resourceResolver().resolve(\"/content/product-page\"));\n MockRequestPathInfo pathInfo = (MockRequestPathInfo) request.getRequestPathInfo();\n pathInfo.setSelectorString(... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;\n\n // Skip filter if there isn't any selector in the URL\n String... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_105 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testPostRequestWithVariables() throws ServletException, IOException {\n String query = \"query rootCategory($catId: Int!) {category(id: $catId){id,name,url_path}}\";\n\n GraphqlRequest graphqlRequest = new GraphqlRequest(query);\n graphqlRequest.setVariables(Coll... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphqlS... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {\n String body = IOUtils.toString(request.getReader());\n Type type = TypeToken.getParameterized(GraphqlRequest.... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_58 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void getImage() {\n productListModel = context.request().adaptTo(ProductListImpl.class);\n Assert.assertEquals(category.getImage(), productListModel.getImage());\n }",
"class_method_signature": "ProductListImplTest.getImage()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\";",
"type": "Strin... | {
"body": "@Override\n public String getImage() {\n if (getCategory() != null) {\n if (StringUtils.isEmpty(getCategory().getImage())) {\n return StringUtils.EMPTY;\n }\n return getCategory().getImage();\n } else {\n return StringUtils.EMPTY;\... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_59 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void getProducts() {\n productListModel = context.request().adaptTo(ProductListImpl.class);\n Collection<ProductListItem> products = productListModel.getProducts();\n Assert.assertNotNull(products);\n\n // We introduce one \"faulty\" product data in the respons... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\";",
"type": "Strin... | {
"body": "@Nonnull\n @Override\n public Collection<ProductListItem> getProducts() {\n if (usePlaceholderData) {\n CategoryProducts categoryProducts = getCategory().getProducts();\n ProductToProductListItemConverter converter = new ProductToProductListItemConverter(productPage, requ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_104 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testGetRequestWithVariables() throws ServletException, IOException {\n String query = \"query rootCategory($catId: Int!) {category(id: $catId){id,name,url_path}}\";\n\n Map<String, Object> params = new HashMap<>();\n params.put(\"query\", query);\n params.... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphqlS... | {
"body": "@Override\n protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {\n String query = request.getParameter(QUERY_PARAMETER);\n String operationName = request.getParameter(OPERATION_NAME_PARAMETER);\n String varia... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_18 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testFilterForwardingWithStringProperty() throws IOException, ServletException {\n request.setResource(context.resourceResolver().resolve(\"/content/product-page\"));\n MockRequestPathInfo pathInfo = (MockRequestPathInfo) request.getRequestPathInfo();\n pathInfo.s... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;\n\n // Skip filter if there isn't any selector in the URL\n String... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_34 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testContentPages() throws Exception {\n prepareModel(\"/content/venia/us/en/another-page\");\n breadcrumbModel = context.request().adaptTo(BreadcrumbImpl.class);\n Collection<NavigationItem> items = breadcrumbModel.getItems();\n assertThat(items.stream().m... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_63 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "button",
"modifier": "privat... | {
"body": "@Test\n public void testGetLinkForCategory() {\n\n final String expResult = \"/content/sample-page.11.html\";\n context.currentResource(\"/content/linkTypeCategory\");\n button = context.request().adaptTo(Button.class);\n\n String result = button.getLink();\n assertEqu... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/content/button/v1/button\";",
"type": "String",
"var_name": ... | {
"body": "@Override\n public String getLink() {\n return StringUtils.isNotBlank(url) ? url : DEFAULT_LINK;\n }",
"class_method_signature": "ButtonImpl.getLink()",
"constructor": false,
"full_signature": "@Override public String getLink()",
"identifier": "getLink",
"invocations": [
"isNotBl... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_75 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testCategoryNotOrNoChildren() throws IOException {\n Page page = mock(Page.class);\n Resource pageContent = mock(Resource.class);\n when(page.getContentResource()).thenReturn(pageContent);\n GraphQLCategoryProvider categoryProvider = new GraphQLCategoryPro... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class);",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "List<CategoryTree> getChildCategories(Integer categoryId, Integer depth) {\n if (magentoGraphqlClient == null || categoryId == null) {\n LOGGER.debug(\"No Graphql client present, cannot retrieve top categories\");\n return Collections.emptyList();\n }\n\n QueryQue... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_22 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testFilterForwardingNoSelector() throws IOException, ServletException {\n request.setResource(context.resourceResolver().resolve(\"/content/product-page\"));\n\n filter.doFilter(request, null, chain);\n\n // Verify that the request is passed unchanged down the fi... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;\n\n // Skip filter if there isn't any selector in the URL\n String... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_55 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testProductNotFound() throws IOException {\n Utils.setupHttpResponse(\"graphql/magento-graphql-product-not-found-result.json\", httpClient, 200);\n productModel = context.request().adaptTo(ProductImpl.class);\n Assert.assertFalse(\"Product is not found\", product... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\";",
"type": "String",
"var_n... | {
"body": "@Override\n public Boolean getFound() {\n return productRetriever != null && productRetriever.fetchProduct() != null;\n }",
"class_method_signature": "ProductImpl.getFound()",
"constructor": false,
"full_signature": "@Override public Boolean getFound()",
"identifier": "getFound",
"in... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_7 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testCatalogPage() {\n request.getResource().getValueMap().put(\"pageType\", \"catalog\");\n request.setQueryString(\"item=/content/catalog-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doGet(request, n... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_14 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "servlet",
"modifier": "priva... | {
"body": "@Test\n public void testGetGraphqlClients() throws IOException, InvalidSyntaxException {\n // Stub i18n\n I18n i18n = mock(I18n.class);\n Mockito.doReturn(\"inherit-translated\").when(i18n).get(eq(\"Inherit\"), any());\n Whitebox.setInternalState(servlet, \"i18n\", i18n);\n\n... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\";",
"type": "String",
... | {
"body": "List<Resource> getGraphqlClients(@Nonnull SlingHttpServletRequest request) {\n ResourceResolver resolver = request.getResourceResolver();\n List<Resource> graphqlClients = new ArrayList<>();\n\n final Config cfg = new Config(request.getResource().getChild(Config.DATASOURCE));\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_43 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testCategoryPageWithoutIdentifier() throws Exception {\n prepareModel(\"/content/venia/us/en/products/category-page\");\n\n // In AEM editor, there isn't any selector in the page URL\n breadcrumbModel = context.request().adaptTo(BreadcrumbImpl.class);\n Li... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_38 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testCategoryPage() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-category-breadcrumb-result.json\");\n prepareModel(\"/content/venia/us/en/products/category-page\");\n\n MockRequestPathInfo requestPath... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_80 | {
"fields": [
{
"declarator": "CATALOG_PAGE_PATH = \"catalog_page_path\"",
"modifier": "private static final",
"original_string": "private static final String CATALOG_PAGE_PATH = \"catalog_page_path\";",
"type": "String",
"var_name": "CATALOG_PAGE_PATH"
},
{
"declarator... | {
"body": "@Test\n public void testNavigationPagesHierarchy() {\n // check the properties of a navigation item related to a normal page\n\n String pageTitle = \"Page 1\";\n String pageURL = \"/page1\";\n boolean active = true;\n\n NavigationItem item = mock(NavigationItem.class);... | {
"fields": [
{
"declarator": "PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\"",
"modifier": "static final",
"original_string": "static final String PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\";",
"type": "String",
"var_name": "PN_MAGENTO_ROOT_CATEGORY_ID"
},
... | {
"body": "@Override\n public List<NavigationItem> getItems() {\n if (items == null) {\n items = new ArrayList<>();\n PageManager pageManager = currentPage.getPageManager();\n for (com.adobe.cq.wcm.core.components.models.NavigationItem wcmItem : wcmNavigation.getItems()) {\n... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_79 | {
"fields": [
{
"declarator": "CATALOG_PAGE_PATH = \"catalog_page_path\"",
"modifier": "private static final",
"original_string": "private static final String CATALOG_PAGE_PATH = \"catalog_page_path\";",
"type": "String",
"var_name": "CATALOG_PAGE_PATH"
},
{
"declarator... | {
"body": "@Test\n public void testNavigationPagesOnly() {\n // check the properties of a navigation item related to a normal page\n\n String pageTitle = \"Page 1\";\n String pageURL = \"/page1\";\n boolean active = true;\n\n NavigationItem item = mock(NavigationItem.class);\n ... | {
"fields": [
{
"declarator": "PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\"",
"modifier": "static final",
"original_string": "static final String PN_MAGENTO_ROOT_CATEGORY_ID = \"magentoRootCategoryId\";",
"type": "String",
"var_name": "PN_MAGENTO_ROOT_CATEGORY_ID"
},
... | {
"body": "@Override\n public List<NavigationItem> getItems() {\n if (items == null) {\n items = new ArrayList<>();\n PageManager pageManager = currentPage.getPageManager();\n for (com.adobe.cq.wcm.core.components.models.NavigationItem wcmItem : wcmNavigation.getItems()) {\n... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_96 | {
"fields": [
{
"declarator": "PARAMETER_KEY = \"param-key\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_KEY = \"param-key\";",
"type": "String",
"var_name": "PARAMETER_KEY"
},
{
"declarator": "PARAMETER_VALUE = \"para... | {
"body": "@Test\n public void testGetPreviousPageParameters() {\n PagerImpl pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE), TOTAL_PAGES, CURRENT_PAGE);\n final Map<String, String> previousPageParameters = pager.getPreviousPageParameters();\n assertThat(previous... | {
"fields": [
{
"declarator": "MAXIMUM_PAGE_DISPLAY_COUNT = 7",
"modifier": "public static final",
"original_string": "public static final int MAXIMUM_PAGE_DISPLAY_COUNT = 7;",
"type": "int",
"var_name": "MAXIMUM_PAGE_DISPLAY_COUNT"
},
{
"declarator": "PAGINATION_RANGE_... | {
"body": "@Nonnull\n @Override\n public Map<String, String> getPreviousPageParameters() {\n Integer previousPage = currentPageIndex <= 1 ? 1 : currentPageIndex - 1;\n Map<String, String> parameters = new HashMap<>(existingQueryParameters);\n parameters.put(\"page\", previousPage.toString()... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_56 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testClientLoadingIsDisabledOnLaunchPage() {\n productModel = context.request().adaptTo(ProductImpl.class);\n Assert.assertTrue(productModel.loadClientPrice());\n Page launch = context.pageManager().getPage(\"/content/launches/2020/09/14/mylaunch\" + PAGE);\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/product/v1/product\";",
"type": "String",
"var_n... | {
"body": "@Override\n public Boolean loadClientPrice() {\n return loadClientPrice && !LaunchUtils.isLaunchBasedPath(currentPage.getPath());\n }",
"class_method_signature": "ProductImpl.loadClientPrice()",
"constructor": false,
"full_signature": "@Override public Boolean loadClientPrice()",
"iden... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_4 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testProductIdentifierParsingInSelector() {\n MockRequestPathInfo requestPathInfo = (MockRequestPathInfo) context.request().getRequestPathInfo();\n\n // For example for lazy loading, we have two selectors and the id is in the last position\n requestPathInfo.setSel... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(UrlProviderImpl.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) {\n return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request));\n }",
"class_method_signature": "UrlProviderImpl.getProductIdentif... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_17 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "servlet",
"modifier": "priva... | {
"body": "@Test\n public void testUnbindGraphqlClient() {\n GraphqlClient mockClient = mock(GraphqlClient.class);\n Mockito.doReturn(\"my-identifier\").when(mockClient).getIdentifier();\n\n Set<String> identifiers = new HashSet<>(Arrays.asList(\"my-identifier\", \"another-identifier\"));\n ... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\";",
"type": "String",
... | {
"body": "void unbindGraphqlClient(GraphqlClient graphqlClient, Map<?, ?> properties) {\n identifiers.remove(graphqlClient.getIdentifier());\n }",
"class_method_signature": "GraphqlClientDataSourceServlet.unbindGraphqlClient(GraphqlClient graphqlClient, Map<?, ?> properties)",
"constructor": false,
"... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_40 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductPageWithCatalogPage() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-product-breadcrumb-result.json\");\n prepareModel(\"/content/venia/us/en/products/product-page\");\n\n MockRequestPathInfo... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_83 | {
"fields": [
{
"declarator": "MOCK_CONFIGURATION = new ValueMapDecorator(ImmutableMap.of(\"cq:graphqlClient\", \"default\", \"magentoStore\",\n \"my-store\"))",
"modifier": "private static final",
"original_string": "private static final ValueMap MOCK_CONFIGURATION = new ValueMapDecorato... | {
"body": "@Test\n public void testError() {\n // Get page which has the magentoStore property in its jcr:content node\n Resource resource = Mockito.spy(context.resourceResolver().getResource(\"/content/pageG\"));\n MagentoGraphqlClient client = MagentoGraphqlClient.create(resource);\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MagentoGraphqlClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MagentoGraphqlClient.class);",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public static MagentoGraphqlClient create(Resource resource) {\n PageManager pageManager = resource.adaptTo(PageManager.class);\n return create(resource, pageManager != null ? pageManager.getContainingPage(resource) : null);\n }",
"class_method_signature": "MagentoGraphqlClient.create(Re... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_95 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testExtendProductQuery() {\n\n SearchOptionsImpl searchOptions = new SearchOptionsImpl();\n searchOptions.setPageSize(6);\n searchOptions.setSearchQuery(SEARCH_QUERY);\n searchOptions.setCurrentPage(1);\n\n serviceUnderTest.performSearch(\n ... | {
"fields": [
{
"declarator": "searchFilterService",
"modifier": "@Reference",
"original_string": "@Reference\n SearchFilterService searchFilterService;",
"type": "SearchFilterService",
"var_name": "searchFilterService"
},
{
"declarator": "urlProvider = null",
... | {
"body": "@Nonnull\n @Override\n public SearchResultsSet performSearch(\n final SearchOptions searchOptions,\n final Resource resource,\n final Page productPage,\n final SlingHttpServletRequest request) {\n return performSearch(searchOptions, resource, productPage, request, n... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_8 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testNotCatalogPage() {\n request.getResource().getValueMap().put(\"pageType\", \"catalog\");\n request.setQueryString(\"item=/content/category-page/sub-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doG... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_37 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductSpecificPageOnLaunch() throws Exception {\n context.registerAdapter(Resource.class, Launch.class, (Function<Resource, Launch>) resource -> new MockLaunch(resource));\n context.request().setContextPath(\"\");\n\n graphqlClient = Utils.setupGraphqlClient... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_60 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testMissingSelectorOnPublish() throws IOException {\n SlingBindings slingBindings = (SlingBindings) context.request().getAttribute(SlingBindings.class.getName());\n SightlyWCMMode wcmMode = mock(SightlyWCMMode.class);\n when(wcmMode.isDisabled()).thenReturn(true)... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\";",
"type": "Strin... | {
"body": "@Nonnull\n @Override\n public Collection<ProductListItem> getProducts() {\n if (usePlaceholderData) {\n CategoryProducts categoryProducts = getCategory().getProducts();\n ProductToProductListItemConverter converter = new ProductToProductListItemConverter(productPage, requ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_99 | {
"fields": [
{
"declarator": "PARAMETER_KEY = \"param-key\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_KEY = \"param-key\";",
"type": "String",
"var_name": "PARAMETER_KEY"
},
{
"declarator": "PARAMETER_VALUE = \"para... | {
"body": "@Test\n public void testUsesPageSubsetWhenOverMaxPageResults() {\n PagerImpl pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE), PagerImpl.MAXIMUM_PAGE_DISPLAY_COUNT + 1,\n 5);\n assertThat(pager.getPages()).hasSize(PagerImpl.PAGINATION_RANGE_SIZE + 2... | {
"fields": [
{
"declarator": "MAXIMUM_PAGE_DISPLAY_COUNT = 7",
"modifier": "public static final",
"original_string": "public static final int MAXIMUM_PAGE_DISPLAY_COUNT = 7;",
"type": "int",
"var_name": "MAXIMUM_PAGE_DISPLAY_COUNT"
},
{
"declarator": "PAGINATION_RANGE_... | {
"body": "@Nonnull\n @Override\n public List<PagerPage> getPages() {\n\n List<PagerPage> pages = new ArrayList<>();\n\n for (int currentIndex = 1; currentIndex <= totalPages; currentIndex++) {\n Map<String, String> pageParameters = new HashMap<>(existingQueryParameters);\n p... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_76 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testGetChildCategories() throws IOException {\n Page page = spy(context.currentPage(\"/content/pageA\"));\n Resource pageContent = spy(page.getContentResource());\n when(page.getContentResource()).thenReturn(pageContent);\n\n when(pageContent.adaptTo(Graph... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class);",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "List<CategoryTree> getChildCategories(Integer categoryId, Integer depth) {\n if (magentoGraphqlClient == null || categoryId == null) {\n LOGGER.debug(\"No Graphql client present, cannot retrieve top categories\");\n return Collections.emptyList();\n }\n\n QueryQue... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_21 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testFilterForwardingNoMatch() throws IOException, ServletException {\n request.setResource(context.resourceResolver().resolve(\"/content/product-page\"));\n MockRequestPathInfo pathInfo = (MockRequestPathInfo) request.getRequestPathInfo();\n pathInfo.setSelectorS... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;\n\n // Skip filter if there isn't any selector in the URL\n String... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_20 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testFilterForwardingWithStringArrayProperty() throws IOException, ServletException {\n request.setResource(context.resourceResolver().resolve(\"/content/category-page\"));\n MockRequestPathInfo pathInfo = (MockRequestPathInfo) request.getRequestPathInfo();\n path... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SpecificPageFilterFactory.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;\n\n // Skip filter if there isn't any selector in the URL\n String... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_98 | {
"fields": [
{
"declarator": "PARAMETER_KEY = \"param-key\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_KEY = \"param-key\";",
"type": "String",
"var_name": "PARAMETER_KEY"
},
{
"declarator": "PARAMETER_VALUE = \"para... | {
"body": "@Test\n public void testPageEdgeConditionsProvidePage() {\n PagerImpl pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE), 1, 1);\n assertThat(pager.getPages()).hasSize(1);\n\n pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE),... | {
"fields": [
{
"declarator": "MAXIMUM_PAGE_DISPLAY_COUNT = 7",
"modifier": "public static final",
"original_string": "public static final int MAXIMUM_PAGE_DISPLAY_COUNT = 7;",
"type": "int",
"var_name": "MAXIMUM_PAGE_DISPLAY_COUNT"
},
{
"declarator": "PAGINATION_RANGE_... | {
"body": "@Nonnull\n @Override\n public List<PagerPage> getPages() {\n\n List<PagerPage> pages = new ArrayList<>();\n\n for (int currentIndex = 1; currentIndex <= totalPages; currentIndex++) {\n Map<String, String> pageParameters = new HashMap<>(existingQueryParameters);\n p... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_77 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testDefineCategoriesQuery() {\n final String coreString = extractQueryString(-1);\n Assert.assertNotNull(coreString);\n Assert.assertTrue(coreString.trim().length() > 0);\n\n // depth 0\n Assert.assertEquals(coreString, extractQueryString(0));\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class);",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) {\n if (depth <= 0) {\n return CATEGORIES_QUERY::apply;\n } else {\n return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1));\n }\n }",
"class_method_signature": "Gra... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_61 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testSorting() {\n productListModel = context.request().adaptTo(ProductListImpl.class);\n SearchResultsSet resultSet = productListModel.getSearchResultsSet();\n Assert.assertNotNull(resultSet);\n Assert.assertTrue(resultSet.hasSorting());\n Sorter so... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\";",
"type": "Strin... | {
"body": "@Nonnull\n @Override\n public SearchResultsSet getSearchResultsSet() {\n if (searchResultsSet == null) {\n searchResultsSet = getCategorySearchResultsSet().getRight();\n\n ((SearchResultsSetImpl) searchResultsSet).setSearchAggregations(\n searchResultsSet.g... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_36 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductSpecificPage() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-product-breadcrumb-result.json\");\n prepareModel(\"/content/venia/us/en/products/product-page/product-specific-page\");\n\n // W... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_9 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testNotProductPage() {\n request.getResource().getValueMap().put(\"pageType\", \"product\");\n request.setQueryString(\"item=/content/category-page/sub-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doG... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_94 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testPerformSearch() {\n\n SearchOptionsImpl searchOptions = new SearchOptionsImpl();\n searchOptions.setPageSize(6);\n searchOptions.setSearchQuery(SEARCH_QUERY);\n searchOptions.setCurrentPage(1);\n\n Map<String, String> filters = new HashMap<>();\... | {
"fields": [
{
"declarator": "searchFilterService",
"modifier": "@Reference",
"original_string": "@Reference\n SearchFilterService searchFilterService;",
"type": "SearchFilterService",
"var_name": "searchFilterService"
},
{
"declarator": "urlProvider = null",
... | {
"body": "@Nonnull\n @Override\n public SearchResultsSet performSearch(\n final SearchOptions searchOptions,\n final Resource resource,\n final Page productPage,\n final SlingHttpServletRequest request) {\n return performSearch(searchOptions, resource, productPage, request, n... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_82 | {
"fields": [
{
"declarator": "MOCK_CONFIGURATION = new ValueMapDecorator(ImmutableMap.of(\"cq:graphqlClient\", \"default\", \"magentoStore\",\n \"my-store\"))",
"modifier": "private static final",
"original_string": "private static final ValueMap MOCK_CONFIGURATION = new ValueMapDecorato... | {
"body": "@Test\n public void testMagentoStorePropertyWithConfigBuilder() {\n Page pageWithConfig = Mockito.spy(context.pageManager().getPage(PAGE_A));\n Resource pageResource = Mockito.spy(pageWithConfig.adaptTo(Resource.class));\n when(pageWithConfig.adaptTo(Resource.class)).thenReturn(page... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MagentoGraphqlClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MagentoGraphqlClient.class);",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public static MagentoGraphqlClient create(Resource resource) {\n PageManager pageManager = resource.adaptTo(PageManager.class);\n return create(resource, pageManager != null ? pageManager.getContainingPage(resource) : null);\n }",
"class_method_signature": "MagentoGraphqlClient.create(Re... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_41 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content-breadcrumb.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content-breadcrumb.json\");",
"type": "AemContext",
... | {
"body": "@Test\n public void testProductPageWithSku() throws Exception {\n graphqlClient = Utils.setupGraphqlClientWithHttpResponseFrom(\"graphql/magento-graphql-product-breadcrumb-result.json\");\n prepareModel(\"/content/venia/us/en/products/product-page\");\n\n MockUrlProviderConfiguratio... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/structure/breadcrumb/v1/breadcrumb\";",
"type": "String"... | {
"body": "@Override\n public Collection<NavigationItem> getItems() {\n // Useful for the template editor\n if (!currentPage.getPath().startsWith(\"/content\")) {\n return Collections.emptyList();\n }\n\n if (items == null) {\n items = new ArrayList<>();\n ... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_16 | {
"fields": [
{
"declarator": "context = new AemContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public AemContext context = new AemContext();",
"type": "AemContext",
"var_name": "context"
},
{
"declarator": "servlet",
"modifier": "priva... | {
"body": "@Test\n public void testBindGraphqlClient() {\n GraphqlClient mockClient = mock(GraphqlClient.class);\n Mockito.doReturn(\"my-identifier\").when(mockClient).getIdentifier();\n\n servlet.bindGraphqlClient(mockClient, Collections.emptyMap());\n\n Set<String> identifiers = (Set<... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/page/v1/datasource/graphqlclients\";",
"type": "String",
... | {
"body": "@Reference(\n service = GraphqlClient.class,\n bind = \"bindGraphqlClient\",\n unbind = \"unbindGraphqlClient\",\n cardinality = ReferenceCardinality.MULTIPLE,\n policy = ReferencePolicy.DYNAMIC)\n void bindGraphqlClient(GraphqlClient graphqlClient, Map<?, ?> propertie... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_5 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-page-filter.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-page-filter.json\");",
"type": "AemContext",
"var_name": "c... | {
"body": "@Test\n public void testProductPage() {\n request.getResource().getValueMap().put(\"pageType\", \"product\");\n request.setQueryString(\"item=/content/product-page/sub-page\");\n request.setPathInfo(\"/mnt/overlay/wcm/core/content/sites/properties.html\");\n\n servlet.doGet(r... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\"",
"modifier": "public final static",
"original_string": "public final static String RESOURCE_TYPE = \"core/cif/components/renderconditions/pagetype\";",
"type": "String",
"var_name": "RES... | {
"body": "@Override\n protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) {\n String pageType = request.getResource().getValueMap().get(PAGE_TYPE_PROPERTY, \"\");\n request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_57 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void getTitle() {\n productListModel = context.request().adaptTo(ProductListImpl.class);\n Assert.assertEquals(category.getName(), productListModel.getTitle());\n }",
"class_method_signature": "ProductListImplTest.getTitle()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/productlist/v1/productlist\";",
"type": "Strin... | {
"body": "@Nullable\n @Override\n public String getTitle() {\n return getCategory() != null ? getCategory().getName()\n : StringUtils.EMPTY;\n }",
"class_method_signature": "ProductListImpl.getTitle()",
"constructor": false,
"full_signature": "@Nullable @Override public String getTit... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_101 | {
"fields": [
{
"declarator": "PARAMETER_KEY = \"param-key\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_KEY = \"param-key\";",
"type": "String",
"var_name": "PARAMETER_KEY"
},
{
"declarator": "PARAMETER_VALUE = \"para... | {
"body": "@Test\n public void testAlwaysReturnsFirstAndLastPage() {\n PagerImpl pager = new PagerImpl(Collections.singletonMap(PARAMETER_KEY, PARAMETER_VALUE), TOTAL_PAGES, 1);\n assertThat(pager.getPages().stream().map(page -> page.getPageNumber()).collect(Collectors.toList()))\n .contai... | {
"fields": [
{
"declarator": "MAXIMUM_PAGE_DISPLAY_COUNT = 7",
"modifier": "public static final",
"original_string": "public static final int MAXIMUM_PAGE_DISPLAY_COUNT = 7;",
"type": "int",
"var_name": "MAXIMUM_PAGE_DISPLAY_COUNT"
},
{
"declarator": "PAGINATION_RANGE_... | {
"body": "@Nonnull\n @Override\n public List<PagerPage> getPages() {\n\n List<PagerPage> pages = new ArrayList<>();\n\n for (int currentIndex = 1; currentIndex <= totalPages; currentIndex++) {\n Map<String, String> pageParameters = new HashMap<>(existingQueryParameters);\n p... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
184471389_31 | {
"fields": [
{
"declarator": "context = createContext(\"/context/jcr-content.json\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final AemContext context = createContext(\"/context/jcr-content.json\");",
"type": "AemContext",
"var_name": "context"
... | {
"body": "@Test\n public void testIsNotConfigured() throws Exception {\n setUp(RelationType.CROSS_SELL_PRODUCTS, \"graphql/magento-graphql-crosssellproducts-result.json\", false);\n Assert.assertTrue(relatedProducts.getProducts().isEmpty());\n }",
"class_method_signature": "RelatedProductsImplT... | {
"fields": [
{
"declarator": "RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\"",
"modifier": "protected static final",
"original_string": "protected static final String RESOURCE_TYPE = \"core/cif/components/commerce/relatedproducts/v1/relatedproducts\";",
... | {
"body": "@Override\n public List<ProductListItem> getProducts() {\n if (productsRetriever == null || !isConfigured()) {\n return Collections.emptyList();\n }\n\n List<ProductInterface> products = productsRetriever.fetchProducts();\n if (products.isEmpty()) {\n re... | {
"created": "5/1/2019 7:40:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 184471389,
"size": null,
"stargazer_count": null,
"stars": 31,
"updates": "2020-01-23T15:44:10+00:00",
"url": "https://github.com/adobe/aem-core-ci... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.