repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/AbstractClassicTag.java
AbstractClassicTag.getIdForTagId
final protected String getIdForTagId(String tagId) { HttpServletRequest req = (HttpServletRequest) pageContext.getRequest(); ArrayList/*<String>*/ list = (ArrayList/*<String>*/) RequestUtils.getOuterAttribute(req, ScriptContainer.SCOPE_ID); if (list == null) retur...
java
final protected String getIdForTagId(String tagId) { HttpServletRequest req = (HttpServletRequest) pageContext.getRequest(); ArrayList/*<String>*/ list = (ArrayList/*<String>*/) RequestUtils.getOuterAttribute(req, ScriptContainer.SCOPE_ID); if (list == null) retur...
[ "final", "protected", "String", "getIdForTagId", "(", "String", "tagId", ")", "{", "HttpServletRequest", "req", "=", "(", "HttpServletRequest", ")", "pageContext", ".", "getRequest", "(", ")", ";", "ArrayList", "/*<String>*/", "list", "=", "(", "ArrayList", "/*<...
This method will generate a real id based upon the passed in tagId. The generated id will be constucted by searching upward for all the script containers that have a scope id set. These will form a fully qualified id. @param tagId The base tagId set on a tag @return an id value formed by considering all of the scope ...
[ "This", "method", "will", "generate", "a", "real", "id", "based", "upon", "the", "passed", "in", "tagId", ".", "The", "generated", "id", "will", "be", "constucted", "by", "searching", "upward", "for", "all", "the", "script", "containers", "that", "have", "...
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/AbstractClassicTag.java#L263-L292
train
Gets the id for tagId.
Of course, here is the Java code you requested: ```java final protected String getIdForTagId(String tagId) { HttpServletRequest req = (HttpServletRequest) pageContext.getRequest(); ArrayList/*<String>*/ list = (ArrayList/*<String>*/) RequestUtils.getOuterAttribute(req, ScriptContain...
VoltDB/voltdb
examples/uniquedevices/client/uniquedevices/UniqueDevicesClient.java
UniqueDevicesClient.main
public static void main(String[] args) throws Exception { // create a configuration from the arguments UniqueDevicesConfig config = new UniqueDevicesConfig(); config.parse(UniqueDevicesClient.class.getName(), args); UniqueDevicesClient udc = new UniqueDevicesClient(config); udc....
java
public static void main(String[] args) throws Exception { // create a configuration from the arguments UniqueDevicesConfig config = new UniqueDevicesConfig(); config.parse(UniqueDevicesClient.class.getName(), args); UniqueDevicesClient udc = new UniqueDevicesClient(config); udc....
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "// create a configuration from the arguments", "UniqueDevicesConfig", "config", "=", "new", "UniqueDevicesConfig", "(", ")", ";", "config", ".", "parse", "(", "U...
Main routine creates a benchmark instance and kicks off the run method. @param args Command line arguments. @throws Exception if anything goes wrong. @see {@link UniqueDevicesConfig}
[ "Main", "routine", "creates", "a", "benchmark", "instance", "and", "kicks", "off", "the", "run", "method", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/uniquedevices/client/uniquedevices/UniqueDevicesClient.java#L385-L392
train
Main method to run the benchmark
Of course, here is the Java code you requested: ```java public static void main(String[] args) throws Exception { // create a configuration from the arguments UniqueDevicesConfig config = new UniqueDevicesConfig(); config.parse(UniqueDevicesClient.class.getName(), args); UniqueDevicesC...
vipshop/vjtools
standard/sonar-vj/src/main/java/com/vip/vjkit/sonarvj/checks/UnusedPrivateFieldCheck.java
UnusedPrivateFieldCheck.checkIfLombokClass
private void checkIfLombokClass(ImportTree tree) { String importStr = fullQualifiedName(tree.qualifiedIdentifier()); if (importStr.contains("lombok")) { lombokClass = true; } }
java
private void checkIfLombokClass(ImportTree tree) { String importStr = fullQualifiedName(tree.qualifiedIdentifier()); if (importStr.contains("lombok")) { lombokClass = true; } }
[ "private", "void", "checkIfLombokClass", "(", "ImportTree", "tree", ")", "{", "String", "importStr", "=", "fullQualifiedName", "(", "tree", ".", "qualifiedIdentifier", "(", ")", ")", ";", "if", "(", "importStr", ".", "contains", "(", "\"lombok\"", ")", ")", ...
VJ
[ "VJ" ]
60c743da35913d72f37f2d79afa90ad2bf73cb89
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/standard/sonar-vj/src/main/java/com/vip/vjkit/sonarvj/checks/UnusedPrivateFieldCheck.java#L115-L120
train
Check if the import is a lombok class.
Of course, here is the Java code you requested: ```java private void checkIfLombokClass(ImportTree tree) { String importStr = fullQualifiedName(tree.qualifiedIdentifier()); if (importStr.contains("lombok")) { lombokClass = true; } } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/DescribeRemediationConfigurationsRequest.java
DescribeRemediationConfigurationsRequest.getConfigRuleNames
public java.util.List<String> getConfigRuleNames() { if (configRuleNames == null) { configRuleNames = new com.amazonaws.internal.SdkInternalList<String>(); } return configRuleNames; }
java
public java.util.List<String> getConfigRuleNames() { if (configRuleNames == null) { configRuleNames = new com.amazonaws.internal.SdkInternalList<String>(); } return configRuleNames; }
[ "public", "java", ".", "util", ".", "List", "<", "String", ">", "getConfigRuleNames", "(", ")", "{", "if", "(", "configRuleNames", "==", "null", ")", "{", "configRuleNames", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<",...
<p> A list of AWS Config rule names of remediation configurations for which you want details. </p> @return A list of AWS Config rule names of remediation configurations for which you want details.
[ "<p", ">", "A", "list", "of", "AWS", "Config", "rule", "names", "of", "remediation", "configurations", "for", "which", "you", "want", "details", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/DescribeRemediationConfigurationsRequest.java#L43-L48
train
Gets the value of the configRuleNames property.
Of course, here is the Java code you requested: ```java public java.util.List<String> getConfigRuleNames() { if (configRuleNames == null) { configRuleNames = new com.amazonaws.internal.SdkInternalList<String>(); } return configRuleNames; } ``` Hope this helps!
FasterXML/woodstox
src/main/java/com/ctc/wstx/sw/XmlWriter.java
XmlWriter.handleInvalidChar
protected char handleInvalidChar(int c) throws IOException { // First, let's flush any output we may have, to make debugging easier flush(); InvalidCharHandler h = mConfig.getInvalidCharHandler(); if (h == null) { h = InvalidCharHandler.FailingHandler.getInstance(...
java
protected char handleInvalidChar(int c) throws IOException { // First, let's flush any output we may have, to make debugging easier flush(); InvalidCharHandler h = mConfig.getInvalidCharHandler(); if (h == null) { h = InvalidCharHandler.FailingHandler.getInstance(...
[ "protected", "char", "handleInvalidChar", "(", "int", "c", ")", "throws", "IOException", "{", "// First, let's flush any output we may have, to make debugging easier", "flush", "(", ")", ";", "InvalidCharHandler", "h", "=", "mConfig", ".", "getInvalidCharHandler", "(", ")...
Method called to handle invalid character in textual content requested to be output. Content may be part of textual events (CHARACTER, CDATA), attribute value, COMMENT content or PROCESSING_INSTRUCTION data. The default behavior is to just throw an exception, but this can be configured via property {@link WstxOutputPro...
[ "Method", "called", "to", "handle", "invalid", "character", "in", "textual", "content", "requested", "to", "be", "output", ".", "Content", "may", "be", "part", "of", "textual", "events", "(", "CHARACTER", "CDATA", ")", "attribute", "value", "COMMENT", "content...
ffcaabdc06672d9564c48c25d601d029b7fd6548
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sw/XmlWriter.java#L617-L627
train
Handle an invalid character.
Of course, here is the Java code you requested: ```java protected char handleInvalidChar(int c) throws IOException { // First, let's flush any output we may have, to make debugging easier flush(); InvalidCharHandler h = mConfig.getInvalidCharHandler(); if (h == null) { ...
immutables/immutables
ordinal/src/org/immutables/ordinal/OrdinalDomain.java
OrdinalDomain.iterator
@Override public Iterator<E> iterator() { return new AbstractIterator<E>() { private final int length = length(); private int index = 0; @Override protected E computeNext() { int p = index++; if (p < length) { return get(p); } return endOfData(); ...
java
@Override public Iterator<E> iterator() { return new AbstractIterator<E>() { private final int length = length(); private int index = 0; @Override protected E computeNext() { int p = index++; if (p < length) { return get(p); } return endOfData(); ...
[ "@", "Override", "public", "Iterator", "<", "E", ">", "iterator", "(", ")", "{", "return", "new", "AbstractIterator", "<", "E", ">", "(", ")", "{", "private", "final", "int", "length", "=", "length", "(", ")", ";", "private", "int", "index", "=", "0"...
Iterator over all present inhabitants of ordinal domain. @return snapshot iterator of elements in ordinal domain.
[ "Iterator", "over", "all", "present", "inhabitants", "of", "ordinal", "domain", "." ]
909fd91fe6065e785f88a31a506554cec2ad7ee4
https://github.com/immutables/immutables/blob/909fd91fe6065e785f88a31a506554cec2ad7ee4/ordinal/src/org/immutables/ordinal/OrdinalDomain.java#L54-L69
valid
Returns an iterator over the elements in this array.
Of course, here is the Java code you requested: ```java @Override public Iterator<E> iterator() { return new AbstractIterator<E>() { private final int length = length(); private int index = 0; @Override protected E computeNext() { int p = index++; if (p < length) { ...
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/endpoint/resolver/DynamicEndpointUriResolver.java
DynamicEndpointUriResolver.resolveEndpointUri
public String resolveEndpointUri(Message message, String defaultUri) { Map<String, Object> headers = message.getHeaders(); String requestUri; if (headers.containsKey(ENDPOINT_URI_HEADER_NAME)) { requestUri = headers.get(ENDPOINT_URI_HEADER_NAME).toString(); } else if (String...
java
public String resolveEndpointUri(Message message, String defaultUri) { Map<String, Object> headers = message.getHeaders(); String requestUri; if (headers.containsKey(ENDPOINT_URI_HEADER_NAME)) { requestUri = headers.get(ENDPOINT_URI_HEADER_NAME).toString(); } else if (String...
[ "public", "String", "resolveEndpointUri", "(", "Message", "message", ",", "String", "defaultUri", ")", "{", "Map", "<", "String", ",", "Object", ">", "headers", "=", "message", ".", "getHeaders", "(", ")", ";", "String", "requestUri", ";", "if", "(", "head...
Get the endpoint uri according to message header entry with fallback default uri.
[ "Get", "the", "endpoint", "uri", "according", "to", "message", "header", "entry", "with", "fallback", "default", "uri", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/endpoint/resolver/DynamicEndpointUriResolver.java#L47-L68
train
Resolves the dynamic endpoint uri.
Of course, here is the Java code you requested: ```java public String resolveEndpointUri(Message message, String defaultUri) { Map<String, Object> headers = message.getHeaders(); String requestUri; if (headers.containsKey(ENDPOINT_URI_HEADER_NAME)) { requestUri = headers.get(ENDPOI...
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.setValue
public static final void setValue(Object bean, String property, Object v) { Object vv = BeanHelper.getValue(bean, property); if (v != null && v.getClass().isArray() && vv != null && (vv instanceof Collection)) { // array assignment to Collection Collection col = (Collecti...
java
public static final void setValue(Object bean, String property, Object v) { Object vv = BeanHelper.getValue(bean, property); if (v != null && v.getClass().isArray() && vv != null && (vv instanceof Collection)) { // array assignment to Collection Collection col = (Collecti...
[ "public", "static", "final", "void", "setValue", "(", "Object", "bean", ",", "String", "property", ",", "Object", "v", ")", "{", "Object", "vv", "=", "BeanHelper", ".", "getValue", "(", "bean", ",", "property", ")", ";", "if", "(", "v", "!=", "null", ...
Set value @param bean @param property @param v
[ "Set", "value" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L644-L698
train
Sets the value of the named property in the specified bean.
Of course, here is the Java code you requested: ```java public static final void setValue(Object bean, String property, Object v) { Object vv = BeanHelper.getValue(bean, property); if (v != null && v.getClass().isArray() && vv != null && (vv instanceof Collection)) { // array assignm...
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/jdbc/QuerySelectOnSubscribe.java
QuerySelectOnSubscribe.execute
static <T> Observable<T> execute(QuerySelect query, List<Parameter> parameters, ResultSetMapper<? extends T> function) { return Observable.create(new QuerySelectOnSubscribe<T>(query, parameters, function)); }
java
static <T> Observable<T> execute(QuerySelect query, List<Parameter> parameters, ResultSetMapper<? extends T> function) { return Observable.create(new QuerySelectOnSubscribe<T>(query, parameters, function)); }
[ "static", "<", "T", ">", "Observable", "<", "T", ">", "execute", "(", "QuerySelect", "query", ",", "List", "<", "Parameter", ">", "parameters", ",", "ResultSetMapper", "<", "?", "extends", "T", ">", "function", ")", "{", "return", "Observable", ".", "cre...
Returns an Observable of the results of pushing one set of parameters through a select query. @param params one set of parameters to be run with the query @return
[ "Returns", "an", "Observable", "of", "the", "results", "of", "pushing", "one", "set", "of", "parameters", "through", "a", "select", "query", "." ]
81e157d7071a825086bde81107b8694684cdff14
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/jdbc/QuerySelectOnSubscribe.java#L32-L35
train
Execute a query with parameters and a ResultSetMapper
Of course, here is the Java code you requested: ```java static <T> Observable<T> execute(QuerySelect query, List<Parameter> parameters, ResultSetMapper<? extends T> function) { return Observable.create(new QuerySelectOnSubscribe<T>(query, parameters, function)); } ``` Hope this helps!
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/AbstractDocumentationMojo.java
AbstractDocumentationMojo.getFiles
protected Map<File, File> getFiles() { final Map<File, File> files = new TreeMap<>(); for (final String rootName : this.inferredSourceDirectories) { File root = FileSystem.convertStringToFile(rootName); if (!root.isAbsolute()) { root = FileSystem.makeAbsolute(root, this.baseDirectory); } getLog().de...
java
protected Map<File, File> getFiles() { final Map<File, File> files = new TreeMap<>(); for (final String rootName : this.inferredSourceDirectories) { File root = FileSystem.convertStringToFile(rootName); if (!root.isAbsolute()) { root = FileSystem.makeAbsolute(root, this.baseDirectory); } getLog().de...
[ "protected", "Map", "<", "File", ",", "File", ">", "getFiles", "(", ")", "{", "final", "Map", "<", "File", ",", "File", ">", "files", "=", "new", "TreeMap", "<>", "(", ")", ";", "for", "(", "final", "String", "rootName", ":", "this", ".", "inferred...
Replies the source files. @return the map from the source files to the corresponding source folders.
[ "Replies", "the", "source", "files", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/AbstractDocumentationMojo.java#L463-L478
train
Gets the files.
Of course, here is the Java code you requested: ```java protected Map<File, File> getFiles() { final Map<File, File> files = new TreeMap<>(); for (final String rootName : this.inferredSourceDirectories) { File root = FileSystem.convertStringToFile(rootName); if (!root.isAbsolute()) { root = FileSystem.ma...
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/StringUtil.java
StringUtil.ordinalize
public static String ordinalize(int number){ int modulo = number%100; if(modulo>=11 && modulo<=13) return number+"th"; switch(number%10){ case 1: return number+"st"; case 2: return number+"nd"; case 3: ...
java
public static String ordinalize(int number){ int modulo = number%100; if(modulo>=11 && modulo<=13) return number+"th"; switch(number%10){ case 1: return number+"st"; case 2: return number+"nd"; case 3: ...
[ "public", "static", "String", "ordinalize", "(", "int", "number", ")", "{", "int", "modulo", "=", "number", "%", "100", ";", "if", "(", "modulo", ">=", "11", "&&", "modulo", "<=", "13", ")", "return", "number", "+", "\"th\"", ";", "switch", "(", "num...
Turns a non-negative number into an ordinal string used to denote the position in an ordered sequence, such as 1st, 2nd, 3rd, 4th @param number the non-negative number @return the string with the number and ordinal suffix
[ "Turns", "a", "non", "-", "negative", "number", "into", "an", "ordinal", "string", "used", "to", "denote", "the", "position", "in", "an", "ordered", "sequence", "such", "as", "1st", "2nd", "3rd", "4th" ]
59c28719f054123cf778278154e1b92e943ad232
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/StringUtil.java#L178-L192
train
I m ausge um nachricht eine Methode d une nachricht.
Of course, here is the Java code you requested: ```java public static String ordinalize(int number){ int modulo = number%100; if(modulo>=11 && modulo<=13) return number+"th"; switch(number%10){ case 1: return number+"st"; case 2: ...
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/asset/Asset.java
Asset.getFormat
public static String getFormat(String fileName) { int lastDot = fileName.lastIndexOf('.'); if (lastDot == -1) return null; return getLanguage(fileName.substring(lastDot)); }
java
public static String getFormat(String fileName) { int lastDot = fileName.lastIndexOf('.'); if (lastDot == -1) return null; return getLanguage(fileName.substring(lastDot)); }
[ "public", "static", "String", "getFormat", "(", "String", "fileName", ")", "{", "int", "lastDot", "=", "fileName", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "lastDot", "==", "-", "1", ")", "return", "null", ";", "return", "getLanguage", "...
Takes into account special rules due to multiple languages per extension.
[ "Takes", "into", "account", "special", "rules", "due", "to", "multiple", "languages", "per", "extension", "." ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Asset.java#L633-L638
train
Get the language from a file name.
Of course, here is the Java code you requested: ```java public static String getFormat(String fileName) { int lastDot = fileName.lastIndexOf('.'); if (lastDot == -1) return null; return getLanguage(fileName.substring(lastDot)); } ``` Hope this helps!
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/NonFlatRStarTree.java
NonFlatRStarTree.createBulkDirectoryNodes
private List<E> createBulkDirectoryNodes(List<E> nodes) { int minEntries = dirMinimum; int maxEntries = dirCapacity - 1; ArrayList<E> result = new ArrayList<>(); List<List<E>> partitions = settings.bulkSplitter.partition(nodes, minEntries, maxEntries); for(List<E> partition : partitions) { /...
java
private List<E> createBulkDirectoryNodes(List<E> nodes) { int minEntries = dirMinimum; int maxEntries = dirCapacity - 1; ArrayList<E> result = new ArrayList<>(); List<List<E>> partitions = settings.bulkSplitter.partition(nodes, minEntries, maxEntries); for(List<E> partition : partitions) { /...
[ "private", "List", "<", "E", ">", "createBulkDirectoryNodes", "(", "List", "<", "E", ">", "nodes", ")", "{", "int", "minEntries", "=", "dirMinimum", ";", "int", "maxEntries", "=", "dirCapacity", "-", "1", ";", "ArrayList", "<", "E", ">", "result", "=", ...
Creates and returns the directory nodes for bulk load. @param nodes the nodes to be inserted @return the directory nodes containing the nodes
[ "Creates", "and", "returns", "the", "directory", "nodes", "for", "bulk", "load", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/NonFlatRStarTree.java#L179-L203
train
Create bulk directory nodes.
Of course, here is the Java code you requested: ```java private List<E> createBulkDirectoryNodes(List<E> nodes) { int minEntries = dirMinimum; int maxEntries = dirCapacity - 1; ArrayList<E> result = new ArrayList<>(); List<List<E>> partitions = settings.bulkSplitter.partition(nodes, minEntries, maxEnt...
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/ProcessRecordService.java
ProcessRecordService.setProcessState
public ProcessRecord setProcessState(ProcessRecord processRecord, ProcessState newState) throws IOException { Put put = new Put(keyConv.toBytes(processRecord.getKey())); put.addColumn(Constants.INFO_FAM_BYTES, Constants.PROCESSING_STATE_COLUMN_BYTES, Bytes.toBytes(newState.getCode())); ...
java
public ProcessRecord setProcessState(ProcessRecord processRecord, ProcessState newState) throws IOException { Put put = new Put(keyConv.toBytes(processRecord.getKey())); put.addColumn(Constants.INFO_FAM_BYTES, Constants.PROCESSING_STATE_COLUMN_BYTES, Bytes.toBytes(newState.getCode())); ...
[ "public", "ProcessRecord", "setProcessState", "(", "ProcessRecord", "processRecord", ",", "ProcessState", "newState", ")", "throws", "IOException", "{", "Put", "put", "=", "new", "Put", "(", "keyConv", ".", "toBytes", "(", "processRecord", ".", "getKey", "(", ")...
Set the process state for a given processRecord. @param processRecord for which to update the state @param newState the new state to set in HBase. @return a new ProcessRecord with the new state. @throws IOException
[ "Set", "the", "process", "state", "for", "a", "given", "processRecord", "." ]
e35996b6e2f016bcd18db0bad320be7c93d95208
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/ProcessRecordService.java#L361-L385
train
Set the process state of a process record.
Of course, here is the Java code you requested: ```java public ProcessRecord setProcessState(ProcessRecord processRecord, ProcessState newState) throws IOException { Put put = new Put(keyConv.toBytes(processRecord.getKey())); put.addColumn(Constants.INFO_FAM_BYTES, Constants.PROCESSING_STATE_COLU...
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java
DiscountCurve.createDiscountCurveFromZeroRates
public static DiscountCurve createDiscountCurveFromZeroRates( String name, Date referenceDate, double[] times, double[] givenZeroRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { LocalDate referenceDataA...
java
public static DiscountCurve createDiscountCurveFromZeroRates( String name, Date referenceDate, double[] times, double[] givenZeroRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { LocalDate referenceDataA...
[ "public", "static", "DiscountCurve", "createDiscountCurveFromZeroRates", "(", "String", "name", ",", "Date", "referenceDate", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenZeroRates", ",", "boolean", "[", "]", "isParameter", ",", "InterpolationM...
Create a discount curve from given times and given zero rates using given interpolation and extrapolation methods. The discount factor is determined by <code> givenDiscountFactors[timeIndex] = Math.exp(- givenZeroRates[timeIndex] * times[timeIndex]); </code> @param name The name of this discount curve. @param referenc...
[ "Create", "a", "discount", "curve", "from", "given", "times", "and", "given", "zero", "rates", "using", "given", "interpolation", "and", "extrapolation", "methods", ".", "The", "discount", "factor", "is", "determined", "by", "<code", ">", "givenDiscountFactors", ...
a3c067d52dd33feb97d851df6cab130e4116759f
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java#L216-L223
train
Create a discount curve from zero rates.
Of course, here is the Java code you requested: ```java public static DiscountCurve createDiscountCurveFromZeroRates( String name, Date referenceDate, double[] times, double[] givenZeroRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, Interpolation...
3pillarlabs/spring-data-simpledb
spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/entityinformation/SimpleDbMetamodelEntityInformation.java
SimpleDbMetamodelEntityInformation.getIdType
@SuppressWarnings("unchecked") @Override public Class<ID> getIdType() { Field idField = MetadataParser.getIdField(getJavaType()); return (Class<ID>) idField.getType(); }
java
@SuppressWarnings("unchecked") @Override public Class<ID> getIdType() { Field idField = MetadataParser.getIdField(getJavaType()); return (Class<ID>) idField.getType(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "Class", "<", "ID", ">", "getIdType", "(", ")", "{", "Field", "idField", "=", "MetadataParser", ".", "getIdField", "(", "getJavaType", "(", ")", ")", ";", "return", "(", "Class"...
/* (non-Javadoc) @see org.springframework.data.repository.support.EntityInformation#getIdType()
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
f1e0eb4e48ec4674d3966e8f5bc04c95031f93ae
https://github.com/3pillarlabs/spring-data-simpledb/blob/f1e0eb4e48ec4674d3966e8f5bc04c95031f93ae/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/entityinformation/SimpleDbMetamodelEntityInformation.java#L57-L62
train
Returns the type of the ID field.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @Override public Class<ID> getIdType() { Field idField = MetadataParser.getIdField(getJavaType()); return (Class<ID>) idField.getType(); } ``` Hope this helps!
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java
Journaler.purgeDatastream
public Date[] purgeDatastream(Context context, String pid, String datastreamID, Date startDT, Date endDT, String logMessage) throws ServerException { ...
java
public Date[] purgeDatastream(Context context, String pid, String datastreamID, Date startDT, Date endDT, String logMessage) throws ServerException { ...
[ "public", "Date", "[", "]", "purgeDatastream", "(", "Context", "context", ",", "String", "pid", ",", "String", "datastreamID", ",", "Date", "startDT", ",", "Date", "endDT", ",", "String", "logMessage", ")", "throws", "ServerException", "{", "return", "worker",...
Delegate to the JournalWorker.
[ "Delegate", "to", "the", "JournalWorker", "." ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java#L319-L331
train
Purge a datastream.
Of course, here is the Java code you requested: ```java public Date[] purgeDatastream(Context context, String pid, String datastreamID, Date startDT, Date endDT, ...
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java
ForkJoinPool.tryAddWorker
private void tryAddWorker(long c) { do { long nc = ((AC_MASK & (c + AC_UNIT)) | (TC_MASK & (c + TC_UNIT))); if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) { createWorker(false); break; } } while (((c = ct...
java
private void tryAddWorker(long c) { do { long nc = ((AC_MASK & (c + AC_UNIT)) | (TC_MASK & (c + TC_UNIT))); if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) { createWorker(false); break; } } while (((c = ct...
[ "private", "void", "tryAddWorker", "(", "long", "c", ")", "{", "do", "{", "long", "nc", "=", "(", "(", "AC_MASK", "&", "(", "c", "+", "AC_UNIT", ")", ")", "|", "(", "TC_MASK", "&", "(", "c", "+", "TC_UNIT", ")", ")", ")", ";", "if", "(", "ctl...
Tries to add one worker, incrementing ctl counts before doing so, relying on createWorker to back out on failure. @param c incoming ctl value, with total count negative and no idle workers. On CAS failure, c is refreshed and retried if this holds (otherwise, a new worker is not needed).
[ "Tries", "to", "add", "one", "worker", "incrementing", "ctl", "counts", "before", "doing", "so", "relying", "on", "createWorker", "to", "back", "out", "on", "failure", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1566-L1575
train
Try to add a worker to the tcl.
Of course, here is the Java code you requested: ```java private void tryAddWorker(long c) { do { long nc = ((AC_MASK & (c + AC_UNIT)) | (TC_MASK & (c + TC_UNIT))); if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) { createWorker(false); ...
alkacon/opencms-core
src/org/opencms/configuration/CmsSystemConfiguration.java
CmsSystemConfiguration.getSessionStorageProvider
public I_CmsSessionStorageProvider getSessionStorageProvider() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_sessionStorageProvider)) { return new CmsDefaultSessionStorageProvider(); } try { I_CmsSessionStorageProvider sessionCacheProvider = (I_CmsSessionStorageProvider)...
java
public I_CmsSessionStorageProvider getSessionStorageProvider() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_sessionStorageProvider)) { return new CmsDefaultSessionStorageProvider(); } try { I_CmsSessionStorageProvider sessionCacheProvider = (I_CmsSessionStorageProvider)...
[ "public", "I_CmsSessionStorageProvider", "getSessionStorageProvider", "(", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "m_sessionStorageProvider", ")", ")", "{", "return", "new", "CmsDefaultSessionStorageProvider", "(", ")", ";", "}", "try...
Returns an instance of the configured session storage provider.<p> @return an instance of the configured session storage provider
[ "Returns", "an", "instance", "of", "the", "configured", "session", "storage", "provider", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsSystemConfiguration.java#L1813-L1836
train
Gets the session storage provider.
Of course, here is the Java code you requested: ```java public I_CmsSessionStorageProvider getSessionStorageProvider() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_sessionStorageProvider)) { return new CmsDefaultSessionStorageProvider(); } try { I_CmsSessionStorageProv...
OpenLiberty/open-liberty
dev/com.ibm.ws.persistence/src/com/ibm/wsspi/persistence/internal/eclipselink/PsPersistenceProvider.java
PsPersistenceProvider.createContainerEMF
public EntityManagerFactory createContainerEMF(PersistenceUnitInfo info, Map<?, ?> properties, boolean requiresConnection) { return super.createContainerEntityManagerFactoryImpl(info, properties, requiresConnection); }
java
public EntityManagerFactory createContainerEMF(PersistenceUnitInfo info, Map<?, ?> properties, boolean requiresConnection) { return super.createContainerEntityManagerFactoryImpl(info, properties, requiresConnection); }
[ "public", "EntityManagerFactory", "createContainerEMF", "(", "PersistenceUnitInfo", "info", ",", "Map", "<", "?", ",", "?", ">", "properties", ",", "boolean", "requiresConnection", ")", "{", "return", "super", ".", "createContainerEntityManagerFactoryImpl", "(", "info...
This method exists to give us access to the protected method createEntityManagerFactoryImpl(...)
[ "This", "method", "exists", "to", "give", "us", "access", "to", "the", "protected", "method", "createEntityManagerFactoryImpl", "(", "...", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.persistence/src/com/ibm/wsspi/persistence/internal/eclipselink/PsPersistenceProvider.java#L29-L32
train
Create a container EntityManagerFactory.
Of course, here is the Java code you requested: ```java public EntityManagerFactory createContainerEMF(PersistenceUnitInfo info, Map<?, ?> properties, boolean requiresConnection) { return super.createContainerEntityManagerFactoryImpl(info, properties, requiresConnection); } ``` Hope this help...
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/util/image/ApptentiveAttachmentLoader.java
ApptentiveAttachmentLoader.getInstance
public static ApptentiveAttachmentLoader getInstance() { if (instance == null) { synchronized (ApptentiveAttachmentLoader.class) { if (instance == null) { instance = new ApptentiveAttachmentLoader(); } } } return instance; }
java
public static ApptentiveAttachmentLoader getInstance() { if (instance == null) { synchronized (ApptentiveAttachmentLoader.class) { if (instance == null) { instance = new ApptentiveAttachmentLoader(); } } } return instance; }
[ "public", "static", "ApptentiveAttachmentLoader", "getInstance", "(", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "synchronized", "(", "ApptentiveAttachmentLoader", ".", "class", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "instance",...
Returns singleton class instance
[ "Returns", "singleton", "class", "instance" ]
887c08d7bd5ae6488a90366dfb58f58938861a93
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/image/ApptentiveAttachmentLoader.java#L59-L68
train
Returns the instance of the ApptentiveAttachmentLoader.
Of course, here is the Java code you requested: ```java public static ApptentiveAttachmentLoader getInstance() { if (instance == null) { synchronized (ApptentiveAttachmentLoader.class) { if (instance == null) { instance = new ApptentiveAttachmentLoader(); } } } return instance; } ``` Hope th...
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/utils/ProcessorUtilities.java
ProcessorUtilities.cloneTopic
public static TopicWrapper cloneTopic(final DataProviderFactory providerFactory, final ITopicNode specTopic, final ServerEntitiesWrapper serverEntities) { final TopicProvider topicProvider = providerFactory.getProvider(TopicProvider.class); final TopicSourceURLProvider topicSourceUrlProvider...
java
public static TopicWrapper cloneTopic(final DataProviderFactory providerFactory, final ITopicNode specTopic, final ServerEntitiesWrapper serverEntities) { final TopicProvider topicProvider = providerFactory.getProvider(TopicProvider.class); final TopicSourceURLProvider topicSourceUrlProvider...
[ "public", "static", "TopicWrapper", "cloneTopic", "(", "final", "DataProviderFactory", "providerFactory", ",", "final", "ITopicNode", "specTopic", ",", "final", "ServerEntitiesWrapper", "serverEntities", ")", "{", "final", "TopicProvider", "topicProvider", "=", "providerF...
Clones a Topic, resets the Added By and CSP ID properties and ignores assigned writers when cloning. @param providerFactory @param specTopic The SpecTopic object that represents a topic. @param serverEntities @return The cloned topic wrapper entity.
[ "Clones", "a", "Topic", "resets", "the", "Added", "By", "and", "CSP", "ID", "properties", "and", "ignores", "assigned", "writers", "when", "cloning", "." ]
85ffac047c4ede0f972364ab1f03f7d61a4de5f1
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/utils/ProcessorUtilities.java#L155-L249
train
Clones a topic from the database.
Of course, here is the Java code you requested: ```java public static TopicWrapper cloneTopic(final DataProviderFactory providerFactory, final ITopicNode specTopic, final ServerEntitiesWrapper serverEntities) { final TopicProvider topicProvider = providerFactory.getProvider(TopicProvider.class); ...
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/ApplicationMngrImpl.java
ApplicationMngrImpl.checkErrors
static void checkErrors( Collection<RoboconfError> errors, Logger logger ) throws InvalidApplicationException { if( RoboconfErrorHelpers.containsCriticalErrors( errors )) throw new InvalidApplicationException( errors ); // Null language => English (right language for logs) Collection<RoboconfError> warnings...
java
static void checkErrors( Collection<RoboconfError> errors, Logger logger ) throws InvalidApplicationException { if( RoboconfErrorHelpers.containsCriticalErrors( errors )) throw new InvalidApplicationException( errors ); // Null language => English (right language for logs) Collection<RoboconfError> warnings...
[ "static", "void", "checkErrors", "(", "Collection", "<", "RoboconfError", ">", "errors", ",", "Logger", "logger", ")", "throws", "InvalidApplicationException", "{", "if", "(", "RoboconfErrorHelpers", ".", "containsCriticalErrors", "(", "errors", ")", ")", "throw", ...
A method to check errors. @param errors a non-null list of errors @param logger a logger @throws InvalidApplicationException if there are critical errors
[ "A", "method", "to", "check", "errors", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/ApplicationMngrImpl.java#L336-L346
train
Checks the errors.
Of course, here is the Java code you requested: ```java static void checkErrors( Collection<RoboconfError> errors, Logger logger ) throws InvalidApplicationException { if( RoboconfErrorHelpers.containsCriticalErrors( errors )) throw new InvalidApplicationException( errors ); // Null language => English (righ...
demidenko05/beigesoft-accounting
src/main/java/org/beigesoft/accounting/processor/PrcSalesInvoiceSave.java
PrcSalesInvoiceSave.makeFirstPrepareForSave
@Override public final void makeFirstPrepareForSave(final Map<String, Object> pReqVars, final SalesInvoice pEntity, final IRequestData pRequestData) throws Exception { if (pEntity.getPrepaymentFrom() != null) { pEntity.setPrepaymentFrom(getSrvOrm() .retrieveEntity(pReqVars, pEntity.getPrep...
java
@Override public final void makeFirstPrepareForSave(final Map<String, Object> pReqVars, final SalesInvoice pEntity, final IRequestData pRequestData) throws Exception { if (pEntity.getPrepaymentFrom() != null) { pEntity.setPrepaymentFrom(getSrvOrm() .retrieveEntity(pReqVars, pEntity.getPrep...
[ "@", "Override", "public", "final", "void", "makeFirstPrepareForSave", "(", "final", "Map", "<", "String", ",", "Object", ">", "pReqVars", ",", "final", "SalesInvoice", "pEntity", ",", "final", "IRequestData", "pRequestData", ")", "throws", "Exception", "{", "if...
<p>Make save preparations before insert/update block if it's need.</p> @param pReqVars additional param @param pEntity entity @param pRequestData Request Data @throws Exception - an exception
[ "<p", ">", "Make", "save", "preparations", "before", "insert", "/", "update", "block", "if", "it", "s", "need", ".", "<", "/", "p", ">" ]
e6f423949008218ddd05953b078f1ea8805095c1
https://github.com/demidenko05/beigesoft-accounting/blob/e6f423949008218ddd05953b078f1ea8805095c1/src/main/java/org/beigesoft/accounting/processor/PrcSalesInvoiceSave.java#L50-L90
train
This method is called to make the first prepare for save.
Of course, here is the Java code you requested: ```java @Override public final void makeFirstPrepareForSave(final Map<String, Object> pReqVars, final SalesInvoice pEntity, final IRequestData pRequestData) throws Exception { if (pEntity.getPrepaymentFrom() != null) { pEntity.setPrepaymentFrom(getS...
nmdp-bioinformatics/ngs
fca/src/main/java/org/nmdp/ngs/fca/Context.java
Context.powerset
public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) { return new Context(set, set, new NotEqual()); }
java
public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) { return new Context(set, set, new NotEqual()); }
[ "public", "static", "<", "G", "extends", "PartiallyOrdered", "<", "?", ">", ">", "Context", "powerset", "(", "final", "List", "<", "G", ">", "set", ")", "{", "return", "new", "Context", "(", "set", ",", "set", ",", "new", "NotEqual", "(", ")", ")", ...
Calculate the powerset lattice. @param <G> element type @param set of partially-ordered elements @return the powerset lattice
[ "Calculate", "the", "powerset", "lattice", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L200-L202
train
Create a new context from a set of objects.
Of course, here is the Java code you requested: ```java public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) { return new Context(set, set, new NotEqual()); } ``` Hope this helps!
kiegroup/jbpm
jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/BpsimFactoryImpl.java
BpsimFactoryImpl.convertResultTypeObjectToString
public String convertResultTypeObjectToString(EDataType eDataType, Object instanceValue) { return convertResultTypeToString(BpsimPackage.Literals.RESULT_TYPE, instanceValue); }
java
public String convertResultTypeObjectToString(EDataType eDataType, Object instanceValue) { return convertResultTypeToString(BpsimPackage.Literals.RESULT_TYPE, instanceValue); }
[ "public", "String", "convertResultTypeObjectToString", "(", "EDataType", "eDataType", ",", "Object", "instanceValue", ")", "{", "return", "convertResultTypeToString", "(", "BpsimPackage", ".", "Literals", ".", "RESULT_TYPE", ",", "instanceValue", ")", ";", "}" ]
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
c3473c728aa382ebbea01e380c5e754a96647b82
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/BpsimFactoryImpl.java#L639-L641
train
Convert result type object to string.
Of course, here is the Java code you requested: ```java public String convertResultTypeObjectToString(EDataType eDataType, Object instanceValue) { return convertResultTypeToString(BpsimPackage.Literals.RESULT_TYPE, instanceValue); } ``` Hope this helps!
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
AbstractIndexWriter.addContents
protected void addContents(Character uc, List<? extends Doc> memberlist, Content contentTree) { String unicode = uc.toString(); contentTree.addContent(getMarkerAnchorForIndex(unicode)); Content headContent = new StringContent(unicode); Content heading = HtmlTree.HEADING(HtmlC...
java
protected void addContents(Character uc, List<? extends Doc> memberlist, Content contentTree) { String unicode = uc.toString(); contentTree.addContent(getMarkerAnchorForIndex(unicode)); Content headContent = new StringContent(unicode); Content heading = HtmlTree.HEADING(HtmlC...
[ "protected", "void", "addContents", "(", "Character", "uc", ",", "List", "<", "?", "extends", "Doc", ">", "memberlist", ",", "Content", "contentTree", ")", "{", "String", "unicode", "=", "uc", ".", "toString", "(", ")", ";", "contentTree", ".", "addContent...
Add the member information for the unicode character along with the list of the members. @param unicode Unicode for which member list information to be generated @param memberlist List of members for the unicode character @param contentTree the content tree to which the information will be added
[ "Add", "the", "member", "information", "for", "the", "unicode", "character", "along", "with", "the", "list", "of", "the", "members", "." ]
8812d28c20f4de070a0dd6de1b45602431379834
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java#L92-L116
train
Add the contents for the page.
Of course, here is the Java code you requested: ```java protected void addContents(Character uc, List<? extends Doc> memberlist, Content contentTree) { String unicode = uc.toString(); contentTree.addContent(getMarkerAnchorForIndex(unicode)); Content headContent = new StringContent(u...
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyexpression.java
policyexpression.get_filtered
public static policyexpression[] get_filtered(nitro_service service, String filter) throws Exception{ policyexpression obj = new policyexpression(); options option = new options(); option.set_filter(filter); policyexpression[] response = (policyexpression[]) obj.getfiltered(service, option); return response; ...
java
public static policyexpression[] get_filtered(nitro_service service, String filter) throws Exception{ policyexpression obj = new policyexpression(); options option = new options(); option.set_filter(filter); policyexpression[] response = (policyexpression[]) obj.getfiltered(service, option); return response; ...
[ "public", "static", "policyexpression", "[", "]", "get_filtered", "(", "nitro_service", "service", ",", "String", "filter", ")", "throws", "Exception", "{", "policyexpression", "obj", "=", "new", "policyexpression", "(", ")", ";", "options", "option", "=", "new"...
Use this API to fetch filtered set of policyexpression resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "policyexpression", "resources", ".", "filter", "string", "should", "be", "in", "JSON", "format", ".", "eg", ":", "port", ":", "80", "servicetype", ":", "HTTP", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyexpression.java#L456-L462
train
Use this API to fetch filtered set of policyexpression resources. set the filter parameter values in filter parameter value.
Of course, here is the Java code you requested: ```java public static policyexpression[] get_filtered(nitro_service service, String filter) throws Exception{ policyexpression obj = new policyexpression(); options option = new options(); option.set_filter(filter); policyexpression[] response = (policyexpression...
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java
CurrentInProgressMetadata.read
public String read() throws IOException { CurrentInProgressMetadataWritable cip = localWritable.get(); if (readAndUpdateVersion(cip)) { return cip.getPath(); } else { if (LOG.isDebugEnabled()) { LOG.debug(fullyQualifiedZNode + " is currently clear."); } } return null; }
java
public String read() throws IOException { CurrentInProgressMetadataWritable cip = localWritable.get(); if (readAndUpdateVersion(cip)) { return cip.getPath(); } else { if (LOG.isDebugEnabled()) { LOG.debug(fullyQualifiedZNode + " is currently clear."); } } return null; }
[ "public", "String", "read", "(", ")", "throws", "IOException", "{", "CurrentInProgressMetadataWritable", "cip", "=", "localWritable", ".", "get", "(", ")", ";", "if", "(", "readAndUpdateVersion", "(", "cip", ")", ")", "{", "return", "cip", ".", "getPath", "(...
Read the full path to the ZNode holding the metadata for the ledger containing the current in-progress edit log segment or null if no segment is currently in-progress @return Full path to the ledger's metadata ZNode or null if no segment is in progress @throws IOException If there is an error talking to ZooKeeper
[ "Read", "the", "full", "path", "to", "the", "ZNode", "holding", "the", "metadata", "for", "the", "ledger", "containing", "the", "current", "in", "-", "progress", "edit", "log", "segment", "or", "null", "if", "no", "segment", "is", "currently", "in", "-", ...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java#L172-L182
train
Read the content of the ZNode.
Of course, here is the Java code you requested: ```java public String read() throws IOException { CurrentInProgressMetadataWritable cip = localWritable.get(); if (readAndUpdateVersion(cip)) { return cip.getPath(); } else { if (LOG.isDebugEnabled()) { LOG.debug(fullyQualifiedZNode + " is...
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/io/util/DataUtil.java
DataUtil.writeUnsignedIntegerBigEndian
public static void writeUnsignedIntegerBigEndian(byte[] buffer, int offset, long value) { buffer[offset++] = (byte)((value >> 24) & 0xFF); buffer[offset++] = (byte)((value >> 16) & 0xFF); buffer[offset++] = (byte)((value >> 8) & 0xFF); buffer[offset] = (byte)(value & 0xFF); }
java
public static void writeUnsignedIntegerBigEndian(byte[] buffer, int offset, long value) { buffer[offset++] = (byte)((value >> 24) & 0xFF); buffer[offset++] = (byte)((value >> 16) & 0xFF); buffer[offset++] = (byte)((value >> 8) & 0xFF); buffer[offset] = (byte)(value & 0xFF); }
[ "public", "static", "void", "writeUnsignedIntegerBigEndian", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "long", "value", ")", "{", "buffer", "[", "offset", "++", "]", "=", "(", "byte", ")", "(", "(", "value", ">>", "24", ")", "&", "0...
big-endian or motorola format.
[ "big", "-", "endian", "or", "motorola", "format", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/util/DataUtil.java#L513-L518
train
Write an unsigned integer in big - endian order.
Of course, here is the Java code you requested: ```java public static void writeUnsignedIntegerBigEndian(byte[] buffer, int offset, long value) { buffer[offset++] = (byte)((value >> 24) & 0xFF); buffer[offset++] = (byte)((value >> 16) & 0xFF); buffer[offset++] = (byte)((value >> 8) & 0xFF); buffer[offset] ...
ivanceras/orm
src/main/java/com/ivanceras/db/server/core/DB_Jdbc.java
DB_Jdbc.executeSelect
public DAO[] executeSelect(String sql, Object[] parameters) throws DatabaseException { ResultSet rs = executeSelectSQL(sql, parameters, null, false); return resultSetToDAO(rs, null); }
java
public DAO[] executeSelect(String sql, Object[] parameters) throws DatabaseException { ResultSet rs = executeSelectSQL(sql, parameters, null, false); return resultSetToDAO(rs, null); }
[ "public", "DAO", "[", "]", "executeSelect", "(", "String", "sql", ",", "Object", "[", "]", "parameters", ")", "throws", "DatabaseException", "{", "ResultSet", "rs", "=", "executeSelectSQL", "(", "sql", ",", "parameters", ",", "null", ",", "false", ")", ";"...
Execute generic SQL statement @param sql @param parameters @return @throws DatabaseException
[ "Execute", "generic", "SQL", "statement" ]
e63213cb8abefd11df0e2d34b1c95477788e600e
https://github.com/ivanceras/orm/blob/e63213cb8abefd11df0e2d34b1c95477788e600e/src/main/java/com/ivanceras/db/server/core/DB_Jdbc.java#L330-L334
train
Execute a SQL SELECT statement and return a list of DAO objects.
Of course, here is the Java code you requested: ```java public DAO[] executeSelect(String sql, Object[] parameters) throws DatabaseException { ResultSet rs = executeSelectSQL(sql, parameters, null, false); return resultSetToDAO(rs, null); } ``` Hope this helps!
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlPostProfileHandlerEndpoint.java
SSOSamlPostProfileHandlerEndpoint.produce
@GetMapping(produces = MediaType.APPLICATION_XML_VALUE) @ResponseBody public ResponseEntity<Object> produce(final HttpServletRequest request, final HttpServletResponse response) { val username = request.getParameter("username"); val password = request.getParameter("password"); val entity...
java
@GetMapping(produces = MediaType.APPLICATION_XML_VALUE) @ResponseBody public ResponseEntity<Object> produce(final HttpServletRequest request, final HttpServletResponse response) { val username = request.getParameter("username"); val password = request.getParameter("password"); val entity...
[ "@", "GetMapping", "(", "produces", "=", "MediaType", ".", "APPLICATION_XML_VALUE", ")", "@", "ResponseBody", "public", "ResponseEntity", "<", "Object", ">", "produce", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", "...
Produce response entity. @param request the request @param response the response @return the response entity
[ "Produce", "response", "entity", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlPostProfileHandlerEndpoint.java#L88-L122
train
Produce response entity.
Of course, here is the Java code you requested: ```java @GetMapping(produces = MediaType.APPLICATION_XML_VALUE) @ResponseBody public ResponseEntity<Object> produce(final HttpServletRequest request, final HttpServletResponse response) { val username = request.getParameter("username"); val passwo...
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/utilities/Logger.java
Logger.printError
public static void printError(Class<?> c, String msg) { String preamble; if(c != null) preamble = "["+c.getSimpleName()+"]"; else preamble = ""; synchronized(System.err) { System.err.println(preamble+" "+msg); } }
java
public static void printError(Class<?> c, String msg) { String preamble; if(c != null) preamble = "["+c.getSimpleName()+"]"; else preamble = ""; synchronized(System.err) { System.err.println(preamble+" "+msg); } }
[ "public", "static", "void", "printError", "(", "Class", "<", "?", ">", "c", ",", "String", "msg", ")", "{", "String", "preamble", ";", "if", "(", "c", "!=", "null", ")", "preamble", "=", "\"[\"", "+", "c", ".", "getSimpleName", "(", ")", "+", "\"]\...
print an ERROR-Level message with package name @param component Component from which the message originates @param msg ERROR-Level message
[ "print", "an", "ERROR", "-", "Level", "message", "with", "package", "name" ]
4ef5002eb5ecfeb818086ff7e394e792ee360335
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/utilities/Logger.java#L54-L64
train
Print an error message to the standard error stream.
Of course, here is the Java code you requested: ```java public static void printError(Class<?> c, String msg) { String preamble; if(c != null) preamble = "["+c.getSimpleName()+"]"; else preamble = ""; synchronized(System.err) { System.err.println(preamble+" "+msg); } } ``` Hope this helps!
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/SVD.java
SVD.loadJamaMatrixClass
private static Class<?> loadJamaMatrixClass() throws ClassNotFoundException { try { Class<?> clazz = Class.forName("Jama.Matrix"); return clazz; } catch (ClassNotFoundException cnfe) { // If we see a CNFE, don't immediately give up. It's m...
java
private static Class<?> loadJamaMatrixClass() throws ClassNotFoundException { try { Class<?> clazz = Class.forName("Jama.Matrix"); return clazz; } catch (ClassNotFoundException cnfe) { // If we see a CNFE, don't immediately give up. It's m...
[ "private", "static", "Class", "<", "?", ">", "loadJamaMatrixClass", "(", ")", "throws", "ClassNotFoundException", "{", "try", "{", "Class", "<", "?", ">", "clazz", "=", "Class", ".", "forName", "(", "\"Jama.Matrix\"", ")", ";", "return", "clazz", ";", "}",...
Reflectively loads the JAMA Matrix class. If the class is not immediately loadable from the existing classpath, then this method will attempt to use the {@code jama.path} system environment variable to load it from an external resource.
[ "Reflectively", "loads", "the", "JAMA", "Matrix", "class", ".", "If", "the", "class", "is", "not", "immediately", "loadable", "from", "the", "existing", "classpath", "then", "this", "method", "will", "attempt", "to", "use", "the", "{" ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/SVD.java#L461-L495
train
Load the Jama Matrix class.
Of course, here is the Java code you requested: ```java private static Class<?> loadJamaMatrixClass() throws ClassNotFoundException { try { Class<?> clazz = Class.forName("Jama.Matrix"); return clazz; } catch (ClassNotFoundException cnfe) { ...
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/DBUpdate.java
DBUpdate.bit
public static Builder bit(String field, String operation1, int value1, String operation2, int value2) { return new Builder().bit(field, operation1, value1, operation2, value2); }
java
public static Builder bit(String field, String operation1, int value1, String operation2, int value2) { return new Builder().bit(field, operation1, value1, operation2, value2); }
[ "public", "static", "Builder", "bit", "(", "String", "field", ",", "String", "operation1", ",", "int", "value1", ",", "String", "operation2", ",", "int", "value2", ")", "{", "return", "new", "Builder", "(", ")", ".", "bit", "(", "field", ",", "operation1...
Perform two bit operations on the given field @param field The field to perform the operations on @param operation1 The first operation to perform @param value1 The first value @param operation2 The second operation to perform @param value2 The second value @return this object
[ "Perform", "two", "bit", "operations", "on", "the", "given", "field" ]
ecd189aefa89636cddf70fb383f5d676be347976
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/DBUpdate.java#L235-L237
train
Create a new instance with a bit field.
Of course, here is the Java code you requested: ```java public static Builder bit(String field, String operation1, int value1, String operation2, int value2) { return new Builder().bit(field, operation1, value1, operation2, value2); } ``` Hope this helps!
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.performMaintenanceAsync
public ServiceFuture<OperationStatusResponseInner> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupN...
java
public ServiceFuture<OperationStatusResponseInner> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupN...
[ "public", "ServiceFuture", "<", "OperationStatusResponseInner", ">", "performMaintenanceAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ",", "final", "ServiceCallback", "<", "OperationStatusRespo...
Perform maintenance on one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the opera...
[ "Perform", "maintenance", "on", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java#L3279-L3281
train
Perform maintenance on a VM scale set.
Of course, here is the Java code you requested: ```java public ServiceFuture<OperationStatusResponseInner> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(...
audit4j/audit4j-core
src/main/java/org/audit4j/core/util/ReflectUtil.java
ReflectUtil.getNewInstance
public I getNewInstance(Class<I> clazz) { Constructor<I> ctor; try { ctor = clazz.getConstructor(); return ctor.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException |...
java
public I getNewInstance(Class<I> clazz) { Constructor<I> ctor; try { ctor = clazz.getConstructor(); return ctor.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException |...
[ "public", "I", "getNewInstance", "(", "Class", "<", "I", ">", "clazz", ")", "{", "Constructor", "<", "I", ">", "ctor", ";", "try", "{", "ctor", "=", "clazz", ".", "getConstructor", "(", ")", ";", "return", "ctor", ".", "newInstance", "(", ")", ";", ...
Gets the new instance. @param clazz the clazz @return the new instance
[ "Gets", "the", "new", "instance", "." ]
dc8569108851e64cb0ecc7a39048db0ad070fba2
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/util/ReflectUtil.java#L44-L53
train
Gets the new instance of the class.
Of course, here is the Java code you requested: ```java public I getNewInstance(Class<I> clazz) { Constructor<I> ctor; try { ctor = clazz.getConstructor(); return ctor.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAcc...
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/UnionImpl.java
UnionImpl.processVer2
private void processVer2(final Memory skMem) { Util.checkSeedHashes(seedHash_, skMem.getShort(SEED_HASH_SHORT)); final int preLongs = skMem.getByte(PREAMBLE_LONGS_BYTE) & 0X3F; final int curCount = skMem.getInt(RETAINED_ENTRIES_INT); final long thetaLongIn; if (preLongs == 1) { //does not change any...
java
private void processVer2(final Memory skMem) { Util.checkSeedHashes(seedHash_, skMem.getShort(SEED_HASH_SHORT)); final int preLongs = skMem.getByte(PREAMBLE_LONGS_BYTE) & 0X3F; final int curCount = skMem.getInt(RETAINED_ENTRIES_INT); final long thetaLongIn; if (preLongs == 1) { //does not change any...
[ "private", "void", "processVer2", "(", "final", "Memory", "skMem", ")", "{", "Util", ".", "checkSeedHashes", "(", "seedHash_", ",", "skMem", ".", "getShort", "(", "SEED_HASH_SHORT", ")", ")", ";", "final", "int", "preLongs", "=", "skMem", ".", "getByte", "...
can only be compact, ordered, size >= 8
[ "can", "only", "be", "compact", "ordered", "size", ">", "=", "8" ]
900c8c9668a1e2f1d54d453e956caad54702e540
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/UnionImpl.java#L423-L446
train
Process the version 2 of the Memory.
Of course, here is the Java code you requested: ```java private void processVer2(final Memory skMem) { Util.checkSeedHashes(seedHash_, skMem.getShort(SEED_HASH_SHORT)); final int preLongs = skMem.getByte(PREAMBLE_LONGS_BYTE) & 0X3F; final int curCount = skMem.getInt(RETAINED_ENTRIES_INT); final long th...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/StringMatcher.java
StringMatcher.handleGet
void handleGet( Object value, MatchSpaceKey msg, EvalCache cache, Object contextValue, SearchResults result) throws MatchingException, BadMessageFormatMatchingException { if (tc.isEntryEnabled()) tc.entry( this, cclass, "handleGet", "value: " ...
java
void handleGet( Object value, MatchSpaceKey msg, EvalCache cache, Object contextValue, SearchResults result) throws MatchingException, BadMessageFormatMatchingException { if (tc.isEntryEnabled()) tc.entry( this, cclass, "handleGet", "value: " ...
[ "void", "handleGet", "(", "Object", "value", ",", "MatchSpaceKey", "msg", ",", "EvalCache", "cache", ",", "Object", "contextValue", ",", "SearchResults", "result", ")", "throws", "MatchingException", ",", "BadMessageFormatMatchingException", "{", "if", "(", "tc", ...
------------------------------------------------------------------------------
[ "------------------------------------------------------------------------------" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/StringMatcher.java#L90-L120
train
Handle a get of a single node.
Of course, here is the Java code you requested: ```java void handleGet( Object value, MatchSpaceKey msg, EvalCache cache, Object contextValue, SearchResults result) throws MatchingException, BadMessageFormatMatchingException { if (tc.isEntryEnabled()) tc.entry( this, ...
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java
EJBObjectInfo.addFieldInfo
void addFieldInfo(String className, List<FieldInfo> fieldInfoList) { if (ivFieldInfoMap == null) { ivFieldInfoMap = new HashMap<String, List<FieldInfo>>(); } ivFieldInfoMap.put(className, fieldInfoList); }
java
void addFieldInfo(String className, List<FieldInfo> fieldInfoList) { if (ivFieldInfoMap == null) { ivFieldInfoMap = new HashMap<String, List<FieldInfo>>(); } ivFieldInfoMap.put(className, fieldInfoList); }
[ "void", "addFieldInfo", "(", "String", "className", ",", "List", "<", "FieldInfo", ">", "fieldInfoList", ")", "{", "if", "(", "ivFieldInfoMap", "==", "null", ")", "{", "ivFieldInfoMap", "=", "new", "HashMap", "<", "String", ",", "List", "<", "FieldInfo", "...
Adds the className and fieldInfoList to the ivFieldInfoMap. @param className @param fieldInfoList
[ "Adds", "the", "className", "and", "fieldInfoList", "to", "the", "ivFieldInfoMap", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java#L76-L81
train
Add a field info to the class.
Of course, here is the Java code you requested: ```java void addFieldInfo(String className, List<FieldInfo> fieldInfoList) { if (ivFieldInfoMap == null) { ivFieldInfoMap = new HashMap<String, List<FieldInfo>>(); } ivFieldInfoMap.put(className, fieldInfoList); } ``` Hope this he...
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/assistant/definition/SClassDefinitionAssistantTC.java
SClassDefinitionAssistantTC.findMatches
public Set<PDefinition> findMatches(SClassDefinition classdef, ILexNameToken sought) { Set<PDefinition> set = af.createPDefinitionListAssistant().findMatches(classdef.getDefinitions(), sought); set.addAll(af.createPDefinitionListAssistant().findMatches(classdef.getAllInheritedDefinitions(), sought)); return ...
java
public Set<PDefinition> findMatches(SClassDefinition classdef, ILexNameToken sought) { Set<PDefinition> set = af.createPDefinitionListAssistant().findMatches(classdef.getDefinitions(), sought); set.addAll(af.createPDefinitionListAssistant().findMatches(classdef.getAllInheritedDefinitions(), sought)); return ...
[ "public", "Set", "<", "PDefinition", ">", "findMatches", "(", "SClassDefinition", "classdef", ",", "ILexNameToken", "sought", ")", "{", "Set", "<", "PDefinition", ">", "set", "=", "af", ".", "createPDefinitionListAssistant", "(", ")", ".", "findMatches", "(", ...
}
[ "}" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/assistant/definition/SClassDefinitionAssistantTC.java#L162-L169
train
Find matches of a class definition.
Of course, here is the Java code you requested: ```java public Set<PDefinition> findMatches(SClassDefinition classdef, ILexNameToken sought) { Set<PDefinition> set = af.createPDefinitionListAssistant().findMatches(classdef.getDefinitions(), sought); set.addAll(af.createPDefinitionListAssistant().findMatches(c...
openengsb/openengsb
components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java
ManipulationUtils.getFieldGetter
private static CtMethod getFieldGetter(CtField field, CtClass clazz) throws NotFoundException { if (field == null) { return null; } return getFieldGetter(field, clazz, false); }
java
private static CtMethod getFieldGetter(CtField field, CtClass clazz) throws NotFoundException { if (field == null) { return null; } return getFieldGetter(field, clazz, false); }
[ "private", "static", "CtMethod", "getFieldGetter", "(", "CtField", "field", ",", "CtClass", "clazz", ")", "throws", "NotFoundException", "{", "if", "(", "field", "==", "null", ")", "{", "return", "null", ";", "}", "return", "getFieldGetter", "(", "field", ",...
Returns the getter to a given field of the given class object and returns null if there is no getter for the given field defined.
[ "Returns", "the", "getter", "to", "a", "given", "field", "of", "the", "given", "class", "object", "and", "returns", "null", "if", "there", "is", "no", "getter", "for", "the", "given", "field", "defined", "." ]
d39058000707f617cd405629f9bc7f17da7b414a
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java#L435-L440
train
Gets the getter for a field.
Of course, here is the Java code you requested: ```java private static CtMethod getFieldGetter(CtField field, CtClass clazz) throws NotFoundException { if (field == null) { return null; } return getFieldGetter(field, clazz, false); } ``` Hope this helps!
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/AbstractPubSubHub.java
AbstractPubSubHub.deserialize
protected <T extends IMessage<ID, DATA>> T deserialize(byte[] msgData, Class<T> clazz) { return msgData != null ? SerializationUtils.fromByteArray(msgData, clazz) : null; }
java
protected <T extends IMessage<ID, DATA>> T deserialize(byte[] msgData, Class<T> clazz) { return msgData != null ? SerializationUtils.fromByteArray(msgData, clazz) : null; }
[ "protected", "<", "T", "extends", "IMessage", "<", "ID", ",", "DATA", ">", ">", "T", "deserialize", "(", "byte", "[", "]", "msgData", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "msgData", "!=", "null", "?", "SerializationUtils", ".", "...
Deserialize a message. @param msgData @return
[ "Deserialize", "a", "message", "." ]
b20776850d23111d3d71fc8ed6023c590bc3621f
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/AbstractPubSubHub.java#L113-L115
train
Deserialize a byte array into an IMessage.
Of course, here is the Java code you requested: ```java protected <T extends IMessage<ID, DATA>> T deserialize(byte[] msgData, Class<T> clazz) { return msgData != null ? SerializationUtils.fromByteArray(msgData, clazz) : null; } ``` Hope this helps!
vanilladb/vanillacore
src/main/java/org/vanilladb/core/sql/VarcharConstantRange.java
VarcharConstantRange.applyLow
@Override public ConstantRange applyLow(Constant c, boolean incl) { if (!(c instanceof VarcharConstant)) throw new IllegalArgumentException(); VarcharConstant l = low; boolean li = lowIncl; if (low.compareTo(c) < 0) { l = (VarcharConstant) c; li = incl; } else if (low.compareTo(c) == 0 && l...
java
@Override public ConstantRange applyLow(Constant c, boolean incl) { if (!(c instanceof VarcharConstant)) throw new IllegalArgumentException(); VarcharConstant l = low; boolean li = lowIncl; if (low.compareTo(c) < 0) { l = (VarcharConstant) c; li = incl; } else if (low.compareTo(c) == 0 && l...
[ "@", "Override", "public", "ConstantRange", "applyLow", "(", "Constant", "c", ",", "boolean", "incl", ")", "{", "if", "(", "!", "(", "c", "instanceof", "VarcharConstant", ")", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "VarcharConstant", ...
/* Constant operations.
[ "/", "*", "Constant", "operations", "." ]
d9a34e876b1b83226036d1fa982a614bbef59bd1
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/sql/VarcharConstantRange.java#L265-L277
train
Override the method to apply the low constraint to this range.
Of course, here is the Java code you requested: ```java @Override public ConstantRange applyLow(Constant c, boolean incl) { if (!(c instanceof VarcharConstant)) throw new IllegalArgumentException(); VarcharConstant l = low; boolean li = lowIncl; if (low.compareTo(c) < 0) { l = (VarcharConstant) c...
ltsopensource/light-task-scheduler
lts-core/src/main/java/com/github/ltsopensource/json/bean/JavaBeanSetterInfo.java
JavaBeanSetterInfo.getFiledSetterInfos
public Map<String, FieldSetterInfo> getFiledSetterInfos() { Map<String, FieldSetterInfo> map = new HashMap<String, FieldSetterInfo>(); for (Field field : clazz.getFields()) { if (Modifier.isStatic(field.getModifiers())) { continue; } if (Modifier.is...
java
public Map<String, FieldSetterInfo> getFiledSetterInfos() { Map<String, FieldSetterInfo> map = new HashMap<String, FieldSetterInfo>(); for (Field field : clazz.getFields()) { if (Modifier.isStatic(field.getModifiers())) { continue; } if (Modifier.is...
[ "public", "Map", "<", "String", ",", "FieldSetterInfo", ">", "getFiledSetterInfos", "(", ")", "{", "Map", "<", "String", ",", "FieldSetterInfo", ">", "map", "=", "new", "HashMap", "<", "String", ",", "FieldSetterInfo", ">", "(", ")", ";", "for", "(", "Fi...
返回所有的public方法
[ "返回所有的public方法" ]
64d3aa000ff5022be5e94f511b58f405e5f4c8eb
https://github.com/ltsopensource/light-task-scheduler/blob/64d3aa000ff5022be5e94f511b58f405e5f4c8eb/lts-core/src/main/java/com/github/ltsopensource/json/bean/JavaBeanSetterInfo.java#L152-L177
train
Gets the filed setter infos.
Of course, here is the Java code you requested: ```java public Map<String, FieldSetterInfo> getFiledSetterInfos() { Map<String, FieldSetterInfo> map = new HashMap<String, FieldSetterInfo>(); for (Field field : clazz.getFields()) { if (Modifier.isStatic(field.getModifiers())) { ...
Unidata/thredds
legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java
NetcdfFileWriteable.addDimension
public Dimension addDimension(String dimName, int length) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (length <= 0) throw new IllegalArgumentException("dimension length must be > 0 :"+length); if (!N3iosp.isValidNetcdfObjectName(dimName)) throw new ...
java
public Dimension addDimension(String dimName, int length) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (length <= 0) throw new IllegalArgumentException("dimension length must be > 0 :"+length); if (!N3iosp.isValidNetcdfObjectName(dimName)) throw new ...
[ "public", "Dimension", "addDimension", "(", "String", "dimName", ",", "int", "length", ")", "{", "if", "(", "!", "defineMode", ")", "throw", "new", "UnsupportedOperationException", "(", "\"not in define mode\"", ")", ";", "if", "(", "length", "<=", "0", ")", ...
Add a Dimension to the file. Must be in define mode. @param dimName name of dimension @param length size of dimension. @return the created dimension
[ "Add", "a", "Dimension", "to", "the", "file", ".", "Must", "be", "in", "define", "mode", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java#L215-L226
test
Add a dimension to the image.
Of course, here is the Java code you requested: ```java public Dimension addDimension(String dimName, int length) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (length <= 0) throw new IllegalArgumentException("dimension length must be > 0 :"+length); if (!...
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java
ViewHelper.setImageResource
public static void setImageResource(EfficientCacheView cacheView, int viewId, @DrawableRes int resId) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof ImageView) { ((ImageView) view).setImageResource(resId); } }
java
public static void setImageResource(EfficientCacheView cacheView, int viewId, @DrawableRes int resId) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof ImageView) { ((ImageView) view).setImageResource(resId); } }
[ "public", "static", "void", "setImageResource", "(", "EfficientCacheView", "cacheView", ",", "int", "viewId", ",", "@", "DrawableRes", "int", "resId", ")", "{", "View", "view", "=", "cacheView", ".", "findViewByIdEfficient", "(", "viewId", ")", ";", "if", "(",...
Equivalent to calling ImageView.setImageResource @param cacheView The cache of views to get the view from @param viewId The id of the view whose image should change @param resId the resource identifier of the drawable
[ "Equivalent", "to", "calling", "ImageView", ".", "setImageResource" ]
0bcc3a20182cbce9d7901e1e2a9104251637167d
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java#L186-L192
train
Set the ImageResource of a specific view.
Of course, here is the Java code you requested: ```java public static void setImageResource(EfficientCacheView cacheView, int viewId, @DrawableRes int resId) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof ImageView) { ((ImageView) view).setImageResour...
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.eachObject
public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException { try { while (true) { try { Object obj = ois.readObject(); // we allow null objects in the object stream closu...
java
public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException { try { while (true) { try { Object obj = ois.readObject(); // we allow null objects in the object stream closu...
[ "public", "static", "void", "eachObject", "(", "ObjectInputStream", "ois", ",", "Closure", "closure", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "try", "{", "while", "(", "true", ")", "{", "try", "{", "Object", "obj", "=", "ois", ".", ...
Iterates through the given object stream object by object. The ObjectInputStream is closed afterwards. @param ois an ObjectInputStream, closed after the operation @param closure a closure @throws IOException if an IOException occurs. @throws ClassNotFoundException if the class is not found. @since 1.0
[ "Iterates", "through", "the", "given", "object", "stream", "object", "by", "object", ".", "The", "ObjectInputStream", "is", "closed", "afterwards", "." ]
71cf20addb611bb8d097a59e395fd20bc7f31772
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L299-L316
train
Iterate over the objects in the given input stream.
Of course, here is the Java code you requested: ```java public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException { try { while (true) { try { Object obj = ois.readObject(); // we allow nu...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMsgPart.java
JsMsgPart.setPart
void setPart(int accessor, JMFSchema schema) { try { jmfPart.setValue(accessor, jmfPart.newNativePart(schema)); } catch (JMFException e) { FFDCFilter.processException(e, "setDynamicField", "196", this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "set...
java
void setPart(int accessor, JMFSchema schema) { try { jmfPart.setValue(accessor, jmfPart.newNativePart(schema)); } catch (JMFException e) { FFDCFilter.processException(e, "setDynamicField", "196", this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "set...
[ "void", "setPart", "(", "int", "accessor", ",", "JMFSchema", "schema", ")", "{", "try", "{", "jmfPart", ".", "setValue", "(", "accessor", ",", "jmfPart", ".", "newNativePart", "(", "schema", ")", ")", ";", "}", "catch", "(", "JMFException", "e", ")", "...
Set a dynamic field to an empty message of appropriate type
[ "Set", "a", "dynamic", "field", "to", "an", "empty", "message", "of", "appropriate", "type" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMsgPart.java#L173-L180
train
Set a single part of the message.
Of course, here is the Java code you requested: ```java void setPart(int accessor, JMFSchema schema) { try { jmfPart.setValue(accessor, jmfPart.newNativePart(schema)); } catch (JMFException e) { FFDCFilter.processException(e, "setDynamicField", "196", this); if (TraceComponent.isAnyTracingEna...
aws/aws-sdk-java
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/AmazonKinesisVideoMediaClient.java
AmazonKinesisVideoMediaClient.getMedia
@Override public GetMediaResult getMedia(GetMediaRequest request) { request = beforeClientExecution(request); return executeGetMedia(request); }
java
@Override public GetMediaResult getMedia(GetMediaRequest request) { request = beforeClientExecution(request); return executeGetMedia(request); }
[ "@", "Override", "public", "GetMediaResult", "getMedia", "(", "GetMediaRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetMedia", "(", "request", ")", ";", "}" ]
<p> Use this API to retrieve media content from a Kinesis video stream. In the request, you identify the stream name or stream Amazon Resource Name (ARN), and the starting chunk. Kinesis Video Streams then returns a stream of chunks in order by fragment number. </p> <note> <p> You must first call the <code>GetDataEndpo...
[ "<p", ">", "Use", "this", "API", "to", "retrieve", "media", "content", "from", "a", "Kinesis", "video", "stream", ".", "In", "the", "request", "you", "identify", "the", "stream", "name", "or", "stream", "Amazon", "Resource", "Name", "(", "ARN", ")", "and...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/AmazonKinesisVideoMediaClient.java#L203-L207
train
Retrieves the content of an AZ file or directory.
Of course, here is the Java code you requested: ```java @Override public GetMediaResult getMedia(GetMediaRequest request) { request = beforeClientExecution(request); return executeGetMedia(request); } ``` Hope this helps!
CloudSlang/cs-actions
cs-json/src/main/java/io/cloudslang/content/json/actions/MergeArrays.java
MergeArrays.execute
@Action(name = "Merge Arrays", outputs = { @Output(OutputNames.RETURN_RESULT), @Output(OutputNames.RETURN_CODE), @Output(OutputNames.EXCEPTION) }, responses = { @Response(text = ResponseNames.SUCCESS, fie...
java
@Action(name = "Merge Arrays", outputs = { @Output(OutputNames.RETURN_RESULT), @Output(OutputNames.RETURN_CODE), @Output(OutputNames.EXCEPTION) }, responses = { @Response(text = ResponseNames.SUCCESS, fie...
[ "@", "Action", "(", "name", "=", "\"Merge Arrays\"", ",", "outputs", "=", "{", "@", "Output", "(", "OutputNames", ".", "RETURN_RESULT", ")", ",", "@", "Output", "(", "OutputNames", ".", "RETURN_CODE", ")", ",", "@", "Output", "(", "OutputNames", ".", "EX...
This operation merge the contents of two JSON arrays. This operation does not modify either of the input arrays. The result is the contents or array1 and array2, merged into a single array. The merge operation add into the result the first array and then the second array. @param array1 The string representation of a J...
[ "This", "operation", "merge", "the", "contents", "of", "two", "JSON", "arrays", ".", "This", "operation", "does", "not", "modify", "either", "of", "the", "input", "arrays", ".", "The", "result", "is", "the", "contents", "or", "array1", "and", "array2", "me...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-json/src/main/java/io/cloudslang/content/json/actions/MergeArrays.java#L72-L126
train
Merge Arrays.
Of course, here is the Java code you requested: ```java @Action(name = "Merge Arrays", outputs = { @Output(OutputNames.RETURN_RESULT), @Output(OutputNames.RETURN_CODE), @Output(OutputNames.EXCEPTION) }, responses = { ...
jnr/jnr-x86asm
src/main/java/jnr/x86asm/SerializerIntrinsics.java
SerializerIntrinsics.crc32
public final void crc32(Register dst, Register src) { assert(dst.isRegType(REG_GPD) || dst.isRegType(REG_GPQ)); emitX86(INST_CRC32, dst, src); }
java
public final void crc32(Register dst, Register src) { assert(dst.isRegType(REG_GPD) || dst.isRegType(REG_GPQ)); emitX86(INST_CRC32, dst, src); }
[ "public", "final", "void", "crc32", "(", "Register", "dst", ",", "Register", "src", ")", "{", "assert", "(", "dst", ".", "isRegType", "(", "REG_GPD", ")", "||", "dst", ".", "isRegType", "(", "REG_GPQ", ")", ")", ";", "emitX86", "(", "INST_CRC32", ",", ...
Accumulate CRC32 Value (polynomial 0x11EDC6F41) (SSE4.2).
[ "Accumulate", "CRC32", "Value", "(", "polynomial", "0x11EDC6F41", ")", "(", "SSE4", ".", "2", ")", "." ]
fdcf68fb3dae49e607a49e33399e3dad1ada5536
https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/SerializerIntrinsics.java#L6516-L6520
train
CRC32 = dst ^ src
Of course, here is the Java code you requested: ```java public final void crc32(Register dst, Register src) { assert(dst.isRegType(REG_GPD) || dst.isRegType(REG_GPQ)); emitX86(INST_CRC32, dst, src); } ``` Hope this helps!
googleapis/google-cloud-java
google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java
CloudSchedulerClient.runJob
public final Job runJob(String name) { RunJobRequest request = RunJobRequest.newBuilder().setName(name).build(); return runJob(request); }
java
public final Job runJob(String name) { RunJobRequest request = RunJobRequest.newBuilder().setName(name).build(); return runJob(request); }
[ "public", "final", "Job", "runJob", "(", "String", "name", ")", "{", "RunJobRequest", "request", "=", "RunJobRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", ")", ".", "build", "(", ")", ";", "return", "runJob", "(", "request", ")", ...
Forces a job to run now. <p>When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. <p>Sample code: <pre><code> try (CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.create()) { JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); Job response ...
[ "Forces", "a", "job", "to", "run", "now", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java#L962-L966
train
Run a single job.
Of course, here is the Java code you requested: ```java public final Job runJob(String name) { RunJobRequest request = RunJobRequest.newBuilder().setName(name).build(); return runJob(request); } ``` Hope this helps!
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/internal/PolylineShape.java
PolylineShape.rect
private int[] rect() { if(np==0)return null; int xMin = x[0], yMin=y[0], xMax=x[0],yMax=y[0]; for(int i=1;i<np;i++) { if(x[i]<xMin)xMin=x[i]; else if(x[i]>xMax)xMax=x[i]; if(y[i]<yMin)yMin=y[i]; else if(y[i]>yMax)yMax=y[i]; } return new int[] { xMin, yMin, xMax-xMin, yMax-yMin }; }
java
private int[] rect() { if(np==0)return null; int xMin = x[0], yMin=y[0], xMax=x[0],yMax=y[0]; for(int i=1;i<np;i++) { if(x[i]<xMin)xMin=x[i]; else if(x[i]>xMax)xMax=x[i]; if(y[i]<yMin)yMin=y[i]; else if(y[i]>yMax)yMax=y[i]; } return new int[] { xMin, yMin, xMax-xMin, yMax-yMin }; }
[ "private", "int", "[", "]", "rect", "(", ")", "{", "if", "(", "np", "==", "0", ")", "return", "null", ";", "int", "xMin", "=", "x", "[", "0", "]", ",", "yMin", "=", "y", "[", "0", "]", ",", "xMax", "=", "x", "[", "0", "]", ",", "yMax", ...
Calculates the origin (X, Y) and the width and height of a rectangle that contains all the segments of the polyline.
[ "Calculates", "the", "origin", "(", "X", "Y", ")", "and", "the", "width", "and", "height", "of", "a", "rectangle", "that", "contains", "all", "the", "segments", "of", "the", "polyline", "." ]
438fc1899367fd13dfdfa8dfdca9a3c1a7783b84
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/internal/PolylineShape.java#L109-L121
train
Get the rect of the image.
Of course, here is the Java code you requested: ```java private int[] rect() { if(np==0)return null; int xMin = x[0], yMin=y[0], xMax=x[0],yMax=y[0]; for(int i=1;i<np;i++) { if(x[i]<xMin)xMin=x[i]; else if(x[i]>xMax)xMax=x[i]; if(y[i]<yMin)yMin=y[i]; else if(y[i]>yMax)yMax=y[i]; } retur...
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/IdentifierSet.java
IdentifierSet.enclosing
static String enclosing(String identifier) { int hash = identifier.lastIndexOf('#'); if (hash != -1) return identifier.substring(0, hash); int from = identifier.endsWith(".*") ? identifier.length() - 3 : identifier.length() - 1; int dot = identifier.lastIndexOf('.', from); if (dot != -1) return ide...
java
static String enclosing(String identifier) { int hash = identifier.lastIndexOf('#'); if (hash != -1) return identifier.substring(0, hash); int from = identifier.endsWith(".*") ? identifier.length() - 3 : identifier.length() - 1; int dot = identifier.lastIndexOf('.', from); if (dot != -1) return ide...
[ "static", "String", "enclosing", "(", "String", "identifier", ")", "{", "int", "hash", "=", "identifier", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "hash", "!=", "-", "1", ")", "return", "identifier", ".", "substring", "(", "0", ",", "h...
Returns the identifier or wildcard that encloses {@code identifier}, or null if it is not enclosed. <ul> <li>If {@code identifier} is a member this returns the enclosing type. <li>If it is a type it returns the enclosing package with a wildcard, like {@code squareup.dinosaurs.*}. <li>If it is a package with a wildcard...
[ "Returns", "the", "identifier", "or", "wildcard", "that", "encloses", "{", "@code", "identifier", "}", "or", "null", "if", "it", "is", "not", "enclosed", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/IdentifierSet.java#L145-L154
train
Returns the enclosing part of the identifier.
Of course, here is the Java code you requested: ```java static String enclosing(String identifier) { int hash = identifier.lastIndexOf('#'); if (hash != -1) return identifier.substring(0, hash); int from = identifier.endsWith(".*") ? identifier.length() - 3 : identifier.length() - 1; int dot = identif...
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/InvalidityDateExtension.java
InvalidityDateExtension.set
public void set(String name, Object obj) throws IOException { if (!(obj instanceof Date)) { throw new IOException("Attribute must be of type Date."); } if (name.equalsIgnoreCase(DATE)) { date = (Date) obj; } else { throw new IOException ...
java
public void set(String name, Object obj) throws IOException { if (!(obj instanceof Date)) { throw new IOException("Attribute must be of type Date."); } if (name.equalsIgnoreCase(DATE)) { date = (Date) obj; } else { throw new IOException ...
[ "public", "void", "set", "(", "String", "name", ",", "Object", "obj", ")", "throws", "IOException", "{", "if", "(", "!", "(", "obj", "instanceof", "Date", ")", ")", "{", "throw", "new", "IOException", "(", "\"Attribute must be of type Date.\"", ")", ";", "...
Set the attribute value.
[ "Set", "the", "attribute", "value", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/InvalidityDateExtension.java#L125-L136
train
Set an attribute of the CraigaSession object.
Of course, here is the Java code you requested: ```java public void set(String name, Object obj) throws IOException { if (!(obj instanceof Date)) { throw new IOException("Attribute must be of type Date."); } if (name.equalsIgnoreCase(DATE)) { date = (Date) obj; }...
threerings/nenya
core/src/main/java/com/threerings/miso/data/SparseMisoSceneModel.java
SparseMisoSceneModel.getSection
protected final Section getSection (int x, int y, boolean create) { int key = key(x, y); Section sect = _sections.get(key); if (sect == null && create) { short sx = (short)(MathUtil.floorDiv(x, swidth)*swidth); short sy = (short)(MathUtil.floorDiv(y, sheight)*sheight)...
java
protected final Section getSection (int x, int y, boolean create) { int key = key(x, y); Section sect = _sections.get(key); if (sect == null && create) { short sx = (short)(MathUtil.floorDiv(x, swidth)*swidth); short sy = (short)(MathUtil.floorDiv(y, sheight)*sheight)...
[ "protected", "final", "Section", "getSection", "(", "int", "x", ",", "int", "y", ",", "boolean", "create", ")", "{", "int", "key", "=", "key", "(", "x", ",", "y", ")", ";", "Section", "sect", "=", "_sections", ".", "get", "(", "key", ")", ";", "i...
Returns the section for the specified tile coordinate.
[ "Returns", "the", "section", "for", "the", "specified", "tile", "coordinate", "." ]
3165a012fd859009db3367f87bd2a5b820cc760a
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/data/SparseMisoSceneModel.java#L443-L454
train
Gets the Section object.
Of course, here is the Java code you requested: ```java protected final Section getSection (int x, int y, boolean create) { int key = key(x, y); Section sect = _sections.get(key); if (sect == null && create) { short sx = (short)(MathUtil.floorDiv(x, swidth)*swidth); ...
aws/aws-sdk-java
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/Source.java
Source.setSourceDetails
public void setSourceDetails(java.util.Collection<SourceDetail> sourceDetails) { if (sourceDetails == null) { this.sourceDetails = null; return; } this.sourceDetails = new com.amazonaws.internal.SdkInternalList<SourceDetail>(sourceDetails); }
java
public void setSourceDetails(java.util.Collection<SourceDetail> sourceDetails) { if (sourceDetails == null) { this.sourceDetails = null; return; } this.sourceDetails = new com.amazonaws.internal.SdkInternalList<SourceDetail>(sourceDetails); }
[ "public", "void", "setSourceDetails", "(", "java", ".", "util", ".", "Collection", "<", "SourceDetail", ">", "sourceDetails", ")", "{", "if", "(", "sourceDetails", "==", "null", ")", "{", "this", ".", "sourceDetails", "=", "null", ";", "return", ";", "}", ...
<p> Provides the source and type of the event that causes AWS Config to evaluate your AWS resources. </p> @param sourceDetails Provides the source and type of the event that causes AWS Config to evaluate your AWS resources.
[ "<p", ">", "Provides", "the", "source", "and", "type", "of", "the", "event", "that", "causes", "AWS", "Config", "to", "evaluate", "your", "AWS", "resources", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/Source.java#L234-L241
train
Sets the value of the sourceDetails property.
Of course, here is the Java code you requested: ```java public void setSourceDetails(java.util.Collection<SourceDetail> sourceDetails) { if (sourceDetails == null) { this.sourceDetails = null; return; } this.sourceDetails = new com.amazonaws.internal.SdkInternalList<Sou...
vladmihalcea/flexy-pool
flexy-dropwizard3-metrics/src/main/java/com/vladmihalcea/flexypool/metric/codahale/CodahaleMetrics.java
CodahaleMetrics.timer
@Override public Timer timer(String name) { com.codahale.metrics.Timer timer = new com.codahale.metrics.Timer( reservoirFactory.newInstance(com.codahale.metrics.Timer.class, name) ); return new CodahaleTimer(metricRegistry.register(name, timer)); }
java
@Override public Timer timer(String name) { com.codahale.metrics.Timer timer = new com.codahale.metrics.Timer( reservoirFactory.newInstance(com.codahale.metrics.Timer.class, name) ); return new CodahaleTimer(metricRegistry.register(name, timer)); }
[ "@", "Override", "public", "Timer", "timer", "(", "String", "name", ")", "{", "com", ".", "codahale", ".", "metrics", ".", "Timer", "timer", "=", "new", "com", ".", "codahale", ".", "metrics", ".", "Timer", "(", "reservoirFactory", ".", "newInstance", "(...
{@inheritDoc}
[ "{" ]
d763d359e68299c2b4e28e4b67770581ae083431
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-dropwizard3-metrics/src/main/java/com/vladmihalcea/flexypool/metric/codahale/CodahaleMetrics.java#L119-L125
train
Create a new Codahale Timer with the specified name.
Of course, here is the Java code you requested: ```java @Override public Timer timer(String name) { com.codahale.metrics.Timer timer = new com.codahale.metrics.Timer( reservoirFactory.newInstance(com.codahale.metrics.Timer.class, name) ); return new CodahaleTimer(metricRegis...
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/LongStream.java
LongStream.range
@NotNull public static LongStream range(final long startInclusive, final long endExclusive) { if (startInclusive >= endExclusive) { return empty(); } return rangeClosed(startInclusive, endExclusive - 1); }
java
@NotNull public static LongStream range(final long startInclusive, final long endExclusive) { if (startInclusive >= endExclusive) { return empty(); } return rangeClosed(startInclusive, endExclusive - 1); }
[ "@", "NotNull", "public", "static", "LongStream", "range", "(", "final", "long", "startInclusive", ",", "final", "long", "endExclusive", ")", "{", "if", "(", "startInclusive", ">=", "endExclusive", ")", "{", "return", "empty", "(", ")", ";", "}", "return", ...
Returns a sequential ordered {@code LongStream} from {@code startInclusive} (inclusive) to {@code endExclusive} (exclusive) by an incremental step of {@code 1}. @param startInclusive the (inclusive) initial value @param endExclusive the exclusive upper bound @return a sequential {@code LongStream} for the range of {@c...
[ "Returns", "a", "sequential", "ordered", "{", "@code", "LongStream", "}", "from", "{", "@code", "startInclusive", "}", "(", "inclusive", ")", "to", "{", "@code", "endExclusive", "}", "(", "exclusive", ")", "by", "an", "incremental", "step", "of", "{", "@co...
f29fd57208c20252a4549b084d55ed082c3e58f0
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/LongStream.java#L100-L106
train
Gets a sequence of the tokens in a sequence of tokens.
Of course, here is the Java code you requested: ```java @NotNull public static LongStream range(final long startInclusive, final long endExclusive) { if (startInclusive >= endExclusive) { return empty(); } return rangeClosed(startInclusive, endExclusive - 1); } ``` Hope thi...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/DigestUtil.java
DigestUtil.sha1Hex
public static String sha1Hex(String data, String charset) { return new Digester(DigestAlgorithm.SHA1).digestHex(data, charset); }
java
public static String sha1Hex(String data, String charset) { return new Digester(DigestAlgorithm.SHA1).digestHex(data, charset); }
[ "public", "static", "String", "sha1Hex", "(", "String", "data", ",", "String", "charset", ")", "{", "return", "new", "Digester", "(", "DigestAlgorithm", ".", "SHA1", ")", ".", "digestHex", "(", "data", ",", "charset", ")", ";", "}" ]
计算SHA-1摘要值,并转为16进制字符串 @param data 被摘要数据 @param charset 编码 @return SHA-1摘要的16进制表示
[ "计算SHA", "-", "1摘要值,并转为16进制字符串" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/DigestUtil.java#L201-L203
train
Returns the hexadecimal value of the given data using the SHA1 algorithm.
Of course, here is the Java code you requested: ```java public static String sha1Hex(String data, String charset) { return new Digester(DigestAlgorithm.SHA1).digestHex(data, charset); } ``` Hope this helps!
meertensinstituut/mtas
src/main/java/mtas/analysis/token/MtasToken.java
MtasToken.addPositions
final public void addPositions(Set<Integer> list) { int[] positions = ArrayUtils .toPrimitive(list.toArray(new Integer[list.size()])); addPositions(positions); }
java
final public void addPositions(Set<Integer> list) { int[] positions = ArrayUtils .toPrimitive(list.toArray(new Integer[list.size()])); addPositions(positions); }
[ "final", "public", "void", "addPositions", "(", "Set", "<", "Integer", ">", "list", ")", "{", "int", "[", "]", "positions", "=", "ArrayUtils", ".", "toPrimitive", "(", "list", ".", "toArray", "(", "new", "Integer", "[", "list", ".", "size", "(", ")", ...
Adds the positions. @param list the list
[ "Adds", "the", "positions", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/analysis/token/MtasToken.java#L325-L329
train
Add a list of positions to the SEGMENTS.
Of course, here is the Java code you requested: ```java final public void addPositions(Set<Integer> list) { int[] positions = ArrayUtils .toPrimitive(list.toArray(new Integer[list.size()])); addPositions(positions); } ``` Hope this helps!
threerings/nenya
core/src/main/java/com/threerings/cast/builder/SpritePanel.java
SpritePanel.centerSprite
protected void centerSprite () { if (_sprite != null) { Dimension d = getSize(); int shei = _sprite.getHeight(); int x = d.width / 2, y = (d.height + shei) / 2; _sprite.setLocation(x, y); } }
java
protected void centerSprite () { if (_sprite != null) { Dimension d = getSize(); int shei = _sprite.getHeight(); int x = d.width / 2, y = (d.height + shei) / 2; _sprite.setLocation(x, y); } }
[ "protected", "void", "centerSprite", "(", ")", "{", "if", "(", "_sprite", "!=", "null", ")", "{", "Dimension", "d", "=", "getSize", "(", ")", ";", "int", "shei", "=", "_sprite", ".", "getHeight", "(", ")", ";", "int", "x", "=", "d", ".", "width", ...
Sets the sprite's location to render it centered within the panel.
[ "Sets", "the", "sprite", "s", "location", "to", "render", "it", "centered", "within", "the", "panel", "." ]
3165a012fd859009db3367f87bd2a5b820cc760a
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/builder/SpritePanel.java#L111-L119
train
Center the image in the image.
Of course, here is the Java code you requested: ```java protected void centerSprite () { if (_sprite != null) { Dimension d = getSize(); int shei = _sprite.getHeight(); int x = d.width / 2, y = (d.height + shei) / 2; _sprite.setLocation(x, y); } }...
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.viewRangeUpdate
void viewRangeUpdate(int positionStart, int itemCount) { final int childCount = getChildCount(); final int positionEnd = positionStart + itemCount; for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder == null) ...
java
void viewRangeUpdate(int positionStart, int itemCount) { final int childCount = getChildCount(); final int positionEnd = positionStart + itemCount; for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder == null) ...
[ "void", "viewRangeUpdate", "(", "int", "positionStart", ",", "int", "itemCount", ")", "{", "final", "int", "childCount", "=", "getChildCount", "(", ")", ";", "final", "int", "positionEnd", "=", "positionStart", "+", "itemCount", ";", "for", "(", "int", "i", ...
Rebind existing views for the given range, or create as needed. @param positionStart Adapter position to start at @param itemCount Number of views that must explicitly be rebound
[ "Rebind", "existing", "views", "for", "the", "given", "range", "or", "create", "as", "needed", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1880-L1898
train
Update view range.
Of course, here is the Java code you requested: ```java void viewRangeUpdate(int positionStart, int itemCount) { final int childCount = getChildCount(); final int positionEnd = positionStart + itemCount; for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewH...
perwendel/spark
src/main/java/spark/Spark.java
Spark.put
public static void put(String path, String acceptType, Route route) { getInstance().put(path, acceptType, route); }
java
public static void put(String path, String acceptType, Route route) { getInstance().put(path, acceptType, route); }
[ "public", "static", "void", "put", "(", "String", "path", ",", "String", "acceptType", ",", "Route", "route", ")", "{", "getInstance", "(", ")", ".", "put", "(", "path", ",", "acceptType", ",", "route", ")", ";", "}" ]
Map the route for HTTP PUT requests @param path the path @param acceptType the accept type @param route The route
[ "Map", "the", "route", "for", "HTTP", "PUT", "requests" ]
080fb1f9d6e580f6742e9589044c7420d3157b8b
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/Spark.java#L256-L258
train
Add a route to the resource.
Of course, here is the Java code you requested: ```java public static void put(String path, String acceptType, Route route) { getInstance().put(path, acceptType, route); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/SearchResult.java
SearchResult.setResults
public void setResults(java.util.Collection<SearchRecord> results) { if (results == null) { this.results = null; return; } this.results = new java.util.ArrayList<SearchRecord>(results); }
java
public void setResults(java.util.Collection<SearchRecord> results) { if (results == null) { this.results = null; return; } this.results = new java.util.ArrayList<SearchRecord>(results); }
[ "public", "void", "setResults", "(", "java", ".", "util", ".", "Collection", "<", "SearchRecord", ">", "results", ")", "{", "if", "(", "results", "==", "null", ")", "{", "this", ".", "results", "=", "null", ";", "return", ";", "}", "this", ".", "resu...
<p> A list of <code>SearchResult</code> objects. </p> @param results A list of <code>SearchResult</code> objects.
[ "<p", ">", "A", "list", "of", "<code", ">", "SearchResult<", "/", "code", ">", "objects", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/SearchResult.java#L61-L68
train
Sets the value of the results property.
Of course, here is the Java code you requested: ```java public void setResults(java.util.Collection<SearchRecord> results) { if (results == null) { this.results = null; return; } this.results = new java.util.ArrayList<SearchRecord>(results); } ``` Hope this helps!
amaembo/streamex
src/main/java/one/util/streamex/AbstractStreamEx.java
AbstractStreamEx.scanRight
public List<T> scanRight(BinaryOperator<T> accumulator) { return toListAndThen(list -> { for (int i = list.size() - 2; i >= 0; i--) { list.set(i, accumulator.apply(list.get(i), list.get(i + 1))); } return list; }); }
java
public List<T> scanRight(BinaryOperator<T> accumulator) { return toListAndThen(list -> { for (int i = list.size() - 2; i >= 0; i--) { list.set(i, accumulator.apply(list.get(i), list.get(i + 1))); } return list; }); }
[ "public", "List", "<", "T", ">", "scanRight", "(", "BinaryOperator", "<", "T", ">", "accumulator", ")", "{", "return", "toListAndThen", "(", "list", "->", "{", "for", "(", "int", "i", "=", "list", ".", "size", "(", ")", "-", "2", ";", "i", ">=", ...
Produces a collection containing cumulative results of applying the accumulation function going right to left. <p> This is a terminal operation. <p> The result {@link List} is guaranteed to be mutable. <p> For parallel stream it's not guaranteed that accumulator will always be executed in the same thread. <p> This ...
[ "Produces", "a", "collection", "containing", "cumulative", "results", "of", "applying", "the", "accumulation", "function", "going", "right", "to", "left", "." ]
936bbd1b7dfbcf64a3b990682bfc848213441d14
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/AbstractStreamEx.java#L1646-L1653
train
Scan right.
Of course, here is the Java code you requested: ```java public List<T> scanRight(BinaryOperator<T> accumulator) { return toListAndThen(list -> { for (int i = list.size() - 2; i >= 0; i--) { list.set(i, accumulator.apply(list.get(i), list.get(i + 1))); } retur...
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.not
public static <T> ElementMatcher.Junction<T> not(ElementMatcher<? super T> matcher) { return new NegatingMatcher<T>(matcher); }
java
public static <T> ElementMatcher.Junction<T> not(ElementMatcher<? super T> matcher) { return new NegatingMatcher<T>(matcher); }
[ "public", "static", "<", "T", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "not", "(", "ElementMatcher", "<", "?", "super", "T", ">", "matcher", ")", "{", "return", "new", "NegatingMatcher", "<", "T", ">", "(", "matcher", ")", ";", "}" ]
Inverts another matcher. @param matcher The matcher to invert. @param <T> The type of the matched object. @return An inverted version of the given {@code matcher}.
[ "Inverts", "another", "matcher", "." ]
4d2dac80efb6bed89367567260f6811c2f712d12
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L292-L294
train
Create a new negating matcher.
Of course, here is the Java code you requested: ```java public static <T> ElementMatcher.Junction<T> not(ElementMatcher<? super T> matcher) { return new NegatingMatcher<T>(matcher); } ``` Hope this helps!
belaban/JGroups
src/org/jgroups/View.java
View.containsMember
public boolean containsMember(Address mbr) { if(mbr == null || members == null) return false; for(Address member: members) if(Objects.equals(member, mbr)) return true; return false; }
java
public boolean containsMember(Address mbr) { if(mbr == null || members == null) return false; for(Address member: members) if(Objects.equals(member, mbr)) return true; return false; }
[ "public", "boolean", "containsMember", "(", "Address", "mbr", ")", "{", "if", "(", "mbr", "==", "null", "||", "members", "==", "null", ")", "return", "false", ";", "for", "(", "Address", "member", ":", "members", ")", "if", "(", "Objects", ".", "equals...
Returns true if this view contains a certain member @param mbr - the address of the member, @return true if this view contains the member, false if it doesn't
[ "Returns", "true", "if", "this", "view", "contains", "a", "certain", "member" ]
bd3ca786aa57fed41dfbc10a94b1281e388be03b
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/View.java#L141-L148
train
Check if the set contains a member of the specified MBR.
Of course, here is the Java code you requested: ```java public boolean containsMember(Address mbr) { if(mbr == null || members == null) return false; for(Address member: members) if(Objects.equals(member, mbr)) return true; return false; } ``` Hope t...
evernote/android-job
library/src/main/java/com/evernote/android/job/JobManager.java
JobManager.destroy
void destroy() { synchronized (JobManager.class) { instance = null; for (JobApi api : JobApi.values()) { api.invalidateCachedProxy(); } } }
java
void destroy() { synchronized (JobManager.class) { instance = null; for (JobApi api : JobApi.values()) { api.invalidateCachedProxy(); } } }
[ "void", "destroy", "(", ")", "{", "synchronized", "(", "JobManager", ".", "class", ")", "{", "instance", "=", "null", ";", "for", "(", "JobApi", "api", ":", "JobApi", ".", "values", "(", ")", ")", "{", "api", ".", "invalidateCachedProxy", "(", ")", "...
/*package
[ "/", "*", "package" ]
5ae3d776ad9d80b5b7f60ae3e382d44d0d193faf
https://github.com/evernote/android-job/blob/5ae3d776ad9d80b5b7f60ae3e382d44d0d193faf/library/src/main/java/com/evernote/android/job/JobManager.java#L486-L493
train
Destroy the instance of the job manager.
Of course, here is the Java code you requested: ```java void destroy() { synchronized (JobManager.class) { instance = null; for (JobApi api : JobApi.values()) { api.invalidateCachedProxy(); } } } ``` Hope this helps!
google/guava
android/guava/src/com/google/common/primitives/UnsignedInteger.java
UnsignedInteger.compareTo
@Override public int compareTo(UnsignedInteger other) { checkNotNull(other); return compare(value, other.value); }
java
@Override public int compareTo(UnsignedInteger other) { checkNotNull(other); return compare(value, other.value); }
[ "@", "Override", "public", "int", "compareTo", "(", "UnsignedInteger", "other", ")", "{", "checkNotNull", "(", "other", ")", ";", "return", "compare", "(", "value", ",", "other", ".", "value", ")", ";", "}" ]
Compares this unsigned integer to another unsigned integer. Returns {@code 0} if they are equal, a negative number if {@code this < other}, and a positive number if {@code this > other}.
[ "Compares", "this", "unsigned", "integer", "to", "another", "unsigned", "integer", ".", "Returns", "{" ]
7155d12b70a2406fa84d94d4b8b3bc108e89abfd
https://github.com/google/guava/blob/7155d12b70a2406fa84d94d4b8b3bc108e89abfd/android/guava/src/com/google/common/primitives/UnsignedInteger.java#L217-L221
valid
Compares two unsigned integers.
Of course, here is the Java code you requested: ```java @Override public int compareTo(UnsignedInteger other) { checkNotNull(other); return compare(value, other.value); } ``` Hope this helps!
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201808/Content.java
Content.getImportDateTime
public com.google.api.ads.admanager.axis.v201808.DateTime getImportDateTime() { return importDateTime; }
java
public com.google.api.ads.admanager.axis.v201808.DateTime getImportDateTime() { return importDateTime; }
[ "public", "com", ".", "google", ".", "api", ".", "ads", ".", "admanager", ".", "axis", ".", "v201808", ".", "DateTime", "getImportDateTime", "(", ")", "{", "return", "importDateTime", ";", "}" ]
Gets the importDateTime value for this Content. @return importDateTime * The date and time at which this content was published. This attribute is read-only.
[ "Gets", "the", "importDateTime", "value", "for", "this", "Content", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201808/Content.java#L468-L470
train
Gets the importDateTime value for this CIDCTYPE.
Of course, here is the Java code you requested: ```java public com.google.api.ads.admanager.axis.v201808.DateTime getImportDateTime() { return importDateTime; } ``` Hope this helps!
google/closure-compiler
src/com/google/javascript/jscomp/RemoveUnusedCode.java
RemoveUnusedCode.traverseAndRemoveUnusedReferences
private void traverseAndRemoveUnusedReferences(Node root) { // Create scope from parent of root node, which also has externs as a child, so we'll // have extern definitions in scope. Scope scope = scopeCreator.createScope(root.getParent(), null); if (!scope.hasSlot(NodeUtil.JSC_PROPERTY_NAME_FN)) { ...
java
private void traverseAndRemoveUnusedReferences(Node root) { // Create scope from parent of root node, which also has externs as a child, so we'll // have extern definitions in scope. Scope scope = scopeCreator.createScope(root.getParent(), null); if (!scope.hasSlot(NodeUtil.JSC_PROPERTY_NAME_FN)) { ...
[ "private", "void", "traverseAndRemoveUnusedReferences", "(", "Node", "root", ")", "{", "// Create scope from parent of root node, which also has externs as a child, so we'll", "// have extern definitions in scope.", "Scope", "scope", "=", "scopeCreator", ".", "createScope", "(", "r...
Traverses a node recursively. Call this once per pass.
[ "Traverses", "a", "node", "recursively", ".", "Call", "this", "once", "per", "pass", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/RemoveUnusedCode.java#L256-L277
train
Traverse the given node and remove unused references.
Of course, here is the Java code you requested: ```java private void traverseAndRemoveUnusedReferences(Node root) { // Create scope from parent of root node, which also has externs as a child, so we'll // have extern definitions in scope. Scope scope = scopeCreator.createScope(root.getParent(), null); ...
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManagerView.java
BlockMetadataManagerView.getTierViewsBelow
public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); }
java
public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); }
[ "public", "List", "<", "StorageTierView", ">", "getTierViewsBelow", "(", "String", "tierAlias", ")", "{", "int", "ordinal", "=", "getTierView", "(", "tierAlias", ")", ".", "getTierViewOrdinal", "(", ")", ";", "return", "mTierViews", ".", "subList", "(", "ordin...
Gets all tierViews before certain tierView. Throws an {@link IllegalArgumentException} if the tierAlias is not found. @param tierAlias the alias of a tierView @return the list of {@link StorageTierView}
[ "Gets", "all", "tierViews", "before", "certain", "tierView", ".", "Throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "the", "tierAlias", "is", "not", "found", "." ]
af38cf3ab44613355b18217a3a4d961f8fec3a10
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManagerView.java#L179-L182
train
Returns the tier views below the given tier alias.
Of course, here is the Java code you requested: ```java public List<StorageTierView> getTierViewsBelow(String tierAlias) { int ordinal = getTierView(tierAlias).getTierViewOrdinal(); return mTierViews.subList(ordinal + 1, mTierViews.size()); } ``` Hope this helps!
crawljax/crawljax
core/src/main/java/com/crawljax/forms/FormInput.java
FormInput.inputValues
public void inputValues(boolean... values) { for (boolean value : values) { InputValue inputValue = new InputValue(); inputValue.setChecked(value); this.inputValues.add(inputValue); } }
java
public void inputValues(boolean... values) { for (boolean value : values) { InputValue inputValue = new InputValue(); inputValue.setChecked(value); this.inputValues.add(inputValue); } }
[ "public", "void", "inputValues", "(", "boolean", "...", "values", ")", "{", "for", "(", "boolean", "value", ":", "values", ")", "{", "InputValue", "inputValue", "=", "new", "InputValue", "(", ")", ";", "inputValue", ".", "setChecked", "(", "value", ")", ...
Sets the values of this input field. Only Applicable check-boxes and a radio buttons. @param values Values to set.
[ "Sets", "the", "values", "of", "this", "input", "field", ".", "Only", "Applicable", "check", "-", "boxes", "and", "a", "radio", "buttons", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/forms/FormInput.java#L141-L148
train
Sets the input values.
Of course, here is the Java code you requested: ```java public void inputValues(boolean... values) { for (boolean value : values) { InputValue inputValue = new InputValue(); inputValue.setChecked(value); this.inputValues.add(inputValue); } } ``` Hope this helps!
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/FileUtils.java
FileUtils.createTempFile
public static File createTempFile(Context c, File root, String filename, String extension){ File output = null; try { if(filename != null){ if(!extension.contains(".")) extension = "." + extension; output = new File(root, filename + extensi...
java
public static File createTempFile(Context c, File root, String filename, String extension){ File output = null; try { if(filename != null){ if(!extension.contains(".")) extension = "." + extension; output = new File(root, filename + extensi...
[ "public", "static", "File", "createTempFile", "(", "Context", "c", ",", "File", "root", ",", "String", "filename", ",", "String", "extension", ")", "{", "File", "output", "=", "null", ";", "try", "{", "if", "(", "filename", "!=", "null", ")", "{", "if"...
Returns a TempFile with given root, filename, and extension. The resulting TempFile is safe for use with Android's MediaRecorder @param c @param root @param filename @param extension @return
[ "Returns", "a", "TempFile", "with", "given", "root", "filename", "and", "extension", ".", "The", "resulting", "TempFile", "is", "safe", "for", "use", "with", "Android", "s", "MediaRecorder" ]
af3aae5f1128d7376e67aefe11a3a1a3844be734
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/FileUtils.java#L110-L126
train
Create a temp file.
Of course, here is the Java code you requested: ```java public static File createTempFile(Context c, File root, String filename, String extension){ File output = null; try { if(filename != null){ if(!extension.contains(".")) extension = "." + extension; ...
alexruiz/fest-assert-2.x
src/main/java/org/fest/assertions/error/ShouldNotBeBetween.java
ShouldNotBeBetween.shouldNotBeBetween
public static ErrorMessageFactory shouldNotBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) { return new ShouldNotBeBetween(actual, start, end, inclusiveStart, inclusiveEnd); }
java
public static ErrorMessageFactory shouldNotBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) { return new ShouldNotBeBetween(actual, start, end, inclusiveStart, inclusiveEnd); }
[ "public", "static", "ErrorMessageFactory", "shouldNotBeBetween", "(", "Date", "actual", ",", "Date", "start", ",", "Date", "end", ",", "boolean", "inclusiveStart", ",", "boolean", "inclusiveEnd", ")", "{", "return", "new", "ShouldNotBeBetween", "(", "actual", ",",...
Creates a new </code>{@link ShouldNotBeBetween}</code>. @param actual the actual value in the failed assertion. @param start the lower boundary of date period. @param end the lower boundary of date period. @param inclusiveStart wether to include start date in period. @param inclusiveEnd wether to include end date in p...
[ "Creates", "a", "new", "<", "/", "code", ">", "{", "@link", "ShouldNotBeBetween", "}", "<", "/", "code", ">", "." ]
bff5925af00fc732ba3a0e85f6774acba77ec7c8
https://github.com/alexruiz/fest-assert-2.x/blob/bff5925af00fc732ba3a0e85f6774acba77ec7c8/src/main/java/org/fest/assertions/error/ShouldNotBeBetween.java#L38-L41
valid
Creates a new ErrorMessageFactory for a ShouldNotBeBetween operation.
Of course, here is the Java code you requested: ```java public static ErrorMessageFactory shouldNotBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) { return new ShouldNotBeBetween(actual, start, end, inclusiveStart, inclusiveEnd); } ``` Hope this helps!
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/reflect/Property.java
Property.set
public void set(Object obj, Object value) throws ReflectionException { try { if (isPublic(writeMethod)) { writeMethod.invoke(obj, value); } else { throw new ReflectionException("Cannot set the value of " + this + ", as it is read-only."); } ...
java
public void set(Object obj, Object value) throws ReflectionException { try { if (isPublic(writeMethod)) { writeMethod.invoke(obj, value); } else { throw new ReflectionException("Cannot set the value of " + this + ", as it is read-only."); } ...
[ "public", "void", "set", "(", "Object", "obj", ",", "Object", "value", ")", "throws", "ReflectionException", "{", "try", "{", "if", "(", "isPublic", "(", "writeMethod", ")", ")", "{", "writeMethod", ".", "invoke", "(", "obj", ",", "value", ")", ";", "}...
Sets a new value to the representation of this property on the specified object. <p> The underlying property's value will be updated trying to invoke the {@code writeMethod}. <p> If this {@link Property} object has no public {@code writeMethod}, it is considered read-only, and the action will be prevented throwing a ...
[ "Sets", "a", "new", "value", "to", "the", "representation", "of", "this", "property", "on", "the", "specified", "object", "." ]
8e72fff6cd1f496c76a01773269caead994fea65
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/reflect/Property.java#L431-L441
train
Set the value of this attribute to the given value.
Of course, here is the Java code you requested: ```java public void set(Object obj, Object value) throws ReflectionException { try { if (isPublic(writeMethod)) { writeMethod.invoke(obj, value); } else { throw new ReflectionException("Cannot set the value ...
oblac/jodd
jodd-lagarto/src/main/java/jodd/lagarto/Scanner.java
Scanner.charSequence
protected final CharSequence charSequence(final int from, final int to) { if (from == to) { return CharArraySequence.EMPTY; } return CharArraySequence.of(input, from, to - from); }
java
protected final CharSequence charSequence(final int from, final int to) { if (from == to) { return CharArraySequence.EMPTY; } return CharArraySequence.of(input, from, to - from); }
[ "protected", "final", "CharSequence", "charSequence", "(", "final", "int", "from", ",", "final", "int", "to", ")", "{", "if", "(", "from", "==", "to", ")", "{", "return", "CharArraySequence", ".", "EMPTY", ";", "}", "return", "CharArraySequence", ".", "of"...
Creates char sub-sequence from the input.
[ "Creates", "char", "sub", "-", "sequence", "from", "the", "input", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-lagarto/src/main/java/jodd/lagarto/Scanner.java#L138-L143
test
Returns a char sequence of characters from the specified range.
Of course, here is the Java code you requested: ```java protected final CharSequence charSequence(final int from, final int to) { if (from == to) { return CharArraySequence.EMPTY; } return CharArraySequence.of(input, from, to - from); } ``` Hope this helps!
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/EnumUtils.java
EnumUtils.processBitVectors
public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) { final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass)); final long[] lvalues = ArrayUtils.clone(Validate.notNull(values)); ArrayUtils.reverse(lvalues); for (final E cons...
java
public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) { final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass)); final long[] lvalues = ArrayUtils.clone(Validate.notNull(values)); ArrayUtils.reverse(lvalues); for (final E cons...
[ "public", "static", "<", "E", "extends", "Enum", "<", "E", ">", ">", "EnumSet", "<", "E", ">", "processBitVectors", "(", "final", "Class", "<", "E", ">", "enumClass", ",", "final", "long", "...", "values", ")", "{", "final", "EnumSet", "<", "E", ">",...
<p>Convert a {@code long[]} created by {@link EnumUtils#generateBitVectors} into the set of enum values that it represents.</p> <p>If you store this value, beware any changes to the enum that would affect ordinal values.</p> @param enumClass the class of the enum we are working with, not {@code null} @param values ...
[ "<p", ">", "Convert", "a", "{", "@code", "long", "[]", "}", "created", "by", "{", "@link", "EnumUtils#generateBitVectors", "}", "into", "the", "set", "of", "enum", "values", "that", "it", "represents", ".", "<", "/", "p", ">" ]
9e2dfbbda3668cfa5d935fe76479d1426c294504
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/EnumUtils.java#L272-L283
train
Process bit vectors.
Of course, here is the Java code you requested: ```java public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) { final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass)); final long[] lvalues = ArrayUtils.clone(Validate.notNull(values)); ...
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java
RedisStorage.removeCalendar
@Override public boolean removeCalendar(String calendarName, Jedis jedis) throws JobPersistenceException { final String calendarTriggersSetKey = redisSchema.calendarTriggersSetKey(calendarName); if(jedis.scard(calendarTriggersSetKey) > 0){ throw new JobPersistenceException(String.format...
java
@Override public boolean removeCalendar(String calendarName, Jedis jedis) throws JobPersistenceException { final String calendarTriggersSetKey = redisSchema.calendarTriggersSetKey(calendarName); if(jedis.scard(calendarTriggersSetKey) > 0){ throw new JobPersistenceException(String.format...
[ "@", "Override", "public", "boolean", "removeCalendar", "(", "String", "calendarName", ",", "Jedis", "jedis", ")", "throws", "JobPersistenceException", "{", "final", "String", "calendarTriggersSetKey", "=", "redisSchema", ".", "calendarTriggersSetKey", "(", "calendarNam...
Remove (delete) the <code>{@link org.quartz.Calendar}</code> with the given name. @param calendarName the name of the calendar to be removed @param jedis a thread-safe Redis connection @return true if a calendar with the given name was found and removed
[ "Remove", "(", "delete", ")", "the", "<code", ">", "{" ]
be9a52ee776d8a09866fe99fd9718bc13a0cb992
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java#L323-L337
train
Remove a calendar from the cache.
Of course, here is the Java code you requested: ```java @Override public boolean removeCalendar(String calendarName, Jedis jedis) throws JobPersistenceException { final String calendarTriggersSetKey = redisSchema.calendarTriggersSetKey(calendarName); if(jedis.scard(calendarTriggersSetKey) > 0){ ...
aws/aws-sdk-java
aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/transform/DescribeStorediSCSIVolumesRequestMarshaller.java
DescribeStorediSCSIVolumesRequestMarshaller.marshall
public void marshall(DescribeStorediSCSIVolumesRequest describeStorediSCSIVolumesRequest, ProtocolMarshaller protocolMarshaller) { if (describeStorediSCSIVolumesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
java
public void marshall(DescribeStorediSCSIVolumesRequest describeStorediSCSIVolumesRequest, ProtocolMarshaller protocolMarshaller) { if (describeStorediSCSIVolumesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
[ "public", "void", "marshall", "(", "DescribeStorediSCSIVolumesRequest", "describeStorediSCSIVolumesRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "describeStorediSCSIVolumesRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException"...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/transform/DescribeStorediSCSIVolumesRequestMarshaller.java#L43-L54
train
marshalls the given DescribeStorediSCSIVolumesRequest to the given protocolMarshaller.
Of course, here is the Java code you requested: ```java public void marshall(DescribeStorediSCSIVolumesRequest describeStorediSCSIVolumesRequest, ProtocolMarshaller protocolMarshaller) { if (describeStorediSCSIVolumesRequest == null) { throw new SdkClientException("Invalid argument passed to marsh...
OpenFeign/feign
core/src/main/java/feign/template/UriUtils.java
UriUtils.encodeReserved
public static String encodeReserved(String value, FragmentType type, Charset charset) { /* value is encoded, we need to split it up and skip the parts that are already encoded */ Matcher matcher = PCT_ENCODED_PATTERN.matcher(value); if (!matcher.find()) { return encodeChunk(value, type, charset); ...
java
public static String encodeReserved(String value, FragmentType type, Charset charset) { /* value is encoded, we need to split it up and skip the parts that are already encoded */ Matcher matcher = PCT_ENCODED_PATTERN.matcher(value); if (!matcher.find()) { return encodeChunk(value, type, charset); ...
[ "public", "static", "String", "encodeReserved", "(", "String", "value", ",", "FragmentType", "type", ",", "Charset", "charset", ")", "{", "/* value is encoded, we need to split it up and skip the parts that are already encoded */", "Matcher", "matcher", "=", "PCT_ENCODED_PATTER...
Encodes the value, preserving all reserved characters.. Values that are already pct-encoded are ignored. @param value inspect. @param type identifying which uri fragment rules to apply. @param charset to use. @return a new String with the reserved characters preserved.
[ "Encodes", "the", "value", "preserving", "all", "reserved", "characters", "..", "Values", "that", "are", "already", "pct", "-", "encoded", "are", "ignored", "." ]
318fb0e955b8cfcf64f70d6aeea0ba5795f8a7eb
https://github.com/OpenFeign/feign/blob/318fb0e955b8cfcf64f70d6aeea0ba5795f8a7eb/core/src/main/java/feign/template/UriUtils.java#L141-L170
train
Encode a string with the reserved characters.
Of course, here is the Java code you requested: ```java public static String encodeReserved(String value, FragmentType type, Charset charset) { /* value is encoded, we need to split it up and skip the parts that are already encoded */ Matcher matcher = PCT_ENCODED_PATTERN.matcher(value); if (!matcher.find...
s1ck/gdl
src/main/java/org/s1ck/gdl/GDLHandler.java
GDLHandler.getVertexCache
public Map<String, Vertex> getVertexCache(boolean includeUserDefined, boolean includeAutoGenerated) { return loader.getVertexCache(includeUserDefined, includeAutoGenerated); }
java
public Map<String, Vertex> getVertexCache(boolean includeUserDefined, boolean includeAutoGenerated) { return loader.getVertexCache(includeUserDefined, includeAutoGenerated); }
[ "public", "Map", "<", "String", ",", "Vertex", ">", "getVertexCache", "(", "boolean", "includeUserDefined", ",", "boolean", "includeAutoGenerated", ")", "{", "return", "loader", ".", "getVertexCache", "(", "includeUserDefined", ",", "includeAutoGenerated", ")", ";",...
Returns a cache that contains a mapping from variables to vertex instances. @param includeUserDefined true, iff user-defined variables shall be included in the cache @param includeAutoGenerated true, iff auto-generated variables shall be included in the cache @return immutable vertex cache
[ "Returns", "a", "cache", "that", "contains", "a", "mapping", "from", "variables", "to", "vertex", "instances", "." ]
c89b0f83526661823ad3392f338dbf7dc3e3f834
https://github.com/s1ck/gdl/blob/c89b0f83526661823ad3392f338dbf7dc3e3f834/src/main/java/org/s1ck/gdl/GDLHandler.java#L142-L144
train
Get the cache of vertices.
Of course, here is the Java code you requested: ```java public Map<String, Vertex> getVertexCache(boolean includeUserDefined, boolean includeAutoGenerated) { return loader.getVertexCache(includeUserDefined, includeAutoGenerated); } ``` Hope this helps!
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/event/Event.java
Event.fire
public void fire(T event) { ArrayList<Listener<T>> list1; ArrayList<Runnable> list2; synchronized (this) { if (listeners == null) list1 = null; else list1 = new ArrayList<>(listeners); if (listenersRunnable == null) list2 = null; else list2 = new ArrayList<>(listenersRunnable); } if (list...
java
public void fire(T event) { ArrayList<Listener<T>> list1; ArrayList<Runnable> list2; synchronized (this) { if (listeners == null) list1 = null; else list1 = new ArrayList<>(listeners); if (listenersRunnable == null) list2 = null; else list2 = new ArrayList<>(listenersRunnable); } if (list...
[ "public", "void", "fire", "(", "T", "event", ")", "{", "ArrayList", "<", "Listener", "<", "T", ">>", "list1", ";", "ArrayList", "<", "Runnable", ">", "list2", ";", "synchronized", "(", "this", ")", "{", "if", "(", "listeners", "==", "null", ")", "lis...
Fire the event (call the listeners).
[ "Fire", "the", "event", "(", "call", "the", "listeners", ")", "." ]
b0c893b44bfde2c03f90ea846a49ef5749d598f3
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/event/Event.java#L46-L67
train
Fires an event on all listeners and runnable.
Of course, here is the Java code you requested: ```java public void fire(T event) { ArrayList<Listener<T>> list1; ArrayList<Runnable> list2; synchronized (this) { if (listeners == null) list1 = null; else list1 = new ArrayList<>(listeners); if (listenersRunnable == null) list2 = null; else lis...
linkedin/linkedin-utils
org.linkedin.util-core/src/main/java/org/linkedin/util/xml/XMLIndent.java
XMLIndent.addOpeningTag
@Override public void addOpeningTag(String tagName, Map attributes) { _xml.addXML(_indent.toString()); _xml.addOpeningTag(tagName, attributes); _xml.addXML("\n"); _indent.inc(); }
java
@Override public void addOpeningTag(String tagName, Map attributes) { _xml.addXML(_indent.toString()); _xml.addOpeningTag(tagName, attributes); _xml.addXML("\n"); _indent.inc(); }
[ "@", "Override", "public", "void", "addOpeningTag", "(", "String", "tagName", ",", "Map", "attributes", ")", "{", "_xml", ".", "addXML", "(", "_indent", ".", "toString", "(", ")", ")", ";", "_xml", ".", "addOpeningTag", "(", "tagName", ",", "attributes", ...
Adds an opening tag which contains the attributes specified. All the properties will be turned into attributes. @param tagName the name of the opening tag to add @param attributes the attributes
[ "Adds", "an", "opening", "tag", "which", "contains", "the", "attributes", "specified", ".", "All", "the", "properties", "will", "be", "turned", "into", "attributes", "." ]
ca097410b537fb09847c42037593c0f474c0571f
https://github.com/linkedin/linkedin-utils/blob/ca097410b537fb09847c42037593c0f474c0571f/org.linkedin.util-core/src/main/java/org/linkedin/util/xml/XMLIndent.java#L193-L200
valid
Add an opening tag.
Of course, here is the Java code you requested: ```java @Override public void addOpeningTag(String tagName, Map attributes) { _xml.addXML(_indent.toString()); _xml.addOpeningTag(tagName, attributes); _xml.addXML("\n"); _indent.inc(); } ``` Hope this helps!
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.execBackwards
public Pair<Map<SDVariable, DifferentialFunction>, List<DifferentialFunction>> execBackwards() { final SameDiff outer = this; if (getFunction("grad") == null) defineFunction("grad", new SameDiffFunctionDefinition() { @Override public SDVariable[] define(Same...
java
public Pair<Map<SDVariable, DifferentialFunction>, List<DifferentialFunction>> execBackwards() { final SameDiff outer = this; if (getFunction("grad") == null) defineFunction("grad", new SameDiffFunctionDefinition() { @Override public SDVariable[] define(Same...
[ "public", "Pair", "<", "Map", "<", "SDVariable", ",", "DifferentialFunction", ">", ",", "List", "<", "DifferentialFunction", ">", ">", "execBackwards", "(", ")", "{", "final", "SameDiff", "outer", "=", "this", ";", "if", "(", "getFunction", "(", "\"grad\"", ...
Builds a backwards graph and executes the operations on that graph. @return
[ "Builds", "a", "backwards", "graph", "and", "executes", "the", "operations", "on", "that", "graph", "." ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L5122-L5225
test
Execute backward operation
Of course, here is the Java code you requested: ```java public Pair<Map<SDVariable, DifferentialFunction>, List<DifferentialFunction>> execBackwards() { final SameDiff outer = this; if (getFunction("grad") == null) defineFunction("grad", new SameDiffFunctionDefinition() { ...
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/rdf/JcrRdfTools.java
JcrRdfTools.addProperty
public void addProperty(final FedoraResource resource, final org.apache.jena.rdf.model.Property predicate, final RDFNode value, final Map<String, String> namespaces, final boolean allowRelaxedProperties) thro...
java
public void addProperty(final FedoraResource resource, final org.apache.jena.rdf.model.Property predicate, final RDFNode value, final Map<String, String> namespaces, final boolean allowRelaxedProperties) thro...
[ "public", "void", "addProperty", "(", "final", "FedoraResource", "resource", ",", "final", "org", ".", "apache", ".", "jena", ".", "rdf", ".", "model", ".", "Property", "predicate", ",", "final", "RDFNode", "value", ",", "final", "Map", "<", "String", ",",...
Add property to a node @param resource the fedora resource @param predicate the predicate @param value the value @param namespaces the namespace @param allowRelaxedProperties if true, relaxed server managed properties are allowed @throws RepositoryException if repository exception occurred
[ "Add", "property", "to", "a", "node" ]
7489ad5bc8fb44e2442c93eceb7d97ac54553ab6
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/rdf/JcrRdfTools.java#L293-L335
train
Add a JCR property to the JCR node.
Of course, here is the Java code you requested: ```java public void addProperty(final FedoraResource resource, final org.apache.jena.rdf.model.Property predicate, final RDFNode value, final Map<String, String> namespaces, ...
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/evaluation/DeeseAntonymEvaluation.java
DeeseAntonymEvaluation.computeAssociation
protected Double computeAssociation(SemanticSpace sspace, String word1, String word2) { Vector v1 = sspace.getVector(word1); Vector v2 = sspace.getVector(word2); if (v1 == null || v2 == null) return null; // Find the ranks of ...
java
protected Double computeAssociation(SemanticSpace sspace, String word1, String word2) { Vector v1 = sspace.getVector(word1); Vector v2 = sspace.getVector(word2); if (v1 == null || v2 == null) return null; // Find the ranks of ...
[ "protected", "Double", "computeAssociation", "(", "SemanticSpace", "sspace", ",", "String", "word1", ",", "String", "word2", ")", "{", "Vector", "v1", "=", "sspace", ".", "getVector", "(", "word1", ")", ";", "Vector", "v2", "=", "sspace", ".", "getVector", ...
Returns the association of the two words on a scale of 0 to 1. @return the assocation or {@code null} if either {@code word1} or {@code word2} are not in the semantic space
[ "Returns", "the", "association", "of", "the", "two", "words", "on", "a", "scale", "of", "0", "to", "1", "." ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/evaluation/DeeseAntonymEvaluation.java#L123-L134
train
Compute the association between two words.
Of course, here is the Java code you requested: ```java protected Double computeAssociation(SemanticSpace sspace, String word1, String word2) { Vector v1 = sspace.getVector(word1); Vector v2 = sspace.getVector(word2); if (v1 == null || v2 == null) ...
FasterXML/woodstox
src/main/java/com/ctc/wstx/io/ReaderBootstrapper.java
ReaderBootstrapper.verifyXmlEncoding
protected void verifyXmlEncoding(ReaderConfig cfg) throws XMLStreamException { String inputEnc = mInputEncoding; // Close enough? if (StringUtil.equalEncodings(inputEnc, mFoundEncoding)) { return; } /* Ok, maybe the difference is just with endianness ind...
java
protected void verifyXmlEncoding(ReaderConfig cfg) throws XMLStreamException { String inputEnc = mInputEncoding; // Close enough? if (StringUtil.equalEncodings(inputEnc, mFoundEncoding)) { return; } /* Ok, maybe the difference is just with endianness ind...
[ "protected", "void", "verifyXmlEncoding", "(", "ReaderConfig", "cfg", ")", "throws", "XMLStreamException", "{", "String", "inputEnc", "=", "mInputEncoding", ";", "// Close enough?", "if", "(", "StringUtil", ".", "equalEncodings", "(", "inputEnc", ",", "mFoundEncoding"...
/* ////////////////////////////////////// Internal methods, parsing //////////////////////////////////////
[ "/", "*", "//////////////////////////////////////", "Internal", "methods", "parsing", "//////////////////////////////////////" ]
ffcaabdc06672d9564c48c25d601d029b7fd6548
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/io/ReaderBootstrapper.java#L211-L239
train
Verify XML encoding.
Of course, here is the Java code you requested: ```java protected void verifyXmlEncoding(ReaderConfig cfg) throws XMLStreamException { String inputEnc = mInputEncoding; // Close enough? if (StringUtil.equalEncodings(inputEnc, mFoundEncoding)) { return; } ...
jbundle/jbundle
thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java
CachedItem.init
public void init(CalendarModel model, ProductTypeInfo productType, Date startTime, Date endTime, String description, String[] rgstrMeals, int iStatus) { m_model = (CachedCalendarModel)model; m_cachedInfo = new CachedInfo(productType, startTime, endTime, description, rgstrMeals, iStatus); }
java
public void init(CalendarModel model, ProductTypeInfo productType, Date startTime, Date endTime, String description, String[] rgstrMeals, int iStatus) { m_model = (CachedCalendarModel)model; m_cachedInfo = new CachedInfo(productType, startTime, endTime, description, rgstrMeals, iStatus); }
[ "public", "void", "init", "(", "CalendarModel", "model", ",", "ProductTypeInfo", "productType", ",", "Date", "startTime", ",", "Date", "endTime", ",", "String", "description", ",", "String", "[", "]", "rgstrMeals", ",", "int", "iStatus", ")", "{", "m_model", ...
Constructor.
[ "Constructor", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java#L49-L54
train
Initialize this object with the cached information.
Of course, here is the Java code you requested: ```java public void init(CalendarModel model, ProductTypeInfo productType, Date startTime, Date endTime, String description, String[] rgstrMeals, int iStatus) { m_model = (CachedCalendarModel)model; m_cachedInfo = new CachedInfo(productType, startTim...
orientechnologies/orientdb
object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java
OObjectDatabaseTx.convertParameter
protected Object convertParameter(final Object iParameter) { if (iParameter != null) // FILTER PARAMETERS if (iParameter instanceof Map<?, ?>) { Map<String, Object> map = (Map<String, Object>) iParameter; for (Map.Entry<String, Object> e : map.entrySet()) { map.put(e.ge...
java
protected Object convertParameter(final Object iParameter) { if (iParameter != null) // FILTER PARAMETERS if (iParameter instanceof Map<?, ?>) { Map<String, Object> map = (Map<String, Object>) iParameter; for (Map.Entry<String, Object> e : map.entrySet()) { map.put(e.ge...
[ "protected", "Object", "convertParameter", "(", "final", "Object", "iParameter", ")", "{", "if", "(", "iParameter", "!=", "null", ")", "// FILTER PARAMETERS\r", "if", "(", "iParameter", "instanceof", "Map", "<", "?", ",", "?", ">", ")", "{", "Map", "<", "S...
Convert a parameter: if a POJO is used, then replace it with its record id. @param iParameter Parameter to convert, if applicable @see #convertParameters(Object...)
[ "Convert", "a", "parameter", ":", "if", "a", "POJO", "is", "used", "then", "replace", "it", "with", "its", "record", "id", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java#L1075-L1102
test
Convert the parameter to the corresponding object.
Of course, here is the Java code you requested: ```java protected Object convertParameter(final Object iParameter) { if (iParameter != null) // FILTER PARAMETERS if (iParameter instanceof Map<?, ?>) { Map<String, Object> map = (Map<String, Object>) iParameter; for (Map.Entry<Stri...
oblac/jodd
jodd-http/src/main/java/jodd/http/net/SocketHttpConnectionProvider.java
SocketHttpConnectionProvider.getSocketFactory
protected SocketFactory getSocketFactory( final ProxyInfo proxy, final boolean ssl, final boolean trustAllCertificates, final int connectionTimeout) throws IOException { switch (proxy.getProxyType()) { case NONE: if (ssl) { return getDefaultSSLSocketFactory(trustAllCertificates); } el...
java
protected SocketFactory getSocketFactory( final ProxyInfo proxy, final boolean ssl, final boolean trustAllCertificates, final int connectionTimeout) throws IOException { switch (proxy.getProxyType()) { case NONE: if (ssl) { return getDefaultSSLSocketFactory(trustAllCertificates); } el...
[ "protected", "SocketFactory", "getSocketFactory", "(", "final", "ProxyInfo", "proxy", ",", "final", "boolean", "ssl", ",", "final", "boolean", "trustAllCertificates", ",", "final", "int", "connectionTimeout", ")", "throws", "IOException", "{", "switch", "(", "proxy"...
Returns socket factory based on proxy type and SSL requirements.
[ "Returns", "socket", "factory", "based", "on", "proxy", "type", "and", "SSL", "requirements", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-http/src/main/java/jodd/http/net/SocketHttpConnectionProvider.java#L250-L273
test
Get the SocketFactory for the proxy.
Of course, here is the Java code you requested: ```java protected SocketFactory getSocketFactory( final ProxyInfo proxy, final boolean ssl, final boolean trustAllCertificates, final int connectionTimeout) throws IOException { switch (proxy.getProxyType()) { case NONE: if (ssl) { return getDe...
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsStaticExportReport.java
CmsStaticExportReport.actionReport
public void actionReport() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); switch (getAction()) { case ACTION_REPORT_UPDATE: setParamAct...
java
public void actionReport() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); switch (getAction()) { case ACTION_REPORT_UPDATE: setParamAct...
[ "public", "void", "actionReport", "(", ")", "throws", "JspException", "{", "// save initialized instance of this class in request attribute for included sub-elements", "getJsp", "(", ")", ".", "getRequest", "(", ")", ".", "setAttribute", "(", "SESSION_WORKPLACE_CLASS", ",", ...
Performs the move report, will be called by the JSP page.<p> @throws JspException if problems including sub-elements occur
[ "Performs", "the", "move", "report", "will", "be", "called", "by", "the", "JSP", "page", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsStaticExportReport.java#L77-L96
train
Action report.
Of course, here is the Java code you requested: ```java public void actionReport() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); switch (getAction()) { ...
rupertlssmith/lojix
debugger/debug_ui_tools_swing/src/main/com/thesett/aima/logic/fol/wam/debugger/uifactory/impl/SwingMainWindow.java
SwingMainWindow.showHorizontalBar
private void showHorizontalBar() { // Left vertical bar. Component bar = factory.createGripPanel(layout.getConsoleHeightResizer(), false); frame.getContentPane().add(bar, DesktopAppLayout.STATUS_BAR); }
java
private void showHorizontalBar() { // Left vertical bar. Component bar = factory.createGripPanel(layout.getConsoleHeightResizer(), false); frame.getContentPane().add(bar, DesktopAppLayout.STATUS_BAR); }
[ "private", "void", "showHorizontalBar", "(", ")", "{", "// Left vertical bar.", "Component", "bar", "=", "factory", ".", "createGripPanel", "(", "layout", ".", "getConsoleHeightResizer", "(", ")", ",", "false", ")", ";", "frame", ".", "getContentPane", "(", ")",...
Creates a horizontal grip-able bar for adjusting the console height.
[ "Creates", "a", "horizontal", "grip", "-", "able", "bar", "for", "adjusting", "the", "console", "height", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/debugger/debug_ui_tools_swing/src/main/com/thesett/aima/logic/fol/wam/debugger/uifactory/impl/SwingMainWindow.java#L146-L152
test
Show the HORIZONTALBAR of the record set.
Of course, here is the Java code you requested: ```java private void showHorizontalBar() { // Left vertical bar. Component bar = factory.createGripPanel(layout.getConsoleHeightResizer(), false); frame.getContentPane().add(bar, DesktopAppLayout.STATUS_BAR); } ``` Hope this helps!
phax/ph-db
ph-db-jdbc/src/main/java/com/helger/db/jdbc/h2/H2FileConnector.java
H2FileConnector.compactDatabase
@Nonnull public ESuccess compactDatabase (final boolean bDeleteTemporarySQLFile) { return getLock ().locked ( () -> { // Close DB close (); // Set temporary file name final String sScriptFileName = "h2dump$$.sql"; final File aScriptFileName = new File (sScriptFileName); try ...
java
@Nonnull public ESuccess compactDatabase (final boolean bDeleteTemporarySQLFile) { return getLock ().locked ( () -> { // Close DB close (); // Set temporary file name final String sScriptFileName = "h2dump$$.sql"; final File aScriptFileName = new File (sScriptFileName); try ...
[ "@", "Nonnull", "public", "ESuccess", "compactDatabase", "(", "final", "boolean", "bDeleteTemporarySQLFile", ")", "{", "return", "getLock", "(", ")", ".", "locked", "(", "(", ")", "->", "{", "// Close DB", "close", "(", ")", ";", "// Set temporary file name", ...
Compact the database by exporting everything, resetting the DB and importing it again. Before compacting process is started, <b>the data source is closed</b>!!! @param bDeleteTemporarySQLFile if <code>true</code> the temporary file (h2temp.sql) is deleted after successful compacting. @return {@link ESuccess#SUCCESS} i...
[ "Compact", "the", "database", "by", "exporting", "everything", "resetting", "the", "DB", "and", "importing", "it", "again", ".", "Before", "compacting", "process", "is", "started", "<b", ">", "the", "data", "source", "is", "closed<", "/", "b", ">", "!!!" ]
8e04b247aead4f5e2515fa708eedc46a0a86d0e3
https://github.com/phax/ph-db/blob/8e04b247aead4f5e2515fa708eedc46a0a86d0e3/ph-db-jdbc/src/main/java/com/helger/db/jdbc/h2/H2FileConnector.java#L76-L116
train
Compact database.
Of course, here is the Java code you requested: ```java @Nonnull public ESuccess compactDatabase (final boolean bDeleteTemporarySQLFile) { return getLock ().locked ( () -> { // Close DB close (); // Set temporary file name final String sScriptFileName = "h2dump$$.sql"; final File...
zandero/utils
src/main/java/com/zandero/utils/InstantTimeUtils.java
InstantTimeUtils.format
public static String format(Instant time, DateTimeFormatter format) { if (format == null) { return formatDateTime(time); } Assert.notNull(time, "Missing time!"); return format.format(time); }
java
public static String format(Instant time, DateTimeFormatter format) { if (format == null) { return formatDateTime(time); } Assert.notNull(time, "Missing time!"); return format.format(time); }
[ "public", "static", "String", "format", "(", "Instant", "time", ",", "DateTimeFormatter", "format", ")", "{", "if", "(", "format", "==", "null", ")", "{", "return", "formatDateTime", "(", "time", ")", ";", "}", "Assert", ".", "notNull", "(", "time", ",",...
Custom date time format @param time to be formatted @param format simple date time format, or null for default yyyy-MM-dd HH:mm:ss Z format @return formated date time
[ "Custom", "date", "time", "format" ]
fc0bcb955ec76034293600d899bed1faae89f8c8
https://github.com/zandero/utils/blob/fc0bcb955ec76034293600d899bed1faae89f8c8/src/main/java/com/zandero/utils/InstantTimeUtils.java#L116-L124
valid
Format a time as a string using the specified format.
Of course, here is the Java code you requested: ```java public static String format(Instant time, DateTimeFormatter format) { if (format == null) { return formatDateTime(time); } Assert.notNull(time, "Missing time!"); return format.format(time); } ``` Hope this helps!
Red5/red5-server-common
src/main/java/org/red5/server/api/persistence/PersistenceUtils.java
PersistenceUtils.getPersistenceStoreConstructor
private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception { Constructor<?> constructor = null; for (Class<?> interfaceClass : interfaces) { try { constructor = theClass.getConstructor(new Class[] { interfaceCla...
java
private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception { Constructor<?> constructor = null; for (Class<?> interfaceClass : interfaces) { try { constructor = theClass.getConstructor(new Class[] { interfaceCla...
[ "private", "static", "Constructor", "<", "?", ">", "getPersistenceStoreConstructor", "(", "Class", "<", "?", ">", "theClass", ",", "Class", "<", "?", ">", "[", "]", "interfaces", ")", "throws", "Exception", "{", "Constructor", "<", "?", ">", "constructor", ...
Returns persistence store object class constructor @param theClass Persistence store class @param interfaces Interfaces that are being implemented by persistence store object class @return Constructor @throws Exception
[ "Returns", "persistence", "store", "object", "class", "constructor" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/api/persistence/PersistenceUtils.java#L43-L60
train
Gets the constructor for the entity store class.
Of course, here is the Java code you requested: ```java private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception { Constructor<?> constructor = null; for (Class<?> interfaceClass : interfaces) { try { constru...
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.displayIOException
public static void displayIOException(@Nonnull IOException e, @Nonnull TaskListener listener ) { String msg = getWin32ErrorMessage(e); if(msg!=null) listener.getLogger().println(msg); }
java
public static void displayIOException(@Nonnull IOException e, @Nonnull TaskListener listener ) { String msg = getWin32ErrorMessage(e); if(msg!=null) listener.getLogger().println(msg); }
[ "public", "static", "void", "displayIOException", "(", "@", "Nonnull", "IOException", "e", ",", "@", "Nonnull", "TaskListener", "listener", ")", "{", "String", "msg", "=", "getWin32ErrorMessage", "(", "e", ")", ";", "if", "(", "msg", "!=", "null", ")", "li...
On Windows, error messages for IOException aren't very helpful. This method generates additional user-friendly error message to the listener
[ "On", "Windows", "error", "messages", "for", "IOException", "aren", "t", "very", "helpful", ".", "This", "method", "generates", "additional", "user", "-", "friendly", "error", "message", "to", "the", "listener" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L413-L417
train
Display an IOException.
Of course, here is the Java code you requested: ```java public static void displayIOException(@Nonnull IOException e, @Nonnull TaskListener listener ) { String msg = getWin32ErrorMessage(e); if(msg!=null) listener.getLogger().println(msg); } ``` Hope this helps!
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.solve
public static boolean solve(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj x ) { x.reshape(a.numCols,b.numCols); LinearSolverDense<DMatrixRMaj> solver = LinearSolverFactory_DDRM.general(a.numRows,a.numCols); // make sure the inputs 'a' and 'b' are not modified solver = new LinearSolve...
java
public static boolean solve(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj x ) { x.reshape(a.numCols,b.numCols); LinearSolverDense<DMatrixRMaj> solver = LinearSolverFactory_DDRM.general(a.numRows,a.numCols); // make sure the inputs 'a' and 'b' are not modified solver = new LinearSolve...
[ "public", "static", "boolean", "solve", "(", "DMatrixRMaj", "a", ",", "DMatrixRMaj", "b", ",", "DMatrixRMaj", "x", ")", "{", "x", ".", "reshape", "(", "a", ".", "numCols", ",", "b", ".", "numCols", ")", ";", "LinearSolverDense", "<", "DMatrixRMaj", ">", ...
<p> Solves for x in the following equation:<br> <br> A*x = b </p> <p> If the system could not be solved then false is returned. If it returns true that just means the algorithm finished operating, but the results could still be bad because 'A' is singular or nearly singular. </p> <p> If repeat calls to solve are bei...
[ "<p", ">", "Solves", "for", "x", "in", "the", "following", "equation", ":", "<br", ">", "<br", ">", "A", "*", "x", "=", "b", "<", "/", "p", ">" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L538-L552
train
Solves the C - V decomposition of two matrix matrices.
Of course, here is the Java code you requested: ```java public static boolean solve(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj x ) { x.reshape(a.numCols,b.numCols); LinearSolverDense<DMatrixRMaj> solver = LinearSolverFactory_DDRM.general(a.numRows,a.numCols); // make sure the inputs 'a' ...