repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java
ManagedBackupShortTermRetentionPoliciesInner.beginUpdate
public ManagedBackupShortTermRetentionPolicyInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { """ Updates a managed database's short term retention policy. @param resourceGroupName The name of the resource group that contains the resource. You ...
java
public ManagedBackupShortTermRetentionPolicyInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, retentionDays).toBlocking().single().body(); }
[ "public", "ManagedBackupShortTermRetentionPolicyInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "Integer", "retentionDays", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "re...
Updates a managed database's short term retention policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param databaseName The name of the dat...
[ "Updates", "a", "managed", "database", "s", "short", "term", "retention", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java#L804-L806
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/util/Geometry.java
Geometry.getClockwiseAngleBetweenThreePoints
public static double getClockwiseAngleBetweenThreePoints(final Point2D p0, final Point2D c, final Point2D p1) { """ Returns the clockwise angle between three points. It starts at p0, that goes clock-wise around c until it reaches p1 @param p0 @param c @param p1 @return """ final Point2D a = c.s...
java
public static double getClockwiseAngleBetweenThreePoints(final Point2D p0, final Point2D c, final Point2D p1) { final Point2D a = c.sub(p1); final Point2D b = c.sub(p0); return Math.atan2(a.getY(), a.getX()) - Math.atan2(b.getY(), b.getX()); }
[ "public", "static", "double", "getClockwiseAngleBetweenThreePoints", "(", "final", "Point2D", "p0", ",", "final", "Point2D", "c", ",", "final", "Point2D", "p1", ")", "{", "final", "Point2D", "a", "=", "c", ".", "sub", "(", "p1", ")", ";", "final", "Point2D...
Returns the clockwise angle between three points. It starts at p0, that goes clock-wise around c until it reaches p1 @param p0 @param c @param p1 @return
[ "Returns", "the", "clockwise", "angle", "between", "three", "points", ".", "It", "starts", "at", "p0", "that", "goes", "clock", "-", "wise", "around", "c", "until", "it", "reaches", "p1" ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/util/Geometry.java#L627-L634
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicatedCloud_serviceName_ip_duration_GET
public OvhOrder dedicatedCloud_serviceName_ip_duration_GET(String serviceName, String duration, OvhIpCountriesEnum country, String description, Long estimatedClientsNumber, String networkName, OvhOrderableIpBlockRangeEnum size, String usage) throws IOException { """ Get prices and contracts information REST: GE...
java
public OvhOrder dedicatedCloud_serviceName_ip_duration_GET(String serviceName, String duration, OvhIpCountriesEnum country, String description, Long estimatedClientsNumber, String networkName, OvhOrderableIpBlockRangeEnum size, String usage) throws IOException { String qPath = "/order/dedicatedCloud/{serviceName}/ip/...
[ "public", "OvhOrder", "dedicatedCloud_serviceName_ip_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhIpCountriesEnum", "country", ",", "String", "description", ",", "Long", "estimatedClientsNumber", ",", "String", "networkName", ",", "OvhO...
Get prices and contracts information REST: GET /order/dedicatedCloud/{serviceName}/ip/{duration} @param size [required] The network ranges orderable @param usage [required] Basic information of how will this bloc be used (as "web","ssl","cloud" or other things) @param description [required] Information visible on whoi...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5824-L5835
google/closure-compiler
src/com/google/javascript/jscomp/AbstractPeepholeOptimization.java
AbstractPeepholeOptimization.areNodesEqualForInlining
protected boolean areNodesEqualForInlining(Node n1, Node n2) { """ Are the nodes equal for the purpose of inlining? If type aware optimizations are on, type equality is checked. """ /* Our implementation delegates to the compiler. We provide this * method because we don't want to expose Compiler to P...
java
protected boolean areNodesEqualForInlining(Node n1, Node n2) { /* Our implementation delegates to the compiler. We provide this * method because we don't want to expose Compiler to PeepholeOptimizations. */ checkNotNull(compiler); return compiler.areNodesEqualForInlining(n1, n2); }
[ "protected", "boolean", "areNodesEqualForInlining", "(", "Node", "n1", ",", "Node", "n2", ")", "{", "/* Our implementation delegates to the compiler. We provide this\n * method because we don't want to expose Compiler to PeepholeOptimizations.\n */", "checkNotNull", "(", "compile...
Are the nodes equal for the purpose of inlining? If type aware optimizations are on, type equality is checked.
[ "Are", "the", "nodes", "equal", "for", "the", "purpose", "of", "inlining?", "If", "type", "aware", "optimizations", "are", "on", "type", "equality", "is", "checked", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AbstractPeepholeOptimization.java#L62-L68
wisdom-framework/wisdom
extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java
RamlCompilerMojo.getRamlOutputFile
private File getRamlOutputFile(File input) { """ Create the .raml file from the java source file. @param input The java source file. @return The File where the raml spec, for the given input, will be written. """ String ramlFileName = input.getName().substring(0, input.getName().length() - 4) + "ra...
java
private File getRamlOutputFile(File input) { String ramlFileName = input.getName().substring(0, input.getName().length() - 4) + "raml"; File outDir; if (outputDirectory == null) { outDir = new File(WatcherUtils.getExternalAssetsDestination(basedir), "raml"); } else { ...
[ "private", "File", "getRamlOutputFile", "(", "File", "input", ")", "{", "String", "ramlFileName", "=", "input", ".", "getName", "(", ")", ".", "substring", "(", "0", ",", "input", ".", "getName", "(", ")", ".", "length", "(", ")", "-", "4", ")", "+",...
Create the .raml file from the java source file. @param input The java source file. @return The File where the raml spec, for the given input, will be written.
[ "Create", "the", ".", "raml", "file", "from", "the", "java", "source", "file", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java#L124-L135
apache/fluo
modules/core/src/main/java/org/apache/fluo/core/impl/TxInfo.java
TxInfo.getTransactionInfo
public static TxInfo getTransactionInfo(Environment env, Bytes prow, Column pcol, long startTs) { """ determine the what state a transaction is in by inspecting the primary column """ // TODO ensure primary is visible IteratorSetting is = new IteratorSetting(10, RollbackCheckIterator.class); Rollb...
java
public static TxInfo getTransactionInfo(Environment env, Bytes prow, Column pcol, long startTs) { // TODO ensure primary is visible IteratorSetting is = new IteratorSetting(10, RollbackCheckIterator.class); RollbackCheckIterator.setLocktime(is, startTs); Entry<Key, Value> entry = ColumnUtil.checkColum...
[ "public", "static", "TxInfo", "getTransactionInfo", "(", "Environment", "env", ",", "Bytes", "prow", ",", "Column", "pcol", ",", "long", "startTs", ")", "{", "// TODO ensure primary is visible", "IteratorSetting", "is", "=", "new", "IteratorSetting", "(", "10", ",...
determine the what state a transaction is in by inspecting the primary column
[ "determine", "the", "what", "state", "a", "transaction", "is", "in", "by", "inspecting", "the", "primary", "column" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/core/src/main/java/org/apache/fluo/core/impl/TxInfo.java#L40-L102
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java
CommonExpectations.ltpaCookieExists
public static Expectations ltpaCookieExists(String testAction, WebClient webClient) { """ Sets expectations that will check: <ol> <li>The provided WebClient contains an LTPA cookie with a non-empty value </ol> """ Expectations expectations = new Expectations(); expectations.addExpectation(ne...
java
public static Expectations ltpaCookieExists(String testAction, WebClient webClient) { Expectations expectations = new Expectations(); expectations.addExpectation(new CookieExpectation(testAction, webClient, JwtFatConstants.LTPA_COOKIE_NAME, ".+")); return expectations; }
[ "public", "static", "Expectations", "ltpaCookieExists", "(", "String", "testAction", ",", "WebClient", "webClient", ")", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ".", "addExpectation", "(", "new", "CookieExpecta...
Sets expectations that will check: <ol> <li>The provided WebClient contains an LTPA cookie with a non-empty value </ol>
[ "Sets", "expectations", "that", "will", "check", ":", "<ol", ">", "<li", ">", "The", "provided", "WebClient", "contains", "an", "LTPA", "cookie", "with", "a", "non", "-", "empty", "value", "<", "/", "ol", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java#L94-L98
rvs-fluid-it/mvn-fluid-cd
mvn-ext-freeze/src/main/java/be/fluid_it/mvn/cd/x/freeze/replace/FreezeHandler.java
FreezeHandler.ignorableWhitespace
public void ignorableWhitespace(char buf[], int offset, int len) throws SAXException { """ Overrides <code>ignorableWhitespace(char[] <i>ch</i>, int <i>start</i>, int <i>length</i>)</code> in <code>org.xml.sax.helpers.DefaultHandler</code>, which in turn implements <code>org.xml.sax.ContentHandler<...
java
public void ignorableWhitespace(char buf[], int offset, int len) throws SAXException { String s = new String(buf, offset, len); write(nl + "ignorableW..." + indent(0)); }
[ "public", "void", "ignorableWhitespace", "(", "char", "buf", "[", "]", ",", "int", "offset", ",", "int", "len", ")", "throws", "SAXException", "{", "String", "s", "=", "new", "String", "(", "buf", ",", "offset", ",", "len", ")", ";", "write", "(", "n...
Overrides <code>ignorableWhitespace(char[] <i>ch</i>, int <i>start</i>, int <i>length</i>)</code> in <code>org.xml.sax.helpers.DefaultHandler</code>, which in turn implements <code>org.xml.sax.ContentHandler</code>. Can only be called when validation is being performed. The particular characters may be accessed with <c...
[ "Overrides", "<code", ">", "ignorableWhitespace", "(", "char", "[]", "<i", ">", "ch<", "/", "i", ">", "int", "<i", ">", "start<", "/", "i", ">", "int", "<i", ">", "length<", "/", "i", ">", ")", "<", "/", "code", ">", "in", "<code", ">", "org", ...
train
https://github.com/rvs-fluid-it/mvn-fluid-cd/blob/2aad8ed1cb40f94bd24bad7e6a127956cc277077/mvn-ext-freeze/src/main/java/be/fluid_it/mvn/cd/x/freeze/replace/FreezeHandler.java#L222-L226
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/ServletTreeRenderSupport.java
ServletTreeRenderSupport.registerTagError
protected void registerTagError(String message, Throwable e) throws JspException { """ Errors during rendering will call through this method. During the XmlHttpRequest, these will just be logged and we will go on. @param message @param e @throws JspException """ System.err.println("Err...
java
protected void registerTagError(String message, Throwable e) throws JspException { System.err.println("Error in rendering tree:" + message); logger.error(message, e); }
[ "protected", "void", "registerTagError", "(", "String", "message", ",", "Throwable", "e", ")", "throws", "JspException", "{", "System", ".", "err", ".", "println", "(", "\"Error in rendering tree:\"", "+", "message", ")", ";", "logger", ".", "error", "(", "mes...
Errors during rendering will call through this method. During the XmlHttpRequest, these will just be logged and we will go on. @param message @param e @throws JspException
[ "Errors", "during", "rendering", "will", "call", "through", "this", "method", ".", "During", "the", "XmlHttpRequest", "these", "will", "just", "be", "logged", "and", "we", "will", "go", "on", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/ServletTreeRenderSupport.java#L65-L70
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
DeferredAttr.attribSpeculative
JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) { """ Routine that performs speculative type-checking; the input AST node is cloned (to avoid side-effects cause by Attr) and compiler state is restored after type-checking. All diagnostics (but critical ones) are disabled during...
java
JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) { final JCTree newTree = new TreeCopier<Object>(make).copy(tree); Env<AttrContext> speculativeEnv = env.dup(newTree, env.info.dup(env.info.scope.dupUnshared())); speculativeEnv.info.scope.owner = env.info.scope.ow...
[ "JCTree", "attribSpeculative", "(", "JCTree", "tree", ",", "Env", "<", "AttrContext", ">", "env", ",", "ResultInfo", "resultInfo", ")", "{", "final", "JCTree", "newTree", "=", "new", "TreeCopier", "<", "Object", ">", "(", "make", ")", ".", "copy", "(", "...
Routine that performs speculative type-checking; the input AST node is cloned (to avoid side-effects cause by Attr) and compiler state is restored after type-checking. All diagnostics (but critical ones) are disabled during speculative type-checking.
[ "Routine", "that", "performs", "speculative", "type", "-", "checking", ";", "the", "input", "AST", "node", "is", "cloned", "(", "to", "avoid", "side", "-", "effects", "cause", "by", "Attr", ")", "and", "compiler", "state", "is", "restored", "after", "type"...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java#L362-L394
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Range.java
Range.intersectionWith
public Range<T> intersectionWith(Range<T> other) { """ Calculate the intersection of {@code this} and an overlapping Range. """ if (!this.isOverlappedBy(other)) { throw new IllegalArgumentException(String.format( "Cannot calculate intersection with non-overlapping range %s", other)); } if (this...
java
public Range<T> intersectionWith(Range<T> other) { if (!this.isOverlappedBy(other)) { throw new IllegalArgumentException(String.format( "Cannot calculate intersection with non-overlapping range %s", other)); } if (this.equals(other)) { return this; } T min = this.comparator.compare(this.min, other.m...
[ "public", "Range", "<", "T", ">", "intersectionWith", "(", "Range", "<", "T", ">", "other", ")", "{", "if", "(", "!", "this", ".", "isOverlappedBy", "(", "other", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", ...
Calculate the intersection of {@code this} and an overlapping Range.
[ "Calculate", "the", "intersection", "of", "{" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Range.java#L265-L272
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateEmpty
public static <T> T validateEmpty(T value, String errorMsg) throws ValidateException { """ 验证是否为空,非空时抛出异常<br> 对于String类型判定是否为empty(null 或 "")<br> @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值,验证通过返回此值,空值 @throws ValidateException 验证异常 """ if (isNotEmpty(value)) { throw new ValidateExceptio...
java
public static <T> T validateEmpty(T value, String errorMsg) throws ValidateException { if (isNotEmpty(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "<", "T", ">", "T", "validateEmpty", "(", "T", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "isNotEmpty", "(", "value", ")", ")", "{", "throw", "new", "ValidateException", "(", "errorMsg", ")",...
验证是否为空,非空时抛出异常<br> 对于String类型判定是否为empty(null 或 "")<br> @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值,验证通过返回此值,空值 @throws ValidateException 验证异常
[ "验证是否为空,非空时抛出异常<br", ">", "对于String类型判定是否为empty", "(", "null", "或", ")", "<br", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L204-L209
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/onesample/WilcoxonOneSample.java
WilcoxonOneSample.scoreToPvalue
private static double scoreToPvalue(double score, int n) { """ Returns the Pvalue for a particular score @param score @param n @return """ /* if(n<=20) { //calculate it from binomial distribution } */ double mean=n*(n+1.0)/4.0; double va...
java
private static double scoreToPvalue(double score, int n) { /* if(n<=20) { //calculate it from binomial distribution } */ double mean=n*(n+1.0)/4.0; double variable=n*(n+1.0)*(2.0*n+1.0)/24.0; double z=(score-mean)/Math.sqrt(variable); ...
[ "private", "static", "double", "scoreToPvalue", "(", "double", "score", ",", "int", "n", ")", "{", "/*\n if(n<=20) {\n //calculate it from binomial distribution\n }\n */", "double", "mean", "=", "n", "*", "(", "n", "+", "1.0", ")", "/", ...
Returns the Pvalue for a particular score @param score @param n @return
[ "Returns", "the", "Pvalue", "for", "a", "particular", "score" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/onesample/WilcoxonOneSample.java#L112-L125
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.createGraph
public static boolean createGraph(Connection connection, String inputTable, String spatialFieldName, double tolerance, boolean orientBySlope) throws SQLException { ...
java
public static boolean createGraph(Connection connection, String inputTable, String spatialFieldName, double tolerance, boolean orientBySlope) throws SQLException { ...
[ "public", "static", "boolean", "createGraph", "(", "Connection", "connection", ",", "String", "inputTable", ",", "String", "spatialFieldName", ",", "double", "tolerance", ",", "boolean", "orientBySlope", ")", "throws", "SQLException", "{", "return", "createGraph", "...
Create the nodes and edges tables from the input table containing LINESTRINGs in the given column and using the given tolerance, and potentially orienting edges by slope. <p/> The tolerance value is used specify the side length of a square Envelope around each node used to snap together other nodes within the same Enve...
[ "Create", "the", "nodes", "and", "edges", "tables", "from", "the", "input", "table", "containing", "LINESTRINGs", "in", "the", "given", "column", "and", "using", "the", "given", "tolerance", "and", "potentially", "orienting", "edges", "by", "slope", ".", "<p",...
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L191-L197
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java
EsMarshalling.unmarshallApiSummary
public static ApiSummaryBean unmarshallApiSummary(Map<String, Object> source) { """ Unmarshals the given map source into a bean. @param source the source @return the API summary """ if (source == null) { return null; } ApiSummaryBean bean = new ApiSummaryBean(); be...
java
public static ApiSummaryBean unmarshallApiSummary(Map<String, Object> source) { if (source == null) { return null; } ApiSummaryBean bean = new ApiSummaryBean(); bean.setOrganizationId(asString(source.get("organizationId"))); bean.setOrganizationName(asString(source.ge...
[ "public", "static", "ApiSummaryBean", "unmarshallApiSummary", "(", "Map", "<", "String", ",", "Object", ">", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "ApiSummaryBean", "bean", "=", "new", "ApiSummaryBean", ...
Unmarshals the given map source into a bean. @param source the source @return the API summary
[ "Unmarshals", "the", "given", "map", "source", "into", "a", "bean", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java#L926-L939
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaGraphicsMapResources
public static int cudaGraphicsMapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream) { """ Map graphics resources for access by CUDA. <pre> cudaError_t cudaGraphicsMapResources ( int count, cudaGraphicsResource_t* resources, cudaStream_t stream = 0 ) </pre> <div> <p>Map graphics ...
java
public static int cudaGraphicsMapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream) { return checkResult(cudaGraphicsMapResourcesNative(count, resources, stream)); }
[ "public", "static", "int", "cudaGraphicsMapResources", "(", "int", "count", ",", "cudaGraphicsResource", "resources", "[", "]", ",", "cudaStream_t", "stream", ")", "{", "return", "checkResult", "(", "cudaGraphicsMapResourcesNative", "(", "count", ",", "resources", "...
Map graphics resources for access by CUDA. <pre> cudaError_t cudaGraphicsMapResources ( int count, cudaGraphicsResource_t* resources, cudaStream_t stream = 0 ) </pre> <div> <p>Map graphics resources for access by CUDA. Maps the <tt>count</tt> graphics resources in <tt>resources</tt> for access by CUDA. </p> <p>The r...
[ "Map", "graphics", "resources", "for", "access", "by", "CUDA", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L11507-L11510
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/RequiredRule.java
RequiredRule.apply
@Override public JDocCommentable apply(String nodeName, JsonNode node, JsonNode parent, JDocCommentable generatableType, Schema schema) { """ Applies this schema rule to take the required code generation steps. <p> The required rule simply adds a note to the JavaDoc comment to mark a property as required. ...
java
@Override public JDocCommentable apply(String nodeName, JsonNode node, JsonNode parent, JDocCommentable generatableType, Schema schema) { if (node.asBoolean()) { generatableType.javadoc().append("\n(Required)"); if (ruleFactory.getGenerationConfig().isIncludeJsr303Annotations() ...
[ "@", "Override", "public", "JDocCommentable", "apply", "(", "String", "nodeName", ",", "JsonNode", "node", ",", "JsonNode", "parent", ",", "JDocCommentable", "generatableType", ",", "Schema", "schema", ")", "{", "if", "(", "node", ".", "asBoolean", "(", ")", ...
Applies this schema rule to take the required code generation steps. <p> The required rule simply adds a note to the JavaDoc comment to mark a property as required. @param nodeName the name of the schema node for which this "required" rule has been added @param node the "required" node, having a value <code>true</code...
[ "Applies", "this", "schema", "rule", "to", "take", "the", "required", "code", "generation", "steps", ".", "<p", ">", "The", "required", "rule", "simply", "adds", "a", "note", "to", "the", "JavaDoc", "comment", "to", "mark", "a", "property", "as", "required...
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/RequiredRule.java#L63-L86
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/NarUtil.java
NarUtil.getHeaderName
public static String getHeaderName(final String basename, final String filename) { """ Returns the header file name (javah) corresponding to the given class file name @param filename the absolute file name of the class @return the header file name. """ final String base = basename.replaceAll("\\\\", ...
java
public static String getHeaderName(final String basename, final String filename) { final String base = basename.replaceAll("\\\\", "/"); final String file = filename.replaceAll("\\\\", "/"); if (!file.startsWith(base)) { throw new IllegalArgumentException("Error " + file + " does not start with " + ba...
[ "public", "static", "String", "getHeaderName", "(", "final", "String", "basename", ",", "final", "String", "filename", ")", "{", "final", "String", "base", "=", "basename", ".", "replaceAll", "(", "\"\\\\\\\\\"", ",", "\"/\"", ")", ";", "final", "String", "f...
Returns the header file name (javah) corresponding to the given class file name @param filename the absolute file name of the class @return the header file name.
[ "Returns", "the", "header", "file", "name", "(", "javah", ")", "corresponding", "to", "the", "given", "class", "file", "name" ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/NarUtil.java#L326-L336
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/RepositoryApi.java
RepositoryApi.getRawBlobContent
public InputStream getRawBlobContent(Object projectIdOrPath, String sha) throws GitLabApiException { """ Get the raw file contents for a blob by blob SHA. <pre><code>GitLab Endpoint: GET /projects/:id/repository/raw_blobs/:sha</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), Str...
java
public InputStream getRawBlobContent(Object projectIdOrPath, String sha) throws GitLabApiException { Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "blobs", sha, "raw"); return (re...
[ "public", "InputStream", "getRawBlobContent", "(", "Object", "projectIdOrPath", ",", "String", "sha", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "getWithAccepts", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "MediaType",...
Get the raw file contents for a blob by blob SHA. <pre><code>GitLab Endpoint: GET /projects/:id/repository/raw_blobs/:sha</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha the SHA of the file to get the contents for @return the raw file content...
[ "Get", "the", "raw", "file", "contents", "for", "a", "blob", "by", "blob", "SHA", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L502-L506
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java
JAXBMarshallerHelper.setSunCanonicalization
public static void setSunCanonicalization (@Nonnull final Marshaller aMarshaller, final boolean bCanonicalize) { """ Set the Sun specific canonicalization property. @param aMarshaller The marshaller to set the property. May not be <code>null</code>. @param bCanonicalize the value to be set """ final ...
java
public static void setSunCanonicalization (@Nonnull final Marshaller aMarshaller, final boolean bCanonicalize) { final String sPropertyName = SUN_C14N; _setProperty (aMarshaller, sPropertyName, Boolean.valueOf (bCanonicalize)); }
[ "public", "static", "void", "setSunCanonicalization", "(", "@", "Nonnull", "final", "Marshaller", "aMarshaller", ",", "final", "boolean", "bCanonicalize", ")", "{", "final", "String", "sPropertyName", "=", "SUN_C14N", ";", "_setProperty", "(", "aMarshaller", ",", ...
Set the Sun specific canonicalization property. @param aMarshaller The marshaller to set the property. May not be <code>null</code>. @param bCanonicalize the value to be set
[ "Set", "the", "Sun", "specific", "canonicalization", "property", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java#L314-L318
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
ISPNCacheWorkspaceStorageCache.updateInBuffer
protected Set<String> updateInBuffer(final NodeData node, final QPath prevPath, Set<String> idsToSkip) { """ Update Node hierarchy in case of same-name siblings reorder. Assumes the new (updated) nodes already put in the cache. Previous name of updated nodes will be calculated and that node will be deleted (if h...
java
protected Set<String> updateInBuffer(final NodeData node, final QPath prevPath, Set<String> idsToSkip) { // I expect that NullNodeData will never update existing NodeData. CacheQPath prevKey = new CacheQPath(getOwnerId(), node.getParentIdentifier(), prevPath, ItemType.NODE); if (node.getIdentif...
[ "protected", "Set", "<", "String", ">", "updateInBuffer", "(", "final", "NodeData", "node", ",", "final", "QPath", "prevPath", ",", "Set", "<", "String", ">", "idsToSkip", ")", "{", "// I expect that NullNodeData will never update existing NodeData.\r", "CacheQPath", ...
Update Node hierarchy in case of same-name siblings reorder. Assumes the new (updated) nodes already put in the cache. Previous name of updated nodes will be calculated and that node will be deleted (if has same id as the new node). Children paths will be updated to a new node path. @param node new node data @param pr...
[ "Update", "Node", "hierarchy", "in", "case", "of", "same", "-", "name", "siblings", "reorder", ".", "Assumes", "the", "new", "(", "updated", ")", "nodes", "already", "put", "in", "the", "cache", ".", "Previous", "name", "of", "updated", "nodes", "will", ...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1565-L1583
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/network/BranchRemoteInterface.java
BranchRemoteInterface.make_restful_get
public final ServerResponse make_restful_get(String url, JSONObject params, String tag, String branchKey) { """ Method for handling the RESTful POST operations to Branch Servers. Internally calls abstract method {@link #doRestfulGet(String)} @param url The url end point @param params {@link JSONObject...
java
public final ServerResponse make_restful_get(String url, JSONObject params, String tag, String branchKey) { String modifiedUrl = url; params = params != null ? params : new JSONObject(); if (addCommonParams(params, branchKey)) { modifiedUrl += this.convertJSONtoString(params); ...
[ "public", "final", "ServerResponse", "make_restful_get", "(", "String", "url", ",", "JSONObject", "params", ",", "String", "tag", ",", "String", "branchKey", ")", "{", "String", "modifiedUrl", "=", "url", ";", "params", "=", "params", "!=", "null", "?", "par...
Method for handling the RESTful POST operations to Branch Servers. Internally calls abstract method {@link #doRestfulGet(String)} @param url The url end point @param params {@link JSONObject with parameters to the GET call} @param tag {@link String} Tag for identifying the request for analytical or debu...
[ "Method", "for", "handling", "the", "RESTful", "POST", "operations", "to", "Branch", "Servers", ".", "Internally", "calls", "abstract", "method", "{", "@link", "#doRestfulGet", "(", "String", ")", "}" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/network/BranchRemoteInterface.java#L86-L114
geomajas/geomajas-project-client-gwt2
plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/TileBasedLayerClient.java
TileBasedLayerClient.createOsmLayer
public OsmLayer createOsmLayer(String id, int nrOfLevels, String url) { """ Create a new OSM layer with an URL to an OSM tile service. <p/> The URL should have placeholders for the x- and y-coordinate and tile level in the form of {x}, {y}, {z}. The file extension of the tiles should be part of the URL. @par...
java
public OsmLayer createOsmLayer(String id, int nrOfLevels, String url) { OsmLayer layer = new OsmLayer(id, createOsmTileConfiguration(nrOfLevels)); layer.addUrl(url); return layer; }
[ "public", "OsmLayer", "createOsmLayer", "(", "String", "id", ",", "int", "nrOfLevels", ",", "String", "url", ")", "{", "OsmLayer", "layer", "=", "new", "OsmLayer", "(", "id", ",", "createOsmTileConfiguration", "(", "nrOfLevels", ")", ")", ";", "layer", ".", ...
Create a new OSM layer with an URL to an OSM tile service. <p/> The URL should have placeholders for the x- and y-coordinate and tile level in the form of {x}, {y}, {z}. The file extension of the tiles should be part of the URL. @param id The unique ID of the layer. @param conf The tile configuration. @param url Th...
[ "Create", "a", "new", "OSM", "layer", "with", "an", "URL", "to", "an", "OSM", "tile", "service", ".", "<p", "/", ">", "The", "URL", "should", "have", "placeholders", "for", "the", "x", "-", "and", "y", "-", "coordinate", "and", "tile", "level", "in",...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/TileBasedLayerClient.java#L151-L155
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/CreateIdentityPoolResult.java
CreateIdentityPoolResult.withIdentityPoolTags
public CreateIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { """ <p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other c...
java
public CreateIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { setIdentityPoolTags(identityPoolTags); return this; }
[ "public", "CreateIdentityPoolResult", "withIdentityPoolTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "identityPoolTags", ")", "{", "setIdentityPoolTags", "(", "identityPoolTags", ")", ";", "return", "this", ";", "}" ]
<p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria. </p> @param identityPoolTags The tags that are assigned to the identity pool. A tag is a label that you ...
[ "<p", ">", "The", "tags", "that", "are", "assigned", "to", "the", "identity", "pool", ".", "A", "tag", "is", "a", "label", "that", "you", "can", "apply", "to", "identity", "pools", "to", "categorize", "and", "manage", "them", "in", "different", "ways", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/CreateIdentityPoolResult.java#L569-L572
kiswanij/jk-util
src/main/java/com/jk/util/JKStringUtil.java
JKStringUtil.setParameters
public static String setParameters(String value, final Object[] params) { """ replace params in string with the using index , for example "Hello {1} {2}" with Jalal , Kiswani as aparamters will generate Hello Jalal Kiswani . @param value the value @param params the params @return the string """ if (p...
java
public static String setParameters(String value, final Object[] params) { if (params != null) { for (int i = 0; i < params.length; i++) { value = value.replaceAll("\\{" + i + "\\}", params[i].toString()); } } return value; }
[ "public", "static", "String", "setParameters", "(", "String", "value", ",", "final", "Object", "[", "]", "params", ")", "{", "if", "(", "params", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "params", ".", "length", ";",...
replace params in string with the using index , for example "Hello {1} {2}" with Jalal , Kiswani as aparamters will generate Hello Jalal Kiswani . @param value the value @param params the params @return the string
[ "replace", "params", "in", "string", "with", "the", "using", "index", "for", "example", "Hello", "{", "1", "}", "{", "2", "}", "with", "Jalal", "Kiswani", "as", "aparamters", "will", "generate", "Hello", "Jalal", "Kiswani", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKStringUtil.java#L81-L88
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.translateException
@SuppressWarnings("ThrowableInstanceNeverThrown") public static IOException translateException(String operation, String path, AmazonClientException exception) { """ Translate an exception raised in an operation into an IOException. The specific type of IOException depends on the class of {@link AmazonCli...
java
@SuppressWarnings("ThrowableInstanceNeverThrown") public static IOException translateException(String operation, String path, AmazonClientException exception) { String message = String.format("%s%s: %s", operation, path != null ? (" on " + path) : "", exception); if (!(exception instanceof Amazo...
[ "@", "SuppressWarnings", "(", "\"ThrowableInstanceNeverThrown\"", ")", "public", "static", "IOException", "translateException", "(", "String", "operation", ",", "String", "path", ",", "AmazonClientException", "exception", ")", "{", "String", "message", "=", "String", ...
Translate an exception raised in an operation into an IOException. The specific type of IOException depends on the class of {@link AmazonClientException} passed in, and any status codes included in the operation. That is: HTTP error codes are examined and can be used to build a more specific response. @param operation...
[ "Translate", "an", "exception", "raised", "in", "an", "operation", "into", "an", "IOException", ".", "The", "specific", "type", "of", "IOException", "depends", "on", "the", "class", "of", "{", "@link", "AmazonClientException", "}", "passed", "in", "and", "any"...
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L89-L154
signalapp/curve25519-java
common/src/main/java/org/whispersystems/curve25519/java/fe_mul121666.java
fe_mul121666.fe_mul121666
public static void fe_mul121666(int[] h,int[] f) { """ /* h = f * 121666 Can overlap h with f. Preconditions: |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. Postconditions: |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. """ int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3...
java
public static void fe_mul121666(int[] h,int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; long h0 = f0 * (long) 121666; long h1 = f1 * (long) 121666; long h2 = f2 * (long) 121666; l...
[ "public", "static", "void", "fe_mul121666", "(", "int", "[", "]", "h", ",", "int", "[", "]", "f", ")", "{", "int", "f0", "=", "f", "[", "0", "]", ";", "int", "f1", "=", "f", "[", "1", "]", ";", "int", "f2", "=", "f", "[", "2", "]", ";", ...
/* h = f * 121666 Can overlap h with f. Preconditions: |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. Postconditions: |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
[ "/", "*", "h", "=", "f", "*", "121666", "Can", "overlap", "h", "with", "f", "." ]
train
https://github.com/signalapp/curve25519-java/blob/70fae57d6dccff7e78a46203c534314b07dfdd98/common/src/main/java/org/whispersystems/curve25519/java/fe_mul121666.java#L19-L74
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.fatalv
public void fatalv(String format, Object... params) { """ Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param params the parameters """ doLog(Level.FATAL, FQCN, format, params, null); }
java
public void fatalv(String format, Object... params) { doLog(Level.FATAL, FQCN, format, params, null); }
[ "public", "void", "fatalv", "(", "String", "format", ",", "Object", "...", "params", ")", "{", "doLog", "(", "Level", ".", "FATAL", ",", "FQCN", ",", "format", ",", "params", ",", "null", ")", ";", "}" ]
Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param params the parameters
[ "Issue", "a", "log", "message", "with", "a", "level", "of", "FATAL", "using", "{", "@link", "java", ".", "text", ".", "MessageFormat", "}", "-", "style", "formatting", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L1835-L1837
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.printHtmlMenuStart
public void printHtmlMenuStart(PrintWriter out, ResourceBundle reg) throws DBException { """ Print the top nav menu. @param out The html out stream. @param reg The resources object. @exception DBException File exception. """ this.printHtmlBanner(out, reg); this.printHtmlLogo(out, reg...
java
public void printHtmlMenuStart(PrintWriter out, ResourceBundle reg) throws DBException { this.printHtmlBanner(out, reg); this.printHtmlLogo(out, reg); this.printHtmlMenubar(out, reg); String strHTML = reg.getString("htmlTableStart"); strHTML = Utility.replaceResource...
[ "public", "void", "printHtmlMenuStart", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "this", ".", "printHtmlBanner", "(", "out", ",", "reg", ")", ";", "this", ".", "printHtmlLogo", "(", "out", ",", "reg", ")", ...
Print the top nav menu. @param out The html out stream. @param reg The resources object. @exception DBException File exception.
[ "Print", "the", "top", "nav", "menu", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L346-L365
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <T1, T2, T3, T4, T5, T6, R> Func6<T1, T2, T3, T4, T5, T6, Observable<R>> toAsync(Func6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> func) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" ...
java
public static <T1, T2, T3, T4, T5, T6, R> Func6<T1, T2, T3, T4, T5, T6, Observable<R>> toAsync(Func6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "R", ">", "Func6", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "Observable", "<", "R", ">", ">", "toAsync", "(", "Func6", ...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type @...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L482-L484
alkacon/opencms-core
src/org/opencms/cache/CmsVfsDiskCache.java
CmsVfsDiskCache.saveCacheFile
public void saveCacheFile(String rfsName, byte[] content, long dateLastModified) throws IOException { """ Saves the given file content in the disk cache.<p> @param rfsName the RFS name of the file to save the content in @param content the content of the file to save @param dateLastModified the date of last mo...
java
public void saveCacheFile(String rfsName, byte[] content, long dateLastModified) throws IOException { dateLastModified = simplifyDateLastModified(dateLastModified); File f = saveFile(rfsName, content); // set last modification date f.setLastModified(dateLastModified); }
[ "public", "void", "saveCacheFile", "(", "String", "rfsName", ",", "byte", "[", "]", "content", ",", "long", "dateLastModified", ")", "throws", "IOException", "{", "dateLastModified", "=", "simplifyDateLastModified", "(", "dateLastModified", ")", ";", "File", "f", ...
Saves the given file content in the disk cache.<p> @param rfsName the RFS name of the file to save the content in @param content the content of the file to save @param dateLastModified the date of last modification to set for the save file @throws IOException in case of disk access errors
[ "Saves", "the", "given", "file", "content", "in", "the", "disk", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cache/CmsVfsDiskCache.java#L155-L161
cojen/Cojen
src/main/java/org/cojen/classfile/ClassFile.java
ClassFile.addConstructor
public MethodInfo addConstructor(Modifiers modifiers, TypeDesc[] params) { """ Add a constructor to this class. @param params May be null if constructor accepts no parameters. """ MethodDesc md = MethodDesc.forArguments(null, params); MethodInfo mi = new ...
java
public MethodInfo addConstructor(Modifiers modifiers, TypeDesc[] params) { MethodDesc md = MethodDesc.forArguments(null, params); MethodInfo mi = new MethodInfo(this, modifiers, "<init>", md); mMethods.add(mi); return mi; }
[ "public", "MethodInfo", "addConstructor", "(", "Modifiers", "modifiers", ",", "TypeDesc", "[", "]", "params", ")", "{", "MethodDesc", "md", "=", "MethodDesc", ".", "forArguments", "(", "null", ",", "params", ")", ";", "MethodInfo", "mi", "=", "new", "MethodI...
Add a constructor to this class. @param params May be null if constructor accepts no parameters.
[ "Add", "a", "constructor", "to", "this", "class", "." ]
train
https://github.com/cojen/Cojen/blob/ddee9a0fde83870b97e0ed04c58270aa665f3a62/src/main/java/org/cojen/classfile/ClassFile.java#L799-L805
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupUI.java
CmsSetupUI.getSetupPage
public static Resource getSetupPage(I_SetupUiContext context, String name) { """ Gets external resource for an HTML page in the setup-resources folder. @param context the context @param name the file name @return the resource for the HTML page """ String path = CmsStringUtil.joinPaths(context.g...
java
public static Resource getSetupPage(I_SetupUiContext context, String name) { String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name); Resource resource = new ExternalResource(path); return resource; }
[ "public", "static", "Resource", "getSetupPage", "(", "I_SetupUiContext", "context", ",", "String", "name", ")", "{", "String", "path", "=", "CmsStringUtil", ".", "joinPaths", "(", "context", ".", "getSetupBean", "(", ")", ".", "getContextPath", "(", ")", ",", ...
Gets external resource for an HTML page in the setup-resources folder. @param context the context @param name the file name @return the resource for the HTML page
[ "Gets", "external", "resource", "for", "an", "HTML", "page", "in", "the", "setup", "-", "resources", "folder", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupUI.java#L84-L89
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java
CORBA_Utils.getRequiredOutputStreamType
static Type getRequiredOutputStreamType(Class<?> clazz, int rmicCompatible) // PM46698 { """ Returns the ASM Type object for the OutputStream required to write an instance of the specified class. <p> Many parameter and return value types may be serialized using the ...
java
static Type getRequiredOutputStreamType(Class<?> clazz, int rmicCompatible) // PM46698 { // NOTE: This logic must be kept in sync with write_value if (clazz == Void.TYPE || // nothing to write clazz == Object.class || // writeAny c...
[ "static", "Type", "getRequiredOutputStreamType", "(", "Class", "<", "?", ">", "clazz", ",", "int", "rmicCompatible", ")", "// PM46698", "{", "// NOTE: This logic must be kept in sync with write_value", "if", "(", "clazz", "==", "Void", ".", "TYPE", "||", "// nothing t...
Returns the ASM Type object for the OutputStream required to write an instance of the specified class. <p> Many parameter and return value types may be serialized using the original org.omg.CORBA.portable.OutputStream implementation, however, some require the new CORBA_2_3 subclass. This method consolidates the logic ...
[ "Returns", "the", "ASM", "Type", "object", "for", "the", "OutputStream", "required", "to", "write", "an", "instance", "of", "the", "specified", "class", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java#L128-L155
aws/aws-sdk-java
aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/model/SetCognitoEventsRequest.java
SetCognitoEventsRequest.withEvents
public SetCognitoEventsRequest withEvents(java.util.Map<String, String> events) { """ <p> The events to configure </p> @param events The events to configure @return Returns a reference to this object so that method calls can be chained together. """ setEvents(events); return this; }
java
public SetCognitoEventsRequest withEvents(java.util.Map<String, String> events) { setEvents(events); return this; }
[ "public", "SetCognitoEventsRequest", "withEvents", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "events", ")", "{", "setEvents", "(", "events", ")", ";", "return", "this", ";", "}" ]
<p> The events to configure </p> @param events The events to configure @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "events", "to", "configure", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/model/SetCognitoEventsRequest.java#L123-L126
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java
ServicesInner.checkStatusAsync
public Observable<DataMigrationServiceStatusResponseInner> checkStatusAsync(String groupName, String serviceName) { """ Check service health status. The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service...
java
public Observable<DataMigrationServiceStatusResponseInner> checkStatusAsync(String groupName, String serviceName) { return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1<ServiceResponse<DataMigrationServiceStatusResponseInner>, DataMigrationServiceStatusResponseInner>() { ...
[ "public", "Observable", "<", "DataMigrationServiceStatusResponseInner", ">", "checkStatusAsync", "(", "String", "groupName", ",", "String", "serviceName", ")", "{", "return", "checkStatusWithServiceResponseAsync", "(", "groupName", ",", "serviceName", ")", ".", "map", "...
Check service health status. The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. @param groupName Name of the resource group @param serviceName Name of the service @throws Illegal...
[ "Check", "service", "health", "status", ".", "The", "services", "resource", "is", "the", "top", "-", "level", "resource", "that", "represents", "the", "Data", "Migration", "Service", ".", "This", "action", "performs", "a", "health", "check", "and", "returns", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L967-L974
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java
GenericUrl.addQueryParams
static void addQueryParams(Set<Entry<String, Object>> entrySet, StringBuilder buf) { """ Adds query parameters from the provided entrySet into the buffer. """ // (similar to UrlEncodedContent) boolean first = true; for (Map.Entry<String, Object> nameValueEntry : entrySet) { Object value = nam...
java
static void addQueryParams(Set<Entry<String, Object>> entrySet, StringBuilder buf) { // (similar to UrlEncodedContent) boolean first = true; for (Map.Entry<String, Object> nameValueEntry : entrySet) { Object value = nameValueEntry.getValue(); if (value != null) { String name = CharEscape...
[ "static", "void", "addQueryParams", "(", "Set", "<", "Entry", "<", "String", ",", "Object", ">", ">", "entrySet", ",", "StringBuilder", "buf", ")", "{", "// (similar to UrlEncodedContent)", "boolean", "first", "=", "true", ";", "for", "(", "Map", ".", "Entry...
Adds query parameters from the provided entrySet into the buffer.
[ "Adds", "query", "parameters", "from", "the", "provided", "entrySet", "into", "the", "buffer", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java#L541-L558
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerBuilder.java
LayerBuilder.processReader
protected void processReader(IModule module, ModuleBuildReader reader) throws IOException { """ Adds the content from {@code reader}, together with any transport contributions, to the response aggregation. @param module The module id @param reader The module build reader @throws IOException """ // Add...
java
protected void processReader(IModule module, ModuleBuildReader reader) throws IOException { // Add the cache key generator list to the result list List<ICacheKeyGenerator> keyGenList = reader.getCacheKeyGenerators(); if (keyGenList != null) { keyGens.addAll(keyGenList); } if (smGen != null) { // ...
[ "protected", "void", "processReader", "(", "IModule", "module", ",", "ModuleBuildReader", "reader", ")", "throws", "IOException", "{", "// Add the cache key generator list to the result list\r", "List", "<", "ICacheKeyGenerator", ">", "keyGenList", "=", "reader", ".", "ge...
Adds the content from {@code reader}, together with any transport contributions, to the response aggregation. @param module The module id @param reader The module build reader @throws IOException
[ "Adds", "the", "content", "from", "{" ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerBuilder.java#L334-L369
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/copier/ValueFactory.java
ValueFactory.createValueList
static Object createValueList(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue) { """ 处理的数据是集合类型 <p>Function: createValueList</p> <p>Description: </p> @author acexy@thankjava.com @date 2015-1-27 下午4:59:12 @version 1.0 @param targetFieldType @param targetObject @param origin...
java
static Object createValueList(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue) { if(originValue == null){ return null; } List<?> originList = (List<?>)originValue; if(originList.size() == 0){ return null; } Class<?> proxyType = originList.get(0).getClass(); // ...
[ "static", "Object", "createValueList", "(", "Field", "targetField", ",", "Class", "<", "?", ">", "targetFieldType", ",", "Object", "targetObject", ",", "Object", "originValue", ")", "{", "if", "(", "originValue", "==", "null", ")", "{", "return", "null", ";"...
处理的数据是集合类型 <p>Function: createValueList</p> <p>Description: </p> @author acexy@thankjava.com @date 2015-1-27 下午4:59:12 @version 1.0 @param targetFieldType @param targetObject @param originValue @return @throws ClassNotFoundException
[ "处理的数据是集合类型", "<p", ">", "Function", ":", "createValueList<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/copier/ValueFactory.java#L83-L115
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationBuilder.java
CollationBuilder.countTailoredNodes
private static int countTailoredNodes(long[] nodesArray, int i, int strength) { """ Counts the tailored nodes of the given strength up to the next node which is either stronger or has an explicit weight of this strength. """ int count = 0; for(;;) { if(i == 0) { break; } ...
java
private static int countTailoredNodes(long[] nodesArray, int i, int strength) { int count = 0; for(;;) { if(i == 0) { break; } long node = nodesArray[i]; if(strengthFromNode(node) < strength) { break; } if(strengthFromNode(node) == strength) { ...
[ "private", "static", "int", "countTailoredNodes", "(", "long", "[", "]", "nodesArray", ",", "int", "i", ",", "int", "strength", ")", "{", "int", "count", "=", "0", ";", "for", "(", ";", ";", ")", "{", "if", "(", "i", "==", "0", ")", "{", "break",...
Counts the tailored nodes of the given strength up to the next node which is either stronger or has an explicit weight of this strength.
[ "Counts", "the", "tailored", "nodes", "of", "the", "given", "strength", "up", "to", "the", "next", "node", "which", "is", "either", "stronger", "or", "has", "an", "explicit", "weight", "of", "this", "strength", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationBuilder.java#L1308-L1324
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/ConfigurationInfo.java
ConfigurationInfo.getItems
@SuppressWarnings("unchecked") public List<Class<Object>> getItems(final Predicate<ItemInfo> filter) { """ Used to query items of all configuration types. May be useful to build configuration tree (e.g. to search all items configured by bundle or by classpath scan). Some common filters are predefined in {@li...
java
@SuppressWarnings("unchecked") public List<Class<Object>> getItems(final Predicate<ItemInfo> filter) { final List<Class<Object>> items = (List) Lists.newArrayList(itemsHolder.values()); return filter(items, filter); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "Class", "<", "Object", ">", ">", "getItems", "(", "final", "Predicate", "<", "ItemInfo", ">", "filter", ")", "{", "final", "List", "<", "Class", "<", "Object", ">", ">", "items",...
Used to query items of all configuration types. May be useful to build configuration tree (e.g. to search all items configured by bundle or by classpath scan). Some common filters are predefined in {@link Filters}. Use {@link Predicate#and(Predicate)}, {@link Predicate#or(Predicate)} and {@link Predicate#negate()} to r...
[ "Used", "to", "query", "items", "of", "all", "configuration", "types", ".", "May", "be", "useful", "to", "build", "configuration", "tree", "(", "e", ".", "g", ".", "to", "search", "all", "items", "configured", "by", "bundle", "or", "by", "classpath", "sc...
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/ConfigurationInfo.java#L93-L97
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java
SpecializedOps_DDRM.splitIntoVectors
public static DMatrixRMaj[] splitIntoVectors(DMatrix1Row A , boolean column ) { """ Takes a matrix and splits it into a set of row or column vectors. @param A original matrix. @param column If true then column vectors will be created. @return Set of vectors. """ int w = column ? A.numCols : A.numR...
java
public static DMatrixRMaj[] splitIntoVectors(DMatrix1Row A , boolean column ) { int w = column ? A.numCols : A.numRows; int M = column ? A.numRows : 1; int N = column ? 1 : A.numCols; int o = Math.max(M,N); DMatrixRMaj[] ret = new DMatrixRMaj[w]; for( int i = 0; ...
[ "public", "static", "DMatrixRMaj", "[", "]", "splitIntoVectors", "(", "DMatrix1Row", "A", ",", "boolean", "column", ")", "{", "int", "w", "=", "column", "?", "A", ".", "numCols", ":", "A", ".", "numRows", ";", "int", "M", "=", "column", "?", "A", "."...
Takes a matrix and splits it into a set of row or column vectors. @param A original matrix. @param column If true then column vectors will be created. @return Set of vectors.
[ "Takes", "a", "matrix", "and", "splits", "it", "into", "a", "set", "of", "row", "or", "column", "vectors", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java#L339-L362
OpenTSDB/opentsdb
src/core/Tags.java
Tags.splitString
public static String[] splitString(final String s, final char c) { """ Optimized version of {@code String#split} that doesn't use regexps. This function works in O(5n) where n is the length of the string to split. @param s The string to split. @param c The separator to use to split the string. @return A non-n...
java
public static String[] splitString(final String s, final char c) { final char[] chars = s.toCharArray(); int num_substrings = 1; for (final char x : chars) { if (x == c) { num_substrings++; } } final String[] result = new String[num_substrings]; final int len = chars.length; ...
[ "public", "static", "String", "[", "]", "splitString", "(", "final", "String", "s", ",", "final", "char", "c", ")", "{", "final", "char", "[", "]", "chars", "=", "s", ".", "toCharArray", "(", ")", ";", "int", "num_substrings", "=", "1", ";", "for", ...
Optimized version of {@code String#split} that doesn't use regexps. This function works in O(5n) where n is the length of the string to split. @param s The string to split. @param c The separator to use to split the string. @return A non-null, non-empty array.
[ "Optimized", "version", "of", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/Tags.java#L56-L77
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java
JSONHelpers.loadJSONAsset
public static JSONObject loadJSONAsset(Context context, final String asset) { """ Load a JSON file from the application's "asset" directory. @param context Valid {@link Context} @param asset Name of the JSON file @return New instance of {@link JSONObject} """ if (asset == null) { ret...
java
public static JSONObject loadJSONAsset(Context context, final String asset) { if (asset == null) { return new JSONObject(); } return getJsonObject(org.gearvrf.widgetlib.main.Utility.readTextFile(context, asset)); }
[ "public", "static", "JSONObject", "loadJSONAsset", "(", "Context", "context", ",", "final", "String", "asset", ")", "{", "if", "(", "asset", "==", "null", ")", "{", "return", "new", "JSONObject", "(", ")", ";", "}", "return", "getJsonObject", "(", "org", ...
Load a JSON file from the application's "asset" directory. @param context Valid {@link Context} @param asset Name of the JSON file @return New instance of {@link JSONObject}
[ "Load", "a", "JSON", "file", "from", "the", "application", "s", "asset", "directory", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L1138-L1143
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ReferenceMap.java
ReferenceMap.toReference
private Object toReference(int type, Object referent, int hash) { """ Constructs a reference of the given type to the given referent. The reference is registered with the queue for later purging. @param type HARD, SOFT or WEAK @param referent the object to refer to @param hash the hash code of the <I>ke...
java
private Object toReference(int type, Object referent, int hash) { switch (type) { case HARD: return referent; case SOFT: return new SoftRef(hash, referent, queue); case WEAK: return new WeakRef(hash, referen...
[ "private", "Object", "toReference", "(", "int", "type", ",", "Object", "referent", ",", "int", "hash", ")", "{", "switch", "(", "type", ")", "{", "case", "HARD", ":", "return", "referent", ";", "case", "SOFT", ":", "return", "new", "SoftRef", "(", "has...
Constructs a reference of the given type to the given referent. The reference is registered with the queue for later purging. @param type HARD, SOFT or WEAK @param referent the object to refer to @param hash the hash code of the <I>key</I> of the mapping; this number might be different from referent.hashCode() if ...
[ "Constructs", "a", "reference", "of", "the", "given", "type", "to", "the", "given", "referent", ".", "The", "reference", "is", "registered", "with", "the", "queue", "for", "later", "purging", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ReferenceMap.java#L343-L356
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java
FormData.getFormEntry
public FormEntry getFormEntry(final String entryKey, final int index) { """ Returns the FormEntry for the given entryKey and index. This is the same as calling getFormEntry(entryKey+index) @see #getFormEntry(String) """ return getFormEntry(entryKey + JFunkConstants.INDEXED_KEY_SEPARATOR + index); }
java
public FormEntry getFormEntry(final String entryKey, final int index) { return getFormEntry(entryKey + JFunkConstants.INDEXED_KEY_SEPARATOR + index); }
[ "public", "FormEntry", "getFormEntry", "(", "final", "String", "entryKey", ",", "final", "int", "index", ")", "{", "return", "getFormEntry", "(", "entryKey", "+", "JFunkConstants", ".", "INDEXED_KEY_SEPARATOR", "+", "index", ")", ";", "}" ]
Returns the FormEntry for the given entryKey and index. This is the same as calling getFormEntry(entryKey+index) @see #getFormEntry(String)
[ "Returns", "the", "FormEntry", "for", "the", "given", "entryKey", "and", "index", ".", "This", "is", "the", "same", "as", "calling", "getFormEntry", "(", "entryKey", "+", "index", ")" ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java#L209-L211
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/util/NumberUtils.java
NumberUtils.formatCurrency
public static String formatCurrency(final Number target, final Locale locale) { """ Formats a number as a currency value according to the specified locale. @param target The number to format. @param locale Locale to use for formatting. @return The number formatted as a currency, or {@code null} if the number ...
java
public static String formatCurrency(final Number target, final Locale locale) { Validate.notNull(locale, "Locale cannot be null"); if (target == null) { return null; } NumberFormat format = NumberFormat.getCurrencyInstance(locale); return format.format(target); ...
[ "public", "static", "String", "formatCurrency", "(", "final", "Number", "target", ",", "final", "Locale", "locale", ")", "{", "Validate", ".", "notNull", "(", "locale", ",", "\"Locale cannot be null\"", ")", ";", "if", "(", "target", "==", "null", ")", "{", ...
Formats a number as a currency value according to the specified locale. @param target The number to format. @param locale Locale to use for formatting. @return The number formatted as a currency, or {@code null} if the number given is {@code null}.
[ "Formats", "a", "number", "as", "a", "currency", "value", "according", "to", "the", "specified", "locale", "." ]
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/util/NumberUtils.java#L279-L290
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.newInstance
public static Sql newInstance(String url, String user, String password) throws SQLException { """ Creates a new Sql instance given a JDBC connection URL, a username and a password. @param url a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> @param user the database ...
java
public static Sql newInstance(String url, String user, String password) throws SQLException { Connection connection = DriverManager.getConnection(url, user, password); return new Sql(connection); }
[ "public", "static", "Sql", "newInstance", "(", "String", "url", ",", "String", "user", ",", "String", "password", ")", "throws", "SQLException", "{", "Connection", "connection", "=", "DriverManager", ".", "getConnection", "(", "url", ",", "user", ",", "passwor...
Creates a new Sql instance given a JDBC connection URL, a username and a password. @param url a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> @param user the database user on whose behalf the connection is being made @param password the user's password @return a new Sql inst...
[ "Creates", "a", "new", "Sql", "instance", "given", "a", "JDBC", "connection", "URL", "a", "username", "and", "a", "password", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L393-L396
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java
JobSchedulesImpl.listAsync
public ServiceFuture<List<CloudJobSchedule>> listAsync(final ListOperationCallback<CloudJobSchedule> serviceCallback) { """ Lists all of the job schedules in the specified account. @param serviceCallback the async ServiceCallback to handle successful and failed responses. @throws IllegalArgumentException throw...
java
public ServiceFuture<List<CloudJobSchedule>> listAsync(final ListOperationCallback<CloudJobSchedule> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleList...
[ "public", "ServiceFuture", "<", "List", "<", "CloudJobSchedule", ">", ">", "listAsync", "(", "final", "ListOperationCallback", "<", "CloudJobSchedule", ">", "serviceCallback", ")", "{", "return", "AzureServiceFuture", ".", "fromHeaderPageResponse", "(", "listSinglePageA...
Lists all of the job schedules in the specified account. @param serviceCallback the async ServiceCallback to handle successful and failed responses. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceFuture} object
[ "Lists", "all", "of", "the", "job", "schedules", "in", "the", "specified", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java#L2199-L2209
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/IPAddressString.java
IPAddressString.convertToPrefixLength
public String convertToPrefixLength() throws AddressStringException { """ Converts this address to a prefix length @return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length @throws AddressStringException if the ...
java
public String convertToPrefixLength() throws AddressStringException { IPAddress address = toAddress(); Integer prefix; if(address == null) { if(isPrefixOnly()) { prefix = getNetworkPrefixLength(); } else { return null; } } else { prefix = address.getBlockMaskPrefixLength(true); if(prefix ...
[ "public", "String", "convertToPrefixLength", "(", ")", "throws", "AddressStringException", "{", "IPAddress", "address", "=", "toAddress", "(", ")", ";", "Integer", "prefix", ";", "if", "(", "address", "==", "null", ")", "{", "if", "(", "isPrefixOnly", "(", "...
Converts this address to a prefix length @return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length @throws AddressStringException if the address is invalid
[ "Converts", "this", "address", "to", "a", "prefix", "length" ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/IPAddressString.java#L1044-L1061
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java
PluralRules.getFunctionalEquivalent
public static ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) { """ Returns the 'functionally equivalent' locale with respect to plural rules. Calling PluralRules.forLocale with the functionally equivalent locale, and with the provided locale, returns rules that behave the same. <br> Al...
java
public static ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) { return Factory.getDefaultFactory().getFunctionalEquivalent(locale, isAvailable); }
[ "public", "static", "ULocale", "getFunctionalEquivalent", "(", "ULocale", "locale", ",", "boolean", "[", "]", "isAvailable", ")", "{", "return", "Factory", ".", "getDefaultFactory", "(", ")", ".", "getFunctionalEquivalent", "(", "locale", ",", "isAvailable", ")", ...
Returns the 'functionally equivalent' locale with respect to plural rules. Calling PluralRules.forLocale with the functionally equivalent locale, and with the provided locale, returns rules that behave the same. <br> All locales with the same functionally equivalent locale have plural rules that behave the same. This...
[ "Returns", "the", "functionally", "equivalent", "locale", "with", "respect", "to", "plural", "rules", ".", "Calling", "PluralRules", ".", "forLocale", "with", "the", "functionally", "equivalent", "locale", "and", "with", "the", "provided", "locale", "returns", "ru...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L2219-L2221
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jaas.common/src/com/ibm/ws/security/jaas/common/JAASConfigurationFactory.java
JAASConfigurationFactory.installJAASConfiguration
public synchronized void installJAASConfiguration(ConcurrentServiceReferenceMap<String, JAASLoginContextEntry> jaasLoginContextEntries) { """ This method install the JAAS configuration that specified in the server.xml/client.xml file """ jaasConfiguration = jaasConfigurationRef.getServiceWithException(...
java
public synchronized void installJAASConfiguration(ConcurrentServiceReferenceMap<String, JAASLoginContextEntry> jaasLoginContextEntries) { jaasConfiguration = jaasConfigurationRef.getServiceWithException(); jaasConfiguration.setJaasLoginContextEntries(jaasLoginContextEntries); Map<String, List<Ap...
[ "public", "synchronized", "void", "installJAASConfiguration", "(", "ConcurrentServiceReferenceMap", "<", "String", ",", "JAASLoginContextEntry", ">", "jaasLoginContextEntries", ")", "{", "jaasConfiguration", "=", "jaasConfigurationRef", ".", "getServiceWithException", "(", ")...
This method install the JAAS configuration that specified in the server.xml/client.xml file
[ "This", "method", "install", "the", "JAAS", "configuration", "that", "specified", "in", "the", "server", ".", "xml", "/", "client", ".", "xml", "file" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jaas.common/src/com/ibm/ws/security/jaas/common/JAASConfigurationFactory.java#L98-L111
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/IndexConverter.java
IndexConverter.setString
public int setString(String fieldPtr, boolean bDisplayOption, int moveMode) // init this field override for other value { """ Convert and move string to this field. Convert this string to an index and set the index value. Override this method to convert the String to the actual Physical Data Type...
java
public int setString(String fieldPtr, boolean bDisplayOption, int moveMode) // init this field override for other value { int index = ((NumberField)this.getNextConverter()).convertStringToIndex(fieldPtr); return this.getNextConverter().setValue(index, bDisplayOption, moveMode); }
[ "public", "int", "setString", "(", "String", "fieldPtr", ",", "boolean", "bDisplayOption", ",", "int", "moveMode", ")", "// init this field override for other value", "{", "int", "index", "=", "(", "(", "NumberField", ")", "this", ".", "getNextConverter", "(", ")"...
Convert and move string to this field. Convert this string to an index and set the index value. Override this method to convert the String to the actual Physical Data Type. @param strString the state to set the data to. @param bDisplayOption Display the data on the screen if true. @param iMoveMode INIT, SCREEN, or READ...
[ "Convert", "and", "move", "string", "to", "this", "field", ".", "Convert", "this", "string", "to", "an", "index", "and", "set", "the", "index", "value", ".", "Override", "this", "method", "to", "convert", "the", "String", "to", "the", "actual", "Physical",...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/IndexConverter.java#L83-L87
mapbox/mapbox-java
services-geojson/src/main/java/com/mapbox/geojson/GeometryCollection.java
GeometryCollection.fromGeometry
public static GeometryCollection fromGeometry(@NonNull Geometry geometry) { """ Create a new instance of this class by giving the collection a single GeoJSON {@link Geometry}. @param geometry a non-null object of type geometry which makes up this collection @return a new instance of this class defined by the v...
java
public static GeometryCollection fromGeometry(@NonNull Geometry geometry) { List<Geometry> geometries = Arrays.asList(geometry); return new GeometryCollection(TYPE, null, geometries); }
[ "public", "static", "GeometryCollection", "fromGeometry", "(", "@", "NonNull", "Geometry", "geometry", ")", "{", "List", "<", "Geometry", ">", "geometries", "=", "Arrays", ".", "asList", "(", "geometry", ")", ";", "return", "new", "GeometryCollection", "(", "T...
Create a new instance of this class by giving the collection a single GeoJSON {@link Geometry}. @param geometry a non-null object of type geometry which makes up this collection @return a new instance of this class defined by the values passed inside this static factory method @since 3.0.0
[ "Create", "a", "new", "instance", "of", "this", "class", "by", "giving", "the", "collection", "a", "single", "GeoJSON", "{", "@link", "Geometry", "}", "." ]
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geojson/src/main/java/com/mapbox/geojson/GeometryCollection.java#L126-L129
b3log/latke
latke-core/src/main/java/org/b3log/latke/util/Callstacks.java
Callstacks.isCaller
public static boolean isCaller(final String className, final String methodName) { """ Checks the current method is whether invoked by a caller specified by the given class name and method name. @param className the given class name @param methodName the given method name, "*" for matching all methods @return...
java
public static boolean isCaller(final String className, final String methodName) { final Throwable throwable = new Throwable(); final StackTraceElement[] stackElements = throwable.getStackTrace(); if (null == stackElements) { LOGGER.log(Level.WARN, "Empty call stack"); r...
[ "public", "static", "boolean", "isCaller", "(", "final", "String", "className", ",", "final", "String", "methodName", ")", "{", "final", "Throwable", "throwable", "=", "new", "Throwable", "(", ")", ";", "final", "StackTraceElement", "[", "]", "stackElements", ...
Checks the current method is whether invoked by a caller specified by the given class name and method name. @param className the given class name @param methodName the given method name, "*" for matching all methods @return {@code true} if it is invoked by the specified caller, returns {@code false} otherwise
[ "Checks", "the", "current", "method", "is", "whether", "invoked", "by", "a", "caller", "specified", "by", "the", "given", "class", "name", "and", "method", "name", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/util/Callstacks.java#L42-L61
graknlabs/grakn
server/src/graql/gremlin/sets/EquivalentFragmentSets.java
EquivalentFragmentSets.neq
public static EquivalentFragmentSet neq(VarProperty varProperty, Variable varA, Variable varB) { """ An {@link EquivalentFragmentSet} that indicates a variable is not equal to another variable. """ return new AutoValue_NeqFragmentSet(varProperty, varA, varB); }
java
public static EquivalentFragmentSet neq(VarProperty varProperty, Variable varA, Variable varB) { return new AutoValue_NeqFragmentSet(varProperty, varA, varB); }
[ "public", "static", "EquivalentFragmentSet", "neq", "(", "VarProperty", "varProperty", ",", "Variable", "varA", ",", "Variable", "varB", ")", "{", "return", "new", "AutoValue_NeqFragmentSet", "(", "varProperty", ",", "varA", ",", "varB", ")", ";", "}" ]
An {@link EquivalentFragmentSet} that indicates a variable is not equal to another variable.
[ "An", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/gremlin/sets/EquivalentFragmentSets.java#L121-L123
Erudika/para
para-server/src/main/java/com/erudika/para/security/SecurityUtils.java
SecurityUtils.checkImplicitAppPermissions
public static boolean checkImplicitAppPermissions(App app, ParaObject object) { """ An app can edit itself or delete itself. It can't read, edit, overwrite or delete other apps, unless it is the root app. @param app an app @param object another object @return true if app passes the check """ if (app !=...
java
public static boolean checkImplicitAppPermissions(App app, ParaObject object) { if (app != null && object != null) { return isNotAnApp(object.getType()) || app.getId().equals(object.getId()) || app.isRootApp(); } return false; }
[ "public", "static", "boolean", "checkImplicitAppPermissions", "(", "App", "app", ",", "ParaObject", "object", ")", "{", "if", "(", "app", "!=", "null", "&&", "object", "!=", "null", ")", "{", "return", "isNotAnApp", "(", "object", ".", "getType", "(", ")",...
An app can edit itself or delete itself. It can't read, edit, overwrite or delete other apps, unless it is the root app. @param app an app @param object another object @return true if app passes the check
[ "An", "app", "can", "edit", "itself", "or", "delete", "itself", ".", "It", "can", "t", "read", "edit", "overwrite", "or", "delete", "other", "apps", "unless", "it", "is", "the", "root", "app", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/security/SecurityUtils.java#L169-L174
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutors.java
ScheduledExecutors.scheduleWithFixedDelay
public static void scheduleWithFixedDelay(ScheduledExecutorService exec, Duration delay, Callable<Signal> callable) { """ Run callable repeatedly with the given delay between calls, after the given initial delay, until it returns Signal.STOP. Exceptions are caught and logged as errors. """ scheduleWithFi...
java
public static void scheduleWithFixedDelay(ScheduledExecutorService exec, Duration delay, Callable<Signal> callable) { scheduleWithFixedDelay(exec, delay, delay, callable); }
[ "public", "static", "void", "scheduleWithFixedDelay", "(", "ScheduledExecutorService", "exec", ",", "Duration", "delay", ",", "Callable", "<", "Signal", ">", "callable", ")", "{", "scheduleWithFixedDelay", "(", "exec", ",", "delay", ",", "delay", ",", "callable", ...
Run callable repeatedly with the given delay between calls, after the given initial delay, until it returns Signal.STOP. Exceptions are caught and logged as errors.
[ "Run", "callable", "repeatedly", "with", "the", "given", "delay", "between", "calls", "after", "the", "given", "initial", "delay", "until", "it", "returns", "Signal", ".", "STOP", ".", "Exceptions", "are", "caught", "and", "logged", "as", "errors", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutors.java#L67-L70
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java
RequestParamMap.setSeparators
public static void setSeparators (@Nonnull @Nonempty final String sOpen, @Nonnull @Nonempty final String sClose) { """ Set the separators to use. @param sOpen Open string. May neither be <code>null</code> nor empty. @param sClose Close string. May neither be <code>null</code> nor empty. """ ValueEnfo...
java
public static void setSeparators (@Nonnull @Nonempty final String sOpen, @Nonnull @Nonempty final String sClose) { ValueEnforcer.notEmpty (sOpen, "Open"); ValueEnforcer.notEmpty (sClose, "Close"); ValueEnforcer.isFalse (sOpen.contains (sClose), "open may not contain close"); ValueEnforcer.isFalse (sCl...
[ "public", "static", "void", "setSeparators", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sOpen", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sClose", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sOpen", ",", "\"Open\"", ")", ...
Set the separators to use. @param sOpen Open string. May neither be <code>null</code> nor empty. @param sClose Close string. May neither be <code>null</code> nor empty.
[ "Set", "the", "separators", "to", "use", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java#L430-L438
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java
JBasePanel.getComponentByName
public Component getComponentByName(String strName, Container parent) { """ Get the sub-component with this name. @param strName The name I'm looking for. @param parent The container to start the search from. @return The component with this name (or null). """ for (int i = 0; i < parent.getComponent...
java
public Component getComponentByName(String strName, Container parent) { for (int i = 0; i < parent.getComponentCount(); i++) { Component component = parent.getComponent(i); if (strName.equals(component.getName())) return component; if (component in...
[ "public", "Component", "getComponentByName", "(", "String", "strName", ",", "Container", "parent", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parent", ".", "getComponentCount", "(", ")", ";", "i", "++", ")", "{", "Component", "component"...
Get the sub-component with this name. @param strName The name I'm looking for. @param parent The container to start the search from. @return The component with this name (or null).
[ "Get", "the", "sub", "-", "component", "with", "this", "name", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L422-L437
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.queryBlockByHash
public BlockInfo queryBlockByHash(Peer peer, byte[] blockHash) throws InvalidArgumentException, ProposalException { """ Query a peer in this channel for a Block by the block hash. <STRONG>This method may not be thread safe if client context is changed!</STRONG> @param peer the Peer to query. @param blo...
java
public BlockInfo queryBlockByHash(Peer peer, byte[] blockHash) throws InvalidArgumentException, ProposalException { return queryBlockByHash(Collections.singleton(peer), blockHash); }
[ "public", "BlockInfo", "queryBlockByHash", "(", "Peer", "peer", ",", "byte", "[", "]", "blockHash", ")", "throws", "InvalidArgumentException", ",", "ProposalException", "{", "return", "queryBlockByHash", "(", "Collections", ".", "singleton", "(", "peer", ")", ",",...
Query a peer in this channel for a Block by the block hash. <STRONG>This method may not be thread safe if client context is changed!</STRONG> @param peer the Peer to query. @param blockHash the hash of the Block in the chain. @return the {@link BlockInfo} with the given block Hash @throws InvalidArgumentExceptio...
[ "Query", "a", "peer", "in", "this", "channel", "for", "a", "Block", "by", "the", "block", "hash", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2683-L2685
fracpete/multisearch-weka-package
src/main/java/weka/classifiers/meta/multisearch/AbstractSearch.java
AbstractSearch.addPerformance
public void addPerformance(Performance performance, int folds) { """ Adds the performance to the cache and the current list of performances. @param performance the performance to add @param folds the number of folds """ m_Performances.add(performance); m_Cache.add(folds, performance); m_Trace....
java
public void addPerformance(Performance performance, int folds) { m_Performances.add(performance); m_Cache.add(folds, performance); m_Trace.add(new AbstractMap.SimpleEntry<Integer, Performance>(folds, performance)); }
[ "public", "void", "addPerformance", "(", "Performance", "performance", ",", "int", "folds", ")", "{", "m_Performances", ".", "add", "(", "performance", ")", ";", "m_Cache", ".", "add", "(", "folds", ",", "performance", ")", ";", "m_Trace", ".", "add", "(",...
Adds the performance to the cache and the current list of performances. @param performance the performance to add @param folds the number of folds
[ "Adds", "the", "performance", "to", "the", "cache", "and", "the", "current", "list", "of", "performances", "." ]
train
https://github.com/fracpete/multisearch-weka-package/blob/756fcf343e7cc9fd3844c99a0e1e828368f393d0/src/main/java/weka/classifiers/meta/multisearch/AbstractSearch.java#L283-L288
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Disjoint.java
ST_Disjoint.geomDisjoint
public static Boolean geomDisjoint(Geometry a, Geometry b) { """ Return true if the two Geometries are disjoint @param a Geometry Geometry. @param b Geometry instance @return true if the two Geometries are disjoint """ if(a==null || b==null) { return null; } return a.di...
java
public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); }
[ "public", "static", "Boolean", "geomDisjoint", "(", "Geometry", "a", ",", "Geometry", "b", ")", "{", "if", "(", "a", "==", "null", "||", "b", "==", "null", ")", "{", "return", "null", ";", "}", "return", "a", ".", "disjoint", "(", "b", ")", ";", ...
Return true if the two Geometries are disjoint @param a Geometry Geometry. @param b Geometry instance @return true if the two Geometries are disjoint
[ "Return", "true", "if", "the", "two", "Geometries", "are", "disjoint" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/predicates/ST_Disjoint.java#L52-L57
realtime-framework/RealtimeMessaging-Android
library/src/main/java/ibt/ortc/extensibility/OrtcClient.java
OrtcClient.subscribeWithBuffer
public void subscribeWithBuffer(String channel, String subscriberId, final OnMessageWithBuffer onMessage) { """ Subscribes to a channel to receive messages published to it. @param channel The channel name. @param subscriberId The subscriberId associated to the channel. @param OnMessageWithBuffer The callba...
java
public void subscribeWithBuffer(String channel, String subscriberId, final OnMessageWithBuffer onMessage){ if (subscriberId != null) { HashMap options = new HashMap(); options.put("channel", channel); options.put("subscribeOnReconnected", true); options.put("subsc...
[ "public", "void", "subscribeWithBuffer", "(", "String", "channel", ",", "String", "subscriberId", ",", "final", "OnMessageWithBuffer", "onMessage", ")", "{", "if", "(", "subscriberId", "!=", "null", ")", "{", "HashMap", "options", "=", "new", "HashMap", "(", "...
Subscribes to a channel to receive messages published to it. @param channel The channel name. @param subscriberId The subscriberId associated to the channel. @param OnMessageWithBuffer The callback called when a message arrives at the channel and message seqId number.
[ "Subscribes", "to", "a", "channel", "to", "receive", "messages", "published", "to", "it", "." ]
train
https://github.com/realtime-framework/RealtimeMessaging-Android/blob/f0d87b92ed7c591bcfe2b9cf45b947865570e061/library/src/main/java/ibt/ortc/extensibility/OrtcClient.java#L707-L733
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java
StringSupport.split
public static List<String> split(String input, String punctuationChars, String quoteChars) { """ reads all words in a text and converts them to lower case @param input @param punctuationChars characters that can not belong to words and are therefore separators @return a collection of uniquely identified words...
java
public static List<String> split(String input, String punctuationChars, String quoteChars) { return split(input, punctuationChars, quoteChars, false, false, false); }
[ "public", "static", "List", "<", "String", ">", "split", "(", "String", "input", ",", "String", "punctuationChars", ",", "String", "quoteChars", ")", "{", "return", "split", "(", "input", ",", "punctuationChars", ",", "quoteChars", ",", "false", ",", "false"...
reads all words in a text and converts them to lower case @param input @param punctuationChars characters that can not belong to words and are therefore separators @return a collection of uniquely identified words
[ "reads", "all", "words", "in", "a", "text", "and", "converts", "them", "to", "lower", "case" ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java#L540-L542
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_vlan_vlanId_GET
public OvhVlan serviceName_vlan_vlanId_GET(String serviceName, Long vlanId) throws IOException { """ Get this object properties REST: GET /dedicatedCloud/{serviceName}/vlan/{vlanId} @param serviceName [required] Domain of the service @param vlanId [required] """ String qPath = "/dedicatedCloud/{serviceN...
java
public OvhVlan serviceName_vlan_vlanId_GET(String serviceName, Long vlanId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vlan/{vlanId}"; StringBuilder sb = path(qPath, serviceName, vlanId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhVlan.class); }
[ "public", "OvhVlan", "serviceName_vlan_vlanId_GET", "(", "String", "serviceName", ",", "Long", "vlanId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/vlan/{vlanId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
Get this object properties REST: GET /dedicatedCloud/{serviceName}/vlan/{vlanId} @param serviceName [required] Domain of the service @param vlanId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1229-L1234
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.findAll
@Override public List<CommerceAccount> findAll() { """ Returns all the commerce accounts. @return the commerce accounts """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceAccount> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccount", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce accounts. @return the commerce accounts
[ "Returns", "all", "the", "commerce", "accounts", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L2744-L2747
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listAppServicePlansAsync
public Observable<Page<AppServicePlanInner>> listAppServicePlansAsync(final String resourceGroupName, final String name) { """ Get all App Service plans in an App Service Environment. Get all App Service plans in an App Service Environment. @param resourceGroupName Name of the resource group to which the resou...
java
public Observable<Page<AppServicePlanInner>> listAppServicePlansAsync(final String resourceGroupName, final String name) { return listAppServicePlansWithServiceResponseAsync(resourceGroupName, name) .map(new Func1<ServiceResponse<Page<AppServicePlanInner>>, Page<AppServicePlanInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "AppServicePlanInner", ">", ">", "listAppServicePlansAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listAppServicePlansWithServiceResponseAsync", "(", "resourceGroupName",...
Get all App Service plans in an App Service Environment. Get all App Service plans in an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Get", "all", "App", "Service", "plans", "in", "an", "App", "Service", "Environment", ".", "Get", "all", "App", "Service", "plans", "in", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L4108-L4116
czyzby/gdx-lml
uedi/src/main/java/com/github/czyzby/uedi/impl/DefaultContext.java
DefaultContext.processComponent
@Override protected void processComponent(final Object component) { """ Note: this method should be invoked only with externally registered components. @param component will be initiated. @see #processScannedComponent(Object, Array) """ injectFields(component); if (component instanceof ...
java
@Override protected void processComponent(final Object component) { injectFields(component); if (component instanceof Initiated) { try { ((Initiated) component).initiate(); } catch (final Exception exception) { throw new RuntimeException("Unabl...
[ "@", "Override", "protected", "void", "processComponent", "(", "final", "Object", "component", ")", "{", "injectFields", "(", "component", ")", ";", "if", "(", "component", "instanceof", "Initiated", ")", "{", "try", "{", "(", "(", "Initiated", ")", "compone...
Note: this method should be invoked only with externally registered components. @param component will be initiated. @see #processScannedComponent(Object, Array)
[ "Note", ":", "this", "method", "should", "be", "invoked", "only", "with", "externally", "registered", "components", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/uedi/src/main/java/com/github/czyzby/uedi/impl/DefaultContext.java#L334-L347
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/BrokerHelper.java
BrokerHelper.hasAnonymousKeyReference
public static boolean hasAnonymousKeyReference(ClassDescriptor cld, ObjectReferenceDescriptor rds) { """ Returns <em>true</em> if one or more anonymous FK fields are used. @param cld The {@link org.apache.ojb.broker.metadata.ClassDescriptor} of the main object. @param rds The {@link org.apache.ojb.broker.metadat...
java
public static boolean hasAnonymousKeyReference(ClassDescriptor cld, ObjectReferenceDescriptor rds) { boolean result = false; FieldDescriptor[] fkFields = rds.getForeignKeyFieldDescriptors(cld); for(int i = 0; i < fkFields.length; i++) { FieldDescriptor fkField = fkF...
[ "public", "static", "boolean", "hasAnonymousKeyReference", "(", "ClassDescriptor", "cld", ",", "ObjectReferenceDescriptor", "rds", ")", "{", "boolean", "result", "=", "false", ";", "FieldDescriptor", "[", "]", "fkFields", "=", "rds", ".", "getForeignKeyFieldDescriptor...
Returns <em>true</em> if one or more anonymous FK fields are used. @param cld The {@link org.apache.ojb.broker.metadata.ClassDescriptor} of the main object. @param rds The {@link org.apache.ojb.broker.metadata.ObjectReferenceDescriptor} of the referenced object. @return <em>true</em> if one or more anonymous FK fields ...
[ "Returns", "<em", ">", "true<", "/", "em", ">", "if", "one", "or", "more", "anonymous", "FK", "fields", "are", "used", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/BrokerHelper.java#L1130-L1144
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java
ScenarioPortrayal.addHistogram
public void addHistogram(String histogramID, String xAxisLabel, String yAxisLabel) throws ShanksException { """ Add a histogram to the simulation @param histogramID @param xAxisLabel @param yAxisLabel @throws ShanksException """ if (!this.histograms.containsKey(histogramID)) { Histo...
java
public void addHistogram(String histogramID, String xAxisLabel, String yAxisLabel) throws ShanksException { if (!this.histograms.containsKey(histogramID)) { HistogramGenerator histogram = new HistogramGenerator(); histogram.setTitle(histogramID); histogram.setXAxisLabel(x...
[ "public", "void", "addHistogram", "(", "String", "histogramID", ",", "String", "xAxisLabel", ",", "String", "yAxisLabel", ")", "throws", "ShanksException", "{", "if", "(", "!", "this", ".", "histograms", ".", "containsKey", "(", "histogramID", ")", ")", "{", ...
Add a histogram to the simulation @param histogramID @param xAxisLabel @param yAxisLabel @throws ShanksException
[ "Add", "a", "histogram", "to", "the", "simulation" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java#L345-L355
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/MetricDto.java
MetricDto.transformToDto
public static List<MetricDto> transformToDto(List<Metric> metrics) { """ Converts list of alert entity objects to list of alertDto objects. @param metrics List of alert entities. Cannot be null. @return List of alertDto objects. @throws WebApplicationException If an error occurs. """ if ...
java
public static List<MetricDto> transformToDto(List<Metric> metrics) { if (metrics == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } List<MetricDto> result = new ArrayList<>(); for (Metric me...
[ "public", "static", "List", "<", "MetricDto", ">", "transformToDto", "(", "List", "<", "Metric", ">", "metrics", ")", "{", "if", "(", "metrics", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be converted to Dt...
Converts list of alert entity objects to list of alertDto objects. @param metrics List of alert entities. Cannot be null. @return List of alertDto objects. @throws WebApplicationException If an error occurs.
[ "Converts", "list", "of", "alert", "entity", "objects", "to", "list", "of", "alertDto", "objects", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/MetricDto.java#L91-L102
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLClassAssertionAxiomImpl_CustomFieldSerializer.java
OWLClassAssertionAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLClassAssertionAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google....
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLClassAssertionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLClassAssertionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLClassAssertionAxiomImpl_CustomFieldSerializer.java#L76-L79
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/OpportunitiesApi.java
OpportunitiesApi.getOpportunitiesTasksTaskId
public OpportunitiesTasksResponse getOpportunitiesTasksTaskId(Integer taskId, String datasource, String ifNoneMatch) throws ApiException { """ Get opportunities task Return information of an opportunities task --- This route expires daily at 11:05 @param taskId ID of an opportunities task (require...
java
public OpportunitiesTasksResponse getOpportunitiesTasksTaskId(Integer taskId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<OpportunitiesTasksResponse> resp = getOpportunitiesTasksTaskIdWithHttpInfo(taskId, datasource, ifNoneMatch); return resp.getD...
[ "public", "OpportunitiesTasksResponse", "getOpportunitiesTasksTaskId", "(", "Integer", "taskId", ",", "String", "datasource", ",", "String", "ifNoneMatch", ")", "throws", "ApiException", "{", "ApiResponse", "<", "OpportunitiesTasksResponse", ">", "resp", "=", "getOpportun...
Get opportunities task Return information of an opportunities task --- This route expires daily at 11:05 @param taskId ID of an opportunities task (required) @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be retu...
[ "Get", "opportunities", "task", "Return", "information", "of", "an", "opportunities", "task", "---", "This", "route", "expires", "daily", "at", "11", ":", "05" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/OpportunitiesApi.java#L748-L753
craftercms/commons
utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java
HttpUtils.getFullUrl
public static String getFullUrl(HttpServletRequest request, String relativeUrl) { """ Returns the full URL for the relative URL based in the specified request. The full URL includes the scheme, server name, port number, context path and server path. @param request the request object used to build the bas...
java
public static String getFullUrl(HttpServletRequest request, String relativeUrl) { StringBuilder baseUrl = getBaseRequestUrl(request, false); String contextPath = request.getContextPath(); String servletPath = request.getServletPath(); if (contextPath.equals("/")) { contextPa...
[ "public", "static", "String", "getFullUrl", "(", "HttpServletRequest", "request", ",", "String", "relativeUrl", ")", "{", "StringBuilder", "baseUrl", "=", "getBaseRequestUrl", "(", "request", ",", "false", ")", ";", "String", "contextPath", "=", "request", ".", ...
Returns the full URL for the relative URL based in the specified request. The full URL includes the scheme, server name, port number, context path and server path. @param request the request object used to build the base URL @param relativeUrl the relative URL @return the full URL
[ "Returns", "the", "full", "URL", "for", "the", "relative", "URL", "based", "in", "the", "specified", "request", ".", "The", "full", "URL", "includes", "the", "scheme", "server", "name", "port", "number", "context", "path", "and", "server", "path", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java#L89-L102
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.retrieveCall
public void retrieveCall( String connId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { """ Retrieve the specified call from hold. @param connId The connection ID of the call. @param reasons Information on causes for, and res...
java
public void retrieveCall( String connId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData retrieveData = new VoicecallsidanswerData(); retrieveData.setReasons(Util.toKVLi...
[ "public", "void", "retrieveCall", "(", "String", "connId", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicecallsidanswerData", "retrieveData", "=", "new", "VoicecallsidanswerData...
Retrieve the specified call from hold. @param connId The connection ID of the call. @param reasons Information on causes for, and results of, actions taken by the user of the current DN. For details about reasons, refer to the [*Genesys Events and Models Reference Manual*](https://docs.genesys.com/Documentation/System/...
[ "Retrieve", "the", "specified", "call", "from", "hold", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L601-L619
logic-ng/LogicNG
src/main/java/org/logicng/solvers/MiniSat.java
MiniSat.miniSat
public static MiniSat miniSat(final FormulaFactory f) { """ Returns a new MiniSat solver. @param f the formula factory @return the solver """ return new MiniSat(f, SolverStyle.MINISAT, new MiniSatConfig.Builder().build(), null); }
java
public static MiniSat miniSat(final FormulaFactory f) { return new MiniSat(f, SolverStyle.MINISAT, new MiniSatConfig.Builder().build(), null); }
[ "public", "static", "MiniSat", "miniSat", "(", "final", "FormulaFactory", "f", ")", "{", "return", "new", "MiniSat", "(", "f", ",", "SolverStyle", ".", "MINISAT", ",", "new", "MiniSatConfig", ".", "Builder", "(", ")", ".", "build", "(", ")", ",", "null",...
Returns a new MiniSat solver. @param f the formula factory @return the solver
[ "Returns", "a", "new", "MiniSat", "solver", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/MiniSat.java#L131-L133
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/XMLProperties.java
XMLProperties.setPropertyFormat
public synchronized String setPropertyFormat(String pKey, String pFormat) { """ Sets the format of a property. This value is used for formatting the value before it is stored as xml. @param pKey a key in this hashtable. @param pFormat a string representation of the format. @return the previous format for t...
java
public synchronized String setPropertyFormat(String pKey, String pFormat) { // Insert format return StringUtil.valueOf(mFormats.put(pKey, pFormat)); }
[ "public", "synchronized", "String", "setPropertyFormat", "(", "String", "pKey", ",", "String", "pFormat", ")", "{", "// Insert format\r", "return", "StringUtil", ".", "valueOf", "(", "mFormats", ".", "put", "(", "pKey", ",", "pFormat", ")", ")", ";", "}" ]
Sets the format of a property. This value is used for formatting the value before it is stored as xml. @param pKey a key in this hashtable. @param pFormat a string representation of the format. @return the previous format for the specified key or null if it did not have one.
[ "Sets", "the", "format", "of", "a", "property", ".", "This", "value", "is", "used", "for", "formatting", "the", "value", "before", "it", "is", "stored", "as", "xml", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/XMLProperties.java#L494-L498
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/SimpleXpathEngine.java
SimpleXpathEngine.getXPathResultNode
protected Node getXPathResultNode(String select, Document document) throws ConfigurationException, TransformerException, XpathException { """ Testable method to execute the copy-of transform and return the root node of the resulting Document. @param select @param document @throws ConfigurationException...
java
protected Node getXPathResultNode(String select, Document document) throws ConfigurationException, TransformerException, XpathException { return getXPathResultAsDocument(select, document).getDocumentElement(); }
[ "protected", "Node", "getXPathResultNode", "(", "String", "select", ",", "Document", "document", ")", "throws", "ConfigurationException", ",", "TransformerException", ",", "XpathException", "{", "return", "getXPathResultAsDocument", "(", "select", ",", "document", ")", ...
Testable method to execute the copy-of transform and return the root node of the resulting Document. @param select @param document @throws ConfigurationException @throws TransformerException @return the root node of the Document created by the copy-of transform.
[ "Testable", "method", "to", "execute", "the", "copy", "-", "of", "transform", "and", "return", "the", "root", "node", "of", "the", "resulting", "Document", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/SimpleXpathEngine.java#L175-L178
petergeneric/stdlib
user-manager/service/src/main/java/com/peterphi/usermanager/guice/authentication/ldap/LDAPUserAuthenticationService.java
LDAPUserAuthenticationService.opportunisticallyRefreshUserData
public synchronized void opportunisticallyRefreshUserData(final String username, final String password) { """ Temporarily borrow a user's credentials to run an opportunistic user data refresh @param username @param password """ if (shouldOpportunisticallyRefreshUserData()) { this.lastOpportunisticUs...
java
public synchronized void opportunisticallyRefreshUserData(final String username, final String password) { if (shouldOpportunisticallyRefreshUserData()) { this.lastOpportunisticUserDataRefresh = System.currentTimeMillis(); Thread thread = new Thread(() -> refreshAllUserData(ldap.parseUser(username), password,...
[ "public", "synchronized", "void", "opportunisticallyRefreshUserData", "(", "final", "String", "username", ",", "final", "String", "password", ")", "{", "if", "(", "shouldOpportunisticallyRefreshUserData", "(", ")", ")", "{", "this", ".", "lastOpportunisticUserDataRefres...
Temporarily borrow a user's credentials to run an opportunistic user data refresh @param username @param password
[ "Temporarily", "borrow", "a", "user", "s", "credentials", "to", "run", "an", "opportunistic", "user", "data", "refresh" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/user-manager/service/src/main/java/com/peterphi/usermanager/guice/authentication/ldap/LDAPUserAuthenticationService.java#L195-L205
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java
CodeBuilderUtil.convertValue
public static void convertValue(CodeBuilder b, Class from, Class to) { """ Converts a value on the stack. If "to" type is a String, then conversion may call the String.valueOf(from). """ if (from == to) { return; } TypeDesc fromType = TypeDesc.forClass(from); ...
java
public static void convertValue(CodeBuilder b, Class from, Class to) { if (from == to) { return; } TypeDesc fromType = TypeDesc.forClass(from); TypeDesc toType = TypeDesc.forClass(to); // Let CodeBuilder have a crack at the conversion first. try { ...
[ "public", "static", "void", "convertValue", "(", "CodeBuilder", "b", ",", "Class", "from", ",", "Class", "to", ")", "{", "if", "(", "from", "==", "to", ")", "{", "return", ";", "}", "TypeDesc", "fromType", "=", "TypeDesc", ".", "forClass", "(", "from",...
Converts a value on the stack. If "to" type is a String, then conversion may call the String.valueOf(from).
[ "Converts", "a", "value", "on", "the", "stack", ".", "If", "to", "type", "is", "a", "String", "then", "conversion", "may", "call", "the", "String", ".", "valueOf", "(", "from", ")", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L647-L678
google/closure-compiler
src/com/google/javascript/rhino/JSDocInfo.java
JSDocInfo.declareTypeTransformation
boolean declareTypeTransformation(String newName, Node expr) { """ Declares a type transformation expression. These expressions are described using a {@code @template} annotation of the form {@code @template T := TTL-Expr =:} @param newName The name associated to the type transformation. @param expr The type...
java
boolean declareTypeTransformation(String newName, Node expr) { lazyInitInfo(); if (isTemplateTypeName(newName)) { return false; } if (info.typeTransformations == null){ // A LinkedHashMap is used to keep the insertion order. The type // transformation expressions will be evaluated in ...
[ "boolean", "declareTypeTransformation", "(", "String", "newName", ",", "Node", "expr", ")", "{", "lazyInitInfo", "(", ")", ";", "if", "(", "isTemplateTypeName", "(", "newName", ")", ")", "{", "return", "false", ";", "}", "if", "(", "info", ".", "typeTransf...
Declares a type transformation expression. These expressions are described using a {@code @template} annotation of the form {@code @template T := TTL-Expr =:} @param newName The name associated to the type transformation. @param expr The type transformation expression.
[ "Declares", "a", "type", "transformation", "expression", ".", "These", "expressions", "are", "described", "using", "a", "{", "@code", "@template", "}", "annotation", "of", "the", "form", "{", "@code", "@template", "T", ":", "=", "TTL", "-", "Expr", "=", ":...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/JSDocInfo.java#L1440-L1455
pwall567/jsonutil
src/main/java/net/pwall/json/JSON.java
JSON.parseArray
public static JSONArray parseArray(File f, Charset charSet) throws IOException { """ Parse the contents of a {@link File} as a JSON array, specifying the character set. @param f the {@link File} @param charSet the character set @return the JSON array @throws JSONException if the file does...
java
public static JSONArray parseArray(File f, Charset charSet) throws IOException { return (JSONArray)parse(f, charSet); }
[ "public", "static", "JSONArray", "parseArray", "(", "File", "f", ",", "Charset", "charSet", ")", "throws", "IOException", "{", "return", "(", "JSONArray", ")", "parse", "(", "f", ",", "charSet", ")", ";", "}" ]
Parse the contents of a {@link File} as a JSON array, specifying the character set. @param f the {@link File} @param charSet the character set @return the JSON array @throws JSONException if the file does not contain a valid JSON value @throws IOException on any I/O errors @throws ClassCastExcept...
[ "Parse", "the", "contents", "of", "a", "{", "@link", "File", "}", "as", "a", "JSON", "array", "specifying", "the", "character", "set", "." ]
train
https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSON.java#L246-L248
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseRequest.java
PutIntegrationResponseRequest.withResponseTemplates
public PutIntegrationResponseRequest withResponseTemplates(java.util.Map<String, String> responseTemplates) { """ <p> Specifies a put integration response's templates. </p> @param responseTemplates Specifies a put integration response's templates. @return Returns a reference to this object so that method ca...
java
public PutIntegrationResponseRequest withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "PutIntegrationResponseRequest", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Specifies a put integration response's templates. </p> @param responseTemplates Specifies a put integration response's templates. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Specifies", "a", "put", "integration", "response", "s", "templates", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseRequest.java#L450-L453
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.doubleConsumer
public static DoubleConsumer doubleConsumer(CheckedDoubleConsumer consumer, Consumer<Throwable> handler) { """ Wrap a {@link CheckedDoubleConsumer} in a {@link DoubleConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> Arrays.stream(new double[] { 1.0, 2.0 }).forEach(Unchecked.doubl...
java
public static DoubleConsumer doubleConsumer(CheckedDoubleConsumer consumer, Consumer<Throwable> handler) { return d -> { try { consumer.accept(d); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("Exce...
[ "public", "static", "DoubleConsumer", "doubleConsumer", "(", "CheckedDoubleConsumer", "consumer", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "d", "->", "{", "try", "{", "consumer", ".", "accept", "(", "d", ")", ";", "}", "catch", ...
Wrap a {@link CheckedDoubleConsumer} in a {@link DoubleConsumer} with a custom handler for checked exceptions. <p> Example: <code><pre> Arrays.stream(new double[] { 1.0, 2.0 }).forEach(Unchecked.doubleConsumer( d -> { if (d &lt; 0.0) throw new Exception("Only positive numbers allowed"); }, e -> { throw new IllegalState...
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L823-L834
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java
TaskContext.getTaskPublisher
public TaskPublisher getTaskPublisher(TaskState taskState, TaskLevelPolicyCheckResults results) throws Exception { """ Get a post-fork {@link TaskPublisher} for publishing data in the given branch. @param taskState {@link TaskState} of a {@link Task} @param results Task-level policy checking results @return a...
java
public TaskPublisher getTaskPublisher(TaskState taskState, TaskLevelPolicyCheckResults results) throws Exception { return TaskPublisherBuilderFactory.newTaskPublisherBuilder(taskState, results).build(); }
[ "public", "TaskPublisher", "getTaskPublisher", "(", "TaskState", "taskState", ",", "TaskLevelPolicyCheckResults", "results", ")", "throws", "Exception", "{", "return", "TaskPublisherBuilderFactory", ".", "newTaskPublisherBuilder", "(", "taskState", ",", "results", ")", "....
Get a post-fork {@link TaskPublisher} for publishing data in the given branch. @param taskState {@link TaskState} of a {@link Task} @param results Task-level policy checking results @return a {@link TaskPublisher}
[ "Get", "a", "post", "-", "fork", "{", "@link", "TaskPublisher", "}", "for", "publishing", "data", "in", "the", "given", "branch", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java#L353-L355
samskivert/samskivert
src/main/java/com/samskivert/util/CheapIntMap.java
CheapIntMap.put
public void put (int key, Object value) { """ Inserts the specified value into the map. <em>Note:</em> the key must be a positive integer. """ int size = _keys.length, start = key % size, iidx = -1; for (int ii = 0; ii < size; ii++) { int idx = (ii + start) % size; if (...
java
public void put (int key, Object value) { int size = _keys.length, start = key % size, iidx = -1; for (int ii = 0; ii < size; ii++) { int idx = (ii + start) % size; if (_keys[idx] == key) { _values[idx] = value; return; } else if (i...
[ "public", "void", "put", "(", "int", "key", ",", "Object", "value", ")", "{", "int", "size", "=", "_keys", ".", "length", ",", "start", "=", "key", "%", "size", ",", "iidx", "=", "-", "1", ";", "for", "(", "int", "ii", "=", "0", ";", "ii", "<...
Inserts the specified value into the map. <em>Note:</em> the key must be a positive integer.
[ "Inserts", "the", "specified", "value", "into", "the", "map", ".", "<em", ">", "Note", ":", "<", "/", "em", ">", "the", "key", "must", "be", "a", "positive", "integer", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/CheapIntMap.java#L30-L54
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.resetCaches
public static void resetCaches(int size) { """ Reset the cache of element sets. @param size the new cache size """ nodesCache = new LinkedHashMap<String, List<Node>>() { @Override protected boolean removeEldestEntry(Map.Entry<String, List<Node>> foo) { return ...
java
public static void resetCaches(int size) { nodesCache = new LinkedHashMap<String, List<Node>>() { @Override protected boolean removeEldestEntry(Map.Entry<String, List<Node>> foo) { return size() == size; } }; vmsCache = new LinkedHashMap<Strin...
[ "public", "static", "void", "resetCaches", "(", "int", "size", ")", "{", "nodesCache", "=", "new", "LinkedHashMap", "<", "String", ",", "List", "<", "Node", ">", ">", "(", ")", "{", "@", "Override", "protected", "boolean", "removeEldestEntry", "(", "Map", ...
Reset the cache of element sets. @param size the new cache size
[ "Reset", "the", "cache", "of", "element", "sets", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L68-L82
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.getSharedKeyAsync
public Observable<ConnectionSharedKeyInner> getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { """ The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provi...
java
public Observable<ConnectionSharedKeyInner> getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<ConnectionSharedKeyInner>, ConnectionSharedKeyIn...
[ "public", "Observable", "<", "ConnectionSharedKeyInner", ">", "getSharedKeyAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ")", "{", "return", "getSharedKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetwor...
The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The virtual network gateway connectio...
[ "The", "Get", "VirtualNetworkGatewayConnectionSharedKey", "operation", "retrieves", "information", "about", "the", "specified", "virtual", "network", "gateway", "connection", "shared", "key", "through", "Network", "resource", "provider", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L1050-L1057
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.regenerateKeyAsync
public Observable<StorageAccountListKeysResultInner> regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { """ Regenerates one of the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is ca...
java
public Observable<StorageAccountListKeysResultInner> regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysRe...
[ "public", "Observable", "<", "StorageAccountListKeysResultInner", ">", "regenerateKeyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",...
Regenerates one of the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and...
[ "Regenerates", "one", "of", "the", "access", "keys", "for", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L947-L954
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/MetricRegistryImpl.java
MetricRegistryImpl.getMeters
@Override public SortedMap<String, Meter> getMeters(MetricFilter filter) { """ Returns a map of all the meters in the registry and their names which match the given filter. @param filter the metric filter to match @return all the meters in the registry """ return getMetrics(Meter.class, filter)...
java
@Override public SortedMap<String, Meter> getMeters(MetricFilter filter) { return getMetrics(Meter.class, filter); }
[ "@", "Override", "public", "SortedMap", "<", "String", ",", "Meter", ">", "getMeters", "(", "MetricFilter", "filter", ")", "{", "return", "getMetrics", "(", "Meter", ".", "class", ",", "filter", ")", ";", "}" ]
Returns a map of all the meters in the registry and their names which match the given filter. @param filter the metric filter to match @return all the meters in the registry
[ "Returns", "a", "map", "of", "all", "the", "meters", "in", "the", "registry", "and", "their", "names", "which", "match", "the", "given", "filter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/MetricRegistryImpl.java#L405-L408
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java
ReflectionUtils.doWithFields
public static void doWithFields(Class<?> clazz, FieldCallback fc) throws IllegalArgumentException { """ Invoke the given callback on all fields in the target class, going up the class hierarchy to get all declared fields. @param clazz the target class to analyze @param fc the callback to invoke for each field ...
java
public static void doWithFields(Class<?> clazz, FieldCallback fc) throws IllegalArgumentException { doWithFields(clazz, fc, null); }
[ "public", "static", "void", "doWithFields", "(", "Class", "<", "?", ">", "clazz", ",", "FieldCallback", "fc", ")", "throws", "IllegalArgumentException", "{", "doWithFields", "(", "clazz", ",", "fc", ",", "null", ")", ";", "}" ]
Invoke the given callback on all fields in the target class, going up the class hierarchy to get all declared fields. @param clazz the target class to analyze @param fc the callback to invoke for each field
[ "Invoke", "the", "given", "callback", "on", "all", "fields", "in", "the", "target", "class", "going", "up", "the", "class", "hierarchy", "to", "get", "all", "declared", "fields", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java#L556-L558
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/HttpURLConnection.java
HttpURLConnection.setRequestProperty
public void setRequestProperty(String pKey, String pValue) { """ Sets the general request property. If a property with the key already exists, overwrite its value with the new value. <p/> <p> NOTE: HTTP requires all request properties which can legally have multiple instances with the same key to use a comma-...
java
public void setRequestProperty(String pKey, String pValue) { if (connected) { throw new IllegalAccessError("Already connected"); } String oldValue = requestProperties.getProperty(pKey); if (oldValue == null) { requestProperties.setProperty(pKey, pValue); ...
[ "public", "void", "setRequestProperty", "(", "String", "pKey", ",", "String", "pValue", ")", "{", "if", "(", "connected", ")", "{", "throw", "new", "IllegalAccessError", "(", "\"Already connected\"", ")", ";", "}", "String", "oldValue", "=", "requestProperties",...
Sets the general request property. If a property with the key already exists, overwrite its value with the new value. <p/> <p> NOTE: HTTP requires all request properties which can legally have multiple instances with the same key to use a comma-seperated list syntax which enables multiple properties to be appended into...
[ "Sets", "the", "general", "request", "property", ".", "If", "a", "property", "with", "the", "key", "already", "exists", "overwrite", "its", "value", "with", "the", "new", "value", ".", "<p", "/", ">", "<p", ">", "NOTE", ":", "HTTP", "requires", "all", ...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/HttpURLConnection.java#L132-L144
joniles/mpxj
src/main/java/net/sf/mpxj/Resource.java
Resource.setEnterpriseDate
public void setEnterpriseDate(int index, Date value) { """ Set an enterprise field value. @param index field index @param value field value """ set(selectField(ResourceFieldLists.ENTERPRISE_DATE, index), value); }
java
public void setEnterpriseDate(int index, Date value) { set(selectField(ResourceFieldLists.ENTERPRISE_DATE, index), value); }
[ "public", "void", "setEnterpriseDate", "(", "int", "index", ",", "Date", "value", ")", "{", "set", "(", "selectField", "(", "ResourceFieldLists", ".", "ENTERPRISE_DATE", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set an enterprise field value. @param index field index @param value field value
[ "Set", "an", "enterprise", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L2073-L2076
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java
FileTransferNegotiator.negotiateOutgoingTransfer
public StreamNegotiator negotiateOutgoingTransfer(final Jid userID, final String streamID, final String fileName, final long size, final String desc, int responseTimeout) throws XMPPErrorException, NotConnectedException, NoResponseException, NoAcceptableTransferMechanisms, InterruptedException {...
java
public StreamNegotiator negotiateOutgoingTransfer(final Jid userID, final String streamID, final String fileName, final long size, final String desc, int responseTimeout) throws XMPPErrorException, NotConnectedException, NoResponseException, NoAcceptableTransferMechanisms, InterruptedException {...
[ "public", "StreamNegotiator", "negotiateOutgoingTransfer", "(", "final", "Jid", "userID", ",", "final", "String", "streamID", ",", "final", "String", "fileName", ",", "final", "long", "size", ",", "final", "String", "desc", ",", "int", "responseTimeout", ")", "t...
Send a request to another user to send them a file. The other user has the option of, accepting, rejecting, or not responding to a received file transfer request. <p> If they accept, the stanza will contain the other user's chosen stream type to send the file across. The two choices this implementation provides to the ...
[ "Send", "a", "request", "to", "another", "user", "to", "send", "them", "a", "file", ".", "The", "other", "user", "has", "the", "option", "of", "accepting", "rejecting", "or", "not", "responding", "to", "a", "received", "file", "transfer", "request", ".", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java#L304-L339
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java
QueryExecutor.sqlToSortIds
protected static SqlParts sqlToSortIds(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { """ Return SQL to get ordered list of docIds. Method assumes `sortDocument` is valid. @param docIdSet The...
java
protected static SqlParts sqlToSortIds(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { String chosenIndex = chooseIndexForSort(sortDocument, indexes); if (chosenIndex == null) { ...
[ "protected", "static", "SqlParts", "sqlToSortIds", "(", "Set", "<", "String", ">", "docIdSet", ",", "List", "<", "FieldSort", ">", "sortDocument", ",", "List", "<", "Index", ">", "indexes", ")", "throws", "QueryException", "{", "String", "chosenIndex", "=", ...
Return SQL to get ordered list of docIds. Method assumes `sortDocument` is valid. @param docIdSet The original set of document IDs @param sortDocument Array of ordering definitions [ { "fieldName" : "asc" }, { "fieldName2", "desc" } ] @param indexes dictionary of indexes @return the SQL containing the order by clause
[ "Return", "SQL", "to", "get", "ordered", "list", "of", "docIds", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L340-L387
groupon/robo-remote
RoboRemoteServerCommon/src/main/com/groupon/roboremote/roboremoteservercommon/NanoHTTPD.java
NanoHTTPD.encodeUri
private String encodeUri( String uri ) { """ URL-encodes everything between "/"-characters. Encodes spaces as '%20' instead of '+'. """ String newUri = ""; StringTokenizer st = new StringTokenizer( uri, "/ ", true ); while ( st.hasMoreTokens()) { String tok = st.nex...
java
private String encodeUri( String uri ) { String newUri = ""; StringTokenizer st = new StringTokenizer( uri, "/ ", true ); while ( st.hasMoreTokens()) { String tok = st.nextToken(); if ( tok.equals( "/" )) newUri += "/"; else if ( to...
[ "private", "String", "encodeUri", "(", "String", "uri", ")", "{", "String", "newUri", "=", "\"\"", ";", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "uri", ",", "\"/ \"", ",", "true", ")", ";", "while", "(", "st", ".", "hasMoreTokens", "(...
URL-encodes everything between "/"-characters. Encodes spaces as '%20' instead of '+'.
[ "URL", "-", "encodes", "everything", "between", "/", "-", "characters", ".", "Encodes", "spaces", "as", "%20", "instead", "of", "+", "." ]
train
https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServerCommon/src/main/com/groupon/roboremote/roboremoteservercommon/NanoHTTPD.java#L803-L822
lightblueseas/email-tails
src/main/java/de/alpharogroup/email/messages/EmailWithAttachments.java
EmailWithAttachments.addAttachment
public void addAttachment(final DataHandler handler, final String filename) throws MessagingException { """ Adds the attachment. @param handler The DataHandler for the attachment. @param filename The new Filename for the attachment. @throws MessagingException is thrown if the underlying implementation ...
java
public void addAttachment(final DataHandler handler, final String filename) throws MessagingException { final BodyPart part = new MimeBodyPart(); part.setFileName(filename); part.setDataHandler(handler); addAttachment(part); }
[ "public", "void", "addAttachment", "(", "final", "DataHandler", "handler", ",", "final", "String", "filename", ")", "throws", "MessagingException", "{", "final", "BodyPart", "part", "=", "new", "MimeBodyPart", "(", ")", ";", "part", ".", "setFileName", "(", "f...
Adds the attachment. @param handler The DataHandler for the attachment. @param filename The new Filename for the attachment. @throws MessagingException is thrown if the underlying implementation does not support modification of existing values
[ "Adds", "the", "attachment", "." ]
train
https://github.com/lightblueseas/email-tails/blob/7be6fee3548e61e697cc8e64e90603cb1f505be2/src/main/java/de/alpharogroup/email/messages/EmailWithAttachments.java#L117-L124
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java
IdentityPatchContext.recordRollbackLoader
private void recordRollbackLoader(final String patchId, PatchableTarget.TargetInfo target) { """ Add a rollback loader for a give patch. @param patchId the patch id. @param target the patchable target @throws XMLStreamException @throws IOException """ // setup the content loader paths fi...
java
private void recordRollbackLoader(final String patchId, PatchableTarget.TargetInfo target) { // setup the content loader paths final DirectoryStructure structure = target.getDirectoryStructure(); final InstalledImage image = structure.getInstalledImage(); final File historyDir = image.ge...
[ "private", "void", "recordRollbackLoader", "(", "final", "String", "patchId", ",", "PatchableTarget", ".", "TargetInfo", "target", ")", "{", "// setup the content loader paths", "final", "DirectoryStructure", "structure", "=", "target", ".", "getDirectoryStructure", "(", ...
Add a rollback loader for a give patch. @param patchId the patch id. @param target the patchable target @throws XMLStreamException @throws IOException
[ "Add", "a", "rollback", "loader", "for", "a", "give", "patch", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L514-L525
morfologik/morfologik-stemming
morfologik-speller/src/main/java/morfologik/speller/Speller.java
Speller.matchAnyToOne
private int matchAnyToOne(final int wordIndex, final int candIndex) { """ Match the last letter of the candidate against two or more letters of the word. """ if (replacementsAnyToOne.containsKey(candidate[candIndex])) { for (final char[] rep : replacementsAnyToOne.get(candidate[candIndex])) { ...
java
private int matchAnyToOne(final int wordIndex, final int candIndex) { if (replacementsAnyToOne.containsKey(candidate[candIndex])) { for (final char[] rep : replacementsAnyToOne.get(candidate[candIndex])) { int i = 0; while (i < rep.length && (wordIndex + i) < wordLen && rep[i] == wordProce...
[ "private", "int", "matchAnyToOne", "(", "final", "int", "wordIndex", ",", "final", "int", "candIndex", ")", "{", "if", "(", "replacementsAnyToOne", ".", "containsKey", "(", "candidate", "[", "candIndex", "]", ")", ")", "{", "for", "(", "final", "char", "["...
Match the last letter of the candidate against two or more letters of the word.
[ "Match", "the", "last", "letter", "of", "the", "candidate", "against", "two", "or", "more", "letters", "of", "the", "word", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-speller/src/main/java/morfologik/speller/Speller.java#L643-L656