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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
30,700 | lucee/Lucee | core/src/main/java/lucee/transformer/library/tag/TagLib.java | TagLib.duplicate | public TagLib duplicate(boolean deepCopy) {
TagLib tl = new TagLib(isCore);
tl.appendixTags = duplicate(this.appendixTags, deepCopy);
tl.displayName = this.displayName;
tl.ELClass = this.ELClass;
tl.exprTransformer = this.exprTransformer;
tl.isCore = this.isCore;
tl.nameSpace = this.nameSpace;
tl.nameSpaceAndNa... | java | public TagLib duplicate(boolean deepCopy) {
TagLib tl = new TagLib(isCore);
tl.appendixTags = duplicate(this.appendixTags, deepCopy);
tl.displayName = this.displayName;
tl.ELClass = this.ELClass;
tl.exprTransformer = this.exprTransformer;
tl.isCore = this.isCore;
tl.nameSpace = this.nameSpace;
tl.nameSpaceAndNa... | [
"public",
"TagLib",
"duplicate",
"(",
"boolean",
"deepCopy",
")",
"{",
"TagLib",
"tl",
"=",
"new",
"TagLib",
"(",
"isCore",
")",
";",
"tl",
".",
"appendixTags",
"=",
"duplicate",
"(",
"this",
".",
"appendixTags",
",",
"deepCopy",
")",
";",
"tl",
".",
"... | duplicate the taglib, does not
@param deepCopy duplicate also the children (TagLibTag) of this TagLib
@return clone of this taglib | [
"duplicate",
"the",
"taglib",
"does",
"not"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLib.java#L370-L387 |
30,701 | lucee/Lucee | core/src/main/java/lucee/transformer/library/tag/TagLib.java | TagLib.duplicate | private HashMap<String, TagLibTag> duplicate(HashMap<String, TagLibTag> tags, boolean deepCopy) {
if (deepCopy) throw new PageRuntimeException(new ExpressionException("deep copy not supported"));
Iterator<Entry<String, TagLibTag>> it = tags.entrySet().iterator();
HashMap<String, TagLibTag> cm = new HashMap<String, ... | java | private HashMap<String, TagLibTag> duplicate(HashMap<String, TagLibTag> tags, boolean deepCopy) {
if (deepCopy) throw new PageRuntimeException(new ExpressionException("deep copy not supported"));
Iterator<Entry<String, TagLibTag>> it = tags.entrySet().iterator();
HashMap<String, TagLibTag> cm = new HashMap<String, ... | [
"private",
"HashMap",
"<",
"String",
",",
"TagLibTag",
">",
"duplicate",
"(",
"HashMap",
"<",
"String",
",",
"TagLibTag",
">",
"tags",
",",
"boolean",
"deepCopy",
")",
"{",
"if",
"(",
"deepCopy",
")",
"throw",
"new",
"PageRuntimeException",
"(",
"new",
"Ex... | duplcate a hashmap with TagLibTag's
@param tags
@param deepCopy
@return cloned map | [
"duplcate",
"a",
"hashmap",
"with",
"TagLibTag",
"s"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLib.java#L396-L408 |
30,702 | lucee/Lucee | core/src/main/java/lucee/commons/lang/ExceptionUtil.java | ExceptionUtil.similarKeyMessage | public static String similarKeyMessage(Collection.Key[] _keys, String keySearched, String keyLabel, String keyLabels, String in, boolean listAll) {
String inThe = StringUtil.isEmpty(in, true) ? "" : " in the " + in;
boolean empty = _keys.length == 0;
if (listAll && (_keys.length > 50 || empty)) {
listAll = fa... | java | public static String similarKeyMessage(Collection.Key[] _keys, String keySearched, String keyLabel, String keyLabels, String in, boolean listAll) {
String inThe = StringUtil.isEmpty(in, true) ? "" : " in the " + in;
boolean empty = _keys.length == 0;
if (listAll && (_keys.length > 50 || empty)) {
listAll = fa... | [
"public",
"static",
"String",
"similarKeyMessage",
"(",
"Collection",
".",
"Key",
"[",
"]",
"_keys",
",",
"String",
"keySearched",
",",
"String",
"keyLabel",
",",
"String",
"keyLabels",
",",
"String",
"in",
",",
"boolean",
"listAll",
")",
"{",
"String",
"inT... | creates a message for key not found with soundex check for similar key
@param _keys
@param keyLabel
@return | [
"creates",
"a",
"message",
"for",
"key",
"not",
"found",
"with",
"soundex",
"check",
"for",
"similar",
"key"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ExceptionUtil.java#L90-L129 |
30,703 | lucee/Lucee | core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java | WeakConstructorStorage.getConstructors | public Constructor[] getConstructors(Class clazz, int count) {
Array con;
Object o;
synchronized (map) {
o = map.get(clazz);
if (o == null) {
con = store(clazz);
}
else con = (Array) o;
}
o = con.get(count + 1, null);
if (o == null) return null;
return (Constructor[]) o;
} | java | public Constructor[] getConstructors(Class clazz, int count) {
Array con;
Object o;
synchronized (map) {
o = map.get(clazz);
if (o == null) {
con = store(clazz);
}
else con = (Array) o;
}
o = con.get(count + 1, null);
if (o == null) return null;
return (Constructor[]) o;
} | [
"public",
"Constructor",
"[",
"]",
"getConstructors",
"(",
"Class",
"clazz",
",",
"int",
"count",
")",
"{",
"Array",
"con",
";",
"Object",
"o",
";",
"synchronized",
"(",
"map",
")",
"{",
"o",
"=",
"map",
".",
"get",
"(",
"clazz",
")",
";",
"if",
"(... | returns a constructor matching given criteria or null if Constructor doesn't exist
@param clazz Class to get Constructor for
@param count count of arguments for the constructor
@return returns the constructors | [
"returns",
"a",
"constructor",
"matching",
"given",
"criteria",
"or",
"null",
"if",
"Constructor",
"doesn",
"t",
"exist"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java#L40-L53 |
30,704 | lucee/Lucee | core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java | WeakConstructorStorage.store | private Array store(Class clazz) {
Constructor[] conArr = clazz.getConstructors();
Array args = new ArrayImpl();
for (int i = 0; i < conArr.length; i++) {
storeArgs(conArr[i], args);
}
map.put(clazz, args);
return args;
} | java | private Array store(Class clazz) {
Constructor[] conArr = clazz.getConstructors();
Array args = new ArrayImpl();
for (int i = 0; i < conArr.length; i++) {
storeArgs(conArr[i], args);
}
map.put(clazz, args);
return args;
} | [
"private",
"Array",
"store",
"(",
"Class",
"clazz",
")",
"{",
"Constructor",
"[",
"]",
"conArr",
"=",
"clazz",
".",
"getConstructors",
"(",
")",
";",
"Array",
"args",
"=",
"new",
"ArrayImpl",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i... | stores the constructors for a Class
@param clazz
@return stored structure | [
"stores",
"the",
"constructors",
"for",
"a",
"Class"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java#L61-L70 |
30,705 | lucee/Lucee | core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java | WeakConstructorStorage.storeArgs | private void storeArgs(Constructor constructor, Array conArgs) {
Class[] pmt = constructor.getParameterTypes();
Object o = conArgs.get(pmt.length + 1, null);
Constructor[] args;
if (o == null) {
args = new Constructor[1];
conArgs.setEL(pmt.length + 1, args);
}
else {
Constructor[] cs = (Constructor... | java | private void storeArgs(Constructor constructor, Array conArgs) {
Class[] pmt = constructor.getParameterTypes();
Object o = conArgs.get(pmt.length + 1, null);
Constructor[] args;
if (o == null) {
args = new Constructor[1];
conArgs.setEL(pmt.length + 1, args);
}
else {
Constructor[] cs = (Constructor... | [
"private",
"void",
"storeArgs",
"(",
"Constructor",
"constructor",
",",
"Array",
"conArgs",
")",
"{",
"Class",
"[",
"]",
"pmt",
"=",
"constructor",
".",
"getParameterTypes",
"(",
")",
";",
"Object",
"o",
"=",
"conArgs",
".",
"get",
"(",
"pmt",
".",
"leng... | seperate and store the different arguments of one constructor
@param constructor
@param conArgs | [
"seperate",
"and",
"store",
"the",
"different",
"arguments",
"of",
"one",
"constructor"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/WeakConstructorStorage.java#L78-L96 |
30,706 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Search.java | Search.release | @Override
public void release() {
super.release();
type = SearchCollection.SEARCH_TYPE_SIMPLE;
maxrows = -1;
criteria = "";
startrow = 1;
collections = null;
category = EMPTY;
categoryTree = "";
status = null;
suggestions = SUGGESTIONS_NEVER;
contextPassages = 0;
contextBytes = 300;
contextHighlightBe... | java | @Override
public void release() {
super.release();
type = SearchCollection.SEARCH_TYPE_SIMPLE;
maxrows = -1;
criteria = "";
startrow = 1;
collections = null;
category = EMPTY;
categoryTree = "";
status = null;
suggestions = SUGGESTIONS_NEVER;
contextPassages = 0;
contextBytes = 300;
contextHighlightBe... | [
"@",
"Override",
"public",
"void",
"release",
"(",
")",
"{",
"super",
".",
"release",
"(",
")",
";",
"type",
"=",
"SearchCollection",
".",
"SEARCH_TYPE_SIMPLE",
";",
"maxrows",
"=",
"-",
"1",
";",
"criteria",
"=",
"\"\"",
";",
"startrow",
"=",
"1",
";"... | private String result=null; | [
"private",
"String",
"result",
"=",
"null",
";"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Search.java#L89-L111 |
30,707 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Search.java | Search.setType | public void setType(String type) throws ApplicationException {
if (type == null) return;
type = type.toLowerCase().trim();
if (type.equals("simple")) this.type = SearchCollection.SEARCH_TYPE_SIMPLE;
else if (type.equals("explicit")) this.type = SearchCollection.SEARCH_TYPE_EXPLICIT;
else throw new ApplicationExcep... | java | public void setType(String type) throws ApplicationException {
if (type == null) return;
type = type.toLowerCase().trim();
if (type.equals("simple")) this.type = SearchCollection.SEARCH_TYPE_SIMPLE;
else if (type.equals("explicit")) this.type = SearchCollection.SEARCH_TYPE_EXPLICIT;
else throw new ApplicationExcep... | [
"public",
"void",
"setType",
"(",
"String",
"type",
")",
"throws",
"ApplicationException",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"return",
";",
"type",
"=",
"type",
".",
"toLowerCase",
"(",
")",
".",
"trim",
"(",
")",
";",
"if",
"(",
"type",
"."... | set the value type Specifies the criteria type for the search.
@param type value to set
@throws ApplicationException | [
"set",
"the",
"value",
"type",
"Specifies",
"the",
"criteria",
"type",
"for",
"the",
"search",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Search.java#L119-L126 |
30,708 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Search.java | Search.setCollection | public void setCollection(String collection) throws PageException {
String[] collNames = ListUtil.toStringArrayTrim(ListUtil.listToArrayRemoveEmpty(collection, ','));
collections = new SearchCollection[collNames.length];
SearchEngine se = pageContext.getConfig().getSearchEngine(pageContext);
try {
for (int i =... | java | public void setCollection(String collection) throws PageException {
String[] collNames = ListUtil.toStringArrayTrim(ListUtil.listToArrayRemoveEmpty(collection, ','));
collections = new SearchCollection[collNames.length];
SearchEngine se = pageContext.getConfig().getSearchEngine(pageContext);
try {
for (int i =... | [
"public",
"void",
"setCollection",
"(",
"String",
"collection",
")",
"throws",
"PageException",
"{",
"String",
"[",
"]",
"collNames",
"=",
"ListUtil",
".",
"toStringArrayTrim",
"(",
"ListUtil",
".",
"listToArrayRemoveEmpty",
"(",
"collection",
",",
"'",
"'",
")"... | set the value collection The logical collection name that is the target of the search operation
or an external collection with fully qualified path.
@param collection value to set
@throws PageException | [
"set",
"the",
"value",
"collection",
"The",
"logical",
"collection",
"name",
"that",
"is",
"the",
"target",
"of",
"the",
"search",
"operation",
"or",
"an",
"external",
"collection",
"with",
"fully",
"qualified",
"path",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Search.java#L164-L177 |
30,709 | lucee/Lucee | core/src/main/java/lucee/runtime/type/QueryColumnUtil.java | QueryColumnUtil.reDefineType | protected static Object reDefineType(QueryColumnImpl column, Object value) {
column.typeChecked = false;
if (value == null || column.type == Types.OTHER) return value;
if (value instanceof String && ((String) value).isEmpty()) return value;
switch (column.type) {
// Numeric Values
case Types.DOUBLE:
return... | java | protected static Object reDefineType(QueryColumnImpl column, Object value) {
column.typeChecked = false;
if (value == null || column.type == Types.OTHER) return value;
if (value instanceof String && ((String) value).isEmpty()) return value;
switch (column.type) {
// Numeric Values
case Types.DOUBLE:
return... | [
"protected",
"static",
"Object",
"reDefineType",
"(",
"QueryColumnImpl",
"column",
",",
"Object",
"value",
")",
"{",
"column",
".",
"typeChecked",
"=",
"false",
";",
"if",
"(",
"value",
"==",
"null",
"||",
"column",
".",
"type",
"==",
"Types",
".",
"OTHER"... | redefine type of value
@param value
@return redefined type of the value | [
"redefine",
"type",
"of",
"value"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/QueryColumnUtil.java#L48-L128 |
30,710 | lucee/Lucee | core/src/main/java/lucee/runtime/type/QueryColumnUtil.java | QueryColumnUtil.reOrganizeType | protected static void reOrganizeType(QueryColumnImpl column) {
if ((column.type == Types.OTHER) && !column.typeChecked) {
column.typeChecked = true;
if (column.size() > 0) {
checkOther(column, column.data[0]);
// get Type
for (int i = 1; i < column.size(); i++) {
switch (column.type) {
cas... | java | protected static void reOrganizeType(QueryColumnImpl column) {
if ((column.type == Types.OTHER) && !column.typeChecked) {
column.typeChecked = true;
if (column.size() > 0) {
checkOther(column, column.data[0]);
// get Type
for (int i = 1; i < column.size(); i++) {
switch (column.type) {
cas... | [
"protected",
"static",
"void",
"reOrganizeType",
"(",
"QueryColumnImpl",
"column",
")",
"{",
"if",
"(",
"(",
"column",
".",
"type",
"==",
"Types",
".",
"OTHER",
")",
"&&",
"!",
"column",
".",
"typeChecked",
")",
"{",
"column",
".",
"typeChecked",
"=",
"t... | reorganize type of a column
@param reorganize | [
"reorganize",
"type",
"of",
"a",
"column"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/QueryColumnUtil.java#L225-L256 |
30,711 | lucee/Lucee | core/src/main/java/lucee/runtime/functions/string/Wrap.java | Wrap.wrap | public static String wrap(String str, int wrapTextLength) {
if (wrapTextLength <= 0) return str;
StringBuilder rtn = new StringBuilder();
String ls = SystemUtil.getOSSpecificLineSeparator();
Array arr = ListUtil.listToArray(str, ls);
int len = arr.size();
for (int i = 1; i <= len; i++) {
rtn.append(wrapLin... | java | public static String wrap(String str, int wrapTextLength) {
if (wrapTextLength <= 0) return str;
StringBuilder rtn = new StringBuilder();
String ls = SystemUtil.getOSSpecificLineSeparator();
Array arr = ListUtil.listToArray(str, ls);
int len = arr.size();
for (int i = 1; i <= len; i++) {
rtn.append(wrapLin... | [
"public",
"static",
"String",
"wrap",
"(",
"String",
"str",
",",
"int",
"wrapTextLength",
")",
"{",
"if",
"(",
"wrapTextLength",
"<=",
"0",
")",
"return",
"str",
";",
"StringBuilder",
"rtn",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"ls",
"="... | wraps a String to specified length
@param str string to erap
@param wrapTextLength
@return wraped String | [
"wraps",
"a",
"String",
"to",
"specified",
"length"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/string/Wrap.java#L56-L69 |
30,712 | lucee/Lucee | core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorSupport.java | EvaluatorSupport.execute | @Override
public TagLib execute(Config config, Tag tag, TagLibTag libTag, FunctionLib[] flibs, Data data) throws TemplateException {
return null;
} | java | @Override
public TagLib execute(Config config, Tag tag, TagLibTag libTag, FunctionLib[] flibs, Data data) throws TemplateException {
return null;
} | [
"@",
"Override",
"public",
"TagLib",
"execute",
"(",
"Config",
"config",
",",
"Tag",
"tag",
",",
"TagLibTag",
"libTag",
",",
"FunctionLib",
"[",
"]",
"flibs",
",",
"Data",
"data",
")",
"throws",
"TemplateException",
"{",
"return",
"null",
";",
"}"
] | Die Methode execute wird aufgerufen, wenn der Context eines Tags geprueft werden soll. Diese
Methode ueberschreibt, jene des Interface Evaluator. Falls diese Methode durch eine
Implementation nicht ueberschrieben wird, ruft sie wiederere, allenfalls implementierte evaluate
Methoden auf. Mit Hilfe dieses Konstrukt ist e... | [
"Die",
"Methode",
"execute",
"wird",
"aufgerufen",
"wenn",
"der",
"Context",
"eines",
"Tags",
"geprueft",
"werden",
"soll",
".",
"Diese",
"Methode",
"ueberschreibt",
"jene",
"des",
"Interface",
"Evaluator",
".",
"Falls",
"diese",
"Methode",
"durch",
"eine",
"Imp... | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorSupport.java#L52-L56 |
30,713 | lucee/Lucee | core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorSupport.java | EvaluatorSupport.evaluate | @Override
public void evaluate(Tag tag, TagLibTag libTag, FunctionLib[] flibs) throws EvaluatorException {
evaluate(tag);
evaluate(tag, libTag);
} | java | @Override
public void evaluate(Tag tag, TagLibTag libTag, FunctionLib[] flibs) throws EvaluatorException {
evaluate(tag);
evaluate(tag, libTag);
} | [
"@",
"Override",
"public",
"void",
"evaluate",
"(",
"Tag",
"tag",
",",
"TagLibTag",
"libTag",
",",
"FunctionLib",
"[",
"]",
"flibs",
")",
"throws",
"EvaluatorException",
"{",
"evaluate",
"(",
"tag",
")",
";",
"evaluate",
"(",
"tag",
",",
"libTag",
")",
"... | Die Methode evaluate wird aufgerufen, wenn der Context eines Tags geprueft werden soll. Diese
Methode ueberschreibt, jene des Interface Evaluator. Falls diese Methode durch eine
Implementation nicht ueberschrieben wird, ruft sie wiederere, allenfalls implementierte evaluate
Methoden auf. Mit Hilfe dieses Konstrukt ist ... | [
"Die",
"Methode",
"evaluate",
"wird",
"aufgerufen",
"wenn",
"der",
"Context",
"eines",
"Tags",
"geprueft",
"werden",
"soll",
".",
"Diese",
"Methode",
"ueberschreibt",
"jene",
"des",
"Interface",
"Evaluator",
".",
"Falls",
"diese",
"Methode",
"durch",
"eine",
"Im... | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/evaluator/EvaluatorSupport.java#L69-L73 |
30,714 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.getElement | public Element getElement(NodeList list, String key, String value) {
int len = list.getLength();
for (int i = 0; i < len; i++) {
Node n = list.item(i);
if (n instanceof Element) {
Element el = (Element) n;
if (el.getAttribute(key).equalsIgnoreCase(value)) return el;
}
}
return null;
} | java | public Element getElement(NodeList list, String key, String value) {
int len = list.getLength();
for (int i = 0; i < len; i++) {
Node n = list.item(i);
if (n instanceof Element) {
Element el = (Element) n;
if (el.getAttribute(key).equalsIgnoreCase(value)) return el;
}
}
return null;
} | [
"public",
"Element",
"getElement",
"(",
"NodeList",
"list",
",",
"String",
"key",
",",
"String",
"value",
")",
"{",
"int",
"len",
"=",
"list",
".",
"getLength",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++"... | return XML Element matching name
@param list source node list
@param key key to compare
@param value value to compare
@return matching XML Element | [
"return",
"XML",
"Element",
"matching",
"name"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L88-L98 |
30,715 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.toDateTime | public DateTime toDateTime(Config config, Element el, String attributeName) {
String str = el.getAttribute(attributeName);
if (str == null) return null;
return DateCaster.toDateAdvanced(str, ThreadLocalPageContext.getTimeZone(config), null);
} | java | public DateTime toDateTime(Config config, Element el, String attributeName) {
String str = el.getAttribute(attributeName);
if (str == null) return null;
return DateCaster.toDateAdvanced(str, ThreadLocalPageContext.getTimeZone(config), null);
} | [
"public",
"DateTime",
"toDateTime",
"(",
"Config",
"config",
",",
"Element",
"el",
",",
"String",
"attributeName",
")",
"{",
"String",
"str",
"=",
"el",
".",
"getAttribute",
"(",
"attributeName",
")",
";",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"... | reads a XML Element Attribute ans cast it to a DateTime Object
@param config
@param el XML Element to read Attribute from it
@param attributeName Name of the Attribute to read
@return Attribute Value | [
"reads",
"a",
"XML",
"Element",
"Attribute",
"ans",
"cast",
"it",
"to",
"a",
"DateTime",
"Object"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L243-L247 |
30,716 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.toDateTime | public DateTime toDateTime(Element el, String attributeName, DateTime defaultValue) {
String value = el.getAttribute(attributeName);
if (value == null) return defaultValue;
DateTime dtValue = Caster.toDate(value, false, null, null);
if (dtValue == null) return defaultValue;
return dtValue;
} | java | public DateTime toDateTime(Element el, String attributeName, DateTime defaultValue) {
String value = el.getAttribute(attributeName);
if (value == null) return defaultValue;
DateTime dtValue = Caster.toDate(value, false, null, null);
if (dtValue == null) return defaultValue;
return dtValue;
} | [
"public",
"DateTime",
"toDateTime",
"(",
"Element",
"el",
",",
"String",
"attributeName",
",",
"DateTime",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"el",
".",
"getAttribute",
"(",
"attributeName",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"... | reads a XML Element Attribute ans cast it to a DateTime
@param el XML Element to read Attribute from it
@param attributeName Name of the Attribute to read
@param defaultValue if attribute doesn't exist return default value
@return Attribute Value | [
"reads",
"a",
"XML",
"Element",
"Attribute",
"ans",
"cast",
"it",
"to",
"a",
"DateTime"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L257-L264 |
30,717 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.toDate | public Date toDate(Config config, Element el, String attributeName) {
DateTime dt = toDateTime(config, el, attributeName);
if (dt == null) return null;
return new DateImpl(dt);
} | java | public Date toDate(Config config, Element el, String attributeName) {
DateTime dt = toDateTime(config, el, attributeName);
if (dt == null) return null;
return new DateImpl(dt);
} | [
"public",
"Date",
"toDate",
"(",
"Config",
"config",
",",
"Element",
"el",
",",
"String",
"attributeName",
")",
"{",
"DateTime",
"dt",
"=",
"toDateTime",
"(",
"config",
",",
"el",
",",
"attributeName",
")",
";",
"if",
"(",
"dt",
"==",
"null",
")",
"ret... | reads a XML Element Attribute ans cast it to a Date Object
@param el XML Element to read Attribute from it
@param attributeName Name of the Attribute to read
@return Attribute Value | [
"reads",
"a",
"XML",
"Element",
"Attribute",
"ans",
"cast",
"it",
"to",
"a",
"Date",
"Object"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L273-L277 |
30,718 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.toTime | public Time toTime(Config config, Element el, String attributeName) {
DateTime dt = toDateTime(config, el, attributeName);
if (dt == null) return null;
return new TimeImpl(dt);
} | java | public Time toTime(Config config, Element el, String attributeName) {
DateTime dt = toDateTime(config, el, attributeName);
if (dt == null) return null;
return new TimeImpl(dt);
} | [
"public",
"Time",
"toTime",
"(",
"Config",
"config",
",",
"Element",
"el",
",",
"String",
"attributeName",
")",
"{",
"DateTime",
"dt",
"=",
"toDateTime",
"(",
"config",
",",
"el",
",",
"attributeName",
")",
";",
"if",
"(",
"dt",
"==",
"null",
")",
"ret... | reads a XML Element Attribute ans cast it to a Time Object
@param config
@param el XML Element to read Attribute from it
@param attributeName Name of the Attribute to read
@return Attribute Value | [
"reads",
"a",
"XML",
"Element",
"Attribute",
"ans",
"cast",
"it",
"to",
"a",
"Time",
"Object"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L299-L303 |
30,719 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.toCredentials | public Credentials toCredentials(Element el, String attributeUser, String attributePassword, Credentials defaultCredentials) {
String user = el.getAttribute(attributeUser);
String pass = el.getAttribute(attributePassword);
if (user == null) return defaultCredentials;
if (pass == null) pass = "";
return Credentials... | java | public Credentials toCredentials(Element el, String attributeUser, String attributePassword, Credentials defaultCredentials) {
String user = el.getAttribute(attributeUser);
String pass = el.getAttribute(attributePassword);
if (user == null) return defaultCredentials;
if (pass == null) pass = "";
return Credentials... | [
"public",
"Credentials",
"toCredentials",
"(",
"Element",
"el",
",",
"String",
"attributeUser",
",",
"String",
"attributePassword",
",",
"Credentials",
"defaultCredentials",
")",
"{",
"String",
"user",
"=",
"el",
".",
"getAttribute",
"(",
"attributeUser",
")",
";"... | reads 2 XML Element Attribute ans cast it to a Credential
@param el XML Element to read Attribute from it
@param attributeUser Name of the user Attribute to read
@param attributePassword Name of the password Attribute to read
@param defaultCredentials
@return Attribute Value | [
"reads",
"2",
"XML",
"Element",
"Attribute",
"ans",
"cast",
"it",
"to",
"a",
"Credential"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L342-L348 |
30,720 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.setString | public void setString(Element el, String key, String value) {
if (value != null) el.setAttribute(key, value);
} | java | public void setString(Element el, String key, String value) {
if (value != null) el.setAttribute(key, value);
} | [
"public",
"void",
"setString",
"(",
"Element",
"el",
",",
"String",
"key",
",",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"el",
".",
"setAttribute",
"(",
"key",
",",
"value",
")",
";",
"}"
] | sets a string value to a XML Element
@param el Element to set value on it
@param key key to set
@param value value to set | [
"sets",
"a",
"string",
"value",
"to",
"a",
"XML",
"Element"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L357-L359 |
30,721 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.setBoolean | public void setBoolean(Element el, String key, boolean value) {
el.setAttribute(key, String.valueOf(value));
} | java | public void setBoolean(Element el, String key, boolean value) {
el.setAttribute(key, String.valueOf(value));
} | [
"public",
"void",
"setBoolean",
"(",
"Element",
"el",
",",
"String",
"key",
",",
"boolean",
"value",
")",
"{",
"el",
".",
"setAttribute",
"(",
"key",
",",
"String",
".",
"valueOf",
"(",
"value",
")",
")",
";",
"}"
] | sets a boolean value to a XML Element
@param el Element to set value on it
@param key key to set
@param value value to set | [
"sets",
"a",
"boolean",
"value",
"to",
"a",
"XML",
"Element"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L390-L392 |
30,722 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.setInt | public void setInt(Element el, String key, int value) {
el.setAttribute(key, String.valueOf(value));
} | java | public void setInt(Element el, String key, int value) {
el.setAttribute(key, String.valueOf(value));
} | [
"public",
"void",
"setInt",
"(",
"Element",
"el",
",",
"String",
"key",
",",
"int",
"value",
")",
"{",
"el",
".",
"setAttribute",
"(",
"key",
",",
"String",
".",
"valueOf",
"(",
"value",
")",
")",
";",
"}"
] | sets a int value to a XML Element
@param el Element to set value on it
@param key key to set
@param value value to set | [
"sets",
"a",
"int",
"value",
"to",
"a",
"XML",
"Element"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L401-L403 |
30,723 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.setDateTime | public void setDateTime(Element el, String key, DateTime value) {
if (value != null) {
String str = value.castToString(null);
if (str != null) el.setAttribute(key, str);
}
} | java | public void setDateTime(Element el, String key, DateTime value) {
if (value != null) {
String str = value.castToString(null);
if (str != null) el.setAttribute(key, str);
}
} | [
"public",
"void",
"setDateTime",
"(",
"Element",
"el",
",",
"String",
"key",
",",
"DateTime",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"String",
"str",
"=",
"value",
".",
"castToString",
"(",
"null",
")",
";",
"if",
"(",
"str",
... | sets a datetime value to a XML Element
@param el Element to set value on it
@param key key to set
@param value value to set | [
"sets",
"a",
"datetime",
"value",
"to",
"a",
"XML",
"Element"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L412-L417 |
30,724 | lucee/Lucee | core/src/main/java/lucee/runtime/schedule/StorageUtil.java | StorageUtil.setCredentials | public void setCredentials(Element el, String username, String password, Credentials c) {
if (c == null) return;
if (c.getUsername() != null) el.setAttribute(username, c.getUsername());
if (c.getPassword() != null) el.setAttribute(password, c.getPassword());
} | java | public void setCredentials(Element el, String username, String password, Credentials c) {
if (c == null) return;
if (c.getUsername() != null) el.setAttribute(username, c.getUsername());
if (c.getPassword() != null) el.setAttribute(password, c.getPassword());
} | [
"public",
"void",
"setCredentials",
"(",
"Element",
"el",
",",
"String",
"username",
",",
"String",
"password",
",",
"Credentials",
"c",
")",
"{",
"if",
"(",
"c",
"==",
"null",
")",
"return",
";",
"if",
"(",
"c",
".",
"getUsername",
"(",
")",
"!=",
"... | sets a Credentials to a XML Element
@param el
@param username
@param password
@param credentials | [
"sets",
"a",
"Credentials",
"to",
"a",
"XML",
"Element"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L427-L431 |
30,725 | lucee/Lucee | core/src/main/java/lucee/commons/lang/ParserString.java | ParserString.removeSpace | public boolean removeSpace() {
int start = pos;
while (pos < text.length && lcText[pos] == ' ') {
pos++;
}
return (start < pos);
} | java | public boolean removeSpace() {
int start = pos;
while (pos < text.length && lcText[pos] == ' ') {
pos++;
}
return (start < pos);
} | [
"public",
"boolean",
"removeSpace",
"(",
")",
"{",
"int",
"start",
"=",
"pos",
";",
"while",
"(",
"pos",
"<",
"text",
".",
"length",
"&&",
"lcText",
"[",
"pos",
"]",
"==",
"'",
"'",
")",
"{",
"pos",
"++",
";",
"}",
"return",
"(",
"start",
"<",
... | Stellt den Zeiger nach vorne, wenn er sich innerhalb von Leerzeichen befindet, bis die
Leerzeichen fertig sind.
@return Gibt zurueck ob der Zeiger innerhalb von Leerzeichen war oder nicht. | [
"Stellt",
"den",
"Zeiger",
"nach",
"vorne",
"wenn",
"er",
"sich",
"innerhalb",
"von",
"Leerzeichen",
"befindet",
"bis",
"die",
"Leerzeichen",
"fertig",
"sind",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ParserString.java#L669-L675 |
30,726 | lucee/Lucee | core/src/main/java/lucee/commons/lang/ParserString.java | ParserString.subCFMLString | public ParserString subCFMLString(int start, int count) {
return new ParserString(String.valueOf(text, start, count));
/*
* NICE die untermenge direkter ermiiteln, das problem hierbei sind die lines
*
* int endPos=start+count; int LineFrom=-1; int LineTo=-1; for(int i=0;i<lines.length;i++) { if() }
*
* re... | java | public ParserString subCFMLString(int start, int count) {
return new ParserString(String.valueOf(text, start, count));
/*
* NICE die untermenge direkter ermiiteln, das problem hierbei sind die lines
*
* int endPos=start+count; int LineFrom=-1; int LineTo=-1; for(int i=0;i<lines.length;i++) { if() }
*
* re... | [
"public",
"ParserString",
"subCFMLString",
"(",
"int",
"start",
",",
"int",
"count",
")",
"{",
"return",
"new",
"ParserString",
"(",
"String",
".",
"valueOf",
"(",
"text",
",",
"start",
",",
"count",
")",
")",
";",
"/*\n\t * NICE die untermenge direkter ermiitel... | Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start mit einer
maximalen Laenge count.
@param start Von wo aus die Untermenge ausgegeben werden soll.
@param count Wie lange die zurueckgegebene Zeichenkette maximal sein darf.
@return Untermenge als CFMLString | [
"Gibt",
"eine",
"Untermenge",
"des",
"CFMLString",
"als",
"CFMLString",
"zurueck",
"ausgehend",
"von",
"start",
"mit",
"einer",
"maximalen",
"Laenge",
"count",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ParserString.java#L765-L775 |
30,727 | lucee/Lucee | core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java | CFMLEngineImpl.getInstance | public static synchronized CFMLEngine getInstance(CFMLEngineFactory factory, BundleCollection bc) {
if (engine == null) {
if (SystemUtil.getLoaderVersion() < 6.0D) {
// windows needs 6.0 because restart is not working with older versions
if (SystemUtil.isWindows())
throw new RuntimeException("You need t... | java | public static synchronized CFMLEngine getInstance(CFMLEngineFactory factory, BundleCollection bc) {
if (engine == null) {
if (SystemUtil.getLoaderVersion() < 6.0D) {
// windows needs 6.0 because restart is not working with older versions
if (SystemUtil.isWindows())
throw new RuntimeException("You need t... | [
"public",
"static",
"synchronized",
"CFMLEngine",
"getInstance",
"(",
"CFMLEngineFactory",
"factory",
",",
"BundleCollection",
"bc",
")",
"{",
"if",
"(",
"engine",
"==",
"null",
")",
"{",
"if",
"(",
"SystemUtil",
".",
"getLoaderVersion",
"(",
")",
"<",
"6.0D",... | get singelton instance of the CFML Engine
@param factory
@return CFMLEngine | [
"get",
"singelton",
"instance",
"of",
"the",
"CFML",
"Engine"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java#L592-L607 |
30,728 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Ldap.java | Ldap.setScope | public void setScope(String strScope) throws ApplicationException {
strScope = strScope.trim().toLowerCase();
if (strScope.equals("onelevel")) scope = SearchControls.ONELEVEL_SCOPE;
else if (strScope.equals("base")) scope = SearchControls.OBJECT_SCOPE;
else if (strScope.equals("subtree")) scope = SearchControls.SUB... | java | public void setScope(String strScope) throws ApplicationException {
strScope = strScope.trim().toLowerCase();
if (strScope.equals("onelevel")) scope = SearchControls.ONELEVEL_SCOPE;
else if (strScope.equals("base")) scope = SearchControls.OBJECT_SCOPE;
else if (strScope.equals("subtree")) scope = SearchControls.SUB... | [
"public",
"void",
"setScope",
"(",
"String",
"strScope",
")",
"throws",
"ApplicationException",
"{",
"strScope",
"=",
"strScope",
".",
"trim",
"(",
")",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"strScope",
".",
"equals",
"(",
"\"onelevel\"",
")",
")",... | Specifies the scope of the search from the entry specified in the Start attribute for action =
"Query".
@param strScope The scope to set.
@throws ApplicationException | [
"Specifies",
"the",
"scope",
"of",
"the",
"search",
"from",
"the",
"entry",
"specified",
"in",
"the",
"Start",
"attribute",
"for",
"action",
"=",
"Query",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ldap.java#L218-L224 |
30,729 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Ldap.java | Ldap.setModifytype | public void setModifytype(String modifyType) throws ApplicationException {
modifyType = modifyType.trim().toLowerCase();
if (modifyType.equals("add")) this.modifyType = DirContext.ADD_ATTRIBUTE;
else if (modifyType.equals("delete")) this.modifyType = DirContext.REMOVE_ATTRIBUTE;
else if (modifyType.equals("replace"... | java | public void setModifytype(String modifyType) throws ApplicationException {
modifyType = modifyType.trim().toLowerCase();
if (modifyType.equals("add")) this.modifyType = DirContext.ADD_ATTRIBUTE;
else if (modifyType.equals("delete")) this.modifyType = DirContext.REMOVE_ATTRIBUTE;
else if (modifyType.equals("replace"... | [
"public",
"void",
"setModifytype",
"(",
"String",
"modifyType",
")",
"throws",
"ApplicationException",
"{",
"modifyType",
"=",
"modifyType",
".",
"trim",
"(",
")",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"modifyType",
".",
"equals",
"(",
"\"add\"",
")"... | Indicates whether to add, delete, or replace an attribute in a multi-value list of attributes.
@param modifyType The modifyType to set.
@throws ApplicationException | [
"Indicates",
"whether",
"to",
"add",
"delete",
"or",
"replace",
"an",
"attribute",
"in",
"a",
"multi",
"-",
"value",
"list",
"of",
"attributes",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ldap.java#L232-L238 |
30,730 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Ldap.java | Ldap.setSortcontrol | public void setSortcontrol(String sortControl) throws PageException {
String[] sortControlArr = ArrayUtil.trim(ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(sortControl, ',')));
for (int i = 0; i < sortControlArr.length; i++) {
String scs = sortControlArr[i].trim().toLowerCase();
if (scs.equals("a... | java | public void setSortcontrol(String sortControl) throws PageException {
String[] sortControlArr = ArrayUtil.trim(ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(sortControl, ',')));
for (int i = 0; i < sortControlArr.length; i++) {
String scs = sortControlArr[i].trim().toLowerCase();
if (scs.equals("a... | [
"public",
"void",
"setSortcontrol",
"(",
"String",
"sortControl",
")",
"throws",
"PageException",
"{",
"String",
"[",
"]",
"sortControlArr",
"=",
"ArrayUtil",
".",
"trim",
"(",
"ListUtil",
".",
"toStringArray",
"(",
"ListUtil",
".",
"listToArrayRemoveEmpty",
"(",
... | Specifies how to sort query results.
@param sortControl sortControl to set
@throws PageException | [
"Specifies",
"how",
"to",
"sort",
"query",
"results",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ldap.java#L265-L276 |
30,731 | lucee/Lucee | core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java | RamResourceCore.getChildNames | public String[] getChildNames() {
if (children == null || children.size() == 0) return EMPTY_NAMES;
String[] arr = new String[children.size()];
for (int i = 0; i < arr.length; i++) {
arr[i] = ((RamResourceCore) children.get(i)).getName();
}
return arr;
} | java | public String[] getChildNames() {
if (children == null || children.size() == 0) return EMPTY_NAMES;
String[] arr = new String[children.size()];
for (int i = 0; i < arr.length; i++) {
arr[i] = ((RamResourceCore) children.get(i)).getName();
}
return arr;
} | [
"public",
"String",
"[",
"]",
"getChildNames",
"(",
")",
"{",
"if",
"(",
"children",
"==",
"null",
"||",
"children",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"EMPTY_NAMES",
";",
"String",
"[",
"]",
"arr",
"=",
"new",
"String",
"[",
"children"... | Gibt den Feldnamen children zurueck.
@return children | [
"Gibt",
"den",
"Feldnamen",
"children",
"zurueck",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java#L93-L100 |
30,732 | lucee/Lucee | core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java | RamResourceCore.getChild | public RamResourceCore getChild(String name, boolean caseSensitive) {
if (children == null) return null;
RamResourceCore child;
for (int i = children.size() - 1; i >= 0; i--) {
child = (RamResourceCore) children.get(i);
if (child != null && (caseSensitive ? child.getName().equals(name) : child.getName().e... | java | public RamResourceCore getChild(String name, boolean caseSensitive) {
if (children == null) return null;
RamResourceCore child;
for (int i = children.size() - 1; i >= 0; i--) {
child = (RamResourceCore) children.get(i);
if (child != null && (caseSensitive ? child.getName().equals(name) : child.getName().e... | [
"public",
"RamResourceCore",
"getChild",
"(",
"String",
"name",
",",
"boolean",
"caseSensitive",
")",
"{",
"if",
"(",
"children",
"==",
"null",
")",
"return",
"null",
";",
"RamResourceCore",
"child",
";",
"for",
"(",
"int",
"i",
"=",
"children",
".",
"size... | returns a child that match given name
@param name
@return matching child | [
"returns",
"a",
"child",
"that",
"match",
"given",
"name"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java#L204-L213 |
30,733 | lucee/Lucee | core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java | RamResourceCore.removeChild | public void removeChild(RamResourceCore core) {
if (children == null) return;
RamResourceCore child;
for (int i = children.size() - 1; i >= 0; i--) {
child = (RamResourceCore) children.get(i);
if (child == core) {
children.remove(i);
break;
}
}
} | java | public void removeChild(RamResourceCore core) {
if (children == null) return;
RamResourceCore child;
for (int i = children.size() - 1; i >= 0; i--) {
child = (RamResourceCore) children.get(i);
if (child == core) {
children.remove(i);
break;
}
}
} | [
"public",
"void",
"removeChild",
"(",
"RamResourceCore",
"core",
")",
"{",
"if",
"(",
"children",
"==",
"null",
")",
"return",
";",
"RamResourceCore",
"child",
";",
"for",
"(",
"int",
"i",
"=",
"children",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
"... | remove given child from this core
@param core | [
"remove",
"given",
"child",
"from",
"this",
"core"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java#L229-L241 |
30,734 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.getVariable | public static Object getVariable(PageContext pc, Collection collection, String var) throws PageException {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable declaration [" + var + "]");
while (list.hasNextNext()) {
collection = Caster.... | java | public static Object getVariable(PageContext pc, Collection collection, String var) throws PageException {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable declaration [" + var + "]");
while (list.hasNextNext()) {
collection = Caster.... | [
"public",
"static",
"Object",
"getVariable",
"(",
"PageContext",
"pc",
",",
"Collection",
"collection",
",",
"String",
"var",
")",
"throws",
"PageException",
"{",
"StringList",
"list",
"=",
"parse",
"(",
"pc",
",",
"new",
"ParserString",
"(",
"var",
")",
","... | reads a subelement from a struct
@param pc
@param collection
@param var
@return matching Object
@throws PageException | [
"reads",
"a",
"subelement",
"from",
"a",
"struct"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L58-L66 |
30,735 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.getVariableEL | public static Object getVariableEL(PageContext pc, String var, Object defaultValue) {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) return defaultValue;
int scope = scopeString2Int(pc.ignoreScopes(), list.next());
Object coll = null;
if (scope == Scope.SCOPE_UNDEFINED) {
coll =... | java | public static Object getVariableEL(PageContext pc, String var, Object defaultValue) {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) return defaultValue;
int scope = scopeString2Int(pc.ignoreScopes(), list.next());
Object coll = null;
if (scope == Scope.SCOPE_UNDEFINED) {
coll =... | [
"public",
"static",
"Object",
"getVariableEL",
"(",
"PageContext",
"pc",
",",
"String",
"var",
",",
"Object",
"defaultValue",
")",
"{",
"StringList",
"list",
"=",
"parse",
"(",
"pc",
",",
"new",
"ParserString",
"(",
"var",
")",
",",
"false",
")",
";",
"i... | get a variable from page context
@param pc Page Context
@param var variable string to get value to
@param defaultValue value returnded if variable was not found
@return the value or default value if not found | [
"get",
"a",
"variable",
"from",
"page",
"context"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L223-L248 |
30,736 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.setVariable | public static Object setVariable(PageContext pc, String var, Object value) throws PageException {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable name declaration [" + var + "]");
if (list.size() == 1) {
return pc.undefinedScope().se... | java | public static Object setVariable(PageContext pc, String var, Object value) throws PageException {
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable name declaration [" + var + "]");
if (list.size() == 1) {
return pc.undefinedScope().se... | [
"public",
"static",
"Object",
"setVariable",
"(",
"PageContext",
"pc",
",",
"String",
"var",
",",
"Object",
"value",
")",
"throws",
"PageException",
"{",
"StringList",
"list",
"=",
"parse",
"(",
"pc",
",",
"new",
"ParserString",
"(",
"var",
")",
",",
"fals... | sets a variable to page Context
@param pc pagecontext of the new variable
@param var String of variable definition
@param value value to set to variable
@return value setted
@throws PageException | [
"sets",
"a",
"variable",
"to",
"page",
"Context"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L361-L384 |
30,737 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.removeVariable | public static Object removeVariable(PageContext pc, String var) throws PageException {
// print.ln("var:"+var);
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable declaration [" + var + "]");
if (list.size() == 1) {
return pc.undefined... | java | public static Object removeVariable(PageContext pc, String var) throws PageException {
// print.ln("var:"+var);
StringList list = parse(pc, new ParserString(var), false);
if (list == null) throw new InterpreterException("invalid variable declaration [" + var + "]");
if (list.size() == 1) {
return pc.undefined... | [
"public",
"static",
"Object",
"removeVariable",
"(",
"PageContext",
"pc",
",",
"String",
"var",
")",
"throws",
"PageException",
"{",
"// print.ln(\"var:\"+var);",
"StringList",
"list",
"=",
"parse",
"(",
"pc",
",",
"new",
"ParserString",
"(",
"var",
")",
",",
... | removes a variable eith matching name from page context
@param pc
@param var
@return has removed or not
@throws PageException | [
"removes",
"a",
"variable",
"eith",
"matching",
"name",
"from",
"page",
"context"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L394-L418 |
30,738 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.parse | private static StringList parse(PageContext pc, ParserString ps, boolean doLowerCase) {
String id = readIdentifier(ps, doLowerCase);
if (id == null) return null;
StringList list = new StringList(id);
CFMLExpressionInterpreter interpreter = null;
while (true) {
if (ps.forwardIfCurrent('.')) {
id = readIdent... | java | private static StringList parse(PageContext pc, ParserString ps, boolean doLowerCase) {
String id = readIdentifier(ps, doLowerCase);
if (id == null) return null;
StringList list = new StringList(id);
CFMLExpressionInterpreter interpreter = null;
while (true) {
if (ps.forwardIfCurrent('.')) {
id = readIdent... | [
"private",
"static",
"StringList",
"parse",
"(",
"PageContext",
"pc",
",",
"ParserString",
"ps",
",",
"boolean",
"doLowerCase",
")",
"{",
"String",
"id",
"=",
"readIdentifier",
"(",
"ps",
",",
"doLowerCase",
")",
";",
"if",
"(",
"id",
"==",
"null",
")",
... | parse a Literal variable String and return result as String List
@param pc Page Context
@param ps ParserString to read
@return Variable Definition in a String List | [
"parse",
"a",
"Literal",
"variable",
"String",
"and",
"return",
"result",
"as",
"String",
"List"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L474-L502 |
30,739 | lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java | VariableInterpreter.scopeString2Int | public static int scopeString2Int(boolean ignoreScope, String type) {
type = StringUtil.toLowerCase(type);
char c = type.charAt(0);
// ignore scope only handles only reconize local,arguments as scope, the rest is ignored
if (ignoreScope) {
if ('a' == c) {
if ("arguments".equals(type)) return Scope.SCOPE_ARG... | java | public static int scopeString2Int(boolean ignoreScope, String type) {
type = StringUtil.toLowerCase(type);
char c = type.charAt(0);
// ignore scope only handles only reconize local,arguments as scope, the rest is ignored
if (ignoreScope) {
if ('a' == c) {
if ("arguments".equals(type)) return Scope.SCOPE_ARG... | [
"public",
"static",
"int",
"scopeString2Int",
"(",
"boolean",
"ignoreScope",
",",
"String",
"type",
")",
"{",
"type",
"=",
"StringUtil",
".",
"toLowerCase",
"(",
"type",
")",
";",
"char",
"c",
"=",
"type",
".",
"charAt",
"(",
"0",
")",
";",
"// ignore sc... | translate a string type definition to its int representation
@param type type to translate
@return int representation matching to given string | [
"translate",
"a",
"string",
"type",
"definition",
"to",
"its",
"int",
"representation"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L529-L584 |
30,740 | lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.getPageSource | public PageSource getPageSource(String key, boolean updateAccesTime) { // DO NOT CHANGE INTERFACE (used by Argus Monitor)
PageSource ps = pageSources.get(key.toLowerCase());
if (ps == null) return null;
if (updateAccesTime) ps.setLastAccessTime();
return ps;
} | java | public PageSource getPageSource(String key, boolean updateAccesTime) { // DO NOT CHANGE INTERFACE (used by Argus Monitor)
PageSource ps = pageSources.get(key.toLowerCase());
if (ps == null) return null;
if (updateAccesTime) ps.setLastAccessTime();
return ps;
} | [
"public",
"PageSource",
"getPageSource",
"(",
"String",
"key",
",",
"boolean",
"updateAccesTime",
")",
"{",
"// DO NOT CHANGE INTERFACE (used by Argus Monitor)",
"PageSource",
"ps",
"=",
"pageSources",
".",
"get",
"(",
"key",
".",
"toLowerCase",
"(",
")",
")",
";",
... | return pages matching to key
@param key key for the page
@param updateAccesTime define if do update access time
@return page | [
"return",
"pages",
"matching",
"to",
"key"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L67-L72 |
30,741 | lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.setPage | public void setPage(String key, PageSource ps) {
ps.setLastAccessTime();
pageSources.put(key.toLowerCase(), ps);
} | java | public void setPage(String key, PageSource ps) {
ps.setLastAccessTime();
pageSources.put(key.toLowerCase(), ps);
} | [
"public",
"void",
"setPage",
"(",
"String",
"key",
",",
"PageSource",
"ps",
")",
"{",
"ps",
".",
"setLastAccessTime",
"(",
")",
";",
"pageSources",
".",
"put",
"(",
"key",
".",
"toLowerCase",
"(",
")",
",",
"ps",
")",
";",
"}"
] | sts a page object to the page pool
@param key key reference to store page object
@param ps pagesource to store | [
"sts",
"a",
"page",
"object",
"to",
"the",
"page",
"pool"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L80-L84 |
30,742 | lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.remove | public boolean remove(String key) {
if (pageSources.remove(key.toLowerCase()) != null) return true;
Set<String> set = pageSources.keySet();
String[] keys = set.toArray(new String[set.size()]); // done this way to avoid ConcurrentModificationException
PageSource ps;
for (String k: keys) {
ps = pageSources.ge... | java | public boolean remove(String key) {
if (pageSources.remove(key.toLowerCase()) != null) return true;
Set<String> set = pageSources.keySet();
String[] keys = set.toArray(new String[set.size()]); // done this way to avoid ConcurrentModificationException
PageSource ps;
for (String k: keys) {
ps = pageSources.ge... | [
"public",
"boolean",
"remove",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"pageSources",
".",
"remove",
"(",
"key",
".",
"toLowerCase",
"(",
")",
")",
"!=",
"null",
")",
"return",
"true",
";",
"Set",
"<",
"String",
">",
"set",
"=",
"pageSources",
"."... | removes a page from the page pool
@param key key reference to page object
@return page object matching to key reference | [
"removes",
"a",
"page",
"from",
"the",
"page",
"pool"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L111-L126 |
30,743 | lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.clearUnused | public void clearUnused(ConfigImpl config) {
SystemOut.printDate(config.getOutWriter(), "PagePool: " + size() + ">(" + maxSize + ")");
if (size() > maxSize) {
String[] keys = keys();
LongKeyList list = new LongKeyList();
for (int i = 0; i < keys.length; i++) {
PageSource ps = getPageSource(keys[i], ... | java | public void clearUnused(ConfigImpl config) {
SystemOut.printDate(config.getOutWriter(), "PagePool: " + size() + ">(" + maxSize + ")");
if (size() > maxSize) {
String[] keys = keys();
LongKeyList list = new LongKeyList();
for (int i = 0; i < keys.length; i++) {
PageSource ps = getPageSource(keys[i], ... | [
"public",
"void",
"clearUnused",
"(",
"ConfigImpl",
"config",
")",
"{",
"SystemOut",
".",
"printDate",
"(",
"config",
".",
"getOutWriter",
"(",
")",
",",
"\"PagePool: \"",
"+",
"size",
"(",
")",
"+",
"\">(\"",
"+",
"maxSize",
"+",
"\")\"",
")",
";",
"if"... | clear unused pages from page pool | [
"clear",
"unused",
"pages",
"from",
"page",
"pool"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L163-L184 |
30,744 | lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.clearPages | public void clearPages(ClassLoader cl) {
Iterator<PageSource> it = this.pageSources.values().iterator();
PageSourceImpl entry;
while (it.hasNext()) {
entry = (PageSourceImpl) it.next();
if (cl != null) entry.clear(cl);
else entry.clear();
}
} | java | public void clearPages(ClassLoader cl) {
Iterator<PageSource> it = this.pageSources.values().iterator();
PageSourceImpl entry;
while (it.hasNext()) {
entry = (PageSourceImpl) it.next();
if (cl != null) entry.clear(cl);
else entry.clear();
}
} | [
"public",
"void",
"clearPages",
"(",
"ClassLoader",
"cl",
")",
"{",
"Iterator",
"<",
"PageSource",
">",
"it",
"=",
"this",
".",
"pageSources",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"PageSourceImpl",
"entry",
";",
"while",
"(",
"it",
... | remove all Page from Pool using this classloader
@param cl | [
"remove",
"all",
"Page",
"from",
"Pool",
"using",
"this",
"classloader"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L211-L219 |
30,745 | lucee/Lucee | core/src/main/java/lucee/commons/img/Captcha.java | Captcha.writeOut | public static void writeOut(BufferedImage image, OutputStream os, String format) throws IOException {
ImageIO.write(image, format, os);
} | java | public static void writeOut(BufferedImage image, OutputStream os, String format) throws IOException {
ImageIO.write(image, format, os);
} | [
"public",
"static",
"void",
"writeOut",
"(",
"BufferedImage",
"image",
",",
"OutputStream",
"os",
",",
"String",
"format",
")",
"throws",
"IOException",
"{",
"ImageIO",
".",
"write",
"(",
"image",
",",
"format",
",",
"os",
")",
";",
"}"
] | write out image object to a output stream
@param image
@param os
@param format
@throws IOException | [
"write",
"out",
"image",
"object",
"to",
"a",
"output",
"stream"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/img/Captcha.java#L51-L54 |
30,746 | lucee/Lucee | core/src/main/java/lucee/commons/img/Captcha.java | Captcha.randomString | public static String randomString(int length) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
sb.append(chars[AbstractCaptcha.rnd(0, chars.length - 1)]);
}
return sb.toString();
} | java | public static String randomString(int length) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
sb.append(chars[AbstractCaptcha.rnd(0, chars.length - 1)]);
}
return sb.toString();
} | [
"public",
"static",
"String",
"randomString",
"(",
"int",
"length",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"sb",
".",
"append... | creates a random String in given length
@param length length of the string to create
@return | [
"creates",
"a",
"random",
"String",
"in",
"given",
"length"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/img/Captcha.java#L62-L68 |
30,747 | lucee/Lucee | core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java | HttpServletRequestDummy.translateQS | private Pair[] translateQS(String qs) {
if (qs == null) return new Pair[0];
Array arr = lucee.runtime.type.util.ListUtil.listToArrayRemoveEmpty(qs, "&");
Pair[] parameters = new Pair[arr.size()];
// Array item;
int index;
String name;
for (int i = 1; i <= parameters.length; i++) {
name = Caster.toString(ar... | java | private Pair[] translateQS(String qs) {
if (qs == null) return new Pair[0];
Array arr = lucee.runtime.type.util.ListUtil.listToArrayRemoveEmpty(qs, "&");
Pair[] parameters = new Pair[arr.size()];
// Array item;
int index;
String name;
for (int i = 1; i <= parameters.length; i++) {
name = Caster.toString(ar... | [
"private",
"Pair",
"[",
"]",
"translateQS",
"(",
"String",
"qs",
")",
"{",
"if",
"(",
"qs",
"==",
"null",
")",
"return",
"new",
"Pair",
"[",
"0",
"]",
";",
"Array",
"arr",
"=",
"lucee",
".",
"runtime",
".",
"type",
".",
"util",
".",
"ListUtil",
"... | constructor of the class
@throws PageException / public HttpServletRequestDummy(String serverName, String
scriptName,Struct queryString) throws PageException { this.serverName=serverName;
requestURI=scriptName;
StringBuffer qs=new StringBuffer(); String[] keys=queryString.keys(); parameters=new
Item[keys.length]; Str... | [
"constructor",
"of",
"the",
"class"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java#L161-L177 |
30,748 | lucee/Lucee | core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java | HttpServletRequestDummy.setHeader | public void setHeader(String name, String value) {
headers = ReqRspUtil.set(headers, name, value);
} | java | public void setHeader(String name, String value) {
headers = ReqRspUtil.set(headers, name, value);
} | [
"public",
"void",
"setHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"headers",
"=",
"ReqRspUtil",
".",
"set",
"(",
"headers",
",",
"name",
",",
"value",
")",
";",
"}"
] | sets a new header value
@param name name of the new value
@param value header value | [
"sets",
"a",
"new",
"header",
"value"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java#L237-L239 |
30,749 | lucee/Lucee | core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java | HttpServletRequestDummy.addHeader | public void addHeader(String name, String value) {
headers = ReqRspUtil.add(headers, name, value);
} | java | public void addHeader(String name, String value) {
headers = ReqRspUtil.add(headers, name, value);
} | [
"public",
"void",
"addHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"headers",
"=",
"ReqRspUtil",
".",
"add",
"(",
"headers",
",",
"name",
",",
"value",
")",
";",
"}"
] | add a new header value
@param name name of the new value
@param value header value | [
"add",
"a",
"new",
"header",
"value"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java#L247-L249 |
30,750 | lucee/Lucee | core/src/main/java/lucee/runtime/functions/thread/RunAsync.java | RunAsync.call | public static Object call(PageContext pc, Object udf, double timeout) throws PageException {
return Future._then(pc, Caster.toFunction(udf), (long) timeout);
} | java | public static Object call(PageContext pc, Object udf, double timeout) throws PageException {
return Future._then(pc, Caster.toFunction(udf), (long) timeout);
} | [
"public",
"static",
"Object",
"call",
"(",
"PageContext",
"pc",
",",
"Object",
"udf",
",",
"double",
"timeout",
")",
"throws",
"PageException",
"{",
"return",
"Future",
".",
"_then",
"(",
"pc",
",",
"Caster",
".",
"toFunction",
"(",
"udf",
")",
",",
"(",... | Verify if in thread or not
@param pc
@return
@throws PageException | [
"Verify",
"if",
"in",
"thread",
"or",
"not"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/thread/RunAsync.java#L26-L28 |
30,751 | lucee/Lucee | core/src/main/java/lucee/runtime/instrumentation/InstrumentationFactory.java | InstrumentationFactory.loadAgent | private static void loadAgent(Config config, Log log, String agentJar, Class<?> vmClass) {
try {
// addAttach(config,log);
// first obtain the PID of the currently-running process
// ### this relies on the undocumented convention of the
// RuntimeMXBean's
// ### name starting with the PID, b... | java | private static void loadAgent(Config config, Log log, String agentJar, Class<?> vmClass) {
try {
// addAttach(config,log);
// first obtain the PID of the currently-running process
// ### this relies on the undocumented convention of the
// RuntimeMXBean's
// ### name starting with the PID, b... | [
"private",
"static",
"void",
"loadAgent",
"(",
"Config",
"config",
",",
"Log",
"log",
",",
"String",
"agentJar",
",",
"Class",
"<",
"?",
">",
"vmClass",
")",
"{",
"try",
"{",
"// addAttach(config,log);",
"// first obtain the PID of the currently-running process",
"/... | Attach and load an agent class.
@param log Log used if the agent cannot be loaded.
@param agentJar absolute path to the agent jar.
@param vmClass VirtualMachine.class from tools.jar. | [
"Attach",
"and",
"load",
"an",
"agent",
"class",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/instrumentation/InstrumentationFactory.java#L309-L341 |
30,752 | lucee/Lucee | core/src/main/java/lucee/runtime/debug/DebuggerImpl.java | DebuggerImpl.getDebugEntry | public static lucee.runtime.config.DebugEntry getDebugEntry(PageContext pc) {
String addr = pc.getHttpServletRequest().getRemoteAddr();
lucee.runtime.config.DebugEntry debugEntry = ((ConfigImpl) pc.getConfig()).getDebugEntry(addr, null);
return debugEntry;
} | java | public static lucee.runtime.config.DebugEntry getDebugEntry(PageContext pc) {
String addr = pc.getHttpServletRequest().getRemoteAddr();
lucee.runtime.config.DebugEntry debugEntry = ((ConfigImpl) pc.getConfig()).getDebugEntry(addr, null);
return debugEntry;
} | [
"public",
"static",
"lucee",
".",
"runtime",
".",
"config",
".",
"DebugEntry",
"getDebugEntry",
"(",
"PageContext",
"pc",
")",
"{",
"String",
"addr",
"=",
"pc",
".",
"getHttpServletRequest",
"(",
")",
".",
"getRemoteAddr",
"(",
")",
";",
"lucee",
".",
"run... | returns the DebugEntry for the current request's IP address, or null if no template matches the
address
@param pc
@return | [
"returns",
"the",
"DebugEntry",
"for",
"the",
"current",
"request",
"s",
"IP",
"address",
"or",
"null",
"if",
"no",
"template",
"matches",
"the",
"address"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/debug/DebuggerImpl.java#L271-L276 |
30,753 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.buildRanges | private static void buildRanges() {
// careful, no lead zeros allowed
// low high len vendor mod-10?
ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DINERS, true),
new LCR(36000000000000L, 36999999999999L, 14, DINERS, true), new LCR(380000... | java | private static void buildRanges() {
// careful, no lead zeros allowed
// low high len vendor mod-10?
ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DINERS, true),
new LCR(36000000000000L, 36999999999999L, 14, DINERS, true), new LCR(380000... | [
"private",
"static",
"void",
"buildRanges",
"(",
")",
"{",
"// careful, no lead zeros allowed",
"// low high len vendor mod-10?",
"ranges",
"=",
"new",
"LCR",
"[",
"]",
"{",
"new",
"LCR",
"(",
"4000000000000L",
",",
"4999999999999L",
",",
"13",
",",
"VISA",
",",
... | build table of which ranges of credit card number belong to which vendor | [
"build",
"table",
"of",
"which",
"ranges",
"of",
"credit",
"card",
"number",
"belong",
"to",
"which",
"vendor"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L112-L123 |
30,754 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.findMatchingRange | protected static int findMatchingRange(long creditCardNumber) {
if (creditCardNumber < 1000000000000L) {
return NOT_ENOUGH_DIGITS;
}
if (creditCardNumber > 9999999999999999L) {
return TOO_MANY_DIGITS;
}
// check the cached index first, where we last found a number.
if (ranges[cachedLastFind].low <= cred... | java | protected static int findMatchingRange(long creditCardNumber) {
if (creditCardNumber < 1000000000000L) {
return NOT_ENOUGH_DIGITS;
}
if (creditCardNumber > 9999999999999999L) {
return TOO_MANY_DIGITS;
}
// check the cached index first, where we last found a number.
if (ranges[cachedLastFind].low <= cred... | [
"protected",
"static",
"int",
"findMatchingRange",
"(",
"long",
"creditCardNumber",
")",
"{",
"if",
"(",
"creditCardNumber",
"<",
"1000000000000L",
")",
"{",
"return",
"NOT_ENOUGH_DIGITS",
";",
"}",
"if",
"(",
"creditCardNumber",
">",
"9999999999999999L",
")",
"{"... | Finds a matching range in the ranges array for a given creditCardNumber.
@param creditCardNumber number on card.
@return index of matching range, or NOT_ENOUGH_DIGITS or UNKNOWN_VENDOR on failure. | [
"Finds",
"a",
"matching",
"range",
"in",
"the",
"ranges",
"array",
"for",
"a",
"given",
"creditCardNumber",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L132-L151 |
30,755 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.isValid | public static boolean isValid(long creditCardNumber) {
int i = findMatchingRange(creditCardNumber);
if (i < 0) {
return false;
}
// else {
// we have a match
if (ranges[i].hasCheckDigit) {
// there is a checkdigit to be validated
/*
* Manual method MOD 10 checkdigit 706-511-227 7 0 6 5 1 1 2 ... | java | public static boolean isValid(long creditCardNumber) {
int i = findMatchingRange(creditCardNumber);
if (i < 0) {
return false;
}
// else {
// we have a match
if (ranges[i].hasCheckDigit) {
// there is a checkdigit to be validated
/*
* Manual method MOD 10 checkdigit 706-511-227 7 0 6 5 1 1 2 ... | [
"public",
"static",
"boolean",
"isValid",
"(",
"long",
"creditCardNumber",
")",
"{",
"int",
"i",
"=",
"findMatchingRange",
"(",
"creditCardNumber",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"return",
"false",
";",
"}",
"// else {",
"// we have a match",
... | Determine if the credit card number is valid, i.e. has good prefix and checkdigit. Does _not_ ask
the credit card company if this card has been issued or is in good standing.
@param creditCardNumber number on card.
@return true if card number is good. | [
"Determine",
"if",
"the",
"credit",
"card",
"number",
"is",
"valid",
"i",
".",
"e",
".",
"has",
"good",
"prefix",
"and",
"checkdigit",
".",
"Does",
"_not_",
"ask",
"the",
"credit",
"card",
"company",
"if",
"this",
"card",
"has",
"been",
"issued",
"or",
... | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L181-L221 |
30,756 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.recognizeVendor | public static int recognizeVendor(long creditCardNumber) {
int i = findMatchingRange(creditCardNumber);
if (i < 0) {
return i;
}
return ranges[i].vendor;
} | java | public static int recognizeVendor(long creditCardNumber) {
int i = findMatchingRange(creditCardNumber);
if (i < 0) {
return i;
}
return ranges[i].vendor;
} | [
"public",
"static",
"int",
"recognizeVendor",
"(",
"long",
"creditCardNumber",
")",
"{",
"int",
"i",
"=",
"findMatchingRange",
"(",
"creditCardNumber",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"return",
"i",
";",
"}",
"return",
"ranges",
"[",
"i",
... | Determine the credit card company. Does NOT validate checkdigit.
@param creditCardNumber number on card.
@return credit card vendor enumeration constant. | [
"Determine",
"the",
"credit",
"card",
"company",
".",
"Does",
"NOT",
"validate",
"checkdigit",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L230-L237 |
30,757 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.toCreditcard | public static String toCreditcard(String strCreditCardNumber) throws ExpressionException {
long number = toLong(strCreditCardNumber, -1);
if (number == -1) throw new ExpressionException("invalid creditcard number [" + strCreditCardNumber + "]");
return toPrettyString(number);
} | java | public static String toCreditcard(String strCreditCardNumber) throws ExpressionException {
long number = toLong(strCreditCardNumber, -1);
if (number == -1) throw new ExpressionException("invalid creditcard number [" + strCreditCardNumber + "]");
return toPrettyString(number);
} | [
"public",
"static",
"String",
"toCreditcard",
"(",
"String",
"strCreditCardNumber",
")",
"throws",
"ExpressionException",
"{",
"long",
"number",
"=",
"toLong",
"(",
"strCreditCardNumber",
",",
"-",
"1",
")",
";",
"if",
"(",
"number",
"==",
"-",
"1",
")",
"th... | 1800 15 mod 10 | [
"1800",
"15",
"mod",
"10"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L256-L260 |
30,758 | lucee/Lucee | core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java | ValidateCreditCard.toPrettyString | private static String toPrettyString(long creditCardNumber) {
String plain = Long.toString(creditCardNumber);
// int i = findMatchingRange(creditCardNumber);
int length = plain.length();
switch (length) {
case 12:
// 12 pattern 3-3-3-3
return plain.substring(0, 3) + ' ' + plain.substring(3, 6) + ' ' + p... | java | private static String toPrettyString(long creditCardNumber) {
String plain = Long.toString(creditCardNumber);
// int i = findMatchingRange(creditCardNumber);
int length = plain.length();
switch (length) {
case 12:
// 12 pattern 3-3-3-3
return plain.substring(0, 3) + ' ' + plain.substring(3, 6) + ' ' + p... | [
"private",
"static",
"String",
"toPrettyString",
"(",
"long",
"creditCardNumber",
")",
"{",
"String",
"plain",
"=",
"Long",
".",
"toString",
"(",
"creditCardNumber",
")",
";",
"// int i = findMatchingRange(creditCardNumber);",
"int",
"length",
"=",
"plain",
".",
"le... | Convert a creditCardNumber as long to a formatted String. Currently it breaks 16-digit numbers
into groups of 4.
@param creditCardNumber number on card.
@return String representation of the credit card number. | [
"Convert",
"a",
"creditCardNumber",
"as",
"long",
"to",
"a",
"formatted",
"String",
".",
"Currently",
"it",
"breaks",
"16",
"-",
"digit",
"numbers",
"into",
"groups",
"of",
"4",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/validators/ValidateCreditCard.java#L276-L311 |
30,759 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.swap | public static void swap(Array array, int left, int right) throws ExpressionException {
int len = array.size();
if (len == 0) throw new ExpressionException("array is empty");
if (left < 1 || left > len) throw new ExpressionException("invalid index [" + left + "]", "valid indexes are from 1 to " + len);
if (right < ... | java | public static void swap(Array array, int left, int right) throws ExpressionException {
int len = array.size();
if (len == 0) throw new ExpressionException("array is empty");
if (left < 1 || left > len) throw new ExpressionException("invalid index [" + left + "]", "valid indexes are from 1 to " + len);
if (right < ... | [
"public",
"static",
"void",
"swap",
"(",
"Array",
"array",
",",
"int",
"left",
",",
"int",
"right",
")",
"throws",
"ExpressionException",
"{",
"int",
"len",
"=",
"array",
".",
"size",
"(",
")",
";",
"if",
"(",
"len",
"==",
"0",
")",
"throw",
"new",
... | swap to values of the array
@param array
@param left left value to swap
@param right right value to swap
@throws ExpressionException | [
"swap",
"to",
"values",
"of",
"the",
"array"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L133-L151 |
30,760 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.find | public static int find(Array array, Object object) {
int len = array.size();
for (int i = 1; i <= len; i++) {
Object tmp = array.get(i, null);
try {
if (tmp != null && Operator.compare(object, tmp) == 0) return i;
}
catch (PageException e) {}
}
return 0;
} | java | public static int find(Array array, Object object) {
int len = array.size();
for (int i = 1; i <= len; i++) {
Object tmp = array.get(i, null);
try {
if (tmp != null && Operator.compare(object, tmp) == 0) return i;
}
catch (PageException e) {}
}
return 0;
} | [
"public",
"static",
"int",
"find",
"(",
"Array",
"array",
",",
"Object",
"object",
")",
"{",
"int",
"len",
"=",
"array",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<=",
"len",
";",
"i",
"++",
")",
"{",
"Object",
... | find a object in array
@param array
@param object object to find
@return position in array or 0 | [
"find",
"a",
"object",
"in",
"array"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L160-L170 |
30,761 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.avg | public static double avg(Array array) throws ExpressionException {
if (array.size() == 0) return 0;
return sum(array) / array.size();
} | java | public static double avg(Array array) throws ExpressionException {
if (array.size() == 0) return 0;
return sum(array) / array.size();
} | [
"public",
"static",
"double",
"avg",
"(",
"Array",
"array",
")",
"throws",
"ExpressionException",
"{",
"if",
"(",
"array",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"0",
";",
"return",
"sum",
"(",
"array",
")",
"/",
"array",
".",
"size",
"(",
... | average of all values of the array, only work when all values are numeric
@param array
@return average of all values
@throws ExpressionException | [
"average",
"of",
"all",
"values",
"of",
"the",
"array",
"only",
"work",
"when",
"all",
"values",
"are",
"numeric"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L179-L182 |
30,762 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.sum | public static double sum(Array array) throws ExpressionException {
if (array.getDimension() > 1) throw new ExpressionException("can only get sum/avg from 1 dimensional arrays");
double rtn = 0;
int len = array.size();
// try {
for (int i = 1; i <= len; i++) {
rtn += _toDoubleValue(array, i);
}
/*
* } cat... | java | public static double sum(Array array) throws ExpressionException {
if (array.getDimension() > 1) throw new ExpressionException("can only get sum/avg from 1 dimensional arrays");
double rtn = 0;
int len = array.size();
// try {
for (int i = 1; i <= len; i++) {
rtn += _toDoubleValue(array, i);
}
/*
* } cat... | [
"public",
"static",
"double",
"sum",
"(",
"Array",
"array",
")",
"throws",
"ExpressionException",
"{",
"if",
"(",
"array",
".",
"getDimension",
"(",
")",
">",
"1",
")",
"throw",
"new",
"ExpressionException",
"(",
"\"can only get sum/avg from 1 dimensional arrays\"",... | sum of all values of a array, only work when all values are numeric
@param array Array
@return sum of all values
@throws ExpressionException | [
"sum",
"of",
"all",
"values",
"of",
"a",
"array",
"only",
"work",
"when",
"all",
"values",
"are",
"numeric"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L191-L205 |
30,763 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.median | public static double median(Array array) throws ExpressionException {
int len = array.size();
if (len == 0) return 0;
if (array.getDimension() > 1) throw new ExpressionException("Median() can only be calculated for one dimensional arrays");
double[] arr = new double[len];
for (int i = 0; i < len; i++)
ar... | java | public static double median(Array array) throws ExpressionException {
int len = array.size();
if (len == 0) return 0;
if (array.getDimension() > 1) throw new ExpressionException("Median() can only be calculated for one dimensional arrays");
double[] arr = new double[len];
for (int i = 0; i < len; i++)
ar... | [
"public",
"static",
"double",
"median",
"(",
"Array",
"array",
")",
"throws",
"ExpressionException",
"{",
"int",
"len",
"=",
"array",
".",
"size",
"(",
")",
";",
"if",
"(",
"len",
"==",
"0",
")",
"return",
"0",
";",
"if",
"(",
"array",
".",
"getDimen... | median value of all items in the arrays, only works when all values are numeric
@param array
@return
@throws ExpressionException | [
"median",
"value",
"of",
"all",
"items",
"in",
"the",
"arrays",
"only",
"works",
"when",
"all",
"values",
"are",
"numeric"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L214-L237 |
30,764 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.min | public static double min(Array array) throws PageException {
if (array.getDimension() > 1) throw new ExpressionException("can only get max value from 1 dimensional arrays");
if (array.size() == 0) return 0;
double rtn = _toDoubleValue(array, 1);
int len = array.size();
try {
for (int i = 2; i <= len; i++) {
... | java | public static double min(Array array) throws PageException {
if (array.getDimension() > 1) throw new ExpressionException("can only get max value from 1 dimensional arrays");
if (array.size() == 0) return 0;
double rtn = _toDoubleValue(array, 1);
int len = array.size();
try {
for (int i = 2; i <= len; i++) {
... | [
"public",
"static",
"double",
"min",
"(",
"Array",
"array",
")",
"throws",
"PageException",
"{",
"if",
"(",
"array",
".",
"getDimension",
"(",
")",
">",
"1",
")",
"throw",
"new",
"ExpressionException",
"(",
"\"can only get max value from 1 dimensional arrays\"",
"... | the smallest value, of all values inside the array, only work when all values are numeric
@param array
@return the smallest value
@throws PageException | [
"the",
"smallest",
"value",
"of",
"all",
"values",
"inside",
"the",
"array",
"only",
"work",
"when",
"all",
"values",
"are",
"numeric"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L254-L271 |
30,765 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.setEL | public static Object setEL(Object o, int index, Object value) {
try {
return set(o, index, value);
}
catch (ArrayUtilException e) {
return null;
}
} | java | public static Object setEL(Object o, int index, Object value) {
try {
return set(o, index, value);
}
catch (ArrayUtilException e) {
return null;
}
} | [
"public",
"static",
"Object",
"setEL",
"(",
"Object",
"o",
",",
"int",
"index",
",",
"Object",
"value",
")",
"{",
"try",
"{",
"return",
"set",
"(",
"o",
",",
"index",
",",
"value",
")",
";",
"}",
"catch",
"(",
"ArrayUtilException",
"e",
")",
"{",
"... | sets a value to a array at defined index
@param o
@param index
@param value
@return value setted | [
"sets",
"a",
"value",
"to",
"a",
"array",
"at",
"defined",
"index"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L604-L611 |
30,766 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.toArray | public static Object[] toArray(List<?> list) {
Iterator<?> it = list.iterator();
Class clazz = null;
while (it.hasNext()) {
Object v = it.next();
if (v == null) continue;
if (clazz == null) clazz = v.getClass();
else if (clazz != v.getClass()) return list.toArray();
}
if (clazz == Object.class ... | java | public static Object[] toArray(List<?> list) {
Iterator<?> it = list.iterator();
Class clazz = null;
while (it.hasNext()) {
Object v = it.next();
if (v == null) continue;
if (clazz == null) clazz = v.getClass();
else if (clazz != v.getClass()) return list.toArray();
}
if (clazz == Object.class ... | [
"public",
"static",
"Object",
"[",
"]",
"toArray",
"(",
"List",
"<",
"?",
">",
"list",
")",
"{",
"Iterator",
"<",
"?",
">",
"it",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"Class",
"clazz",
"=",
"null",
";",
"while",
"(",
"it",
".",
"hasNext",... | creates a native array out of the input list, if all values are from the same type, this type is
used for the array, otherwise object
@param list | [
"creates",
"a",
"native",
"array",
"out",
"of",
"the",
"input",
"list",
"if",
"all",
"values",
"are",
"from",
"the",
"same",
"type",
"this",
"type",
"is",
"used",
"for",
"the",
"array",
"otherwise",
"object"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L868-L881 |
30,767 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ArrayUtil.java | ArrayUtil.resizeIfNeeded | public static Object[] resizeIfNeeded(Object[] arr, int minSize, boolean doPowerOf2) {
if (arr.length >= minSize) return arr;
if (doPowerOf2) minSize = MathUtil.nextPowerOf2(minSize);
Object[] result = new Object[minSize];
System.arraycopy(arr, 0, result, 0, arr.length);
return result;
} | java | public static Object[] resizeIfNeeded(Object[] arr, int minSize, boolean doPowerOf2) {
if (arr.length >= minSize) return arr;
if (doPowerOf2) minSize = MathUtil.nextPowerOf2(minSize);
Object[] result = new Object[minSize];
System.arraycopy(arr, 0, result, 0, arr.length);
return result;
} | [
"public",
"static",
"Object",
"[",
"]",
"resizeIfNeeded",
"(",
"Object",
"[",
"]",
"arr",
",",
"int",
"minSize",
",",
"boolean",
"doPowerOf2",
")",
"{",
"if",
"(",
"arr",
".",
"length",
">=",
"minSize",
")",
"return",
"arr",
";",
"if",
"(",
"doPowerOf2... | this method returns the original array if its length is equal or greater than the minSize, or
create a new array and copies the data from the original array into the new one.
@param arr - the array to check
@param minSize - the required minimum size
@param doPowerOf2 - if true, and a resize is required, the new size w... | [
"this",
"method",
"returns",
"the",
"original",
"array",
"if",
"its",
"length",
"is",
"equal",
"or",
"greater",
"than",
"the",
"minSize",
"or",
"create",
"a",
"new",
"array",
"and",
"copies",
"the",
"data",
"from",
"the",
"original",
"array",
"into",
"the"... | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L945-L955 |
30,768 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Log.java | Log.setLog | public void setLog(String log) throws ApplicationException {
if (StringUtil.isEmpty(log, true)) return;
this.log = log.trim();
// throw new ApplicationException("invalid value for attribute log ["+log+"]","valid values are
// [application, scheduler,console]");
} | java | public void setLog(String log) throws ApplicationException {
if (StringUtil.isEmpty(log, true)) return;
this.log = log.trim();
// throw new ApplicationException("invalid value for attribute log ["+log+"]","valid values are
// [application, scheduler,console]");
} | [
"public",
"void",
"setLog",
"(",
"String",
"log",
")",
"throws",
"ApplicationException",
"{",
"if",
"(",
"StringUtil",
".",
"isEmpty",
"(",
"log",
",",
"true",
")",
")",
"return",
";",
"this",
".",
"log",
"=",
"log",
".",
"trim",
"(",
")",
";",
"// t... | set the value log If you omit the file attribute, specifies the standard log file in which to
write the message. Ignored if you specify a file attribute
@param log value to set
@throws ApplicationException | [
"set",
"the",
"value",
"log",
"If",
"you",
"omit",
"the",
"file",
"attribute",
"specifies",
"the",
"standard",
"log",
"file",
"in",
"which",
"to",
"write",
"the",
"message",
".",
"Ignored",
"if",
"you",
"specify",
"a",
"file",
"attribute"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Log.java#L97-L102 |
30,769 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Log.java | Log.setType | public void setType(String type) throws ApplicationException {
type = type.toLowerCase().trim();
if (type.equals("information")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
else if (type.equals("info")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
else if (type.equals("warning")) this.type = lucee.commons.... | java | public void setType(String type) throws ApplicationException {
type = type.toLowerCase().trim();
if (type.equals("information")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
else if (type.equals("info")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
else if (type.equals("warning")) this.type = lucee.commons.... | [
"public",
"void",
"setType",
"(",
"String",
"type",
")",
"throws",
"ApplicationException",
"{",
"type",
"=",
"type",
".",
"toLowerCase",
"(",
")",
".",
"trim",
"(",
")",
";",
"if",
"(",
"type",
".",
"equals",
"(",
"\"information\"",
")",
")",
"this",
"... | set the value type The type or severity of the message.
@param type value to set
@throws ApplicationException | [
"set",
"the",
"value",
"type",
"The",
"type",
"or",
"severity",
"of",
"the",
"message",
"."
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Log.java#L124-L136 |
30,770 | lucee/Lucee | core/src/main/java/lucee/runtime/tag/Log.java | Log.setFile | public void setFile(String file) throws ApplicationException {
if (StringUtil.isEmpty(file)) return;
if (file.indexOf('/') != -1 || file.indexOf('\\') != -1)
throw new ApplicationException("value [" + file + "] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not al... | java | public void setFile(String file) throws ApplicationException {
if (StringUtil.isEmpty(file)) return;
if (file.indexOf('/') != -1 || file.indexOf('\\') != -1)
throw new ApplicationException("value [" + file + "] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not al... | [
"public",
"void",
"setFile",
"(",
"String",
"file",
")",
"throws",
"ApplicationException",
"{",
"if",
"(",
"StringUtil",
".",
"isEmpty",
"(",
"file",
")",
")",
"return",
";",
"if",
"(",
"file",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
"||"... | set the value file
@param file value to set
@throws ApplicationException | [
"set",
"the",
"value",
"file"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Log.java#L156-L163 |
30,771 | lucee/Lucee | core/src/main/java/lucee/intergral/fusiondebug/server/FDStackFrameImpl.java | FDStackFrameImpl.copyValues | private static List copyValues(FDStackFrameImpl frame, List to, Struct from) {
Iterator it = from.entrySet().iterator();
Entry entry;
while (it.hasNext()) {
entry = (Entry) it.next();
to.add(new FDVariable(frame, (String) entry.getKey(), FDCaster.toFDValue(frame, entry.getValue())));
}
return to;
} | java | private static List copyValues(FDStackFrameImpl frame, List to, Struct from) {
Iterator it = from.entrySet().iterator();
Entry entry;
while (it.hasNext()) {
entry = (Entry) it.next();
to.add(new FDVariable(frame, (String) entry.getKey(), FDCaster.toFDValue(frame, entry.getValue())));
}
return to;
} | [
"private",
"static",
"List",
"copyValues",
"(",
"FDStackFrameImpl",
"frame",
",",
"List",
"to",
",",
"Struct",
"from",
")",
"{",
"Iterator",
"it",
"=",
"from",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"Entry",
"entry",
";",
"while",
"... | copy all data from given struct to given list and translate it to a FDValue
@param to list to fill with values
@param from struct to read values from
@return the given list | [
"copy",
"all",
"data",
"from",
"given",
"struct",
"to",
"given",
"list",
"and",
"translate",
"it",
"to",
"a",
"FDValue"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/intergral/fusiondebug/server/FDStackFrameImpl.java#L208-L216 |
30,772 | lucee/Lucee | loader/src/main/java/lucee/loader/util/Util.java | Util.isNewerThan | public static boolean isNewerThan(final Version left, final Version right) {
// major
if (left.getMajor() > right.getMajor()) return true;
if (left.getMajor() < right.getMajor()) return false;
// minor
if (left.getMinor() > right.getMinor()) return true;
if (left.getMinor() < right.getMinor()) return false;
/... | java | public static boolean isNewerThan(final Version left, final Version right) {
// major
if (left.getMajor() > right.getMajor()) return true;
if (left.getMajor() < right.getMajor()) return false;
// minor
if (left.getMinor() > right.getMinor()) return true;
if (left.getMinor() < right.getMinor()) return false;
/... | [
"public",
"static",
"boolean",
"isNewerThan",
"(",
"final",
"Version",
"left",
",",
"final",
"Version",
"right",
")",
"{",
"// major",
"if",
"(",
"left",
".",
"getMajor",
"(",
")",
">",
"right",
".",
"getMajor",
"(",
")",
")",
"return",
"true",
";",
"i... | check left value against right value
@param left
@param right
@return returns if right is newer than left | [
"check",
"left",
"value",
"against",
"right",
"value"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/lucee/loader/util/Util.java#L463-L504 |
30,773 | lucee/Lucee | core/src/main/java/lucee/runtime/crypt/Cryptor.java | Cryptor.encrypt | public static byte[] encrypt(byte[] input, String key, String algorithm, byte[] ivOrSalt, int iterations) throws PageException {
return crypt(input, key, algorithm, ivOrSalt, iterations, false);
} | java | public static byte[] encrypt(byte[] input, String key, String algorithm, byte[] ivOrSalt, int iterations) throws PageException {
return crypt(input, key, algorithm, ivOrSalt, iterations, false);
} | [
"public",
"static",
"byte",
"[",
"]",
"encrypt",
"(",
"byte",
"[",
"]",
"input",
",",
"String",
"key",
",",
"String",
"algorithm",
",",
"byte",
"[",
"]",
"ivOrSalt",
",",
"int",
"iterations",
")",
"throws",
"PageException",
"{",
"return",
"crypt",
"(",
... | an encrypt method that takes a byte-array for input and returns an encrypted byte-array | [
"an",
"encrypt",
"method",
"that",
"takes",
"a",
"byte",
"-",
"array",
"for",
"input",
"and",
"returns",
"an",
"encrypted",
"byte",
"-",
"array"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/Cryptor.java#L149-L151 |
30,774 | lucee/Lucee | core/src/main/java/lucee/runtime/crypt/Cryptor.java | Cryptor.encrypt | public static String encrypt(String input, String key, String algorithm, byte[] ivOrSalt, int iterations, String encoding, String charset) throws PageException {
try {
if (charset == null) charset = DEFAULT_CHARSET;
if (encoding == null) encoding = DEFAULT_ENCODING;
byte[] baInput = input.getBytes(ch... | java | public static String encrypt(String input, String key, String algorithm, byte[] ivOrSalt, int iterations, String encoding, String charset) throws PageException {
try {
if (charset == null) charset = DEFAULT_CHARSET;
if (encoding == null) encoding = DEFAULT_ENCODING;
byte[] baInput = input.getBytes(ch... | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"input",
",",
"String",
"key",
",",
"String",
"algorithm",
",",
"byte",
"[",
"]",
"ivOrSalt",
",",
"int",
"iterations",
",",
"String",
"encoding",
",",
"String",
"charset",
")",
"throws",
"PageException... | an encrypt method that takes a clear-text String for input and returns an encrypted, encoded,
String | [
"an",
"encrypt",
"method",
"that",
"takes",
"a",
"clear",
"-",
"text",
"String",
"for",
"input",
"and",
"returns",
"an",
"encrypted",
"encoded",
"String"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/Cryptor.java#L157-L173 |
30,775 | lucee/Lucee | core/src/main/java/lucee/runtime/crypt/Cryptor.java | Cryptor.decrypt | public static byte[] decrypt(byte[] input, String key, String algorithm, byte[] ivOrSalt, int iterations) throws PageException {
return crypt(input, key, algorithm, ivOrSalt, iterations, true);
} | java | public static byte[] decrypt(byte[] input, String key, String algorithm, byte[] ivOrSalt, int iterations) throws PageException {
return crypt(input, key, algorithm, ivOrSalt, iterations, true);
} | [
"public",
"static",
"byte",
"[",
"]",
"decrypt",
"(",
"byte",
"[",
"]",
"input",
",",
"String",
"key",
",",
"String",
"algorithm",
",",
"byte",
"[",
"]",
"ivOrSalt",
",",
"int",
"iterations",
")",
"throws",
"PageException",
"{",
"return",
"crypt",
"(",
... | a decrypt method that takes an encrypted byte-array for input and returns an unencrypted
byte-array | [
"a",
"decrypt",
"method",
"that",
"takes",
"an",
"encrypted",
"byte",
"-",
"array",
"for",
"input",
"and",
"returns",
"an",
"unencrypted",
"byte",
"-",
"array"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/Cryptor.java#L179-L181 |
30,776 | lucee/Lucee | core/src/main/java/lucee/runtime/crypt/Cryptor.java | Cryptor.decrypt | public static String decrypt(String input, String key, String algorithm, byte[] ivOrSalt, int iterations, String encoding, String charset) throws PageException {
try {
if (charset == null) charset = DEFAULT_CHARSET;
if (encoding == null) encoding = DEFAULT_ENCODING;
byte[] baInput = Coder.decode(enco... | java | public static String decrypt(String input, String key, String algorithm, byte[] ivOrSalt, int iterations, String encoding, String charset) throws PageException {
try {
if (charset == null) charset = DEFAULT_CHARSET;
if (encoding == null) encoding = DEFAULT_ENCODING;
byte[] baInput = Coder.decode(enco... | [
"public",
"static",
"String",
"decrypt",
"(",
"String",
"input",
",",
"String",
"key",
",",
"String",
"algorithm",
",",
"byte",
"[",
"]",
"ivOrSalt",
",",
"int",
"iterations",
",",
"String",
"encoding",
",",
"String",
"charset",
")",
"throws",
"PageException... | a decrypt method that takes an encrypted, encoded, String for input and returns a clear-text
String | [
"a",
"decrypt",
"method",
"that",
"takes",
"an",
"encrypted",
"encoded",
"String",
"for",
"input",
"and",
"returns",
"a",
"clear",
"-",
"text",
"String"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/Cryptor.java#L187-L203 |
30,777 | lucee/Lucee | core/src/main/java/lucee/commons/io/res/type/datasource/DatasourceResourceProvider.java | DatasourceResourceProvider.release | void release(DatasourceConnection dc) {
if (dc != null) {
try {
dc.getConnection().commit();
dc.getConnection().setAutoCommit(true);
dc.getConnection().setTransactionIsolation(Connection.TRANSACTION_NONE);
}
catch (SQLException e) {}
getManager().releaseConnection(ThreadLocalPageContext.get... | java | void release(DatasourceConnection dc) {
if (dc != null) {
try {
dc.getConnection().commit();
dc.getConnection().setAutoCommit(true);
dc.getConnection().setTransactionIsolation(Connection.TRANSACTION_NONE);
}
catch (SQLException e) {}
getManager().releaseConnection(ThreadLocalPageContext.get... | [
"void",
"release",
"(",
"DatasourceConnection",
"dc",
")",
"{",
"if",
"(",
"dc",
"!=",
"null",
")",
"{",
"try",
"{",
"dc",
".",
"getConnection",
"(",
")",
".",
"commit",
"(",
")",
";",
"dc",
".",
"getConnection",
"(",
")",
".",
"setAutoCommit",
"(",
... | release datasource connection
@param dc
@param autoCommit | [
"release",
"datasource",
"connection"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/datasource/DatasourceResourceProvider.java#L582-L594 |
30,778 | lucee/Lucee | core/src/main/java/lucee/runtime/rest/RestUtil.java | RestUtil.matchPath | public static int matchPath(Struct variables, Path[] restPath, String[] callerPath) {
if (restPath.length > callerPath.length) return -1;
int index = 0;
for (; index < restPath.length; index++) {
if (!restPath[index].match(variables, callerPath[index])) return -1;
}
return index - 1;
} | java | public static int matchPath(Struct variables, Path[] restPath, String[] callerPath) {
if (restPath.length > callerPath.length) return -1;
int index = 0;
for (; index < restPath.length; index++) {
if (!restPath[index].match(variables, callerPath[index])) return -1;
}
return index - 1;
} | [
"public",
"static",
"int",
"matchPath",
"(",
"Struct",
"variables",
",",
"Path",
"[",
"]",
"restPath",
",",
"String",
"[",
"]",
"callerPath",
")",
"{",
"if",
"(",
"restPath",
".",
"length",
">",
"callerPath",
".",
"length",
")",
"return",
"-",
"1",
";"... | check if caller path match the cfc path
@param variables
@param restPath
@param callerPath
@return match until which index of the given cfc path, returns -1 if there is no match | [
"check",
"if",
"caller",
"path",
"match",
"the",
"cfc",
"path"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/rest/RestUtil.java#L46-L54 |
30,779 | lucee/Lucee | core/src/main/java/lucee/runtime/gateway/GatewayEngineImpl.java | GatewayEngineImpl.sendMessage | public String sendMessage(String gatewayId, Struct data) throws PageException, IOException {
Gateway g = getGateway(gatewayId);
if (g.getState() != Gateway.RUNNING) throw new GatewayException("Gateway [" + gatewayId + "] is not running");
return g.sendMessage(data);
} | java | public String sendMessage(String gatewayId, Struct data) throws PageException, IOException {
Gateway g = getGateway(gatewayId);
if (g.getState() != Gateway.RUNNING) throw new GatewayException("Gateway [" + gatewayId + "] is not running");
return g.sendMessage(data);
} | [
"public",
"String",
"sendMessage",
"(",
"String",
"gatewayId",
",",
"Struct",
"data",
")",
"throws",
"PageException",
",",
"IOException",
"{",
"Gateway",
"g",
"=",
"getGateway",
"(",
"gatewayId",
")",
";",
"if",
"(",
"g",
".",
"getState",
"(",
")",
"!=",
... | send the message to the gateway
@param gatewayId
@param data
@return
@throws PageException | [
"send",
"the",
"message",
"to",
"the",
"gateway"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/gateway/GatewayEngineImpl.java#L162-L166 |
30,780 | lucee/Lucee | core/src/main/java/lucee/runtime/gateway/GatewayEngineImpl.java | GatewayEngineImpl.stopAll | public void stopAll() {
Iterator<GatewayEntry> it = getEntries().values().iterator();
Gateway g;
while (it.hasNext()) {
g = it.next().getGateway();
if (g != null) stop(g);
}
} | java | public void stopAll() {
Iterator<GatewayEntry> it = getEntries().values().iterator();
Gateway g;
while (it.hasNext()) {
g = it.next().getGateway();
if (g != null) stop(g);
}
} | [
"public",
"void",
"stopAll",
"(",
")",
"{",
"Iterator",
"<",
"GatewayEntry",
">",
"it",
"=",
"getEntries",
"(",
")",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"Gateway",
"g",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
... | stop all entries | [
"stop",
"all",
"entries"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/gateway/GatewayEngineImpl.java#L199-L206 |
30,781 | lucee/Lucee | core/src/main/java/lucee/commons/io/compress/CompressUtil.java | CompressUtil.compressGZip | private static void compressGZip(Resource source, Resource target) throws IOException {
if (source.isDirectory()) {
throw new IOException("you can only create a GZIP File from a single source file, use TGZ (TAR-GZIP) to first TAR multiple files");
}
InputStream is = null;
OutputStream os = null;
try {
is... | java | private static void compressGZip(Resource source, Resource target) throws IOException {
if (source.isDirectory()) {
throw new IOException("you can only create a GZIP File from a single source file, use TGZ (TAR-GZIP) to first TAR multiple files");
}
InputStream is = null;
OutputStream os = null;
try {
is... | [
"private",
"static",
"void",
"compressGZip",
"(",
"Resource",
"source",
",",
"Resource",
"target",
")",
"throws",
"IOException",
"{",
"if",
"(",
"source",
".",
"isDirectory",
"(",
")",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"you can only create a GZIP F... | compress a source file to a gzip file
@param source
@param target
@throws IOException
@throws IOException | [
"compress",
"a",
"source",
"file",
"to",
"a",
"gzip",
"file"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/compress/CompressUtil.java#L412-L428 |
30,782 | lucee/Lucee | core/src/main/java/lucee/commons/io/compress/CompressUtil.java | CompressUtil._compressBZip2 | private static void _compressBZip2(InputStream source, OutputStream target) throws IOException {
InputStream is = IOUtil.toBufferedInputStream(source);
OutputStream os = new BZip2CompressorOutputStream(IOUtil.toBufferedOutputStream(target));
IOUtil.copy(is, os, true, true);
} | java | private static void _compressBZip2(InputStream source, OutputStream target) throws IOException {
InputStream is = IOUtil.toBufferedInputStream(source);
OutputStream os = new BZip2CompressorOutputStream(IOUtil.toBufferedOutputStream(target));
IOUtil.copy(is, os, true, true);
} | [
"private",
"static",
"void",
"_compressBZip2",
"(",
"InputStream",
"source",
",",
"OutputStream",
"target",
")",
"throws",
"IOException",
"{",
"InputStream",
"is",
"=",
"IOUtil",
".",
"toBufferedInputStream",
"(",
"source",
")",
";",
"OutputStream",
"os",
"=",
"... | compress a source file to a bzip2 file
@param source
@param target
@throws IOException | [
"compress",
"a",
"source",
"file",
"to",
"a",
"bzip2",
"file"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/compress/CompressUtil.java#L468-L473 |
30,783 | lucee/Lucee | core/src/main/java/lucee/runtime/reflection/storage/WeakFieldStorage.java | WeakFieldStorage.getFields | public Field[] getFields(Class clazz, String fieldname) {
Struct fieldMap;
Object o;
synchronized (map) {
o = map.get(clazz);
if (o == null) {
fieldMap = store(clazz);
}
else fieldMap = (Struct) o;
}
o = fieldMap.get(fieldname, null);
if (o == null) return null;
return (Field[]) o;
} | java | public Field[] getFields(Class clazz, String fieldname) {
Struct fieldMap;
Object o;
synchronized (map) {
o = map.get(clazz);
if (o == null) {
fieldMap = store(clazz);
}
else fieldMap = (Struct) o;
}
o = fieldMap.get(fieldname, null);
if (o == null) return null;
return (Field[]) o;
} | [
"public",
"Field",
"[",
"]",
"getFields",
"(",
"Class",
"clazz",
",",
"String",
"fieldname",
")",
"{",
"Struct",
"fieldMap",
";",
"Object",
"o",
";",
"synchronized",
"(",
"map",
")",
"{",
"o",
"=",
"map",
".",
"get",
"(",
"clazz",
")",
";",
"if",
"... | returns all fields matching given criteria or null if field does exist
@param clazz clazz to get field from
@param fieldname Name of the Field to get
@return matching Fields as Array | [
"returns",
"all",
"fields",
"matching",
"given",
"criteria",
"or",
"null",
"if",
"field",
"does",
"exist"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/WeakFieldStorage.java#L40-L54 |
30,784 | lucee/Lucee | core/src/main/java/lucee/runtime/MappingImpl.java | MappingImpl.cloneReadOnly | public MappingImpl cloneReadOnly(ConfigImpl config) {
return new MappingImpl(config, virtual, strPhysical, strArchive, inspect, physicalFirst, hidden, true, topLevel, appMapping, ignoreVirtual, appListener, listenerMode,
listenerType);
} | java | public MappingImpl cloneReadOnly(ConfigImpl config) {
return new MappingImpl(config, virtual, strPhysical, strArchive, inspect, physicalFirst, hidden, true, topLevel, appMapping, ignoreVirtual, appListener, listenerMode,
listenerType);
} | [
"public",
"MappingImpl",
"cloneReadOnly",
"(",
"ConfigImpl",
"config",
")",
"{",
"return",
"new",
"MappingImpl",
"(",
"config",
",",
"virtual",
",",
"strPhysical",
",",
"strArchive",
",",
"inspect",
",",
"physicalFirst",
",",
"hidden",
",",
"true",
",",
"topLe... | clones a mapping and make it readOnly
@param config
@return cloned mapping
@throws IOException | [
"clones",
"a",
"mapping",
"and",
"make",
"it",
"readOnly"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/MappingImpl.java#L318-L321 |
30,785 | lucee/Lucee | core/src/main/java/lucee/intergral/fusiondebug/server/util/FDCaster.java | FDCaster.serialize | public static String serialize(Object object) {
if (object == null) return "[null]";
try {
return new ScriptConverter().serialize(object);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return object.toString();
}
} | java | public static String serialize(Object object) {
if (object == null) return "[null]";
try {
return new ScriptConverter().serialize(object);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return object.toString();
}
} | [
"public",
"static",
"String",
"serialize",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"return",
"\"[null]\"",
";",
"try",
"{",
"return",
"new",
"ScriptConverter",
"(",
")",
".",
"serialize",
"(",
"object",
")",
";",
"}",
... | translate a object to its string representation
@param object
@return | [
"translate",
"a",
"object",
"to",
"its",
"string",
"representation"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/intergral/fusiondebug/server/util/FDCaster.java#L59-L68 |
30,786 | lucee/Lucee | core/src/main/java/lucee/runtime/type/util/MemberUtil.java | MemberUtil.callWithNamedValues | public static Object callWithNamedValues(PageContext pc, Object coll, Collection.Key methodName, Struct args, short type, String strType) throws PageException {
Map<Key, FunctionLibFunction> members = getMembers(pc, type);
FunctionLibFunction member = members.get(methodName);
if (member != null) {
List<Functio... | java | public static Object callWithNamedValues(PageContext pc, Object coll, Collection.Key methodName, Struct args, short type, String strType) throws PageException {
Map<Key, FunctionLibFunction> members = getMembers(pc, type);
FunctionLibFunction member = members.get(methodName);
if (member != null) {
List<Functio... | [
"public",
"static",
"Object",
"callWithNamedValues",
"(",
"PageContext",
"pc",
",",
"Object",
"coll",
",",
"Collection",
".",
"Key",
"methodName",
",",
"Struct",
"args",
",",
"short",
"type",
",",
"String",
"strType",
")",
"throws",
"PageException",
"{",
"Map"... | used in extension image | [
"used",
"in",
"extension",
"image"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/MemberUtil.java#L169-L219 |
30,787 | lucee/Lucee | core/src/main/java/lucee/commons/date/TimeZoneUtil.java | TimeZoneUtil.toTimeZone | public static TimeZone toTimeZone(String strTimezone, TimeZone defaultValue) {
if (strTimezone == null) return defaultValue;
String strTimezoneTrimmed = StringUtil.replace(strTimezone.trim().toLowerCase(), " ", "", false);
TimeZone tz = getTimeZoneFromIDS(strTimezoneTrimmed);
if (tz != null) return tz;
// parse ... | java | public static TimeZone toTimeZone(String strTimezone, TimeZone defaultValue) {
if (strTimezone == null) return defaultValue;
String strTimezoneTrimmed = StringUtil.replace(strTimezone.trim().toLowerCase(), " ", "", false);
TimeZone tz = getTimeZoneFromIDS(strTimezoneTrimmed);
if (tz != null) return tz;
// parse ... | [
"public",
"static",
"TimeZone",
"toTimeZone",
"(",
"String",
"strTimezone",
",",
"TimeZone",
"defaultValue",
")",
"{",
"if",
"(",
"strTimezone",
"==",
"null",
")",
"return",
"defaultValue",
";",
"String",
"strTimezoneTrimmed",
"=",
"StringUtil",
".",
"replace",
... | translate timezone string format to a timezone
@param strTimezoneTrimmed
@return | [
"translate",
"timezone",
"string",
"format",
"to",
"a",
"timezone"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/TimeZoneUtil.java#L179-L221 |
30,788 | lucee/Lucee | core/src/main/java/lucee/transformer/interpreter/InterpreterContext.java | InterpreterContext.getValueAsString | public String getValueAsString(Expression expr) throws PageException {
expr.writeOut(this, Expression.MODE_REF);
return Caster.toString(stack.pop());
} | java | public String getValueAsString(Expression expr) throws PageException {
expr.writeOut(this, Expression.MODE_REF);
return Caster.toString(stack.pop());
} | [
"public",
"String",
"getValueAsString",
"(",
"Expression",
"expr",
")",
"throws",
"PageException",
"{",
"expr",
".",
"writeOut",
"(",
"this",
",",
"Expression",
".",
"MODE_REF",
")",
";",
"return",
"Caster",
".",
"toString",
"(",
"stack",
".",
"pop",
"(",
... | removes the element from top of the stack
@return
public String stackPopBottomAsString() { // TODO Auto-generated method stub return null;
} public boolean stackPopBottomAsBoolean() { // TODO Auto-generated method stub return
false; } | [
"removes",
"the",
"element",
"from",
"top",
"of",
"the",
"stack"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/interpreter/InterpreterContext.java#L95-L98 |
30,789 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.repeatString | public static String repeatString(String str, int count) {
if (count <= 0) return "";
char[] chars = str.toCharArray();
char[] rtn = new char[chars.length * count];
int pos = 0;
for (int i = 0; i < count; i++) {
for (int y = 0; y < chars.length; y++)
rtn[pos++] = chars[y];
// rtn.append(str);
}
retur... | java | public static String repeatString(String str, int count) {
if (count <= 0) return "";
char[] chars = str.toCharArray();
char[] rtn = new char[chars.length * count];
int pos = 0;
for (int i = 0; i < count; i++) {
for (int y = 0; y < chars.length; y++)
rtn[pos++] = chars[y];
// rtn.append(str);
}
retur... | [
"public",
"static",
"String",
"repeatString",
"(",
"String",
"str",
",",
"int",
"count",
")",
"{",
"if",
"(",
"count",
"<=",
"0",
")",
"return",
"\"\"",
";",
"char",
"[",
"]",
"chars",
"=",
"str",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]"... | reapeats a string
@param str string to repeat
@param count how many time string will be repeated
@return reapted string | [
"reapeats",
"a",
"string"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L237-L248 |
30,790 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.reqExpEscape | public static String reqExpEscape(String str) {
char[] arr = str.toCharArray();
StringBuilder sb = new StringBuilder(str.length() * 2);
for (int i = 0; i < arr.length; i++) {
sb.append('\\');
sb.append(arr[i]);
}
return sb.toString();
} | java | public static String reqExpEscape(String str) {
char[] arr = str.toCharArray();
StringBuilder sb = new StringBuilder(str.length() * 2);
for (int i = 0; i < arr.length; i++) {
sb.append('\\');
sb.append(arr[i]);
}
return sb.toString();
} | [
"public",
"static",
"String",
"reqExpEscape",
"(",
"String",
"str",
")",
"{",
"char",
"[",
"]",
"arr",
"=",
"str",
".",
"toCharArray",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"str",
".",
"length",
"(",
")",
"*",
"2",
"... | escape all special characters of the regular expresson language
@param str String to escape
@return escaped String | [
"escape",
"all",
"special",
"characters",
"of",
"the",
"regular",
"expresson",
"language"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L278-L288 |
30,791 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.toIdentityVariableName | public static String toIdentityVariableName(String varName) {
char[] chars = varName.toCharArray();
long changes = 0;
StringBuilder rtn = new StringBuilder(chars.length + 2);
rtn.append("CF");
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z... | java | public static String toIdentityVariableName(String varName) {
char[] chars = varName.toCharArray();
long changes = 0;
StringBuilder rtn = new StringBuilder(chars.length + 2);
rtn.append("CF");
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z... | [
"public",
"static",
"String",
"toIdentityVariableName",
"(",
"String",
"varName",
")",
"{",
"char",
"[",
"]",
"chars",
"=",
"varName",
".",
"toCharArray",
"(",
")",
";",
"long",
"changes",
"=",
"0",
";",
"StringBuilder",
"rtn",
"=",
"new",
"StringBuilder",
... | translate a string to a valid identity variable name
@param varName variable name template to translate
@return translated variable name | [
"translate",
"a",
"string",
"to",
"a",
"valid",
"identity",
"variable",
"name"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L296-L313 |
30,792 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.toClassName | public static String toClassName(String str) {
StringBuilder rtn = new StringBuilder();
String[] arr = str.split("[\\\\|//]");
for (int i = 0; i < arr.length; i++) {
if (arr[i].length() == 0) continue;
if (rtn.length() != 0) rtn.append('.');
char[] chars = arr[i].toCharArray();
long changes = 0;
... | java | public static String toClassName(String str) {
StringBuilder rtn = new StringBuilder();
String[] arr = str.split("[\\\\|//]");
for (int i = 0; i < arr.length; i++) {
if (arr[i].length() == 0) continue;
if (rtn.length() != 0) rtn.append('.');
char[] chars = arr[i].toCharArray();
long changes = 0;
... | [
"public",
"static",
"String",
"toClassName",
"(",
"String",
"str",
")",
"{",
"StringBuilder",
"rtn",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"[",
"]",
"arr",
"=",
"str",
".",
"split",
"(",
"\"[\\\\\\\\|//]\"",
")",
";",
"for",
"(",
"int",
... | translate a string to a valid classname string
@param str string to translate
@return translated String | [
"translate",
"a",
"string",
"to",
"a",
"valid",
"classname",
"string"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L321-L341 |
30,793 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.ltrim | public static String ltrim(String str, String defaultValue) {
if (str == null) return defaultValue;
int len = str.length();
int st = 0;
while ((st < len) && (str.charAt(st) <= ' ')) {
st++;
}
return ((st > 0)) ? str.substring(st) : str;
} | java | public static String ltrim(String str, String defaultValue) {
if (str == null) return defaultValue;
int len = str.length();
int st = 0;
while ((st < len) && (str.charAt(st) <= ' ')) {
st++;
}
return ((st > 0)) ? str.substring(st) : str;
} | [
"public",
"static",
"String",
"ltrim",
"(",
"String",
"str",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"defaultValue",
";",
"int",
"len",
"=",
"str",
".",
"length",
"(",
")",
";",
"int",
"st",
"=",
"0",
... | This function returns a string with whitespace stripped from the beginning of str
@param str String to clean
@return cleaned String | [
"This",
"function",
"returns",
"a",
"string",
"with",
"whitespace",
"stripped",
"from",
"the",
"beginning",
"of",
"str"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L483-L492 |
30,794 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.rtrim | public static String rtrim(String str, String defaultValue) {
if (str == null) return defaultValue;
int len = str.length();
while ((0 < len) && (str.charAt(len - 1) <= ' ')) {
len--;
}
return (len < str.length()) ? str.substring(0, len) : str;
} | java | public static String rtrim(String str, String defaultValue) {
if (str == null) return defaultValue;
int len = str.length();
while ((0 < len) && (str.charAt(len - 1) <= ' ')) {
len--;
}
return (len < str.length()) ? str.substring(0, len) : str;
} | [
"public",
"static",
"String",
"rtrim",
"(",
"String",
"str",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"defaultValue",
";",
"int",
"len",
"=",
"str",
".",
"length",
"(",
")",
";",
"while",
"(",
"(",
"0",
... | This function returns a string with whitespace stripped from the end of str
@param str String to clean
@return cleaned String | [
"This",
"function",
"returns",
"a",
"string",
"with",
"whitespace",
"stripped",
"from",
"the",
"end",
"of",
"str"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L500-L508 |
30,795 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.trim | public static String trim(String str, String defaultValue) {
if (str == null) return defaultValue;
return str.trim();
} | java | public static String trim(String str, String defaultValue) {
if (str == null) return defaultValue;
return str.trim();
} | [
"public",
"static",
"String",
"trim",
"(",
"String",
"str",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"defaultValue",
";",
"return",
"str",
".",
"trim",
"(",
")",
";",
"}"
] | trim given value, return defaultvalue when input is null
@param str
@param defaultValue
@return trimmed string or defaultValue | [
"trim",
"given",
"value",
"return",
"defaultvalue",
"when",
"input",
"is",
"null"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L517-L520 |
30,796 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.trim | public static String trim(String str, boolean removeBOM, boolean removeSpecialWhiteSpace, String defaultValue) {
if (str == null) return defaultValue;
if (str.isEmpty()) return str;
// remove leading BOM Marks
if (removeBOM) {
// UTF-16, big-endian
if (str.charAt(0) == '\uFEFF') str = str.substring(1);
... | java | public static String trim(String str, boolean removeBOM, boolean removeSpecialWhiteSpace, String defaultValue) {
if (str == null) return defaultValue;
if (str.isEmpty()) return str;
// remove leading BOM Marks
if (removeBOM) {
// UTF-16, big-endian
if (str.charAt(0) == '\uFEFF') str = str.substring(1);
... | [
"public",
"static",
"String",
"trim",
"(",
"String",
"str",
",",
"boolean",
"removeBOM",
",",
"boolean",
"removeSpecialWhiteSpace",
",",
"String",
"defaultValue",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"defaultValue",
";",
"if",
"(",
"str",... | trim given value, return defaultvalue when input is null this function no only removes the
"classic" whitespaces, it also removes Byte order masks forgotten to remove when reading a UTF
file.
@param str
@param removeBOM if set to true, Byte Order Mask that got forgotten get removed as well
@param removeSpecialWhiteSpa... | [
"trim",
"given",
"value",
"return",
"defaultvalue",
"when",
"input",
"is",
"null",
"this",
"function",
"no",
"only",
"removes",
"the",
"classic",
"whitespaces",
"it",
"also",
"removes",
"Byte",
"order",
"masks",
"forgotten",
"to",
"remove",
"when",
"reading",
... | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L553-L587 |
30,797 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.hasLineFeed | public static boolean hasLineFeed(String str) {
int len = str.length();
char c;
for (int i = 0; i < len; i++) {
c = str.charAt(i);
if (c == '\n' || c == '\r') return true;
}
return false;
} | java | public static boolean hasLineFeed(String str) {
int len = str.length();
char c;
for (int i = 0; i < len; i++) {
c = str.charAt(i);
if (c == '\n' || c == '\r') return true;
}
return false;
} | [
"public",
"static",
"boolean",
"hasLineFeed",
"(",
"String",
"str",
")",
"{",
"int",
"len",
"=",
"str",
".",
"length",
"(",
")",
";",
"char",
"c",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"c",
"="... | return if in a string are line feeds or not
@param str string to check
@return translated string | [
"return",
"if",
"in",
"a",
"string",
"are",
"line",
"feeds",
"or",
"not"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L595-L603 |
30,798 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.suppressWhiteSpace | public static String suppressWhiteSpace(String str) {
int len = str.length();
StringBuilder sb = new StringBuilder(len);
// boolean wasWS=false;
char c;
char buffer = 0;
for (int i = 0; i < len; i++) {
c = str.charAt(i);
if (c == '\n' || c == '\r') buffer = '\n';
else if (isWhiteSpace(c)) {
if (... | java | public static String suppressWhiteSpace(String str) {
int len = str.length();
StringBuilder sb = new StringBuilder(len);
// boolean wasWS=false;
char c;
char buffer = 0;
for (int i = 0; i < len; i++) {
c = str.charAt(i);
if (c == '\n' || c == '\r') buffer = '\n';
else if (isWhiteSpace(c)) {
if (... | [
"public",
"static",
"String",
"suppressWhiteSpace",
"(",
"String",
"str",
")",
"{",
"int",
"len",
"=",
"str",
".",
"length",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"len",
")",
";",
"// boolean wasWS=false;",
"char",
"c",
";... | remove all white spaces followed by whitespaces
@param str string to translate
@return translated string | [
"remove",
"all",
"white",
"spaces",
"followed",
"by",
"whitespaces"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L611-L636 |
30,799 | lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.replace | public static String replace(String input, String find, String repl, boolean firstOnly, boolean ignoreCase) {
int findLen = find.length();
if (findLen == 0) return input;
// String scan = input;
/*
* if ( ignoreCase ) { scan = scan.toLowerCase(); find = find.toLowerCase(); } else
*/ if (!ignoreCase && findL... | java | public static String replace(String input, String find, String repl, boolean firstOnly, boolean ignoreCase) {
int findLen = find.length();
if (findLen == 0) return input;
// String scan = input;
/*
* if ( ignoreCase ) { scan = scan.toLowerCase(); find = find.toLowerCase(); } else
*/ if (!ignoreCase && findL... | [
"public",
"static",
"String",
"replace",
"(",
"String",
"input",
",",
"String",
"find",
",",
"String",
"repl",
",",
"boolean",
"firstOnly",
",",
"boolean",
"ignoreCase",
")",
"{",
"int",
"findLen",
"=",
"find",
".",
"length",
"(",
")",
";",
"if",
"(",
... | performs a replace operation on a string
@param input - the string input to work on
@param find - the substring to find
@param repl - the substring to replace the matches with
@param firstOnly - if true then only the first occurrence of {@code find} will be replaced
@param ignoreCase - if true then matches will not be... | [
"performs",
"a",
"replace",
"operation",
"on",
"a",
"string"
] | 29b153fc4e126e5edb97da937f2ee2e231b87593 | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L690-L738 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.