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
partition
stringclasses
1 value
casmi/casmi
src/main/java/casmi/matrix/Matrix2D.java
Matrix2D.invert
public boolean invert() { double determinant = determinant(); if (Math.abs(determinant) <= Double.MIN_VALUE) { return false; } double t00 = m00; double t01 = m01; double t02 = m02; double t10 = m10; double t11 = m11; double t12 = m12; ...
java
public boolean invert() { double determinant = determinant(); if (Math.abs(determinant) <= Double.MIN_VALUE) { return false; } double t00 = m00; double t01 = m01; double t02 = m02; double t10 = m10; double t11 = m11; double t12 = m12; ...
[ "public", "boolean", "invert", "(", ")", "{", "double", "determinant", "=", "determinant", "(", ")", ";", "if", "(", "Math", ".", "abs", "(", "determinant", ")", "<=", "Double", ".", "MIN_VALUE", ")", "{", "return", "false", ";", "}", "double", "t00", ...
Invert this matrix. Implementation stolen from OpenJDK. @return true if successful
[ "Invert", "this", "matrix", ".", "Implementation", "stolen", "from", "OpenJDK", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/matrix/Matrix2D.java#L313-L334
train
RestDocArchive/restdoc-api
src/main/java/org/restdoc/api/util/RestDocObject.java
RestDocObject.setAdditionalField
@JsonAnySetter public void setAdditionalField(final String key, final Object value) { this.additionalFields.put(key, value); }
java
@JsonAnySetter public void setAdditionalField(final String key, final Object value) { this.additionalFields.put(key, value); }
[ "@", "JsonAnySetter", "public", "void", "setAdditionalField", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "this", ".", "additionalFields", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Add additional field @param key the field name @param value the field value
[ "Add", "additional", "field" ]
4bda600d0303229518abf13dbb6ca6a84b4de415
https://github.com/RestDocArchive/restdoc-api/blob/4bda600d0303229518abf13dbb6ca6a84b4de415/src/main/java/org/restdoc/api/util/RestDocObject.java#L47-L50
train
tvesalainen/lpg
src/main/java/org/vesalainen/parser/GenClassFactory.java
GenClassFactory.getGenInstance
public static Object getGenInstance(Class<?> cls, Object... args) throws ParserException { Class<?> parserClass = getGenClass(cls); try { if (args.length == 0) { return parserClass.newInstance(); } else { ...
java
public static Object getGenInstance(Class<?> cls, Object... args) throws ParserException { Class<?> parserClass = getGenClass(cls); try { if (args.length == 0) { return parserClass.newInstance(); } else { ...
[ "public", "static", "Object", "getGenInstance", "(", "Class", "<", "?", ">", "cls", ",", "Object", "...", "args", ")", "throws", "ParserException", "{", "Class", "<", "?", ">", "parserClass", "=", "getGenClass", "(", "cls", ")", ";", "try", "{", "if", ...
Creates generated class instance either by using ClassLoader or by compiling it dynamically @param cls Annotated class acting also as superclass for created parser @param args @return @throws ParserException
[ "Creates", "generated", "class", "instance", "either", "by", "using", "ClassLoader", "or", "by", "compiling", "it", "dynamically" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/GenClassFactory.java#L44-L84
train
tvesalainen/lpg
src/main/java/org/vesalainen/parser/GenClassFactory.java
GenClassFactory.getGenClass
public static Class<?> getGenClass(Class<?> cls) throws ParserException { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { throw new IllegalArgumentException("@GenClassname not set in "+cls); } try { ...
java
public static Class<?> getGenClass(Class<?> cls) throws ParserException { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { throw new IllegalArgumentException("@GenClassname not set in "+cls); } try { ...
[ "public", "static", "Class", "<", "?", ">", "getGenClass", "(", "Class", "<", "?", ">", "cls", ")", "throws", "ParserException", "{", "GenClassname", "genClassname", "=", "cls", ".", "getAnnotation", "(", "GenClassname", ".", "class", ")", ";", "if", "(", ...
Creates generated class either by using ClassLoader @param cls Annotated class acting also as superclass for created parser @return @throws ParserException When implementation class is not compiled
[ "Creates", "generated", "class", "either", "by", "using", "ClassLoader" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/GenClassFactory.java#L91-L119
train
tvesalainen/lpg
src/main/java/org/vesalainen/parser/GenClassFactory.java
GenClassFactory.createDynamicInstance
public static Object createDynamicInstance(Class<?> cls) throws IOException { GenClassCompiler pc = GenClassCompiler.compile(El.getTypeElement(cls.getCanonicalName()), null); return pc.loadDynamic(); }
java
public static Object createDynamicInstance(Class<?> cls) throws IOException { GenClassCompiler pc = GenClassCompiler.compile(El.getTypeElement(cls.getCanonicalName()), null); return pc.loadDynamic(); }
[ "public", "static", "Object", "createDynamicInstance", "(", "Class", "<", "?", ">", "cls", ")", "throws", "IOException", "{", "GenClassCompiler", "pc", "=", "GenClassCompiler", ".", "compile", "(", "El", ".", "getTypeElement", "(", "cls", ".", "getCanonicalName"...
Creates instance of implementation class and loads it dynamic. This method is used in testing. @param cls @return @throws IOException
[ "Creates", "instance", "of", "implementation", "class", "and", "loads", "it", "dynamic", ".", "This", "method", "is", "used", "in", "testing", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/GenClassFactory.java#L127-L131
train
tvesalainen/lpg
src/main/java/org/vesalainen/parser/GenClassFactory.java
GenClassFactory.loadGenClass
public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException { Class<?> parserClass = map.get(cls); if (parserClass == null) { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { ...
java
public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException { Class<?> parserClass = map.get(cls); if (parserClass == null) { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { ...
[ "public", "static", "Class", "<", "?", ">", "loadGenClass", "(", "Class", "<", "?", ">", "cls", ")", "throws", "ClassNotFoundException", "{", "Class", "<", "?", ">", "parserClass", "=", "map", ".", "get", "(", "cls", ")", ";", "if", "(", "parserClass",...
Creates generated class by using ClassLoader. Return null if unable to load class @param cls Annotated class acting also as superclass for created parser @return @throws ClassNotFoundException
[ "Creates", "generated", "class", "by", "using", "ClassLoader", ".", "Return", "null", "if", "unable", "to", "load", "class" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/GenClassFactory.java#L193-L207
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getObtainRequestPath
private String getObtainRequestPath(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly, String resumptionToken) { String path = obtainPath; if (resumptionToken != null) { path += "?" + resumptionTokenParam + "=" + resumptionToken; return...
java
private String getObtainRequestPath(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly, String resumptionToken) { String path = obtainPath; if (resumptionToken != null) { path += "?" + resumptionTokenParam + "=" + resumptionToken; return...
[ "private", "String", "getObtainRequestPath", "(", "String", "requestID", ",", "Boolean", "byResourceID", ",", "Boolean", "byDocID", ",", "Boolean", "idsOnly", ",", "String", "resumptionToken", ")", "{", "String", "path", "=", "obtainPath", ";", "if", "(", "resum...
Obtain the path used for an obtain request @param requestID the "request_ID" parameter for the request @param byResourceID the "by_resource_ID" parameter for the request @param byDocID the "by_doc_ID" parameter for the request @param idsOnly the "ids_only" parameter for the request @param resumptionToken the "resumpti...
[ "Obtain", "the", "path", "used", "for", "an", "obtain", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L118-L166
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getHarvestRequestPath
private String getHarvestRequestPath(String requestID, Boolean byResourceID, Boolean byDocID) { String path = harvestPath; if (requestID != null) { path += "?" + requestIDParam + "=" + requestID; } else { // error return nu...
java
private String getHarvestRequestPath(String requestID, Boolean byResourceID, Boolean byDocID) { String path = harvestPath; if (requestID != null) { path += "?" + requestIDParam + "=" + requestID; } else { // error return nu...
[ "private", "String", "getHarvestRequestPath", "(", "String", "requestID", ",", "Boolean", "byResourceID", ",", "Boolean", "byDocID", ")", "{", "String", "path", "=", "harvestPath", ";", "if", "(", "requestID", "!=", "null", ")", "{", "path", "+=", "\"?\"", "...
Obtain the path used for a harvest request @param requestID the "request_ID" parameter for the request @param byResourceID the "by_resource_ID" parameter for the request @param byDocID the "by_doc_ID" parameter for the request @return the string of the path for a harvest request
[ "Obtain", "the", "path", "used", "for", "a", "harvest", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L176-L209
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getObtainJSONData
private LRResult getObtainJSONData(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly, String resumptionToken) throws LRException { String path = getObtainRequestPath(requestID, byResourceID, byDocID, idsOnly, resumptionToken); JSONObject json = getJSONFromPath...
java
private LRResult getObtainJSONData(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly, String resumptionToken) throws LRException { String path = getObtainRequestPath(requestID, byResourceID, byDocID, idsOnly, resumptionToken); JSONObject json = getJSONFromPath...
[ "private", "LRResult", "getObtainJSONData", "(", "String", "requestID", ",", "Boolean", "byResourceID", ",", "Boolean", "byDocID", ",", "Boolean", "idsOnly", ",", "String", "resumptionToken", ")", "throws", "LRException", "{", "String", "path", "=", "getObtainReques...
Get a result from an obtain request If the resumption token is not null, it will override the other parameters for ths request @param requestID the "request_id" value to use for this request @param byResourceID the "by_resource_id" value to use for this request @param byDocID the "by_doc_id" value to use for this requ...
[ "Get", "a", "result", "from", "an", "obtain", "request", "If", "the", "resumption", "token", "is", "not", "null", "it", "will", "override", "the", "other", "parameters", "for", "ths", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L247-L254
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getHarvestJSONData
public LRResult getHarvestJSONData(String requestID, Boolean byResourceID, Boolean byDocID) throws LRException { String path = getHarvestRequestPath(requestID, byResourceID, byDocID); JSONObject json = getJSONFromPath(path); return new LRResult(json); }
java
public LRResult getHarvestJSONData(String requestID, Boolean byResourceID, Boolean byDocID) throws LRException { String path = getHarvestRequestPath(requestID, byResourceID, byDocID); JSONObject json = getJSONFromPath(path); return new LRResult(json); }
[ "public", "LRResult", "getHarvestJSONData", "(", "String", "requestID", ",", "Boolean", "byResourceID", ",", "Boolean", "byDocID", ")", "throws", "LRException", "{", "String", "path", "=", "getHarvestRequestPath", "(", "requestID", ",", "byResourceID", ",", "byDocID...
Get a result from a harvest request @param requestID the "request_id" value to use for this request @param byResourceID the "by_resource_id" value to use for this request @param byDocID the "by_doc_id" value to use for this request @return the result from this request
[ "Get", "a", "result", "from", "a", "harvest", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L264-L271
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getExtractRequestPath
private String getExtractRequestPath(String dataServiceName, String viewName, Date from, Date until, Boolean idsOnly, String mainValue, Boolean partial, String mainName) { String path = extractPath; if (viewName != null) { path += "/" + viewName; } else { return null; } if (dataServic...
java
private String getExtractRequestPath(String dataServiceName, String viewName, Date from, Date until, Boolean idsOnly, String mainValue, Boolean partial, String mainName) { String path = extractPath; if (viewName != null) { path += "/" + viewName; } else { return null; } if (dataServic...
[ "private", "String", "getExtractRequestPath", "(", "String", "dataServiceName", ",", "String", "viewName", ",", "Date", "from", ",", "Date", "until", ",", "Boolean", "idsOnly", ",", "String", "mainValue", ",", "Boolean", "partial", ",", "String", "mainName", ")"...
Get an extract request path @param dataServiceName name of the data service to use @param viewName name of the view to use @param from start date from which to extract items @param until end date from which to extract items @param idsOnly true/false to only extract ids @param mainValue value of the main field @param p...
[ "Get", "an", "extract", "request", "path" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L286-L340
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRImporter.java
LRImporter.getJSONFromPath
private JSONObject getJSONFromPath(String path) throws LRException { JSONObject json = null; String jsonTxt = null; try { jsonTxt = LRClient.executeJsonGet(importProtocol + "://" + nodeHost + path); } catch(Exception e) { throw...
java
private JSONObject getJSONFromPath(String path) throws LRException { JSONObject json = null; String jsonTxt = null; try { jsonTxt = LRClient.executeJsonGet(importProtocol + "://" + nodeHost + path); } catch(Exception e) { throw...
[ "private", "JSONObject", "getJSONFromPath", "(", "String", "path", ")", "throws", "LRException", "{", "JSONObject", "json", "=", "null", ";", "String", "jsonTxt", "=", "null", ";", "try", "{", "jsonTxt", "=", "LRClient", ".", "executeJsonGet", "(", "importProt...
Get the data from the specified path as a JSONObject @param path the path to use for this request @return the JSON from the request
[ "Get", "the", "data", "from", "the", "specified", "path", "as", "a", "JSONObject" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L430-L456
train
casmi/casmi
src/main/java/casmi/graphics/font/Font.java
Font.fontStyleToInt
private static int fontStyleToInt(FontStyle style) { switch (style) { case PLAIN: return java.awt.Font.PLAIN; case BOLD: return java.awt.Font.BOLD; case ITALIC: return java.awt.Font.ITALIC; default: return java.awt.Font.PLAIN; ...
java
private static int fontStyleToInt(FontStyle style) { switch (style) { case PLAIN: return java.awt.Font.PLAIN; case BOLD: return java.awt.Font.BOLD; case ITALIC: return java.awt.Font.ITALIC; default: return java.awt.Font.PLAIN; ...
[ "private", "static", "int", "fontStyleToInt", "(", "FontStyle", "style", ")", "{", "switch", "(", "style", ")", "{", "case", "PLAIN", ":", "return", "java", ".", "awt", ".", "Font", ".", "PLAIN", ";", "case", "BOLD", ":", "return", "java", ".", "awt", ...
Return a java.awt.Font style constant from FontStyle. @param style FontStyle value. @return A java.awt.Font style constant.
[ "Return", "a", "java", ".", "awt", ".", "Font", "style", "constant", "from", "FontStyle", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/font/Font.java#L294-L305
train
casmi/casmi
src/main/java/casmi/graphics/font/Font.java
Font.intToFontStyle
private static FontStyle intToFontStyle(int style) { switch (style) { case java.awt.Font.PLAIN: return FontStyle.PLAIN; case java.awt.Font.BOLD: return FontStyle.BOLD; case java.awt.Font.ITALIC: return FontStyle.ITALIC; case java.awt.Font.BOLD ...
java
private static FontStyle intToFontStyle(int style) { switch (style) { case java.awt.Font.PLAIN: return FontStyle.PLAIN; case java.awt.Font.BOLD: return FontStyle.BOLD; case java.awt.Font.ITALIC: return FontStyle.ITALIC; case java.awt.Font.BOLD ...
[ "private", "static", "FontStyle", "intToFontStyle", "(", "int", "style", ")", "{", "switch", "(", "style", ")", "{", "case", "java", ".", "awt", ".", "Font", ".", "PLAIN", ":", "return", "FontStyle", ".", "PLAIN", ";", "case", "java", ".", "awt", ".", ...
Return FontStyle enum value from java.awt.Font style constant. @param style java.awt.Font style constant value. @return FontStyle value.
[ "Return", "FontStyle", "enum", "value", "from", "java", ".", "awt", ".", "Font", "style", "constant", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/font/Font.java#L314-L327
train
casmi/casmi
src/main/java/casmi/graphics/font/Font.java
Font.stringToFontStyle
private static FontStyle stringToFontStyle(String style) { if (style.compareToIgnoreCase("plain") == 0) { return FontStyle.PLAIN; } else if (style.compareToIgnoreCase("bold") == 0) { return FontStyle.BOLD; } else if (style.compareToIgnoreCase("italic") == 0) { ...
java
private static FontStyle stringToFontStyle(String style) { if (style.compareToIgnoreCase("plain") == 0) { return FontStyle.PLAIN; } else if (style.compareToIgnoreCase("bold") == 0) { return FontStyle.BOLD; } else if (style.compareToIgnoreCase("italic") == 0) { ...
[ "private", "static", "FontStyle", "stringToFontStyle", "(", "String", "style", ")", "{", "if", "(", "style", ".", "compareToIgnoreCase", "(", "\"plain\"", ")", "==", "0", ")", "{", "return", "FontStyle", ".", "PLAIN", ";", "}", "else", "if", "(", "style", ...
Return FontStyle enum value from a font style name. @param style A style name like "italic". @return FontStyle enum value.
[ "Return", "FontStyle", "enum", "value", "from", "a", "font", "style", "name", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/font/Font.java#L336-L346
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/rest/EFapsResourceConfig.java
EFapsResourceConfig.onReload
public void onReload(final Container _container) { final Set<Class<?>> classesToRemove = new HashSet<>(); final Set<Class<?>> classesToAdd = new HashSet<>(); for (final Class<?> c : getClasses()) { if (!this.cachedClasses.contains(c)) { classesToAdd.add(c); ...
java
public void onReload(final Container _container) { final Set<Class<?>> classesToRemove = new HashSet<>(); final Set<Class<?>> classesToAdd = new HashSet<>(); for (final Class<?> c : getClasses()) { if (!this.cachedClasses.contains(c)) { classesToAdd.add(c); ...
[ "public", "void", "onReload", "(", "final", "Container", "_container", ")", "{", "final", "Set", "<", "Class", "<", "?", ">", ">", "classesToRemove", "=", "new", "HashSet", "<>", "(", ")", ";", "final", "Set", "<", "Class", "<", "?", ">", ">", "class...
Perform a new search for resource classes and provider classes. @param _container Container
[ "Perform", "a", "new", "search", "for", "resource", "classes", "and", "provider", "classes", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/rest/EFapsResourceConfig.java#L139-L162
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/stmt/selection/Selection.java
Selection.addInstSelect
private void addInstSelect(final Select _select, final AbstractDataElement<?> _element, final Object _attrOrClass, final Type _currentType) throws CacheReloadException { if (StringUtils.isNotEmpty(_element.getPath()) && !this.instSelects.containsKey(_element.getPath())...
java
private void addInstSelect(final Select _select, final AbstractDataElement<?> _element, final Object _attrOrClass, final Type _currentType) throws CacheReloadException { if (StringUtils.isNotEmpty(_element.getPath()) && !this.instSelects.containsKey(_element.getPath())...
[ "private", "void", "addInstSelect", "(", "final", "Select", "_select", ",", "final", "AbstractDataElement", "<", "?", ">", "_element", ",", "final", "Object", "_attrOrClass", ",", "final", "Type", "_currentType", ")", "throws", "CacheReloadException", "{", "if", ...
Adds the inst select. @param _select the select @param _element the element @param _attr the attr @param _currentType the current type @throws CacheReloadException on error
[ "Adds", "the", "inst", "select", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/stmt/selection/Selection.java#L211-L254
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/stmt/selection/Selection.java
Selection.evalMainType
private Type evalMainType(final Collection<Type> _baseTypes) throws EFapsException { final Type ret; if (_baseTypes.size() == 1) { ret = _baseTypes.iterator().next(); } else { final List<List<Type>> typeLists = new ArrayList<>(); for (final Type ty...
java
private Type evalMainType(final Collection<Type> _baseTypes) throws EFapsException { final Type ret; if (_baseTypes.size() == 1) { ret = _baseTypes.iterator().next(); } else { final List<List<Type>> typeLists = new ArrayList<>(); for (final Type ty...
[ "private", "Type", "evalMainType", "(", "final", "Collection", "<", "Type", ">", "_baseTypes", ")", "throws", "EFapsException", "{", "final", "Type", "ret", ";", "if", "(", "_baseTypes", ".", "size", "(", ")", "==", "1", ")", "{", "ret", "=", "_baseTypes...
Gets the main type. @param _baseTypes the base types @return the main type @throws EFapsException on error
[ "Gets", "the", "main", "type", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/stmt/selection/Selection.java#L263-L297
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/stmt/selection/Selection.java
Selection.getAllSelects
public Collection<Select> getAllSelects() { final List<Select> ret = new ArrayList<>(this.selects); ret.addAll(this.instSelects.values()); return Collections.unmodifiableCollection(ret); }
java
public Collection<Select> getAllSelects() { final List<Select> ret = new ArrayList<>(this.selects); ret.addAll(this.instSelects.values()); return Collections.unmodifiableCollection(ret); }
[ "public", "Collection", "<", "Select", ">", "getAllSelects", "(", ")", "{", "final", "List", "<", "Select", ">", "ret", "=", "new", "ArrayList", "<>", "(", "this", ".", "selects", ")", ";", "ret", ".", "addAll", "(", "this", ".", "instSelects", ".", ...
Gets the all data selects. @return the all selects
[ "Gets", "the", "all", "data", "selects", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/stmt/selection/Selection.java#L324-L329
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/user/AbstractUserObject.java
AbstractUserObject.unassignFromUserObjectInDb
protected void unassignFromUserObjectInDb(final Type _unassignType, final JAASSystem _jaasSystem, final AbstractUserObject _object) throws EFapsException { Connection con = null; try { con...
java
protected void unassignFromUserObjectInDb(final Type _unassignType, final JAASSystem _jaasSystem, final AbstractUserObject _object) throws EFapsException { Connection con = null; try { con...
[ "protected", "void", "unassignFromUserObjectInDb", "(", "final", "Type", "_unassignType", ",", "final", "JAASSystem", "_jaasSystem", ",", "final", "AbstractUserObject", "_object", ")", "throws", "EFapsException", "{", "Connection", "con", "=", "null", ";", "try", "{...
Unassign this user object from the given user object for given JAAS system. @param _unassignType type used to unassign (in other words the relationship type) @param _jaasSystem JAAS system for which this user object is unassigned from given object @param _object user object from which this user object is unassigned @t...
[ "Unassign", "this", "user", "object", "from", "the", "given", "user", "object", "for", "given", "JAAS", "system", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/user/AbstractUserObject.java#L280-L324
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/user/AbstractUserObject.java
AbstractUserObject.setStatusInDB
protected void setStatusInDB(final boolean _status) throws EFapsException { Connection con = null; try { con = Context.getConnection(); PreparedStatement stmt = null; final StringBuilder cmd = new StringBuilder(); try { cmd.app...
java
protected void setStatusInDB(final boolean _status) throws EFapsException { Connection con = null; try { con = Context.getConnection(); PreparedStatement stmt = null; final StringBuilder cmd = new StringBuilder(); try { cmd.app...
[ "protected", "void", "setStatusInDB", "(", "final", "boolean", "_status", ")", "throws", "EFapsException", "{", "Connection", "con", "=", "null", ";", "try", "{", "con", "=", "Context", ".", "getConnection", "(", ")", ";", "PreparedStatement", "stmt", "=", "...
Method to set the status of a UserObject in the eFaps Database. @param _status status to set @throws EFapsException on error
[ "Method", "to", "set", "the", "status", "of", "a", "UserObject", "in", "the", "eFaps", "Database", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/user/AbstractUserObject.java#L382-L424
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/ui/AbstractUserInterfaceObject.java
AbstractUserInterfaceObject.readFromDB4Access
private void readFromDB4Access() throws CacheReloadException { Statement stmt = null; try { stmt = Context.getThreadContext().getConnectionResource().createStatement(); final ResultSet resultset = stmt.executeQuery("select " + "T_UIACCESS.U...
java
private void readFromDB4Access() throws CacheReloadException { Statement stmt = null; try { stmt = Context.getThreadContext().getConnectionResource().createStatement(); final ResultSet resultset = stmt.executeQuery("select " + "T_UIACCESS.U...
[ "private", "void", "readFromDB4Access", "(", ")", "throws", "CacheReloadException", "{", "Statement", "stmt", "=", "null", ";", "try", "{", "stmt", "=", "Context", ".", "getThreadContext", "(", ")", ".", "getConnectionResource", "(", ")", ".", "createStatement",...
The instance method reads the access for this user interface object. @throws CacheReloadException on error during reload
[ "The", "instance", "method", "reads", "the", "access", "for", "this", "user", "interface", "object", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/AbstractUserInterfaceObject.java#L147-L180
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/stmt/selection/elements/AbstractElement.java
AbstractElement.getPath
public String getPath() { final StringBuilder path = new StringBuilder(); if (getPrevious() != null) { path.append(getPrevious().getPath()); } return path.toString(); }
java
public String getPath() { final StringBuilder path = new StringBuilder(); if (getPrevious() != null) { path.append(getPrevious().getPath()); } return path.toString(); }
[ "public", "String", "getPath", "(", ")", "{", "final", "StringBuilder", "path", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "getPrevious", "(", ")", "!=", "null", ")", "{", "path", ".", "append", "(", "getPrevious", "(", ")", ".", "getPath",...
Gets the path. @return the path @throws EFapsException the eFaps exception
[ "Gets", "the", "path", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/stmt/selection/elements/AbstractElement.java#L78-L85
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/eql/PrintStmt.java
PrintStmt.getEsjpSelect
private Map<String, IEsjpSelect> getEsjpSelect(final List<Instance> _instances) throws Exception { final Map<String, IEsjpSelect> ret = new HashMap<>(); if (!_instances.isEmpty()) { for (final Entry<String, AbstractSelect> entry : getAlias2Selects().entrySet()) { ...
java
private Map<String, IEsjpSelect> getEsjpSelect(final List<Instance> _instances) throws Exception { final Map<String, IEsjpSelect> ret = new HashMap<>(); if (!_instances.isEmpty()) { for (final Entry<String, AbstractSelect> entry : getAlias2Selects().entrySet()) { ...
[ "private", "Map", "<", "String", ",", "IEsjpSelect", ">", "getEsjpSelect", "(", "final", "List", "<", "Instance", ">", "_instances", ")", "throws", "Exception", "{", "final", "Map", "<", "String", ",", "IEsjpSelect", ">", "ret", "=", "new", "HashMap", "<>"...
Gets the esjp select. @param _instances the _instances @return the esjp select @throws Exception the exception
[ "Gets", "the", "esjp", "select", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/eql/PrintStmt.java#L86-L107
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/eql/PrintStmt.java
PrintStmt.getMultiPrint
private MultiPrintQuery getMultiPrint() throws EFapsException { final MultiPrintQuery ret; if (getInstances().isEmpty()) { ret = new MultiPrintQuery(QueryBldrUtil.getInstances(this)); } else { final List<Instance> instances = new ArrayList<>(); for...
java
private MultiPrintQuery getMultiPrint() throws EFapsException { final MultiPrintQuery ret; if (getInstances().isEmpty()) { ret = new MultiPrintQuery(QueryBldrUtil.getInstances(this)); } else { final List<Instance> instances = new ArrayList<>(); for...
[ "private", "MultiPrintQuery", "getMultiPrint", "(", ")", "throws", "EFapsException", "{", "final", "MultiPrintQuery", "ret", ";", "if", "(", "getInstances", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "ret", "=", "new", "MultiPrintQuery", "(", "QueryBldrUtil...
Gets the multi print. @return the multi print @throws EFapsException on error
[ "Gets", "the", "multi", "print", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/eql/PrintStmt.java#L115-L129
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/Dimension.java
Dimension.addUoM
private void addUoM(final UoM _uom) { this.uoMs.add(_uom); if (_uom.getId() == this.baseUoMId) { this.baseUoM = _uom; } }
java
private void addUoM(final UoM _uom) { this.uoMs.add(_uom); if (_uom.getId() == this.baseUoMId) { this.baseUoM = _uom; } }
[ "private", "void", "addUoM", "(", "final", "UoM", "_uom", ")", "{", "this", ".", "uoMs", ".", "add", "(", "_uom", ")", ";", "if", "(", "_uom", ".", "getId", "(", ")", "==", "this", ".", "baseUoMId", ")", "{", "this", ".", "baseUoM", "=", "_uom", ...
Method to add an UoM to this dimension. @param _uom UoM to add
[ "Method", "to", "add", "an", "UoM", "to", "this", "dimension", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/Dimension.java#L196-L202
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/Dimension.java
Dimension.getUoM
public static UoM getUoM(final Long _uoMId) { final Cache<Long, UoM> cache = InfinispanCache.get().<Long, UoM>getCache(Dimension.IDCACHE4UOM); if (!cache.containsKey(_uoMId)) { try { Dimension.getUoMFromDB(Dimension.SQL_SELECT_UOM4ID, _uoMId); } catch (final C...
java
public static UoM getUoM(final Long _uoMId) { final Cache<Long, UoM> cache = InfinispanCache.get().<Long, UoM>getCache(Dimension.IDCACHE4UOM); if (!cache.containsKey(_uoMId)) { try { Dimension.getUoMFromDB(Dimension.SQL_SELECT_UOM4ID, _uoMId); } catch (final C...
[ "public", "static", "UoM", "getUoM", "(", "final", "Long", "_uoMId", ")", "{", "final", "Cache", "<", "Long", ",", "UoM", ">", "cache", "=", "InfinispanCache", ".", "get", "(", ")", ".", "<", "Long", ",", "UoM", ">", "getCache", "(", "Dimension", "."...
Static Method to get an UoM for an id. @param _uoMId if the UoM is wanted for. @return UoM
[ "Static", "Method", "to", "get", "an", "UoM", "for", "an", "id", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/Dimension.java#L330-L341
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRResult.java
LRResult.getResumptionToken
public String getResumptionToken() { String resumptionToken = null; try { if (data != null && data.has(resumptionTokenParam)) { resumptionToken = data.getString(resumptionTokenParam); } } catch (JSONException e) ...
java
public String getResumptionToken() { String resumptionToken = null; try { if (data != null && data.has(resumptionTokenParam)) { resumptionToken = data.getString(resumptionTokenParam); } } catch (JSONException e) ...
[ "public", "String", "getResumptionToken", "(", ")", "{", "String", "resumptionToken", "=", "null", ";", "try", "{", "if", "(", "data", "!=", "null", "&&", "data", ".", "has", "(", "resumptionTokenParam", ")", ")", "{", "resumptionToken", "=", "data", ".", ...
Returns the resumption token, if it exists @return resumption token or null
[ "Returns", "the", "resumption", "token", "if", "it", "exists" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRResult.java#L70-L87
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRResult.java
LRResult.getResourceData
public List<JSONObject> getResourceData() { List<JSONObject> resources = new ArrayList<JSONObject>(); try { if (data != null && data.has(documentsParam)) { List<JSONObject> results = getDocuments(); for(JSONObject ...
java
public List<JSONObject> getResourceData() { List<JSONObject> resources = new ArrayList<JSONObject>(); try { if (data != null && data.has(documentsParam)) { List<JSONObject> results = getDocuments(); for(JSONObject ...
[ "public", "List", "<", "JSONObject", ">", "getResourceData", "(", ")", "{", "List", "<", "JSONObject", ">", "resources", "=", "new", "ArrayList", "<", "JSONObject", ">", "(", ")", ";", "try", "{", "if", "(", "data", "!=", "null", "&&", "data", ".", "...
Returns resource data from obtain or harvest request @return list of resource data as JSON
[ "Returns", "resource", "data", "from", "obtain", "or", "harvest", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRResult.java#L94-L133
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRResult.java
LRResult.getDocuments
public List<JSONObject> getDocuments() { List<JSONObject> documents = new ArrayList<JSONObject>(); try { if (data != null && data.has(documentsParam)) { JSONArray jsonDocuments = data.getJSONArray(documentsParam); ...
java
public List<JSONObject> getDocuments() { List<JSONObject> documents = new ArrayList<JSONObject>(); try { if (data != null && data.has(documentsParam)) { JSONArray jsonDocuments = data.getJSONArray(documentsParam); ...
[ "public", "List", "<", "JSONObject", ">", "getDocuments", "(", ")", "{", "List", "<", "JSONObject", ">", "documents", "=", "new", "ArrayList", "<", "JSONObject", ">", "(", ")", ";", "try", "{", "if", "(", "data", "!=", "null", "&&", "data", ".", "has...
Returns documents from obtain request @return documents from obtain request
[ "Returns", "documents", "from", "obtain", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRResult.java#L140-L163
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRResult.java
LRResult.getRecords
public List<JSONObject> getRecords() { List<JSONObject> records = new ArrayList<JSONObject>(); try { if (data != null && data.has(getRecordParam)) { JSONObject jsonGetRecord = data.getJSONObject(getRecordParam); if...
java
public List<JSONObject> getRecords() { List<JSONObject> records = new ArrayList<JSONObject>(); try { if (data != null && data.has(getRecordParam)) { JSONObject jsonGetRecord = data.getJSONObject(getRecordParam); if...
[ "public", "List", "<", "JSONObject", ">", "getRecords", "(", ")", "{", "List", "<", "JSONObject", ">", "records", "=", "new", "ArrayList", "<", "JSONObject", ">", "(", ")", ";", "try", "{", "if", "(", "data", "!=", "null", "&&", "data", ".", "has", ...
Returns records from harvest request @return records from harvest request
[ "Returns", "records", "from", "harvest", "request" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRResult.java#L170-L198
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.roundBigDecimal
public BigDecimal roundBigDecimal(final BigDecimal number) { int mscale = getMathScale(); if (mscale >= 0) { return number.setScale(mscale, getMathContext().getRoundingMode()); } else { return number; } }
java
public BigDecimal roundBigDecimal(final BigDecimal number) { int mscale = getMathScale(); if (mscale >= 0) { return number.setScale(mscale, getMathContext().getRoundingMode()); } else { return number; } }
[ "public", "BigDecimal", "roundBigDecimal", "(", "final", "BigDecimal", "number", ")", "{", "int", "mscale", "=", "getMathScale", "(", ")", ";", "if", "(", "mscale", ">=", "0", ")", "{", "return", "number", ".", "setScale", "(", "mscale", ",", "getMathConte...
Ensure a big decimal is rounded by this arithmetic scale and rounding mode. @param number the big decimal to round @return the rounded big decimal
[ "Ensure", "a", "big", "decimal", "is", "rounded", "by", "this", "arithmetic", "scale", "and", "rounding", "mode", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L100-L108
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.isFloatingPointType
protected boolean isFloatingPointType(Object left, Object right) { return left instanceof Float || left instanceof Double || right instanceof Float || right instanceof Double; }
java
protected boolean isFloatingPointType(Object left, Object right) { return left instanceof Float || left instanceof Double || right instanceof Float || right instanceof Double; }
[ "protected", "boolean", "isFloatingPointType", "(", "Object", "left", ",", "Object", "right", ")", "{", "return", "left", "instanceof", "Float", "||", "left", "instanceof", "Double", "||", "right", "instanceof", "Float", "||", "right", "instanceof", "Double", ";...
Test if either left or right are either a Float or Double. @param left one object to test @param right the other @return the result of the test.
[ "Test", "if", "either", "left", "or", "right", "are", "either", "a", "Float", "or", "Double", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L119-L121
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.isNumberable
protected boolean isNumberable(final Object o) { return o instanceof Integer || o instanceof Long || o instanceof Byte || o instanceof Short || o instanceof Character; }
java
protected boolean isNumberable(final Object o) { return o instanceof Integer || o instanceof Long || o instanceof Byte || o instanceof Short || o instanceof Character; }
[ "protected", "boolean", "isNumberable", "(", "final", "Object", "o", ")", "{", "return", "o", "instanceof", "Integer", "||", "o", "instanceof", "Long", "||", "o", "instanceof", "Byte", "||", "o", "instanceof", "Short", "||", "o", "instanceof", "Character", "...
Is Object a whole number. @param o Object to be analyzed. @return true if Integer, Long, Byte, Short or Character.
[ "Is", "Object", "a", "whole", "number", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L160-L162
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.narrowBigDecimal
protected Number narrowBigDecimal(Object lhs, Object rhs, BigDecimal bigd) { if (isNumberable(lhs) || isNumberable(rhs)) { try { long l = bigd.longValueExact(); // coerce to int when possible (int being so often used in method parms) if (l <= Integer.MAX_VALUE && l >= Integer.MIN_VALUE...
java
protected Number narrowBigDecimal(Object lhs, Object rhs, BigDecimal bigd) { if (isNumberable(lhs) || isNumberable(rhs)) { try { long l = bigd.longValueExact(); // coerce to int when possible (int being so often used in method parms) if (l <= Integer.MAX_VALUE && l >= Integer.MIN_VALUE...
[ "protected", "Number", "narrowBigDecimal", "(", "Object", "lhs", ",", "Object", "rhs", ",", "BigDecimal", "bigd", ")", "{", "if", "(", "isNumberable", "(", "lhs", ")", "||", "isNumberable", "(", "rhs", ")", ")", "{", "try", "{", "long", "l", "=", "bigd...
Given a BigDecimal, attempt to narrow it to an Integer or Long if it fits if one of the arguments is a numberable. @param lhs the left hand side operand that lead to the bigd result @param rhs the right hand side operand that lead to the bigd result @param bigd the BigDecimal to narrow @return an Integer or Long if na...
[ "Given", "a", "BigDecimal", "attempt", "to", "narrow", "it", "to", "an", "Integer", "or", "Long", "if", "it", "fits", "if", "one", "of", "the", "arguments", "is", "a", "numberable", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L208-L225
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.narrowArguments
protected boolean narrowArguments(Object[] args) { boolean narrowed = false; for (int a = 0; a < args.length; ++a) { Object arg = args[a]; if (arg instanceof Number) { Object narg = narrow((Number) arg); if (narg != arg) { narrowed = true; } args[a] = narg; ...
java
protected boolean narrowArguments(Object[] args) { boolean narrowed = false; for (int a = 0; a < args.length; ++a) { Object arg = args[a]; if (arg instanceof Number) { Object narg = narrow((Number) arg); if (narg != arg) { narrowed = true; } args[a] = narg; ...
[ "protected", "boolean", "narrowArguments", "(", "Object", "[", "]", "args", ")", "{", "boolean", "narrowed", "=", "false", ";", "for", "(", "int", "a", "=", "0", ";", "a", "<", "args", ".", "length", ";", "++", "a", ")", "{", "Object", "arg", "=", ...
Replace all numbers in an arguments array with the smallest type that will fit. @param args the argument array @return true if some arguments were narrowed and args array is modified, false if no narrowing occured and args array has not been modified
[ "Replace", "all", "numbers", "in", "an", "arguments", "array", "with", "the", "smallest", "type", "that", "will", "fit", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L311-L324
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.divide
public Object divide(Object left, Object right) { if (left == null && right == null) { return 0; } // if either are floating point (double or float) use double if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) { double l = toDouble(left); double r = toDouble(right); ...
java
public Object divide(Object left, Object right) { if (left == null && right == null) { return 0; } // if either are floating point (double or float) use double if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) { double l = toDouble(left); double r = toDouble(right); ...
[ "public", "Object", "divide", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "null", "&&", "right", "==", "null", ")", "{", "return", "0", ";", "}", "// if either are floating point (double or float) use double", "if", "(", ...
Divide the left value by the right. @param left first value @param right second value @return left / right @throws ArithmeticException if right == 0
[ "Divide", "the", "left", "value", "by", "the", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L408-L442
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.multiply
public Object multiply(Object left, Object right) { if (left == null && right == null) { return 0; } // if either are floating point (double or float) use double if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) { double l = toDouble(left); double r = toDouble(right); ...
java
public Object multiply(Object left, Object right) { if (left == null && right == null) { return 0; } // if either are floating point (double or float) use double if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) { double l = toDouble(left); double r = toDouble(right); ...
[ "public", "Object", "multiply", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "null", "&&", "right", "==", "null", ")", "{", "return", "0", ";", "}", "// if either are floating point (double or float) use double", "if", "(",...
Multiply the left value by the right. @param left first value @param right second value @return left * right.
[ "Multiply", "the", "left", "value", "by", "the", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L500-L525
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.matches
public boolean matches(Object left, Object right) { if (left == null && right == null) { // if both are null L == R return true; } if (left == null || right == null) { // we know both aren't null, therefore L != R return false; } final String arg = left.toString(); if (ri...
java
public boolean matches(Object left, Object right) { if (left == null && right == null) { // if both are null L == R return true; } if (left == null || right == null) { // we know both aren't null, therefore L != R return false; } final String arg = left.toString(); if (ri...
[ "public", "boolean", "matches", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "null", "&&", "right", "==", "null", ")", "{", "// if both are null L == R", "return", "true", ";", "}", "if", "(", "left", "==", "null", ...
Test if left regexp matches right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", "regexp", "matches", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L618-L634
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.bitwiseOr
public Object bitwiseOr(Object left, Object right) { long l = toLong(left); long r = toLong(right); return Long.valueOf(l | r); }
java
public Object bitwiseOr(Object left, Object right) { long l = toLong(left); long r = toLong(right); return Long.valueOf(l | r); }
[ "public", "Object", "bitwiseOr", "(", "Object", "left", ",", "Object", "right", ")", "{", "long", "l", "=", "toLong", "(", "left", ")", ";", "long", "r", "=", "toLong", "(", "right", ")", ";", "return", "Long", ".", "valueOf", "(", "l", "|", "r", ...
Performs a bitwise or. @param left the left operand @param right the right operator @return left | right
[ "Performs", "a", "bitwise", "or", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L660-L664
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.bitwiseComplement
public Object bitwiseComplement(Object val) { long l = toLong(val); return Long.valueOf(~l); }
java
public Object bitwiseComplement(Object val) { long l = toLong(val); return Long.valueOf(~l); }
[ "public", "Object", "bitwiseComplement", "(", "Object", "val", ")", "{", "long", "l", "=", "toLong", "(", "val", ")", ";", "return", "Long", ".", "valueOf", "(", "~", "l", ")", ";", "}" ]
Performs a bitwise complement. @param val the operand @return ~val
[ "Performs", "a", "bitwise", "complement", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L688-L691
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.lessThan
public boolean lessThan(Object left, Object right) { if ((left == right) || (left == null) || (right == null)) { return false; } else { return compare(left, right, "<") < 0; } }
java
public boolean lessThan(Object left, Object right) { if ((left == right) || (left == null) || (right == null)) { return false; } else { return compare(left, right, "<") < 0; } }
[ "public", "boolean", "lessThan", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "(", "left", "==", "right", ")", "||", "(", "left", "==", "null", ")", "||", "(", "right", "==", "null", ")", ")", "{", "return", "false", ";", "...
Test if left < right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", "<", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L814-L822
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.greaterThan
public boolean greaterThan(Object left, Object right) { if ((left == right) || left == null || right == null) { return false; } else { return compare(left, right, ">") > 0; } }
java
public boolean greaterThan(Object left, Object right) { if ((left == right) || left == null || right == null) { return false; } else { return compare(left, right, ">") > 0; } }
[ "public", "boolean", "greaterThan", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "(", "left", "==", "right", ")", "||", "left", "==", "null", "||", "right", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "r...
Test if left > right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", ">", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L833-L840
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.lessThanOrEqual
public boolean lessThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, "<=") <= 0; } }
java
public boolean lessThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, "<=") <= 0; } }
[ "public", "boolean", "lessThanOrEqual", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "right", ")", "{", "return", "true", ";", "}", "else", "if", "(", "left", "==", "null", "||", "right", "==", "null", ")", "{", ...
Test if left <= right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", "<", "=", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L851-L861
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.greaterThanOrEqual
public boolean greaterThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, ">=") >= 0; } }
java
public boolean greaterThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, ">=") >= 0; } }
[ "public", "boolean", "greaterThanOrEqual", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "right", ")", "{", "return", "true", ";", "}", "else", "if", "(", "left", "==", "null", "||", "right", "==", "null", ")", "{"...
Test if left >= right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", ">", "=", "right", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L872-L882
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.toInteger
public int toInteger(Object val) { if (val == null) { return 0; } else if (val instanceof Double) { if (!Double.isNaN(((Double) val).doubleValue())) { return 0; } else { return ((Double) val).intValue(); } } else if (val instanceof Number) { return...
java
public int toInteger(Object val) { if (val == null) { return 0; } else if (val instanceof Double) { if (!Double.isNaN(((Double) val).doubleValue())) { return 0; } else { return ((Double) val).intValue(); } } else if (val instanceof Number) { return...
[ "public", "int", "toInteger", "(", "Object", "val", ")", "{", "if", "(", "val", "==", "null", ")", "{", "return", "0", ";", "}", "else", "if", "(", "val", "instanceof", "Double", ")", "{", "if", "(", "!", "Double", ".", "isNaN", "(", "(", "(", ...
Coerce to a int. @param val Object to be coerced. @return The int coerced value.
[ "Coerce", "to", "a", "int", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L920-L949
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.toBigInteger
public BigInteger toBigInteger(Object val) { if (val == null) { return BigInteger.ZERO; } else if (val instanceof BigInteger) { return (BigInteger) val; } else if (val instanceof Double) { if (!Double.isNaN(((Double) val).doubleValue())) { return new BigInteger(val.toString...
java
public BigInteger toBigInteger(Object val) { if (val == null) { return BigInteger.ZERO; } else if (val instanceof BigInteger) { return (BigInteger) val; } else if (val instanceof Double) { if (!Double.isNaN(((Double) val).doubleValue())) { return new BigInteger(val.toString...
[ "public", "BigInteger", "toBigInteger", "(", "Object", "val", ")", "{", "if", "(", "val", "==", "null", ")", "{", "return", "BigInteger", ".", "ZERO", ";", "}", "else", "if", "(", "val", "instanceof", "BigInteger", ")", "{", "return", "(", "BigInteger", ...
Get a BigInteger from the object passed. Null and empty string maps to zero. @param val the object to be coerced. @return a BigDecimal. @throws NullPointerException if val is null and mode is strict.
[ "Get", "a", "BigInteger", "from", "the", "object", "passed", ".", "Null", "and", "empty", "string", "maps", "to", "zero", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1001-L1034
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.toBigDecimal
public BigDecimal toBigDecimal(Object val) { if (val instanceof BigDecimal) { return roundBigDecimal((BigDecimal) val); } else if (val == null) { return BigDecimal.ZERO; } else if (val instanceof String) { String string = ((String) val).trim(); if ("".equals(string)) { ...
java
public BigDecimal toBigDecimal(Object val) { if (val instanceof BigDecimal) { return roundBigDecimal((BigDecimal) val); } else if (val == null) { return BigDecimal.ZERO; } else if (val instanceof String) { String string = ((String) val).trim(); if ("".equals(string)) { ...
[ "public", "BigDecimal", "toBigDecimal", "(", "Object", "val", ")", "{", "if", "(", "val", "instanceof", "BigDecimal", ")", "{", "return", "roundBigDecimal", "(", "(", "BigDecimal", ")", "val", ")", ";", "}", "else", "if", "(", "val", "==", "null", ")", ...
Get a BigDecimal from the object passed. Null and empty string maps to zero. @param val the object to be coerced. @return a BigDecimal. @throws NullPointerException if val is null and mode is strict.
[ "Get", "a", "BigDecimal", "from", "the", "object", "passed", ".", "Null", "and", "empty", "string", "maps", "to", "zero", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1046-L1077
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.toDouble
public double toDouble(Object val) { if (val == null) { return 0; } else if (val instanceof Double) { return ((Double) val).doubleValue(); } else if (val instanceof Number) { // The below construct is used rather than ((Number)val).doubleValue() to ensure // equality between ...
java
public double toDouble(Object val) { if (val == null) { return 0; } else if (val instanceof Double) { return ((Double) val).doubleValue(); } else if (val instanceof Number) { // The below construct is used rather than ((Number)val).doubleValue() to ensure // equality between ...
[ "public", "double", "toDouble", "(", "Object", "val", ")", "{", "if", "(", "val", "==", "null", ")", "{", "return", "0", ";", "}", "else", "if", "(", "val", "instanceof", "Double", ")", "{", "return", "(", "(", "Double", ")", "val", ")", ".", "do...
Coerce to a double. @param val Object to be coerced. @return The double coerced value. @throws NullPointerException if val is null and mode is strict.
[ "Coerce", "to", "a", "double", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1088-L1119
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.toCollection
public Collection<?> toCollection(Object val) { if (val == null) { return Collections.emptyList(); } else if (val instanceof Collection<?>) { return (Collection<?>) val; } else if (val.getClass().isArray()) { return newArrayList((Object[]) val); } else if (val instanceof M...
java
public Collection<?> toCollection(Object val) { if (val == null) { return Collections.emptyList(); } else if (val instanceof Collection<?>) { return (Collection<?>) val; } else if (val.getClass().isArray()) { return newArrayList((Object[]) val); } else if (val instanceof M...
[ "public", "Collection", "<", "?", ">", "toCollection", "(", "Object", "val", ")", "{", "if", "(", "val", "==", "null", ")", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "else", "if", "(", "val", "instanceof", "Collection", "<", ...
Coerce to a collection @param val Object to be coerced. @return The Collection coerced value.
[ "Coerce", "to", "a", "collection" ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1153-L1170
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.narrowAccept
protected boolean narrowAccept(Class<?> narrow, Class<?> source) { return narrow == null || narrow.equals(source); }
java
protected boolean narrowAccept(Class<?> narrow, Class<?> source) { return narrow == null || narrow.equals(source); }
[ "protected", "boolean", "narrowAccept", "(", "Class", "<", "?", ">", "narrow", ",", "Class", "<", "?", ">", "source", ")", "{", "return", "narrow", "==", "null", "||", "narrow", ".", "equals", "(", "source", ")", ";", "}" ]
Whether we consider the narrow class as a potential candidate for narrowing the source. @param narrow the target narrow class @param source the orginal source class @return true if attempt to narrow source to target is accepted
[ "Whether", "we", "consider", "the", "narrow", "class", "as", "a", "potential", "candidate", "for", "narrowing", "the", "source", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1197-L1199
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.narrowNumber
protected Number narrowNumber(Number original, Class<?> narrow) { if (original == null) { return original; } Number result = original; if (original instanceof BigDecimal) { BigDecimal bigd = (BigDecimal) original; // if it's bigger than a double it can't be narrowed if (bigd.comp...
java
protected Number narrowNumber(Number original, Class<?> narrow) { if (original == null) { return original; } Number result = original; if (original instanceof BigDecimal) { BigDecimal bigd = (BigDecimal) original; // if it's bigger than a double it can't be narrowed if (bigd.comp...
[ "protected", "Number", "narrowNumber", "(", "Number", "original", ",", "Class", "<", "?", ">", "narrow", ")", "{", "if", "(", "original", "==", "null", ")", "{", "return", "original", ";", "}", "Number", "result", "=", "original", ";", "if", "(", "orig...
Given a Number, return back the value attempting to narrow it to a target class. @param original the original number @param narrow the attempted target class @return the narrowed number or the source if no narrowing was possible
[ "Given", "a", "Number", "return", "back", "the", "value", "attempting", "to", "narrow", "it", "to", "a", "target", "class", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L1211-L1268
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/AttributeSet.java
AttributeSet.get
public static AttributeSet get(final String _typeName, final String _name) throws CacheReloadException { return (AttributeSet) Type.get(AttributeSet.evaluateName(_typeName, _name)); }
java
public static AttributeSet get(final String _typeName, final String _name) throws CacheReloadException { return (AttributeSet) Type.get(AttributeSet.evaluateName(_typeName, _name)); }
[ "public", "static", "AttributeSet", "get", "(", "final", "String", "_typeName", ",", "final", "String", "_name", ")", "throws", "CacheReloadException", "{", "return", "(", "AttributeSet", ")", "Type", ".", "get", "(", "AttributeSet", ".", "evaluateName", "(", ...
Method to get the type from the cache. @param _typeName name of the type @param _name name of the attribute @return AttributeSet @throws CacheReloadException on error
[ "Method", "to", "get", "the", "type", "from", "the", "cache", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/AttributeSet.java#L179-L184
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/AttributeSet.java
AttributeSet.find
public static AttributeSet find(final String _typeName, final String _name) throws CacheReloadException { AttributeSet ret = (AttributeSet) Type.get(AttributeSet.evaluateName(_typeName, _name)); if (ret == null) { if (Type.get(_typeName).getPar...
java
public static AttributeSet find(final String _typeName, final String _name) throws CacheReloadException { AttributeSet ret = (AttributeSet) Type.get(AttributeSet.evaluateName(_typeName, _name)); if (ret == null) { if (Type.get(_typeName).getPar...
[ "public", "static", "AttributeSet", "find", "(", "final", "String", "_typeName", ",", "final", "String", "_name", ")", "throws", "CacheReloadException", "{", "AttributeSet", "ret", "=", "(", "AttributeSet", ")", "Type", ".", "get", "(", "AttributeSet", ".", "e...
Method to get the type from the cache. Searches if not found in the type hierarchy. @param _typeName name of the type @param _name name of the attribute @return AttributeSet @throws CacheReloadException on error
[ "Method", "to", "get", "the", "type", "from", "the", "cache", ".", "Searches", "if", "not", "found", "in", "the", "type", "hierarchy", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/AttributeSet.java#L195-L206
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java
ClassificationValueSelect.getClassification
private Set<Classification> getClassification(final List<Long> _classIds) throws CacheReloadException { final Set<Classification> noadd = new HashSet<>(); final Set<Classification> add = new HashSet<>(); if (_classIds != null) { for (final Long id : _classIds) { ...
java
private Set<Classification> getClassification(final List<Long> _classIds) throws CacheReloadException { final Set<Classification> noadd = new HashSet<>(); final Set<Classification> add = new HashSet<>(); if (_classIds != null) { for (final Long id : _classIds) { ...
[ "private", "Set", "<", "Classification", ">", "getClassification", "(", "final", "List", "<", "Long", ">", "_classIds", ")", "throws", "CacheReloadException", "{", "final", "Set", "<", "Classification", ">", "noadd", "=", "new", "HashSet", "<>", "(", ")", ";...
Method to get only the leaf of the classification tree. @param _classIds List of classids @return set @throws CacheReloadException on error
[ "Method", "to", "get", "only", "the", "leaf", "of", "the", "classification", "tree", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java#L134-L155
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java
ClassificationValueSelect.executeOneCompleteStmt
protected boolean executeOneCompleteStmt(final String _complStmt, final List<Instance> _instances) throws EFapsException { final boolean ret = false; ConnectionResource con = null; try { con = Context.getThreadContext().getConn...
java
protected boolean executeOneCompleteStmt(final String _complStmt, final List<Instance> _instances) throws EFapsException { final boolean ret = false; ConnectionResource con = null; try { con = Context.getThreadContext().getConn...
[ "protected", "boolean", "executeOneCompleteStmt", "(", "final", "String", "_complStmt", ",", "final", "List", "<", "Instance", ">", "_instances", ")", "throws", "EFapsException", "{", "final", "boolean", "ret", "=", "false", ";", "ConnectionResource", "con", "=", ...
Method to execute one statement against the eFaps-DataBase. @param _complStmt ststement @param _instances list of instances @return true it values where found @throws EFapsException on error
[ "Method", "to", "execute", "one", "statement", "against", "the", "eFaps", "-", "DataBase", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java#L259-L293
train
JavaKoan/koan-annotations
src/main/java/com/javakoan/fixture/io/KoanWriter.java
KoanWriter.writeSourceToFile
public static void writeSourceToFile(Class<?> koanClass, String newSource) { Path currentRelativePath = Paths.get(""); String workingDirectory = currentRelativePath.toAbsolutePath().toString(); String packagePath = koanClass.getPackage().getName(); packagePath = packagePath.replace(PACK...
java
public static void writeSourceToFile(Class<?> koanClass, String newSource) { Path currentRelativePath = Paths.get(""); String workingDirectory = currentRelativePath.toAbsolutePath().toString(); String packagePath = koanClass.getPackage().getName(); packagePath = packagePath.replace(PACK...
[ "public", "static", "void", "writeSourceToFile", "(", "Class", "<", "?", ">", "koanClass", ",", "String", "newSource", ")", "{", "Path", "currentRelativePath", "=", "Paths", ".", "get", "(", "\"\"", ")", ";", "String", "workingDirectory", "=", "currentRelative...
Write source to file. @param koanClass the koan class @param newSource the source code to be written
[ "Write", "source", "to", "file", "." ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/main/java/com/javakoan/fixture/io/KoanWriter.java#L47-L66
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/LoginHandler.java
LoginHandler.createPerson
protected Person createPerson(final LoginContext _login) throws EFapsException { Person person = null; for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { final Set<?> users = _login.getSubject().getPrincipals(system.getPersonJAASPrincipleClass()); for (...
java
protected Person createPerson(final LoginContext _login) throws EFapsException { Person person = null; for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { final Set<?> users = _login.getSubject().getPrincipals(system.getPersonJAASPrincipleClass()); for (...
[ "protected", "Person", "createPerson", "(", "final", "LoginContext", "_login", ")", "throws", "EFapsException", "{", "Person", "person", "=", "null", ";", "for", "(", "final", "JAASSystem", "system", ":", "JAASSystem", ".", "getAllJAASSystems", "(", ")", ")", ...
The person represented in the JAAS login context is created and associated to eFaps. If the person is defined in more than one JAAS system, the person is also associated to the other JAAS systems. @param _login JAAS login context @return Java instance of newly created person @throws EFapsException if a method of th...
[ "The", "person", "represented", "in", "the", "JAAS", "login", "context", "is", "created", "and", "associated", "to", "eFaps", ".", "If", "the", "person", "is", "defined", "in", "more", "than", "one", "JAAS", "system", "the", "person", "is", "also", "associ...
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/LoginHandler.java#L194-L224
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/LoginHandler.java
LoginHandler.updatePerson
protected void updatePerson(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { final Set<?> users = _login.getSubject().getPrincipals(system.getPersonJAASPrincipleClass(...
java
protected void updatePerson(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { final Set<?> users = _login.getSubject().getPrincipals(system.getPersonJAASPrincipleClass(...
[ "protected", "void", "updatePerson", "(", "final", "LoginContext", "_login", ",", "final", "Person", "_person", ")", "throws", "EFapsException", "{", "for", "(", "final", "JAASSystem", "system", ":", "JAASSystem", ".", "getAllJAASSystems", "(", ")", ")", "{", ...
The person information inside eFaps is update with information from JAAS login context. @param _login JAAS login context @param _person Java person instance inside eFaps to update @throws EFapsException if a method of the principals inside the JAAS login contexts could not be executed or the person could not be u...
[ "The", "person", "information", "inside", "eFaps", "is", "update", "with", "information", "from", "JAAS", "login", "context", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/LoginHandler.java#L237-L262
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/LoginHandler.java
LoginHandler.updateRoles
protected void updateRoles(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { if (system.getRoleJAASPrincipleClass() != null) { final Set<?> rolesJaas = _...
java
protected void updateRoles(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { if (system.getRoleJAASPrincipleClass() != null) { final Set<?> rolesJaas = _...
[ "protected", "void", "updateRoles", "(", "final", "LoginContext", "_login", ",", "final", "Person", "_person", ")", "throws", "EFapsException", "{", "for", "(", "final", "JAASSystem", "system", ":", "JAASSystem", ".", "getAllJAASSystems", "(", ")", ")", "{", "...
The roles of the given person are updated with the information from the JAAS login context. @param _login JAAS login context @param _person person for which the roles must be updated @throws EFapsException if a method of the principals inside the JAAS login contexts could not be executed or the roles for the give...
[ "The", "roles", "of", "the", "given", "person", "are", "updated", "with", "the", "information", "from", "the", "JAAS", "login", "context", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/LoginHandler.java#L274-L300
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/LoginHandler.java
LoginHandler.updateGroups
protected void updateGroups(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { if (system.getGroupJAASPrincipleClass() != null) { final Set<?> groupsJaas...
java
protected void updateGroups(final LoginContext _login, final Person _person) throws EFapsException { for (final JAASSystem system : JAASSystem.getAllJAASSystems()) { if (system.getGroupJAASPrincipleClass() != null) { final Set<?> groupsJaas...
[ "protected", "void", "updateGroups", "(", "final", "LoginContext", "_login", ",", "final", "Person", "_person", ")", "throws", "EFapsException", "{", "for", "(", "final", "JAASSystem", "system", ":", "JAASSystem", ".", "getAllJAASSystems", "(", ")", ")", "{", ...
The groups of the given person are updated with the information from the JAAS login context. @param _login JAAS login context @param _person person for which the groups must be updated @throws EFapsException if a method of the principals inside the JAAS login contexts could not be executed or the groups for the g...
[ "The", "groups", "of", "the", "given", "person", "are", "updated", "with", "the", "information", "from", "the", "JAAS", "login", "context", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/LoginHandler.java#L312-L338
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/model/Attachment.java
Attachment.updateWithUploadDetails
public Attachment updateWithUploadDetails(UploadContentResponse response) { this.id = response.getId(); this.url = response.getUrl(); this.size = response.getSize(); this.type = response.getType(); return this; }
java
public Attachment updateWithUploadDetails(UploadContentResponse response) { this.id = response.getId(); this.url = response.getUrl(); this.size = response.getSize(); this.type = response.getType(); return this; }
[ "public", "Attachment", "updateWithUploadDetails", "(", "UploadContentResponse", "response", ")", "{", "this", ".", "id", "=", "response", ".", "getId", "(", ")", ";", "this", ".", "url", "=", "response", ".", "getUrl", "(", ")", ";", "this", ".", "size", ...
For internal use. Update attachment details with upload APIs response. @param response Upload content APIs response. @return Updated attachment.
[ "For", "internal", "use", ".", "Update", "attachment", "details", "with", "upload", "APIs", "response", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/model/Attachment.java#L168-L174
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/databases/DerbyDatabase.java
DerbyDatabase.initTableInfoUniqueKeys
@Override protected void initTableInfoUniqueKeys(final Connection _con, final String _sql, final Map<String, TableInformation> _cache4Name) throws SQLException { final String sqlStmt = new StringBuilder() ...
java
@Override protected void initTableInfoUniqueKeys(final Connection _con, final String _sql, final Map<String, TableInformation> _cache4Name) throws SQLException { final String sqlStmt = new StringBuilder() ...
[ "@", "Override", "protected", "void", "initTableInfoUniqueKeys", "(", "final", "Connection", "_con", ",", "final", "String", "_sql", ",", "final", "Map", "<", "String", ",", "TableInformation", ">", "_cache4Name", ")", "throws", "SQLException", "{", "final", "St...
Fetches all unique keys for this table. Instead of using the JDBC meta data functionality, a SQL statement on system tables are used, because the JDBC meta data functionality returns for unique keys internal names and not the real names. Also if a unique key includes also columns with null values, this unique keys are ...
[ "Fetches", "all", "unique", "keys", "for", "this", "table", ".", "Instead", "of", "using", "the", "JDBC", "meta", "data", "functionality", "a", "SQL", "statement", "on", "system", "tables", "are", "used", "because", "the", "JDBC", "meta", "data", "functional...
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/databases/DerbyDatabase.java#L450-L465
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/VFSStoreResource.java
VFSStoreResource.backup
private void backup(final FileObject _backup, final int _number) throws FileSystemException { if (_number < this.numberBackup) { final FileObject backFile = this.manager.resolveFile(this.manager.getBaseFile(), this.storeFileName + VFSStoreResou...
java
private void backup(final FileObject _backup, final int _number) throws FileSystemException { if (_number < this.numberBackup) { final FileObject backFile = this.manager.resolveFile(this.manager.getBaseFile(), this.storeFileName + VFSStoreResou...
[ "private", "void", "backup", "(", "final", "FileObject", "_backup", ",", "final", "int", "_number", ")", "throws", "FileSystemException", "{", "if", "(", "_number", "<", "this", ".", "numberBackup", ")", "{", "final", "FileObject", "backFile", "=", "this", "...
Method that deletes the oldest backup and moves the others one up. @param _backup file to backup @param _number number of backup @throws FileSystemException on error
[ "Method", "that", "deletes", "the", "oldest", "backup", "and", "moves", "the", "others", "one", "up", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/VFSStoreResource.java#L393-L407
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/VFSStoreResource.java
VFSStoreResource.recover
@Override public Xid[] recover(final int _flag) { if (VFSStoreResource.LOG.isDebugEnabled()) { VFSStoreResource.LOG.debug("recover (flag = " + _flag + ")"); } return null; }
java
@Override public Xid[] recover(final int _flag) { if (VFSStoreResource.LOG.isDebugEnabled()) { VFSStoreResource.LOG.debug("recover (flag = " + _flag + ")"); } return null; }
[ "@", "Override", "public", "Xid", "[", "]", "recover", "(", "final", "int", "_flag", ")", "{", "if", "(", "VFSStoreResource", ".", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "VFSStoreResource", ".", "LOG", ".", "debug", "(", "\"recover (flag = \"", ...
Obtains a list of prepared transaction branches from a resource manager. @param _flag flag @return always <code>null</code>
[ "Obtains", "a", "list", "of", "prepared", "transaction", "branches", "from", "a", "resource", "manager", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/VFSStoreResource.java#L560-L567
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.sendMessageWithAttachments
Observable<ChatResult> sendMessageWithAttachments(@NonNull final String conversationId, @NonNull final MessageToSend message, @Nullable final List<Attachment> attachments) { final MessageProcessor messageProcessor = attCon.createMessageProcessor(message, attachments, conversationId, getProfileId()); r...
java
Observable<ChatResult> sendMessageWithAttachments(@NonNull final String conversationId, @NonNull final MessageToSend message, @Nullable final List<Attachment> attachments) { final MessageProcessor messageProcessor = attCon.createMessageProcessor(message, attachments, conversationId, getProfileId()); r...
[ "Observable", "<", "ChatResult", ">", "sendMessageWithAttachments", "(", "@", "NonNull", "final", "String", "conversationId", ",", "@", "NonNull", "final", "MessageToSend", "message", ",", "@", "Nullable", "final", "List", "<", "Attachment", ">", "attachments", ")...
Save and send message with attachments. @param conversationId Unique conversation id. @param message Message to send @param attachments List of attachments to send with a message. @return Observable with Chat SDK result.
[ "Save", "and", "send", "message", "with", "attachments", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L172-L194
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleParticipantsAdded
public Observable<ChatResult> handleParticipantsAdded(final String conversationId) { return persistenceController.getConversation(conversationId).flatMap(conversation -> { if (conversation == null) { return handleNoLocalConversation(conversationId); } else { ...
java
public Observable<ChatResult> handleParticipantsAdded(final String conversationId) { return persistenceController.getConversation(conversationId).flatMap(conversation -> { if (conversation == null) { return handleNoLocalConversation(conversationId); } else { ...
[ "public", "Observable", "<", "ChatResult", ">", "handleParticipantsAdded", "(", "final", "String", "conversationId", ")", "{", "return", "persistenceController", ".", "getConversation", "(", "conversationId", ")", ".", "flatMap", "(", "conversation", "->", "{", "if"...
Handle participant added to a conversation Foundation SDK event. @param conversationId Unique conversation id. @return Observable with Chat SDK result.
[ "Handle", "participant", "added", "to", "a", "conversation", "Foundation", "SDK", "event", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L202-L210
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleMessageError
private Observable<ChatResult> handleMessageError(MessageProcessor mp, Throwable t) { return persistenceController.updateStoreForSentError(mp.getConversationId(), mp.getTempId(), mp.getSender()) .map(success -> new ChatResult(false, new ChatResult.Error(0, t))); }
java
private Observable<ChatResult> handleMessageError(MessageProcessor mp, Throwable t) { return persistenceController.updateStoreForSentError(mp.getConversationId(), mp.getTempId(), mp.getSender()) .map(success -> new ChatResult(false, new ChatResult.Error(0, t))); }
[ "private", "Observable", "<", "ChatResult", ">", "handleMessageError", "(", "MessageProcessor", "mp", ",", "Throwable", "t", ")", "{", "return", "persistenceController", ".", "updateStoreForSentError", "(", "mp", ".", "getConversationId", "(", ")", ",", "mp", ".",...
Handle failure when sent message. @param mp Message processor holding message sent details. @param t Thrown exception. @return Observable with Chat SDK result.
[ "Handle", "failure", "when", "sent", "message", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L219-L222
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.checkState
Observable<RxComapiClient> checkState() { final RxComapiClient client = clientReference.get(); if (client == null) { return Observable.error(new ComapiException("No client instance available in controller.")); } else { return Observable.fromCallable(() -> client); ...
java
Observable<RxComapiClient> checkState() { final RxComapiClient client = clientReference.get(); if (client == null) { return Observable.error(new ComapiException("No client instance available in controller.")); } else { return Observable.fromCallable(() -> client); ...
[ "Observable", "<", "RxComapiClient", ">", "checkState", "(", ")", "{", "final", "RxComapiClient", "client", "=", "clientReference", ".", "get", "(", ")", ";", "if", "(", "client", "==", "null", ")", "{", "return", "Observable", ".", "error", "(", "new", ...
Checks if controller state is correct. @return Foundation client instance.
[ "Checks", "if", "controller", "state", "is", "correct", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L229-L237
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleNoLocalConversation
Observable<ChatResult> handleNoLocalConversation(String conversationId) { return checkState().flatMap(client -> client.service().messaging().getConversation(conversationId) .flatMap(result -> { if (result.isSuccessful() && result.getResult() != null) { ...
java
Observable<ChatResult> handleNoLocalConversation(String conversationId) { return checkState().flatMap(client -> client.service().messaging().getConversation(conversationId) .flatMap(result -> { if (result.isSuccessful() && result.getResult() != null) { ...
[ "Observable", "<", "ChatResult", ">", "handleNoLocalConversation", "(", "String", "conversationId", ")", "{", "return", "checkState", "(", ")", ".", "flatMap", "(", "client", "->", "client", ".", "service", "(", ")", ".", "messaging", "(", ")", ".", "getConv...
When SDK detects missing conversation it makes query in services and saves in the saves locally. @param conversationId Unique identifier of an conversation. @return Observable to handle missing local conversation data.
[ "When", "SDK", "detects", "missing", "conversation", "it", "makes", "query", "in", "services", "and", "saves", "in", "the", "saves", "locally", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L245-L256
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.markDelivered
Observable<ComapiResult<Void>> markDelivered(String conversationId, Set<String> ids) { final List<MessageStatusUpdate> updates = new ArrayList<>(); updates.add(MessageStatusUpdate.builder().setMessagesIds(ids).setStatus(MessageStatus.delivered).setTimestamp(DateHelper.getCurrentUTC()).build()); ...
java
Observable<ComapiResult<Void>> markDelivered(String conversationId, Set<String> ids) { final List<MessageStatusUpdate> updates = new ArrayList<>(); updates.add(MessageStatusUpdate.builder().setMessagesIds(ids).setStatus(MessageStatus.delivered).setTimestamp(DateHelper.getCurrentUTC()).build()); ...
[ "Observable", "<", "ComapiResult", "<", "Void", ">", ">", "markDelivered", "(", "String", "conversationId", ",", "Set", "<", "String", ">", "ids", ")", "{", "final", "List", "<", "MessageStatusUpdate", ">", "updates", "=", "new", "ArrayList", "<>", "(", ")...
Mark messages in a conversations as delivered. @param conversationId Conversation unique id. @param ids Ids of messages in a single conversation to be marked as delivered.
[ "Mark", "messages", "in", "a", "conversations", "as", "delivered", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L264-L279
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.getProfileId
String getProfileId() { final RxComapiClient client = clientReference.get(); return client != null ? client.getSession().getProfileId() : null; }
java
String getProfileId() { final RxComapiClient client = clientReference.get(); return client != null ? client.getSession().getProfileId() : null; }
[ "String", "getProfileId", "(", ")", "{", "final", "RxComapiClient", "client", "=", "clientReference", ".", "get", "(", ")", ";", "return", "client", "!=", "null", "?", "client", ".", "getSession", "(", ")", ".", "getProfileId", "(", ")", ":", "null", ";"...
Gets profile id from Foundation for the active user. @return Active user profile id.
[ "Gets", "profile", "id", "from", "Foundation", "for", "the", "active", "user", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L322-L325
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.synchroniseStore
Observable<ChatResult> synchroniseStore() { if (isSynchronising.getAndSet(true)) { log.i("Synchronisation in progress."); return Observable.fromCallable(() -> new ChatResult(true, null)); } log.i("Synchronising store."); return synchroniseConversations() ...
java
Observable<ChatResult> synchroniseStore() { if (isSynchronising.getAndSet(true)) { log.i("Synchronisation in progress."); return Observable.fromCallable(() -> new ChatResult(true, null)); } log.i("Synchronising store."); return synchroniseConversations() ...
[ "Observable", "<", "ChatResult", ">", "synchroniseStore", "(", ")", "{", "if", "(", "isSynchronising", ".", "getAndSet", "(", "true", ")", ")", "{", "log", ".", "i", "(", "\"Synchronisation in progress.\"", ")", ";", "return", "Observable", ".", "fromCallable"...
Check state for all conversations and update from services. @return Result of synchronisation process.
[ "Check", "state", "for", "all", "conversations", "and", "update", "from", "services", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L332-L348
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleConversationCreated
Observable<ChatResult> handleConversationCreated(ComapiResult<ConversationDetails> result) { if (result.isSuccessful()) { return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> adapter.adaptResult(result, succ...
java
Observable<ChatResult> handleConversationCreated(ComapiResult<ConversationDetails> result) { if (result.isSuccessful()) { return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> adapter.adaptResult(result, succ...
[ "Observable", "<", "ChatResult", ">", "handleConversationCreated", "(", "ComapiResult", "<", "ConversationDetails", ">", "result", ")", "{", "if", "(", "result", ".", "isSuccessful", "(", ")", ")", "{", "return", "persistenceController", ".", "upsertConversation", ...
Handles conversation create service response. @param result Service call response. @return Observable emitting result of operations.
[ "Handles", "conversation", "create", "service", "response", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L356-L362
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleConversationDeleted
Observable<ChatResult> handleConversationDeleted(String conversationId, ComapiResult<Void> result) { if (result.getCode() != ETAG_NOT_VALID) { return persistenceController.deleteConversation(conversationId).map(success -> adapter.adaptResult(result, success)); } else { return che...
java
Observable<ChatResult> handleConversationDeleted(String conversationId, ComapiResult<Void> result) { if (result.getCode() != ETAG_NOT_VALID) { return persistenceController.deleteConversation(conversationId).map(success -> adapter.adaptResult(result, success)); } else { return che...
[ "Observable", "<", "ChatResult", ">", "handleConversationDeleted", "(", "String", "conversationId", ",", "ComapiResult", "<", "Void", ">", "result", ")", "{", "if", "(", "result", ".", "getCode", "(", ")", "!=", "ETAG_NOT_VALID", ")", "{", "return", "persisten...
Handles conversation delete service response. @param conversationId Unique identifier of an conversation. @param result Service call response. @return Observable emitting result of operations.
[ "Handles", "conversation", "delete", "service", "response", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L371-L385
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleConversationUpdated
Observable<ChatResult> handleConversationUpdated(ConversationUpdate request, ComapiResult<ConversationDetails> result) { if (result.isSuccessful()) { return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> ad...
java
Observable<ChatResult> handleConversationUpdated(ConversationUpdate request, ComapiResult<ConversationDetails> result) { if (result.isSuccessful()) { return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> ad...
[ "Observable", "<", "ChatResult", ">", "handleConversationUpdated", "(", "ConversationUpdate", "request", ",", "ComapiResult", "<", "ConversationDetails", ">", "result", ")", "{", "if", "(", "result", ".", "isSuccessful", "(", ")", ")", "{", "return", "persistenceC...
Handles conversation update service response. @param request Service API request object. @param result Service call response. @return Observable emitting result of operations.
[ "Handles", "conversation", "update", "service", "response", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L394-L416
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleMessageStatusToUpdate
Observable<ChatResult> handleMessageStatusToUpdate(String conversationId, List<MessageStatusUpdate> msgStatusList, ComapiResult<Void> result) { if (result.isSuccessful() && msgStatusList != null && !msgStatusList.isEmpty()) { return persistenceController.upsertMessageStatuses(conversationId, getProf...
java
Observable<ChatResult> handleMessageStatusToUpdate(String conversationId, List<MessageStatusUpdate> msgStatusList, ComapiResult<Void> result) { if (result.isSuccessful() && msgStatusList != null && !msgStatusList.isEmpty()) { return persistenceController.upsertMessageStatuses(conversationId, getProf...
[ "Observable", "<", "ChatResult", ">", "handleMessageStatusToUpdate", "(", "String", "conversationId", ",", "List", "<", "MessageStatusUpdate", ">", "msgStatusList", ",", "ComapiResult", "<", "Void", ">", "result", ")", "{", "if", "(", "result", ".", "isSuccessful"...
Handles message status update service response. @param msgStatusList List of message status updates to process. @param result Service call response. @return Observable emitting result of operations.
[ "Handles", "message", "status", "update", "service", "response", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L425-L431
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.upsertTempMessage
private Observable<Boolean> upsertTempMessage(ChatMessage message) { return persistenceController.updateStoreWithNewMessage(message, noConversationListener) .doOnError(t -> log.e("Error saving temp message " + t.getLocalizedMessage())) .onErrorReturn(t -> false); }
java
private Observable<Boolean> upsertTempMessage(ChatMessage message) { return persistenceController.updateStoreWithNewMessage(message, noConversationListener) .doOnError(t -> log.e("Error saving temp message " + t.getLocalizedMessage())) .onErrorReturn(t -> false); }
[ "private", "Observable", "<", "Boolean", ">", "upsertTempMessage", "(", "ChatMessage", "message", ")", "{", "return", "persistenceController", ".", "updateStoreWithNewMessage", "(", "message", ",", "noConversationListener", ")", ".", "doOnError", "(", "t", "->", "lo...
Insert temporary message to the store for the ui to be responsive. @param message Message to be send. @return Observable emitting result of operations.
[ "Insert", "temporary", "message", "to", "the", "store", "for", "the", "ui", "to", "be", "responsive", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L439-L443
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.updateStoreWithSentMsg
Observable<ChatResult> updateStoreWithSentMsg(MessageProcessor mp, ComapiResult<MessageSentResponse> response) { if (response.isSuccessful()) { return persistenceController.updateStoreWithNewMessage(mp.createFinalMessage(response.getResult()), noConversationListener).map(success -> adapter.adaptResu...
java
Observable<ChatResult> updateStoreWithSentMsg(MessageProcessor mp, ComapiResult<MessageSentResponse> response) { if (response.isSuccessful()) { return persistenceController.updateStoreWithNewMessage(mp.createFinalMessage(response.getResult()), noConversationListener).map(success -> adapter.adaptResu...
[ "Observable", "<", "ChatResult", ">", "updateStoreWithSentMsg", "(", "MessageProcessor", "mp", ",", "ComapiResult", "<", "MessageSentResponse", ">", "response", ")", "{", "if", "(", "response", ".", "isSuccessful", "(", ")", ")", "{", "return", "persistenceControl...
Handles message send service response. Will delete temporary message object. Same message but with correct message id will be inserted instead. @param mp Message processor holding message sent details. @param response Service call response. @return Observable emitting result of operations.
[ "Handles", "message", "send", "service", "response", ".", "Will", "delete", "temporary", "message", "object", ".", "Same", "message", "but", "with", "correct", "message", "id", "will", "be", "inserted", "instead", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L452-L458
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.synchroniseConversations
private Observable<ChatResult> synchroniseConversations() { return checkState().flatMap(client -> client.service().messaging() .getConversations(false) .flatMap(result -> persistenceController.loadAllConversations() .map(chatConversationBases -> compare(r...
java
private Observable<ChatResult> synchroniseConversations() { return checkState().flatMap(client -> client.service().messaging() .getConversations(false) .flatMap(result -> persistenceController.loadAllConversations() .map(chatConversationBases -> compare(r...
[ "private", "Observable", "<", "ChatResult", ">", "synchroniseConversations", "(", ")", "{", "return", "checkState", "(", ")", ".", "flatMap", "(", "client", "->", "client", ".", "service", "(", ")", ".", "messaging", "(", ")", ".", "getConversations", "(", ...
Updates all conversation states. @return Result of synchronisation with services.
[ "Updates", "all", "conversation", "states", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L465-L474
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.compare
ConversationComparison compare(boolean successful, List<Conversation> remote, List<ChatConversationBase> local) { return new ConversationComparison(successful, makeMapFromDownloadedConversations(remote), makeMapFromSavedConversations(local)); }
java
ConversationComparison compare(boolean successful, List<Conversation> remote, List<ChatConversationBase> local) { return new ConversationComparison(successful, makeMapFromDownloadedConversations(remote), makeMapFromSavedConversations(local)); }
[ "ConversationComparison", "compare", "(", "boolean", "successful", ",", "List", "<", "Conversation", ">", "remote", ",", "List", "<", "ChatConversationBase", ">", "local", ")", "{", "return", "new", "ConversationComparison", "(", "successful", ",", "makeMapFromDownl...
Compares remote and local conversation lists. @param successful True if the service call was successful. @param remote Conversation list obtained from the server. @param local Conversation list obtained from local store. @return Comparison object.
[ "Compares", "remote", "and", "local", "conversation", "lists", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L484-L486
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.synchroniseConversation
Observable<ChatResult> synchroniseConversation(String conversationId) { return checkState().flatMap(client -> client.service().messaging() .queryMessages(conversationId, null, 1) .map(result -> { if (result.isSuccessful() && result.getResult() != null) { ...
java
Observable<ChatResult> synchroniseConversation(String conversationId) { return checkState().flatMap(client -> client.service().messaging() .queryMessages(conversationId, null, 1) .map(result -> { if (result.isSuccessful() && result.getResult() != null) { ...
[ "Observable", "<", "ChatResult", ">", "synchroniseConversation", "(", "String", "conversationId", ")", "{", "return", "checkState", "(", ")", ".", "flatMap", "(", "client", "->", "client", ".", "service", "(", ")", ".", "messaging", "(", ")", ".", "queryMess...
Updates single conversation state. @return Result of synchronisation with services.
[ "Updates", "single", "conversation", "state", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L504-L518
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.lookForMissingEvents
private Observable<ConversationComparison> lookForMissingEvents(final RxComapiClient client, ConversationComparison conversationComparison) { if (!conversationComparison.isSuccessful || conversationComparison.conversationsToUpdate.isEmpty()) { return Observable.fromCallable(() -> conversationCompar...
java
private Observable<ConversationComparison> lookForMissingEvents(final RxComapiClient client, ConversationComparison conversationComparison) { if (!conversationComparison.isSuccessful || conversationComparison.conversationsToUpdate.isEmpty()) { return Observable.fromCallable(() -> conversationCompar...
[ "private", "Observable", "<", "ConversationComparison", ">", "lookForMissingEvents", "(", "final", "RxComapiClient", "client", ",", "ConversationComparison", "conversationComparison", ")", "{", "if", "(", "!", "conversationComparison", ".", "isSuccessful", "||", "conversa...
Checks services for missing events in stored conversations. @param client Foundation client. @param conversationComparison Describes differences in local and remote conversation list. @return Observable returning unchanged argument to further processing.
[ "Checks", "services", "for", "missing", "events", "in", "stored", "conversations", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L527-L540
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.updateLocalConversationList
private Observable<ConversationComparison> updateLocalConversationList(final ConversationComparison conversationComparison) { return Observable.zip(persistenceController.deleteConversations(conversationComparison.conversationsToDelete), persistenceController.upsertConversations(conversationComp...
java
private Observable<ConversationComparison> updateLocalConversationList(final ConversationComparison conversationComparison) { return Observable.zip(persistenceController.deleteConversations(conversationComparison.conversationsToDelete), persistenceController.upsertConversations(conversationComp...
[ "private", "Observable", "<", "ConversationComparison", ">", "updateLocalConversationList", "(", "final", "ConversationComparison", "conversationComparison", ")", "{", "return", "Observable", ".", "zip", "(", "persistenceController", ".", "deleteConversations", "(", "conver...
Update list of local conversations. @param conversationComparison Describes differences in local and remote participant list. @return Observable returning unchanged argument to further processing.
[ "Update", "list", "of", "local", "conversations", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L548-L558
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.synchroniseEvents
private Observable<Boolean> synchroniseEvents(final RxComapiClient client, @NonNull final List<ChatConversation> conversationsToUpdate, @NonNull final List<Boolean> successes) { final List<ChatConversation> limited = limitNumberOfConversations(conversationsToUpdate); if (limited.isEmpty()) { ...
java
private Observable<Boolean> synchroniseEvents(final RxComapiClient client, @NonNull final List<ChatConversation> conversationsToUpdate, @NonNull final List<Boolean> successes) { final List<ChatConversation> limited = limitNumberOfConversations(conversationsToUpdate); if (limited.isEmpty()) { ...
[ "private", "Observable", "<", "Boolean", ">", "synchroniseEvents", "(", "final", "RxComapiClient", "client", ",", "@", "NonNull", "final", "List", "<", "ChatConversation", ">", "conversationsToUpdate", ",", "@", "NonNull", "final", "List", "<", "Boolean", ">", "...
Synchronise missing events for the list of locally stored conversations. @param client Foundation client. @param conversationsToUpdate List of conversations to query last events. @param successes List of partial successes. @return Observable with the merged result of operations.
[ "Synchronise", "missing", "events", "for", "the", "list", "of", "locally", "stored", "conversations", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L568-L588
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.queryEventsRecursively
private Observable<ComapiResult<ConversationEventsResponse>> queryEventsRecursively(final RxComapiClient client, final String conversationId, final long lastEventId, final int count, final List<Boolean> successes) { return client.service().messaging().queryConversationEvents(conversationId, lastEventId, events...
java
private Observable<ComapiResult<ConversationEventsResponse>> queryEventsRecursively(final RxComapiClient client, final String conversationId, final long lastEventId, final int count, final List<Boolean> successes) { return client.service().messaging().queryConversationEvents(conversationId, lastEventId, events...
[ "private", "Observable", "<", "ComapiResult", "<", "ConversationEventsResponse", ">", ">", "queryEventsRecursively", "(", "final", "RxComapiClient", "client", ",", "final", "String", "conversationId", ",", "final", "long", "lastEventId", ",", "final", "int", "count", ...
Synchronise missing events for particular conversation. @param client Foundation client. @param conversationId Unique ID of a conversation. @param lastEventId Last known event id - query should start form it. @param count Number of queries already made. @param successes list of query & process...
[ "Synchronise", "missing", "events", "for", "particular", "conversation", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L600-L611
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.processEventsQueryResponse
private Observable<ComapiResult<ConversationEventsResponse>> processEventsQueryResponse(ComapiResult<ConversationEventsResponse> result, final List<Boolean> successes) { ConversationEventsResponse response = result.getResult(); successes.add(result.isSuccessful()); if (response != null && respo...
java
private Observable<ComapiResult<ConversationEventsResponse>> processEventsQueryResponse(ComapiResult<ConversationEventsResponse> result, final List<Boolean> successes) { ConversationEventsResponse response = result.getResult(); successes.add(result.isSuccessful()); if (response != null && respo...
[ "private", "Observable", "<", "ComapiResult", "<", "ConversationEventsResponse", ">", ">", "processEventsQueryResponse", "(", "ComapiResult", "<", "ConversationEventsResponse", ">", "result", ",", "final", "List", "<", "Boolean", ">", "successes", ")", "{", "Conversat...
Process the event query response. Calls appropraiate persistance controller methods for received events. @param result Event query response. @param successes List of successes in recursive query. @return Observable with same result object for further processing.
[ "Process", "the", "event", "query", "response", ".", "Calls", "appropraiate", "persistance", "controller", "methods", "for", "received", "events", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L620-L650
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.limitNumberOfConversations
private List<ChatConversation> limitNumberOfConversations(List<ChatConversation> conversations) { List<ChatConversation> noEmptyConversations = new ArrayList<>(); for (ChatConversation c : conversations) { if (c.getLastRemoteEventId() != null && c.getLastRemoteEventId() >= 0) { ...
java
private List<ChatConversation> limitNumberOfConversations(List<ChatConversation> conversations) { List<ChatConversation> noEmptyConversations = new ArrayList<>(); for (ChatConversation c : conversations) { if (c.getLastRemoteEventId() != null && c.getLastRemoteEventId() >= 0) { ...
[ "private", "List", "<", "ChatConversation", ">", "limitNumberOfConversations", "(", "List", "<", "ChatConversation", ">", "conversations", ")", "{", "List", "<", "ChatConversation", ">", "noEmptyConversations", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", ...
Limits number of conversations to check and synchronise. Emty conversations wont be synchronised. The synchronisation will take place for twenty conversations updated most recently. @param conversations List of conversations to be limited. @return Limited list of conversations to update.
[ "Limits", "number", "of", "conversations", "to", "check", "and", "synchronise", ".", "Emty", "conversations", "wont", "be", "synchronised", ".", "The", "synchronisation", "will", "take", "place", "for", "twenty", "conversations", "updated", "most", "recently", "."...
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L658-L687
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java
ChatController.handleMessage
public Observable<Boolean> handleMessage(final ChatMessage message) { String sender = message.getSentBy(); Observable<Boolean> replaceMessages = persistenceController.updateStoreWithNewMessage(message, noConversationListener); if (!TextUtils.isEmpty(sender) && !sender.equals(getProfileId())) ...
java
public Observable<Boolean> handleMessage(final ChatMessage message) { String sender = message.getSentBy(); Observable<Boolean> replaceMessages = persistenceController.updateStoreWithNewMessage(message, noConversationListener); if (!TextUtils.isEmpty(sender) && !sender.equals(getProfileId())) ...
[ "public", "Observable", "<", "Boolean", ">", "handleMessage", "(", "final", "ChatMessage", "message", ")", "{", "String", "sender", "=", "message", ".", "getSentBy", "(", ")", ";", "Observable", "<", "Boolean", ">", "replaceMessages", "=", "persistenceController...
Handle incomming message. Replace temporary message with received one and mark as delivered. @param message Message to save and mark delivered. @return Observable with a result.
[ "Handle", "incomming", "message", ".", "Replace", "temporary", "message", "with", "received", "one", "and", "mark", "as", "delivered", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/ChatController.java#L695-L712
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/state/NFA.java
NFA.analyzeEndStop
public void analyzeEndStop() { DFA<T> dfa = constructDFA(new Scope<DFAState<T>>("analyzeEndStop")); for (DFAState<T> s : dfa) { if (s.isAccepting()) { if (s.isEndStop()) { for (NFAState<T> n : s.getNfaSet())...
java
public void analyzeEndStop() { DFA<T> dfa = constructDFA(new Scope<DFAState<T>>("analyzeEndStop")); for (DFAState<T> s : dfa) { if (s.isAccepting()) { if (s.isEndStop()) { for (NFAState<T> n : s.getNfaSet())...
[ "public", "void", "analyzeEndStop", "(", ")", "{", "DFA", "<", "T", ">", "dfa", "=", "constructDFA", "(", "new", "Scope", "<", "DFAState", "<", "T", ">", ">", "(", "\"analyzeEndStop\"", ")", ")", ";", "for", "(", "DFAState", "<", "T", ">", "s", ":"...
Marks all nfa states that can be accepting to end stop.
[ "Marks", "all", "nfa", "states", "that", "can", "be", "accepting", "to", "end", "stop", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/state/NFA.java#L147-L166
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/state/NFA.java
NFA.constructDFA
public DFA<T> constructDFA(Scope<DFAState<T>> scope) { return new DFA<>(first.constructDFA(scope), scope.count()); }
java
public DFA<T> constructDFA(Scope<DFAState<T>> scope) { return new DFA<>(first.constructDFA(scope), scope.count()); }
[ "public", "DFA", "<", "T", ">", "constructDFA", "(", "Scope", "<", "DFAState", "<", "T", ">", ">", "scope", ")", "{", "return", "new", "DFA", "<>", "(", "first", ".", "constructDFA", "(", "scope", ")", ",", "scope", ".", "count", "(", ")", ")", "...
Constructs a dfa from using first nfa state as starting state. @param scope @return
[ "Constructs", "a", "dfa", "from", "using", "first", "nfa", "state", "as", "starting", "state", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/state/NFA.java#L172-L175
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/state/NFA.java
NFA.concat
public void concat(NFA<T> nfa) { last.addEpsilon(nfa.getFirst()); last = nfa.last; }
java
public void concat(NFA<T> nfa) { last.addEpsilon(nfa.getFirst()); last = nfa.last; }
[ "public", "void", "concat", "(", "NFA", "<", "T", ">", "nfa", ")", "{", "last", ".", "addEpsilon", "(", "nfa", ".", "getFirst", "(", ")", ")", ";", "last", "=", "nfa", ".", "last", ";", "}" ]
Concatenates this to nfa by making epsilon move from this last to nfa first. @param nfa
[ "Concatenates", "this", "to", "nfa", "by", "making", "epsilon", "move", "from", "this", "last", "to", "nfa", "first", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/state/NFA.java#L180-L184
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/Application.java
Application.getApplicationFromSource
public static Application getApplicationFromSource(final File _versionFile, final List<String> _classpathElements, final File _eFapsDir, final File _output...
java
public static Application getApplicationFromSource(final File _versionFile, final List<String> _classpathElements, final File _eFapsDir, final File _output...
[ "public", "static", "Application", "getApplicationFromSource", "(", "final", "File", "_versionFile", ",", "final", "List", "<", "String", ">", "_classpathElements", ",", "final", "File", "_eFapsDir", ",", "final", "File", "_outputDir", ",", "final", "List", "<", ...
Returns the application definition read from a source directory. @param _versionFile version file which defines the application @param _classpathElements class path elements (required to compile) @param _eFapsDir root directory with the XML installation files @param _outputDir direct...
[ "Returns", "the", "application", "definition", "read", "from", "a", "source", "directory", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L285-L323
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/Application.java
Application.getApplicationFromClassPath
public static Application getApplicationFromClassPath(final String _application, final List<String> _classpath) throws InstallationException { return Application.getApplicationsFromClassPath(_application, _classpath).get(_application); }
java
public static Application getApplicationFromClassPath(final String _application, final List<String> _classpath) throws InstallationException { return Application.getApplicationsFromClassPath(_application, _classpath).get(_application); }
[ "public", "static", "Application", "getApplicationFromClassPath", "(", "final", "String", "_application", ",", "final", "List", "<", "String", ">", "_classpath", ")", "throws", "InstallationException", "{", "return", "Application", ".", "getApplicationsFromClassPath", "...
Method to get the applications from the class path. @param _application searched application in the class path @param _classpath class path (list of the complete class path) @return List of applications @throws InstallationException if the install.xml file in the class path could not be accessed
[ "Method", "to", "get", "the", "applications", "from", "the", "class", "path", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L368-L373
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/Application.java
Application.getApplicationsFromClassPath
public static Map<String, Application> getApplicationsFromClassPath(final String _application, final List<String> _classpath) throws InstallationException { final Map<String, Application> appls = new HashMap<>(); try { ...
java
public static Map<String, Application> getApplicationsFromClassPath(final String _application, final List<String> _classpath) throws InstallationException { final Map<String, Application> appls = new HashMap<>(); try { ...
[ "public", "static", "Map", "<", "String", ",", "Application", ">", "getApplicationsFromClassPath", "(", "final", "String", "_application", ",", "final", "List", "<", "String", ">", "_classpath", ")", "throws", "InstallationException", "{", "final", "Map", "<", "...
Method to get all applications from the class path. @param _application searched application in the class path @param _classpath class path (list of the complete class path) @return List of applications @throws InstallationException if the install.xml file in the class path could not be accessed
[ "Method", "to", "get", "all", "applications", "from", "the", "class", "path", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L385-L410
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/Application.java
Application.updateLastVersion
public void updateLastVersion(final String _userName, final String _password, final Set<Profile> _profiles) throws Exception { // reload cache (if possible) reloadCache(); // load installed versions Context....
java
public void updateLastVersion(final String _userName, final String _password, final Set<Profile> _profiles) throws Exception { // reload cache (if possible) reloadCache(); // load installed versions Context....
[ "public", "void", "updateLastVersion", "(", "final", "String", "_userName", ",", "final", "String", "_password", ",", "final", "Set", "<", "Profile", ">", "_profiles", ")", "throws", "Exception", "{", "// reload cache (if possible)", "reloadCache", "(", ")", ";", ...
Updates the last installed version. @param _userName name of logged in user @param _password password of logged in user @param _profiles Profiles to be applied @throws Exception on error
[ "Updates", "the", "last", "installed", "version", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L617-L643
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/Application.java
Application.reloadCache
protected void reloadCache() throws InstallationException { try { LOG.info("Reloading Cache"); Context.begin(); if (RunLevel.isInitialisable()) { RunLevel.init("shell"); RunLevel.execute(); } Context.commit()...
java
protected void reloadCache() throws InstallationException { try { LOG.info("Reloading Cache"); Context.begin(); if (RunLevel.isInitialisable()) { RunLevel.init("shell"); RunLevel.execute(); } Context.commit()...
[ "protected", "void", "reloadCache", "(", ")", "throws", "InstallationException", "{", "try", "{", "LOG", ".", "info", "(", "\"Reloading Cache\"", ")", ";", "Context", ".", "begin", "(", ")", ";", "if", "(", "RunLevel", ".", "isInitialisable", "(", ")", ")"...
Reloads the eFaps cache. @throws InstallationException if reload of the cache failed
[ "Reloads", "the", "eFaps", "cache", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L743-L757
train
tvesalainen/lpg
src/main/java/org/vesalainen/parser/util/CharInput.java
CharInput.getString
@Override public String getString(long start, int length) { if (length == 0) { return ""; } if (array != null) { int ps = (int) (start % size); int es = (int) ((start+length) % size); if (ps < es) { ...
java
@Override public String getString(long start, int length) { if (length == 0) { return ""; } if (array != null) { int ps = (int) (start % size); int es = (int) ((start+length) % size); if (ps < es) { ...
[ "@", "Override", "public", "String", "getString", "(", "long", "start", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "{", "return", "\"\"", ";", "}", "if", "(", "array", "!=", "null", ")", "{", "int", "ps", "=", "(", "int"...
Returns string from buffer @param start Start of input @param length Length of input @return
[ "Returns", "string", "from", "buffer" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/CharInput.java#L154-L186
train
gravityrd/jsondto
src/main/java/com/gravityrd/receng/web/webshop/jsondto/GravityNameValue.java
GravityNameValue.groupNameToSet
static Map<String, Set<String>> groupNameToSet(GravityNameValue[] nameValues) { Map<String, Set<String>> result = new HashMap<>(); for (GravityNameValue nameValue : nameValues) { if (nameValue.name == null || nameValue.value == null) continue; if (!result.containsKey(nameValue.name)) result.put(nameValue.name...
java
static Map<String, Set<String>> groupNameToSet(GravityNameValue[] nameValues) { Map<String, Set<String>> result = new HashMap<>(); for (GravityNameValue nameValue : nameValues) { if (nameValue.name == null || nameValue.value == null) continue; if (!result.containsKey(nameValue.name)) result.put(nameValue.name...
[ "static", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "groupNameToSet", "(", "GravityNameValue", "[", "]", "nameValues", ")", "{", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "result", "=", "new", "HashMap", "<>", "(", "...
Transform grouped into a map of name to a linked set of values @param nameValues the list of name values @return nameValues grouped
[ "Transform", "grouped", "into", "a", "map", "of", "name", "to", "a", "linked", "set", "of", "values" ]
7804c08be9d91174e4af63dd6b56a375cb96d99e
https://github.com/gravityrd/jsondto/blob/7804c08be9d91174e4af63dd6b56a375cb96d99e/src/main/java/com/gravityrd/receng/web/webshop/jsondto/GravityNameValue.java#L32-L40
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/AbstractStoreResource.java
AbstractStoreResource.setFileInfo
protected void setFileInfo(final String _filename, final long _fileLength) throws EFapsException { if (!_filename.equals(this.fileName) || _fileLength != this.fileLength) { ConnectionResource res = null; try { res = Context.getTh...
java
protected void setFileInfo(final String _filename, final long _fileLength) throws EFapsException { if (!_filename.equals(this.fileName) || _fileLength != this.fileLength) { ConnectionResource res = null; try { res = Context.getTh...
[ "protected", "void", "setFileInfo", "(", "final", "String", "_filename", ",", "final", "long", "_fileLength", ")", "throws", "EFapsException", "{", "if", "(", "!", "_filename", ".", "equals", "(", "this", ".", "fileName", ")", "||", "_fileLength", "!=", "thi...
Set the info for the file in this store reosurce. @param _filename name of the file @param _fileLength length of the file @throws EFapsException on error
[ "Set", "the", "info", "for", "the", "file", "in", "this", "store", "reosurce", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/AbstractStoreResource.java#L253-L291
train