id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
6500041_57 | {
"fields": [],
"file": "bakemono/src/test/java/com/ontology2/bakemono/jena/TestWritableNode.java",
"identifier": "TestWritableNode",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void serializeAndDeserializeURI() throws IOException {\n Node n1=Node.createURI(\"http://example.com/ZZZ\");\n assertEquals(\"http://example.com/ZZZ\",n1.getURI());\n \n WritableNode wn1=new WritableNode(n1);\n WritableNode wn2=new WritableNode(null);\n\... | {
"fields": [
{
"declarator": "innerNode",
"modifier": "",
"original_string": "Node innerNode;",
"type": "Node",
"var_name": "innerNode"
},
{
"declarator": "URI=0",
"modifier": "final static",
"original_string": "final static int URI=0;",
"type": "int"... | {
"body": "public Node getNode() {\n return innerNode;\n }",
"class_method_signature": "WritableNode.getNode()",
"constructor": false,
"full_signature": "public Node getNode()",
"identifier": "getNode",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "Node",
"signat... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_41 | {
"fields": [
{
"declarator": "MAX_STRING_LENGTH=63999",
"modifier": "static final",
"original_string": "static final int MAX_STRING_LENGTH=63999;",
"type": "int",
"var_name": "MAX_STRING_LENGTH"
},
{
"declarator": "pse3mapper",
"modifier": "",
"original_str... | {
"body": "@Test\n public void rejectsABadTriple() throws IOException, InterruptedException {\n pse3mapper.map(\n new LongWritable(24562L),\n new Text(\"<http://example.com/A>\\t<http://example.com/B>\\t\\\"2001-06\\\"^^xsd:datetime.\"),\n mockContext);\n\n ... | {
"fields": [
{
"declarator": "ONE = new LongWritable(1)",
"modifier": "private static final",
"original_string": "private static final LongWritable ONE = new LongWritable(1);",
"type": "LongWritable",
"var_name": "ONE"
},
{
"declarator": "logger = LogFactory.getLog(PSE... | {
"body": "@Override\n public void map(LongWritable arg0, Text arg1, Context c) throws IOException, InterruptedException {\n PrimitiveTriple row3=p3Codec.decode(arg1.toString());\n try {\n String rawSubject = nodePreprocessor.apply(row3.getSubject());\n String rawPredicate = nod... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_16 | {
"fields": [
{
"declarator": "mapper",
"modifier": "private",
"original_string": "private FreebaseRDFMapper mapper;",
"type": "FreebaseRDFMapper",
"var_name": "mapper"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context ... | {
"body": "@Test\n public void rejectsCompleteGarbage() throws IOException,\n InterruptedException {\n mapper.map(new LongWritable(1L),\n new Text(\"Furkle murkle yurkle urkle\"), context);\n verify(context).getCounter(FreebasePrefilterCounter.IGNORED);\n verifyNoMoreInteract... | {
"fields": [
{
"declarator": "logger = LogFactory.getLog(FreebaseRDFMapper.class)",
"modifier": "private static",
"original_string": "private static org.apache.commons.logging.Log logger = LogFactory.getLog(FreebaseRDFMapper.class);",
"type": "org.apache.commons.logging.Log",
"var_n... | {
"body": "@Override\n public void map(LongWritable k, Text v,Context c) throws IOException, InterruptedException {\n\n String line=v.toString();\n if (line.startsWith(\"@prefix\")) {\n incrementCounter(c,FreebasePrefilterCounter.PREFIX_DECL,1L);\n return;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_27 | {
"fields": [
{
"declarator": "mapper",
"modifier": "private",
"original_string": "private FreebaseRDFMapper mapper;",
"type": "FreebaseRDFMapper",
"var_name": "mapper"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context ... | {
"body": "@Test\n public void arnoldSchwarzeneggerAfactIsIgnored() throws IOException, InterruptedException {\n String extraordinaryTriple = \"<http://rdf.freebase.com/ns/m.0tc7> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdf.freebase.com/ns/film.actor> .\";\n mapper.map(new LongWrita... | {
"fields": [
{
"declarator": "logger = LogFactory.getLog(FreebaseRDFMapper.class)",
"modifier": "private static",
"original_string": "private static org.apache.commons.logging.Log logger = LogFactory.getLog(FreebaseRDFMapper.class);",
"type": "org.apache.commons.logging.Log",
"var_n... | {
"body": "@Override\n public void map(LongWritable k, Text v,Context c) throws IOException, InterruptedException {\n\n String line=v.toString();\n if (line.startsWith(\"@prefix\")) {\n incrementCounter(c,FreebasePrefilterCounter.PREFIX_DECL,1L);\n return;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_31 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "AcceptWithMatchingKeyReducer<Text,Text> that;",
"type": "AcceptWithMatchingKeyReducer<Text,Text>",
"var_name": "that"
},
{
"declarator": "context",
"modifier": "",
"original_string": "... | {
"body": "@Test\n public void rejectsIfNoFacts() throws IOException, InterruptedException {\n TaggedTextItem key=new TaggedTextItem(\n new Text(\"xanadu\")\n ,1);\n\n Iterable<TaggedItem<Text>> stream=new ArrayList<TaggedItem<Text>>() {{\n add(new TaggedTextI... | {
"fields": [
{
"declarator": "ONE = new VIntWritable(1)",
"modifier": "final static",
"original_string": "final static VIntWritable ONE = new VIntWritable(1);",
"type": "VIntWritable",
"var_name": "ONE"
},
{
"declarator": "TWO = new VIntWritable(2)",
"modifier": ... | {
"body": "@Override\n protected void reduce(TaggedItem<K> key, Iterable<TaggedItem<V>> values, Context context) throws IOException, InterruptedException {\n PeekingIterator<TaggedItem<V>> pi = Iterators.peekingIterator(values.iterator());\n boolean foundObject = false;\n\n while (pi.hasNext()... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_66 | {
"fields": [
{
"declarator": "extractIsATool",
"modifier": "@Resource",
"original_string": "@Resource\n ExtractIsATool extractIsATool;",
"type": "ExtractIsATool",
"var_name": "extractIsATool"
}
],
"file": "bakemono/src/test/java/com/ontology2/bakemono/entityCentric/Extrac... | {
"body": "@Test\n public void parsesMultiplePathsCorrectly() throws IllegalAccessException {\n List<String> arguments= Lists.newArrayList(\n \"-dir\",\n \"s3n://basekb-now/2013-12-08-00-00/sieved\",\n \"-input\",\n \"a,label\",\n \"... | {
"fields": [],
"file": "bakemono/src/main/java/com/ontology2/bakemono/entityCentric/ExtractIsATool.java",
"identifier": "ExtractIsATool",
"interfaces": "",
"methods": [
{
"class_method_signature": "ExtractIsATool.run(String[] strings)",
"constructor": false,
"full_signature": "@Override... | {
"body": "ExtractIsAOptions extractOptions(List<String> strings) throws IllegalAccessException {\n OptionParser parser=new OptionParser(ExtractIsAOptions.class);\n applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);\n\n ExtractIsAOptions options=(ExtractIsAOptions) parser.pa... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_11 | {
"fields": [
{
"declarator": "mapper",
"modifier": "private",
"original_string": "private FreebaseRDFMapper mapper;",
"type": "FreebaseRDFMapper",
"var_name": "mapper"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context ... | {
"body": "@Test\n public void testSplitTriple() throws Exception {\n List<String> parts = splitTriple(\"ns:aviation.aircraft.first_flight\\tns:type.property.unique\\ttrue.\");\n assertEquals(3, parts.size());\n assertEquals(\"ns:aviation.aircraft.first_flight\", parts.get(0));\n assert... | {
"fields": [
{
"declarator": "logger = LogFactory.getLog(FreebaseRDFMapper.class)",
"modifier": "private static",
"original_string": "private static org.apache.commons.logging.Log logger = LogFactory.getLog(FreebaseRDFMapper.class);",
"type": "org.apache.commons.logging.Log",
"var_n... | {
"body": "static List<String> splitTriple(String obj) throws InvalidNodeException {\n if (!obj.endsWith(\".\")) {\n throw new InvalidNodeException();\n }\n\n obj=obj.substring(0,obj.length()-1);\n List<String> parts=Lists.newArrayList(lineSplitter.split(obj));\n if (part... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_46 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "TestTool that;",
"type": "TestTool",
"var_name": "that"
}
],
"file": "bakemono/src/test/java/com/ontology2/bakemono/mapreduce/TestSelfAwareTool.java",
"identifier": "TestSelfAwareTool",
"interfaces"... | {
"body": "@Test\n public void mapperClass() {\n assertEquals(TestMapper.class,that.getMapperClass());\n }",
"class_method_signature": "TestSelfAwareTool.mapperClass()",
"constructor": false,
"full_signature": "@Test public void mapperClass()",
"identifier": "mapperClass",
"invocations": [
... | {
"fields": [
{
"declarator": "LOG= LogFactory.getLog(SelfAwareTool.class)",
"modifier": "",
"original_string": "Log LOG= LogFactory.getLog(SelfAwareTool.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "beanName",
"modifier": "",
"original_stri... | {
"body": "@Override\n protected Class<? extends Mapper> getMapperClass() {\n String thisClass=getClass().getName();\n if(thisClass.endsWith(\"Tool\")) {\n thisClass=thisClass.substring(0,thisClass.length()-4);\n }\n\n String tryMapper=thisClass+\"Mapper\";\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_50 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "TestTool that;",
"type": "TestTool",
"var_name": "that"
}
],
"file": "bakemono/src/test/java/com/ontology2/bakemono/mapreduce/TestSelfAwareTool.java",
"identifier": "TestSelfAwareTool",
"interfaces"... | {
"body": "@Test\n public void mapOutputValueClass() {\n assertEquals(BloomFilter.class,that.getMapOutputValueClass());\n }",
"class_method_signature": "TestSelfAwareTool.mapOutputValueClass()",
"constructor": false,
"full_signature": "@Test public void mapOutputValueClass()",
"identifier": "mapO... | {
"fields": [
{
"declarator": "LOG= LogFactory.getLog(SelfAwareTool.class)",
"modifier": "",
"original_string": "Log LOG= LogFactory.getLog(SelfAwareTool.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "beanName",
"modifier": "",
"original_stri... | {
"body": "@Override\n public Class<? extends Writable> getMapOutputValueClass() {\n Type[] parameters= TypeDetective.sniffTypeParameters(getMapperClass(), Mapper.class);\n return toWritableClass(parameters[3]);\n }",
"class_method_signature": "SelfAwareTool.getMapOutputValueClass()",
"constru... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_2 | {
"fields": [
{
"declarator": "codec",
"modifier": "private",
"original_string": "private PrimitiveTripleCodec codec;",
"type": "PrimitiveTripleCodec",
"var_name": "codec"
},
{
"declarator": "X=\"<http://example.com/X>\"",
"modifier": "final static",
"origin... | {
"body": "@Test\n public void parsesATabbyTriple() {\n String in=X+\"\\t\"+Y+\"\\t \"+Z+\"\\t.\";\n PrimitiveTriple out=codec.decode(in);\n assertEquals(X,out.getSubject());\n assertEquals(Y,out.getPredicate());\n assertEquals(Z,out.getObject());\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "tripleSplitter=Splitter.on(CharMatcher.WHITESPACE).omitEmptyStrings().limit(3)",
"modifier": "final",
"original_string": "final Splitter tripleSplitter=Splitter.on(CharMatcher.WHITESPACE).omitEmptyStrings().limit(3);",
"type": "Splitter",
"var_name": "t... | {
"body": "@Override\n public PrimitiveTriple decode(String obj) {\n Iterator<String> parts=tripleSplitter.split(obj).iterator();\n String subject = parts.next();\n String predicate = parts.next();\n String object = trimObject(parts.next());\n return new PrimitiveTriple(subject,p... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_3 | {
"fields": [
{
"declarator": "codec",
"modifier": "private",
"original_string": "private PrimitiveTripleCodec codec;",
"type": "PrimitiveTripleCodec",
"var_name": "codec"
},
{
"declarator": "X=\"<http://example.com/X>\"",
"modifier": "final static",
"origin... | {
"body": "@Test\n public void parsesALiteralTriple() {\n String in=X+\"\\t\"+Y+\"\\t \"+L1+\"\\t.\";\n PrimitiveTriple out=codec.decode(in);\n assertEquals(X,out.getSubject());\n assertEquals(Y,out.getPredicate());\n assertEquals(L1,out.getObject());\n }",
"class_method_sig... | {
"fields": [
{
"declarator": "tripleSplitter=Splitter.on(CharMatcher.WHITESPACE).omitEmptyStrings().limit(3)",
"modifier": "final",
"original_string": "final Splitter tripleSplitter=Splitter.on(CharMatcher.WHITESPACE).omitEmptyStrings().limit(3);",
"type": "Splitter",
"var_name": "t... | {
"body": "@Override\n public PrimitiveTriple decode(String obj) {\n Iterator<String> parts=tripleSplitter.split(obj).iterator();\n String subject = parts.next();\n String predicate = parts.next();\n String object = trimObject(parts.next());\n return new PrimitiveTriple(subject,p... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_51 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "TestTool that;",
"type": "TestTool",
"var_name": "that"
}
],
"file": "bakemono/src/test/java/com/ontology2/bakemono/mapreduce/TestSelfAwareTool.java",
"identifier": "TestSelfAwareTool",
"interfaces"... | {
"body": "@Test\n public void outputKeyClass() {\n assertEquals(VIntWritable.class,that.getOutputKeyClass());\n }",
"class_method_signature": "TestSelfAwareTool.outputKeyClass()",
"constructor": false,
"full_signature": "@Test public void outputKeyClass()",
"identifier": "outputKeyClass",
"inv... | {
"fields": [
{
"declarator": "LOG= LogFactory.getLog(SelfAwareTool.class)",
"modifier": "",
"original_string": "Log LOG= LogFactory.getLog(SelfAwareTool.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "beanName",
"modifier": "",
"original_stri... | {
"body": "@Override\n public Class<? extends Writable> getOutputKeyClass() {\n Type[] parameters= TypeDetective.sniffTypeParameters(getReducerClass(), Reducer.class);\n return toWritableClass(parameters[2]);\n }",
"class_method_signature": "SelfAwareTool.getOutputKeyClass()",
"constructor": f... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_47 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "TestTool that;",
"type": "TestTool",
"var_name": "that"
}
],
"file": "bakemono/src/test/java/com/ontology2/bakemono/mapreduce/TestSelfAwareTool.java",
"identifier": "TestSelfAwareTool",
"interfaces"... | {
"body": "@Test\n public void reducerClass() {\n assertEquals(TestReducer.class,that.getReducerClass());\n }",
"class_method_signature": "TestSelfAwareTool.reducerClass()",
"constructor": false,
"full_signature": "@Test public void reducerClass()",
"identifier": "reducerClass",
"invocations": ... | {
"fields": [
{
"declarator": "LOG= LogFactory.getLog(SelfAwareTool.class)",
"modifier": "",
"original_string": "Log LOG= LogFactory.getLog(SelfAwareTool.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "beanName",
"modifier": "",
"original_stri... | {
"body": "@Override\n protected Class<? extends Reducer> getReducerClass() {\n String thisClass=getClass().getName();\n if(thisClass.endsWith(\"Tool\")) {\n thisClass=thisClass.substring(0,thisClass.length()-4);\n }\n\n String tryMapper=thisClass+\"Reducer\";\n try {... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_10 | {
"fields": [
{
"declarator": "mapper",
"modifier": "private",
"original_string": "private FreebaseRDFMapper mapper;",
"type": "FreebaseRDFMapper",
"var_name": "mapper"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context ... | {
"body": "@Test\n public void testSplitPrefix() throws InvalidPrefixException {\n List<String> parts = splitPrefixDeclaration(\"@prefix foo: <http://bar.com/>.\");\n assertEquals(\"foo\", parts.get(1));\n assertEquals(\"http://bar.com/\", parts.get(2));\n }",
"class_method_signature": "T... | {
"fields": [
{
"declarator": "logger = LogFactory.getLog(FreebaseRDFMapper.class)",
"modifier": "private static",
"original_string": "private static org.apache.commons.logging.Log logger = LogFactory.getLog(FreebaseRDFMapper.class);",
"type": "org.apache.commons.logging.Log",
"var_n... | {
"body": "public static List<String> splitPrefixDeclaration(String obj) throws InvalidPrefixException {\n List<String> parts=Lists.newArrayList(Splitter.on(\" \").split(obj));\n if (parts.size()!=3) {\n throw new InvalidPrefixException();\n }\n\n String prefix=parts.get(1);\n ... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_67 | {
"fields": [],
"file": "bakemono/src/test/java/com/ontology2/rdf/parser/NodeParserTest.java",
"identifier": "NodeParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=TokenMgrError.class)\n public void testCrash() throws ParseException {\n NodeParser n=new NodeParser(new StringReader(\"<not http://a.uri/ by a>>ny means>\"));\n n.parse();\n }",
"class_method_signature": "NodeParserTest.testCrash()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "nodeValue",
"modifier": "private",
"original_string": "private Node nodeValue;",
"type": "Node",
"var_name": "nodeValue"
},
{
"declarator": "token_source",
"modifier": "public",
"original_string": "public NodeParserTokenManager... | {
"body": "final public void parse() throws ParseException {\n GraphTerm();\n jj_consume_token(0);\n }",
"class_method_signature": "NodeParser.parse()",
"constructor": false,
"full_signature": "final public void parse()",
"identifier": "parse",
"invocations": [
"GraphTerm",
"jj_consume_token"... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_30 | {
"fields": [
{
"declarator": "that",
"modifier": "",
"original_string": "AcceptWithMatchingKeyReducer<Text,Text> that;",
"type": "AcceptWithMatchingKeyReducer<Text,Text>",
"var_name": "that"
},
{
"declarator": "context",
"modifier": "",
"original_string": "... | {
"body": "@Test\n public void acceptsIfMatch() throws IOException, InterruptedException {\n TaggedTextItem key=new TaggedTextItem(\n new Text(\"xanadu\")\n ,1);\n\n Iterable<TaggedItem<Text>> stream=new ArrayList<TaggedItem<Text>>() {{\n add(new TaggedTextIte... | {
"fields": [
{
"declarator": "ONE = new VIntWritable(1)",
"modifier": "final static",
"original_string": "final static VIntWritable ONE = new VIntWritable(1);",
"type": "VIntWritable",
"var_name": "ONE"
},
{
"declarator": "TWO = new VIntWritable(2)",
"modifier": ... | {
"body": "@Override\n protected void reduce(TaggedItem<K> key, Iterable<TaggedItem<V>> values, Context context) throws IOException, InterruptedException {\n PeekingIterator<TaggedItem<V>> pi = Iterators.peekingIterator(values.iterator());\n boolean foundObject = false;\n\n while (pi.hasNext()... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
6500041_26 | {
"fields": [
{
"declarator": "mapper",
"modifier": "private",
"original_string": "private FreebaseRDFMapper mapper;",
"type": "FreebaseRDFMapper",
"var_name": "mapper"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context ... | {
"body": "@Test\n public void weReversePermissions() throws IOException, InterruptedException {\n String ordinaryTriple = \"ns:A\\tns:type.permission.controls\\tns:B.\";\n mapper.map(new LongWritable(1L), new Text(ordinaryTriple), context);\n verify(context).getCounter(FreebasePrefilterCounte... | {
"fields": [
{
"declarator": "logger = LogFactory.getLog(FreebaseRDFMapper.class)",
"modifier": "private static",
"original_string": "private static org.apache.commons.logging.Log logger = LogFactory.getLog(FreebaseRDFMapper.class);",
"type": "org.apache.commons.logging.Log",
"var_n... | {
"body": "@Override\n public void map(LongWritable k, Text v,Context c) throws IOException, InterruptedException {\n\n String line=v.toString();\n if (line.startsWith(\"@prefix\")) {\n incrementCounter(c,FreebasePrefilterCounter.PREFIX_DECL,1L);\n return;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6500041,
"size": 4385,
"stargazer_count": 147,
"stars": null,
"updates": null,
"url": "https://github.com/paulhoule/infovore"
} |
61971175_2 | {
"fields": [
{
"declarator": "time = new WithTimeAt(TODAY)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public WithTimeAt time = new WithTimeAt(TODAY);",
"type": "WithTimeAt",
"var_name": "time"
},
{
"declarator": "timer = new MockTimer()",
"modi... | {
"body": "@Test public void incrementsCounterWhenUnexpected_annotation() throws Exception {\n recorder.record(\n new Record(root, Time.fromMilliseconds(TODAY), new FancyAnnotation(), empty())\n );\n\n assertThat(mapAsJavaMap(stats.counters())).containsExactly(\n entry(seq(\"record\", \"unhandl... | {
"fields": [
{
"declarator": "ERROR_FORMAT = \"%s: %s\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_FORMAT = \"%s: %s\";",
"type": "String",
"var_name": "ERROR_FORMAT"
},
{
"declarator": "ttl = Duration.apply(120, TimeUni... | {
"body": "void record(Record record) {\n MutableSpan span = spanMap.get(record.traceId());\n if (span == null) {\n MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now());\n MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan);\n span = prev != null ? prev : new... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 61971175,
"size": 509,
"stargazer_count": 38,
"stars": null,
"updates": null,
"url": "https://github.com/openzipkin/zipkin-finagle"
} |
61971175_3 | {
"fields": [
{
"declarator": "config = Config.builder().initialSampleRate(1.0f).host(\"127.0.0.1:9410\").build()",
"modifier": "",
"original_string": "Config config = Config.builder().initialSampleRate(1.0f).host(\"127.0.0.1:9410\").build();",
"type": "Config",
"var_name": "config"
... | {
"body": "@Test\n public void makeRequest() throws TException {\n Endpoint web = Endpoint.newBuilder().serviceName(\"web\").ip(\"127.0.0.1\").build();\n Span span1 =\n Span.newBuilder()\n .traceId(FinagleTestObjects.root.traceId().toString())\n .id(FinagleTestObjects.root.spanId()... | {
"fields": [
{
"declarator": "category = new byte[] {'z', 'i', 'p', 'k', 'i', 'n'}",
"modifier": "static final",
"original_string": "static final byte[] category = new byte[] {'z', 'i', 'p', 'k', 'i', 'n'};",
"type": "byte[]",
"var_name": "category"
},
{
"declarator": ... | {
"body": "@Override protected ThriftClientRequest makeRequest(List<byte[]> spans) throws TException {\n int encodedSize = InternalScribeCodec.messageSizeInBytes(category, spans);\n TMemoryBuffer mem = new TMemoryBuffer(encodedSize);\n TBinaryProtocol prot = new TBinaryProtocol(mem);\n InternalScribeCodec... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 61971175,
"size": 509,
"stargazer_count": 38,
"stars": null,
"updates": null,
"url": "https://github.com/openzipkin/zipkin-finagle"
} |
61971175_0 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule public",
"original_string": "@Rule public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "stats = new InMem... | {
"body": "@Test public void configOverridesLocalServiceName_client_combines() throws Exception {\n tracer = tracerWithLocalServiceName(\"favstar\");\n\n tracer.record(new Record(root, fromMilliseconds(TODAY), new Annotation.LocalAddr(\n new InetSocketAddress(\"1.2.3.3\", 443)), empty()));\n tracer.re... | {
"fields": [
{
"declarator": "reporter",
"modifier": "final",
"original_string": "final Reporter<Span> reporter;",
"type": "Reporter<Span>",
"var_name": "reporter"
},
{
"declarator": "underlying",
"modifier": "final",
"original_string": "final RawZipkinTrac... | {
"body": "public static Builder newBuilder(Reporter<Span> spanReporter) {\n return new Builder(spanReporter);\n }",
"class_method_signature": "ZipkinTracer.newBuilder(Reporter<Span> spanReporter)",
"constructor": false,
"full_signature": "public static Builder newBuilder(Reporter<Span> spanReporter)",
"i... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 61971175,
"size": 509,
"stargazer_count": 38,
"stars": null,
"updates": null,
"url": "https://github.com/openzipkin/zipkin-finagle"
} |
61971175_1 | {
"fields": [
{
"declarator": "time = new WithTimeAt(TODAY)",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public WithTimeAt time = new WithTimeAt(TODAY);",
"type": "WithTimeAt",
"var_name": "time"
},
{
"declarator": "timer = new MockTimer()",
"modi... | {
"body": "@Test public void incrementsCounterWhenUnexpected_binaryAnnotation() throws Exception {\n recorder.record(\n new Record(root, Time.fromMilliseconds(TODAY),\n new Annotation.BinaryAnnotation(\"web\", new Date()), empty())\n );\n\n assertThat(mapAsJavaMap(stats.counters())).contain... | {
"fields": [
{
"declarator": "ERROR_FORMAT = \"%s: %s\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_FORMAT = \"%s: %s\";",
"type": "String",
"var_name": "ERROR_FORMAT"
},
{
"declarator": "ttl = Duration.apply(120, TimeUni... | {
"body": "void record(Record record) {\n MutableSpan span = spanMap.get(record.traceId());\n if (span == null) {\n MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now());\n MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan);\n span = prev != null ? prev : new... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 61971175,
"size": 509,
"stargazer_count": 38,
"stars": null,
"updates": null,
"url": "https://github.com/openzipkin/zipkin-finagle"
} |
7212262_4 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/HazelcastServiceTest.java",
"identifier": "HazelcastServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void assertThatIsAutoStartupReturnsTrue() {\n\t\tfinal HazelcastService objectUnderTest = newObjectUnderTest();\n\n\t\tassertTrue(\"isAutoStartup() should return true\",\n\t\t objectUnderTest.isAutoStartup());\n\t}",
"class_method_signature": "HazelcastServiceTest.assertThatI... | {
"fields": [
{
"declarator": "STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\"",
"modifier": "private static final",
"original_string": "private static final String\t STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\";",
"type": "String",
"var_name": "STARTUP_DURA... | {
"body": "@Override\n\tpublic boolean isAutoStartup() {\n\t\treturn true;\n\t}",
"class_method_signature": "HazelcastService.isAutoStartup()",
"constructor": false,
"full_signature": "@Override public boolean isAutoStartup()",
"identifier": "isAutoStartup",
"invocations": [],
"modifiers": "@Override publ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_8 | {
"fields": [
{
"declarator": "CONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String\tCONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\";",
"type": "String",
"var_name": "CONF... | {
"body": "@Test\n\tpublic final void assertThatIsSingletonReturnsTrue() {\n\t\tfinal ComposableXmlConfigFactoryBean objectUnderTest = newObjectUnderTest();\n\t\tassertTrue(\"isSingleton() should have returned true\",\n\t\t objectUnderTest.isSingleton());\n\t}",
"class_method_signature": "ComposableXmlConfig... | {
"fields": [
{
"declarator": "product",
"modifier": "private",
"original_string": "private Config\t product;",
"type": "Config",
"var_name": "product"
},
{
"declarator": "globalXmlConfigFile",
"modifier": "private",
"original_string": "private Resource\tglo... | {
"body": "@Override\n\tpublic boolean isSingleton() {\n\t\treturn true;\n\t}",
"class_method_signature": "ComposableXmlConfigFactoryBean.isSingleton()",
"constructor": false,
"full_signature": "@Override public boolean isSingleton()",
"identifier": "isSingleton",
"invocations": [],
"modifiers": "@Overrid... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_9 | {
"fields": [
{
"declarator": "CONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String\tCONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\";",
"type": "String",
"var_name": "CONF... | {
"body": "@Test(expected = NullPointerException.class)\n\tpublic final void asserThatAddMapConfigurationRejectsNullFile() {\n\t\tfinal ComposableXmlConfigParser objectUnderTest = new ComposableXmlConfigParser(\n\t\t new ByteArrayInputStream(\"DUMMY\".getBytes()));\n\t\tobjectUnderTest.addDistributedDataStruct... | {
"fields": [
{
"declarator": "QUEUE_NODES_SELECTOR\t = \"//hazelcast/queue\"",
"modifier": "private final static",
"original_string": "private final static String\tQUEUE_NODES_SELECTOR\t = \"//hazelcast/queue\";",
"type": "String",
"var_name": "QUEUE_NO... | {
"body": "ComposableXmlConfigParser addDistributedDataStructuresConfiguration(\n\t final File distributedDataStructuresConfigFile) {\n\t\tcheckNotNull(distributedDataStructuresConfigFile,\n\t\t \"Argument 'distributedDataStructuresConfigFile' must not be null\");\n\t\tthis.distributedDataStructuresConf... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_5 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/pluggable/DirectoryScannerTest.java",
"identifier": "DirectoryScannerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void assertThanScanCallsCallbackForEveryMatchingFile() {\n\t\tfinal File rootDir = new File(getClass().getResource(\"data/\").getPath());\n\t\tfinal AtomicInteger noScannedFiles = new AtomicInteger(0);\n\t\tfinal DirectoryScanner objectUnderTest = new DirectoryScanner(rootDir,\n\t\t ... | {
"fields": [
{
"declarator": "DEFAULT_SUFFIX\t= \".xml\"",
"modifier": "private static final",
"original_string": "private static final String\tDEFAULT_SUFFIX\t= \".xml\";",
"type": "String",
"var_name": "DEFAULT_SUFFIX"
},
{
"declarator": "log\t = LoggerFact... | {
"body": "public void scan() {\n\t\tthis.log.info(\n\t\t \"Scanning files matching [*{}] in subdirectories of [{}] ...\",\n\t\t this.suffix, this.rootDirectory);\n\t\tfinal FileFilter isDirectory = new FileFilter() {\n\n\t\t\t@Override\n\t\t\tpublic boolean accept(final File arg0) {\n\t\t\t\treturn arg... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_2 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/HazelcastServiceTest.java",
"identifier": "HazelcastServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void assertThatIsRunningReturnsFalseIfStartHasNotBeenCalled() {\n\t\tfinal HazelcastService objectUnderTest = newObjectUnderTest();\n\n\t\tassertFalse(\"isRunning() should return false prior to calling start()\",\n\t\t objectUnderTest.isRunning());\n\t}",
"class_method_signat... | {
"fields": [
{
"declarator": "STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\"",
"modifier": "private static final",
"original_string": "private static final String\t STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\";",
"type": "String",
"var_name": "STARTUP_DURA... | {
"body": "@Override\n\tpublic boolean isRunning() {\n\t\treturn this.hazelcastInstance != null;\n\t}",
"class_method_signature": "HazelcastService.isRunning()",
"constructor": false,
"full_signature": "@Override public boolean isRunning()",
"identifier": "isRunning",
"invocations": [],
"modifiers": "@Ove... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_3 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/HazelcastServiceTest.java",
"identifier": "HazelcastServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void assertThatGetPhaseReturnsIntegerMaxValue() {\n\t\tfinal HazelcastService objectUnderTest = newObjectUnderTest();\n\n\t\tassertEquals(\"getPhase() should return Integer.MAX_VALUE\",\n\t\t Integer.MAX_VALUE, objectUnderTest.getPhase());\n\t}",
"class_method_signature": "Ha... | {
"fields": [
{
"declarator": "STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\"",
"modifier": "private static final",
"original_string": "private static final String\t STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\";",
"type": "String",
"var_name": "STARTUP_DURA... | {
"body": "@Override\n\tpublic int getPhase() {\n\t\treturn Integer.MAX_VALUE;\n\t}",
"class_method_signature": "HazelcastService.getPhase()",
"constructor": false,
"full_signature": "@Override public int getPhase()",
"identifier": "getPhase",
"invocations": [],
"modifiers": "@Override public",
"paramet... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_0 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/HazelcastServiceTest.java",
"identifier": "HazelcastServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n\tpublic final void assertThatCallingStartTwiceInARowFails() {\n\t\tfinal HazelcastService objectUnderTest = newObjectUnderTest();\n\t\tobjectUnderTest.start();\n\t\tobjectUnderTest.start();\n\t}",
"class_method_signature": "HazelcastServiceTest.assertThatCa... | {
"fields": [
{
"declarator": "STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\"",
"modifier": "private static final",
"original_string": "private static final String\t STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\";",
"type": "String",
"var_name": "STARTUP_DURA... | {
"body": "@Override\n\tpublic void start() {\n\t\tcheckState(this.hazelcastInstance == null,\n\t\t \"{} has already been started\", this);\n\t\tthis.log.info(\"Starting {} using ...\", this.configuration);\n\n\t\tfinal long start = System.currentTimeMillis();\n\t\tthis.hazelcastInstance = FactoryImpl\n\t\t ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_10 | {
"fields": [
{
"declarator": "CONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String\tCONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\";",
"type": "String",
"var_name": "CONF... | {
"body": "@Test\n\tpublic final void assertThatParseSuccessfullyParsesConfigWithoutAddedDataStructures()\n\t throws Exception {\n\t\tfinal ComposableXmlConfigParser objectUnderTest = new ComposableXmlConfigParser(\n\t\t loadTestXmlAsStream(CONFIG_FILE));\n\t\tfinal Document document = objectUnderTest.p... | {
"fields": [
{
"declarator": "QUEUE_NODES_SELECTOR\t = \"//hazelcast/queue\"",
"modifier": "private final static",
"original_string": "private final static String\tQUEUE_NODES_SELECTOR\t = \"//hazelcast/queue\";",
"type": "String",
"var_name": "QUEUE_NO... | {
"body": "Document parse() throws Exception {\n\t\tfinal DocumentBuilder builder = DocumentBuilderFactory.newInstance()\n\t\t .newDocumentBuilder();\n\t\tfinal Document result = builder.parse(this.xmlConfigInputStream);\n\n\t\tfinal XPathFactory xpathFactory = XPathFactory.newInstance();\n\n\t\tinsertDistribu... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_1 | {
"fields": [],
"file": "base/src/test/java/com/obergner/hzserver/HazelcastServiceTest.java",
"identifier": "HazelcastServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n\tpublic final void assertThatCallingStopWithoutHavingCalledStartFails() {\n\t\tfinal HazelcastService objectUnderTest = newObjectUnderTest();\n\t\tobjectUnderTest.stop();\n\t}",
"class_method_signature": "HazelcastServiceTest.assertThatCallingStopWithoutHav... | {
"fields": [
{
"declarator": "STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\"",
"modifier": "private static final",
"original_string": "private static final String\t STARTUP_DURATION_GAUGE\t= \"startup-duration-millis\";",
"type": "String",
"var_name": "STARTUP_DURA... | {
"body": "@Override\n\tpublic void stop() {\n\t\tcheckState(this.hazelcastInstance != null, \"{} is not running\", this);\n\t\tthis.log.info(\"Shutting down Hazelcast instance {} ...\",\n\t\t this.hazelcastInstance);\n\n\t\tthis.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE);\n\t\tthis.hazel... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_6 | {
"fields": [
{
"declarator": "CONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String\tCONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\";",
"type": "String",
"var_name": "CONF... | {
"body": "@Test(expected = IllegalStateException.class)\n\tpublic final void assertThatGetObjectThrowsIllegalStateExceptionIfCalledBeforeAfterPropertiesSet()\n\t throws Exception {\n\t\tfinal ComposableXmlConfigFactoryBean objectUnderTest = newObjectUnderTest();\n\n\t\tobjectUnderTest.getObject();\n\t}",
"c... | {
"fields": [
{
"declarator": "product",
"modifier": "private",
"original_string": "private Config\t product;",
"type": "Config",
"var_name": "product"
},
{
"declarator": "globalXmlConfigFile",
"modifier": "private",
"original_string": "private Resource\tglo... | {
"body": "@Override\n\tpublic Config getObject() throws Exception {\n\t\tcheckState(\n\t\t this.product != null,\n\t\t \"No Config has been created yet - did you remember to call afterPropertiesSet() when using this factory outside Spring?\");\n\t\treturn this.product;\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
7212262_7 | {
"fields": [
{
"declarator": "CONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\"",
"modifier": "private static final",
"original_string": "private static final String\tCONFIG_FILE\t= \"global/composable-xml-config-test-config.xml\";",
"type": "String",
"var_name": "CONF... | {
"body": "@Test\n\tpublic final void assertThatGetObjectTypeReturnsAppropriateType() {\n\t\tfinal ComposableXmlConfigFactoryBean objectUnderTest = newObjectUnderTest();\n\t\tassertTrue(\"getObjectType() should have returned a subtype of \"\n\t\t + Config.class.getName(),\n\t\t Config.class.isAssignable... | {
"fields": [
{
"declarator": "product",
"modifier": "private",
"original_string": "private Config\t product;",
"type": "Config",
"var_name": "product"
},
{
"declarator": "globalXmlConfigFile",
"modifier": "private",
"original_string": "private Resource\tglo... | {
"body": "@Override\n\tpublic Class<?> getObjectType() {\n\t\treturn this.product != null ? this.product.getClass() : Config.class;\n\t}",
"class_method_signature": "ComposableXmlConfigFactoryBean.getObjectType()",
"constructor": false,
"full_signature": "@Override public Class<?> getObjectType()",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7212262,
"size": 1593,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/obergner/hazelcast-server"
} |
1553760_195 | {
"fields": [
{
"declarator": "writer",
"modifier": "private",
"original_string": "private StringWriter writer;",
"type": "StringWriter",
"var_name": "writer"
},
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlSubsetDocument... | {
"body": "@Test\n\tpublic void blockNumericListUnsupported() {\n\t\tbuilder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH));\n\t\tbuildList(BlockType.NUMERIC_LIST);\n\t\tassertContent(\"<p>test 0</p><p>test 1</p>\");\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilderTest.blockNumericListUnsup... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final HtmlDocumentBuilder delegate;",
"type": "HtmlDocumentBuilder",
"var_name": "delegate"
},
{
"declarator": "blockStrategies",
"modifier": "private",
"origi... | {
"body": "void setSupportedBlockTypes(Set<BlockType> blockTypes) {\n\t\tcheckState(blockStrategyState.isEmpty());\n\t\tblockStrategies = new BlockStrategies(blockTypes);\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilder.setSupportedBlockTypes(Set<BlockType> blockTypes)",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_316 | {
"fields": [
{
"declarator": "builder = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder builder = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/... | {
"body": "@Test\n\tpublic void acronym() {\n\t\tbuilder.acronym(\"one\", \"two\");\n\t\tassertEvents(new AcronymEvent(\"one\", \"two\"));\n\t}",
"class_method_signature": "EventDocumentBuilderTest.acronym()",
"constructor": false,
"full_signature": "@Test public void acronym()",
"identifier": "acronym",
"i... | {
"fields": [
{
"declarator": "events = new ArrayList<>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilderEvent> events = new ArrayList<>();",
"type": "List<DocumentBuilderEvent>",
"var_name": "events"
}
],
"file": "wikitext/core/org.eclip... | {
"body": "@Override\n\tpublic void acronym(String text, String definition) {\n\t\tevents.add(new AcronymEvent(text, definition));\n\t}",
"class_method_signature": "EventDocumentBuilder.acronym(String text, String definition)",
"constructor": false,
"full_signature": "@Override public void acronym(String text, ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_253 | {
"fields": [
{
"declarator": "strategy = new DefaultSplittingStrategy()",
"modifier": "private final",
"original_string": "private final DefaultSplittingStrategy strategy = new DefaultSplittingStrategy();",
"type": "DefaultSplittingStrategy",
"var_name": "strategy"
}
],
"fil... | {
"body": "@Test\n\tpublic void stripUnsafeCharactersUnicode() {\n\t\t// ÀÁ\n\t\tassertEquals(\"AA\", strategy.stripUnsafeCharacters(\"\\u00C0\\u00C1\"));\n\t}",
"class_method_signature": "DefaultSplittingStrategyTest.stripUnsafeCharactersUnicode()",
"constructor": false,
"full_signature": "@Test public void st... | {
"fields": [
{
"declarator": "headingCount",
"modifier": "private",
"original_string": "private int headingCount;",
"type": "int",
"var_name": "headingCount"
},
{
"declarator": "firstHeadingSplit = 2",
"modifier": "private",
"original_string": "private int ... | {
"body": "protected String stripUnsafeCharacters(String candidate) {\n\t\tString safe = Normalizer.normalize(candidate, Normalizer.Form.NFD);\n\t\tsafe = safe.replaceAll(\"\\\\p{IsM}+\", \"\").replaceAll(\"[^a-zA-Z0-9]+\", \"-\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$\n\t\treturn safe;\n\t}",
"cl... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_48 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void emptyBoldSpan() {\n\t\tbuilder.beginDocument();\n\n\t\tbuilder.characters(\"first \");\n\n\t\tbuilder.beginSpan(SpanType.BOLD, new Attributes());\n\t\tbuilder.endSpan();\n\n\t\tbuilder.characters(\"second\");\n\n\t\tbuilder.endDocument();\n\n\t\tString markup = out.toString();\n\n\t\ta... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_341 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/event/LineBreakEventTest.java",
"identifier": "LineBreakEventTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"lineBreak()\", new LineBreakEvent().toString());\n\t}",
"class_method_signature": "LineBreakEventTest.testToString()",
"constructor": false,
"full_signature": "@Test public void testToString()",
"identifier": "testToString",
"invocations":... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/main/java/org/eclipse/mylyn/wikitext/parser/builder/event/LineBreakEvent.java",
"identifier": "LineBreakEvent",
"interfaces": "",
"methods": [
{
"class_method_signature": "LineBreakEvent.invoke(DocumentBuilder builder)",
"co... | {
"body": "@Override\n\tpublic String toString() {\n\t\treturn \"lineBreak()\"; //$NON-NLS-1$\n\t}",
"class_method_signature": "LineBreakEvent.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [],
"modifiers": "@Override pub... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_204 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext/html/internal/SpanStrategiesTest.java",
"identifier": "SpanStrategiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void spanWithFontWeightToBold() {\n\t\tSpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.BOLD),\n\t\t\t\tCollections.<SpanHtmlElementStrategy> emptyList());\n\t\tSpanStrategy strategy = strategies.getStrategy(SpanType.SPAN,\n\t\t\t\tnew Attributes(null, null, \"font-we... | {
"fields": [
{
"declarator": "spanTypeToAlternatives = createSpanTypeToAlternatives()",
"modifier": "private static final",
"original_string": "private static final Map<SpanType, List<SpanType>> spanTypeToAlternatives = createSpanTypeToAlternatives();",
"type": "Map<SpanType, List<SpanTyp... | {
"body": "@Override\n\tpublic SpanStrategy getStrategy(SpanType elementType, Attributes attributes) {\n\t\tSpanStrategy strategy = super.getStrategy(elementType, attributes);\n\t\tif (elementType == SpanType.SPAN && strategy instanceof UnsupportedSpanStrategy) {\n\t\t\tSpanStrategy alternateStrategy = calculateAlter... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_357 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/event/CharactersEventTest.java",
"identifier": "CharactersEventTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getText() {\n\t\tassertEquals(\"the value\", new CharactersEvent(\"the value\").getText());\n\t}",
"class_method_signature": "CharactersEventTest.getText()",
"constructor": false,
"full_signature": "@Test public void getText()",
"identifier": "getText",
"invocations": [
"... | {
"fields": [
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final String text;",
"type": "String",
"var_name": "text"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/main/java/org/eclipse/mylyn/wikitext/parser/builder/event/Charac... | {
"body": "public String getText() {\n\t\treturn text;\n\t}",
"class_method_signature": "CharactersEvent.getText()",
"constructor": false,
"full_signature": "public String getText()",
"identifier": "getText",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signatur... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_212 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.maven/src/test/java/org/eclipse/mylyn/wikitext/maven/internal/FileToMarkupLanguageTest.java",
"identifier": "FileToMarkupLanguageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getCaseInsensitive() {\n\t\tMarkupLanguage language1 = mockMarkupLanguage(\"Test\");\n\t\tMarkupLanguage language2 = mockMarkupLanguage(\"Test2\");\n\t\tFileToMarkupLanguage fileToMarkupLanguage = create(language1, language2);\n\t\tassertSame(language1, fileToMarkupLanguage.get(mockFil... | {
"fields": [
{
"declarator": "extensionToMarkupLanguage",
"modifier": "private final",
"original_string": "private final Map<String, MarkupLanguage> extensionToMarkupLanguage;",
"type": "Map<String, MarkupLanguage>",
"var_name": "extensionToMarkupLanguage"
}
],
"file": "wiki... | {
"body": "public MarkupLanguage get(File file) {\n\t\trequireNonNull(file);\n\t\tString extension = computeFileExtension(file);\n\t\treturn extensionToMarkupLanguage.get(extension.toLowerCase());\n\t}",
"class_method_signature": "FileToMarkupLanguage.get(File file)",
"constructor": false,
"full_signature": "pu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_183 | {
"fields": [
{
"declarator": "writer",
"modifier": "private",
"original_string": "private StringWriter writer;",
"type": "StringWriter",
"var_name": "writer"
},
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlSubsetDocument... | {
"body": "@Test\n\tpublic void horizontalRule() {\n\t\tbuilder.beginDocument();\n\t\tbuilder.horizontalRule();\n\t\tbuilder.endDocument();\n\t\tassertContent(\"<hr/>\");\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilderTest.horizontalRule()",
"constructor": false,
"full_signature": "@Test public void... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final HtmlDocumentBuilder delegate;",
"type": "HtmlDocumentBuilder",
"var_name": "delegate"
},
{
"declarator": "blockStrategies",
"modifier": "private",
"origi... | {
"body": "@Override\n\tpublic void horizontalRule() {\n\t\tdelegate.horizontalRule();\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilder.horizontalRule()",
"constructor": false,
"full_signature": "@Override public void horizontalRule()",
"identifier": "horizontalRule",
"invocations": [
"horizo... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_300 | {
"fields": [
{
"declarator": "out",
"modifier": "private",
"original_string": "private StringWriter out;",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlDocumentBuilder builder... | {
"body": "@Test\n\tpublic void entityUnfiltered() {\n\t\tbuilder.setFilterEntityReferences(false);\n\t\tassertEntity(\"˜\", \"tilde\");\n\t}",
"class_method_signature": "HtmlDocumentBuilderTest.entityUnfiltered()",
"constructor": false,
"full_signature": "@Test public void entityUnfiltered()",
"identif... | {
"fields": [
{
"declarator": "ABSOLUTE_URL_PATTERN = Pattern.compile(\"[a-zA-Z]{3,8}://?.*\")",
"modifier": "private static final",
"original_string": "private static final Pattern ABSOLUTE_URL_PATTERN = Pattern.compile(\"[a-zA-Z]{3,8}://?.*\");",
"type": "Pattern",
"var_name": "ABS... | {
"body": "public void setFilterEntityReferences(boolean filterEntityReferences) {\n\t\tthis.filterEntityReferences = filterEntityReferences;\n\t}",
"class_method_signature": "HtmlDocumentBuilder.setFilterEntityReferences(boolean filterEntityReferences)",
"constructor": false,
"full_signature": "public void set... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_245 | {
"fields": [
{
"declarator": "locator",
"modifier": "private",
"original_string": "private ServiceLocator locator;",
"type": "ServiceLocator",
"var_name": "locator"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/util/ServiceLo... | {
"body": "@Test\n\tpublic void getMarkupLanguageNull() {\n\t\tIllegalArgumentException e = assertThrows(IllegalArgumentException.class,\n\t\t\t\t() -> locator.getMarkupLanguage(null));\n\t\tassertTrue(e.getMessage().contains(\"Must provide a languageName\"));\n\t}",
"class_method_signature": "ServiceLocatorTest.ge... | {
"fields": [
{
"declarator": "classLoader",
"modifier": "protected final",
"original_string": "protected final ClassLoader classLoader;",
"type": "ClassLoader",
"var_name": "classLoader"
},
{
"declarator": "implementationClassLock = new Object()",
"modifier": "pr... | {
"body": "public MarkupLanguage getMarkupLanguage(final String languageName) throws IllegalArgumentException {\n\t\tcheckArgument(!Strings.isNullOrEmpty(languageName), \"Must provide a languageName\"); //$NON-NLS-1$\n\t\tPattern classNamePattern = Pattern.compile(\"\\\\s*([^\\\\s#]+)?#?.*\"); //$NON-NLS-1$\n\t\t// f... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_72 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/LineSequenceTest.java",
"identifier": "LineSequenceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void transform() {\n\t\tLineSequence lineSequence = LineSequence.create(\"one\").transform(input -> {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t});\n\t\tassertNotNull(lineSequence);\n\t\tassertEquals(TransformLineSequence.class, lineSequence.getClass());\n\t}",
"class_method_... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/main/java/org/eclipse/mylyn/wikitext/commonmark/internal/LineSequence.java",
"identifier": "LineSequence",
"interfaces": "implements Iterable<Line>",
"methods": [
{
"class_method_signature": "LineSequence.create(String ... | {
"body": "public LineSequence transform(Function<Line, Line> transform) {\n\t\treturn new TransformLineSequence(this, transform);\n\t}",
"class_method_signature": "LineSequence.transform(Function<Line, Line> transform)",
"constructor": false,
"full_signature": "public LineSequence transform(Function<Line, Line... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_117 | {
"fields": [
{
"declarator": "transform = new UpperCaseTransform()",
"modifier": "private final",
"original_string": "private final Function<Line, Line> transform = new UpperCaseTransform();",
"type": "Function<Line, Line>",
"var_name": "transform"
},
{
"declarator": "... | {
"body": "@Test\n\tpublic void getNextLine() {\n\t\tassertEquals(\"SECOND\", lineSequence.getNextLine().getText());\n\t\tlineSequence.advance();\n\t\tassertNull(lineSequence.getNextLine());\n\t}",
"class_method_signature": "TransformLineSequenceTest.getNextLine()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final LineSequence delegate;",
"type": "LineSequence",
"var_name": "delegate"
},
{
"declarator": "transform",
"modifier": "private final",
"original_string": "... | {
"body": "@Override\n\tpublic Line getNextLine() {\n\t\tLine line = delegate.getNextLine();\n\t\tif (line != null) {\n\t\t\tline = transform.apply(line);\n\t\t}\n\t\treturn line;\n\t}",
"class_method_signature": "TransformLineSequence.getNextLine()",
"constructor": false,
"full_signature": "@Override public Li... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_140 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/LineTest.java",
"identifier": "LineTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void segment() {\n\t\tLine segment = new Line(2, 15, \"0123456789\").segment(3, 5);\n\t\tassertNotNull(segment);\n\t\tassertEquals(2, segment.getLineNumber());\n\t\tassertEquals(15 + 3, segment.getOffset());\n\t\tassertEquals(\"34567\", segment.getText());\n\t}",
"class_method_signature":... | {
"fields": [
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final String text;",
"type": "String",
"var_name": "text"
},
{
"declarator": "offset",
"modifier": "private final",
"original_string": "private final int offset;",... | {
"body": "public Line segment(int offset, int length) {\n\t\treturn new Line(lineNumber, this.offset + offset, text.substring(offset, offset + length));\n\t}",
"class_method_signature": "Line.segment(int offset, int length)",
"constructor": false,
"full_signature": "public Line segment(int offset, int length)"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_25 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void implicitParagrah() {\n\t\tbuilder.beginDocument();\n\t\tbuilder.characters(\"text1\");\n\t\tbuilder.beginBlock(BlockType.PARAGRAPH, new Attributes());\n\t\tbuilder.characters(\"text2\");\n\t\tbuilder.endBlock();\n\t\tbuilder.characters(\"text3\");\n\t\tbuilder.endDocument();\n\n\t\tStr... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_269 | {
"fields": [
{
"declarator": "delegate1 = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder delegate1 = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "delegate1"
},
{
"declarator... | {
"body": "@Test\n\tpublic void endBlock() {\n\t\tmultiplexer.endBlock();\n\t\tassertEvents(new EndBlockEvent());\n\t}",
"class_method_signature": "MultiplexingDocumentBuilderTest.endBlock()",
"constructor": false,
"full_signature": "@Test public void endBlock()",
"identifier": "endBlock",
"invocations": [
... | {
"fields": [
{
"declarator": "builders = new ArrayList<DocumentBuilder>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilder> builders = new ArrayList<DocumentBuilder>();",
"type": "List<DocumentBuilder>",
"var_name": "builders"
}
],
"file"... | {
"body": "@Override\n\tpublic void endBlock() {\n\t\tfor (DocumentBuilder builder : builders) {\n\t\t\tbuilder.endBlock();\n\t\t}\n\t}",
"class_method_signature": "MultiplexingDocumentBuilder.endBlock()",
"constructor": false,
"full_signature": "@Override public void endBlock()",
"identifier": "endBlock",
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_286 | {
"fields": [
{
"declarator": "instance = HtmlEntities.instance()",
"modifier": "private final",
"original_string": "private final HtmlEntities instance = HtmlEntities.instance();",
"type": "HtmlEntities",
"var_name": "instance"
}
],
"file": "wikitext/core/org.eclipse.mylyn.w... | {
"body": "@Test\n\tpublic void nameToEntityReferencesUnknownName() {\n\t\tassertEquals(ImmutableList.of(), instance.nameToEntityReferences(\"asdf\"));\n\t\tassertEquals(ImmutableList.of(), instance.nameToEntityReferences(null));\n\t}",
"class_method_signature": "HtmlEntitiesTest.nameToEntityReferencesUnknownName()... | {
"fields": [
{
"declarator": "instance = new HtmlEntities()",
"modifier": "private static",
"original_string": "private static HtmlEntities instance = new HtmlEntities();",
"type": "HtmlEntities",
"var_name": "instance"
},
{
"declarator": "nameToNumericEntityReferences... | {
"body": "public List<String> nameToEntityReferences(String name) {\n\t\treturn nameToNumericEntityReferences.get(name);\n\t}",
"class_method_signature": "HtmlEntities.nameToEntityReferences(String name)",
"constructor": false,
"full_signature": "public List<String> nameToEntityReferences(String name)",
"ide... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_33 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void monospaceSpan() {\n\t\tbuilder.beginDocument();\n\n\t\tbuilder.characters(\"prefix \");\n\n\t\tbuilder.beginSpan(SpanType.MONOSPACE, new Attributes());\n\t\tbuilder.characters(\"test\");\n\t\tbuilder.endSpan();\n\n\t\tbuilder.characters(\" suffix\");\n\n\t\tbuilder.endDocument();\n\n\t... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_156 | {
"fields": [
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlLanguageBuilder builder;",
"type": "HtmlLanguageBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext... | {
"body": "@Test\n\tpublic void addBlockTypeNull() {\n\t\tNullPointerException npe = assertThrows(NullPointerException.class, () -> builder.add((BlockType) null));\n\t\tassertTrue(npe.getMessage().contains(\"Must provide a blockType\"));\n\t}",
"class_method_signature": "HtmlLanguageBuilderTest.addBlockTypeNull()",... | {
"fields": [
{
"declarator": "name",
"modifier": "private",
"original_string": "private String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "blockTypes = Sets.newHashSet()",
"modifier": "private final",
"original_string": "private final S... | {
"body": "public HtmlLanguageBuilder add(BlockType blockType) {\n\t\tblockTypes.add(requireNonNull(blockType, \"Must provide a blockType\")); //$NON-NLS-1$\n\t\treturn this;\n\t}",
"class_method_signature": "HtmlLanguageBuilder.add(BlockType blockType)",
"constructor": false,
"full_signature": "public HtmlLang... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_290 | {
"fields": [
{
"declarator": "processor = new JavadocShortcutUriProcessor(\"../\",\n\t\t\t\"org.eclipse.mylyn.wikitext\")",
"modifier": "private final",
"original_string": "private final JavadocShortcutUriProcessor processor = new JavadocShortcutUriProcessor(\"../\",\n\t\t\t\"org.eclipse.mylyn.... | {
"body": "@Test\n\tpublic void processAbsoluteUriPackageName() {\n\t\tassertEquals(\"../index.html?foo/package-summary.html\", processor.process(\"javadoc://foo\"));\n\t}",
"class_method_signature": "JavadocShortcutUriProcessorTest.processAbsoluteUriPackageName()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "TARGET = \"_javadoc\"",
"modifier": "private static final",
"original_string": "private static final String TARGET = \"_javadoc\";",
"type": "String",
"var_name": "TARGET"
},
{
"declarator": "JAVADOC_URI_MARKER = \"@\"",
"modifier": ... | {
"body": "@Override\n\tpublic String process(String uri) {\n\t\tString newUri = preprocessUri(uri);\n\t\tif (!newUri.equals(uri)) {\n\t\t\tnewUri = prependWithBasePackage(newUri);\n\t\t\tif (SourceVersion.isName(newUri)) {\n\t\t\t\tif (isPotentialPackageName(newUri)) {\n\t\t\t\t\treturn toPackagePage(newUri);\n\t\t\... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_101 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/inlines/CursorTest.java",
"identifier": "CursorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getPrevious() {\n\t\tCursor cursor = new Cursor(createTextSegment(\"123\"));\n\t\tassertFalse(cursor.hasPrevious());\n\t\tassertFalse(cursor.hasPrevious(2));\n\t\tcursor.advance();\n\t\tassertTrue(cursor.hasPrevious());\n\t\tassertTrue(cursor.hasPrevious(1));\n\t\tassertFalse(cursor.ha... | {
"fields": [
{
"declarator": "segment",
"modifier": "private final",
"original_string": "private final TextSegment segment;",
"type": "TextSegment",
"var_name": "segment"
},
{
"declarator": "text",
"modifier": "private final",
"original_string": "private fi... | {
"body": "public char getPrevious() {\n\t\treturn getPrevious(1);\n\t}",
"class_method_signature": "Cursor.getPrevious()",
"constructor": false,
"full_signature": "public char getPrevious()",
"identifier": "getPrevious",
"invocations": [
"getPrevious"
],
"modifiers": "public",
"parameters": "()",... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_64 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.confluence/src/test/java/org/eclipse/mylyn/wikitext/confluence/ConfluenceLanguageTest.java",
"identifier": "ConfluenceLanguageTest",
"interfaces": "",
"superclass": "extends AbstractMarkupGenerationTest<ConfluenceLanguage>"
} | {
"body": "@Test\n\tpublic void testClone() {\n\t\tConfluenceLanguage language = (ConfluenceLanguage) parser.getMarkupLanguage();\n\t\tConfluenceLanguage newLanguage = language.clone();\n\t\tassertTrue(newLanguage.isParseRelativeLinks());\n\t}",
"class_method_signature": "ConfluenceLanguageTest.testClone()",
"con... | {
"fields": [
{
"declarator": "nestedBlocks = new ArrayList<Block>()",
"modifier": "private final",
"original_string": "private final List<Block> nestedBlocks = new ArrayList<Block>();",
"type": "List<Block>",
"var_name": "nestedBlocks"
},
{
"declarator": "parseRelative... | {
"body": "@Override\n\tpublic ConfluenceLanguage clone() {\n\t\tConfluenceLanguage copy = (ConfluenceLanguage) super.clone();\n\t\tcopy.parseRelativeLinks = parseRelativeLinks;\n\t\treturn copy;\n\t}",
"class_method_signature": "ConfluenceLanguage.clone()",
"constructor": false,
"full_signature": "@Override pu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_228 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void calculateHelpPrefix() {\n\t\tassertEquals(\"test/one\", markupToEclipseHelp.calculateHelpPrefix(\"test/one\"));\n\t}",
"class_method_signature": "MarkupToEclipseHelpMojoTest.calculateHelpPrefix()",
"constructor": false,
"full_signature": "@Test public void calculateHelpPrefix()",... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected String calculateHelpPrefix(String relativePath) {\n\t\tString prefix = helpPrefix == null ? \"\" : helpPrefix;\n\t\tif (relativePath.length() > 0) {\n\t\t\tif (prefix.length() > 0) {\n\t\t\t\tprefix += \"/\";\n\t\t\t}\n\t\t\tprefix += relativePath;\n\t\t}\n\t\treturn prefix.length() == 0 ? null :... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_7 | {
"fields": [
{
"declarator": "strategy = new GfmIdGenerationStrategy()",
"modifier": "private final",
"original_string": "private final GfmIdGenerationStrategy strategy = new GfmIdGenerationStrategy();",
"type": "GfmIdGenerationStrategy",
"var_name": "strategy"
}
],
"file": ... | {
"body": "@Test\n\tpublic void allWhitespace() {\n\t\tassertEquals(\"\", strategy.generateId(\" \\t \"));\n\t}",
"class_method_signature": "GfmIdGenerationStrategyTest.allWhitespace()",
"constructor": false,
"full_signature": "@Test public void allWhitespace()",
"identifier": "allWhitespace",
"invocations... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.markdown/src/main/java/org/eclipse/mylyn/wikitext/markdown/internal/GfmIdGenerationStrategy.java",
"identifier": "GfmIdGenerationStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "GfmIdGenerationStrategy.generateId... | {
"body": "@Override\n\tpublic String generateId(String headingText) {\n\t\tString id = headingText.toLowerCase(Locale.getDefault());\n\t\tid = id.replaceAll(\"[^a-z0-9_-]\", \"-\"); //$NON-NLS-1$//$NON-NLS-2$\n\t\tCharMatcher hyphenMatcher = CharMatcher.is('-');\n\t\tid = hyphenMatcher.trimFrom(hyphenMatcher.collaps... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_13 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.confluence/src/test/java/org/eclipse/mylyn/wikitext/confluence/internal/util/ColorsTest.java",
"identifier": "ColorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void asHexReturnsOriginalValueWhenNotRgb() {\n\t\tString hex = Colors.asHex(\"foo\");\n\n\t\tassertEquals(\"foo\", hex);\n\t}",
"class_method_signature": "ColorsTest.asHexReturnsOriginalValueWhenNotRgb()",
"constructor": false,
"full_signature": "@Test public void asHexReturnsOriginal... | {
"fields": [
{
"declarator": "RGB_PATTERN = Pattern\n\t\t\t.compile(\"rgb\\\\(\\\\s*(\\\\d{1,3}+)\\\\s*,\\\\s*(\\\\d{1,3}+)\\\\s*,\\\\s*(\\\\d{1,3}+)\\\\s*\\\\)\")",
"modifier": "private static final",
"original_string": "private static final Pattern RGB_PATTERN = Pattern\n\t\t\t.compile(\"rgb\... | {
"body": "public static String asHex(String color) {\n\t\tMatcher rgbMatcher = RGB_PATTERN.matcher(color);\n\t\tif (rgbMatcher.matches()) {\n\t\t\treturn formatRgbAsHex(asInt(rgbMatcher.group(1)), asInt(rgbMatcher.group(2)), asInt(rgbMatcher.group(3)));\n\t\t}\n\t\treturn color;\n\t}",
"class_method_signature": "C... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_176 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext/html/internal/HtmlSubsetLanguageTest.java",
"identifier": "HtmlSubsetLanguageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void supportedSpanTypes() {\n\t\tassertEquals(Sets.newHashSet(SpanType.BOLD, SpanType.EMPHASIS),\n\t\t\t\tnewHtmlSubsetLanguage(SpanType.BOLD, SpanType.EMPHASIS).getSupportedSpanTypes());\n\t}",
"class_method_signature": "HtmlSubsetLanguageTest.supportedSpanTypes()",
"constructor": fals... | {
"fields": [
{
"declarator": "supportedBlockTypes",
"modifier": "private final",
"original_string": "private final Set<BlockType> supportedBlockTypes;",
"type": "Set<BlockType>",
"var_name": "supportedBlockTypes"
},
{
"declarator": "supportedSpanTypes",
"modifier... | {
"body": "public Set<SpanType> getSupportedSpanTypes() {\n\t\treturn supportedSpanTypes;\n\t}",
"class_method_signature": "HtmlSubsetLanguage.getSupportedSpanTypes()",
"constructor": false,
"full_signature": "public Set<SpanType> getSupportedSpanTypes()",
"identifier": "getSupportedSpanTypes",
"invocations... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_199 | {
"fields": [
{
"declarator": "writer",
"modifier": "private",
"original_string": "private StringWriter writer;",
"type": "StringWriter",
"var_name": "writer"
},
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlSubsetDocument... | {
"body": "@Test\n\tpublic void flush() {\n\t\tbuilder.characters(\"test\");\n\t\tbuilder.flush();\n\t\tassertContent(\"test\");\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilderTest.flush()",
"constructor": false,
"full_signature": "@Test public void flush()",
"identifier": "flush",
"invocations"... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final HtmlDocumentBuilder delegate;",
"type": "HtmlDocumentBuilder",
"var_name": "delegate"
},
{
"declarator": "blockStrategies",
"modifier": "private",
"origi... | {
"body": "@Override\n\tpublic void flush() {\n\t\tassertCloseImplicitBlock();\n\t\tdelegate.flush();\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilder.flush()",
"constructor": false,
"full_signature": "@Override public void flush()",
"identifier": "flush",
"invocations": [
"assertCloseImplici... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_208 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext/html/internal/SpanStrategiesTest.java",
"identifier": "SpanStrategiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void spanWithUnrecognizedCssToUnsupported() {\n\t\tSpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.BOLD),\n\t\t\t\tCollections.<SpanHtmlElementStrategy> emptyList());\n\t\tassertTrue(strategies.getStrategy(SpanType.SPAN,\n\t\t\t\tnew Attributes(null, null, \"font-wei... | {
"fields": [
{
"declarator": "spanTypeToAlternatives = createSpanTypeToAlternatives()",
"modifier": "private static final",
"original_string": "private static final Map<SpanType, List<SpanType>> spanTypeToAlternatives = createSpanTypeToAlternatives();",
"type": "Map<SpanType, List<SpanTyp... | {
"body": "@Override\n\tpublic SpanStrategy getStrategy(SpanType elementType, Attributes attributes) {\n\t\tSpanStrategy strategy = super.getStrategy(elementType, attributes);\n\t\tif (elementType == SpanType.SPAN && strategy instanceof UnsupportedSpanStrategy) {\n\t\t\tSpanStrategy alternateStrategy = calculateAlter... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_121 | {
"fields": [
{
"declarator": "block = new AtxHeaderBlock()",
"modifier": "",
"original_string": "AtxHeaderBlock block = new AtxHeaderBlock();",
"type": "AtxHeaderBlock",
"var_name": "block"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/e... | {
"body": "@Test\n\tpublic void canStart() {\n\t\tassertFalse(block.canStart(LineSequence.create(\"\")));\n\t\tassertTrue(block.canStart(LineSequence.create(\"#\")));\n\t\tassertTrue(block.canStart(LineSequence.create(\"# \")));\n\t\tassertTrue(block.canStart(LineSequence.create(\"# #\")));\n\t\tassertTrue(block.canS... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\" {0,3}(#{1,6})(?:[ \\t]+?(.+?))??(?:[ \\t]+#+)?[ \\t]*\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\" {0,3}(#{1,6})(?:[ \\t]+?(.+?))??(?:[ \\t]+#+)?[ \\t]*\");",
... | {
"body": "@Override\n\tpublic boolean canStart(LineSequence lineSequence) {\n\t\tLine line = lineSequence.getCurrentLine();\n\t\treturn line != null && PATTERN.matcher(line.getText()).matches();\n\t}",
"class_method_signature": "AtxHeaderBlock.canStart(LineSequence lineSequence)",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_44 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void divAfterImplicitParagraph() {\n\t\tbuilder.beginDocument();\n\n\t\tbuilder.characters(\"test\");\n\n\t\tbuilder.beginBlock(BlockType.DIV, new Attributes());\n\t\tbuilder.characters(\"more \");\n\t\tbuilder.beginSpan(SpanType.BOLD, new Attributes());\n\t\tbuilder.characters(\"text\");\n... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_52 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void listWithNestedSublist2() {\n\t\tbuilder.beginDocument();\n\n\t\tbuilder.beginBlock(BlockType.BULLETED_LIST, new Attributes());\n\n\t\temitListItem(\"first\");\n\n\t\tbuilder.beginBlock(BlockType.LIST_ITEM, new Attributes());\n\t\tbuilder.characters(\"second\");\n\n\t\tbuilder.beginBloc... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_137 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/LineTest.java",
"identifier": "LineTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getLineNumber() {\n\t\tassertEquals(0, new Line(0, 1, \"abc\").getLineNumber());\n\t\tassertEquals(1, new Line(1, 1, \"abc\").getLineNumber());\n\t}",
"class_method_signature": "LineTest.getLineNumber()",
"constructor": false,
"full_signature": "@Test public void getLineNumber()"... | {
"fields": [
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final String text;",
"type": "String",
"var_name": "text"
},
{
"declarator": "offset",
"modifier": "private final",
"original_string": "private final int offset;",... | {
"body": "public int getLineNumber() {\n\t\treturn lineNumber;\n\t}",
"class_method_signature": "Line.getLineNumber()",
"constructor": false,
"full_signature": "public int getLineNumber()",
"identifier": "getLineNumber",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_249 | {
"fields": [
{
"declarator": "locator",
"modifier": "private",
"original_string": "private ServiceLocator locator;",
"type": "ServiceLocator",
"var_name": "locator"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/util/ServiceLo... | {
"body": "@Test\n\tpublic void readServicesFile() {\n\t\tList<String> names = locator.readServiceClassNames(\n\t\t\t\tcreateInput(Object.class.getName() + \"\\n\" + String.class.getName() + \" # trailing comment\"));\n\t\tassertNotNull(names);\n\t\tassertEquals(2, names.size());\n\t\tassertEquals(Object.class.getNam... | {
"fields": [
{
"declarator": "classLoader",
"modifier": "protected final",
"original_string": "protected final ClassLoader classLoader;",
"type": "ClassLoader",
"var_name": "classLoader"
},
{
"declarator": "implementationClassLock = new Object()",
"modifier": "pr... | {
"body": "protected List<String> readServiceClassNames(URL url) {\n\t\ttry (InputStream stream = url.openStream()) {\n\t\t\treturn readServiceClassNames(stream);\n\t\t} catch (IOException e) {\n\t\t\tlogReadServiceClassNamesFailure(e);\n\t\t}\n\t\treturn Collections.emptyList();\n\t}",
"class_method_signature": "S... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_160 | {
"fields": [
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlLanguageBuilder builder;",
"type": "HtmlLanguageBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext... | {
"body": "@Test\n\tpublic void addSpanSubstitutionNullAlternative() {\n\t\tNullPointerException npe = assertThrows(NullPointerException.class,\n\t\t\t\t() -> builder.addSubstitution(SpanType.BOLD, (String) null));\n\t\tassertTrue(npe.getMessage().contains(\"Must provide an alternativeTagName\"));\n\t}",
"class_met... | {
"fields": [
{
"declarator": "name",
"modifier": "private",
"original_string": "private String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "blockTypes = Sets.newHashSet()",
"modifier": "private final",
"original_string": "private final S... | {
"body": "public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) {\n\t\trequireNonNull(spanType, \"Must provide a spanType\"); //$NON-NLS-1$\n\t\trequireNonNull(alternativeTagName, \"Must provide an alternativeTagName\"); //$NON-NLS-1$\n\t\tspanTypeToElementNameSubstitution.put(span... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_232 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void createMarkupToEclipseTocCopyrightNotice() {\n\t\tFile file = mock(File.class);\n\t\tdoReturn(\"Test.html\").when(file).getName();\n\n\t\tmarkupToEclipseHelp.copyrightNotice = \"Test Copyright\";\n\t\tMarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc(\"\", file, \"Te... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected MarkupToEclipseToc createMarkupToEclipseToc(String relativePath, File htmlOutputFile, String name) {\n\t\tMarkupToEclipseToc toEclipseToc = new SplittingMarkupToEclipseToc();\n\n\t\ttoEclipseToc.setBookTitle(title == null ? name : title);\n\t\ttoEclipseToc.setCopyrightNotice(copyrightNotice);\n\t... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_91 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/inlines/AutoLinkWithoutDemarcationSpanTest.java",
"identifier": "AutoLinkWithoutDemarcationSpanTest",
"interfaces": "",
"superclass": "extends AbstractSourceSpanTest"
} | {
"body": "@Test\n\tpublic void createInline() {\n\t\tassertNoInline(createCursor(\"httpx://example.com sdf\"));\n\t\tassertNoInline(createCursor(\"http:/\"));\n\t\tassertLink(0, 28, \"http://example.com:8080/#see\", \"http://example.com:8080/#see\",\n\t\t\t\tcreateCursor(\"http://example.com:8080/#see one\"));\n\t\t... | {
"fields": [
{
"declarator": "linkPattern = Pattern\n\t\t\t.compile(\"(https?://[a-zA-Z0-9%._~!$&?#'()*+,;:@/=-]*[a-zA-Z0-9_~!$&?#'(*+@/=-]).*\", Pattern.DOTALL)",
"modifier": "private final",
"original_string": "private final Pattern linkPattern = Pattern\n\t\t\t.compile(\"(https?://[a-zA-Z0-9... | {
"body": "@Override\n\tpublic Optional<? extends Inline> createInline(Cursor cursor) {\n\t\tif (cursor.getChar() == 'h') {\n\t\t\tMatcher matcher = cursor.matcher(linkPattern);\n\t\t\tif (matcher.matches()) {\n\t\t\t\tString href = matcher.group(1);\n\t\t\t\tString link = href;\n\n\t\t\t\tint endOffset = cursor.getO... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_265 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/EntityReferencesTest.java",
"identifier": "EntityReferencesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void instance() {\n\t\tassertNotNull(EntityReferences.instance());\n\t\tassertSame(EntityReferences.instance(), EntityReferences.instance());\n\t}",
"class_method_signature": "EntityReferencesTest.instance()",
"constructor": false,
"full_signature": "@Test public void instance()",
"... | {
"fields": [
{
"declarator": "NUMERIC_ENTITY_PATTERN = Pattern.compile(\"#(?:(?:x([0-9A-Fa-f]+))|([0-9]+))\")",
"modifier": "private static final",
"original_string": "private static final Pattern NUMERIC_ENTITY_PATTERN = Pattern.compile(\"#(?:(?:x([0-9A-Fa-f]+))|([0-9]+))\");",
"type": "... | {
"body": "public static EntityReferences instance() {\n\t\treturn instance;\n\t}",
"class_method_signature": "EntityReferences.instance()",
"constructor": false,
"full_signature": "public static EntityReferences instance()",
"identifier": "instance",
"invocations": [],
"modifiers": "public static",
"pa... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_320 | {
"fields": [
{
"declarator": "builder = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder builder = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/... | {
"body": "@Test\n\tpublic void link() {\n\t\tbuilder.link(new LinkAttributes(), \"https://example.com\", \"test\");\n\t\tassertEvents(new LinkEvent(new LinkAttributes(), \"https://example.com\", \"test\"));\n\t}",
"class_method_signature": "EventDocumentBuilderTest.link()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "events = new ArrayList<>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilderEvent> events = new ArrayList<>();",
"type": "List<DocumentBuilderEvent>",
"var_name": "events"
}
],
"file": "wikitext/core/org.eclip... | {
"body": "@Override\n\tpublic void link(Attributes attributes, String hrefOrHashName, String text) {\n\t\tevents.add(new LinkEvent(attributes, hrefOrHashName, text));\n\t}",
"class_method_signature": "EventDocumentBuilder.link(Attributes attributes, String hrefOrHashName, String text)",
"constructor": false,
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_29 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void boldSpanNoWhitespace_adjacentSpans() {\n\t\tbuilder.beginDocument();\n\t\tbuilder.beginBlock(BlockType.PARAGRAPH, new Attributes());\n\n\t\tbuilder.beginSpan(SpanType.BOLD, new Attributes());\n\t\tbuilder.characters(\"text2\");\n\t\tbuilder.endSpan();\n\t\tbuilder.beginSpan(SpanType.IT... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_273 | {
"fields": [
{
"declarator": "delegate1 = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder delegate1 = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "delegate1"
},
{
"declarator... | {
"body": "@Test\n\tpublic void endHeading() {\n\t\tmultiplexer.endHeading();\n\t\tassertEvents(new EndHeadingEvent());\n\t}",
"class_method_signature": "MultiplexingDocumentBuilderTest.endHeading()",
"constructor": false,
"full_signature": "@Test public void endHeading()",
"identifier": "endHeading",
"invo... | {
"fields": [
{
"declarator": "builders = new ArrayList<DocumentBuilder>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilder> builders = new ArrayList<DocumentBuilder>();",
"type": "List<DocumentBuilder>",
"var_name": "builders"
}
],
"file"... | {
"body": "@Override\n\tpublic void endHeading() {\n\t\tfor (DocumentBuilder builder : builders) {\n\t\t\tbuilder.endHeading();\n\t\t}\n\t}",
"class_method_signature": "MultiplexingDocumentBuilder.endHeading()",
"constructor": false,
"full_signature": "@Override public void endHeading()",
"identifier": "endHe... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_336 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/event/LinkEventTest.java",
"identifier": "LinkEventTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void equals() {\n\t\tassertEquality(new LinkEvent(new Attributes(), \"#name\", \"text\"),\n\t\t\t\tnew LinkEvent(new Attributes(), \"#name\", \"text\"));\n\t\tassertInequality(new LinkEvent(new Attributes(), \"#name\", \"text\"),\n\t\t\t\tnew LinkEvent(new Attributes(), \"#name2\", \"text\"... | {
"fields": [
{
"declarator": "hrefOrHashName",
"modifier": "private final",
"original_string": "private final String hrefOrHashName;",
"type": "String",
"var_name": "hrefOrHashName"
},
{
"declarator": "text",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (obj == this) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!(obj instanceof LinkEvent)) {\n\t\t\treturn false;\n\t\t}\n\t\tLinkEvent other = (LinkEvent) obj;\n\t\treturn Objects.equals(hrefOrHashName, othe... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_224 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void configureStylesheetUrls() {\n\t\tmarkupToEclipseHelp.stylesheetUrls = Arrays.asList(\"test/foo.css\", \"bar.css\");\n\t\tHtmlDocumentBuilder builder = mock(HtmlDocumentBuilder.class);\n\t\tmarkupToEclipseHelp.configureStylesheets(builder, \"\");\n\t\tverify(builder, times(2)).addCssSty... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected void configureStylesheets(HtmlDocumentBuilder builder, String relativePath) {\n\t\tfor (String cssStylesheetUrl : stylesheetUrls) {\n\t\t\tbuilder.addCssStylesheet(\n\t\t\t\t\tnew HtmlDocumentBuilder.Stylesheet(computeResourcePath(cssStylesheetUrl, relativePath)));\n\t\t}\n\t}",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_87 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/inlines/InlineTest.java",
"identifier": "InlineTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void createContext() {\n\t\tProcessingContextBuilder builder = ProcessingContext.builder();\n\t\tnew Inline(new Line(1, 2, \"text\"), 0, 1) {\n\n\t\t\t@Override\n\t\t\tpublic void emit(DocumentBuilder builder) {\n\t\t\t}\n\t\t}.createContext(builder);\n\t\tProcessingContext context = builde... | {
"fields": [
{
"declarator": "line",
"modifier": "private final",
"original_string": "private final Line line;",
"type": "Line",
"var_name": "line"
},
{
"declarator": "offset",
"modifier": "private final",
"original_string": "private final int offset;",
... | {
"body": "public void createContext(ProcessingContextBuilder contextBuilder) {\n\t\t// nothing to do\n\t}",
"class_method_signature": "Inline.createContext(ProcessingContextBuilder contextBuilder)",
"constructor": false,
"full_signature": "public void createContext(ProcessingContextBuilder contextBuilder)",
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_68 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/TextSegmentTest.java",
"identifier": "TextSegmentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void toTextOffset() {\n\t\tTextSegment segment = new TextSegment(ImmutableList.of(new Line(1, 10, \"abc\"), new Line(2, 15, \"def\")));\n\t\tassertEquals(0, segment.toTextOffset(10));\n\t\tassertEquals(2, segment.toTextOffset(12));\n\t\tassertEquals(4, segment.toTextOffset(15));\n\t\tassert... | {
"fields": [
{
"declarator": "lines",
"modifier": "private final",
"original_string": "private final List<Line> lines;",
"type": "List<Line>",
"var_name": "lines"
},
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "public int toTextOffset(int documentOffset) {\n\t\tint textOffset = 0;\n\t\tfor (Line line : lines) {\n\t\t\tint lineRelativeOffset = documentOffset - line.getOffset();\n\t\t\tint linePlusSeparatorLength = line.getText().length() + 1;\n\t\t\tif (lineRelativeOffset >= 0 && lineRelativeOffset < linePlusSepar... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_86 | {
"fields": [
{
"declarator": "line = new Line(0, 1, \"test\")",
"modifier": "private final",
"original_string": "private final Line line = new Line(0, 1, \"test\");",
"type": "Line",
"var_name": "line"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/tes... | {
"body": "@Test\n\tpublic void unescapeBackslashEscapeBrackets() {\n\t\tPotentialBracketEndDelimiter delimiter = new PotentialBracketEndDelimiter(line, 0);\n\t\tassertEquals(\"a[b\", delimiter.toReferenceName(\"a\\\\[b\"));\n\t\tassertEquals(\"a]b\", delimiter.toReferenceName(\"a\\\\]b\"));\n\t\tassertEquals(\"a\\\\... | {
"fields": [
{
"declarator": "HTML_ENTITY_PATTERN = Pattern\n\t\t\t.compile(\"(&([a-zA-Z][a-zA-Z0-9]{1,32}|#x[a-fA-F0-9]{1,8}|#[0-9]{1,8});)\")",
"modifier": "private static final",
"original_string": "private static final Pattern HTML_ENTITY_PATTERN = Pattern\n\t\t\t.compile(\"(&([a-zA-Z][a-zA... | {
"body": "String toReferenceName(String stringWithBackslashEscapes) {\n\t\tString referenceName = stringWithBackslashEscapes.replaceAll(\"(?s)\\\\\\\\(\\\\[|\\\\])\", \"$1\").replaceAll(\"\\\\s+\", \" \");\n\t\tif (CharMatcher.whitespace().matchesAllOf(referenceName)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn referen... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_69 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/TextSegmentTest.java",
"identifier": "TextSegmentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getLineAtOffset() {\n\t\tImmutableList<Line> lines = ImmutableList.of(new Line(1, 10, \"abc\"), new Line(2, 15, \"def\"));\n\t\tTextSegment segment = new TextSegment(lines);\n\t\tassertEquals(lines.get(0), segment.getLineAtOffset(0));\n\t\tassertEquals(lines.get(0), segment.getLineAtOf... | {
"fields": [
{
"declarator": "lines",
"modifier": "private final",
"original_string": "private final List<Line> lines;",
"type": "List<Line>",
"var_name": "lines"
},
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "public Line getLineAtOffset(int textOffset) {\n\t\tint documentOffset = offsetOf(textOffset);\n\t\tLine previous = null;\n\t\tfor (Line line : lines) {\n\t\t\tif (line.getOffset() > documentOffset) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tprevious = line;\n\t\t}\n\t\treturn requireNonNull(previous);\n\t}",
"cla... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_225 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void configureStylesheetUrlsWithRelativePath() {\n\t\tmarkupToEclipseHelp.stylesheetUrls = Arrays.asList(\"bar.css\");\n\t\tHtmlDocumentBuilder builder = mock(HtmlDocumentBuilder.class);\n\t\tmarkupToEclipseHelp.configureStylesheets(builder, \"one/two\");\n\t\tArgumentCaptor<Stylesheet> cap... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected void configureStylesheets(HtmlDocumentBuilder builder, String relativePath) {\n\t\tfor (String cssStylesheetUrl : stylesheetUrls) {\n\t\t\tbuilder.addCssStylesheet(\n\t\t\t\t\tnew HtmlDocumentBuilder.Stylesheet(computeResourcePath(cssStylesheetUrl, relativePath)));\n\t\t}\n\t}",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_360 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/event/DocumentBuilderEventsTest.java",
"identifier": "DocumentBuilderEventsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testToString() {\n\t\tBeginDocumentEvent event = new BeginDocumentEvent();\n\t\tDocumentBuilderEvents events = new DocumentBuilderEvents(Lists.<DocumentBuilderEvent> newArrayList(event));\n\t\tassertNotNull(events.toString());\n\t\tassertTrue(events.toString().contains(event.toString()... | {
"fields": [
{
"declarator": "events",
"modifier": "private final",
"original_string": "private final List<DocumentBuilderEvent> events;",
"type": "List<DocumentBuilderEvent>",
"var_name": "events"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/main/java/org/ecli... | {
"body": "@Override\n\tpublic String toString() {\n\t\treturn format(\"{0} [events={1}]\", events); //$NON-NLS-1$\n\t}",
"class_method_signature": "DocumentBuilderEvents.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_272 | {
"fields": [
{
"declarator": "delegate1 = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder delegate1 = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "delegate1"
},
{
"declarator... | {
"body": "@Test\n\tpublic void beginHeading() {\n\t\tmultiplexer.beginHeading(3, new HeadingAttributes());\n\t\tassertEvents(new BeginHeadingEvent(3, new HeadingAttributes()));\n\t}",
"class_method_signature": "MultiplexingDocumentBuilderTest.beginHeading()",
"constructor": false,
"full_signature": "@Test publ... | {
"fields": [
{
"declarator": "builders = new ArrayList<DocumentBuilder>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilder> builders = new ArrayList<DocumentBuilder>();",
"type": "List<DocumentBuilder>",
"var_name": "builders"
}
],
"file"... | {
"body": "@Override\n\tpublic void beginHeading(int level, Attributes attributes) {\n\t\tfor (DocumentBuilder builder : builders) {\n\t\t\tbuilder.beginHeading(level, attributes);\n\t\t}\n\t}",
"class_method_signature": "MultiplexingDocumentBuilder.beginHeading(int level, Attributes attributes)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_337 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/parser/builder/event/EndHeadingEventTest.java",
"identifier": "EndHeadingEventTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"endHeading()\", new EndHeadingEvent().toString());\n\t}",
"class_method_signature": "EndHeadingEventTest.testToString()",
"constructor": false,
"full_signature": "@Test public void testToString()",
"identifier": "testToString",
"invocation... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/main/java/org/eclipse/mylyn/wikitext/parser/builder/event/EndHeadingEvent.java",
"identifier": "EndHeadingEvent",
"interfaces": "",
"methods": [
{
"class_method_signature": "EndHeadingEvent.invoke(DocumentBuilder builder)",
... | {
"body": "@Override\n\tpublic String toString() {\n\t\treturn \"endHeading()\"; //$NON-NLS-1$\n\t}",
"class_method_signature": "EndHeadingEvent.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [],
"modifiers": "@Override p... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_28 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void boldSpanNoWhitespace_spanMidLine() {\n\t\tbuilder.beginDocument();\n\t\tbuilder.beginBlock(BlockType.PARAGRAPH, new Attributes());\n\n\t\tbuilder.characters(\"text3\");\n\t\tbuilder.beginSpan(SpanType.BOLD, new Attributes());\n\t\tbuilder.characters(\"text2\");\n\t\tbuilder.endSpan();\... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_264 | {
"fields": [
{
"declarator": "generator = new IdGenerator()",
"modifier": "private final",
"original_string": "private final IdGenerator generator = new IdGenerator();",
"type": "IdGenerator",
"var_name": "generator"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src... | {
"body": "@Test\n\tpublic void newIdNull() {\n\t\tassertEquals(\"h1-1\", generator.newId(\"h1\", null));\n\t\tassertEquals(\"h1-2\", generator.newId(\"h1\", null));\n\t\tassertEquals(\"h2-1\", generator.newId(\"h2\", null));\n\t}",
"class_method_signature": "IdGeneratorTest.newIdNull()",
"constructor": false,
... | {
"fields": [
{
"declarator": "DEFAULT_ID_GENERATION_STRATEGY = new DefaultIdGenerationStrategy()",
"modifier": "private static final",
"original_string": "private static final DefaultIdGenerationStrategy DEFAULT_ID_GENERATION_STRATEGY = new DefaultIdGenerationStrategy();",
"type": "Defaul... | {
"body": "public String newId(String type, String text) {\n\t\tif (type == null) {\n\t\t\ttype = \"\"; //$NON-NLS-1$\n\t\t}\n\t\tInteger current = idGenerators.get(type);\n\t\tif (current == null) {\n\t\t\tcurrent = 0;\n\t\t}\n\t\tcurrent = current + 1;\n\n\t\tidGenerators.put(type, current);\n\n\t\tString id = null... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_321 | {
"fields": [
{
"declarator": "builder = new EventDocumentBuilder()",
"modifier": "private final",
"original_string": "private final EventDocumentBuilder builder = new EventDocumentBuilder();",
"type": "EventDocumentBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/... | {
"body": "@Test\n\tpublic void lineBreak() {\n\t\tbuilder.lineBreak();\n\t\tassertEvents(new LineBreakEvent());\n\t}",
"class_method_signature": "EventDocumentBuilderTest.lineBreak()",
"constructor": false,
"full_signature": "@Test public void lineBreak()",
"identifier": "lineBreak",
"invocations": [
"... | {
"fields": [
{
"declarator": "events = new ArrayList<>()",
"modifier": "private final",
"original_string": "private final List<DocumentBuilderEvent> events = new ArrayList<>();",
"type": "List<DocumentBuilderEvent>",
"var_name": "events"
}
],
"file": "wikitext/core/org.eclip... | {
"body": "@Override\n\tpublic void lineBreak() {\n\t\tevents.add(new LineBreakEvent());\n\t}",
"class_method_signature": "EventDocumentBuilder.lineBreak()",
"constructor": false,
"full_signature": "@Override public void lineBreak()",
"identifier": "lineBreak",
"invocations": [
"add"
],
"modifiers":... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_90 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/inlines/StringCharactersSpanTest.java",
"identifier": "StringCharactersSpanTest",
"interfaces": "",
"superclass": "extends AbstractSourceSpanTest"
} | {
"body": "@Test\n\tpublic void createInline() {\n\t\tassertNoInline(createCursor(\"``one\"));\n\t\tassertNoInline(createCursor(\"__two\"));\n\t\tassertNoInline(createCursor(\"***three\"));\n\t\tassertNoInline(createCursor(\" \\nb\"));\n\t\tassertInline(Characters.class, 0, 3, createCursor(\"one`\"));\n\t\tassertIn... | {
"fields": [
{
"declarator": "pattern = Pattern.compile(\"((?: *[^\\n `\\\\[\\\\]\\\\\\\\!<&*_h]+)+).*\", Pattern.DOTALL)",
"modifier": "private final",
"original_string": "private final Pattern pattern = Pattern.compile(\"((?: *[^\\n `\\\\[\\\\]\\\\\\\\!<&*_h]+)+).*\", Pattern.DOTALL);",
... | {
"body": "@Override\n\tpublic Optional<? extends Inline> createInline(Cursor cursor) {\n\t\tMatcher matcher = cursor.matcher(pattern);\n\t\tif (matcher.matches()) {\n\t\t\tString group = matcher.group(1);\n\t\t\tint length = cursor.getOffset(matcher.end(1)) - cursor.getOffset();\n\t\t\treturn Optional.of(new Charact... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_233 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void createMarkupToEclipseTocAnchorLevel() {\n\t\tFile file = mock(File.class);\n\t\tdoReturn(\"Test.html\").when(file).getName();\n\n\t\tMarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc(\"\", file, \"Test\");\n\t\tassertEquals(0, toc.getAnchorLevel());\n\t\tmarkupToEcl... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected MarkupToEclipseToc createMarkupToEclipseToc(String relativePath, File htmlOutputFile, String name) {\n\t\tMarkupToEclipseToc toEclipseToc = new SplittingMarkupToEclipseToc();\n\n\t\ttoEclipseToc.setBookTitle(title == null ? name : title);\n\t\ttoEclipseToc.setCopyrightNotice(copyrightNotice);\n\t... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_161 | {
"fields": [
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlLanguageBuilder builder;",
"type": "HtmlLanguageBuilder",
"var_name": "builder"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext... | {
"body": "@Test\n\tpublic void addSpanSubstitutionNullSpanType() {\n\t\tNullPointerException npe = assertThrows(NullPointerException.class,\n\t\t\t\t() -> builder.addSubstitution((SpanType) null, \"bold\"));\n\t\tassertTrue(npe.getMessage().contains(\"Must provide a spanType\"));\n\t}",
"class_method_signature": "... | {
"fields": [
{
"declarator": "name",
"modifier": "private",
"original_string": "private String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "blockTypes = Sets.newHashSet()",
"modifier": "private final",
"original_string": "private final S... | {
"body": "public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) {\n\t\trequireNonNull(spanType, \"Must provide a spanType\"); //$NON-NLS-1$\n\t\trequireNonNull(alternativeTagName, \"Must provide an alternativeTagName\"); //$NON-NLS-1$\n\t\tspanTypeToElementNameSubstitution.put(span... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_248 | {
"fields": [
{
"declarator": "locator",
"modifier": "private",
"original_string": "private ServiceLocator locator;",
"type": "ServiceLocator",
"var_name": "locator"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext/src/test/java/org/eclipse/mylyn/wikitext/util/ServiceLo... | {
"body": "@Test\n\tpublic void readServicesFileCommentsAndEmptyLinesOnly() {\n\t\tList<String> names = locator.readServiceClassNames(createInput(\"#\" + Object.class.getName() + \"\\n\\n\\n\\n#last\"));\n\t\tassertNotNull(names);\n\t\tassertTrue(names.isEmpty());\n\t}",
"class_method_signature": "ServiceLocatorTes... | {
"fields": [
{
"declarator": "classLoader",
"modifier": "protected final",
"original_string": "protected final ClassLoader classLoader;",
"type": "ClassLoader",
"var_name": "classLoader"
},
{
"declarator": "implementationClassLock = new Object()",
"modifier": "pr... | {
"body": "protected List<String> readServiceClassNames(URL url) {\n\t\ttry (InputStream stream = url.openStream()) {\n\t\t\treturn readServiceClassNames(stream);\n\t\t} catch (IOException e) {\n\t\t\tlogReadServiceClassNamesFailure(e);\n\t\t}\n\t\treturn Collections.emptyList();\n\t}",
"class_method_signature": "S... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_53 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void implicitParagrahWithSpan() {\n\t\tbuilder.beginDocument();\n\t\tbuilder.beginSpan(SpanType.BOLD, new Attributes());\n\t\tbuilder.characters(\"text1\");\n\t\tbuilder.endSpan();\n\t\tbuilder.beginBlock(BlockType.PARAGRAPH, new Attributes());\n\t\tbuilder.characters(\"text2\");\n\t\tbuild... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_136 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/LineTest.java",
"identifier": "LineTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getText() {\n\t\tassertEquals(\"abc\", new Line(1, 0, \"abc\").getText());\n\t}",
"class_method_signature": "LineTest.getText()",
"constructor": false,
"full_signature": "@Test public void getText()",
"identifier": "getText",
"invocations": [
"assertEquals",
"getText"... | {
"fields": [
{
"declarator": "text",
"modifier": "private final",
"original_string": "private final String text;",
"type": "String",
"var_name": "text"
},
{
"declarator": "offset",
"modifier": "private final",
"original_string": "private final int offset;",... | {
"body": "public String getText() {\n\t\treturn text;\n\t}",
"class_method_signature": "Line.getText()",
"constructor": false,
"full_signature": "public String getText()",
"identifier": "getText",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_120 | {
"fields": [
{
"declarator": "block = new HtmlBlock()",
"modifier": "private final",
"original_string": "private final HtmlBlock block = new HtmlBlock();",
"type": "HtmlBlock",
"var_name": "block"
}
],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/jav... | {
"body": "@Test\n\tpublic void canStartDoesNotAdvanceLineSequencePosition() {\n\t\tLineSequence lineSequence = LineSequence.create(\"<p\\n a=\\\"b\\\"\\n>\");\n\t\tLine firstLine = lineSequence.getCurrentLine();\n\t\tassertTrue(block.canStart(lineSequence));\n\t\tassertSame(firstLine, lineSequence.getCurrentLine())... | {
"fields": [
{
"declarator": "BLOCK_TAG_NAMES = \"address|article|aside|base|basefont|blockquote|body|button|canvas|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|embed|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|iframe|legend|li|link|main... | {
"body": "@Override\n\tpublic boolean canStart(LineSequence lineSequence) {\n\t\tLine line = lineSequence.getCurrentLine();\n\t\tif (line != null) {\n\t\t\treturn startPattern.matcher(line.getText()).matches();\n\t\t}\n\t\treturn false;\n\t}",
"class_method_signature": "HtmlBlock.canStart(LineSequence lineSequence... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_45 | {
"fields": [
{
"declarator": "out = new StringWriter()",
"modifier": "private final",
"original_string": "private final StringWriter out = new StringWriter();",
"type": "StringWriter",
"var_name": "out"
},
{
"declarator": "builder = new ConfluenceDocumentBuilder(out)",... | {
"body": "@Test\n\tpublic void divWithinTableCell() {\n\t\tbuilder.beginDocument();\n\n\t\tbuilder.beginBlock(BlockType.TABLE, new Attributes());\n\n\t\tbuilder.beginBlock(BlockType.TABLE_ROW, new Attributes());\n\n\t\tbuilder.beginBlock(BlockType.TABLE_CELL_NORMAL, new Attributes());\n\t\tbuilder.characters(\"first... | {
"fields": [
{
"declarator": "NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\"",
"modifier": "private static final",
"original_string": "private static final String NEWLINE_REGEX = \"(?:\\r\\n|\\r|\\n)\";",
"type": "String",
"var_name": "NEWLINE_REGEX"
},
{
"declarator": "PATTER... | {
"body": "@Override\n\tpublic void characters(String text) {\n\t\tassertOpenBlock();\n\t\ttry {\n\t\t\tfor (int x = 0; x < text.length(); ++x) {\n\t\t\t\tchar c = text.charAt(x);\n\t\t\t\tswitch (c) {\n\t\t\t\tcase '\\u00A0':// \n\t\t\t\t\tcurrentBlock.write(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\u00A9': // ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_209 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext/html/internal/SubstitutionWithoutCssSpanStrategyTest.java",
"identifier": "SubstitutionWithoutCssSpanStrategyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test() {\n\t\tSubstitutionWithoutCssSpanStrategy strategy = new SubstitutionWithoutCssSpanStrategy(SpanType.BOLD);\n\t\tEventDocumentBuilder builder = new EventDocumentBuilder();\n\t\tstrategy.beginSpan(builder, SpanType.ITALIC, new Attributes(\"1\", \"class\", \"style\", \"lang\"));\n... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/main/java/org/eclipse/mylyn/wikitext/html/internal/SubstitutionWithoutCssSpanStrategy.java",
"identifier": "SubstitutionWithoutCssSpanStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "SubstitutionWithoutC... | {
"body": "@Override\n\tpublic void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) {\n\t\tAttributes attributesCopy = attributes.clone();\n\t\tattributesCopy.setCssStyle(null);\n\t\tsuper.beginSpan(builder, unsupportedType, attributesCopy);\n\t}",
"class_method_signature": "Subs... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_12 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.confluence/src/test/java/org/eclipse/mylyn/wikitext/confluence/internal/util/ColorsTest.java",
"identifier": "ColorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void asHexToHex() {\n\t\tString hex = Colors.asHex(\"#ffffff\");\n\n\t\tassertEquals(\"#ffffff\", hex);\n\t}",
"class_method_signature": "ColorsTest.asHexToHex()",
"constructor": false,
"full_signature": "@Test public void asHexToHex()",
"identifier": "asHexToHex",
"invocations": ... | {
"fields": [
{
"declarator": "RGB_PATTERN = Pattern\n\t\t\t.compile(\"rgb\\\\(\\\\s*(\\\\d{1,3}+)\\\\s*,\\\\s*(\\\\d{1,3}+)\\\\s*,\\\\s*(\\\\d{1,3}+)\\\\s*\\\\)\")",
"modifier": "private static final",
"original_string": "private static final Pattern RGB_PATTERN = Pattern\n\t\t\t.compile(\"rgb\... | {
"body": "public static String asHex(String color) {\n\t\tMatcher rgbMatcher = RGB_PATTERN.matcher(color);\n\t\tif (rgbMatcher.matches()) {\n\t\t\treturn formatRgbAsHex(asInt(rgbMatcher.group(1)), asInt(rgbMatcher.group(2)), asInt(rgbMatcher.group(3)));\n\t\t}\n\t\treturn color;\n\t}",
"class_method_signature": "C... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_177 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.html/src/test/java/org/eclipse/mylyn/wikitext/html/internal/HtmlSubsetLanguageTest.java",
"identifier": "HtmlSubsetLanguageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void tagNameSubstitutions() {\n\t\tassertEquals(ImmutableMap.of(SpanType.EMPHASIS, \"new-em\"),\n\t\t\t\tnewHtmlSubsetLanguage(SpanType.EMPHASIS).getTagNameSubstitutions());\n\t}",
"class_method_signature": "HtmlSubsetLanguageTest.tagNameSubstitutions()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "supportedBlockTypes",
"modifier": "private final",
"original_string": "private final Set<BlockType> supportedBlockTypes;",
"type": "Set<BlockType>",
"var_name": "supportedBlockTypes"
},
{
"declarator": "supportedSpanTypes",
"modifier... | {
"body": "public Map<SpanType, String> getTagNameSubstitutions() {\n\t\treturn tagNameSubstitutions;\n\t}",
"class_method_signature": "HtmlSubsetLanguage.getTagNameSubstitutions()",
"constructor": false,
"full_signature": "public Map<SpanType, String> getTagNameSubstitutions()",
"identifier": "getTagNameSubs... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_198 | {
"fields": [
{
"declarator": "writer",
"modifier": "private",
"original_string": "private StringWriter writer;",
"type": "StringWriter",
"var_name": "writer"
},
{
"declarator": "builder",
"modifier": "private",
"original_string": "private HtmlSubsetDocument... | {
"body": "@Test\n\tpublic void testParagraphUnsupported() {\n\t\tbuilder.setSupportedBlockTypes(Collections.<BlockType> emptySet());\n\t\tassertUnsupportedBlock(\"test\", BlockType.PARAGRAPH);\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilderTest.testParagraphUnsupported()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final HtmlDocumentBuilder delegate;",
"type": "HtmlDocumentBuilder",
"var_name": "delegate"
},
{
"declarator": "blockStrategies",
"modifier": "private",
"origi... | {
"body": "void setSupportedBlockTypes(Set<BlockType> blockTypes) {\n\t\tcheckState(blockStrategyState.isEmpty());\n\t\tblockStrategies = new BlockStrategies(blockTypes);\n\t}",
"class_method_signature": "HtmlSubsetDocumentBuilder.setSupportedBlockTypes(Set<BlockType> blockTypes)",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_6 | {
"fields": [
{
"declarator": "strategy = new GfmIdGenerationStrategy()",
"modifier": "private final",
"original_string": "private final GfmIdGenerationStrategy strategy = new GfmIdGenerationStrategy();",
"type": "GfmIdGenerationStrategy",
"var_name": "strategy"
}
],
"file": ... | {
"body": "@Test\n\tpublic void mixedCase() {\n\t\tassertEquals(\"mixedcase\", strategy.generateId(\"MixedCase\"));\n\t}",
"class_method_signature": "GfmIdGenerationStrategyTest.mixedCase()",
"constructor": false,
"full_signature": "@Test public void mixedCase()",
"identifier": "mixedCase",
"invocations": [... | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.markdown/src/main/java/org/eclipse/mylyn/wikitext/markdown/internal/GfmIdGenerationStrategy.java",
"identifier": "GfmIdGenerationStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "GfmIdGenerationStrategy.generateId... | {
"body": "@Override\n\tpublic String generateId(String headingText) {\n\t\tString id = headingText.toLowerCase(Locale.getDefault());\n\t\tid = id.replaceAll(\"[^a-z0-9_-]\", \"-\"); //$NON-NLS-1$//$NON-NLS-2$\n\t\tCharMatcher hyphenMatcher = CharMatcher.is('-');\n\t\tid = hyphenMatcher.trimFrom(hyphenMatcher.collaps... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_229 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"declarat... | {
"body": "@Test\n\tpublic void calculateHelpPrefixRootWithHelpPrefix() {\n\t\tmarkupToEclipseHelp.helpPrefix = \"help\";\n\t\tassertEquals(\"help\", markupToEclipseHelp.calculateHelpPrefix(\"\"));\n\t}",
"class_method_signature": "MarkupToEclipseHelpMojoTest.calculateHelpPrefixRootWithHelpPrefix()",
"constructor... | {
"fields": [
{
"declarator": "outputFolder",
"modifier": "protected",
"original_string": "protected File outputFolder;",
"type": "File",
"var_name": "outputFolder"
},
{
"declarator": "sourceFolder",
"modifier": "protected",
"original_string": "protected Fil... | {
"body": "protected String calculateHelpPrefix(String relativePath) {\n\t\tString prefix = helpPrefix == null ? \"\" : helpPrefix;\n\t\tif (relativePath.length() > 0) {\n\t\t\tif (prefix.length() > 0) {\n\t\t\t\tprefix += \"/\";\n\t\t\t}\n\t\t\tprefix += relativePath;\n\t\t}\n\t\treturn prefix.length() == 0 ? null :... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
1553760_100 | {
"fields": [],
"file": "wikitext/core/org.eclipse.mylyn.wikitext.commonmark/src/test/java/org/eclipse/mylyn/wikitext/commonmark/internal/inlines/CursorTest.java",
"identifier": "CursorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getNext() {\n\t\tCursor cursor = new Cursor(createTextSegment(\"123\"));\n\t\tassertTrue(cursor.hasNext());\n\t\tassertTrue(cursor.hasNext(1));\n\t\tassertEquals('2', cursor.getNext());\n\t\tassertTrue(cursor.hasNext(2));\n\t\tassertEquals('3', cursor.getNext(2));\n\t\tassertFalse(curs... | {
"fields": [
{
"declarator": "segment",
"modifier": "private final",
"original_string": "private final TextSegment segment;",
"type": "TextSegment",
"var_name": "segment"
},
{
"declarator": "text",
"modifier": "private final",
"original_string": "private fi... | {
"body": "public char getNext() {\n\t\treturn getNext(1);\n\t}",
"class_method_signature": "Cursor.getNext()",
"constructor": false,
"full_signature": "public char getNext()",
"identifier": "getNext",
"invocations": [
"getNext"
],
"modifiers": "public",
"parameters": "()",
"return": "char",
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1553760,
"size": 17676,
"stargazer_count": 8,
"stars": null,
"updates": null,
"url": "https://github.com/eclipse/mylyn.docs"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.