repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.replaceWhere
public SDVariable replaceWhere(SDVariable update, SDVariable from, Condition condition) { return replaceWhere(null, update, from, condition); }
java
public SDVariable replaceWhere(SDVariable update, SDVariable from, Condition condition) { return replaceWhere(null, update, from, condition); }
[ "public", "SDVariable", "replaceWhere", "(", "SDVariable", "update", ",", "SDVariable", "from", ",", "Condition", "condition", ")", "{", "return", "replaceWhere", "(", "null", ",", "update", ",", "from", ",", "condition", ")", ";", "}" ]
Element-wise replace where condition:<br> out[i] = from[i] if condition(update[i]) is satisfied, or<br> out[i] = update[i] if condition(update[i]) is NOT satisfied @param update Source array @param from Replacement values array (used conditionally). Must be same shape as 'update' array @param condition Conditi...
[ "Element", "-", "wise", "replace", "where", "condition", ":", "<br", ">", "out", "[", "i", "]", "=", "from", "[", "i", "]", "if", "condition", "(", "update", "[", "i", "]", ")", "is", "satisfied", "or<br", ">", "out", "[", "i", "]", "=", "update"...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1702-L1704
realexpayments/rxp-hpp-java
src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java
RealexHpp.responseToJson
public String responseToJson(HppResponse hppResponse) { LOGGER.info("Converting HppResponse to JSON."); String json = null; //generate hash LOGGER.debug("Generating hash."); hppResponse.hash(secret); //encode LOGGER.debug("Encoding object."); try { hppResponse = hppResponse.encode(ENCODING_CHARS...
java
public String responseToJson(HppResponse hppResponse) { LOGGER.info("Converting HppResponse to JSON."); String json = null; //generate hash LOGGER.debug("Generating hash."); hppResponse.hash(secret); //encode LOGGER.debug("Encoding object."); try { hppResponse = hppResponse.encode(ENCODING_CHARS...
[ "public", "String", "responseToJson", "(", "HppResponse", "hppResponse", ")", "{", "LOGGER", ".", "info", "(", "\"Converting HppResponse to JSON.\"", ")", ";", "String", "json", "=", "null", ";", "//generate hash", "LOGGER", ".", "debug", "(", "\"Generating hash.\""...
<p> Method produces JSON from <code>HppResponse</code> object. Carries out the following actions: <ul> <li>Generates security hash</li> <li>Base64 encodes inputs</li> <li>Serialises response object to JSON</li> </ul> </p> @param hppResponse @return String
[ "<p", ">", "Method", "produces", "JSON", "from", "<code", ">", "HppResponse<", "/", "code", ">", "object", ".", "Carries", "out", "the", "following", "actions", ":", "<ul", ">", "<li", ">", "Generates", "security", "hash<", "/", "li", ">", "<li", ">", ...
train
https://github.com/realexpayments/rxp-hpp-java/blob/29cc5df036af09a6d8ea16ccd7e02e856f72620f/src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java#L204-L228
zaproxy/zaproxy
src/org/zaproxy/zap/spider/SpiderController.java
SpiderController.addSeed
protected void addSeed(URI uri, String method) { // Check if the uri was processed already String visitedURI; try { visitedURI = URLCanonicalizer.buildCleanedParametersURIRepresentation(uri, spider.getSpiderParam() .getHandleParameters(), spider.getSpiderParam().isHandleODataParametersVisited()); } catc...
java
protected void addSeed(URI uri, String method) { // Check if the uri was processed already String visitedURI; try { visitedURI = URLCanonicalizer.buildCleanedParametersURIRepresentation(uri, spider.getSpiderParam() .getHandleParameters(), spider.getSpiderParam().isHandleODataParametersVisited()); } catc...
[ "protected", "void", "addSeed", "(", "URI", "uri", ",", "String", "method", ")", "{", "// Check if the uri was processed already", "String", "visitedURI", ";", "try", "{", "visitedURI", "=", "URLCanonicalizer", ".", "buildCleanedParametersURIRepresentation", "(", "uri",...
Adds a new seed, if it wasn't already processed. @param uri the uri @param method the http method used for fetching the resource
[ "Adds", "a", "new", "seed", "if", "it", "wasn", "t", "already", "processed", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/SpiderController.java#L163-L185
iobeam/iobeam-client-java
src/main/java/com/iobeam/api/client/Iobeam.java
Iobeam.addDataMapToSeries
@Deprecated public boolean addDataMapToSeries(String[] seriesNames, DataPoint[] points) { if (seriesNames == null || points == null || points.length != seriesNames.length) { return false; } synchronized (dataStoreLock) { for (int i = 0; i < seriesNames.length; i++) {...
java
@Deprecated public boolean addDataMapToSeries(String[] seriesNames, DataPoint[] points) { if (seriesNames == null || points == null || points.length != seriesNames.length) { return false; } synchronized (dataStoreLock) { for (int i = 0; i < seriesNames.length; i++) {...
[ "@", "Deprecated", "public", "boolean", "addDataMapToSeries", "(", "String", "[", "]", "seriesNames", ",", "DataPoint", "[", "]", "points", ")", "{", "if", "(", "seriesNames", "==", "null", "||", "points", "==", "null", "||", "points", ".", "length", "!=",...
Adds a list of data points to a list of series in the data store. This is essentially a 'zip' operation on the points and series names, where the first point is put in the first series, the second point in the second series, etc. Both lists MUST be the same size. @param points List of DataPoints to be added @para...
[ "Adds", "a", "list", "of", "data", "points", "to", "a", "list", "of", "series", "in", "the", "data", "store", ".", "This", "is", "essentially", "a", "zip", "operation", "on", "the", "points", "and", "series", "names", "where", "the", "first", "point", ...
train
https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/client/Iobeam.java#L771-L783
dropwizard/metrics
metrics-healthchecks/src/main/java/com/codahale/metrics/health/HealthCheckRegistry.java
HealthCheckRegistry.runHealthChecks
public SortedMap<String, HealthCheck.Result> runHealthChecks(ExecutorService executor) { return runHealthChecks(executor, HealthCheckFilter.ALL); }
java
public SortedMap<String, HealthCheck.Result> runHealthChecks(ExecutorService executor) { return runHealthChecks(executor, HealthCheckFilter.ALL); }
[ "public", "SortedMap", "<", "String", ",", "HealthCheck", ".", "Result", ">", "runHealthChecks", "(", "ExecutorService", "executor", ")", "{", "return", "runHealthChecks", "(", "executor", ",", "HealthCheckFilter", ".", "ALL", ")", ";", "}" ]
Runs the registered health checks in parallel and returns a map of the results. @param executor object to launch and track health checks progress @return a map of the health check results
[ "Runs", "the", "registered", "health", "checks", "in", "parallel", "and", "returns", "a", "map", "of", "the", "results", "." ]
train
https://github.com/dropwizard/metrics/blob/3c6105a0b9b4416c59e16b6b841b123052d6f57d/metrics-healthchecks/src/main/java/com/codahale/metrics/health/HealthCheckRegistry.java#L197-L199
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java
ModelHandler.findModelIF
public Object findModelIF(Object keyValue, HttpServletRequest request) throws Exception { return findModelByKey((String) keyValue, request); // for old version }
java
public Object findModelIF(Object keyValue, HttpServletRequest request) throws Exception { return findModelByKey((String) keyValue, request); // for old version }
[ "public", "Object", "findModelIF", "(", "Object", "keyValue", ",", "HttpServletRequest", "request", ")", "throws", "Exception", "{", "return", "findModelByKey", "(", "(", "String", ")", "keyValue", ",", "request", ")", ";", "// for old version\r", "}" ]
obtain a existed Model instance by his primtive key. @param keyValue primtive key @param request @return Model @throws java.lang.Exception
[ "obtain", "a", "existed", "Model", "instance", "by", "his", "primtive", "key", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L126-L128
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java
CpnlElFunctions.externalUrl
public static String externalUrl(SlingHttpServletRequest request, String path) { return LinkUtil.getAbsoluteUrl(request, LinkUtil.getUrl(request, path)); }
java
public static String externalUrl(SlingHttpServletRequest request, String path) { return LinkUtil.getAbsoluteUrl(request, LinkUtil.getUrl(request, path)); }
[ "public", "static", "String", "externalUrl", "(", "SlingHttpServletRequest", "request", ",", "String", "path", ")", "{", "return", "LinkUtil", ".", "getAbsoluteUrl", "(", "request", ",", "LinkUtil", ".", "getUrl", "(", "request", ",", "path", ")", ")", ";", ...
Builds an external (full qualified) URL for a repository path using the LinkUtil.getURL() method. @param request the current request (domain host hint) @param path the repository path @return the URL built in the context of the requested domain host
[ "Builds", "an", "external", "(", "full", "qualified", ")", "URL", "for", "a", "repository", "path", "using", "the", "LinkUtil", ".", "getURL", "()", "method", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L209-L211
nohana/Amalgam
amalgam/src/main/java/com/amalgam/view/ViewUtils.java
ViewUtils.sipToPixel
public static float sipToPixel(Resources resources, float sip) { float density = resources.getDisplayMetrics().scaledDensity; return sip * density; }
java
public static float sipToPixel(Resources resources, float sip) { float density = resources.getDisplayMetrics().scaledDensity; return sip * density; }
[ "public", "static", "float", "sipToPixel", "(", "Resources", "resources", ",", "float", "sip", ")", "{", "float", "density", "=", "resources", ".", "getDisplayMetrics", "(", ")", ".", "scaledDensity", ";", "return", "sip", "*", "density", ";", "}" ]
Convert the sip to pixels, based on density scale. @param resources application resources. @param sip to be converted value. @return converted value(px)
[ "Convert", "the", "sip", "to", "pixels", "based", "on", "density", "scale", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/view/ViewUtils.java#L97-L100
JoeKerouac/utils
src/main/java/com/joe/utils/secure/impl/AsymmetricCipher.java
AsymmetricCipher.buildInstance
public static CipherUtil buildInstance(String privateKey, String publicKey) { return buildInstance(privateKey.getBytes(), publicKey.getBytes()); }
java
public static CipherUtil buildInstance(String privateKey, String publicKey) { return buildInstance(privateKey.getBytes(), publicKey.getBytes()); }
[ "public", "static", "CipherUtil", "buildInstance", "(", "String", "privateKey", ",", "String", "publicKey", ")", "{", "return", "buildInstance", "(", "privateKey", ".", "getBytes", "(", ")", ",", "publicKey", ".", "getBytes", "(", ")", ")", ";", "}" ]
非对称加密构造器 @param privateKey PKCS8格式的私钥(BASE64 encode过的) @param publicKey X509格式的公钥(BASE64 encode过的) @return AsymmetricCipher
[ "非对称加密构造器" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/secure/impl/AsymmetricCipher.java#L43-L45
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/bufferprovider/LocalBufferPool.java
LocalBufferPool.recycleBuffer
private void recycleBuffer(MemorySegment buffer) { synchronized (this.buffers) { if (this.isDestroyed) { this.globalBufferPool.returnBuffer(buffer); this.numRequestedBuffers--; } else { // if the number of designated buffers changed in the meantime, make sure // to return the buffer to the globa...
java
private void recycleBuffer(MemorySegment buffer) { synchronized (this.buffers) { if (this.isDestroyed) { this.globalBufferPool.returnBuffer(buffer); this.numRequestedBuffers--; } else { // if the number of designated buffers changed in the meantime, make sure // to return the buffer to the globa...
[ "private", "void", "recycleBuffer", "(", "MemorySegment", "buffer", ")", "{", "synchronized", "(", "this", ".", "buffers", ")", "{", "if", "(", "this", ".", "isDestroyed", ")", "{", "this", ".", "globalBufferPool", ".", "returnBuffer", "(", "buffer", ")", ...
Returns a buffer to the buffer pool and notifies listeners about the availability of a new buffer. @param buffer buffer to return to the buffer pool
[ "Returns", "a", "buffer", "to", "the", "buffer", "pool", "and", "notifies", "listeners", "about", "the", "availability", "of", "a", "new", "buffer", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/bufferprovider/LocalBufferPool.java#L291-L318
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.nextElement
public static Element nextElement(XMLExtendedStreamReader reader, Namespace expectedNamespace) throws XMLStreamException { Element element = nextElement(reader); if (element == null) { return null; } else if (element != Element.UNKNOWN && expectedNamespace.equals(Nam...
java
public static Element nextElement(XMLExtendedStreamReader reader, Namespace expectedNamespace) throws XMLStreamException { Element element = nextElement(reader); if (element == null) { return null; } else if (element != Element.UNKNOWN && expectedNamespace.equals(Nam...
[ "public", "static", "Element", "nextElement", "(", "XMLExtendedStreamReader", "reader", ",", "Namespace", "expectedNamespace", ")", "throws", "XMLStreamException", "{", "Element", "element", "=", "nextElement", "(", "reader", ")", ";", "if", "(", "element", "==", ...
A variation of nextElement that verifies the nextElement is not in a different namespace. @param reader the XmlExtendedReader to read from. @param expectedNamespace the namespace expected. @return the element or null if the end is reached @throws XMLStreamException if the namespace is wrong or there is a problem acces...
[ "A", "variation", "of", "nextElement", "that", "verifies", "the", "nextElement", "is", "not", "in", "a", "different", "namespace", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L77-L88
alkacon/opencms-core
src/org/opencms/ade/contenteditor/CmsContentTypeVisitor.java
CmsContentTypeVisitor.visitTypes
public void visitTypes(CmsXmlContentDefinition xmlContentDefinition, Locale messageLocale) { m_rootContentDefinition = xmlContentDefinition; m_contentHandler = xmlContentDefinition.getContentHandler(); CmsMessages messages = null; m_messages = new CmsMultiMessages(messageLocale); ...
java
public void visitTypes(CmsXmlContentDefinition xmlContentDefinition, Locale messageLocale) { m_rootContentDefinition = xmlContentDefinition; m_contentHandler = xmlContentDefinition.getContentHandler(); CmsMessages messages = null; m_messages = new CmsMultiMessages(messageLocale); ...
[ "public", "void", "visitTypes", "(", "CmsXmlContentDefinition", "xmlContentDefinition", ",", "Locale", "messageLocale", ")", "{", "m_rootContentDefinition", "=", "xmlContentDefinition", ";", "m_contentHandler", "=", "xmlContentDefinition", ".", "getContentHandler", "(", ")"...
Visits all types within the XML content definition.<p> @param xmlContentDefinition the content definition @param messageLocale the locale
[ "Visits", "all", "types", "within", "the", "XML", "content", "definition", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentTypeVisitor.java#L402-L432
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
HtmlLinkRendererBase.findNestingForm
protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { return _ComponentUtils.findNestingForm(uiComponent, facesContext); }
java
protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { return _ComponentUtils.findNestingForm(uiComponent, facesContext); }
[ "protected", "FormInfo", "findNestingForm", "(", "UIComponent", "uiComponent", ",", "FacesContext", "facesContext", ")", "{", "return", "_ComponentUtils", ".", "findNestingForm", "(", "uiComponent", ",", "facesContext", ")", ";", "}" ]
find nesting form<br /> need to be overrideable to deal with dummyForm stuff in tomahawk.
[ "find", "nesting", "form<br", "/", ">", "need", "to", "be", "overrideable", "to", "deal", "with", "dummyForm", "stuff", "in", "tomahawk", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java#L728-L731
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java
WorkflowExecutor.retry
public void retry(String workflowId) { Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true); if (!workflow.getStatus().isTerminal()) { throw new ApplicationException(CONFLICT, "Workflow is still running. status=" + workflow.getStatus()); } if (workflow.ge...
java
public void retry(String workflowId) { Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true); if (!workflow.getStatus().isTerminal()) { throw new ApplicationException(CONFLICT, "Workflow is still running. status=" + workflow.getStatus()); } if (workflow.ge...
[ "public", "void", "retry", "(", "String", "workflowId", ")", "{", "Workflow", "workflow", "=", "executionDAOFacade", ".", "getWorkflowById", "(", "workflowId", ",", "true", ")", ";", "if", "(", "!", "workflow", ".", "getStatus", "(", ")", ".", "isTerminal", ...
Gets the last instance of each failed task and reschedule each Gets all cancelled tasks and schedule all of them except JOIN (join should change status to INPROGRESS) Switch workflow back to RUNNING status and call decider. @param workflowId the id of the workflow to be retried
[ "Gets", "the", "last", "instance", "of", "each", "failed", "task", "and", "reschedule", "each", "Gets", "all", "cancelled", "tasks", "and", "schedule", "all", "of", "them", "except", "JOIN", "(", "join", "should", "change", "status", "to", "INPROGRESS", ")",...
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java#L415-L470
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/StringUtil.java
StringUtil.startsWithAny
public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) { if (_str == null || _args == null || _args.length == 0) { return false; } String heystack = _str; if (_ignoreCase) { heystack = _str.toLowerCase(); } for (Str...
java
public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) { if (_str == null || _args == null || _args.length == 0) { return false; } String heystack = _str; if (_ignoreCase) { heystack = _str.toLowerCase(); } for (Str...
[ "public", "static", "boolean", "startsWithAny", "(", "boolean", "_ignoreCase", ",", "String", "_str", ",", "String", "...", "_args", ")", "{", "if", "(", "_str", "==", "null", "||", "_args", "==", "null", "||", "_args", ".", "length", "==", "0", ")", "...
Checks if given string in _str starts with any of the given strings in _args. @param _ignoreCase true to ignore case, false to be case sensitive @param _str string to check @param _args patterns to find @return true if given string in _str starts with any of the given strings in _args, false if not or _str/_args is nul...
[ "Checks", "if", "given", "string", "in", "_str", "starts", "with", "any", "of", "the", "given", "strings", "in", "_args", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L547-L564
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.userInfoBatchget
public static UserInfoList userInfoBatchget(String access_token,String lang,List<String> openids){ return userInfoBatchget(access_token, lang, openids,0); }
java
public static UserInfoList userInfoBatchget(String access_token,String lang,List<String> openids){ return userInfoBatchget(access_token, lang, openids,0); }
[ "public", "static", "UserInfoList", "userInfoBatchget", "(", "String", "access_token", ",", "String", "lang", ",", "List", "<", "String", ">", "openids", ")", "{", "return", "userInfoBatchget", "(", "access_token", ",", "lang", ",", "openids", ",", "0", ")", ...
批量获取用户基本信息 @param access_token access_token @param lang zh-CN @param openids 最多支持一次拉取100条 @return UserInfoList
[ "批量获取用户基本信息" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L133-L135
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.deserializeFromString
public static Writable deserializeFromString(Class<? extends Writable> writableClass, String serializedWritableStr) throws IOException { return deserializeFromString(writableClass, serializedWritableStr, new Configuration()); }
java
public static Writable deserializeFromString(Class<? extends Writable> writableClass, String serializedWritableStr) throws IOException { return deserializeFromString(writableClass, serializedWritableStr, new Configuration()); }
[ "public", "static", "Writable", "deserializeFromString", "(", "Class", "<", "?", "extends", "Writable", ">", "writableClass", ",", "String", "serializedWritableStr", ")", "throws", "IOException", "{", "return", "deserializeFromString", "(", "writableClass", ",", "seri...
Deserialize a {@link Writable} object from a string. @param writableClass the {@link Writable} implementation class @param serializedWritableStr the string containing a serialized {@link Writable} object @return a {@link Writable} deserialized from the string @throws IOException if there's something wrong with the des...
[ "Deserialize", "a", "{", "@link", "Writable", "}", "object", "from", "a", "string", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L806-L809
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/Vertigo.java
Vertigo.deployNetwork
public Vertigo deployNetwork(String name) { return deployNetwork(name, (Handler<AsyncResult<ActiveNetwork>>) null); }
java
public Vertigo deployNetwork(String name) { return deployNetwork(name, (Handler<AsyncResult<ActiveNetwork>>) null); }
[ "public", "Vertigo", "deployNetwork", "(", "String", "name", ")", "{", "return", "deployNetwork", "(", "name", ",", "(", "Handler", "<", "AsyncResult", "<", "ActiveNetwork", ">", ">", ")", "null", ")", ";", "}" ]
Deploys a bare network to an anonymous local-only cluster.<p> The network will be deployed with no components and no connections. You can add components and connections to the network with an {@link ActiveNetwork} instance. @param name The name of the network to deploy. @return The Vertigo instance.
[ "Deploys", "a", "bare", "network", "to", "an", "anonymous", "local", "-", "only", "cluster", ".", "<p", ">" ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/Vertigo.java#L315-L317
apache/flink
flink-core/src/main/java/org/apache/flink/util/Preconditions.java
Preconditions.checkArgument
public static void checkArgument(boolean condition, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!condition) { throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs)); } }
java
public static void checkArgument(boolean condition, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!condition) { throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs)); } }
[ "public", "static", "void", "checkArgument", "(", "boolean", "condition", ",", "@", "Nullable", "String", "errorMessageTemplate", ",", "@", "Nullable", "Object", "...", "errorMessageArgs", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "Illeg...
Checks the given boolean condition, and throws an {@code IllegalArgumentException} if the condition is not met (evaluates to {@code false}). @param condition The condition to check @param errorMessageTemplate The message template for the {@code IllegalArgumentException} that is thrown if the check fails. The template ...
[ "Checks", "the", "given", "boolean", "condition", "and", "throws", "an", "{", "@code", "IllegalArgumentException", "}", "if", "the", "condition", "is", "not", "met", "(", "evaluates", "to", "{", "@code", "false", "}", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/Preconditions.java#L156-L163
virgo47/javasimon
core/src/main/java/org/javasimon/callback/lastsplits/CircularList.java
CircularList.incrementIndex
private int incrementIndex(int index, int maxIndex) { int newIndex = index + 1; if (newIndex >= elements.length) { newIndex = maxIndex; } return newIndex; }
java
private int incrementIndex(int index, int maxIndex) { int newIndex = index + 1; if (newIndex >= elements.length) { newIndex = maxIndex; } return newIndex; }
[ "private", "int", "incrementIndex", "(", "int", "index", ",", "int", "maxIndex", ")", "{", "int", "newIndex", "=", "index", "+", "1", ";", "if", "(", "newIndex", ">=", "elements", ".", "length", ")", "{", "newIndex", "=", "maxIndex", ";", "}", "return"...
Increment an index @param index Input index @param maxIndex Assigned value when capacity is reached @return Output index
[ "Increment", "an", "index" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/lastsplits/CircularList.java#L98-L104
mguymon/naether
src/main/java/com/tobedevoured/naether/maven/Project.java
Project.writePom
public void writePom(File file) throws ProjectException { log.debug("Writing pom: {}", file.getPath()); Project copy = this; copy.removeProperty( "project.basedir" ); Writer writer; try { writer = new BufferedWriter(new FileWriter(file)); } catch (IOExceptio...
java
public void writePom(File file) throws ProjectException { log.debug("Writing pom: {}", file.getPath()); Project copy = this; copy.removeProperty( "project.basedir" ); Writer writer; try { writer = new BufferedWriter(new FileWriter(file)); } catch (IOExceptio...
[ "public", "void", "writePom", "(", "File", "file", ")", "throws", "ProjectException", "{", "log", ".", "debug", "(", "\"Writing pom: {}\"", ",", "file", ".", "getPath", "(", ")", ")", ";", "Project", "copy", "=", "this", ";", "copy", ".", "removeProperty",...
Write pom to {@link File} @param file {@link File} @throws ProjectException exception
[ "Write", "pom", "to", "{", "@link", "File", "}" ]
train
https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L516-L535
graknlabs/grakn
server/src/server/exception/TransactionException.java
TransactionException.loopCreated
public static TransactionException loopCreated(SchemaConcept type, SchemaConcept superElement) { return create(ErrorMessage.SUPER_LOOP_DETECTED.getMessage(type.label(), superElement.label())); }
java
public static TransactionException loopCreated(SchemaConcept type, SchemaConcept superElement) { return create(ErrorMessage.SUPER_LOOP_DETECTED.getMessage(type.label(), superElement.label())); }
[ "public", "static", "TransactionException", "loopCreated", "(", "SchemaConcept", "type", ",", "SchemaConcept", "superElement", ")", "{", "return", "create", "(", "ErrorMessage", ".", "SUPER_LOOP_DETECTED", ".", "getMessage", "(", "type", ".", "label", "(", ")", ",...
Thrown when setting {@code superType} as the super type of {@code type} and a loop is created
[ "Thrown", "when", "setting", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/exception/TransactionException.java#L143-L145
kiswanij/jk-util
src/main/java/com/jk/util/xml/JKXmlHandler.java
JKXmlHandler.toXml
public void toXml(Object object, OutputStream out, Class<?>... clas) { try { JAXBContext jaxbContext = JAXBContext.newInstance(clas); Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); // output pretty printed jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); jaxbMarshaller.m...
java
public void toXml(Object object, OutputStream out, Class<?>... clas) { try { JAXBContext jaxbContext = JAXBContext.newInstance(clas); Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); // output pretty printed jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); jaxbMarshaller.m...
[ "public", "void", "toXml", "(", "Object", "object", ",", "OutputStream", "out", ",", "Class", "<", "?", ">", "...", "clas", ")", "{", "try", "{", "JAXBContext", "jaxbContext", "=", "JAXBContext", ".", "newInstance", "(", "clas", ")", ";", "Marshaller", "...
To xml. @param object the object @param out the out @param clas the clas
[ "To", "xml", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/xml/JKXmlHandler.java#L79-L89
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPageIdsNotContainingTemplateNames
public List<Integer> getPageIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, false); }
java
public List<Integer> getPageIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, false); }
[ "public", "List", "<", "Integer", ">", "getPageIdsNotContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPageIds", "(", "templateNames", ",", "false", ")", ";", "}" ]
Returns a list containing the ids of all pages that do not contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all pages that do not contain any of the the specified templates @throws WikiApiException ...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "pages", "that", "do", "not", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L990-L992
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java
Printer.visitTypes
public String visitTypes(List<Type> ts, Locale locale) { ListBuffer<String> sbuf = new ListBuffer<>(); for (Type t : ts) { sbuf.append(visit(t, locale)); } return sbuf.toList().toString(); }
java
public String visitTypes(List<Type> ts, Locale locale) { ListBuffer<String> sbuf = new ListBuffer<>(); for (Type t : ts) { sbuf.append(visit(t, locale)); } return sbuf.toList().toString(); }
[ "public", "String", "visitTypes", "(", "List", "<", "Type", ">", "ts", ",", "Locale", "locale", ")", "{", "ListBuffer", "<", "String", ">", "sbuf", "=", "new", "ListBuffer", "<>", "(", ")", ";", "for", "(", "Type", "t", ":", "ts", ")", "{", "sbuf",...
Get a localized string representation for all the types in the input list. @param ts types to be displayed @param locale the locale in which the string is to be rendered @return localized string representation
[ "Get", "a", "localized", "string", "representation", "for", "all", "the", "types", "in", "the", "input", "list", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java#L105-L111
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
AssemblyAnalyzer.isDotnetPath
private boolean isDotnetPath() { final String[] args = new String[2]; args[0] = "dotnet"; args[1] = "--version"; final ProcessBuilder pb = new ProcessBuilder(args); try { final Process proc = pb.start(); final int retCode = proc.waitFor(); if (...
java
private boolean isDotnetPath() { final String[] args = new String[2]; args[0] = "dotnet"; args[1] = "--version"; final ProcessBuilder pb = new ProcessBuilder(args); try { final Process proc = pb.start(); final int retCode = proc.waitFor(); if (...
[ "private", "boolean", "isDotnetPath", "(", ")", "{", "final", "String", "[", "]", "args", "=", "new", "String", "[", "2", "]", ";", "args", "[", "0", "]", "=", "\"dotnet\"", ";", "args", "[", "1", "]", "=", "\"--version\"", ";", "final", "ProcessBuil...
Tests to see if a file is in the system path. @return <code>true</code> if dotnet could be found in the path; otherwise <code>false</code>
[ "Tests", "to", "see", "if", "a", "file", "is", "in", "the", "system", "path", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java#L444-L467
yanzhenjie/AndServer
api/src/main/java/com/yanzhenjie/andserver/util/CollectionUtils.java
CollectionUtils.mergeArrayIntoCollection
@SuppressWarnings("unchecked") public static <E> void mergeArrayIntoCollection(Object array, Collection<E> collection) { if (collection == null) { throw new IllegalArgumentException("Collection must not be null"); } Object[] arr = ObjectUtils.toObjectArray(array); for (Ob...
java
@SuppressWarnings("unchecked") public static <E> void mergeArrayIntoCollection(Object array, Collection<E> collection) { if (collection == null) { throw new IllegalArgumentException("Collection must not be null"); } Object[] arr = ObjectUtils.toObjectArray(array); for (Ob...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "E", ">", "void", "mergeArrayIntoCollection", "(", "Object", "array", ",", "Collection", "<", "E", ">", "collection", ")", "{", "if", "(", "collection", "==", "null", ")", "{", "t...
Merge the given array into the given Collection. @param array the array to merge (may be {@code null}). @param collection the target Collection to merge the array into.
[ "Merge", "the", "given", "array", "into", "the", "given", "Collection", "." ]
train
https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/util/CollectionUtils.java#L83-L92
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel2D_F32.java
Kernel2D_F32.wrap
public static Kernel2D_F32 wrap(float data[], int width, int offset) { if (width % 2 == 0 && width <= 0 && width * width > data.length) throw new IllegalArgumentException("invalid width"); Kernel2D_F32 ret = new Kernel2D_F32(); ret.data = data; ret.width = width; ret.offset = offset; return ret; }
java
public static Kernel2D_F32 wrap(float data[], int width, int offset) { if (width % 2 == 0 && width <= 0 && width * width > data.length) throw new IllegalArgumentException("invalid width"); Kernel2D_F32 ret = new Kernel2D_F32(); ret.data = data; ret.width = width; ret.offset = offset; return ret; }
[ "public", "static", "Kernel2D_F32", "wrap", "(", "float", "data", "[", "]", ",", "int", "width", ",", "int", "offset", ")", "{", "if", "(", "width", "%", "2", "==", "0", "&&", "width", "<=", "0", "&&", "width", "*", "width", ">", "data", ".", "le...
Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Kernel origin's offset from element 0. @return A new kernel.
[ "Creates", "a", "kernel", "whose", "elements", "are", "the", "specified", "data", "array", "and", "has", "the", "specified", "width", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel2D_F32.java#L87-L97
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.containsAny
public static boolean containsAny(final CharSequence cs, final CharSequence searchChars) { if (searchChars == null) { return false; } return containsAny(cs, CharSequenceUtils.toCharArray(searchChars)); }
java
public static boolean containsAny(final CharSequence cs, final CharSequence searchChars) { if (searchChars == null) { return false; } return containsAny(cs, CharSequenceUtils.toCharArray(searchChars)); }
[ "public", "static", "boolean", "containsAny", "(", "final", "CharSequence", "cs", ",", "final", "CharSequence", "searchChars", ")", "{", "if", "(", "searchChars", "==", "null", ")", "{", "return", "false", ";", "}", "return", "containsAny", "(", "cs", ",", ...
<p> Checks if the CharSequence contains any character in the given set of characters. </p> <p> A {@code null} CharSequence will return {@code false}. A {@code null} search CharSequence will return {@code false}. </p> <pre> StringUtils.containsAny(null, *) = false StringUtils.containsAny("", *) ...
[ "<p", ">", "Checks", "if", "the", "CharSequence", "contains", "any", "character", "in", "the", "given", "set", "of", "characters", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L2217-L2222
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.newArray
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nullable final Collection <? extends ELEMENTTYPE> aCollection, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); if (CollectionHelp...
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nullable final Collection <? extends ELEMENTTYPE> aCollection, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); if (CollectionHelp...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "newArray", "(", "@", "Nullable", "final", "Collection", "<", "?", "extends", "ELEMENTTYPE", ">", "aCollection", ",", "@", "Nonnull", "final", "Cla...
Create a new array with the elements in the passed collection.. @param <ELEMENTTYPE> Type of element @param aCollection The collection to be converted to an array. May be <code>null</code> . @param aClass The class of the elements inside the collection. May not be <code>null</code>. @return <code>null</code> if the pa...
[ "Create", "a", "new", "array", "with", "the", "elements", "in", "the", "passed", "collection", ".." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3892-L3904
grails/grails-core
grails-core/src/main/groovy/org/grails/core/io/MockStringResourceLoader.java
MockStringResourceLoader.registerMockResource
public void registerMockResource(String location, String contents) { try { mockResources.put(location, new GrailsByteArrayResource(contents.getBytes("UTF-8"), location)); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
java
public void registerMockResource(String location, String contents) { try { mockResources.put(location, new GrailsByteArrayResource(contents.getBytes("UTF-8"), location)); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
[ "public", "void", "registerMockResource", "(", "String", "location", ",", "String", "contents", ")", "{", "try", "{", "mockResources", ".", "put", "(", "location", ",", "new", "GrailsByteArrayResource", "(", "contents", ".", "getBytes", "(", "\"UTF-8\"", ")", ...
Registers a mock resource with the first argument as the location and the second as the contents of the resource. @param location The location @param contents The contents of the resource
[ "Registers", "a", "mock", "resource", "with", "the", "first", "argument", "as", "the", "location", "and", "the", "second", "as", "the", "contents", "of", "the", "resource", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/core/io/MockStringResourceLoader.java#L60-L67
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/message/aes/SHA1.java
SHA1.getSHA1
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { try { String[] array = new String[]{token, timestamp, nonce, encrypt}; StringBuffer sb = new StringBuffer(); // 字符串排序 Arrays.sort(array); f...
java
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { try { String[] array = new String[]{token, timestamp, nonce, encrypt}; StringBuffer sb = new StringBuffer(); // 字符串排序 Arrays.sort(array); f...
[ "public", "static", "String", "getSHA1", "(", "String", "token", ",", "String", "timestamp", ",", "String", "nonce", ",", "String", "encrypt", ")", "throws", "AesException", "{", "try", "{", "String", "[", "]", "array", "=", "new", "String", "[", "]", "{...
用SHA1算法生成安全签名 @param token 票据 @param timestamp 时间戳 @param nonce 随机字符串 @param encrypt 密文 @return 安全签名 @throws AesException AES算法异常
[ "用SHA1算法生成安全签名" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/message/aes/SHA1.java#L30-L46
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.java
PythonDistributionAnalyzer.prepareFileTypeAnalyzer
@Override protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException { try { final File baseDir = getSettings().getTempDirectory(); tempFileLocation = File.createTempFile("check", "tmp", baseDir); if (!tempFileLocation.delete()) { ...
java
@Override protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException { try { final File baseDir = getSettings().getTempDirectory(); tempFileLocation = File.createTempFile("check", "tmp", baseDir); if (!tempFileLocation.delete()) { ...
[ "@", "Override", "protected", "void", "prepareFileTypeAnalyzer", "(", "Engine", "engine", ")", "throws", "InitializationException", "{", "try", "{", "final", "File", "baseDir", "=", "getSettings", "(", ")", ".", "getTempDirectory", "(", ")", ";", "tempFileLocation...
Makes sure a usable temporary directory is available. @param engine a reference to the dependency-check engine @throws InitializationException an AnalyzeException is thrown when the temp directory cannot be created
[ "Makes", "sure", "a", "usable", "temporary", "directory", "is", "available", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.java#L244-L267
twitter/scalding
scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java
ScroogeReadSupport.assertGroupsAreCompatible
public static void assertGroupsAreCompatible(GroupType fileType, GroupType projection) { List<Type> fields = projection.getFields(); for (Type otherType : fields) { if (fileType.containsField(otherType.getName())) { Type thisType = fileType.getType(otherType.getName()); assertAreCompatible...
java
public static void assertGroupsAreCompatible(GroupType fileType, GroupType projection) { List<Type> fields = projection.getFields(); for (Type otherType : fields) { if (fileType.containsField(otherType.getName())) { Type thisType = fileType.getType(otherType.getName()); assertAreCompatible...
[ "public", "static", "void", "assertGroupsAreCompatible", "(", "GroupType", "fileType", ",", "GroupType", "projection", ")", "{", "List", "<", "Type", ">", "fields", "=", "projection", ".", "getFields", "(", ")", ";", "for", "(", "Type", "otherType", ":", "fi...
Validates that the requested group type projection is compatible. This allows the projection schema to have extra optional fields. @param fileType the typed schema of the source @param projection requested projection schema
[ "Validates", "that", "the", "requested", "group", "type", "projection", "is", "compatible", ".", "This", "allows", "the", "projection", "schema", "to", "have", "extra", "optional", "fields", "." ]
train
https://github.com/twitter/scalding/blob/428b5507279655676e507d52c669c3cbc7812dc0/scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java#L160-L173
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/route/WebjarsResourceHandler.java
WebjarsResourceHandler.locatePomProperties
private List<String> locatePomProperties() { List<String> propertiesFiles = new ArrayList<>(); List<URL> packageUrls = ClasspathUtils.getResources(getResourceBasePath()); for (URL packageUrl : packageUrls) { if (packageUrl.getProtocol().equals("jar")) { // We only car...
java
private List<String> locatePomProperties() { List<String> propertiesFiles = new ArrayList<>(); List<URL> packageUrls = ClasspathUtils.getResources(getResourceBasePath()); for (URL packageUrl : packageUrls) { if (packageUrl.getProtocol().equals("jar")) { // We only car...
[ "private", "List", "<", "String", ">", "locatePomProperties", "(", ")", "{", "List", "<", "String", ">", "propertiesFiles", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "URL", ">", "packageUrls", "=", "ClasspathUtils", ".", "getResources", "(...
Locate all Webjars Maven pom.properties files on the classpath. @return a list of Maven pom.properties files on the classpath
[ "Locate", "all", "Webjars", "Maven", "pom", ".", "properties", "files", "on", "the", "classpath", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/route/WebjarsResourceHandler.java#L148-L173
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java
OrmLiteDefaultContentProvider.onBulkInsert
public Uri onBulkInsert(T helper, SQLiteDatabase db, MatcherPattern target, InsertParameters parameter) { return onInsert(helper, db, target, parameter); }
java
public Uri onBulkInsert(T helper, SQLiteDatabase db, MatcherPattern target, InsertParameters parameter) { return onInsert(helper, db, target, parameter); }
[ "public", "Uri", "onBulkInsert", "(", "T", "helper", ",", "SQLiteDatabase", "db", ",", "MatcherPattern", "target", ",", "InsertParameters", "parameter", ")", "{", "return", "onInsert", "(", "helper", ",", "db", ",", "target", ",", "parameter", ")", ";", "}" ...
You implement this method. At the timing of bulkInsert() method, which calls the onBulkInsert(). Start the transaction, will be called for each record. @param helper This is a helper object. It is the same as one that can be retrieved by this.getHelper(). @param db This is a SQLiteDatabase object. Return the object obt...
[ "You", "implement", "this", "method", ".", "At", "the", "timing", "of", "bulkInsert", "()", "method", "which", "calls", "the", "onBulkInsert", "()", ".", "Start", "the", "transaction", "will", "be", "called", "for", "each", "record", "." ]
train
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java#L398-L400
Netflix/zuul
zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java
Http2ConnectionCloseHandler.gracefullyWithDelay
protected void gracefullyWithDelay(ChannelHandlerContext ctx, Channel channel, ChannelPromise promise) { // See javadoc for explanation of why this may be disabled. if (! ALLOW_GRACEFUL_DELAYED.get()) { gracefully(channel, promise); return; } if (isAlreadyClo...
java
protected void gracefullyWithDelay(ChannelHandlerContext ctx, Channel channel, ChannelPromise promise) { // See javadoc for explanation of why this may be disabled. if (! ALLOW_GRACEFUL_DELAYED.get()) { gracefully(channel, promise); return; } if (isAlreadyClo...
[ "protected", "void", "gracefullyWithDelay", "(", "ChannelHandlerContext", "ctx", ",", "Channel", "channel", ",", "ChannelPromise", "promise", ")", "{", "// See javadoc for explanation of why this may be disabled.", "if", "(", "!", "ALLOW_GRACEFUL_DELAYED", ".", "get", "(", ...
WARNING: Found the OkHttp client gets confused by this behaviour (it ends up putting itself in a bad shutdown state after receiving the first goaway frame, and then dropping any inflight responses but also timing out waiting for them). And worried that other http/2 stacks may be similar, so for now we should NOT use t...
[ "WARNING", ":", "Found", "the", "OkHttp", "client", "gets", "confused", "by", "this", "behaviour", "(", "it", "ends", "up", "putting", "itself", "in", "a", "bad", "shutdown", "state", "after", "receiving", "the", "first", "goaway", "frame", "and", "then", ...
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java#L149-L183
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/GridLayoutExample.java
GridLayoutExample.addBoxes
private static void addBoxes(final WPanel panel, final int amount) { for (int i = 1; i <= amount; i++) { panel.add(new BoxComponent(String.valueOf(i))); } }
java
private static void addBoxes(final WPanel panel, final int amount) { for (int i = 1; i <= amount; i++) { panel.add(new BoxComponent(String.valueOf(i))); } }
[ "private", "static", "void", "addBoxes", "(", "final", "WPanel", "panel", ",", "final", "int", "amount", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "amount", ";", "i", "++", ")", "{", "panel", ".", "add", "(", "new", "BoxComponent"...
Adds a set of boxes to the given panel. @param panel the panel to add the boxes to. @param amount the number of boxes to add.
[ "Adds", "a", "set", "of", "boxes", "to", "the", "given", "panel", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/GridLayoutExample.java#L133-L137
jaredrummler/AndroidShell
library/src/main/java/com/jaredrummler/android/shell/Shell.java
Shell.parseAvailableResult
static boolean parseAvailableResult(List<String> stdout, boolean checkForRoot) { if (stdout == null) { return false; } // this is only one of many ways this can be done boolean echoSeen = false; for (String line : stdout) { if (line.contains("uid=")) { // id command is working,...
java
static boolean parseAvailableResult(List<String> stdout, boolean checkForRoot) { if (stdout == null) { return false; } // this is only one of many ways this can be done boolean echoSeen = false; for (String line : stdout) { if (line.contains("uid=")) { // id command is working,...
[ "static", "boolean", "parseAvailableResult", "(", "List", "<", "String", ">", "stdout", ",", "boolean", "checkForRoot", ")", "{", "if", "(", "stdout", "==", "null", ")", "{", "return", "false", ";", "}", "// this is only one of many ways this can be done", "boolea...
See if the shell is alive, and if so, check the UID @param stdout Standard output from running AVAILABLE_TEST_COMMANDS @param checkForRoot true if we are expecting this shell to be running as root @return true on success, false on error
[ "See", "if", "the", "shell", "is", "alive", "and", "if", "so", "check", "the", "UID" ]
train
https://github.com/jaredrummler/AndroidShell/blob/0826b6f93c208b7bc95344dd20e2989d367a1e43/library/src/main/java/com/jaredrummler/android/shell/Shell.java#L231-L251
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java
AbstractHBaseUtils.getResultScan
public Scan getResultScan(String tableName, String famName, ByteBuffer startKey, ByteBuffer endKey) throws IOException { logger.debug("AbstractHBaseUtils Begin of getResultScan(" + tableName + ", " + famName + ")"); Scan scan = new Scan(); scan.addFamily(Bytes.toBytes(famName)); ...
java
public Scan getResultScan(String tableName, String famName, ByteBuffer startKey, ByteBuffer endKey) throws IOException { logger.debug("AbstractHBaseUtils Begin of getResultScan(" + tableName + ", " + famName + ")"); Scan scan = new Scan(); scan.addFamily(Bytes.toBytes(famName)); ...
[ "public", "Scan", "getResultScan", "(", "String", "tableName", ",", "String", "famName", ",", "ByteBuffer", "startKey", ",", "ByteBuffer", "endKey", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"AbstractHBaseUtils Begin of getResultScan(\"", "+", ...
Creates a scan @param tableName to be scan @param famName to be checked @param startKey to query the table @param endKey to query the table @param conf @return Scan inside the table @throws IOException
[ "Creates", "a", "scan" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java#L229-L240
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.fetchPubkeysList
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
java
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
[ "public", "static", "PublicKeysListElement", "fetchPubkeysList", "(", "XMPPConnection", "connection", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "PubSubException", ".", "NotAPubSubNodeException", ",", "PubSubException", ".", ...
Consult the public key metadata node and fetch a list of all of our published OpenPGP public keys. @see <a href="https://xmpp.org/extensions/xep-0373.html#discover-pubkey-list"> XEP-0373 §4.3: Discovering Public Keys of a User</a> @param connection XMPP connection @return content of our metadata node. @throws Interr...
[ "Consult", "the", "public", "key", "metadata", "node", "and", "fetch", "a", "list", "of", "all", "of", "our", "published", "OpenPGP", "public", "keys", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L180-L184
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dslTemplate
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, Object... args) { return dslTemplate(cl, template, ImmutableList.copyOf(args)); }
java
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, Object... args) { return dslTemplate(cl, template, ImmutableList.copyOf(args)); }
[ "public", "static", "<", "T", ">", "DslTemplate", "<", "T", ">", "dslTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "Template", "template", ",", "Object", "...", "args", ")", "{", "return", "dslTemplate", "(", "cl", ",", "template",...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L359-L361
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/collections/ImmutableMultitable.java
ImmutableMultitable.putAll
@Deprecated @Override public boolean putAll(final R rowKey, final C columnKey, final Iterable<? extends V> values) { throw new UnsupportedOperationException(); }
java
@Deprecated @Override public boolean putAll(final R rowKey, final C columnKey, final Iterable<? extends V> values) { throw new UnsupportedOperationException(); }
[ "@", "Deprecated", "@", "Override", "public", "boolean", "putAll", "(", "final", "R", "rowKey", ",", "final", "C", "columnKey", ",", "final", "Iterable", "<", "?", "extends", "V", ">", "values", ")", "{", "throw", "new", "UnsupportedOperationException", "(",...
Guaranteed to throw an exception and leave the table unmodified. @throws UnsupportedOperationException always @deprecated Unsupported operation.
[ "Guaranteed", "to", "throw", "an", "exception", "and", "leave", "the", "table", "unmodified", "." ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/ImmutableMultitable.java#L129-L133
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/Address.java
Address.fromModelNodeWrapper
public static Address fromModelNodeWrapper(ModelNode haystack, String needle) { if (haystack.hasDefined(needle)) { return fromModelNode(haystack.get(needle)); } throw new IllegalArgumentException("There is no address under the key [" + needle + "] in the node: " + ha...
java
public static Address fromModelNodeWrapper(ModelNode haystack, String needle) { if (haystack.hasDefined(needle)) { return fromModelNode(haystack.get(needle)); } throw new IllegalArgumentException("There is no address under the key [" + needle + "] in the node: " + ha...
[ "public", "static", "Address", "fromModelNodeWrapper", "(", "ModelNode", "haystack", ",", "String", "needle", ")", "{", "if", "(", "haystack", ".", "hasDefined", "(", "needle", ")", ")", "{", "return", "fromModelNode", "(", "haystack", ".", "get", "(", "need...
Obtains an address property list from the given ModelNode wrapper. The given haystack must have a key whose value is the same as needle. The value of that named property must itself be a property list containing all address parts (and only address parts). @param haystack the wrapper ModelNode that contains a property ...
[ "Obtains", "an", "address", "property", "list", "from", "the", "given", "ModelNode", "wrapper", ".", "The", "given", "haystack", "must", "have", "a", "key", "whose", "value", "is", "the", "same", "as", "needle", ".", "The", "value", "of", "that", "named", ...
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/Address.java#L119-L126
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java
AmazonSQSMessagingClientWrapper.changeMessageVisibility
public void changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws JMSException { try { prepareRequest(changeMessageVisibilityRequest); amazonSQSClient.changeMessageVisibility(changeMessageVisibilityRequest); } catch (AmazonClientException e...
java
public void changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws JMSException { try { prepareRequest(changeMessageVisibilityRequest); amazonSQSClient.changeMessageVisibility(changeMessageVisibilityRequest); } catch (AmazonClientException e...
[ "public", "void", "changeMessageVisibility", "(", "ChangeMessageVisibilityRequest", "changeMessageVisibilityRequest", ")", "throws", "JMSException", "{", "try", "{", "prepareRequest", "(", "changeMessageVisibilityRequest", ")", ";", "amazonSQSClient", ".", "changeMessageVisibil...
Calls <code>changeMessageVisibility</code> and wraps <code>AmazonClientException</code>. This is used to for negative acknowledge of a single message, so that messages can be received again without any delay. @param changeMessageVisibilityRequest Container for the necessary parameters to execute the changeMessageVisib...
[ "Calls", "<code", ">", "changeMessageVisibility<", "/", "code", ">", "and", "wraps", "<code", ">", "AmazonClientException<", "/", "code", ">", ".", "This", "is", "used", "to", "for", "negative", "acknowledge", "of", "a", "single", "message", "so", "that", "m...
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L366-L373
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPartialDateField.java
WPartialDateField.getDay
public Integer getDay() { String dateValue = getValue(); if (dateValue != null && dateValue.length() == DAY_END) { return parseDateComponent(dateValue.substring(DAY_START, DAY_END), getPaddingChar()); } else { return null; } }
java
public Integer getDay() { String dateValue = getValue(); if (dateValue != null && dateValue.length() == DAY_END) { return parseDateComponent(dateValue.substring(DAY_START, DAY_END), getPaddingChar()); } else { return null; } }
[ "public", "Integer", "getDay", "(", ")", "{", "String", "dateValue", "=", "getValue", "(", ")", ";", "if", "(", "dateValue", "!=", "null", "&&", "dateValue", ".", "length", "(", ")", "==", "DAY_END", ")", "{", "return", "parseDateComponent", "(", "dateVa...
Returns the day of the month value. @return the day of the month, or null if unspecified.
[ "Returns", "the", "day", "of", "the", "month", "value", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPartialDateField.java#L497-L505
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/remarketing/UploadOfflineData.java
UploadOfflineData.getFieldPathElementIndex
private static Integer getFieldPathElementIndex(ApiError apiError, String field) { FieldPathElement[] fieldPathElements = apiError.getFieldPathElements(); if (fieldPathElements == null) { return null; } for(int i = 0; i < fieldPathElements.length; i++) { FieldPathElement fieldPathElement = f...
java
private static Integer getFieldPathElementIndex(ApiError apiError, String field) { FieldPathElement[] fieldPathElements = apiError.getFieldPathElements(); if (fieldPathElements == null) { return null; } for(int i = 0; i < fieldPathElements.length; i++) { FieldPathElement fieldPathElement = f...
[ "private", "static", "Integer", "getFieldPathElementIndex", "(", "ApiError", "apiError", ",", "String", "field", ")", "{", "FieldPathElement", "[", "]", "fieldPathElements", "=", "apiError", ".", "getFieldPathElements", "(", ")", ";", "if", "(", "fieldPathElements",...
Returns the {@link FieldPathElement#getIndex()} for the specified {@code field} name, if present in the error's field path elements. @param apiError the error to inspect. @param field the name of the field to search for in the error's field path elements. @return the index of the entry with the specified field, or {@c...
[ "Returns", "the", "{", "@link", "FieldPathElement#getIndex", "()", "}", "for", "the", "specified", "{", "@code", "field", "}", "name", "if", "present", "in", "the", "error", "s", "field", "path", "elements", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/remarketing/UploadOfflineData.java#L377-L389
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java
OverrideService.updateRepeatNumber
public void updateRepeatNumber(int overrideId, int pathId, Integer ordinal, Integer repeatNumber, String clientUUID) { if (ordinal == null) { ordinal = 1; } try { // get ID of the ordinal int enabledId = getEnabledEndpoint(pathId, overrideId, ordinal, clientU...
java
public void updateRepeatNumber(int overrideId, int pathId, Integer ordinal, Integer repeatNumber, String clientUUID) { if (ordinal == null) { ordinal = 1; } try { // get ID of the ordinal int enabledId = getEnabledEndpoint(pathId, overrideId, ordinal, clientU...
[ "public", "void", "updateRepeatNumber", "(", "int", "overrideId", ",", "int", "pathId", ",", "Integer", "ordinal", ",", "Integer", "repeatNumber", ",", "String", "clientUUID", ")", "{", "if", "(", "ordinal", "==", "null", ")", "{", "ordinal", "=", "1", ";"...
Update the repeat number for a given enabled override @param overrideId - override ID to update @param pathId - path ID to update @param ordinal - can be null, Index of the enabled override to edit if multiple of the same are enabled @param repeatNumber - number of times to repeat @param clientUUID - clientUUID
[ "Update", "the", "repeat", "number", "for", "a", "given", "enabled", "override" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java#L188-L200
hal/core
gui/src/main/java/org/jboss/as/console/client/shared/flow/TimeoutOperation.java
TimeoutOperation.start
public final void start(final DispatchAsync dispatcher, final ModelNode operation, final Callback callback) { Command dispatchCmd = new Command() { @Override public void execute() { dispatcher.execute(new DMRAction(operation), new AsyncCallback<DMRResponse>() { ...
java
public final void start(final DispatchAsync dispatcher, final ModelNode operation, final Callback callback) { Command dispatchCmd = new Command() { @Override public void execute() { dispatcher.execute(new DMRAction(operation), new AsyncCallback<DMRResponse>() { ...
[ "public", "final", "void", "start", "(", "final", "DispatchAsync", "dispatcher", ",", "final", "ModelNode", "operation", ",", "final", "Callback", "callback", ")", "{", "Command", "dispatchCmd", "=", "new", "Command", "(", ")", "{", "@", "Override", "public", ...
Executes a DMR operation and repeatedly calls {@code checker} until {@link #setConditionSatisfied(boolean)} was called with {@code true} or the timeout is reached. @param dispatcher the dispatcher @param operation the DMR operation which should be executed @param callback the final callback
[ "Executes", "a", "DMR", "operation", "and", "repeatedly", "calls", "{", "@code", "checker", "}", "until", "{", "@link", "#setConditionSatisfied", "(", "boolean", ")", "}", "was", "called", "with", "{", "@code", "true", "}", "or", "the", "timeout", "is", "r...
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/shared/flow/TimeoutOperation.java#L53-L72
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.parseCapacity
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { Extension incrementer = null; Extension decrementer = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT : {...
java
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { Extension incrementer = null; Extension decrementer = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT : {...
[ "protected", "Capacity", "parseCapacity", "(", "XMLStreamReader", "reader", ")", "throws", "XMLStreamException", ",", "ParserException", ",", "ValidateException", "{", "Extension", "incrementer", "=", "null", ";", "Extension", "decrementer", "=", "null", ";", "while",...
Parse capacity tag @param reader reader @return the parsed capacity object @throws XMLStreamException in case of error @throws ParserException in case of error @throws ValidateException in case of error
[ "Parse", "capacity", "tag" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L836-L876
icode/ameba
src/main/java/ameba/db/ebean/internal/ModelInterceptor.java
ModelInterceptor.applyOrderBy
public static void applyOrderBy(MultivaluedMap<String, String> queryParams, Query query) { List<String> orders = queryParams.get(SORT_PARAM_NAME); if (orders != null && orders.size() > 0) { OrderBy orderBy = query.orderBy(); for (String order : orders) { EbeanUtil...
java
public static void applyOrderBy(MultivaluedMap<String, String> queryParams, Query query) { List<String> orders = queryParams.get(SORT_PARAM_NAME); if (orders != null && orders.size() > 0) { OrderBy orderBy = query.orderBy(); for (String order : orders) { EbeanUtil...
[ "public", "static", "void", "applyOrderBy", "(", "MultivaluedMap", "<", "String", ",", "String", ">", "queryParams", ",", "Query", "query", ")", "{", "List", "<", "String", ">", "orders", "=", "queryParams", ".", "get", "(", "SORT_PARAM_NAME", ")", ";", "i...
<p>applyOrderBy.</p> @param queryParams a {@link javax.ws.rs.core.MultivaluedMap} object. @param query a {@link io.ebean.Query} object.
[ "<p", ">", "applyOrderBy", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/internal/ModelInterceptor.java#L236-L244
alkacon/opencms-core
src/org/opencms/relations/CmsLinkUpdateUtil.java
CmsLinkUpdateUtil.updateXmlForHtmlValue
public static void updateXmlForHtmlValue(CmsLink link, String name, Element element) { // if element is not null if (element != null) { // update the additional attributes if (name != null) { updateAttribute(element, CmsLink.ATTRIBUTE_NAME, link.getName()); ...
java
public static void updateXmlForHtmlValue(CmsLink link, String name, Element element) { // if element is not null if (element != null) { // update the additional attributes if (name != null) { updateAttribute(element, CmsLink.ATTRIBUTE_NAME, link.getName()); ...
[ "public", "static", "void", "updateXmlForHtmlValue", "(", "CmsLink", "link", ",", "String", "name", ",", "Element", "element", ")", "{", "// if element is not null", "if", "(", "element", "!=", "null", ")", "{", "// update the additional attributes", "if", "(", "n...
Updates the given xml element with this link information.<p> @param link the link to get the information from @param name the (optional) name of the link @param element the &lt;link&gt; element to update
[ "Updates", "the", "given", "xml", "element", "with", "this", "link", "information", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsLinkUpdateUtil.java#L89-L101
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/refer/Descriptor.java
Descriptor.exactMatch
public boolean exactMatch(Descriptor descriptor) { return exactMatchField(_group, descriptor.getGroup()) && exactMatchField(_type, descriptor.getType()) && exactMatchField(_kind, descriptor.getKind()) && exactMatchField(_name, descriptor.getName()) && exactMatchField(_version, descriptor.getVersion()); }
java
public boolean exactMatch(Descriptor descriptor) { return exactMatchField(_group, descriptor.getGroup()) && exactMatchField(_type, descriptor.getType()) && exactMatchField(_kind, descriptor.getKind()) && exactMatchField(_name, descriptor.getName()) && exactMatchField(_version, descriptor.getVersion()); }
[ "public", "boolean", "exactMatch", "(", "Descriptor", "descriptor", ")", "{", "return", "exactMatchField", "(", "_group", ",", "descriptor", ".", "getGroup", "(", ")", ")", "&&", "exactMatchField", "(", "_type", ",", "descriptor", ".", "getType", "(", ")", "...
Matches this descriptor to another descriptor by all fields. No exceptions are made. @param descriptor the descriptor to match this one against. @return true if descriptors match and false otherwise. @see #match(Descriptor)
[ "Matches", "this", "descriptor", "to", "another", "descriptor", "by", "all", "fields", ".", "No", "exceptions", "are", "made", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/refer/Descriptor.java#L154-L158
duracloud/duracloud
retrievaltool/src/main/java/org/duracloud/retrieval/mgmt/RetrievalWorker.java
RetrievalWorker.applyTimestamps
protected void applyTimestamps(ContentStream content, File localFile) { FileTime createTime = convertDateToFileTime(content.getDateCreated()); FileTime lastAccessTime = convertDateToFileTime(content.getDateLastAccessed()); FileTime lastModTime = convertDateToF...
java
protected void applyTimestamps(ContentStream content, File localFile) { FileTime createTime = convertDateToFileTime(content.getDateCreated()); FileTime lastAccessTime = convertDateToFileTime(content.getDateLastAccessed()); FileTime lastModTime = convertDateToF...
[ "protected", "void", "applyTimestamps", "(", "ContentStream", "content", ",", "File", "localFile", ")", "{", "FileTime", "createTime", "=", "convertDateToFileTime", "(", "content", ".", "getDateCreated", "(", ")", ")", ";", "FileTime", "lastAccessTime", "=", "conv...
/* Applies timestamps which are found in the content item's properties to the retrieved file
[ "/", "*", "Applies", "timestamps", "which", "are", "found", "in", "the", "content", "item", "s", "properties", "to", "the", "retrieved", "file" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/retrievaltool/src/main/java/org/duracloud/retrieval/mgmt/RetrievalWorker.java#L275-L295
visallo/vertexium
security/src/main/java/org/vertexium/security/WritableComparator.java
WritableComparator.readVLong
public static long readVLong(byte[] bytes, int start) throws IOException { int len = bytes[start]; if (len >= -112) { return len; } boolean isNegative = (len < -120); len = isNegative ? -(len + 120) : -(len + 112); if (start + 1 + len > bytes.length) { ...
java
public static long readVLong(byte[] bytes, int start) throws IOException { int len = bytes[start]; if (len >= -112) { return len; } boolean isNegative = (len < -120); len = isNegative ? -(len + 120) : -(len + 112); if (start + 1 + len > bytes.length) { ...
[ "public", "static", "long", "readVLong", "(", "byte", "[", "]", "bytes", ",", "int", "start", ")", "throws", "IOException", "{", "int", "len", "=", "bytes", "[", "start", "]", ";", "if", "(", "len", ">=", "-", "112", ")", "{", "return", "len", ";",...
Reads a zero-compressed encoded long from a byte array and returns it. @param bytes byte array with decode long @param start starting index @return deserialized long @throws java.io.IOException
[ "Reads", "a", "zero", "-", "compressed", "encoded", "long", "from", "a", "byte", "array", "and", "returns", "it", "." ]
train
https://github.com/visallo/vertexium/blob/bb132b5425ac168957667164e1409b78adbea769/security/src/main/java/org/vertexium/security/WritableComparator.java#L241-L257
mapbox/mapbox-events-android
liblocation/src/main/java/com/mapbox/android/core/permissions/PermissionsManager.java
PermissionsManager.onRequestPermissionsResult
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { switch (requestCode) { case REQUEST_PERMISSIONS_CODE: if (listener != null) { boolean granted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; liste...
java
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { switch (requestCode) { case REQUEST_PERMISSIONS_CODE: if (listener != null) { boolean granted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; liste...
[ "public", "void", "onRequestPermissionsResult", "(", "int", "requestCode", ",", "String", "[", "]", "permissions", ",", "int", "[", "]", "grantResults", ")", "{", "switch", "(", "requestCode", ")", "{", "case", "REQUEST_PERMISSIONS_CODE", ":", "if", "(", "list...
You should call this method from your activity onRequestPermissionsResult. @param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int) @param permissions The requested permissions. Never null. @param grantResults The grant results for the corresponding permissions which is e...
[ "You", "should", "call", "this", "method", "from", "your", "activity", "onRequestPermissionsResult", "." ]
train
https://github.com/mapbox/mapbox-events-android/blob/5b5ca7e04cb8fab31a8dc040b6e7521f930a58a4/liblocation/src/main/java/com/mapbox/android/core/permissions/PermissionsManager.java#L95-L106
otto-de/edison-hal
src/main/java/de/otto/edison/hal/traverson/Traverson.java
Traverson.streamAs
@SuppressWarnings("unchecked") public <T extends HalRepresentation> Stream<T> streamAs(final Class<T> type, final EmbeddedTypeInfo embeddedTypeInfo, final EmbeddedTypeInfo... moreEmbeddedTypeInfos...
java
@SuppressWarnings("unchecked") public <T extends HalRepresentation> Stream<T> streamAs(final Class<T> type, final EmbeddedTypeInfo embeddedTypeInfo, final EmbeddedTypeInfo... moreEmbeddedTypeInfos...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "HalRepresentation", ">", "Stream", "<", "T", ">", "streamAs", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "EmbeddedTypeInfo", "embeddedTypeInfo", ",", "final", ...
Follow the {@link Link}s of the current resource, selected by its link-relation type and returns a {@link Stream} containing the returned {@link HalRepresentation HalRepresentations}. <p> The EmbeddedTypeInfo is used to define the specific type of embedded items. </p> <p> Templated links are expanded to URIs using the ...
[ "Follow", "the", "{" ]
train
https://github.com/otto-de/edison-hal/blob/1582d2b49d1f0d9103e03bf742f18afa9d166992/src/main/java/de/otto/edison/hal/traverson/Traverson.java#L1031-L1043
mapbox/mapbox-events-android
libcore/src/main/java/com/mapbox/android/core/FileUtils.java
FileUtils.getFile
@NonNull public static File getFile(@NonNull Context context, @NonNull String fileName) { return new File(context.getFilesDir(), fileName); }
java
@NonNull public static File getFile(@NonNull Context context, @NonNull String fileName) { return new File(context.getFilesDir(), fileName); }
[ "@", "NonNull", "public", "static", "File", "getFile", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "String", "fileName", ")", "{", "return", "new", "File", "(", "context", ".", "getFilesDir", "(", ")", ",", "fileName", ")", ";", "}" ]
Return file from context.getFilesDir()/fileName @param context application context @param fileName path to the file @return instance of the file object.
[ "Return", "file", "from", "context", ".", "getFilesDir", "()", "/", "fileName" ]
train
https://github.com/mapbox/mapbox-events-android/blob/5b5ca7e04cb8fab31a8dc040b6e7521f930a58a4/libcore/src/main/java/com/mapbox/android/core/FileUtils.java#L37-L40
jbundle/webapp
base/src/main/java/org/jbundle/util/webapp/base/HttpServiceTracker.java
HttpServiceTracker.addURLPath
public static String addURLPath(String basePath, String path) { if (basePath == null) basePath = ""; if ((!basePath.endsWith("/")) && (!path.startsWith("/"))) path = "/" + path; if (basePath.length() > 0) path = basePath + path; if (path.length() == 0)...
java
public static String addURLPath(String basePath, String path) { if (basePath == null) basePath = ""; if ((!basePath.endsWith("/")) && (!path.startsWith("/"))) path = "/" + path; if (basePath.length() > 0) path = basePath + path; if (path.length() == 0)...
[ "public", "static", "String", "addURLPath", "(", "String", "basePath", ",", "String", "path", ")", "{", "if", "(", "basePath", "==", "null", ")", "basePath", "=", "\"\"", ";", "if", "(", "(", "!", "basePath", ".", "endsWith", "(", "\"/\"", ")", ")", ...
Add the base path to get an http path (**Move this to Util?**) @param basePath @param path @return
[ "Add", "the", "base", "path", "to", "get", "an", "http", "path", "(", "**", "Move", "this", "to", "Util?", "**", ")" ]
train
https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/base/src/main/java/org/jbundle/util/webapp/base/HttpServiceTracker.java#L207-L219
alkacon/opencms-core
src/org/opencms/staticexport/CmsLinkManager.java
CmsLinkManager.getOnlineLink
public String getOnlineLink(CmsObject cms, String resourceName, boolean forceSecure) { String result = ""; try { CmsProject currentProject = cms.getRequestContext().getCurrentProject(); try { cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ON...
java
public String getOnlineLink(CmsObject cms, String resourceName, boolean forceSecure) { String result = ""; try { CmsProject currentProject = cms.getRequestContext().getCurrentProject(); try { cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ON...
[ "public", "String", "getOnlineLink", "(", "CmsObject", "cms", ",", "String", "resourceName", ",", "boolean", "forceSecure", ")", "{", "String", "result", "=", "\"\"", ";", "try", "{", "CmsProject", "currentProject", "=", "cms", ".", "getRequestContext", "(", "...
Returns the online link for the given resource, with full server prefix.<p> Like <code>http://site.enterprise.com:8080/index.html</code>.<p> In case the resource name is a full root path, the site from the root path will be used. Otherwise the resource is assumed to be in the current site set be the OpenCms user cont...
[ "Returns", "the", "online", "link", "for", "the", "given", "resource", "with", "full", "server", "prefix", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L333-L353
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/util/BitMaskUtil.java
BitMaskUtil.setBit
public static int setBit(int value, int bitNumber, boolean bitValue) { if (bitValue) { return setBitOn(value, bitNumber); } else { return setBitOff(value, bitNumber); } }
java
public static int setBit(int value, int bitNumber, boolean bitValue) { if (bitValue) { return setBitOn(value, bitNumber); } else { return setBitOff(value, bitNumber); } }
[ "public", "static", "int", "setBit", "(", "int", "value", ",", "int", "bitNumber", ",", "boolean", "bitValue", ")", "{", "if", "(", "bitValue", ")", "{", "return", "setBitOn", "(", "value", ",", "bitNumber", ")", ";", "}", "else", "{", "return", "setBi...
Set bit to '0' or '1' in the given int. @param current integer value @param bitNumber number of the bit to set to '0' or '1' (right first bit starting at 1). @param bitValue if true, bit set to '1'. If false, '0'.
[ "Set", "bit", "to", "0", "or", "1", "in", "the", "given", "int", "." ]
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/BitMaskUtil.java#L99-L105
CloudSlang/score
runtime-management/runtime-management-impl/src/main/java/io/cloudslang/runtime/impl/python/PythonExecutor.java
PythonExecutor.exec
public PythonExecutionResult exec(String script, Map<String, Serializable> callArguments) { checkValidInterpreter(); initInterpreter(); prepareInterpreterContext(callArguments); Exception originException = null; for(int i = 0; i < RETRIES_NUMBER_ON_THREADED_ISSUE; i++) { ...
java
public PythonExecutionResult exec(String script, Map<String, Serializable> callArguments) { checkValidInterpreter(); initInterpreter(); prepareInterpreterContext(callArguments); Exception originException = null; for(int i = 0; i < RETRIES_NUMBER_ON_THREADED_ISSUE; i++) { ...
[ "public", "PythonExecutionResult", "exec", "(", "String", "script", ",", "Map", "<", "String", ",", "Serializable", ">", "callArguments", ")", "{", "checkValidInterpreter", "(", ")", ";", "initInterpreter", "(", ")", ";", "prepareInterpreterContext", "(", "callArg...
we need this method to be synchronized so we will not have multiple scripts run in parallel on the same context
[ "we", "need", "this", "method", "to", "be", "synchronized", "so", "we", "will", "not", "have", "multiple", "scripts", "run", "in", "parallel", "on", "the", "same", "context" ]
train
https://github.com/CloudSlang/score/blob/796134e917843f4d95a90f7740d69dc5257a1a0e/runtime-management/runtime-management-impl/src/main/java/io/cloudslang/runtime/impl/python/PythonExecutor.java#L106-L125
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_storage_containerId_cors_POST
public void project_serviceName_storage_containerId_cors_POST(String serviceName, String containerId, String origin) throws IOException { String qPath = "/cloud/project/{serviceName}/storage/{containerId}/cors"; StringBuilder sb = path(qPath, serviceName, containerId); HashMap<String, Object>o = new HashMap<Strin...
java
public void project_serviceName_storage_containerId_cors_POST(String serviceName, String containerId, String origin) throws IOException { String qPath = "/cloud/project/{serviceName}/storage/{containerId}/cors"; StringBuilder sb = path(qPath, serviceName, containerId); HashMap<String, Object>o = new HashMap<Strin...
[ "public", "void", "project_serviceName_storage_containerId_cors_POST", "(", "String", "serviceName", ",", "String", "containerId", ",", "String", "origin", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/storage/{containerId}/cors\"", ...
Add CORS support on your container REST: POST /cloud/project/{serviceName}/storage/{containerId}/cors @param containerId [required] Container id @param origin [required] Allow this origin @param serviceName [required] Service name
[ "Add", "CORS", "support", "on", "your", "container" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L665-L671
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/protocol/CommandArgsAccessor.java
CommandArgsAccessor.getFirstString
@SuppressWarnings("unchecked") public static <K, V> String getFirstString(CommandArgs<K, V> commandArgs) { for (SingularArgument singularArgument : commandArgs.singularArguments) { if (singularArgument instanceof StringArgument) { return ((StringArgument) singularArgument).val;...
java
@SuppressWarnings("unchecked") public static <K, V> String getFirstString(CommandArgs<K, V> commandArgs) { for (SingularArgument singularArgument : commandArgs.singularArguments) { if (singularArgument instanceof StringArgument) { return ((StringArgument) singularArgument).val;...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "String", "getFirstString", "(", "CommandArgs", "<", "K", ",", "V", ">", "commandArgs", ")", "{", "for", "(", "SingularArgument", "singularArgument", ":", "comma...
Get the first {@link String} argument. @param commandArgs must not be null. @return the first {@link String} argument or {@literal null}.
[ "Get", "the", "first", "{", "@link", "String", "}", "argument", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/protocol/CommandArgsAccessor.java#L58-L69
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java
ElementFilter.methodsIn
public static Set<ExecutableElement> methodsIn(Set<? extends Element> elements) { return setFilter(elements, METHOD_KIND, ExecutableElement.class); }
java
public static Set<ExecutableElement> methodsIn(Set<? extends Element> elements) { return setFilter(elements, METHOD_KIND, ExecutableElement.class); }
[ "public", "static", "Set", "<", "ExecutableElement", ">", "methodsIn", "(", "Set", "<", "?", "extends", "Element", ">", "elements", ")", "{", "return", "setFilter", "(", "elements", ",", "METHOD_KIND", ",", "ExecutableElement", ".", "class", ")", ";", "}" ]
Returns a set of methods in {@code elements}. @return a set of methods in {@code elements} @param elements the elements to filter
[ "Returns", "a", "set", "of", "methods", "in", "{" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java#L142-L145
deeplearning4j/deeplearning4j
nd4j/nd4j-parameter-server-parent/nd4j-parameter-server/src/main/java/org/nd4j/parameterserver/ParameterServerListener.java
ParameterServerListener.onNDArrayPartial
@Override public synchronized void onNDArrayPartial(INDArray arr, long idx, int... dimensions) { updater.partialUpdate(arr, updater.ndArrayHolder().get(), idx, dimensions); }
java
@Override public synchronized void onNDArrayPartial(INDArray arr, long idx, int... dimensions) { updater.partialUpdate(arr, updater.ndArrayHolder().get(), idx, dimensions); }
[ "@", "Override", "public", "synchronized", "void", "onNDArrayPartial", "(", "INDArray", "arr", ",", "long", "idx", ",", "int", "...", "dimensions", ")", "{", "updater", ".", "partialUpdate", "(", "arr", ",", "updater", ".", "ndArrayHolder", "(", ")", ".", ...
Used for partial updates using tensor along dimension @param arr the array to count as an update @param idx the index for the tensor along dimension @param dimensions the dimensions to act on for the tensor along dimension
[ "Used", "for", "partial", "updates", "using", "tensor", "along", "dimension" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-parameter-server-parent/nd4j-parameter-server/src/main/java/org/nd4j/parameterserver/ParameterServerListener.java#L92-L95
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.safeLoadStylesheets
public static void safeLoadStylesheets(String[] stylesheets, JavaScriptObject callback) { CmsStylesheetLoader loader = new CmsStylesheetLoader(Arrays.asList(stylesheets), new Runnable() { public native void call(JavaScriptObject jsCallback) /*-{ jsCallback(); }-*/; public ...
java
public static void safeLoadStylesheets(String[] stylesheets, JavaScriptObject callback) { CmsStylesheetLoader loader = new CmsStylesheetLoader(Arrays.asList(stylesheets), new Runnable() { public native void call(JavaScriptObject jsCallback) /*-{ jsCallback(); }-*/; public ...
[ "public", "static", "void", "safeLoadStylesheets", "(", "String", "[", "]", "stylesheets", ",", "JavaScriptObject", "callback", ")", "{", "CmsStylesheetLoader", "loader", "=", "new", "CmsStylesheetLoader", "(", "Arrays", ".", "asList", "(", "stylesheets", ")", ","...
Loads a list of stylesheets and invokes a Javascript callback after everything has been loaded.<p> @param stylesheets the array of stylesheet uris @param callback the callback to call after everything is loaded
[ "Loads", "a", "list", "of", "stylesheets", "and", "invokes", "a", "Javascript", "callback", "after", "everything", "has", "been", "loaded", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L2009-L2026
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
FhirContext.setDefaultTypeForProfile
public void setDefaultTypeForProfile(String theProfile, Class<? extends IBaseResource> theClass) { Validate.notBlank(theProfile, "theProfile must not be null or empty"); if (theClass == null) { myDefaultTypeForProfile.remove(theProfile); } else { myDefaultTypeForProfile.put(theProfile, theClass); } }
java
public void setDefaultTypeForProfile(String theProfile, Class<? extends IBaseResource> theClass) { Validate.notBlank(theProfile, "theProfile must not be null or empty"); if (theClass == null) { myDefaultTypeForProfile.remove(theProfile); } else { myDefaultTypeForProfile.put(theProfile, theClass); } }
[ "public", "void", "setDefaultTypeForProfile", "(", "String", "theProfile", ",", "Class", "<", "?", "extends", "IBaseResource", ">", "theClass", ")", "{", "Validate", ".", "notBlank", "(", "theProfile", ",", "\"theProfile must not be null or empty\"", ")", ";", "if",...
Sets the default type which will be used when parsing a resource that is found to be of the given profile. <p> For example, this method is invoked with the profile string of <code>"http://example.com/some_patient_profile"</code> and the type of <code>MyPatient.class</code>, if the parser is parsing a resource and finds...
[ "Sets", "the", "default", "type", "which", "will", "be", "used", "when", "parsing", "a", "resource", "that", "is", "found", "to", "be", "of", "the", "given", "profile", ".", "<p", ">", "For", "example", "this", "method", "is", "invoked", "with", "the", ...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java#L830-L837
Commonjava/webdav-handler
common/src/main/java/net/sf/webdav/locking/LockedObject.java
LockedObject.checkChildren
private boolean checkChildren(boolean exclusive, int depth) { if (_children == null) { // a file return _owner == null || !(_exclusive || exclusive); } else { // a folder if (_owner == null) { // no owner, checking children ...
java
private boolean checkChildren(boolean exclusive, int depth) { if (_children == null) { // a file return _owner == null || !(_exclusive || exclusive); } else { // a folder if (_owner == null) { // no owner, checking children ...
[ "private", "boolean", "checkChildren", "(", "boolean", "exclusive", ",", "int", "depth", ")", "{", "if", "(", "_children", "==", "null", ")", "{", "// a file", "return", "_owner", "==", "null", "||", "!", "(", "_exclusive", "||", "exclusive", ")", ";", "...
helper of checkLocks(). looks if the children are locked @param exclusive wheather the new lock should be exclusive @return true if no locks at the children paths are forbidding a new lock @param depth depth
[ "helper", "of", "checkLocks", "()", ".", "looks", "if", "the", "children", "are", "locked" ]
train
https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/locking/LockedObject.java#L298-L328
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addCustomFields
private void addCustomFields(MpxjTreeNode parentNode, ProjectFile file) { for (CustomField field : file.getCustomFields()) { final CustomField c = field; MpxjTreeNode childNode = new MpxjTreeNode(field) { @Override public String toString() { ...
java
private void addCustomFields(MpxjTreeNode parentNode, ProjectFile file) { for (CustomField field : file.getCustomFields()) { final CustomField c = field; MpxjTreeNode childNode = new MpxjTreeNode(field) { @Override public String toString() { ...
[ "private", "void", "addCustomFields", "(", "MpxjTreeNode", "parentNode", ",", "ProjectFile", "file", ")", "{", "for", "(", "CustomField", "field", ":", "file", ".", "getCustomFields", "(", ")", ")", "{", "final", "CustomField", "c", "=", "field", ";", "MpxjT...
Add custom fields to the tree. @param parentNode parent tree node @param file custom fields container
[ "Add", "custom", "fields", "to", "the", "tree", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L374-L390
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java
OIDMap.addAttribute
public static void addAttribute(String name, String oid, Class<?> clazz) throws CertificateException { ObjectIdentifier objId; try { objId = new ObjectIdentifier(oid); } catch (IOException ioe) { throw new CertificateException (...
java
public static void addAttribute(String name, String oid, Class<?> clazz) throws CertificateException { ObjectIdentifier objId; try { objId = new ObjectIdentifier(oid); } catch (IOException ioe) { throw new CertificateException (...
[ "public", "static", "void", "addAttribute", "(", "String", "name", ",", "String", "oid", ",", "Class", "<", "?", ">", "clazz", ")", "throws", "CertificateException", "{", "ObjectIdentifier", "objId", ";", "try", "{", "objId", "=", "new", "ObjectIdentifier", ...
Add a name to lookup table. @param name the name of the attr @param oid the string representation of the object identifier for the class. @param clazz the Class object associated with this attribute @exception CertificateException on errors.
[ "Add", "a", "name", "to", "lookup", "table", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L213-L230
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.printFormFields
public void printFormFields(ChainWriter out, int indent) throws IOException { if("true".equals(req.getParameter("search_engine"))) printHiddenField(out, indent, "search_engine", "true"); }
java
public void printFormFields(ChainWriter out, int indent) throws IOException { if("true".equals(req.getParameter("search_engine"))) printHiddenField(out, indent, "search_engine", "true"); }
[ "public", "void", "printFormFields", "(", "ChainWriter", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "if", "(", "\"true\"", ".", "equals", "(", "req", ".", "getParameter", "(", "\"search_engine\"", ")", ")", ")", "printHiddenField", "(", ...
Prints the hidden variables that contain all of the current settings.
[ "Prints", "the", "hidden", "variables", "that", "contain", "all", "of", "the", "current", "settings", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L525-L527
phax/ph-commons
ph-json/src/main/java/com/helger/json/serialize/JsonReader.java
JsonReader.readFromPath
@Nullable public static IJson readFromPath (@Nonnull final Path aPath, @Nonnull final Charset aFallbackCharset) { return readFromPath (aPath, aFallbackCharset, null); }
java
@Nullable public static IJson readFromPath (@Nonnull final Path aPath, @Nonnull final Charset aFallbackCharset) { return readFromPath (aPath, aFallbackCharset, null); }
[ "@", "Nullable", "public", "static", "IJson", "readFromPath", "(", "@", "Nonnull", "final", "Path", "aPath", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ")", "{", "return", "readFromPath", "(", "aPath", ",", "aFallbackCharset", ",", "null", ")...
Read the Json from the passed Path. @param aPath The file containing the Json to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used in case no is BOM is present. May not be <code>null</code>. @return <code>null</code> if reading failed, the Json declarations otherwise.
[ "Read", "the", "Json", "from", "the", "passed", "Path", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-json/src/main/java/com/helger/json/serialize/JsonReader.java#L543-L547
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.beginCreateOrUpdateAsync
public Observable<IotHubDescriptionInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).map(new Func1<ServiceResponse<IotHubDescriptionInne...
java
public Observable<IotHubDescriptionInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).map(new Func1<ServiceResponse<IotHubDescriptionInne...
[ "public", "Observable", "<", "IotHubDescriptionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "IotHubDescriptionInner", "iotHubDescription", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(",...
Create or update the metadata of an IoT hub. Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. @param resourceGroupName The name of the resour...
[ "Create", "or", "update", "the", "metadata", "of", "an", "IoT", "hub", ".", "Create", "or", "update", "the", "metadata", "of", "an", "Iot", "hub", ".", "The", "usual", "pattern", "to", "modify", "a", "property", "is", "to", "retrieve", "the", "IoT", "h...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L513-L520
structr/structr
structr-ui/src/main/java/org/structr/web/resource/RegistrationResource.java
RegistrationResource.createUser
public Principal createUser(final SecurityContext securityContext, final PropertyKey credentialKey, final String credentialValue, final Map<String, Object> propertySet, final String confKey) { return createUser(securityContext, credentialKey, credentialValue, propertySet, false, confKey); }
java
public Principal createUser(final SecurityContext securityContext, final PropertyKey credentialKey, final String credentialValue, final Map<String, Object> propertySet, final String confKey) { return createUser(securityContext, credentialKey, credentialValue, propertySet, false, confKey); }
[ "public", "Principal", "createUser", "(", "final", "SecurityContext", "securityContext", ",", "final", "PropertyKey", "credentialKey", ",", "final", "String", "credentialValue", ",", "final", "Map", "<", "String", ",", "Object", ">", "propertySet", ",", "final", "...
Create a new user. If a {@link Person} is found, convert that object to a {@link User} object. Do not auto-create a new user. @param securityContext @param credentialKey @param credentialValue @param propertySet @param confKey @return user
[ "Create", "a", "new", "user", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/resource/RegistrationResource.java#L324-L328
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java
lbgroup_binding.get
public static lbgroup_binding get(nitro_service service, String name) throws Exception{ lbgroup_binding obj = new lbgroup_binding(); obj.set_name(name); lbgroup_binding response = (lbgroup_binding) obj.get_resource(service); return response; }
java
public static lbgroup_binding get(nitro_service service, String name) throws Exception{ lbgroup_binding obj = new lbgroup_binding(); obj.set_name(name); lbgroup_binding response = (lbgroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "lbgroup_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "lbgroup_binding", "obj", "=", "new", "lbgroup_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "lbg...
Use this API to fetch lbgroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbgroup_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java#L103-L108
gosu-lang/gosu-lang
gosu-lab/src/main/java/editor/SmartFixManager.java
SmartFixManager.getDistanceFromPosition
private double getDistanceFromPosition( IParseIssue pi, int line, int col ) { if( pi.getSource() != null && pi.getSource().getLocation() != null ) { int squaredDist = ((pi.getSource().getLocation().getLineNum() - line) * (pi.getSource().getLocation().getLineNum() - line)) + ((pi....
java
private double getDistanceFromPosition( IParseIssue pi, int line, int col ) { if( pi.getSource() != null && pi.getSource().getLocation() != null ) { int squaredDist = ((pi.getSource().getLocation().getLineNum() - line) * (pi.getSource().getLocation().getLineNum() - line)) + ((pi....
[ "private", "double", "getDistanceFromPosition", "(", "IParseIssue", "pi", ",", "int", "line", ",", "int", "col", ")", "{", "if", "(", "pi", ".", "getSource", "(", ")", "!=", "null", "&&", "pi", ".", "getSource", "(", ")", ".", "getLocation", "(", ")", ...
Returns the cartesian distance of this parse issue from the given column/line in column/line units
[ "Returns", "the", "cartesian", "distance", "of", "this", "parse", "issue", "from", "the", "given", "column", "/", "line", "in", "column", "/", "line", "units" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-lab/src/main/java/editor/SmartFixManager.java#L1263-L1275
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/guid/Guid.java
Guid.append
public Guid append(Guid... guids) throws IOException { if (guids == null || guids.length == 0) { return this; } return combine(ArrayUtils.add(guids, this)); }
java
public Guid append(Guid... guids) throws IOException { if (guids == null || guids.length == 0) { return this; } return combine(ArrayUtils.add(guids, this)); }
[ "public", "Guid", "append", "(", "Guid", "...", "guids", ")", "throws", "IOException", "{", "if", "(", "guids", "==", "null", "||", "guids", ".", "length", "==", "0", ")", "{", "return", "this", ";", "}", "return", "combine", "(", "ArrayUtils", ".", ...
Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to combine(this, guid1, guid2, ...) @param guids an array of {@link Guid}. @return a new {@link Guid}. @throws IOException
[ "Creates", "a", "new", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/guid/Guid.java#L162-L167
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java
HttpUtils.executeGet
public static HttpResponse executeGet(final String url, final Map<String, Object> parameters) { try { return executeGet(url, null, null, parameters); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return ...
java
public static HttpResponse executeGet(final String url, final Map<String, Object> parameters) { try { return executeGet(url, null, null, parameters); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return ...
[ "public", "static", "HttpResponse", "executeGet", "(", "final", "String", "url", ",", "final", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "{", "try", "{", "return", "executeGet", "(", "url", ",", "null", ",", "null", ",", "parameters", ...
Execute get http response. @param url the url @param parameters the parameters @return the http response
[ "Execute", "get", "http", "response", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L256-L264
jeluard/semantic-versioning
api/src/main/java/org/osjava/jardiff/DOMDiffHandler.java
DOMDiffHandler.methodChanged
public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "methodchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_...
java
public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "methodchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_...
[ "public", "void", "methodChanged", "(", "MethodInfo", "oldInfo", ",", "MethodInfo", "newInfo", ")", "throws", "DiffException", "{", "Node", "currentNode", "=", "this", ".", "currentNode", ";", "Element", "tmp", "=", "doc", ".", "createElementNS", "(", "XML_URI",...
Write out info aboout a changed method. This writes out a &lt;methodchange&gt; node, followed by a &lt;from&gt; node, with the old information about the method followed by a &lt;to&gt; node with the new information about the method. @param oldInfo Info about the old method. @param newInfo Info about the new method. @t...
[ "Write", "out", "info", "aboout", "a", "changed", "method", ".", "This", "writes", "out", "a", "&lt", ";", "methodchange&gt", ";", "node", "followed", "by", "a", "&lt", ";", "from&gt", ";", "node", "with", "the", "old", "information", "about", "the", "me...
train
https://github.com/jeluard/semantic-versioning/blob/d0bfbeddca8ac4202f5225810227c72a708360a9/api/src/main/java/org/osjava/jardiff/DOMDiffHandler.java#L433-L448
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.paymentMean_paypal_id_PUT
public void paymentMean_paypal_id_PUT(Long id, OvhPaypal body) throws IOException { String qPath = "/me/paymentMean/paypal/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
java
public void paymentMean_paypal_id_PUT(Long id, OvhPaypal body) throws IOException { String qPath = "/me/paymentMean/paypal/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "paymentMean_paypal_id_PUT", "(", "Long", "id", ",", "OvhPaypal", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/paymentMean/paypal/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "id", ")", ";", ...
Alter this object properties REST: PUT /me/paymentMean/paypal/{id} @param body [required] New object properties @param id [required] Id of the object
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L643-L647
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.canLockBecauseOfInactivity
public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) { return !user.isManaged() && !user.isWebuser() && !OpenCms.getDefaultUsers().isDefaultUser(user.getName()) && !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN); }
java
public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) { return !user.isManaged() && !user.isWebuser() && !OpenCms.getDefaultUsers().isDefaultUser(user.getName()) && !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN); }
[ "public", "boolean", "canLockBecauseOfInactivity", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "return", "!", "user", ".", "isManaged", "(", ")", "&&", "!", "user", ".", "isWebuser", "(", ")", "&&", "!", "OpenCms", ".", "getDefaultUsers", "(...
Checks whether a user account can be locked because of inactivity. @param cms the CMS context @param user the user to check @return true if the user may be locked after being inactive for too long
[ "Checks", "whether", "a", "user", "account", "can", "be", "locked", "because", "of", "inactivity", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L265-L271
tvesalainen/util
util/src/main/java/org/vesalainen/util/CollectionHelp.java
CollectionHelp.print
public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array) { try { StringBuilder out = new StringBuilder(); print(out, start, delim, quotStart, quotEnd, end, array); return out.toString(); ...
java
public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array) { try { StringBuilder out = new StringBuilder(); print(out, start, delim, quotStart, quotEnd, end, array); return out.toString(); ...
[ "public", "static", "final", "String", "print", "(", "String", "start", ",", "String", "delim", ",", "String", "quotStart", ",", "String", "quotEnd", ",", "String", "end", ",", "Object", "...", "array", ")", "{", "try", "{", "StringBuilder", "out", "=", ...
Returns array items delimited with given strings. If any of delimiters is null, it is ignored. @param start @param delim @param quotStart @param quotEnd @param end @param array @return
[ "Returns", "array", "items", "delimited", "with", "given", "strings", ".", "If", "any", "of", "delimiters", "is", "null", "it", "is", "ignored", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L252-L264
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.groupsMembersBatchUpdate
public static BaseResult groupsMembersBatchUpdate(String access_token,List<String> openid_list,String to_groupid){ String openidListStr = JsonUtil.toJSONString(openid_list); String groupJson = "{\"openid_list\":"+openidListStr+",\"to_groupid\":"+to_groupid+"}"; HttpUriRequest httpUriRequest = RequestBuilder.post(...
java
public static BaseResult groupsMembersBatchUpdate(String access_token,List<String> openid_list,String to_groupid){ String openidListStr = JsonUtil.toJSONString(openid_list); String groupJson = "{\"openid_list\":"+openidListStr+",\"to_groupid\":"+to_groupid+"}"; HttpUriRequest httpUriRequest = RequestBuilder.post(...
[ "public", "static", "BaseResult", "groupsMembersBatchUpdate", "(", "String", "access_token", ",", "List", "<", "String", ">", "openid_list", ",", "String", "to_groupid", ")", "{", "String", "openidListStr", "=", "JsonUtil", ".", "toJSONString", "(", "openid_list", ...
批量移动用户分组 @param access_token access_token @param openid_list openid_list @param to_groupid to_groupid @return BaseResult
[ "批量移动用户分组" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L246-L256
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/PeerGroup.java
PeerGroup.broadcastTransaction
@Override public TransactionBroadcast broadcastTransaction(final Transaction tx) { return broadcastTransaction(tx, Math.max(1, getMinBroadcastConnections())); }
java
@Override public TransactionBroadcast broadcastTransaction(final Transaction tx) { return broadcastTransaction(tx, Math.max(1, getMinBroadcastConnections())); }
[ "@", "Override", "public", "TransactionBroadcast", "broadcastTransaction", "(", "final", "Transaction", "tx", ")", "{", "return", "broadcastTransaction", "(", "tx", ",", "Math", ".", "max", "(", "1", ",", "getMinBroadcastConnections", "(", ")", ")", ")", ";", ...
Calls {@link PeerGroup#broadcastTransaction(Transaction,int)} with getMinBroadcastConnections() as the number of connections to wait for before commencing broadcast.
[ "Calls", "{" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L2019-L2022
lucee/Lucee
core/src/main/java/lucee/commons/date/DateTimeUtil.java
DateTimeUtil.toHTTPTimeString
public static String toHTTPTimeString(Date date, boolean oldFormat) { if (oldFormat) { synchronized (HTTP_TIME_STRING_FORMAT_OLD) { return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true); } } synchronized (HTTP_TIME_STRING_FORMAT) { return StringUtil.replace(HTTP_TIM...
java
public static String toHTTPTimeString(Date date, boolean oldFormat) { if (oldFormat) { synchronized (HTTP_TIME_STRING_FORMAT_OLD) { return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true); } } synchronized (HTTP_TIME_STRING_FORMAT) { return StringUtil.replace(HTTP_TIM...
[ "public", "static", "String", "toHTTPTimeString", "(", "Date", "date", ",", "boolean", "oldFormat", ")", "{", "if", "(", "oldFormat", ")", "{", "synchronized", "(", "HTTP_TIME_STRING_FORMAT_OLD", ")", "{", "return", "StringUtil", ".", "replace", "(", "HTTP_TIME_...
converts a date to a http time String @param date date to convert @param oldFormat "old" in that context means the format support the existing functionality in CFML like the function getHTTPTimeString, in that format the date parts are separated by a space (like "EE, dd MMM yyyy HH:mm:ss zz"), in the "new" format, the...
[ "converts", "a", "date", "to", "a", "http", "time", "String" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/DateTimeUtil.java#L279-L288
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java
CodepointHelper.verify
public static void verify (@Nullable final char [] aArray, @Nonnull final ECodepointProfile eProfile) { if (aArray != null) verify (new CodepointIteratorCharArray (aArray), eProfile); }
java
public static void verify (@Nullable final char [] aArray, @Nonnull final ECodepointProfile eProfile) { if (aArray != null) verify (new CodepointIteratorCharArray (aArray), eProfile); }
[ "public", "static", "void", "verify", "(", "@", "Nullable", "final", "char", "[", "]", "aArray", ",", "@", "Nonnull", "final", "ECodepointProfile", "eProfile", ")", "{", "if", "(", "aArray", "!=", "null", ")", "verify", "(", "new", "CodepointIteratorCharArra...
Verifies a sequence of codepoints using the specified profile @param aArray char array @param eProfile profile to use
[ "Verifies", "a", "sequence", "of", "codepoints", "using", "the", "specified", "profile" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java#L775-L779
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenCoord.java
MavenCoord.fromGAVPC
public static MavenCoord fromGAVPC(String coordGavpc) { Matcher mat = REGEX_GAVCP.matcher(coordGavpc); if (!mat.matches()) throw new IllegalArgumentException("Wrong Maven coordinates format, must be G:A:V[:P[:C]] . " + coordGavpc); return new MavenCoord() .setGroupId(mat...
java
public static MavenCoord fromGAVPC(String coordGavpc) { Matcher mat = REGEX_GAVCP.matcher(coordGavpc); if (!mat.matches()) throw new IllegalArgumentException("Wrong Maven coordinates format, must be G:A:V[:P[:C]] . " + coordGavpc); return new MavenCoord() .setGroupId(mat...
[ "public", "static", "MavenCoord", "fromGAVPC", "(", "String", "coordGavpc", ")", "{", "Matcher", "mat", "=", "REGEX_GAVCP", ".", "matcher", "(", "coordGavpc", ")", ";", "if", "(", "!", "mat", ".", "matches", "(", ")", ")", "throw", "new", "IllegalArgumentE...
Creates a {@link MavenCoord} from the given coordinate String.
[ "Creates", "a", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenCoord.java#L55-L67
jayantk/jklol
src/com/jayantkrish/jklol/lisp/Environment.java
Environment.unbindName
public Object unbindName(String name, IndexedList<String> symbolTable) { if (!symbolTable.contains(name)) { return null; } int index = symbolTable.getIndex(name); return bindings.remove(index); }
java
public Object unbindName(String name, IndexedList<String> symbolTable) { if (!symbolTable.contains(name)) { return null; } int index = symbolTable.getIndex(name); return bindings.remove(index); }
[ "public", "Object", "unbindName", "(", "String", "name", ",", "IndexedList", "<", "String", ">", "symbolTable", ")", "{", "if", "(", "!", "symbolTable", ".", "contains", "(", "name", ")", ")", "{", "return", "null", ";", "}", "int", "index", "=", "symb...
Removes a binding from this environment. Returns the value bound to that name if the name was bound, otherwise returns {@code null}. @param name @param symbolTable @return
[ "Removes", "a", "binding", "from", "this", "environment", ".", "Returns", "the", "value", "bound", "to", "that", "name", "if", "the", "name", "was", "bound", "otherwise", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/lisp/Environment.java#L80-L86
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java
OntologyBuilderImpl.createObjectPropertyAssertion
public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { if (ope.isTop()) return null; if (ope.isBottom()) throw new InconsistentOntologyException(); if ...
java
public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { if (ope.isTop()) return null; if (ope.isBottom()) throw new InconsistentOntologyException(); if ...
[ "public", "static", "ObjectPropertyAssertion", "createObjectPropertyAssertion", "(", "ObjectPropertyExpression", "ope", ",", "ObjectConstant", "o1", ",", "ObjectConstant", "o2", ")", "throws", "InconsistentOntologyException", "{", "if", "(", "ope", ".", "isTop", "(", ")...
Creates an object property assertion <p> ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')' <p> Implements rule [O4]: - ignore (return null) if the property is top - inconsistency if the property is bot - swap the arguments to elimina...
[ "Creates", "an", "object", "property", "assertion", "<p", ">", "ObjectPropertyAssertion", ":", "=", "ObjectPropertyAssertion", "(", "axiomAnnotations", "ObjectPropertyExpression", "sourceIndividual", "targetIndividual", ")", "<p", ">", "Implements", "rule", "[", "O4", "...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java#L457-L467
molgenis/molgenis
molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/LabelGenerator.java
LabelGenerator.generateUniqueLabel
static String generateUniqueLabel(String label, Set<String> existingLabels) { StringBuilder newLabel = new StringBuilder(label); while (existingLabels.contains(newLabel.toString())) { newLabel.append(POSTFIX); } return newLabel.toString(); }
java
static String generateUniqueLabel(String label, Set<String> existingLabels) { StringBuilder newLabel = new StringBuilder(label); while (existingLabels.contains(newLabel.toString())) { newLabel.append(POSTFIX); } return newLabel.toString(); }
[ "static", "String", "generateUniqueLabel", "(", "String", "label", ",", "Set", "<", "String", ">", "existingLabels", ")", "{", "StringBuilder", "newLabel", "=", "new", "StringBuilder", "(", "label", ")", ";", "while", "(", "existingLabels", ".", "contains", "(...
Makes sure that a given label will be unique amongst a set of other labels.
[ "Makes", "sure", "that", "a", "given", "label", "will", "be", "unique", "amongst", "a", "set", "of", "other", "labels", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/LabelGenerator.java#L11-L17
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibExternalUri.java
ClientlibExternalUri.accept
@Override public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent) { visitor.visit(this, ClientlibVisitor.VisitorMode.DEPENDS, parent); }
java
@Override public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent) { visitor.visit(this, ClientlibVisitor.VisitorMode.DEPENDS, parent); }
[ "@", "Override", "public", "void", "accept", "(", "ClientlibVisitor", "visitor", ",", "ClientlibVisitor", ".", "VisitorMode", "mode", ",", "ClientlibResourceFolder", "parent", ")", "{", "visitor", ".", "visit", "(", "this", ",", "ClientlibVisitor", ".", "VisitorMo...
Calls the visitor with mode {@link com.composum.sling.clientlibs.handle.ClientlibVisitor.VisitorMode#DEPENDS}, since external references are never embedded.
[ "Calls", "the", "visitor", "with", "mode", "{" ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibExternalUri.java#L29-L32
fuzzylite/jfuzzylite
jfuzzylite/src/main/java/com/fuzzylite/term/Function.java
Function.evaluate
public double evaluate(Map<String, Double> localVariables) { if (this.root == null) { throw new RuntimeException("[function error] evaluation failed " + "because function is not loaded"); } return this.root.evaluate(localVariables); }
java
public double evaluate(Map<String, Double> localVariables) { if (this.root == null) { throw new RuntimeException("[function error] evaluation failed " + "because function is not loaded"); } return this.root.evaluate(localVariables); }
[ "public", "double", "evaluate", "(", "Map", "<", "String", ",", "Double", ">", "localVariables", ")", "{", "if", "(", "this", ".", "root", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"[function error] evaluation failed \"", "+", "\"becau...
Computes the function value of this term using the given map of variable substitutions. @param localVariables is a map of substitution variables @return the function value of this term using the given map of variable substitutions.
[ "Computes", "the", "function", "value", "of", "this", "term", "using", "the", "given", "map", "of", "variable", "substitutions", "." ]
train
https://github.com/fuzzylite/jfuzzylite/blob/583ac1928f39512af75de80d560e67448039595a/jfuzzylite/src/main/java/com/fuzzylite/term/Function.java#L592-L598
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java
ContentKeyPoliciesInner.listAsync
public Observable<Page<ContentKeyPolicyInner>> listAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final String orderby) { return listWithServiceResponseAsync(resourceGroupName, accountName, filter, top, orderby) .map(new Func1<ServiceResponse<...
java
public Observable<Page<ContentKeyPolicyInner>> listAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final String orderby) { return listWithServiceResponseAsync(resourceGroupName, accountName, filter, top, orderby) .map(new Func1<ServiceResponse<...
[ "public", "Observable", "<", "Page", "<", "ContentKeyPolicyInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ",", "final", "String", "filter", ",", "final", "Integer", "top", ",", "final", "String"...
List Content Key Policies. Lists the Content Key Policies in the account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param filter Restricts the set of items returned. @param top Specifies a non-negative integer n that limi...
[ "List", "Content", "Key", "Policies", ".", "Lists", "the", "Content", "Key", "Policies", "in", "the", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java#L281-L289
PuyallupFoursquare/ccb-api-client-java
src/main/java/com/p4square/ccbapi/CCBAPIClient.java
CCBAPIClient.makeURI
private URI makeURI(final String service, final Map<String, String> parameters) { try { StringBuilder queryStringBuilder = new StringBuilder(); if (apiBaseUri.getQuery() != null) { queryStringBuilder.append(apiBaseUri.getQuery()).append("&"); } que...
java
private URI makeURI(final String service, final Map<String, String> parameters) { try { StringBuilder queryStringBuilder = new StringBuilder(); if (apiBaseUri.getQuery() != null) { queryStringBuilder.append(apiBaseUri.getQuery()).append("&"); } que...
[ "private", "URI", "makeURI", "(", "final", "String", "service", ",", "final", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "try", "{", "StringBuilder", "queryStringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "apiBa...
Build the URI for a particular service call. @param service The CCB API service to call (i.e. the srv query parameter). @param parameters A map of query parameters to include on the URI. @return The apiBaseUri with the additional query parameters appended.
[ "Build", "the", "URI", "for", "a", "particular", "service", "call", "." ]
train
https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/CCBAPIClient.java#L217-L233
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.putConst
@Override public void putConst(String name, Scriptable start, Object value) { if (putConstImpl(name, 0, start, value, READONLY)) return; if (start == this) throw Kit.codeBug(); if (start instanceof ConstProperties) ((ConstProperties)start).putConst(name, start, v...
java
@Override public void putConst(String name, Scriptable start, Object value) { if (putConstImpl(name, 0, start, value, READONLY)) return; if (start == this) throw Kit.codeBug(); if (start instanceof ConstProperties) ((ConstProperties)start).putConst(name, start, v...
[ "@", "Override", "public", "void", "putConst", "(", "String", "name", ",", "Scriptable", "start", ",", "Object", "value", ")", "{", "if", "(", "putConstImpl", "(", "name", ",", "0", ",", "start", ",", "value", ",", "READONLY", ")", ")", "return", ";", ...
Sets the value of the named const property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object. @param name the name of...
[ "Sets", "the", "value", "of", "the", "named", "const", "property", "creating", "it", "if", "need", "be", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L626-L637
jparsec/jparsec
jparsec/src/main/java/org/jparsec/OperatorTable.java
OperatorTable.infixl
public OperatorTable<T> infixl( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { ops.add(new Operator(parser, precedence, Associativity.LASSOC)); return this; }
java
public OperatorTable<T> infixl( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { ops.add(new Operator(parser, precedence, Associativity.LASSOC)); return this; }
[ "public", "OperatorTable", "<", "T", ">", "infixl", "(", "Parser", "<", "?", "extends", "BiFunction", "<", "?", "super", "T", ",", "?", "super", "T", ",", "?", "extends", "T", ">", ">", "parser", ",", "int", "precedence", ")", "{", "ops", ".", "add...
Adds an infix left-associative binary operator. @param parser the parser for the operator. @param precedence the precedence number. @return this.
[ "Adds", "an", "infix", "left", "-", "associative", "binary", "operator", "." ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/OperatorTable.java#L115-L119
weld/core
impl/src/main/java/org/jboss/weld/util/BeanMethods.java
BeanMethods.getMethods
private static <T, R> R getMethods(EnhancedAnnotatedType<T> type, MethodListBuilder<T, R> builder) { Collection<EnhancedAnnotatedMethod<?, ? super T>> methods = filterMethods(builder.getAllMethods(type)); for (Class<? super T> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = ...
java
private static <T, R> R getMethods(EnhancedAnnotatedType<T> type, MethodListBuilder<T, R> builder) { Collection<EnhancedAnnotatedMethod<?, ? super T>> methods = filterMethods(builder.getAllMethods(type)); for (Class<? super T> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = ...
[ "private", "static", "<", "T", ",", "R", ">", "R", "getMethods", "(", "EnhancedAnnotatedType", "<", "T", ">", "type", ",", "MethodListBuilder", "<", "T", ",", "R", ">", "builder", ")", "{", "Collection", "<", "EnhancedAnnotatedMethod", "<", "?", ",", "?"...
Get all methods of a given kind using a given {@link MethodListBuilder}.
[ "Get", "all", "methods", "of", "a", "given", "kind", "using", "a", "given", "{" ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/BeanMethods.java#L115-L127
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.revokeResourcePermission
public Map<String, Map<String, List<String>>> revokeResourcePermission(String subjectid, String resourcePath) { if (StringUtils.isBlank(subjectid) || StringUtils.isBlank(resourcePath)) { return Collections.emptyMap(); } resourcePath = Utils.urlEncode(resourcePath); return getEntity(invokeDelete(Utils.formatM...
java
public Map<String, Map<String, List<String>>> revokeResourcePermission(String subjectid, String resourcePath) { if (StringUtils.isBlank(subjectid) || StringUtils.isBlank(resourcePath)) { return Collections.emptyMap(); } resourcePath = Utils.urlEncode(resourcePath); return getEntity(invokeDelete(Utils.formatM...
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "revokeResourcePermission", "(", "String", "subjectid", ",", "String", "resourcePath", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "subjectid...
Revokes a permission for a subject, meaning they no longer will be able to access the given resource. @param subjectid subject id (user id) @param resourcePath resource path or object type @return a map of the permissions for this subject id
[ "Revokes", "a", "permission", "for", "a", "subject", "meaning", "they", "no", "longer", "will", "be", "able", "to", "access", "the", "given", "resource", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1463-L1470
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java
UploadService.setUploadStatusDelegate
protected static void setUploadStatusDelegate(String uploadId, UploadStatusDelegate delegate) { if (delegate == null) return; uploadDelegates.put(uploadId, new WeakReference<>(delegate)); }
java
protected static void setUploadStatusDelegate(String uploadId, UploadStatusDelegate delegate) { if (delegate == null) return; uploadDelegates.put(uploadId, new WeakReference<>(delegate)); }
[ "protected", "static", "void", "setUploadStatusDelegate", "(", "String", "uploadId", ",", "UploadStatusDelegate", "delegate", ")", "{", "if", "(", "delegate", "==", "null", ")", "return", ";", "uploadDelegates", ".", "put", "(", "uploadId", ",", "new", "WeakRefe...
Sets the delegate which will receive the events for the given upload request. Those events will not be sent in broadcast, but only to the delegate. @param uploadId uploadID of the upload request @param delegate the delegate instance
[ "Sets", "the", "delegate", "which", "will", "receive", "the", "events", "for", "the", "given", "upload", "request", ".", "Those", "events", "will", "not", "be", "sent", "in", "broadcast", "but", "only", "to", "the", "delegate", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java#L423-L428