id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
108,700 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/chaining/LookaheadChainingListener.java | LookaheadChainingListener.transferStart | public void transferStart(QueueListener eventsToTransfer)
{
while (!eventsToTransfer.isEmpty()) {
Event event = eventsToTransfer.removeLast();
this.previousEvents.offerFirst(event);
}
} | java | public void transferStart(QueueListener eventsToTransfer)
{
while (!eventsToTransfer.isEmpty()) {
Event event = eventsToTransfer.removeLast();
this.previousEvents.offerFirst(event);
}
} | [
"public",
"void",
"transferStart",
"(",
"QueueListener",
"eventsToTransfer",
")",
"{",
"while",
"(",
"!",
"eventsToTransfer",
".",
"isEmpty",
"(",
")",
")",
"{",
"Event",
"event",
"=",
"eventsToTransfer",
".",
"removeLast",
"(",
")",
";",
"this",
".",
"previ... | Transfer all passed events by removing the from the passed parameter and moving them to the beginning of the
event stack.
@param eventsToTransfer the collection of events to move
@since 10.5RC1 | [
"Transfer",
"all",
"passed",
"events",
"by",
"removing",
"the",
"from",
"the",
"passed",
"parameter",
"and",
"moving",
"them",
"to",
"the",
"beginning",
"of",
"the",
"event",
"stack",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/chaining/LookaheadChainingListener.java#L554-L560 |
108,701 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiFormat.java | WikiFormat.addStyle | public WikiFormat addStyle(WikiStyle style)
{
if (fStyles.contains(style)) {
return this;
}
WikiFormat clone = getClone();
clone.fStyles.add(style);
return clone;
} | java | public WikiFormat addStyle(WikiStyle style)
{
if (fStyles.contains(style)) {
return this;
}
WikiFormat clone = getClone();
clone.fStyles.add(style);
return clone;
} | [
"public",
"WikiFormat",
"addStyle",
"(",
"WikiStyle",
"style",
")",
"{",
"if",
"(",
"fStyles",
".",
"contains",
"(",
"style",
")",
")",
"{",
"return",
"this",
";",
"}",
"WikiFormat",
"clone",
"=",
"getClone",
"(",
")",
";",
"clone",
".",
"fStyles",
"."... | Creates a new style set and adds the given style to it.
@param style the style to add
@return a new copy of the style set containing the given style | [
"Creates",
"a",
"new",
"style",
"set",
"and",
"adds",
"the",
"given",
"style",
"to",
"it",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiFormat.java#L100-L108 |
108,702 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiFormat.java | WikiFormat.removeStyle | public WikiFormat removeStyle(WikiStyle style)
{
if (!fStyles.contains(style)) {
return this;
}
WikiFormat clone = getClone();
clone.fStyles.remove(style);
return clone;
} | java | public WikiFormat removeStyle(WikiStyle style)
{
if (!fStyles.contains(style)) {
return this;
}
WikiFormat clone = getClone();
clone.fStyles.remove(style);
return clone;
} | [
"public",
"WikiFormat",
"removeStyle",
"(",
"WikiStyle",
"style",
")",
"{",
"if",
"(",
"!",
"fStyles",
".",
"contains",
"(",
"style",
")",
")",
"{",
"return",
"this",
";",
"}",
"WikiFormat",
"clone",
"=",
"getClone",
"(",
")",
";",
"clone",
".",
"fStyl... | Creates a new style set which does not contain the specified style.
@param style the style to add
@return a new copy of the style set containing the given style | [
"Creates",
"a",
"new",
"style",
"set",
"which",
"does",
"not",
"contain",
"the",
"specified",
"style",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiFormat.java#L188-L196 |
108,703 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiPageUtil.java | WikiPageUtil.escapeXmlString | public static String escapeXmlString(String str, boolean escapeQuots)
{
if (str == null) {
return "";
}
StringBuffer buf = new StringBuffer();
char[] array = str.toCharArray();
for (int i = 0; i < array.length; i++) {
if (array[i] == '>'
... | java | public static String escapeXmlString(String str, boolean escapeQuots)
{
if (str == null) {
return "";
}
StringBuffer buf = new StringBuffer();
char[] array = str.toCharArray();
for (int i = 0; i < array.length; i++) {
if (array[i] == '>'
... | [
"public",
"static",
"String",
"escapeXmlString",
"(",
"String",
"str",
",",
"boolean",
"escapeQuots",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"char"... | Returns the escaped string.
@param str the string to escape
@param escapeQuots if this flag is <code>true</code> then "'" and "\""
symbols also will be escaped
@return the escaped string. | [
"Returns",
"the",
"escaped",
"string",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiPageUtil.java#L163-L182 |
108,704 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java | DefaultMacroContentParser.createXDOM | private XDOM createXDOM(String content, MacroTransformationContext macroContext, boolean transform,
MetaData metadata, boolean inline, Syntax syntax) throws MacroExecutionException
{
try {
XDOM result = getSyntaxParser(syntax).parse(new StringReader(content));
if (metadata !... | java | private XDOM createXDOM(String content, MacroTransformationContext macroContext, boolean transform,
MetaData metadata, boolean inline, Syntax syntax) throws MacroExecutionException
{
try {
XDOM result = getSyntaxParser(syntax).parse(new StringReader(content));
if (metadata !... | [
"private",
"XDOM",
"createXDOM",
"(",
"String",
"content",
",",
"MacroTransformationContext",
"macroContext",
",",
"boolean",
"transform",
",",
"MetaData",
"metadata",
",",
"boolean",
"inline",
",",
"Syntax",
"syntax",
")",
"throws",
"MacroExecutionException",
"{",
... | creates XDOM. | [
"creates",
"XDOM",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java#L109-L134 |
108,705 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java | DefaultMacroContentParser.performTransformation | private void performTransformation(MutableRenderingContext renderingContext, Transformation transformation,
TransformationContext context, Block block) throws MacroExecutionException
{
try {
renderingContext.transformInContext(transformation, context, block);
} catch (Exception e... | java | private void performTransformation(MutableRenderingContext renderingContext, Transformation transformation,
TransformationContext context, Block block) throws MacroExecutionException
{
try {
renderingContext.transformInContext(transformation, context, block);
} catch (Exception e... | [
"private",
"void",
"performTransformation",
"(",
"MutableRenderingContext",
"renderingContext",
",",
"Transformation",
"transformation",
",",
"TransformationContext",
"context",
",",
"Block",
"block",
")",
"throws",
"MacroExecutionException",
"{",
"try",
"{",
"renderingCont... | Calls transformInContext on renderingContext. | [
"Calls",
"transformInContext",
"on",
"renderingContext",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java#L139-L147 |
108,706 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java | DefaultMacroContentParser.getSyntaxParser | private Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupException e) {
throw new MacroExecutionException("Failed to find source parser for syntax ... | java | private Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupException e) {
throw new MacroExecutionException("Failed to find source parser for syntax ... | [
"private",
"Parser",
"getSyntaxParser",
"(",
"Syntax",
"syntax",
")",
"throws",
"MacroExecutionException",
"{",
"try",
"{",
"return",
"this",
".",
"componentManager",
".",
"getInstance",
"(",
"Parser",
".",
"class",
",",
"syntax",
".",
"toIdString",
"(",
")",
... | Get the parser for the current syntax.
@param syntax the current syntax of the title content
@return the parser for the current syntax
@throws org.xwiki.rendering.macro.MacroExecutionException Failed to find source parser. | [
"Get",
"the",
"parser",
"for",
"the",
"current",
"syntax",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java#L183-L190 |
108,707 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java | AbstractXHTMLLinkTypeRenderer.computeLabel | protected String computeLabel(ResourceReference reference)
{
// Look for a component implementing URILabelGenerator with a role hint matching the link scheme.
// If not found then use the full reference as the label.
// If there's no scheme separator then use the full reference as the label.... | java | protected String computeLabel(ResourceReference reference)
{
// Look for a component implementing URILabelGenerator with a role hint matching the link scheme.
// If not found then use the full reference as the label.
// If there's no scheme separator then use the full reference as the label.... | [
"protected",
"String",
"computeLabel",
"(",
"ResourceReference",
"reference",
")",
"{",
"// Look for a component implementing URILabelGenerator with a role hint matching the link scheme.",
"// If not found then use the full reference as the label.",
"// If there's no scheme separator then use th... | Default implementation for computing a link label when no label has been specified. Can be overwritten by
implementations to provide a different algorithm.
@param reference the reference of the link for which to compute the label
@return the computed label | [
"Default",
"implementation",
"for",
"computing",
"a",
"link",
"label",
"when",
"no",
"label",
"has",
"been",
"specified",
".",
"Can",
"be",
"overwritten",
"by",
"implementations",
"to",
"provide",
"a",
"different",
"algorithm",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java#L122-L137 |
108,708 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java | AbstractXHTMLLinkTypeRenderer.handleTargetAttribute | private void handleTargetAttribute(Map<String, String> anchorAttributes)
{
String target = anchorAttributes.get("target");
// Target can have these values:
//
// "_blank" which opens the link in a new window
// "_self" which opens the link in the same window (default)
... | java | private void handleTargetAttribute(Map<String, String> anchorAttributes)
{
String target = anchorAttributes.get("target");
// Target can have these values:
//
// "_blank" which opens the link in a new window
// "_self" which opens the link in the same window (default)
... | [
"private",
"void",
"handleTargetAttribute",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"anchorAttributes",
")",
"{",
"String",
"target",
"=",
"anchorAttributes",
".",
"get",
"(",
"\"target\"",
")",
";",
"// Target can have these values:",
"//",
"// \"_blank\" wh... | When a link is open in an other window or in an other frame, the loaded page has some restricted access to the
parent window. Among other things, it has the ability to redirect it to an other page, which can lead to
dangerous phishing attacks.
See: https://mathiasbynens.github.io/rel-noopener/ or https://dev.to/phishi... | [
"When",
"a",
"link",
"is",
"open",
"in",
"an",
"other",
"window",
"or",
"in",
"an",
"other",
"frame",
"the",
"loaded",
"page",
"has",
"some",
"restricted",
"access",
"to",
"the",
"parent",
"window",
".",
"Among",
"other",
"things",
"it",
"has",
"the",
... | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java#L180-L217 |
108,709 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java | AbstractXHTMLLinkTypeRenderer.addAttributeValue | private String addAttributeValue(String currentValue, String valueToAdd)
{
String newValue;
if (currentValue == null || currentValue.length() == 0) {
newValue = "";
} else {
newValue = currentValue + " ";
}
return newValue + valueToAdd;
} | java | private String addAttributeValue(String currentValue, String valueToAdd)
{
String newValue;
if (currentValue == null || currentValue.length() == 0) {
newValue = "";
} else {
newValue = currentValue + " ";
}
return newValue + valueToAdd;
} | [
"private",
"String",
"addAttributeValue",
"(",
"String",
"currentValue",
",",
"String",
"valueToAdd",
")",
"{",
"String",
"newValue",
";",
"if",
"(",
"currentValue",
"==",
"null",
"||",
"currentValue",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"newValue"... | Add an attribute value to an existing attribute. This is useful for example for adding a value to an HTML CLASS
attribute.
@param currentValue the current value of the attribute (can be null)
@param valueToAdd the value to add
@return the current value augmented by the value to add | [
"Add",
"an",
"attribute",
"value",
"to",
"an",
"existing",
"attribute",
".",
"This",
"is",
"useful",
"for",
"example",
"for",
"adding",
"a",
"value",
"to",
"an",
"HTML",
"CLASS",
"attribute",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/AbstractXHTMLLinkTypeRenderer.java#L241-L250 |
108,710 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/block/AbstractBlock.java | AbstractBlock.indexOf | @Unstable
public long indexOf(Block child)
{
CounterBlockMatcher counter = new CounterBlockMatcher(child);
Block found = getFirstBlock(counter, Axes.ANCESTOR_OR_SELF);
return found != null ? counter.getCount() : -1;
} | java | @Unstable
public long indexOf(Block child)
{
CounterBlockMatcher counter = new CounterBlockMatcher(child);
Block found = getFirstBlock(counter, Axes.ANCESTOR_OR_SELF);
return found != null ? counter.getCount() : -1;
} | [
"@",
"Unstable",
"public",
"long",
"indexOf",
"(",
"Block",
"child",
")",
"{",
"CounterBlockMatcher",
"counter",
"=",
"new",
"CounterBlockMatcher",
"(",
"child",
")",
";",
"Block",
"found",
"=",
"getFirstBlock",
"(",
"counter",
",",
"Axes",
".",
"ANCESTOR_OR_S... | Find the index of the block in the tree.
@param child the block for which to find the index
@return the index of the passed block in the tree, 0 is the current block and -1 means that it was not found
@since 10.10RC1 | [
"Find",
"the",
"index",
"of",
"the",
"block",
"in",
"the",
"tree",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/block/AbstractBlock.java#L348-L356 |
108,711 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xwiki/xwiki20/XWikiSerializer2.java | XWikiSerializer2.clearName | public final static String clearName(String name)
{
boolean stripDots = false;
boolean ascii = true;
return clearName(name, stripDots, ascii);
} | java | public final static String clearName(String name)
{
boolean stripDots = false;
boolean ascii = true;
return clearName(name, stripDots, ascii);
} | [
"public",
"final",
"static",
"String",
"clearName",
"(",
"String",
"name",
")",
"{",
"boolean",
"stripDots",
"=",
"false",
";",
"boolean",
"ascii",
"=",
"true",
";",
"return",
"clearName",
"(",
"name",
",",
"stripDots",
",",
"ascii",
")",
";",
"}"
] | Clears the name of files; used while uploading attachments within XWiki
RECOMMENDED FOR NAMES OF UPLOADED FILES. (boolean stripDots = false;
boolean ascii = true;) | [
"Clears",
"the",
"name",
"of",
"files",
";",
"used",
"while",
"uploading",
"attachments",
"within",
"XWiki"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xwiki/xwiki20/XWikiSerializer2.java#L570-L575 |
108,712 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/WikiEntityUtil.java | WikiEntityUtil.getHtmlCodeByHtmlEntity | public static int getHtmlCodeByHtmlEntity(String htmlEntity)
{
Entity entity = fHtmlToWiki.get(htmlEntity);
return entity != null ? entity.fHtmlCode : 0;
} | java | public static int getHtmlCodeByHtmlEntity(String htmlEntity)
{
Entity entity = fHtmlToWiki.get(htmlEntity);
return entity != null ? entity.fHtmlCode : 0;
} | [
"public",
"static",
"int",
"getHtmlCodeByHtmlEntity",
"(",
"String",
"htmlEntity",
")",
"{",
"Entity",
"entity",
"=",
"fHtmlToWiki",
".",
"get",
"(",
"htmlEntity",
")",
";",
"return",
"entity",
"!=",
"null",
"?",
"entity",
".",
"fHtmlCode",
":",
"0",
";",
... | Returns an HTML code corresponding to the specified HTML entity.
@param htmlEntity the HTML entity to transform to the corresponding HTML
code
@return an HTML code corresponding to the specified HTML entity | [
"Returns",
"an",
"HTML",
"code",
"corresponding",
"to",
"the",
"specified",
"HTML",
"entity",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/WikiEntityUtil.java#L142-L146 |
108,713 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/WikiEntityUtil.java | WikiEntityUtil.getHtmlCodeByWikiSymbol | public static int getHtmlCodeByWikiSymbol(String wikiEntity)
{
Entity entity = fWikiToHtml.get(wikiEntity);
return entity != null ? entity.fHtmlCode : 0;
} | java | public static int getHtmlCodeByWikiSymbol(String wikiEntity)
{
Entity entity = fWikiToHtml.get(wikiEntity);
return entity != null ? entity.fHtmlCode : 0;
} | [
"public",
"static",
"int",
"getHtmlCodeByWikiSymbol",
"(",
"String",
"wikiEntity",
")",
"{",
"Entity",
"entity",
"=",
"fWikiToHtml",
".",
"get",
"(",
"wikiEntity",
")",
";",
"return",
"entity",
"!=",
"null",
"?",
"entity",
".",
"fHtmlCode",
":",
"0",
";",
... | Returns an HTML code corresponding to the specified wiki entity.
@param wikiEntity the wiki entity to transform to the corresponding HTML
entity
@return an HTML code corresponding to the specified wiki entity | [
"Returns",
"an",
"HTML",
"code",
"corresponding",
"to",
"the",
"specified",
"wiki",
"entity",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/WikiEntityUtil.java#L155-L159 |
108,714 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java | WikiScannerUtil.matchesSequence | public static boolean matchesSequence(
char[] array,
int arrayPos,
char[] sequence)
{
int i;
int j;
for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) {
if (array[i] != sequence[j]) {
break;
}
}... | java | public static boolean matchesSequence(
char[] array,
int arrayPos,
char[] sequence)
{
int i;
int j;
for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) {
if (array[i] != sequence[j]) {
break;
}
}... | [
"public",
"static",
"boolean",
"matchesSequence",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"arrayPos",
",",
"char",
"[",
"]",
"sequence",
")",
"{",
"int",
"i",
";",
"int",
"j",
";",
"for",
"(",
"i",
"=",
"arrayPos",
",",
"j",
"=",
"0",
";",
"i... | Indicate if the specified sequence starts from the given position in the
character array.
@param array the array of characters
@param arrayPos the position of the first character in the array;
starting from this position the sequence should be skipped
@param sequence the sequence of characters to match
@return true if... | [
"Indicate",
"if",
"the",
"specified",
"sequence",
"starts",
"from",
"the",
"given",
"position",
"in",
"the",
"character",
"array",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L253-L266 |
108,715 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java | WikiScannerUtil.removeSpaces | private static int removeSpaces(char[] array, int pos, StringBuffer buf)
{
buf.delete(0, buf.length());
for (; pos < array.length
&& (array[pos] == '=' || Character.isSpaceChar(array[pos])); pos++)
{
if (array[pos] == '=') {
buf.append(array[pos]);
... | java | private static int removeSpaces(char[] array, int pos, StringBuffer buf)
{
buf.delete(0, buf.length());
for (; pos < array.length
&& (array[pos] == '=' || Character.isSpaceChar(array[pos])); pos++)
{
if (array[pos] == '=') {
buf.append(array[pos]);
... | [
"private",
"static",
"int",
"removeSpaces",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"pos",
",",
"StringBuffer",
"buf",
")",
"{",
"buf",
".",
"delete",
"(",
"0",
",",
"buf",
".",
"length",
"(",
")",
")",
";",
"for",
"(",
";",
"pos",
"<",
"arra... | Moves forward the current position in the array until the first not empty
character is found.
@param array the array of characters where the spaces are searched
@param pos the current position in the array; starting from this position
the spaces will be searched
@param buf to this buffer all not empty characters will ... | [
"Moves",
"forward",
"the",
"current",
"position",
"in",
"the",
"array",
"until",
"the",
"first",
"not",
"empty",
"character",
"is",
"found",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L278-L289 |
108,716 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java | WikiScannerUtil.skipSequence | public static int skipSequence(char[] array, int arrayPos, char[] sequence)
{
int i;
int j;
for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) {
if (array[i] != sequence[j]) {
break;
}
}
return j == sequence.le... | java | public static int skipSequence(char[] array, int arrayPos, char[] sequence)
{
int i;
int j;
for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) {
if (array[i] != sequence[j]) {
break;
}
}
return j == sequence.le... | [
"public",
"static",
"int",
"skipSequence",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"arrayPos",
",",
"char",
"[",
"]",
"sequence",
")",
"{",
"int",
"i",
";",
"int",
"j",
";",
"for",
"(",
"i",
"=",
"arrayPos",
",",
"j",
"=",
"0",
";",
"i",
"<... | Skips the specified sequence if it starts from the given position in the
character array.
@param array the array of characters
@param arrayPos the position of the first character in the array;
starting from this position the sequence should be skipped
@param sequence the sequence of characters to skip
@return a new va... | [
"Skips",
"the",
"specified",
"sequence",
"if",
"it",
"starts",
"from",
"the",
"given",
"position",
"in",
"the",
"character",
"array",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L301-L311 |
108,717 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java | WikiScannerUtil.splitToPairs | public static int splitToPairs(
String str,
List<WikiParameter> list,
String delimiter,
String end,
char escapeChar)
{
if (str == null) {
return 0;
}
char[] array = str.toCharArray();
if (delimiter == null) {
delimiter =... | java | public static int splitToPairs(
String str,
List<WikiParameter> list,
String delimiter,
String end,
char escapeChar)
{
if (str == null) {
return 0;
}
char[] array = str.toCharArray();
if (delimiter == null) {
delimiter =... | [
"public",
"static",
"int",
"splitToPairs",
"(",
"String",
"str",
",",
"List",
"<",
"WikiParameter",
">",
"list",
",",
"String",
"delimiter",
",",
"String",
"end",
",",
"char",
"escapeChar",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
... | Splits the given string into a set of key-value pairs; all extracted
values will be added to the given list
@param str the string to split
@param list to this list all extracted values will be added
@param delimiter a delimiter for individual key/value pairs
@param end the ending sequence, if null it's not taken into ... | [
"Splits",
"the",
"given",
"string",
"into",
"a",
"set",
"of",
"key",
"-",
"value",
"pairs",
";",
"all",
"extracted",
"values",
"will",
"be",
"added",
"to",
"the",
"given",
"list"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L369-L434 |
108,718 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java | WikiScannerUtil.unescape | public static String unescape(String str, char escape)
{
if (str == null) {
return "";
}
StringBuffer buf = new StringBuffer();
char[] array = str.toCharArray();
boolean escaped = false;
for (int i = 0; i < array.length; i++) {
char ch = array[... | java | public static String unescape(String str, char escape)
{
if (str == null) {
return "";
}
StringBuffer buf = new StringBuffer();
char[] array = str.toCharArray();
boolean escaped = false;
for (int i = 0; i < array.length; i++) {
char ch = array[... | [
"public",
"static",
"String",
"unescape",
"(",
"String",
"str",
",",
"char",
"escape",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"char",
"[",
"]",... | Unescapes the given string and returns the result.
@param str the string to unescape
@param escape the symbol used to escape characters
@return an unescaped string | [
"Unescapes",
"the",
"given",
"string",
"and",
"returns",
"the",
"result",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L455-L476 |
108,719 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java | DefaultLinkCheckerThread.processLinkQueue | protected void processLinkQueue()
{
long timeout = this.configuration.getCheckTimeout();
List<Pattern> excludedReferencePatterns = this.configuration.getExcludedReferencePatterns();
// Unqueue till we find an item that needs to be processed. We process an item if:
// - it isn't pres... | java | protected void processLinkQueue()
{
long timeout = this.configuration.getCheckTimeout();
List<Pattern> excludedReferencePatterns = this.configuration.getExcludedReferencePatterns();
// Unqueue till we find an item that needs to be processed. We process an item if:
// - it isn't pres... | [
"protected",
"void",
"processLinkQueue",
"(",
")",
"{",
"long",
"timeout",
"=",
"this",
".",
"configuration",
".",
"getCheckTimeout",
"(",
")",
";",
"List",
"<",
"Pattern",
">",
"excludedReferencePatterns",
"=",
"this",
".",
"configuration",
".",
"getExcludedRef... | Read the queue and find links to process, removing links that have already been checked out recently. | [
"Read",
"the",
"queue",
"and",
"find",
"links",
"to",
"process",
"removing",
"links",
"that",
"have",
"already",
"been",
"checked",
"out",
"recently",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java#L145-L178 |
108,720 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java | TocTreeBuilder.generateTree | private Block generateTree(List<HeaderBlock> headers, int start, int depth, boolean numbered,
String documentReference)
{
Block tocBlock = null;
int currentLevel = start - 1;
Block currentBlock = null;
for (HeaderBlock headerBlock : headers) {
int headerLevel = h... | java | private Block generateTree(List<HeaderBlock> headers, int start, int depth, boolean numbered,
String documentReference)
{
Block tocBlock = null;
int currentLevel = start - 1;
Block currentBlock = null;
for (HeaderBlock headerBlock : headers) {
int headerLevel = h... | [
"private",
"Block",
"generateTree",
"(",
"List",
"<",
"HeaderBlock",
">",
"headers",
",",
"int",
"start",
",",
"int",
"depth",
",",
"boolean",
"numbered",
",",
"String",
"documentReference",
")",
"{",
"Block",
"tocBlock",
"=",
"null",
";",
"int",
"currentLev... | Convert headers into list block tree.
@param headers the headers to convert.
@param start the "start" parameter value.
@param depth the "depth" parameter value.
@param numbered the "numbered" parameter value.
@return the root block of generated block tree or null if no header was matching the specified parameters | [
"Convert",
"headers",
"into",
"list",
"block",
"tree",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java#L115-L154 |
108,721 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java | TocTreeBuilder.createTocEntry | private ListItemBlock createTocEntry(HeaderBlock headerBlock, String documentReference)
{
// Create the link to target the header anchor
DocumentResourceReference reference = new DocumentResourceReference(documentReference);
reference.setAnchor(headerBlock.getId());
LinkBlock linkBlo... | java | private ListItemBlock createTocEntry(HeaderBlock headerBlock, String documentReference)
{
// Create the link to target the header anchor
DocumentResourceReference reference = new DocumentResourceReference(documentReference);
reference.setAnchor(headerBlock.getId());
LinkBlock linkBlo... | [
"private",
"ListItemBlock",
"createTocEntry",
"(",
"HeaderBlock",
"headerBlock",
",",
"String",
"documentReference",
")",
"{",
"// Create the link to target the header anchor",
"DocumentResourceReference",
"reference",
"=",
"new",
"DocumentResourceReference",
"(",
"documentRefere... | Create a new toc list item based on section title.
@param headerBlock the {@link HeaderBlock}.
@return the new list item block. | [
"Create",
"a",
"new",
"toc",
"list",
"item",
"based",
"on",
"section",
"title",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java#L188-L196 |
108,722 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java | TocTreeBuilder.createChildListBlock | private ListBLock createChildListBlock(boolean numbered, Block parentBlock)
{
ListBLock childListBlock =
numbered ? new NumberedListBlock(Collections.emptyList()) : new BulletedListBlock(Collections.emptyList());
if (parentBlock != null) {
parentBlock.addChild(childListBlock... | java | private ListBLock createChildListBlock(boolean numbered, Block parentBlock)
{
ListBLock childListBlock =
numbered ? new NumberedListBlock(Collections.emptyList()) : new BulletedListBlock(Collections.emptyList());
if (parentBlock != null) {
parentBlock.addChild(childListBlock... | [
"private",
"ListBLock",
"createChildListBlock",
"(",
"boolean",
"numbered",
",",
"Block",
"parentBlock",
")",
"{",
"ListBLock",
"childListBlock",
"=",
"numbered",
"?",
"new",
"NumberedListBlock",
"(",
"Collections",
".",
"emptyList",
"(",
")",
")",
":",
"new",
"... | Create a new ListBlock and add it in the provided parent block.
@param numbered indicate if the list has to be numbered or with bullets
@param parentBlock the block where to add the new list block.
@return the new list block. | [
"Create",
"a",
"new",
"ListBlock",
"and",
"add",
"it",
"in",
"the",
"provided",
"parent",
"block",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java#L205-L215 |
108,723 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java | XHTMLWhitespaceXMLFilter.appendInlineEvent | private void appendInlineEvent(Event event) throws SAXException
{
cleanContentLeadingSpaces();
cleanContentExtraWhiteSpaces();
if (getContent().length() > 0) {
sendPreviousContent(false);
fPreviousInlineText.append(getContent());
if (getContent().charAt... | java | private void appendInlineEvent(Event event) throws SAXException
{
cleanContentLeadingSpaces();
cleanContentExtraWhiteSpaces();
if (getContent().length() > 0) {
sendPreviousContent(false);
fPreviousInlineText.append(getContent());
if (getContent().charAt... | [
"private",
"void",
"appendInlineEvent",
"(",
"Event",
"event",
")",
"throws",
"SAXException",
"{",
"cleanContentLeadingSpaces",
"(",
")",
";",
"cleanContentExtraWhiteSpaces",
"(",
")",
";",
"if",
"(",
"getContent",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
... | Append an inline element. Inline elements ending with a space are stacked
waiting for a non space character or the end of the inline content. | [
"Append",
"an",
"inline",
"element",
".",
"Inline",
"elements",
"ending",
"with",
"a",
"space",
"are",
"stacked",
"waiting",
"for",
"a",
"non",
"space",
"character",
"or",
"the",
"end",
"of",
"the",
"inline",
"content",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java#L348-L376 |
108,724 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java | XHTMLWhitespaceXMLFilter.startNonVisibleElement | protected void startNonVisibleElement() throws SAXException
{
if (shouldRemoveWhiteSpaces()) {
cleanContentLeadingSpaces();
cleanContentExtraWhiteSpaces();
if (getContent().length() > 0) {
sendPreviousContent(false);
fPreviousInlineText.a... | java | protected void startNonVisibleElement() throws SAXException
{
if (shouldRemoveWhiteSpaces()) {
cleanContentLeadingSpaces();
cleanContentExtraWhiteSpaces();
if (getContent().length() > 0) {
sendPreviousContent(false);
fPreviousInlineText.a... | [
"protected",
"void",
"startNonVisibleElement",
"(",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"shouldRemoveWhiteSpaces",
"(",
")",
")",
"{",
"cleanContentLeadingSpaces",
"(",
")",
";",
"cleanContentExtraWhiteSpaces",
"(",
")",
";",
"if",
"(",
"getContent",
"(... | Append an non visible element. | [
"Append",
"an",
"non",
"visible",
"element",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java#L408-L443 |
108,725 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java | XHTMLWhitespaceXMLFilter.trimLeadingWhiteSpaces | protected void trimLeadingWhiteSpaces()
{
if (shouldRemoveWhiteSpaces() && getContent().length() > 0) {
String result = trimLeadingWhiteSpaces(getContent());
getContent().setLength(0);
getContent().append(result);
}
} | java | protected void trimLeadingWhiteSpaces()
{
if (shouldRemoveWhiteSpaces() && getContent().length() > 0) {
String result = trimLeadingWhiteSpaces(getContent());
getContent().setLength(0);
getContent().append(result);
}
} | [
"protected",
"void",
"trimLeadingWhiteSpaces",
"(",
")",
"{",
"if",
"(",
"shouldRemoveWhiteSpaces",
"(",
")",
"&&",
"getContent",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"String",
"result",
"=",
"trimLeadingWhiteSpaces",
"(",
"getContent",
"("... | when in CDATA or PRE elements). | [
"when",
"in",
"CDATA",
"or",
"PRE",
"elements",
")",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter.java#L507-L514 |
108,726 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java | HTMLMacro.cleanHTML | private String cleanHTML(String content, MacroTransformationContext context) throws MacroExecutionException
{
String cleanedContent = content;
HTMLCleanerConfiguration cleanerConfiguration = getCleanerConfiguration(context);
// Note that we trim the content since we want to be lenient with... | java | private String cleanHTML(String content, MacroTransformationContext context) throws MacroExecutionException
{
String cleanedContent = content;
HTMLCleanerConfiguration cleanerConfiguration = getCleanerConfiguration(context);
// Note that we trim the content since we want to be lenient with... | [
"private",
"String",
"cleanHTML",
"(",
"String",
"content",
",",
"MacroTransformationContext",
"context",
")",
"throws",
"MacroExecutionException",
"{",
"String",
"cleanedContent",
"=",
"content",
";",
"HTMLCleanerConfiguration",
"cleanerConfiguration",
"=",
"getCleanerConf... | Clean the HTML entered by the user, transforming it into valid XHTML.
@param content the content to clean
@param context the macro transformation context
@return the cleaned HTML as a string representing valid XHTML
@throws MacroExecutionException if the macro is inline and the content is not inline HTML | [
"Clean",
"the",
"HTML",
"entered",
"by",
"the",
"user",
"transforming",
"it",
"into",
"valid",
"XHTML",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java#L181-L231 |
108,727 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java | HTMLMacro.renderWikiSyntax | private String renderWikiSyntax(String content, Transformation transformation, MacroTransformationContext context)
throws MacroExecutionException
{
String xhtml;
try {
// Parse the wiki syntax
XDOM xdom = this.contentParser.parse(content, context, false, false);
... | java | private String renderWikiSyntax(String content, Transformation transformation, MacroTransformationContext context)
throws MacroExecutionException
{
String xhtml;
try {
// Parse the wiki syntax
XDOM xdom = this.contentParser.parse(content, context, false, false);
... | [
"private",
"String",
"renderWikiSyntax",
"(",
"String",
"content",
",",
"Transformation",
"transformation",
",",
"MacroTransformationContext",
"context",
")",
"throws",
"MacroExecutionException",
"{",
"String",
"xhtml",
";",
"try",
"{",
"// Parse the wiki syntax",
"XDOM",... | Parse the passed context using a wiki syntax parser and render the result as an XHTML string.
@param content the content to parse
@param transformation the macro transformation to execute macros when wiki is set to true
@param context the context of the macros transformation process
@return the output XHTML as a strin... | [
"Parse",
"the",
"passed",
"context",
"using",
"a",
"wiki",
"syntax",
"parser",
"and",
"render",
"the",
"result",
"as",
"an",
"XHTML",
"string",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java#L242-L295 |
108,728 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiReferenceParser.java | WikiReferenceParser.getParameters | protected WikiParameters getParameters(String[] chunks)
{
return WikiParameters.newWikiParameters(chunks.length > 2 ? chunks[2]
.trim() : null);
} | java | protected WikiParameters getParameters(String[] chunks)
{
return WikiParameters.newWikiParameters(chunks.length > 2 ? chunks[2]
.trim() : null);
} | [
"protected",
"WikiParameters",
"getParameters",
"(",
"String",
"[",
"]",
"chunks",
")",
"{",
"return",
"WikiParameters",
".",
"newWikiParameters",
"(",
"chunks",
".",
"length",
">",
"2",
"?",
"chunks",
"[",
"2",
"]",
".",
"trim",
"(",
")",
":",
"null",
"... | Extracts parameters part of the original reference and returns it as a
WikiParameters.
@param chunks the array of chunks
@return the parameters | [
"Extracts",
"parameters",
"part",
"of",
"the",
"original",
"reference",
"and",
"returns",
"it",
"as",
"a",
"WikiParameters",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiReferenceParser.java#L63-L67 |
108,729 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiReferenceParser.java | WikiReferenceParser.splitToChunks | protected String[] splitToChunks(String str)
{
String delimiter = "[|>]";
String[] chunks = str.split(delimiter);
return chunks;
} | java | protected String[] splitToChunks(String str)
{
String delimiter = "[|>]";
String[] chunks = str.split(delimiter);
return chunks;
} | [
"protected",
"String",
"[",
"]",
"splitToChunks",
"(",
"String",
"str",
")",
"{",
"String",
"delimiter",
"=",
"\"[|>]\"",
";",
"String",
"[",
"]",
"chunks",
"=",
"str",
".",
"split",
"(",
"delimiter",
")",
";",
"return",
"chunks",
";",
"}"
] | Returns the given string split to individual segments
@param str the string to split
@return the given string split to individual segments | [
"Returns",
"the",
"given",
"string",
"split",
"to",
"individual",
"segments"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiReferenceParser.java#L96-L101 |
108,730 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java | PutFootnotesMacro.addFootnoteRef | private void addFootnoteRef(MacroMarkerBlock footnoteMacro, Block footnoteRef)
{
footnoteMacro.getChildren().clear();
footnoteMacro.addChild(footnoteRef);
} | java | private void addFootnoteRef(MacroMarkerBlock footnoteMacro, Block footnoteRef)
{
footnoteMacro.getChildren().clear();
footnoteMacro.addChild(footnoteRef);
} | [
"private",
"void",
"addFootnoteRef",
"(",
"MacroMarkerBlock",
"footnoteMacro",
",",
"Block",
"footnoteRef",
")",
"{",
"footnoteMacro",
".",
"getChildren",
"(",
")",
".",
"clear",
"(",
")",
";",
"footnoteMacro",
".",
"addChild",
"(",
"footnoteRef",
")",
";",
"}... | Add a footnote to the list of document footnotes. If such a list doesn't exist yet, create it and append it to
the end of the document.
@param footnoteMacro the {{footnote}} macro being processed
@param footnoteRef the generated block corresponding to the footnote to be inserted | [
"Add",
"a",
"footnote",
"to",
"the",
"list",
"of",
"document",
"footnotes",
".",
"If",
"such",
"a",
"list",
"doesn",
"t",
"exist",
"yet",
"create",
"it",
"and",
"append",
"it",
"to",
"the",
"end",
"of",
"the",
"document",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java#L175-L179 |
108,731 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java | PutFootnotesMacro.createFootnoteBlock | private ListItemBlock createFootnoteBlock(String content, int counter, MacroTransformationContext context)
throws MacroExecutionException
{
List<Block> parsedContent;
try {
parsedContent = this.contentParser.parse(content, context, false, true).getChildren();
} catch (Mac... | java | private ListItemBlock createFootnoteBlock(String content, int counter, MacroTransformationContext context)
throws MacroExecutionException
{
List<Block> parsedContent;
try {
parsedContent = this.contentParser.parse(content, context, false, true).getChildren();
} catch (Mac... | [
"private",
"ListItemBlock",
"createFootnoteBlock",
"(",
"String",
"content",
",",
"int",
"counter",
",",
"MacroTransformationContext",
"context",
")",
"throws",
"MacroExecutionException",
"{",
"List",
"<",
"Block",
">",
"parsedContent",
";",
"try",
"{",
"parsedContent... | Generate the footnote block, a numbered list item containing a backlink to the footnote's reference, and the
actual footnote text, parsed into XDOM.
@param content the string representation of the actual footnote text; the content of the macro
@param counter the current footnote counter
@param context the macro transf... | [
"Generate",
"the",
"footnote",
"block",
"a",
"numbered",
"list",
"item",
"containing",
"a",
"backlink",
"to",
"the",
"footnote",
"s",
"reference",
"and",
"the",
"actual",
"footnote",
"text",
"parsed",
"into",
"XDOM",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java#L210-L229 |
108,732 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiParameters.java | WikiParameters.getParameters | public WikiParameter[] getParameters(String key)
{
Map<String, WikiParameter[]> map = getParameters();
WikiParameter[] list = map.get(key);
return list;
} | java | public WikiParameter[] getParameters(String key)
{
Map<String, WikiParameter[]> map = getParameters();
WikiParameter[] list = map.get(key);
return list;
} | [
"public",
"WikiParameter",
"[",
"]",
"getParameters",
"(",
"String",
"key",
")",
"{",
"Map",
"<",
"String",
",",
"WikiParameter",
"[",
"]",
">",
"map",
"=",
"getParameters",
"(",
")",
";",
"WikiParameter",
"[",
"]",
"list",
"=",
"map",
".",
"get",
"(",... | Returns all parameters with this key
@param key the key of the parameter
@return the wiki parameter by key | [
"Returns",
"all",
"parameters",
"with",
"this",
"key"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiParameters.java#L205-L210 |
108,733 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiParameters.java | WikiParameters.toList | public List<WikiParameter> toList()
{
List<WikiParameter> result = new ArrayList<WikiParameter>(fList);
return result;
} | java | public List<WikiParameter> toList()
{
List<WikiParameter> result = new ArrayList<WikiParameter>(fList);
return result;
} | [
"public",
"List",
"<",
"WikiParameter",
">",
"toList",
"(",
")",
"{",
"List",
"<",
"WikiParameter",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"WikiParameter",
">",
"(",
"fList",
")",
";",
"return",
"result",
";",
"}"
] | Returns a new list containing all parameters defined in this object.
@return a list of all parameters | [
"Returns",
"a",
"new",
"list",
"containing",
"all",
"parameters",
"defined",
"in",
"this",
"object",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiParameters.java#L264-L268 |
108,734 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/DocumentXHTMLLinkTypeRenderer.java | DocumentXHTMLLinkTypeRenderer.beginInternalLink | private void beginInternalLink(ResourceReference reference, boolean freestanding,
Map<String, String> parameters)
{
Map<String, String> spanAttributes = new LinkedHashMap<String, String>();
Map<String, String> anchorAttributes = new LinkedHashMap<String, String>();
// Add all parame... | java | private void beginInternalLink(ResourceReference reference, boolean freestanding,
Map<String, String> parameters)
{
Map<String, String> spanAttributes = new LinkedHashMap<String, String>();
Map<String, String> anchorAttributes = new LinkedHashMap<String, String>();
// Add all parame... | [
"private",
"void",
"beginInternalLink",
"(",
"ResourceReference",
"reference",
",",
"boolean",
"freestanding",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"spanAttributes",
"=",
"new",
"Linke... | Start of an internal link.
@param reference the reference to the link
@param freestanding if true then the link is a free standing URI directly in the text
@param parameters a generic list of parameters. Example: style="background-color: blue" | [
"Start",
"of",
"an",
"internal",
"link",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/DocumentXHTMLLinkTypeRenderer.java#L113-L136 |
108,735 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-ctsreport/src/main/java/org/xwiki/rendering/internal/macro/ctsreport/ResultExtractor.java | ResultExtractor.normalize | public void normalize(Set<String> testNames, Map<String, Pair<Set<Test>, Set<Test>>> tests)
{
for (Pair<Set<Test>, Set<Test>> inOutTests : tests.values()) {
addNotApplicableTests(testNames, inOutTests.getLeft());
addNotApplicableTests(testNames, inOutTests.getRight());
}
... | java | public void normalize(Set<String> testNames, Map<String, Pair<Set<Test>, Set<Test>>> tests)
{
for (Pair<Set<Test>, Set<Test>> inOutTests : tests.values()) {
addNotApplicableTests(testNames, inOutTests.getLeft());
addNotApplicableTests(testNames, inOutTests.getRight());
}
... | [
"public",
"void",
"normalize",
"(",
"Set",
"<",
"String",
">",
"testNames",
",",
"Map",
"<",
"String",
",",
"Pair",
"<",
"Set",
"<",
"Test",
">",
",",
"Set",
"<",
"Test",
">",
">",
">",
"tests",
")",
"{",
"for",
"(",
"Pair",
"<",
"Set",
"<",
"T... | Add not applicable tests for all syntaxes.
@param testNames the test names (eg "simple/bold/bold1")
@param tests the tests by syntaxes | [
"Add",
"not",
"applicable",
"tests",
"for",
"all",
"syntaxes",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-ctsreport/src/main/java/org/xwiki/rendering/internal/macro/ctsreport/ResultExtractor.java#L95-L101 |
108,736 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/syntax/SyntaxType.java | SyntaxType.register | private static SyntaxType register(String id, String name)
{
SyntaxType syntaxType = new SyntaxType(id, name);
KNOWN_SYNTAX_TYPES.put(id, syntaxType);
return syntaxType;
} | java | private static SyntaxType register(String id, String name)
{
SyntaxType syntaxType = new SyntaxType(id, name);
KNOWN_SYNTAX_TYPES.put(id, syntaxType);
return syntaxType;
} | [
"private",
"static",
"SyntaxType",
"register",
"(",
"String",
"id",
",",
"String",
"name",
")",
"{",
"SyntaxType",
"syntaxType",
"=",
"new",
"SyntaxType",
"(",
"id",
",",
"name",
")",
";",
"KNOWN_SYNTAX_TYPES",
".",
"put",
"(",
"id",
",",
"syntaxType",
")"... | Register a Syntax Type.
@param id see {@link SyntaxType#SyntaxType(String, String)}
@param name see {@link SyntaxType#SyntaxType(String, String)}
@return the created Syntax Type object | [
"Register",
"a",
"Syntax",
"Type",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/syntax/SyntaxType.java#L171-L176 |
108,737 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/InternalWikiScannerContext.java | InternalWikiScannerContext.onMacro | public void onMacro(String name, WikiParameters params, String content)
{
checkBlockContainer();
fMacroName = name;
fMacroParameters = params;
fMacroContent = content;
} | java | public void onMacro(String name, WikiParameters params, String content)
{
checkBlockContainer();
fMacroName = name;
fMacroParameters = params;
fMacroContent = content;
} | [
"public",
"void",
"onMacro",
"(",
"String",
"name",
",",
"WikiParameters",
"params",
",",
"String",
"content",
")",
"{",
"checkBlockContainer",
"(",
")",
";",
"fMacroName",
"=",
"name",
";",
"fMacroParameters",
"=",
"params",
";",
"fMacroContent",
"=",
"conten... | Waiting for following events to know if the macro is inline or not. | [
"Waiting",
"for",
"following",
"events",
"to",
"know",
"if",
"the",
"macro",
"is",
"inline",
"or",
"not",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/InternalWikiScannerContext.java#L1013-L1020 |
108,738 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/InternalWikiScannerContext.java | InternalWikiScannerContext.onVerbatim | public void onVerbatim(String str, WikiParameters params)
{
checkBlockContainer();
fVerbatimContent = str;
fVerbatimParameters = params;
} | java | public void onVerbatim(String str, WikiParameters params)
{
checkBlockContainer();
fVerbatimContent = str;
fVerbatimParameters = params;
} | [
"public",
"void",
"onVerbatim",
"(",
"String",
"str",
",",
"WikiParameters",
"params",
")",
"{",
"checkBlockContainer",
"(",
")",
";",
"fVerbatimContent",
"=",
"str",
";",
"fVerbatimParameters",
"=",
"params",
";",
"}"
] | Waiting for following events to know if the verbatim is inline or not. | [
"Waiting",
"for",
"following",
"events",
"to",
"know",
"if",
"the",
"verbatim",
"is",
"inline",
"or",
"not",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/InternalWikiScannerContext.java#L1131-L1137 |
108,739 | xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-content/src/main/java/org/xwiki/rendering/internal/macro/content/ContentMacro.java | ContentMacro.getSyntaxParser | protected Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
if (this.componentManager.hasComponent(Parser.class, syntax.toIdString())) {
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupExc... | java | protected Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
if (this.componentManager.hasComponent(Parser.class, syntax.toIdString())) {
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupExc... | [
"protected",
"Parser",
"getSyntaxParser",
"(",
"Syntax",
"syntax",
")",
"throws",
"MacroExecutionException",
"{",
"if",
"(",
"this",
".",
"componentManager",
".",
"hasComponent",
"(",
"Parser",
".",
"class",
",",
"syntax",
".",
"toIdString",
"(",
")",
")",
")"... | Get the parser for the passed Syntax.
@param syntax the Syntax for which to find the Parser
@return the matching Parser that can be used to parse content in the passed Syntax
@throws MacroExecutionException if there's no Parser in the system for the passed Syntax | [
"Get",
"the",
"parser",
"for",
"the",
"passed",
"Syntax",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-content/src/main/java/org/xwiki/rendering/internal/macro/content/ContentMacro.java#L113-L125 |
108,740 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xwiki/xwiki20/XWikiReferenceParser.java | XWikiReferenceParser.parseReference | private void parseReference(char[] array, int i, StringBuffer reference,
StringBuffer parameters)
{
int nb;
for (boolean escaped = false; i < array.length; ++i) {
char c = array[i];
if (!escaped) {
if (array[i] == '~' && !escaped) {
... | java | private void parseReference(char[] array, int i, StringBuffer reference,
StringBuffer parameters)
{
int nb;
for (boolean escaped = false; i < array.length; ++i) {
char c = array[i];
if (!escaped) {
if (array[i] == '~' && !escaped) {
... | [
"private",
"void",
"parseReference",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"i",
",",
"StringBuffer",
"reference",
",",
"StringBuffer",
"parameters",
")",
"{",
"int",
"nb",
";",
"for",
"(",
"boolean",
"escaped",
"=",
"false",
";",
"i",
"<",
"array",... | Extract the link and the parameters.
@param array the array to extract information from
@param i the current position in the array
@param reference the link buffer to fill
@param parameters the parameters buffer to fill | [
"Extract",
"the",
"link",
"and",
"the",
"parameters",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xwiki/xwiki20/XWikiReferenceParser.java#L161-L187 |
108,741 | xwiki/xwiki-rendering | xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java | XMLWikiPrinter.printXMLComment | public void printXMLComment(String content, boolean escape)
{
try {
this.xmlWriter.write(new DefaultComment(escape ? XMLUtils.escapeXMLComment(content) : content));
} catch (IOException e) {
// TODO: add error log here
}
} | java | public void printXMLComment(String content, boolean escape)
{
try {
this.xmlWriter.write(new DefaultComment(escape ? XMLUtils.escapeXMLComment(content) : content));
} catch (IOException e) {
// TODO: add error log here
}
} | [
"public",
"void",
"printXMLComment",
"(",
"String",
"content",
",",
"boolean",
"escape",
")",
"{",
"try",
"{",
"this",
".",
"xmlWriter",
".",
"write",
"(",
"new",
"DefaultComment",
"(",
"escape",
"?",
"XMLUtils",
".",
"escapeXMLComment",
"(",
"content",
")",... | Print a XML comment.
@param content the comment content
@param escape indicate if comment content has to be escaped. XML content does not support -- and - (when it's the
last character). Escaping is based on backslash. "- --\ -" give "- \-\-\\ \-\ ". | [
"Print",
"a",
"XML",
"comment",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java#L219-L226 |
108,742 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/QueueListener.java | QueueListener.getEvent | public Event getEvent(int depth)
{
Event event = null;
if (depth > 0 && size() > depth - 1) {
event = get(depth - 1);
}
return event;
} | java | public Event getEvent(int depth)
{
Event event = null;
if (depth > 0 && size() > depth - 1) {
event = get(depth - 1);
}
return event;
} | [
"public",
"Event",
"getEvent",
"(",
"int",
"depth",
")",
"{",
"Event",
"event",
"=",
"null",
";",
"if",
"(",
"depth",
">",
"0",
"&&",
"size",
"(",
")",
">",
"depth",
"-",
"1",
")",
"{",
"event",
"=",
"get",
"(",
"depth",
"-",
"1",
")",
";",
"... | Returns the event at the specified position in this queue.
@param depth index of event to return.
@return the evnet at the specified position in this queue. | [
"Returns",
"the",
"event",
"at",
"the",
"specified",
"position",
"in",
"this",
"queue",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/QueueListener.java#L76-L85 |
108,743 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-doxia/src/main/java/org/xwiki/rendering/internal/renderer/doxia/DoxiaListener.java | DoxiaListener.popListener | private Listener popListener()
{
Listener listener = this.listenerStack.pop();
if (!this.listenerStack.isEmpty()) {
setWrappedListener(this.listenerStack.peek());
}
return listener;
} | java | private Listener popListener()
{
Listener listener = this.listenerStack.pop();
if (!this.listenerStack.isEmpty()) {
setWrappedListener(this.listenerStack.peek());
}
return listener;
} | [
"private",
"Listener",
"popListener",
"(",
")",
"{",
"Listener",
"listener",
"=",
"this",
".",
"listenerStack",
".",
"pop",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"listenerStack",
".",
"isEmpty",
"(",
")",
")",
"{",
"setWrappedListener",
"(",
"this"... | Removes the last listener from the stack.
@return the last listener that has been removed from the stack | [
"Removes",
"the",
"last",
"listener",
"from",
"the",
"stack",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-doxia/src/main/java/org/xwiki/rendering/internal/renderer/doxia/DoxiaListener.java#L157-L164 |
108,744 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java | HtmlEntityUtil.getChar | public static char getChar(String symbol)
{
CharInfo info = (CharInfo) fSymbolMap.get(symbol);
return (info != null) ? (char) info.fCode : '\0';
} | java | public static char getChar(String symbol)
{
CharInfo info = (CharInfo) fSymbolMap.get(symbol);
return (info != null) ? (char) info.fCode : '\0';
} | [
"public",
"static",
"char",
"getChar",
"(",
"String",
"symbol",
")",
"{",
"CharInfo",
"info",
"=",
"(",
"CharInfo",
")",
"fSymbolMap",
".",
"get",
"(",
"symbol",
")",
";",
"return",
"(",
"info",
"!=",
"null",
")",
"?",
"(",
"char",
")",
"info",
".",
... | A character corresponding to the given symbol.
@param symbol for this symbol the corresponding character will be
returned
@return a character corresponding to the given symbol | [
"A",
"character",
"corresponding",
"to",
"the",
"given",
"symbol",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java#L459-L463 |
108,745 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java | HtmlEntityUtil.getDescription | public static String getDescription(char ch)
{
CharInfo info = (CharInfo) fCodeMap.get(Integer.valueOf(ch));
return (info != null) ? info.fDescription : null;
} | java | public static String getDescription(char ch)
{
CharInfo info = (CharInfo) fCodeMap.get(Integer.valueOf(ch));
return (info != null) ? info.fDescription : null;
} | [
"public",
"static",
"String",
"getDescription",
"(",
"char",
"ch",
")",
"{",
"CharInfo",
"info",
"=",
"(",
"CharInfo",
")",
"fCodeMap",
".",
"get",
"(",
"Integer",
".",
"valueOf",
"(",
"ch",
")",
")",
";",
"return",
"(",
"info",
"!=",
"null",
")",
"?... | Returns description of the given character
@param ch for this character the corresponding description will be
returned
@return description of the given character | [
"Returns",
"description",
"of",
"the",
"given",
"character"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java#L472-L476 |
108,746 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java | HtmlEntityUtil.getDescription | public static String getDescription(String symbol)
{
CharInfo info = (CharInfo) fSymbolMap.get(symbol);
return (info != null) ? info.fDescription : null;
} | java | public static String getDescription(String symbol)
{
CharInfo info = (CharInfo) fSymbolMap.get(symbol);
return (info != null) ? info.fDescription : null;
} | [
"public",
"static",
"String",
"getDescription",
"(",
"String",
"symbol",
")",
"{",
"CharInfo",
"info",
"=",
"(",
"CharInfo",
")",
"fSymbolMap",
".",
"get",
"(",
"symbol",
")",
";",
"return",
"(",
"info",
"!=",
"null",
")",
"?",
"info",
".",
"fDescription... | Returns description of the given symbol.
@param symbol for this symbol the corresponding description will be
returned
@return description of the given symbol | [
"Returns",
"description",
"of",
"the",
"given",
"symbol",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/util/HtmlEntityUtil.java#L485-L489 |
108,747 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/transformation/macro/MacroErrorManager.java | MacroErrorManager.generateError | public void generateError(MacroBlock macroToReplace, String message, Throwable throwable)
{
List<Block> errorBlocks =
this.errorBlockGenerator.generateErrorBlocks(message, throwable, macroToReplace.isInline());
macroToReplace.getParent().replaceChild(wrapInMacroMarker(macroToReplace, err... | java | public void generateError(MacroBlock macroToReplace, String message, Throwable throwable)
{
List<Block> errorBlocks =
this.errorBlockGenerator.generateErrorBlocks(message, throwable, macroToReplace.isInline());
macroToReplace.getParent().replaceChild(wrapInMacroMarker(macroToReplace, err... | [
"public",
"void",
"generateError",
"(",
"MacroBlock",
"macroToReplace",
",",
"String",
"message",
",",
"Throwable",
"throwable",
")",
"{",
"List",
"<",
"Block",
">",
"errorBlocks",
"=",
"this",
".",
"errorBlockGenerator",
".",
"generateErrorBlocks",
"(",
"message"... | Generates Blocks to signify that the passed Macro Block has failed to execute.
@param macroToReplace the block for the macro that failed to execute and that we'll replace with Block
showing to the user that macro has failed
@param message the message to display to the user in place of the macro result
@param throwable... | [
"Generates",
"Blocks",
"to",
"signify",
"that",
"the",
"passed",
"Macro",
"Block",
"has",
"failed",
"to",
"execute",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/transformation/macro/MacroErrorManager.java#L75-L80 |
108,748 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java | IconTransformation.mergeTree | private void mergeTree(Block targetTree, Block sourceTree)
{
for (Block block : sourceTree.getChildren()) {
// Check if the current block exists in the target tree at the same place in the tree
int pos = indexOf(targetTree.getChildren(), block);
if (pos > -1) {
... | java | private void mergeTree(Block targetTree, Block sourceTree)
{
for (Block block : sourceTree.getChildren()) {
// Check if the current block exists in the target tree at the same place in the tree
int pos = indexOf(targetTree.getChildren(), block);
if (pos > -1) {
... | [
"private",
"void",
"mergeTree",
"(",
"Block",
"targetTree",
",",
"Block",
"sourceTree",
")",
"{",
"for",
"(",
"Block",
"block",
":",
"sourceTree",
".",
"getChildren",
"(",
")",
")",
"{",
"// Check if the current block exists in the target tree at the same place in the t... | Merged two XDOM trees.
@param targetTree the tree to merge into
@param sourceTree the tree to merge | [
"Merged",
"two",
"XDOM",
"trees",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java#L155-L167 |
108,749 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java | IconTransformation.indexOf | private int indexOf(List<Block> targetBlocks, Block block)
{
int pos = 0;
for (Block targetBlock : targetBlocks) {
// Test a non deep equality
if (blockEquals(targetBlock, block)) {
return pos;
}
pos++;
}
return -1;
... | java | private int indexOf(List<Block> targetBlocks, Block block)
{
int pos = 0;
for (Block targetBlock : targetBlocks) {
// Test a non deep equality
if (blockEquals(targetBlock, block)) {
return pos;
}
pos++;
}
return -1;
... | [
"private",
"int",
"indexOf",
"(",
"List",
"<",
"Block",
">",
"targetBlocks",
",",
"Block",
"block",
")",
"{",
"int",
"pos",
"=",
"0",
";",
"for",
"(",
"Block",
"targetBlock",
":",
"targetBlocks",
")",
"{",
"// Test a non deep equality",
"if",
"(",
"blockEq... | Shallow indexOf implementation that only compares nodes based on their data and not their children data.
@param targetBlocks the list of blocks to look into
@param block the block to look for in the list of passed blocks
@return the position of the block in the list of target blocks and -1 if not found | [
"Shallow",
"indexOf",
"implementation",
"that",
"only",
"compares",
"nodes",
"based",
"on",
"their",
"data",
"and",
"not",
"their",
"children",
"data",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java#L176-L187 |
108,750 | xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java | IconTransformation.parseTree | private void parseTree(List<Block> sourceBlocks)
{
Block matchStartBlock = null;
int count = 0;
Block mappingCursor = this.mappingTree.getChildren().get(0);
Block sourceBlock = sourceBlocks.get(0);
while (sourceBlock != null) {
while (mappingCursor != null) {
... | java | private void parseTree(List<Block> sourceBlocks)
{
Block matchStartBlock = null;
int count = 0;
Block mappingCursor = this.mappingTree.getChildren().get(0);
Block sourceBlock = sourceBlocks.get(0);
while (sourceBlock != null) {
while (mappingCursor != null) {
... | [
"private",
"void",
"parseTree",
"(",
"List",
"<",
"Block",
">",
"sourceBlocks",
")",
"{",
"Block",
"matchStartBlock",
"=",
"null",
";",
"int",
"count",
"=",
"0",
";",
"Block",
"mappingCursor",
"=",
"this",
".",
"mappingTree",
".",
"getChildren",
"(",
")",
... | Parse a list of blocks and replace suite of Blocks matching the icon mapping definitions by image blocks.
@param sourceBlocks the blocks to parse | [
"Parse",
"a",
"list",
"of",
"blocks",
"and",
"replace",
"suite",
"of",
"Blocks",
"matching",
"the",
"icon",
"mapping",
"definitions",
"by",
"image",
"blocks",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java#L218-L263 |
108,751 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java | ImageUtil.createThumb | private static BufferedImage createThumb(
BufferedImage image,
int thumbWidth,
int thumbHeight)
{
int imageWidth = image.getWidth(null);
int imageHeight = image.getHeight(null);
int[] size = getNewSize(
imageWidth,
imageHeight,
thum... | java | private static BufferedImage createThumb(
BufferedImage image,
int thumbWidth,
int thumbHeight)
{
int imageWidth = image.getWidth(null);
int imageHeight = image.getHeight(null);
int[] size = getNewSize(
imageWidth,
imageHeight,
thum... | [
"private",
"static",
"BufferedImage",
"createThumb",
"(",
"BufferedImage",
"image",
",",
"int",
"thumbWidth",
",",
"int",
"thumbHeight",
")",
"{",
"int",
"imageWidth",
"=",
"image",
".",
"getWidth",
"(",
"null",
")",
";",
"int",
"imageHeight",
"=",
"image",
... | Creates a smaller version of an image or returns the original image if it
was in the specified boundaries. The returned image keeps the ratio of
the original image.
@param image the image to re-size
@param thumbWidth the maximal width of the image
@param thumbHeight the maximal height of the image
@return a new re-siz... | [
"Creates",
"a",
"smaller",
"version",
"of",
"an",
"image",
"or",
"returns",
"the",
"original",
"image",
"if",
"it",
"was",
"in",
"the",
"specified",
"boundaries",
".",
"The",
"returned",
"image",
"keeps",
"the",
"ratio",
"of",
"the",
"original",
"image",
"... | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java#L52-L78 |
108,752 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java | ImageUtil.getImageSize | public static int[] getImageSize(
InputStream input,
int maxWidth,
int maxHeight) throws IOException
{
int[] size = getImageSize(input);
return getNewSize(size[0], size[1], maxWidth, maxHeight);
} | java | public static int[] getImageSize(
InputStream input,
int maxWidth,
int maxHeight) throws IOException
{
int[] size = getImageSize(input);
return getNewSize(size[0], size[1], maxWidth, maxHeight);
} | [
"public",
"static",
"int",
"[",
"]",
"getImageSize",
"(",
"InputStream",
"input",
",",
"int",
"maxWidth",
",",
"int",
"maxHeight",
")",
"throws",
"IOException",
"{",
"int",
"[",
"]",
"size",
"=",
"getImageSize",
"(",
"input",
")",
";",
"return",
"getNewSiz... | Returns the possible size of an image from the given input stream; the
returned size does not overcome the specified maximal borders but keeps
the ratio of the image. This method closes the given stream.
@param input the input stream with an image
@param maxWidth the maximal width
@param maxHeight the maximal height
@... | [
"Returns",
"the",
"possible",
"size",
"of",
"an",
"image",
"from",
"the",
"given",
"input",
"stream",
";",
"the",
"returned",
"size",
"does",
"not",
"overcome",
"the",
"specified",
"maximal",
"borders",
"but",
"keeps",
"the",
"ratio",
"of",
"the",
"image",
... | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java#L153-L160 |
108,753 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java | ImageUtil.getNewSize | public static int[] getNewSize(
int width,
int height,
int maxWidth,
int maxHeight)
{
if (width <= maxWidth && height <= maxHeight) {
return new int[]{width, height};
}
double thumbRatio = (double) maxWidth / (double) maxHeight;
double imag... | java | public static int[] getNewSize(
int width,
int height,
int maxWidth,
int maxHeight)
{
if (width <= maxWidth && height <= maxHeight) {
return new int[]{width, height};
}
double thumbRatio = (double) maxWidth / (double) maxHeight;
double imag... | [
"public",
"static",
"int",
"[",
"]",
"getNewSize",
"(",
"int",
"width",
",",
"int",
"height",
",",
"int",
"maxWidth",
",",
"int",
"maxHeight",
")",
"{",
"if",
"(",
"width",
"<=",
"maxWidth",
"&&",
"height",
"<=",
"maxHeight",
")",
"{",
"return",
"new",... | Calculates new size of an image with the specified max borders keeping
the ratio between height and width of the image.
@param width the initial width of an image
@param height the initial height of an image
@param maxWidth the maximal width of an image
@param maxHeight the maximal height of an image
@return a new siz... | [
"Calculates",
"new",
"size",
"of",
"an",
"image",
"with",
"the",
"specified",
"max",
"borders",
"keeping",
"the",
"ratio",
"between",
"height",
"and",
"width",
"of",
"the",
"image",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/images/ImageUtil.java#L174-L191 |
108,754 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/XDOMBuilder.java | XDOMBuilder.addBlock | public void addBlock(Block block)
{
try {
this.stack.getFirst().add(block);
} catch (NoSuchElementException e) {
throw new IllegalStateException("All container blocks are closed, too many calls to endBlockList().");
}
} | java | public void addBlock(Block block)
{
try {
this.stack.getFirst().add(block);
} catch (NoSuchElementException e) {
throw new IllegalStateException("All container blocks are closed, too many calls to endBlockList().");
}
} | [
"public",
"void",
"addBlock",
"(",
"Block",
"block",
")",
"{",
"try",
"{",
"this",
".",
"stack",
".",
"getFirst",
"(",
")",
".",
"add",
"(",
"block",
")",
";",
"}",
"catch",
"(",
"NoSuchElementException",
"e",
")",
"{",
"throw",
"new",
"IllegalStateExc... | Add a block to the current block container.
@param block the block to be added. | [
"Add",
"a",
"block",
"to",
"the",
"current",
"block",
"container",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/XDOMBuilder.java#L97-L104 |
108,755 | xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-plain/src/main/java/org/xwiki/rendering/internal/parser/plain/PlainTextStreamParser.java | PlainTextStreamParser.readChar | private int readChar(Reader source) throws ParseException
{
int c;
try {
c = source.read();
} catch (IOException e) {
throw new ParseException("Failed to read input source", e);
}
return c;
} | java | private int readChar(Reader source) throws ParseException
{
int c;
try {
c = source.read();
} catch (IOException e) {
throw new ParseException("Failed to read input source", e);
}
return c;
} | [
"private",
"int",
"readChar",
"(",
"Reader",
"source",
")",
"throws",
"ParseException",
"{",
"int",
"c",
";",
"try",
"{",
"c",
"=",
"source",
".",
"read",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"ParseException",... | Read a single char from an Reader source.
@param source the input to read from
@return the char read
@throws ParseException in case of reading error | [
"Read",
"a",
"single",
"char",
"from",
"an",
"Reader",
"source",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-plain/src/main/java/org/xwiki/rendering/internal/parser/plain/PlainTextStreamParser.java#L67-L78 |
108,756 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.parseDocumentLink | private ResourceReference parseDocumentLink(StringBuilder content)
{
// Extract any query string.
String queryString = null;
String text = parseElementAfterString(content, SEPARATOR_QUERYSTRING);
if (text != null) {
queryString = removeEscapesFromExtraParts(text);
... | java | private ResourceReference parseDocumentLink(StringBuilder content)
{
// Extract any query string.
String queryString = null;
String text = parseElementAfterString(content, SEPARATOR_QUERYSTRING);
if (text != null) {
queryString = removeEscapesFromExtraParts(text);
... | [
"private",
"ResourceReference",
"parseDocumentLink",
"(",
"StringBuilder",
"content",
")",
"{",
"// Extract any query string.",
"String",
"queryString",
"=",
"null",
";",
"String",
"text",
"=",
"parseElementAfterString",
"(",
"content",
",",
"SEPARATOR_QUERYSTRING",
")",
... | Construct a Document Link reference out of the passed content.
@param content the string containing the Document link reference
@return the parsed Link Object corresponding to the Document link reference | [
"Construct",
"a",
"Document",
"Link",
"reference",
"out",
"of",
"the",
"passed",
"content",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L165-L196 |
108,757 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.parseURILinks | private ResourceReference parseURILinks(String rawLink)
{
ResourceReference result = null;
int uriSchemeDelimiterPos = rawLink.indexOf(':');
if (uriSchemeDelimiterPos > -1) {
String scheme = rawLink.substring(0, uriSchemeDelimiterPos);
String reference = rawLink.subst... | java | private ResourceReference parseURILinks(String rawLink)
{
ResourceReference result = null;
int uriSchemeDelimiterPos = rawLink.indexOf(':');
if (uriSchemeDelimiterPos > -1) {
String scheme = rawLink.substring(0, uriSchemeDelimiterPos);
String reference = rawLink.subst... | [
"private",
"ResourceReference",
"parseURILinks",
"(",
"String",
"rawLink",
")",
"{",
"ResourceReference",
"result",
"=",
"null",
";",
"int",
"uriSchemeDelimiterPos",
"=",
"rawLink",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"uriSchemeDelimiterPos",
">"... | Check if the passed link references is an URI link reference.
@param rawLink the original reference to parse
@return the parsed Link object or null if the passed reference is not an URI link reference or if no URI type
parser was found for the passed URI scheme | [
"Check",
"if",
"the",
"passed",
"link",
"references",
"is",
"an",
"URI",
"link",
"reference",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L205-L233 |
108,758 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.parseInterWikiLinks | private ResourceReference parseInterWikiLinks(StringBuilder content)
{
ResourceReference result = null;
String interWikiAlias = parseElementAfterString(content, SEPARATOR_INTERWIKI);
if (interWikiAlias != null) {
InterWikiResourceReference link = new InterWikiResourceReference(re... | java | private ResourceReference parseInterWikiLinks(StringBuilder content)
{
ResourceReference result = null;
String interWikiAlias = parseElementAfterString(content, SEPARATOR_INTERWIKI);
if (interWikiAlias != null) {
InterWikiResourceReference link = new InterWikiResourceReference(re... | [
"private",
"ResourceReference",
"parseInterWikiLinks",
"(",
"StringBuilder",
"content",
")",
"{",
"ResourceReference",
"result",
"=",
"null",
";",
"String",
"interWikiAlias",
"=",
"parseElementAfterString",
"(",
"content",
",",
"SEPARATOR_INTERWIKI",
")",
";",
"if",
"... | Check if the passed link references is an interwiki link reference.
@param content the original content to parse
@return the parsed Link object or null if the passed reference is not an interwiki link reference | [
"Check",
"if",
"the",
"passed",
"link",
"references",
"is",
"an",
"interwiki",
"link",
"reference",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L241-L251 |
108,759 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.parseElementAfterString | protected String parseElementAfterString(StringBuilder content, String separator)
{
String element = null;
// Find the first non escaped separator (starting from the end of the content buffer).
int index = content.lastIndexOf(separator);
while (index != -1) {
// Check if... | java | protected String parseElementAfterString(StringBuilder content, String separator)
{
String element = null;
// Find the first non escaped separator (starting from the end of the content buffer).
int index = content.lastIndexOf(separator);
while (index != -1) {
// Check if... | [
"protected",
"String",
"parseElementAfterString",
"(",
"StringBuilder",
"content",
",",
"String",
"separator",
")",
"{",
"String",
"element",
"=",
"null",
";",
"// Find the first non escaped separator (starting from the end of the content buffer).",
"int",
"index",
"=",
"cont... | Find out the element located to the right of the passed separator.
@param content the string to parse. This parameter will be modified by the method to remove the parsed content.
@param separator the separator string to locate the element
@return the parsed element or null if the separator string wasn't found | [
"Find",
"out",
"the",
"element",
"located",
"to",
"the",
"right",
"of",
"the",
"passed",
"separator",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L260-L282 |
108,760 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.shouldEscape | private boolean shouldEscape(StringBuilder content, int charPosition)
{
int counter = 0;
int pos = charPosition - 1;
while (pos > -1 && content.charAt(pos) == ESCAPE_CHAR) {
counter++;
pos--;
}
return counter % 2 != 0;
} | java | private boolean shouldEscape(StringBuilder content, int charPosition)
{
int counter = 0;
int pos = charPosition - 1;
while (pos > -1 && content.charAt(pos) == ESCAPE_CHAR) {
counter++;
pos--;
}
return counter % 2 != 0;
} | [
"private",
"boolean",
"shouldEscape",
"(",
"StringBuilder",
"content",
",",
"int",
"charPosition",
")",
"{",
"int",
"counter",
"=",
"0",
";",
"int",
"pos",
"=",
"charPosition",
"-",
"1",
";",
"while",
"(",
"pos",
">",
"-",
"1",
"&&",
"content",
".",
"c... | Count the number of escape chars before a given character and if that number is odd then that character should be
escaped.
@param content the content in which to check for escapes
@param charPosition the position of the char for which to decide if it should be escaped or not
@return true if the character should be esc... | [
"Count",
"the",
"number",
"of",
"escape",
"chars",
"before",
"a",
"given",
"character",
"and",
"if",
"that",
"number",
"is",
"odd",
"then",
"that",
"character",
"should",
"be",
"escaped",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L292-L301 |
108,761 | xwiki/xwiki-rendering | xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/impl/XhtmlHandler.java | XhtmlHandler.comment | public void comment(char[] array, int start, int length)
throws SAXException
{
fStack.onComment(array, start, length);
} | java | public void comment(char[] array, int start, int length)
throws SAXException
{
fStack.onComment(array, start, length);
} | [
"public",
"void",
"comment",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"SAXException",
"{",
"fStack",
".",
"onComment",
"(",
"array",
",",
"start",
",",
"length",
")",
";",
"}"
] | Lexical handler methods | [
"Lexical",
"handler",
"methods"
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/xhtml/impl/XhtmlHandler.java#L231-L235 |
108,762 | xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/chaining/ListenerChain.java | ListenerChain.popListener | public void popListener(Class<? extends ChainingListener> listenerClass)
{
if (StackableChainingListener.class.isAssignableFrom(listenerClass)) {
this.listeners.get(listenerClass).pop();
}
} | java | public void popListener(Class<? extends ChainingListener> listenerClass)
{
if (StackableChainingListener.class.isAssignableFrom(listenerClass)) {
this.listeners.get(listenerClass).pop();
}
} | [
"public",
"void",
"popListener",
"(",
"Class",
"<",
"?",
"extends",
"ChainingListener",
">",
"listenerClass",
")",
"{",
"if",
"(",
"StackableChainingListener",
".",
"class",
".",
"isAssignableFrom",
"(",
"listenerClass",
")",
")",
"{",
"this",
".",
"listeners",
... | Remove the last instance corresponding to the passed listener class if it's stackable, in order to go back to the
previous state.
@param listenerClass the class of the chaining listener to pop | [
"Remove",
"the",
"last",
"instance",
"corresponding",
"to",
"the",
"passed",
"listener",
"class",
"if",
"it",
"s",
"stackable",
"in",
"order",
"to",
"go",
"back",
"to",
"the",
"previous",
"state",
"."
] | a21cdfcb64ef5b76872e3eedf78c530f26d7beb0 | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/listener/chaining/ListenerChain.java#L179-L184 |
108,763 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/Service.java | Service.setSupportedServiceProfiles | public Service setSupportedServiceProfiles(Iterable<ServiceProfile> profiles)
{
if (profiles == null)
{
this.supportedServiceProfiles = null;
return this;
}
Set<ServiceProfile> set = new TreeSet<ServiceProfile>();
for (ServiceProfile profile : profi... | java | public Service setSupportedServiceProfiles(Iterable<ServiceProfile> profiles)
{
if (profiles == null)
{
this.supportedServiceProfiles = null;
return this;
}
Set<ServiceProfile> set = new TreeSet<ServiceProfile>();
for (ServiceProfile profile : profi... | [
"public",
"Service",
"setSupportedServiceProfiles",
"(",
"Iterable",
"<",
"ServiceProfile",
">",
"profiles",
")",
"{",
"if",
"(",
"profiles",
"==",
"null",
")",
"{",
"this",
".",
"supportedServiceProfiles",
"=",
"null",
";",
"return",
"this",
";",
"}",
"Set",
... | Set the supported service profiles.
@param profiles
Supported service profiles.
@return
{@code this} object.
@since 2.12 | [
"Set",
"the",
"supported",
"service",
"profiles",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/Service.java#L2795-L2827 |
108,764 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/Service.java | Service.supports | public boolean supports(ServiceProfile profile)
{
if (profile == null)
{
return false;
}
if (supportedServiceProfiles == null)
{
return false;
}
for (ServiceProfile supportedProfile : supportedServiceProfiles)
{
if... | java | public boolean supports(ServiceProfile profile)
{
if (profile == null)
{
return false;
}
if (supportedServiceProfiles == null)
{
return false;
}
for (ServiceProfile supportedProfile : supportedServiceProfiles)
{
if... | [
"public",
"boolean",
"supports",
"(",
"ServiceProfile",
"profile",
")",
"{",
"if",
"(",
"profile",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"supportedServiceProfiles",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"for",
"("... | Check if this service supports the specified profile.
If {@code null} is given, {@code false} is returned.
If the supported service profiles are not set to this service,
{@code false} is returned.
@param profile
A service profile.
@return
{@code true} if this service supports the service profile.
@since 2.12 | [
"Check",
"if",
"this",
"service",
"supports",
"the",
"specified",
"profile",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/Service.java#L2845-L2866 |
108,765 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/Service.java | Service.supportsAll | public boolean supportsAll(ServiceProfile... profiles)
{
if (profiles == null)
{
return true;
}
for (ServiceProfile profile : profiles)
{
if (supports(profile) == false)
{
return false;
}
}
retu... | java | public boolean supportsAll(ServiceProfile... profiles)
{
if (profiles == null)
{
return true;
}
for (ServiceProfile profile : profiles)
{
if (supports(profile) == false)
{
return false;
}
}
retu... | [
"public",
"boolean",
"supportsAll",
"(",
"ServiceProfile",
"...",
"profiles",
")",
"{",
"if",
"(",
"profiles",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"ServiceProfile",
"profile",
":",
"profiles",
")",
"{",
"if",
"(",
"supports",
... | Check if this service supports all the specified service profiles.
If {@code null} is given, {@code true} is returned.
If an empty array is given, {@code true} is returned.
@param profiles
Service profiles.
@return
{@code true} if this service supports all the specified
service profiles.
@since 2.12 | [
"Check",
"if",
"this",
"service",
"supports",
"all",
"the",
"specified",
"service",
"profiles",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/Service.java#L2884-L2900 |
108,766 | authlete/authlete-java-common | src/main/java/com/authlete/common/web/BearerToken.java | BearerToken.parse | public static String parse(String input)
{
if (input == null)
{
return null;
}
// First, check whether the input matches the pattern
// "Bearer {access-token}".
Matcher matcher = CHALLENGE_PATTERN.matcher(input);
// If the input matche... | java | public static String parse(String input)
{
if (input == null)
{
return null;
}
// First, check whether the input matches the pattern
// "Bearer {access-token}".
Matcher matcher = CHALLENGE_PATTERN.matcher(input);
// If the input matche... | [
"public",
"static",
"String",
"parse",
"(",
"String",
"input",
")",
"{",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// First, check whether the input matches the pattern\r",
"// \"Bearer {access-token}\".\r",
"Matcher",
"matcher",
"=",
... | Extract the access token embedded in the input string.
<p>
This method assumes that the input string comes from one of
the following three places that are mentioned in "RFC 6750
(OAuth 2.0 Bearer Token Usage),
<a href="http://tools.ietf.org/html/rfc6750#section-2"
>2. Authenticated Requests</a>".
</p>
<blockquote>
<o... | [
"Extract",
"the",
"access",
"token",
"embedded",
"in",
"the",
"input",
"string",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/web/BearerToken.java#L102-L126 |
108,767 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/Scope.java | Scope.setAttributes | public Scope setAttributes(Iterable<Pair> attributes)
{
if (attributes == null)
{
this.attributes = null;
return this;
}
List<Pair> list = new ArrayList<Pair>();
for (Pair attribute : attributes)
{
if (attribute == n... | java | public Scope setAttributes(Iterable<Pair> attributes)
{
if (attributes == null)
{
this.attributes = null;
return this;
}
List<Pair> list = new ArrayList<Pair>();
for (Pair attribute : attributes)
{
if (attribute == n... | [
"public",
"Scope",
"setAttributes",
"(",
"Iterable",
"<",
"Pair",
">",
"attributes",
")",
"{",
"if",
"(",
"attributes",
"==",
"null",
")",
"{",
"this",
".",
"attributes",
"=",
"null",
";",
"return",
"this",
";",
"}",
"List",
"<",
"Pair",
">",
"list",
... | Set attributes.
@param attributes
Attributes.
@return
{@code this} object.
@since 2.12 | [
"Set",
"attributes",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/Scope.java#L249-L283 |
108,768 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/Scope.java | Scope.extractNames | public static String[] extractNames(Scope[] scopes)
{
if (scopes == null)
{
return null;
}
// Create an array for scope names.
String[] names = new String[scopes.length];
// For each scope.
for (int i = 0; i < scopes.length; ++i)
... | java | public static String[] extractNames(Scope[] scopes)
{
if (scopes == null)
{
return null;
}
// Create an array for scope names.
String[] names = new String[scopes.length];
// For each scope.
for (int i = 0; i < scopes.length; ++i)
... | [
"public",
"static",
"String",
"[",
"]",
"extractNames",
"(",
"Scope",
"[",
"]",
"scopes",
")",
"{",
"if",
"(",
"scopes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// Create an array for scope names.\r",
"String",
"[",
"]",
"names",
"=",
"new",
... | Extract scope names.
@param scopes
Scopes.
@return
Scope names. If {@code scopes} is {@code null},
{@code null} is returned. | [
"Extract",
"scope",
"names",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/Scope.java#L296-L318 |
108,769 | authlete/authlete-java-common | src/main/java/com/authlete/common/web/URLCoder.java | URLCoder.encode | public static String encode(String input)
{
try
{
return URLEncoder.encode(input, "UTF-8");
}
catch (UnsupportedEncodingException e)
{
// This never happens.
return input;
}
} | java | public static String encode(String input)
{
try
{
return URLEncoder.encode(input, "UTF-8");
}
catch (UnsupportedEncodingException e)
{
// This never happens.
return input;
}
} | [
"public",
"static",
"String",
"encode",
"(",
"String",
"input",
")",
"{",
"try",
"{",
"return",
"URLEncoder",
".",
"encode",
"(",
"input",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"e",
")",
"{",
"// This never happens.\r",... | URL-encode the input with UTF-8.
@param input
A string to be encoded.
@return
Encoded string. | [
"URL",
"-",
"encode",
"the",
"input",
"with",
"UTF",
"-",
"8",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/web/URLCoder.java#L42-L53 |
108,770 | authlete/authlete-java-common | src/main/java/com/authlete/common/web/URLCoder.java | URLCoder.decode | public static String decode(String input)
{
try
{
return URLDecoder.decode(input, "UTF-8");
}
catch (UnsupportedEncodingException e)
{
// This never happens.
return input;
}
} | java | public static String decode(String input)
{
try
{
return URLDecoder.decode(input, "UTF-8");
}
catch (UnsupportedEncodingException e)
{
// This never happens.
return input;
}
} | [
"public",
"static",
"String",
"decode",
"(",
"String",
"input",
")",
"{",
"try",
"{",
"return",
"URLDecoder",
".",
"decode",
"(",
"input",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"e",
")",
"{",
"// This never happens.\r",... | URL-decode the input with UTF-8.
@param input
An encoded string.
@return
Decoded string. | [
"URL",
"-",
"decode",
"the",
"input",
"with",
"UTF",
"-",
"8",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/web/URLCoder.java#L65-L76 |
108,771 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiException.java | AuthleteApiException.setResponse | private void setResponse(int statusCode, String statusMessage, String responseBody, Map<String, List<String>> responseHeaders)
{
mStatusCode = statusCode;
mStatusMessage = statusMessage;
mResponseBody = responseBody;
mResponseHeaders = responseHeaders;
} | java | private void setResponse(int statusCode, String statusMessage, String responseBody, Map<String, List<String>> responseHeaders)
{
mStatusCode = statusCode;
mStatusMessage = statusMessage;
mResponseBody = responseBody;
mResponseHeaders = responseHeaders;
} | [
"private",
"void",
"setResponse",
"(",
"int",
"statusCode",
",",
"String",
"statusMessage",
",",
"String",
"responseBody",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"responseHeaders",
")",
"{",
"mStatusCode",
"=",
"statusCode",
";",
"m... | Set the data fields related to HTTP response information.
@param statusCode
HTTP status code.
@param statusMessage
HTTP status message.
@param responseBody
HTTP response body. | [
"Set",
"the",
"data",
"fields",
"related",
"to",
"HTTP",
"response",
"information",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiException.java#L293-L299 |
108,772 | authlete/authlete-java-common | src/main/java/com/authlete/common/dto/BackchannelAuthenticationCompleteRequest.java | BackchannelAuthenticationCompleteRequest.setClaims | public BackchannelAuthenticationCompleteRequest setClaims(Map<String, Object> claims)
{
if (claims == null || claims.size() == 0)
{
this.claims = null;
}
else
{
setClaims(Utils.toJson(claims));
}
return this;
} | java | public BackchannelAuthenticationCompleteRequest setClaims(Map<String, Object> claims)
{
if (claims == null || claims.size() == 0)
{
this.claims = null;
}
else
{
setClaims(Utils.toJson(claims));
}
return this;
} | [
"public",
"BackchannelAuthenticationCompleteRequest",
"setClaims",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"claims",
")",
"{",
"if",
"(",
"claims",
"==",
"null",
"||",
"claims",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"this",
".",
"claims",
"=... | Set additional claims which will be embedded in the ID token.
<p>
The argument is converted into a JSON string and passed to
{@link #setClaims(String)} method.
</p>
@param claims
Additional claims. Keys are claim names.
@return
{@code this} object. | [
"Set",
"additional",
"claims",
"which",
"will",
"be",
"embedded",
"in",
"the",
"ID",
"token",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/BackchannelAuthenticationCompleteRequest.java#L573-L585 |
108,773 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServiceOwnerGetApi | private <TResponse> TResponse callServiceOwnerGetApi(
String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callGetApi(mServiceOwnerCredentials, path, queryParams, responseClass);
} | java | private <TResponse> TResponse callServiceOwnerGetApi(
String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callGetApi(mServiceOwnerCredentials, path, queryParams, responseClass);
} | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callServiceOwnerGetApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Class",
"<",
"TResponse",
">",
"responseClass",
")",
"throws",
"AuthleteApiException",
"{",
"retur... | Call an API with HTTP GET method and Service Owner credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"GET",
"method",
"and",
"Service",
"Owner",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L262-L267 |
108,774 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServiceGetApi | private <TResponse> TResponse callServiceGetApi(
String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callGetApi(mServiceCredentials, path, queryParams, responseClass);
} | java | private <TResponse> TResponse callServiceGetApi(
String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callGetApi(mServiceCredentials, path, queryParams, responseClass);
} | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callServiceGetApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Class",
"<",
"TResponse",
">",
"responseClass",
")",
"throws",
"AuthleteApiException",
"{",
"return",
... | Call an API with HTTP GET method and Service credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"GET",
"method",
"and",
"Service",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L283-L288 |
108,775 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callGetApi | private <TResponse> TResponse callGetApi(
BasicCredentials credentials, String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callApi(HttpMethod.GET, credentials, path, queryParams, (Object)null, responseClass);
} | java | private <TResponse> TResponse callGetApi(
BasicCredentials credentials, String path, Map<String, String> queryParams,
Class<TResponse> responseClass) throws AuthleteApiException
{
return callApi(HttpMethod.GET, credentials, path, queryParams, (Object)null, responseClass);
} | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callGetApi",
"(",
"BasicCredentials",
"credentials",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Class",
"<",
"TResponse",
">",
"responseClass",
")",
"throws",
"Auth... | Call an API with HTTP GET method. | [
"Call",
"an",
"API",
"with",
"HTTP",
"GET",
"method",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L294-L299 |
108,776 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServiceOwnerPostApi | private <TResponse> TResponse callServiceOwnerPostApi(
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callPostApi(mServiceOwnerCredentials, path, queryParams, requestBody, responseClass);
} | java | private <TResponse> TResponse callServiceOwnerPostApi(
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callPostApi(mServiceOwnerCredentials, path, queryParams, requestBody, responseClass);
} | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callServiceOwnerPostApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"requestBody",
",",
"Class",
"<",
"TResponse",
">",
"responseClass",
")",
"throws",
"A... | Call an API with HTTP POST method and Service Owner credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"POST",
"method",
"and",
"Service",
"Owner",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L315-L320 |
108,777 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServicePostApi | private <TResponse> TResponse callServicePostApi(
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callPostApi(mServiceCredentials, path, queryParams, requestBody, responseClass);
} | java | private <TResponse> TResponse callServicePostApi(
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callPostApi(mServiceCredentials, path, queryParams, requestBody, responseClass);
} | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callServicePostApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"requestBody",
",",
"Class",
"<",
"TResponse",
">",
"responseClass",
")",
"throws",
"Authle... | Call an API with HTTP POST method and Service credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"POST",
"method",
"and",
"Service",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L336-L341 |
108,778 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callPostApi | private <TResponse> TResponse callPostApi(
BasicCredentials credentials, String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callApi(HttpMethod.POST, credentials, path, queryParams, requestBody, respon... | java | private <TResponse> TResponse callPostApi(
BasicCredentials credentials, String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
return callApi(HttpMethod.POST, credentials, path, queryParams, requestBody, respon... | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callPostApi",
"(",
"BasicCredentials",
"credentials",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"requestBody",
",",
"Class",
"<",
"TResponse",
">",
"respo... | Call an API with HTTP POST method. | [
"Call",
"an",
"API",
"with",
"HTTP",
"POST",
"method",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L347-L352 |
108,779 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServiceOwnerDeleteApi | private <TResponse> void callServiceOwnerDeleteApi(
String path, Map<String, String> queryParams) throws AuthleteApiException
{
callDeleteApi(mServiceOwnerCredentials, path, queryParams);
} | java | private <TResponse> void callServiceOwnerDeleteApi(
String path, Map<String, String> queryParams) throws AuthleteApiException
{
callDeleteApi(mServiceOwnerCredentials, path, queryParams);
} | [
"private",
"<",
"TResponse",
">",
"void",
"callServiceOwnerDeleteApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
")",
"throws",
"AuthleteApiException",
"{",
"callDeleteApi",
"(",
"mServiceOwnerCredentials",
",",
"path",
"... | Call an API with HTTP DELETE method and Service Owner credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"DELETE",
"method",
"and",
"Service",
"Owner",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L367-L371 |
108,780 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callServiceDeleteApi | private <TResponse> void callServiceDeleteApi(
String path, Map<String, String> queryParams) throws AuthleteApiException
{
callDeleteApi(mServiceCredentials, path, queryParams);
} | java | private <TResponse> void callServiceDeleteApi(
String path, Map<String, String> queryParams) throws AuthleteApiException
{
callDeleteApi(mServiceCredentials, path, queryParams);
} | [
"private",
"<",
"TResponse",
">",
"void",
"callServiceDeleteApi",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
")",
"throws",
"AuthleteApiException",
"{",
"callDeleteApi",
"(",
"mServiceCredentials",
",",
"path",
",",
"que... | Call an API with HTTP DELETE method and Service credentials. | [
"Call",
"an",
"API",
"with",
"HTTP",
"DELETE",
"method",
"and",
"Service",
"credentials",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L386-L390 |
108,781 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callDeleteApi | private <TResponse> void callDeleteApi(
BasicCredentials credentials, String path,
Map<String, String> queryParams) throws AuthleteApiException
{
callApi(HttpMethod.DELETE, credentials, path, queryParams, (Object)null, (Class<TResponse>)null);
} | java | private <TResponse> void callDeleteApi(
BasicCredentials credentials, String path,
Map<String, String> queryParams) throws AuthleteApiException
{
callApi(HttpMethod.DELETE, credentials, path, queryParams, (Object)null, (Class<TResponse>)null);
} | [
"private",
"<",
"TResponse",
">",
"void",
"callDeleteApi",
"(",
"BasicCredentials",
"credentials",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
")",
"throws",
"AuthleteApiException",
"{",
"callApi",
"(",
"HttpMethod",
".",... | Call an API with HTTP DELETE method. | [
"Call",
"an",
"API",
"with",
"HTTP",
"DELETE",
"method",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L396-L401 |
108,782 | authlete/authlete-java-common | src/main/java/com/authlete/common/api/AuthleteApiImpl.java | AuthleteApiImpl.callApi | private <TResponse> TResponse callApi(
HttpMethod method, BasicCredentials credentials,
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
// Create a connection to the Authlete API.
Http... | java | private <TResponse> TResponse callApi(
HttpMethod method, BasicCredentials credentials,
String path, Map<String, String> queryParams,
Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException
{
// Create a connection to the Authlete API.
Http... | [
"private",
"<",
"TResponse",
">",
"TResponse",
"callApi",
"(",
"HttpMethod",
"method",
",",
"BasicCredentials",
"credentials",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"requestBody",
",",
"Class",
"<",... | Call an API. | [
"Call",
"an",
"API",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L407-L426 |
108,783 | authlete/authlete-java-common | src/main/java/com/authlete/common/util/Utils.java | Utils.join | public static String join(String[] strings, String delimiter)
{
if (strings == null)
{
return null;
}
if (strings.length == 0)
{
return "";
}
boolean useDelimiter = (delimiter != null && delimiter.length() != 0);
... | java | public static String join(String[] strings, String delimiter)
{
if (strings == null)
{
return null;
}
if (strings.length == 0)
{
return "";
}
boolean useDelimiter = (delimiter != null && delimiter.length() != 0);
... | [
"public",
"static",
"String",
"join",
"(",
"String",
"[",
"]",
"strings",
",",
"String",
"delimiter",
")",
"{",
"if",
"(",
"strings",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"strings",
".",
"length",
"==",
"0",
")",
"{",
"ret... | Concatenate string with the specified delimiter.
@param strings
Strings to be concatenated.
@param delimiter
A delimiter used between strings. If {@code null} or an empty
string is given, delimiters are not inserted between strings.
@return
A concatenated string. If {@code strings} is {@code null},
{@code null} is r... | [
"Concatenate",
"string",
"with",
"the",
"specified",
"delimiter",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/Utils.java#L53-L86 |
108,784 | authlete/authlete-java-common | src/main/java/com/authlete/common/util/Utils.java | Utils.stringifyScopeNames | public static String stringifyScopeNames(Scope[] scopes)
{
if (scopes == null)
{
return null;
}
String[] array = new String[scopes.length];
for (int i = 0; i < scopes.length; ++i)
{
array[i] = (scopes[i] == null) ? null : scopes[i]... | java | public static String stringifyScopeNames(Scope[] scopes)
{
if (scopes == null)
{
return null;
}
String[] array = new String[scopes.length];
for (int i = 0; i < scopes.length; ++i)
{
array[i] = (scopes[i] == null) ? null : scopes[i]... | [
"public",
"static",
"String",
"stringifyScopeNames",
"(",
"Scope",
"[",
"]",
"scopes",
")",
"{",
"if",
"(",
"scopes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"[",
"]",
"array",
"=",
"new",
"String",
"[",
"scopes",
".",
"length",
... | Generate a list of scope names.
@param scopes
An array of {@link Scope}. If {@code null} is given,
{@code null} is returned.
@return
A string containing scope names using white spaces as
the delimiter.
@since 2.5 | [
"Generate",
"a",
"list",
"of",
"scope",
"names",
"."
] | 49c94c483713cbf5a04d805ff7dbd83766c9c964 | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/Utils.java#L257-L272 |
108,785 | EvidentSolutions/dalesbred | dalesbred/src/main/java/org/dalesbred/query/QueryBuilder.java | QueryBuilder.append | public @NotNull QueryBuilder append(@SuppressWarnings("ParameterHidesMemberVariable") @NotNull SqlQuery query) {
this.query.append(query.getSql());
arguments.addAll(query.getArguments());
return this;
} | java | public @NotNull QueryBuilder append(@SuppressWarnings("ParameterHidesMemberVariable") @NotNull SqlQuery query) {
this.query.append(query.getSql());
arguments.addAll(query.getArguments());
return this;
} | [
"public",
"@",
"NotNull",
"QueryBuilder",
"append",
"(",
"@",
"SuppressWarnings",
"(",
"\"ParameterHidesMemberVariable\"",
")",
"@",
"NotNull",
"SqlQuery",
"query",
")",
"{",
"this",
".",
"query",
".",
"append",
"(",
"query",
".",
"getSql",
"(",
")",
")",
";... | Appends given query and its arguments to this query. | [
"Appends",
"given",
"query",
"and",
"its",
"arguments",
"to",
"this",
"query",
"."
] | 713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1 | https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/query/QueryBuilder.java#L99-L103 |
108,786 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/PasswordResetTokenService.java | PasswordResetTokenService.buildConcreteInstance | @SuppressWarnings("unchecked")
@Override
protected E buildConcreteInstance(User user, Integer expirationTimeInMinutes) {
if (expirationTimeInMinutes == null) {
return (E) new PasswordResetToken(user);
}
return (E) new PasswordResetToken(user, expirationTimeInMinutes);
} | java | @SuppressWarnings("unchecked")
@Override
protected E buildConcreteInstance(User user, Integer expirationTimeInMinutes) {
if (expirationTimeInMinutes == null) {
return (E) new PasswordResetToken(user);
}
return (E) new PasswordResetToken(user, expirationTimeInMinutes);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"protected",
"E",
"buildConcreteInstance",
"(",
"User",
"user",
",",
"Integer",
"expirationTimeInMinutes",
")",
"{",
"if",
"(",
"expirationTimeInMinutes",
"==",
"null",
")",
"{",
"return",
"(",
... | Builds a concrete instance of this class. | [
"Builds",
"a",
"concrete",
"instance",
"of",
"this",
"class",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/PasswordResetTokenService.java#L102-L109 |
108,787 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/InitializationService.java | InitializationService.saveUser | public void saveUser(User user) {
LOG.trace("Trying to create a new user");
// encode the raw password using bcrypt
final String pwHash = passwordEncoder.encode(user.getPassword());
user.setPassword(pwHash);
dao.saveOrUpdate(user);
LOG.info("Created the user " + user.getA... | java | public void saveUser(User user) {
LOG.trace("Trying to create a new user");
// encode the raw password using bcrypt
final String pwHash = passwordEncoder.encode(user.getPassword());
user.setPassword(pwHash);
dao.saveOrUpdate(user);
LOG.info("Created the user " + user.getA... | [
"public",
"void",
"saveUser",
"(",
"User",
"user",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"Trying to create a new user\"",
")",
";",
"// encode the raw password using bcrypt",
"final",
"String",
"pwHash",
"=",
"passwordEncoder",
".",
"encode",
"(",
"user",
".",
"ge... | Used to create a user. Implements special logic by encoding the password.
@param user | [
"Used",
"to",
"create",
"a",
"user",
".",
"Implements",
"special",
"logic",
"by",
"encoding",
"the",
"password",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/InitializationService.java#L63-L70 |
108,788 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/web/MapController.java | MapController.setLayersForMap | @RequestMapping(value = "/setLayersForMap.action", method = RequestMethod.POST)
public @ResponseBody
java.util.Map<String, Object> setLayersForMap(
@RequestParam("mapModuleId") Integer mapModuleId,
@RequestParam("layerIds") List<Integer> layerIds) {
try {
if (mapModuleId == n... | java | @RequestMapping(value = "/setLayersForMap.action", method = RequestMethod.POST)
public @ResponseBody
java.util.Map<String, Object> setLayersForMap(
@RequestParam("mapModuleId") Integer mapModuleId,
@RequestParam("layerIds") List<Integer> layerIds) {
try {
if (mapModuleId == n... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/setLayersForMap.action\"",
",",
"method",
"=",
"RequestMethod",
".",
"POST",
")",
"public",
"@",
"ResponseBody",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"Object",
">",
"setLayersForMap",
"(",
"@",
"R... | Set layers for map
@param mapModuleId The map module id
@param layerIds The list of layer ids
@return | [
"Set",
"layers",
"for",
"map"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/web/MapController.java#L64-L78 |
108,789 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/web/FileController.java | FileController.uploadFile | @RequestMapping(value = "/upload.action", method = RequestMethod.POST)
public ResponseEntity<?> uploadFile(
@RequestParam("file") MultipartFile uploadedFile) {
LOG.debug("Requested to upload a multipart-file");
// build response map
Map<String, Object> responseMap = new HashMap<Str... | java | @RequestMapping(value = "/upload.action", method = RequestMethod.POST)
public ResponseEntity<?> uploadFile(
@RequestParam("file") MultipartFile uploadedFile) {
LOG.debug("Requested to upload a multipart-file");
// build response map
Map<String, Object> responseMap = new HashMap<Str... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/upload.action\"",
",",
"method",
"=",
"RequestMethod",
".",
"POST",
")",
"public",
"ResponseEntity",
"<",
"?",
">",
"uploadFile",
"(",
"@",
"RequestParam",
"(",
"\"file\"",
")",
"MultipartFile",
"uploadedFile",
")",
... | Persists a file as bytearray in the database
@param uploadedFile | [
"Persists",
"a",
"file",
"as",
"bytearray",
"in",
"the",
"database"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/web/FileController.java#L65-L88 |
108,790 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.get | public static Response get(String url, Credentials credentials, Header[] requestHeaders)
throws URISyntaxException, HttpException {
return send(new HttpGet(url), credentials, requestHeaders);
} | java | public static Response get(String url, Credentials credentials, Header[] requestHeaders)
throws URISyntaxException, HttpException {
return send(new HttpGet(url), credentials, requestHeaders);
} | [
"public",
"static",
"Response",
"get",
"(",
"String",
"url",
",",
"Credentials",
"credentials",
",",
"Header",
"[",
"]",
"requestHeaders",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"return",
"send",
"(",
"new",
"HttpGet",
"(",
"url",
")",... | Performs an HTTP GET on the given URL.
@param url The URL to connect to.
@param credentials instance implementing {@link Credentials} interface holding a set of credentials
@param requestHeaders Additional HTTP headers added to the request
@return The HTTP response as Response object.
@throws URISyntaxEx... | [
"Performs",
"an",
"HTTP",
"GET",
"on",
"the",
"given",
"URL",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L147-L150 |
108,791 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.get | public static Response get(URI uri) throws URISyntaxException, HttpException {
return send(new HttpGet(uri), null, null);
} | java | public static Response get(URI uri) throws URISyntaxException, HttpException {
return send(new HttpGet(uri), null, null);
} | [
"public",
"static",
"Response",
"get",
"(",
"URI",
"uri",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"return",
"send",
"(",
"new",
"HttpGet",
"(",
"uri",
")",
",",
"null",
",",
"null",
")",
";",
"}"
] | Performs an HTTP GET on the given URI.
No credentials needed.
@param uri The URI to connect to.
@return The HTTP response as Response object.
@throws URISyntaxException
@throws HttpException | [
"Performs",
"an",
"HTTP",
"GET",
"on",
"the",
"given",
"URI",
".",
"No",
"credentials",
"needed",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L189-L191 |
108,792 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.get | public static Response get(URI uri, Credentials credentials, Header[] requestHeaders)
throws URISyntaxException, HttpException {
return send(new HttpGet(uri), credentials, requestHeaders);
} | java | public static Response get(URI uri, Credentials credentials, Header[] requestHeaders)
throws URISyntaxException, HttpException {
return send(new HttpGet(uri), credentials, requestHeaders);
} | [
"public",
"static",
"Response",
"get",
"(",
"URI",
"uri",
",",
"Credentials",
"credentials",
",",
"Header",
"[",
"]",
"requestHeaders",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"return",
"send",
"(",
"new",
"HttpGet",
"(",
"uri",
")",
... | Performs an HTTP GET on the given URI.
Basic auth is used if both username and pw are not null.
@param uri The URI to connect to.
@param credentials Instance implementing {@link Credentials} interface holding a set of credentials
@param requestHeaders Additional HTTP headers added to the request
@return ... | [
"Performs",
"an",
"HTTP",
"GET",
"on",
"the",
"given",
"URI",
".",
"Basic",
"auth",
"is",
"used",
"if",
"both",
"username",
"and",
"pw",
"are",
"not",
"null",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L266-L269 |
108,793 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.forwardGet | public static Response forwardGet(URI uri, HttpServletRequest request, boolean forwardHeaders)
throws URISyntaxException, HttpException {
Header[] headersToForward = null;
if (request != null && forwardHeaders) {
headersToForward = HttpUtil.getHeadersFromRequest(request);
}... | java | public static Response forwardGet(URI uri, HttpServletRequest request, boolean forwardHeaders)
throws URISyntaxException, HttpException {
Header[] headersToForward = null;
if (request != null && forwardHeaders) {
headersToForward = HttpUtil.getHeadersFromRequest(request);
}... | [
"public",
"static",
"Response",
"forwardGet",
"(",
"URI",
"uri",
",",
"HttpServletRequest",
"request",
",",
"boolean",
"forwardHeaders",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"Header",
"[",
"]",
"headersToForward",
"=",
"null",
";",
"if",... | Forward GET request to uri based on given request
@param uri uri The URI to forward to.
@param request The original {@link HttpServletRequest}
@param forwardHeaders Should headers of request should be forwarded
@return The HTTP response as Response object.
@throws URISyntaxException
@throws HttpExcep... | [
"Forward",
"GET",
"request",
"to",
"uri",
"based",
"on",
"given",
"request"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L281-L291 |
108,794 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.post | public static Response post(String url, String password, String username)
throws URISyntaxException, UnsupportedEncodingException, HttpException {
return postParams(new HttpPost(url), new ArrayList<NameValuePair>(), new UsernamePasswordCredentials(username, password), null);
} | java | public static Response post(String url, String password, String username)
throws URISyntaxException, UnsupportedEncodingException, HttpException {
return postParams(new HttpPost(url), new ArrayList<NameValuePair>(), new UsernamePasswordCredentials(username, password), null);
} | [
"public",
"static",
"Response",
"post",
"(",
"String",
"url",
",",
"String",
"password",
",",
"String",
"username",
")",
"throws",
"URISyntaxException",
",",
"UnsupportedEncodingException",
",",
"HttpException",
"{",
"return",
"postParams",
"(",
"new",
"HttpPost",
... | Performs an HTTP POST on the given URL.
Basic auth is used if both and password are not null.
@param url The URI to connect to as String.
@param username Credentials - username
@param password Credentials - password
@return The HTTP response as Response object.
@throws URISyntaxException
@throws UnsupportedEncodi... | [
"Performs",
"an",
"HTTP",
"POST",
"on",
"the",
"given",
"URL",
".",
"Basic",
"auth",
"is",
"used",
"if",
"both",
"and",
"password",
"are",
"not",
"null",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L334-L337 |
108,795 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.post | public static Response post(URI uri)
throws URISyntaxException, UnsupportedEncodingException, HttpException {
return postParams(new HttpPost(uri), new ArrayList<NameValuePair>(), null, null);
} | java | public static Response post(URI uri)
throws URISyntaxException, UnsupportedEncodingException, HttpException {
return postParams(new HttpPost(uri), new ArrayList<NameValuePair>(), null, null);
} | [
"public",
"static",
"Response",
"post",
"(",
"URI",
"uri",
")",
"throws",
"URISyntaxException",
",",
"UnsupportedEncodingException",
",",
"HttpException",
"{",
"return",
"postParams",
"(",
"new",
"HttpPost",
"(",
"uri",
")",
",",
"new",
"ArrayList",
"<",
"NameVa... | Performs an HTTP POST on the given URI.
@param uri The URI to connect to.
@return The HTTP response as Response object.
@throws URISyntaxException
@throws UnsupportedEncodingException
@throws HttpException | [
"Performs",
"an",
"HTTP",
"POST",
"on",
"the",
"given",
"URI",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L399-L402 |
108,796 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.forwardPost | public static Response forwardPost(URI uri, HttpServletRequest request, boolean forwardHeaders) throws URISyntaxException, HttpException {
Header[] headersToForward = null;
if (request != null && forwardHeaders) {
headersToForward = HttpUtil.getHeadersFromRequest(request);
}
... | java | public static Response forwardPost(URI uri, HttpServletRequest request, boolean forwardHeaders) throws URISyntaxException, HttpException {
Header[] headersToForward = null;
if (request != null && forwardHeaders) {
headersToForward = HttpUtil.getHeadersFromRequest(request);
}
... | [
"public",
"static",
"Response",
"forwardPost",
"(",
"URI",
"uri",
",",
"HttpServletRequest",
"request",
",",
"boolean",
"forwardHeaders",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"Header",
"[",
"]",
"headersToForward",
"=",
"null",
";",
"if"... | Forward POST to uri based on given request
@param uri uri The URI to forward to.
@param request The original {@link HttpServletRequest}
@param forwardHeaders Should headers of request should be forwarded
@return
@throws URISyntaxException
@throws HttpException | [
"Forward",
"POST",
"to",
"uri",
"based",
"on",
"given",
"request"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L1214-L1225 |
108,797 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.put | public static Response put(URI uri, String body, ContentType contentType, String username, String password) throws URISyntaxException, HttpException {
return putBody(new HttpPut(uri), body, contentType, new UsernamePasswordCredentials(username, password), null);
} | java | public static Response put(URI uri, String body, ContentType contentType, String username, String password) throws URISyntaxException, HttpException {
return putBody(new HttpPut(uri), body, contentType, new UsernamePasswordCredentials(username, password), null);
} | [
"public",
"static",
"Response",
"put",
"(",
"URI",
"uri",
",",
"String",
"body",
",",
"ContentType",
"contentType",
",",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"URISyntaxException",
",",
"HttpException",
"{",
"return",
"putBody",
"(",
... | Performs an HTTP PUT on the given URL.
@param uri
@param body
@param contentType
@param username
@param password
@return
@throws URISyntaxException
@throws HttpException | [
"Performs",
"an",
"HTTP",
"PUT",
"on",
"the",
"given",
"URL",
"."
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L1530-L1532 |
108,798 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.isSaneRequest | public static boolean isSaneRequest(HttpServletRequest request) {
if (request != null && request.getMethod() != null) {
return true;
}
return false;
} | java | public static boolean isSaneRequest(HttpServletRequest request) {
if (request != null && request.getMethod() != null) {
return true;
}
return false;
} | [
"public",
"static",
"boolean",
"isSaneRequest",
"(",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"request",
"!=",
"null",
"&&",
"request",
".",
"getMethod",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"... | Checks if request and request method are not null
@param request {@link HttpServletRequest} to check
@return true if sane, false otherwise | [
"Checks",
"if",
"request",
"and",
"request",
"method",
"are",
"not",
"null"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L1941-L1946 |
108,799 | terrestris/shogun-core | src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java | HttpUtil.removeHeaders | private static Header[] removeHeaders(Header[] headersToClean, String[] headersToRemove) {
ArrayList<Header> headers = new ArrayList<>();
if (headersToClean == null) {
return null;
}
for (Header header : headersToClean) {
if (!StringUtils.equalsAnyIgnoreCase(heade... | java | private static Header[] removeHeaders(Header[] headersToClean, String[] headersToRemove) {
ArrayList<Header> headers = new ArrayList<>();
if (headersToClean == null) {
return null;
}
for (Header header : headersToClean) {
if (!StringUtils.equalsAnyIgnoreCase(heade... | [
"private",
"static",
"Header",
"[",
"]",
"removeHeaders",
"(",
"Header",
"[",
"]",
"headersToClean",
",",
"String",
"[",
"]",
"headersToRemove",
")",
"{",
"ArrayList",
"<",
"Header",
">",
"headers",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"("... | Remove headers form header array that match Strings in headersToRemove
@param headersToClean Array of {@link Header}: Headers to clean up
@param headersToRemove Header names to remove | [
"Remove",
"headers",
"form",
"header",
"array",
"that",
"match",
"Strings",
"in",
"headersToRemove"
] | 3dbabda35ae63235265913c865dba389b050b6e6 | https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L2045-L2060 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.