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
threerings/nenya
tools/src/main/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java
TileSetBundler.createBundle
public boolean createBundle ( File target, TileSetBundle bundle, ImageProvider improv, String imageBase, long newestMod) throws IOException { """ Finish the creation of a tileset bundle jar file. @param target the tileset bundle file that will be created. @param bundle contains the tilesets we'...
java
public boolean createBundle ( File target, TileSetBundle bundle, ImageProvider improv, String imageBase, long newestMod) throws IOException { return createBundleJar(target, bundle, improv, imageBase, _keepRawPngs, _uncompressed); }
[ "public", "boolean", "createBundle", "(", "File", "target", ",", "TileSetBundle", "bundle", ",", "ImageProvider", "improv", ",", "String", "imageBase", ",", "long", "newestMod", ")", "throws", "IOException", "{", "return", "createBundleJar", "(", "target", ",", ...
Finish the creation of a tileset bundle jar file. @param target the tileset bundle file that will be created. @param bundle contains the tilesets we'd like to save out to the bundle. @param improv the image provider. @param imageBase the base directory for getting images for non @param newestMod the most recent modifi...
[ "Finish", "the", "creation", "of", "a", "tileset", "bundle", "jar", "file", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java#L349-L354
derari/cthul
strings/src/main/java/org/cthul/strings/JavaNames.java
JavaNames.UNDER_SCORE
public static StringBuilder UNDER_SCORE(final StringBuilder sb, final String... tokens) { """ Appends {@code tokens} to {@code target}, all upper case, separated by under_scores. @param tokens @param sb """ return Strings.join(sb, "_", allToUpper(tokens)); }
java
public static StringBuilder UNDER_SCORE(final StringBuilder sb, final String... tokens) { return Strings.join(sb, "_", allToUpper(tokens)); }
[ "public", "static", "StringBuilder", "UNDER_SCORE", "(", "final", "StringBuilder", "sb", ",", "final", "String", "...", "tokens", ")", "{", "return", "Strings", ".", "join", "(", "sb", ",", "\"_\"", ",", "allToUpper", "(", "tokens", ")", ")", ";", "}" ]
Appends {@code tokens} to {@code target}, all upper case, separated by under_scores. @param tokens @param sb
[ "Appends", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/strings/src/main/java/org/cthul/strings/JavaNames.java#L168-L170
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/CommonUtils.java
CommonUtils.dateReservedMonth
public static Date dateReservedMonth(int year, int month, boolean is000) { """ 将指定年月的日期的日,时,分,秒,毫秒调整为最小值或者最大值 @param year 指定年份 @param month 指定月份 @param is000 为true表示置为最小值,反之最大值 @return 被转化后的日期 @see #dateReservedMonth000(Date) @see #dateReservedMonth000(Calendar) @see #dateReservedMonth999(Date) @see #da...
java
public static Date dateReservedMonth(int year, int month, boolean is000) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); if (month <= 1) { calendar.set(Calendar.MONTH, Calendar.JANUARY); } else if (month >= 12) { calendar.set(Calen...
[ "public", "static", "Date", "dateReservedMonth", "(", "int", "year", ",", "int", "month", ",", "boolean", "is000", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "set", "(", "Calendar", ".", "YEAR", ...
将指定年月的日期的日,时,分,秒,毫秒调整为最小值或者最大值 @param year 指定年份 @param month 指定月份 @param is000 为true表示置为最小值,反之最大值 @return 被转化后的日期 @see #dateReservedMonth000(Date) @see #dateReservedMonth000(Calendar) @see #dateReservedMonth999(Date) @see #dateReservedMonth999(Calendar)
[ "将指定年月的日期的日", "时", "分", "秒", "毫秒调整为最小值或者最大值" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/CommonUtils.java#L450-L461
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java
MicroserviceRestAdapter.notifyServiceSummaryUpdate
protected void notifyServiceSummaryUpdate(ServiceSummary serviceSummary) throws ActivityException { """ Standard behavior is to publish event fitting standard pattern of default event used in DependenciesWaitActivity (Microservice Dependencies Wait) """ WorkflowServices wfs = ServiceLocator.getWorkflo...
java
protected void notifyServiceSummaryUpdate(ServiceSummary serviceSummary) throws ActivityException { WorkflowServices wfs = ServiceLocator.getWorkflowServices(); try { wfs.notify("service-summary-update-" + getMasterRequestId(), null, 2); } catch (ServiceException e) { thr...
[ "protected", "void", "notifyServiceSummaryUpdate", "(", "ServiceSummary", "serviceSummary", ")", "throws", "ActivityException", "{", "WorkflowServices", "wfs", "=", "ServiceLocator", ".", "getWorkflowServices", "(", ")", ";", "try", "{", "wfs", ".", "notify", "(", "...
Standard behavior is to publish event fitting standard pattern of default event used in DependenciesWaitActivity (Microservice Dependencies Wait)
[ "Standard", "behavior", "is", "to", "publish", "event", "fitting", "standard", "pattern", "of", "default", "event", "used", "in", "DependenciesWaitActivity", "(", "Microservice", "Dependencies", "Wait", ")" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java#L144-L151
blackdoor/blackdoor
src/main/java/black/door/json/Derulo.java
Derulo.toJSON
public static String toJSON(int indent, Object object) { """ Serializes object as a JSON string. Map objects are serialized as JSON objects, List objects are serialized as JSON arrays. Numbers, Booleans, and null are all serialized to their respective JSON types. Other classes will be serialised using object.toJ...
java
public static String toJSON(int indent, Object object) { return toJSON(indent, 1, object, true).toString(); }
[ "public", "static", "String", "toJSON", "(", "int", "indent", ",", "Object", "object", ")", "{", "return", "toJSON", "(", "indent", ",", "1", ",", "object", ",", "true", ")", ".", "toString", "(", ")", ";", "}" ]
Serializes object as a JSON string. Map objects are serialized as JSON objects, List objects are serialized as JSON arrays. Numbers, Booleans, and null are all serialized to their respective JSON types. Other classes will be serialised using object.toJSONString if they have it, otherwise they will be serialized using S...
[ "Serializes", "object", "as", "a", "JSON", "string", ".", "Map", "objects", "are", "serialized", "as", "JSON", "objects", "List", "objects", "are", "serialized", "as", "JSON", "arrays", ".", "Numbers", "Booleans", "and", "null", "are", "all", "serialized", "...
train
https://github.com/blackdoor/blackdoor/blob/060c7a71dfafb85e10e8717736e6d3160262e96b/src/main/java/black/door/json/Derulo.java#L185-L187
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/client/ProviderInfo.java
ProviderInfo.setDynamicAttr
public ProviderInfo setDynamicAttr(String dynamicAttrKey, Object dynamicAttrValue) { """ Sets dynamic attribute. @param dynamicAttrKey the dynamic attribute key @param dynamicAttrValue the dynamic attribute value @return the dynamic attribute """ if (dynamicAttrValue == null) { dynam...
java
public ProviderInfo setDynamicAttr(String dynamicAttrKey, Object dynamicAttrValue) { if (dynamicAttrValue == null) { dynamicAttrs.remove(dynamicAttrKey); } else { dynamicAttrs.put(dynamicAttrKey, dynamicAttrValue); } return this; }
[ "public", "ProviderInfo", "setDynamicAttr", "(", "String", "dynamicAttrKey", ",", "Object", "dynamicAttrValue", ")", "{", "if", "(", "dynamicAttrValue", "==", "null", ")", "{", "dynamicAttrs", ".", "remove", "(", "dynamicAttrKey", ")", ";", "}", "else", "{", "...
Sets dynamic attribute. @param dynamicAttrKey the dynamic attribute key @param dynamicAttrValue the dynamic attribute value @return the dynamic attribute
[ "Sets", "dynamic", "attribute", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/client/ProviderInfo.java#L482-L489
logic-ng/LogicNG
src/main/java/org/logicng/formulas/printer/FormulaStringRepresentation.java
FormulaStringRepresentation.naryOperator
protected String naryOperator(final NAryOperator operator, final String opString) { """ Returns the string representation of an n-ary operator. @param operator the n-ary operator @param opString the operator string @return the string representation """ final StringBuilder sb = new StringBuilder();...
java
protected String naryOperator(final NAryOperator operator, final String opString) { final StringBuilder sb = new StringBuilder(); int count = 0; final int size = operator.numberOfOperands(); Formula last = null; for (final Formula op : operator) { if (++count == size)...
[ "protected", "String", "naryOperator", "(", "final", "NAryOperator", "operator", ",", "final", "String", "opString", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "int", "count", "=", "0", ";", "final", "int", "size", ...
Returns the string representation of an n-ary operator. @param operator the n-ary operator @param opString the operator string @return the string representation
[ "Returns", "the", "string", "representation", "of", "an", "n", "-", "ary", "operator", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/printer/FormulaStringRepresentation.java#L113-L130
belaban/JGroups
src/org/jgroups/util/Headers.java
Headers.getHeader
public static <T extends Header> T getHeader(final Header[] hdrs, short id) { """ Returns the header associated with an ID @param id The ID @return """ if(hdrs == null) return null; for(Header hdr: hdrs) { if(hdr == null) return null; if(hdr...
java
public static <T extends Header> T getHeader(final Header[] hdrs, short id) { if(hdrs == null) return null; for(Header hdr: hdrs) { if(hdr == null) return null; if(hdr.getProtId() == id) return (T)hdr; } return null; ...
[ "public", "static", "<", "T", "extends", "Header", ">", "T", "getHeader", "(", "final", "Header", "[", "]", "hdrs", ",", "short", "id", ")", "{", "if", "(", "hdrs", "==", "null", ")", "return", "null", ";", "for", "(", "Header", "hdr", ":", "hdrs",...
Returns the header associated with an ID @param id The ID @return
[ "Returns", "the", "header", "associated", "with", "an", "ID" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/Headers.java#L39-L49
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java
ShapeAppearanceModel.setBottomLeftCorner
public void setBottomLeftCorner(@CornerFamily int cornerFamily, @Dimension int cornerSize) { """ Sets the corner treatment for the bottom-left corner. @param cornerFamily the family to use to create the corner treatment @param cornerSize the size to use to create the corner treatment """ setBotto...
java
public void setBottomLeftCorner(@CornerFamily int cornerFamily, @Dimension int cornerSize) { setBottomLeftCorner(MaterialShapeUtils.createCornerTreatment(cornerFamily, cornerSize)); }
[ "public", "void", "setBottomLeftCorner", "(", "@", "CornerFamily", "int", "cornerFamily", ",", "@", "Dimension", "int", "cornerSize", ")", "{", "setBottomLeftCorner", "(", "MaterialShapeUtils", ".", "createCornerTreatment", "(", "cornerFamily", ",", "cornerSize", ")",...
Sets the corner treatment for the bottom-left corner. @param cornerFamily the family to use to create the corner treatment @param cornerSize the size to use to create the corner treatment
[ "Sets", "the", "corner", "treatment", "for", "the", "bottom", "-", "left", "corner", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L316-L318
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java
WhiteboxImpl.setInternalState
public static void setInternalState(Object object, String fieldName, Object[] value) { """ Set the value of a field using reflection. This method will traverse the super class hierarchy until a field with name <tt>fieldName</tt> is found. @param object the object to modify @param fieldName the name of the...
java
public static void setInternalState(Object object, String fieldName, Object[] value) { setInternalState(object, fieldName, (Object) value); }
[ "public", "static", "void", "setInternalState", "(", "Object", "object", ",", "String", "fieldName", ",", "Object", "[", "]", "value", ")", "{", "setInternalState", "(", "object", ",", "fieldName", ",", "(", "Object", ")", "value", ")", ";", "}" ]
Set the value of a field using reflection. This method will traverse the super class hierarchy until a field with name <tt>fieldName</tt> is found. @param object the object to modify @param fieldName the name of the field @param value the new value of the field
[ "Set", "the", "value", "of", "a", "field", "using", "reflection", ".", "This", "method", "will", "traverse", "the", "super", "class", "hierarchy", "until", "a", "field", "with", "name", "<tt", ">", "fieldName<", "/", "tt", ">", "is", "found", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java#L316-L318
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/queue/AsynchConsumerQueue.java
AsynchConsumerQueue.appendToLastMessage
public void appendToLastMessage(CommsByteBuffer msgBuffer, boolean lastChunk) { """ This method is called when a middle or final chunk of a message has been received by the proxy queue. In this case we should append the chunk to those already collected and if this is the last chunk we perform the processing that...
java
public void appendToLastMessage(CommsByteBuffer msgBuffer, boolean lastChunk) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "appendToLastMessage", new Object[]{msgBuffer, lastChunk}); synchronized (this) { ...
[ "public", "void", "appendToLastMessage", "(", "CommsByteBuffer", "msgBuffer", ",", "boolean", "lastChunk", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "("...
This method is called when a middle or final chunk of a message has been received by the proxy queue. In this case we should append the chunk to those already collected and if this is the last chunk we perform the processing that would normally be done when a full message is received. @see com.ibm.ws.sib.comms.client....
[ "This", "method", "is", "called", "when", "a", "middle", "or", "final", "chunk", "of", "a", "message", "has", "been", "received", "by", "the", "proxy", "queue", ".", "In", "this", "case", "we", "should", "append", "the", "chunk", "to", "those", "already"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/queue/AsynchConsumerQueue.java#L139-L161
alkacon/opencms-core
src/org/opencms/ui/CmsUserIconHelper.java
CmsUserIconHelper.getSmallIconPath
public String getSmallIconPath(CmsObject cms, CmsUser user) { """ Returns the small ident-icon path for the given user.<p> @param cms the cms context @param user the user @return the icon path """ return getIconPath(cms, user, IconSize.Small); }
java
public String getSmallIconPath(CmsObject cms, CmsUser user) { return getIconPath(cms, user, IconSize.Small); }
[ "public", "String", "getSmallIconPath", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "return", "getIconPath", "(", "cms", ",", "user", ",", "IconSize", ".", "Small", ")", ";", "}" ]
Returns the small ident-icon path for the given user.<p> @param cms the cms context @param user the user @return the icon path
[ "Returns", "the", "small", "ident", "-", "icon", "path", "for", "the", "given", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/CmsUserIconHelper.java#L231-L234
google/error-prone
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
ASTHelpers.unaryNumericPromotion
@Nullable private static Type unaryNumericPromotion(Type type, VisitorState state) { """ Implementation of unary numeric promotion rules. <p><a href="https://docs.oracle.com/javase/specs/jls/se9/html/jls-5.html#jls-5.6.1">JLS §5.6.1</a> """ Type unboxed = unboxAndEnsureNumeric(type, state); switc...
java
@Nullable private static Type unaryNumericPromotion(Type type, VisitorState state) { Type unboxed = unboxAndEnsureNumeric(type, state); switch (unboxed.getTag()) { case BYTE: case SHORT: case CHAR: return state.getSymtab().intType; case INT: case LONG: case FLOAT: ...
[ "@", "Nullable", "private", "static", "Type", "unaryNumericPromotion", "(", "Type", "type", ",", "VisitorState", "state", ")", "{", "Type", "unboxed", "=", "unboxAndEnsureNumeric", "(", "type", ",", "state", ")", ";", "switch", "(", "unboxed", ".", "getTag", ...
Implementation of unary numeric promotion rules. <p><a href="https://docs.oracle.com/javase/specs/jls/se9/html/jls-5.html#jls-5.6.1">JLS §5.6.1</a>
[ "Implementation", "of", "unary", "numeric", "promotion", "rules", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L1248-L1264
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonWriter.java
JsonWriter.property
protected JsonWriter property(String key, Object[] array) throws IOException { """ Writes an array with the given key name @param key the key name for the array @param array the array to be written @return This structured writer @throws IOException Something went wrong writing """ return property...
java
protected JsonWriter property(String key, Object[] array) throws IOException { return property(key, Arrays.asList(array)); }
[ "protected", "JsonWriter", "property", "(", "String", "key", ",", "Object", "[", "]", "array", ")", "throws", "IOException", "{", "return", "property", "(", "key", ",", "Arrays", ".", "asList", "(", "array", ")", ")", ";", "}" ]
Writes an array with the given key name @param key the key name for the array @param array the array to be written @return This structured writer @throws IOException Something went wrong writing
[ "Writes", "an", "array", "with", "the", "given", "key", "name" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonWriter.java#L250-L252
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.sse
public Javalin sse(@NotNull String path, @NotNull Consumer<SseClient> client) { """ Adds a lambda handler for a Server Sent Event connection on the specified path. """ return sse(path, client, new HashSet<>()); }
java
public Javalin sse(@NotNull String path, @NotNull Consumer<SseClient> client) { return sse(path, client, new HashSet<>()); }
[ "public", "Javalin", "sse", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "SseClient", ">", "client", ")", "{", "return", "sse", "(", "path", ",", "client", ",", "new", "HashSet", "<>", "(", ")", ")", ";", "}" ]
Adds a lambda handler for a Server Sent Event connection on the specified path.
[ "Adds", "a", "lambda", "handler", "for", "a", "Server", "Sent", "Event", "connection", "on", "the", "specified", "path", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L435-L437
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_group_groupId_GET
public OvhInstanceGroup project_serviceName_instance_group_groupId_GET(String serviceName, String groupId, String region) throws IOException { """ Get all groups REST: GET /cloud/project/{serviceName}/instance/group/{groupId} @param groupId [required] Instance group id @param region [required] Instance region...
java
public OvhInstanceGroup project_serviceName_instance_group_groupId_GET(String serviceName, String groupId, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group/{groupId}"; StringBuilder sb = path(qPath, serviceName, groupId); query(sb, "region", region); String resp = ...
[ "public", "OvhInstanceGroup", "project_serviceName_instance_group_groupId_GET", "(", "String", "serviceName", ",", "String", "groupId", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/group/{groupId}\"...
Get all groups REST: GET /cloud/project/{serviceName}/instance/group/{groupId} @param groupId [required] Instance group id @param region [required] Instance region @param serviceName [required] Project id
[ "Get", "all", "groups" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2166-L2172
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java
CryptoHelper.verifySignatureFor
@Deprecated boolean verifySignatureFor(String algorithm, byte[] secretBytes, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException { """ Verify signature. @param algorithm algorithm name. @param secretBytes algorithm secret. @param contentBytes the content to whi...
java
@Deprecated boolean verifySignatureFor(String algorithm, byte[] secretBytes, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException { return MessageDigest.isEqual(createSignatureFor(algorithm, secretBytes, contentBytes), signatureBytes); }
[ "@", "Deprecated", "boolean", "verifySignatureFor", "(", "String", "algorithm", ",", "byte", "[", "]", "secretBytes", ",", "byte", "[", "]", "contentBytes", ",", "byte", "[", "]", "signatureBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyExcepti...
Verify signature. @param algorithm algorithm name. @param secretBytes algorithm secret. @param contentBytes the content to which the signature applies. @param signatureBytes JWT signature. @return true if signature is valid. @throws NoSuchAlgorithmException if the algorithm is not supported. @throws InvalidKeyExceptio...
[ "Verify", "signature", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java#L141-L144
roboconf/roboconf-platform
core/roboconf-dm-templating/src/main/java/net/roboconf/dm/templating/internal/templates/TemplateUtils.java
TemplateUtils.deleteGeneratedFiles
public static void deleteGeneratedFiles( Application app, File outputDirectory ) { """ Deletes the generated files for a given application. @param app an application (not null) @param outputDirectory the output directory (not null) """ File target = new File( outputDirectory, app.getName()); Utils.delet...
java
public static void deleteGeneratedFiles( Application app, File outputDirectory ) { File target = new File( outputDirectory, app.getName()); Utils.deleteFilesRecursivelyAndQuietly( target ); }
[ "public", "static", "void", "deleteGeneratedFiles", "(", "Application", "app", ",", "File", "outputDirectory", ")", "{", "File", "target", "=", "new", "File", "(", "outputDirectory", ",", "app", ".", "getName", "(", ")", ")", ";", "Utils", ".", "deleteFilesR...
Deletes the generated files for a given application. @param app an application (not null) @param outputDirectory the output directory (not null)
[ "Deletes", "the", "generated", "files", "for", "a", "given", "application", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-templating/src/main/java/net/roboconf/dm/templating/internal/templates/TemplateUtils.java#L150-L154
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/ParameterizedTypeImpl.java
ParameterizedTypeImpl.appendAllTo
private static StringBuilder appendAllTo(final StringBuilder buf, final String sep, final Type... types) { """ 追加 {@code types} 到 @{code buf},使用 {@code sep} 分隔 @param buf 目标 @param sep 分隔符 @param types 加入的类型 @return {@code buf} """ if (ArrayUtil.isNotEmpty(types)) { boolean isFirst = true; for...
java
private static StringBuilder appendAllTo(final StringBuilder buf, final String sep, final Type... types) { if (ArrayUtil.isNotEmpty(types)) { boolean isFirst = true; for (Type type : types) { if (isFirst) { isFirst = false; } else { buf.append(sep); } String typeStr; ...
[ "private", "static", "StringBuilder", "appendAllTo", "(", "final", "StringBuilder", "buf", ",", "final", "String", "sep", ",", "final", "Type", "...", "types", ")", "{", "if", "(", "ArrayUtil", ".", "isNotEmpty", "(", "types", ")", ")", "{", "boolean", "is...
追加 {@code types} 到 @{code buf},使用 {@code sep} 分隔 @param buf 目标 @param sep 分隔符 @param types 加入的类型 @return {@code buf}
[ "追加", "{", "@code", "types", "}", "到", "@", "{", "code", "buf", "}", ",使用", "{", "@code", "sep", "}", "分隔" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/ParameterizedTypeImpl.java#L79-L100
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java
MaterializeKNNPreprocessor.fireKNNsInserted
protected void fireKNNsInserted(DBIDs insertions, DBIDs updates) { """ Informs all registered KNNListener that new kNNs have been inserted and as a result some kNNs have been changed. @param insertions the ids of the newly inserted kNNs @param updates the ids of kNNs which have been changed due to the insert...
java
protected void fireKNNsInserted(DBIDs insertions, DBIDs updates) { KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.INSERT, insertions, updates); Object[] listeners = listenerList.getListenerList(); for(int i = listeners.length - 2; i >= 0; i -= 2) { if(listeners[i] == KNNListener.class...
[ "protected", "void", "fireKNNsInserted", "(", "DBIDs", "insertions", ",", "DBIDs", "updates", ")", "{", "KNNChangeEvent", "e", "=", "new", "KNNChangeEvent", "(", "this", ",", "KNNChangeEvent", ".", "Type", ".", "INSERT", ",", "insertions", ",", "updates", ")",...
Informs all registered KNNListener that new kNNs have been inserted and as a result some kNNs have been changed. @param insertions the ids of the newly inserted kNNs @param updates the ids of kNNs which have been changed due to the insertions @see KNNListener
[ "Informs", "all", "registered", "KNNListener", "that", "new", "kNNs", "have", "been", "inserted", "and", "as", "a", "result", "some", "kNNs", "have", "been", "changed", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/MaterializeKNNPreprocessor.java#L309-L317
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/RGroupQuery.java
RGroupQuery.getAtomPosition
private int getAtomPosition(IAtom atom, IAtomContainer container) { """ Helper method, used to help construct a configuration. @param atom @param container @return the array position of atom in container """ for (int i = 0; i < container.getAtomCount(); i++) { if (atom.equals(container.g...
java
private int getAtomPosition(IAtom atom, IAtomContainer container) { for (int i = 0; i < container.getAtomCount(); i++) { if (atom.equals(container.getAtom(i))) { return i; } } return -1; }
[ "private", "int", "getAtomPosition", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "container", ".", "getAtomCount", "(", ")", ";", "i", "++", ")", "{", "if", "(", "atom", ".", ...
Helper method, used to help construct a configuration. @param atom @param container @return the array position of atom in container
[ "Helper", "method", "used", "to", "help", "construct", "a", "configuration", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/RGroupQuery.java#L494-L501
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/UsersInner.java
UsersInner.listAsync
public Observable<Page<UserInner>> listAsync(final String resourceGroupName, final String labAccountName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { """ List users in a given lab. @param resourceGroupName The name of the resource group. @param lab...
java
public Observable<Page<UserInner>> listAsync(final String resourceGroupName, final String labAccountName, final String labName, final String expand, final String filter, final Integer top, final String orderby) { return listWithServiceResponseAsync(resourceGroupName, labAccountName, labName, expand, filter, top...
[ "public", "Observable", "<", "Page", "<", "UserInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "labAccountName", ",", "final", "String", "labName", ",", "final", "String", "expand", ",", "final", "String", "f...
List users in a given lab. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param expand Specify the $expand query. Example: 'properties($select=email)' @param filter The filter to apply to the operation. @param top The max...
[ "List", "users", "in", "a", "given", "lab", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/UsersInner.java#L288-L296
gwtplus/google-gin
src/main/java/com/google/gwt/inject/client/multibindings/GinMultibinder.java
GinMultibinder.newSetBinder
public static <T> GinMultibinder<T> newSetBinder(GinBinder binder, TypeLiteral<T> type) { """ Returns a new multibinder that collects instances of {@code type} in a {@link java.util.Set} that is itself bound with no binding annotation. """ return newSetBinder(binder, type, Key.get(providerOf(type))); }
java
public static <T> GinMultibinder<T> newSetBinder(GinBinder binder, TypeLiteral<T> type) { return newSetBinder(binder, type, Key.get(providerOf(type))); }
[ "public", "static", "<", "T", ">", "GinMultibinder", "<", "T", ">", "newSetBinder", "(", "GinBinder", "binder", ",", "TypeLiteral", "<", "T", ">", "type", ")", "{", "return", "newSetBinder", "(", "binder", ",", "type", ",", "Key", ".", "get", "(", "pro...
Returns a new multibinder that collects instances of {@code type} in a {@link java.util.Set} that is itself bound with no binding annotation.
[ "Returns", "a", "new", "multibinder", "that", "collects", "instances", "of", "{" ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/client/multibindings/GinMultibinder.java#L57-L59
groupby/api-java
src/main/java/com/groupbyinc/api/AbstractBridge.java
AbstractBridge.generateSecuredPayload
public static AesContent generateSecuredPayload(String customerId, String clientKey, String requestJson) throws GeneralSecurityException { """ <code> Generates a secured payload </code> @param customerId The customerId as seen in Command Center. Ensure this is not the subdomain, which can be `customerId-cors.gr...
java
public static AesContent generateSecuredPayload(String customerId, String clientKey, String requestJson) throws GeneralSecurityException { AesEncryption encryption = new AesEncryption(clientKey, customerId); return encryption.encrypt(requestJson); }
[ "public", "static", "AesContent", "generateSecuredPayload", "(", "String", "customerId", ",", "String", "clientKey", ",", "String", "requestJson", ")", "throws", "GeneralSecurityException", "{", "AesEncryption", "encryption", "=", "new", "AesEncryption", "(", "clientKey...
<code> Generates a secured payload </code> @param customerId The customerId as seen in Command Center. Ensure this is not the subdomain, which can be `customerId-cors.groupbycloud.com` @param clientKey The customerId as seen in Command Center @param requestJson The query to encrypt
[ "<code", ">", "Generates", "a", "secured", "payload", "<", "/", "code", ">" ]
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/api/AbstractBridge.java#L540-L543
beanshell/beanshell
src/main/java/bsh/engine/BshScriptEngine.java
BshScriptEngine.evalSource
private Object evalSource(Object source, ScriptContext scriptContext) throws ScriptException { """ /* This is the primary implementation method. We respect the String/Reader difference here in BeanShell because BeanShell will do a few extra things in the string case... e.g. tack on a trailing ";" semicolon if ...
java
private Object evalSource(Object source, ScriptContext scriptContext) throws ScriptException { try { Interpreter bsh = getInterpreter(); NameSpace contextNameSpace = getEngineNameSpace(scriptContext); bsh.setNameSpace(contextNameSpace); bsh.setOut(toPrintStream(s...
[ "private", "Object", "evalSource", "(", "Object", "source", ",", "ScriptContext", "scriptContext", ")", "throws", "ScriptException", "{", "try", "{", "Interpreter", "bsh", "=", "getInterpreter", "(", ")", ";", "NameSpace", "contextNameSpace", "=", "getEngineNameSpac...
/* This is the primary implementation method. We respect the String/Reader difference here in BeanShell because BeanShell will do a few extra things in the string case... e.g. tack on a trailing ";" semicolon if necessary.
[ "/", "*", "This", "is", "the", "primary", "implementation", "method", ".", "We", "respect", "the", "String", "/", "Reader", "difference", "here", "in", "BeanShell", "because", "BeanShell", "will", "do", "a", "few", "extra", "things", "in", "the", "string", ...
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/engine/BshScriptEngine.java#L90-L119
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/SipStandardService.java
SipStandardService.findSipConnector
private SipProtocolHandler findSipConnector(String ipAddress, int port, String transport) { """ Find a sip Connector by it's ip address, port and transport @param ipAddress ip address of the connector to find @param port port of the connector to find @param transport transport of the connector to find @retur...
java
private SipProtocolHandler findSipConnector(String ipAddress, int port, String transport) { SipConnector connectorToRemove = null; for (SipProtocolHandler protocolHandler : connectors) { if (protocolHandler.getIpAddress().equals(ipAddress) && protocolHandler.getPort() == port ...
[ "private", "SipProtocolHandler", "findSipConnector", "(", "String", "ipAddress", ",", "int", "port", ",", "String", "transport", ")", "{", "SipConnector", "connectorToRemove", "=", "null", ";", "for", "(", "SipProtocolHandler", "protocolHandler", ":", "connectors", ...
Find a sip Connector by it's ip address, port and transport @param ipAddress ip address of the connector to find @param port port of the connector to find @param transport transport of the connector to find @return the found sip connector or null if noting found
[ "Find", "a", "sip", "Connector", "by", "it", "s", "ip", "address", "port", "and", "transport" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/SipStandardService.java#L735-L745
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/linear/kernelized/KernelSGD.java
KernelSGD.setErrorTolerance
public void setErrorTolerance(double errorTolerance) { """ Sets the error tolerance used for certain {@link #setBudgetStrategy(jsat.distributions.kernels.KernelPoint.BudgetStrategy) budget strategies} @param errorTolerance the error tolerance in [0, 1] """ if(errorTolerance < 0 || errorTolerance > 1 ...
java
public void setErrorTolerance(double errorTolerance) { if(errorTolerance < 0 || errorTolerance > 1 || Double.isNaN(errorTolerance)) throw new IllegalArgumentException("Error tolerance must be in [0, 1], not " + errorTolerance); this.errorTolerance = errorTolerance; }
[ "public", "void", "setErrorTolerance", "(", "double", "errorTolerance", ")", "{", "if", "(", "errorTolerance", "<", "0", "||", "errorTolerance", ">", "1", "||", "Double", ".", "isNaN", "(", "errorTolerance", ")", ")", "throw", "new", "IllegalArgumentException", ...
Sets the error tolerance used for certain {@link #setBudgetStrategy(jsat.distributions.kernels.KernelPoint.BudgetStrategy) budget strategies} @param errorTolerance the error tolerance in [0, 1]
[ "Sets", "the", "error", "tolerance", "used", "for", "certain", "{" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/kernelized/KernelSGD.java#L198-L203
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeMBeanQuery
public void writeMBeanQuery(OutputStream out, MBeanQuery value) throws IOException { """ Encode an MBeanQuery instance as JSON: { "objectName" : ObjectName, "queryExp" : Base64, "className" : String, } @param out The stream to write JSON to @param value The MBeanQuery instance to encode. Can't be null. @...
java
public void writeMBeanQuery(OutputStream out, MBeanQuery value) throws IOException { writeStartObject(out); writeObjectNameField(out, OM_OBJECTNAME, value.objectName); // TODO: Produce proper JSON for QueryExp? writeSerializedField(out, OM_QUERYEXP, value.queryExp); writeStringFi...
[ "public", "void", "writeMBeanQuery", "(", "OutputStream", "out", ",", "MBeanQuery", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writeObjectNameField", "(", "out", ",", "OM_OBJECTNAME", ",", "value", ".", "objectName", "...
Encode an MBeanQuery instance as JSON: { "objectName" : ObjectName, "queryExp" : Base64, "className" : String, } @param out The stream to write JSON to @param value The MBeanQuery instance to encode. Can't be null. @throws IOException If an I/O error occurs @see #readMBeanQuery(InputStream)
[ "Encode", "an", "MBeanQuery", "instance", "as", "JSON", ":", "{", "objectName", ":", "ObjectName", "queryExp", ":", "Base64", "className", ":", "String", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1094-L1101
Harium/keel
src/main/java/com/harium/keel/core/helper/ColorHelper.java
ColorHelper.fromHSL
public static int fromHSL(float h, float s, float l, int a) { """ Method to transform from HSL to ARGB <p> Source from: https://www.programmingalgorithms.com/algorithm/hsl-to-rgb?lang=C%2B%2B @param h - hue @param s - saturation @param l - lightness @param a - alpha @return rgb """ int r, g, b...
java
public static int fromHSL(float h, float s, float l, int a) { int r, g, b; if (s == 0) { r = g = b = (int) (l * MAX); } else { float v1, v2; float hue = h / 360f; v2 = (l < 0.5) ? (l * (1 + s)) : ((l + s) - (l * s)); v1 = 2 * l - v2; ...
[ "public", "static", "int", "fromHSL", "(", "float", "h", ",", "float", "s", ",", "float", "l", ",", "int", "a", ")", "{", "int", "r", ",", "g", ",", "b", ";", "if", "(", "s", "==", "0", ")", "{", "r", "=", "g", "=", "b", "=", "(", "int", ...
Method to transform from HSL to ARGB <p> Source from: https://www.programmingalgorithms.com/algorithm/hsl-to-rgb?lang=C%2B%2B @param h - hue @param s - saturation @param l - lightness @param a - alpha @return rgb
[ "Method", "to", "transform", "from", "HSL", "to", "ARGB", "<p", ">", "Source", "from", ":", "https", ":", "//", "www", ".", "programmingalgorithms", ".", "com", "/", "algorithm", "/", "hsl", "-", "to", "-", "rgb?lang", "=", "C%2B%2B" ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/core/helper/ColorHelper.java#L467-L485
mlhartme/mork
src/main/java/net/oneandone/mork/semantics/Ag.java
Ag.getAttributes
public void getAttributes(int symbol, Set<Attribute> internal, Set<Attribute> synthesized, Set<Attribute> inherited) { """ Besides the classic synthesized and inherited attributes, I have internal attributes. Internal attributes are computed when creating the node, a better name might be 'initial'. """ ...
java
public void getAttributes(int symbol, Set<Attribute> internal, Set<Attribute> synthesized, Set<Attribute> inherited) { int i; int max; Attribute a; for (AttributionBuffer ab : attributions) { a = ab.result.attr; if (a.symbol == symbol) { if (ab.re...
[ "public", "void", "getAttributes", "(", "int", "symbol", ",", "Set", "<", "Attribute", ">", "internal", ",", "Set", "<", "Attribute", ">", "synthesized", ",", "Set", "<", "Attribute", ">", "inherited", ")", "{", "int", "i", ";", "int", "max", ";", "Att...
Besides the classic synthesized and inherited attributes, I have internal attributes. Internal attributes are computed when creating the node, a better name might be 'initial'.
[ "Besides", "the", "classic", "synthesized", "and", "inherited", "attributes", "I", "have", "internal", "attributes", ".", "Internal", "attributes", "are", "computed", "when", "creating", "the", "node", "a", "better", "name", "might", "be", "initial", "." ]
train
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/semantics/Ag.java#L196-L218
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/PackagesToContainingMavenArtifactsIndex.java
PackagesToContainingMavenArtifactsIndex.markProjectsUsingPackagesFromAPI
public void markProjectsUsingPackagesFromAPI(MavenCoord apiCoords) { """ After the packages are registered and Java scanning done, we can link the ProjectModel and API packages together. ProjectModel --uses--> ArchiveCoordinateModel """ final Service<ArchiveCoordinateModel> coordsService = graphConte...
java
public void markProjectsUsingPackagesFromAPI(MavenCoord apiCoords) { final Service<ArchiveCoordinateModel> coordsService = graphContext.service(ArchiveCoordinateModel.class); Iterable<String> packages = this.getPackagesInArtifact(apiCoords); for (String pkg : packages) { ...
[ "public", "void", "markProjectsUsingPackagesFromAPI", "(", "MavenCoord", "apiCoords", ")", "{", "final", "Service", "<", "ArchiveCoordinateModel", ">", "coordsService", "=", "graphContext", ".", "service", "(", "ArchiveCoordinateModel", ".", "class", ")", ";", "Iterab...
After the packages are registered and Java scanning done, we can link the ProjectModel and API packages together. ProjectModel --uses--> ArchiveCoordinateModel
[ "After", "the", "packages", "are", "registered", "and", "Java", "scanning", "done", "we", "can", "link", "the", "ProjectModel", "and", "API", "packages", "together", ".", "ProjectModel", "--", "uses", "--", ">", "ArchiveCoordinateModel" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/PackagesToContainingMavenArtifactsIndex.java#L70-L85
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java
PublisherFlexible.getWrappedPublisher
private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) { """ Gets the publisher wrapped by the specofoed FlexiblePublisher. @param publisher The FlexiblePublisher wrapping the publisher. @param type The type of the publisher wrapped by the FlexibleP...
java
private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) { if (!(flexiblePublisher instanceof FlexiblePublisher)) { throw new IllegalArgumentException(String.format("Publisher should be of type: '%s'. Found type: '%s'", FlexiblePublisher.class, flexiblePublisher.getC...
[ "private", "T", "getWrappedPublisher", "(", "Publisher", "flexiblePublisher", ",", "Class", "<", "T", ">", "type", ")", "{", "if", "(", "!", "(", "flexiblePublisher", "instanceof", "FlexiblePublisher", ")", ")", "{", "throw", "new", "IllegalArgumentException", "...
Gets the publisher wrapped by the specofoed FlexiblePublisher. @param publisher The FlexiblePublisher wrapping the publisher. @param type The type of the publisher wrapped by the FlexiblePublisher. @return The publisher object wrapped by the Flex...
[ "Gets", "the", "publisher", "wrapped", "by", "the", "specofoed", "FlexiblePublisher", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java#L29-L43
dhemery/hartley
src/main/java/com/dhemery/expressing/Expressive.java
Expressive.assertThat
public void assertThat(Ticker ticker, Sampler<Boolean> variable) { """ Assert that a polled sample of the variable is {@code true}. <p>Example:</p> <pre> {@code Sampler<Boolean> theresAFlyInMySoup = ...; ... assertThat(eventually(), theresAFlyInMySoup); } """ assertThat(variable, ticker, isQui...
java
public void assertThat(Ticker ticker, Sampler<Boolean> variable) { assertThat(variable, ticker, isQuietlyTrue()); }
[ "public", "void", "assertThat", "(", "Ticker", "ticker", ",", "Sampler", "<", "Boolean", ">", "variable", ")", "{", "assertThat", "(", "variable", ",", "ticker", ",", "isQuietlyTrue", "(", ")", ")", ";", "}" ]
Assert that a polled sample of the variable is {@code true}. <p>Example:</p> <pre> {@code Sampler<Boolean> theresAFlyInMySoup = ...; ... assertThat(eventually(), theresAFlyInMySoup); }
[ "Assert", "that", "a", "polled", "sample", "of", "the", "variable", "is", "{", "@code", "true", "}", ".", "<p", ">", "Example", ":", "<", "/", "p", ">", "<pre", ">", "{", "@code" ]
train
https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L78-L80
amaembo/streamex
src/main/java/one/util/streamex/DoubleStreamEx.java
DoubleStreamEx.joining
public String joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { """ Returns a {@link String} which is the concatenation of the results of calling {@link String#valueOf(double)} on each element of this stream, separated by the specified delimiter, with the specified prefix and suffix in...
java
public String joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return collect(DoubleCollector.joining(delimiter, prefix, suffix)); }
[ "public", "String", "joining", "(", "CharSequence", "delimiter", ",", "CharSequence", "prefix", ",", "CharSequence", "suffix", ")", "{", "return", "collect", "(", "DoubleCollector", ".", "joining", "(", "delimiter", ",", "prefix", ",", "suffix", ")", ")", ";",...
Returns a {@link String} which is the concatenation of the results of calling {@link String#valueOf(double)} on each element of this stream, separated by the specified delimiter, with the specified prefix and suffix in encounter order. <p> This is a terminal operation. @param delimiter the delimiter to be used betwee...
[ "Returns", "a", "{", "@link", "String", "}", "which", "is", "the", "concatenation", "of", "the", "results", "of", "calling", "{", "@link", "String#valueOf", "(", "double", ")", "}", "on", "each", "element", "of", "this", "stream", "separated", "by", "the",...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/DoubleStreamEx.java#L1360-L1362
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.nextClearBit
public static int nextClearBit(long[] v, int start) { """ Find the next clear bit. @param v Value to process @param start Start position (inclusive) @return Position of next clear bit, or -1. """ start = start < 0 ? 0 : start; int wordindex = start >>> LONG_LOG2_SIZE; if(wordindex >= v.length)...
java
public static int nextClearBit(long[] v, int start) { start = start < 0 ? 0 : start; int wordindex = start >>> LONG_LOG2_SIZE; if(wordindex >= v.length) { return -1; } // Initial word long cur = ~v[wordindex] & (LONG_ALL_BITS << start); for(;;) { if(cur != 0) { return (w...
[ "public", "static", "int", "nextClearBit", "(", "long", "[", "]", "v", ",", "int", "start", ")", "{", "start", "=", "start", "<", "0", "?", "0", ":", "start", ";", "int", "wordindex", "=", "start", ">>>", "LONG_LOG2_SIZE", ";", "if", "(", "wordindex"...
Find the next clear bit. @param v Value to process @param start Start position (inclusive) @return Position of next clear bit, or -1.
[ "Find", "the", "next", "clear", "bit", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1366-L1384
jhalterman/lyra
src/main/java/net/jodah/lyra/internal/RecurringPolicy.java
RecurringPolicy.withBackoff
@SuppressWarnings("unchecked") public T withBackoff(Duration interval, Duration maxInterval, int intervalMultiplier) { """ Sets the {@code interval} to pause for between attempts, exponentially backing of to the {@code maxInterval} multiplying successive intervals by the {@code intervalMultiplier}. @throws N...
java
@SuppressWarnings("unchecked") public T withBackoff(Duration interval, Duration maxInterval, int intervalMultiplier) { Assert.notNull(interval, "interval"); Assert.notNull(maxInterval, "maxInterval"); Assert.isTrue(interval.length > 0, "The interval must be greater than 0"); Assert.isTrue(interval.toN...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "withBackoff", "(", "Duration", "interval", ",", "Duration", "maxInterval", ",", "int", "intervalMultiplier", ")", "{", "Assert", ".", "notNull", "(", "interval", ",", "\"interval\"", ")", ";", ...
Sets the {@code interval} to pause for between attempts, exponentially backing of to the {@code maxInterval} multiplying successive intervals by the {@code intervalMultiplier}. @throws NullPointerException if {@code interval} or {@code maxInterval} are null @throws IllegalArgumentException if {@code interval} is <= 0,...
[ "Sets", "the", "{", "@code", "interval", "}", "to", "pause", "for", "between", "attempts", "exponentially", "backing", "of", "to", "the", "{", "@code", "maxInterval", "}", "multiplying", "successive", "intervals", "by", "the", "{", "@code", "intervalMultiplier",...
train
https://github.com/jhalterman/lyra/blob/ce347a69357fef1b34e92d92a4f9e68792d81255/src/main/java/net/jodah/lyra/internal/RecurringPolicy.java#L101-L113
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201811/creativetemplateservice/GetSystemDefinedCreativeTemplates.java
GetSystemDefinedCreativeTemplates.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { CreativeTemplateServiceInterface creativeTemplateService = adManagerServices.get(session, CreativeTemplateServiceInterface.class); // Create a statement to select creative templat...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "CreativeTemplateServiceInterface", "creativeTemplateService", "=", "adManagerServices", ".", "get", "(", "ses...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201811/creativetemplateservice/GetSystemDefinedCreativeTemplates.java#L52-L87
jmrozanec/cron-utils
src/main/java/com/cronutils/mapper/WeekDay.java
WeekDay.mapTo
public int mapTo(final int dayOfWeek, final WeekDay targetWeekDayDefinition) { """ Maps given WeekDay to representation hold by this instance. @param targetWeekDayDefinition - referred weekDay @param dayOfWeek - day of week to be mapped. Value corresponds to this instance mapping. @return - int...
java
public int mapTo(final int dayOfWeek, final WeekDay targetWeekDayDefinition) { if (firstDayZero && targetWeekDayDefinition.isFirstDayZero()) { return bothSameStartOfRange(0, 6, this, targetWeekDayDefinition).apply(dayOfWeek); } if (!firstDayZero && !targetWeekDayDefinition.isFirstDay...
[ "public", "int", "mapTo", "(", "final", "int", "dayOfWeek", ",", "final", "WeekDay", "targetWeekDayDefinition", ")", "{", "if", "(", "firstDayZero", "&&", "targetWeekDayDefinition", ".", "isFirstDayZero", "(", ")", ")", "{", "return", "bothSameStartOfRange", "(", ...
Maps given WeekDay to representation hold by this instance. @param targetWeekDayDefinition - referred weekDay @param dayOfWeek - day of week to be mapped. Value corresponds to this instance mapping. @return - int result
[ "Maps", "given", "WeekDay", "to", "representation", "hold", "by", "this", "instance", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/mapper/WeekDay.java#L51-L66
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.executeSiteAnalysisSlot
public DiagnosticAnalysisInner executeSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { """ Execute Analysis. Execute Analysis. @param resourceGroupName Name of the resource group to...
java
public DiagnosticAnalysisInner executeSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { return executeSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticC...
[ "public", "DiagnosticAnalysisInner", "executeSiteAnalysisSlot", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "diagnosticCategory", ",", "String", "analysisName", ",", "String", "slot", ",", "DateTime", "startTime", ",", "DateTime", "endT...
Execute Analysis. Execute Analysis. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param diagnosticCategory Category Name @param analysisName Analysis Resource Name @param slot Slot Name @param startTime Start Time @param endTime End Time @param timeGrain ...
[ "Execute", "Analysis", ".", "Execute", "Analysis", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L1956-L1958
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color/GradientMapper.java
GradientMapper.getGradientMapper
public static GradientMapper getGradientMapper(int gradientType, double min, double max) { """ Constructs a gradientMapper to draw one of the pre-defined gradients For example, GradientMapper.getGradientMapper(GradientMapper.RAINBOW_GRADIENT, 0, 10) @param gradientType One of the gradient types, eg Gradient...
java
public static GradientMapper getGradientMapper(int gradientType, double min, double max) { GradientMapper gm; switch( gradientType ) { case BLACK_WHITE_GRADIENT: gm = new GradientMapper(Color.BLACK, Color.WHITE); gm.put(min, Color.BLACK); gm.put(max, Color.WHITE); return gm; case WHITE_BLACK_GRADIEN...
[ "public", "static", "GradientMapper", "getGradientMapper", "(", "int", "gradientType", ",", "double", "min", ",", "double", "max", ")", "{", "GradientMapper", "gm", ";", "switch", "(", "gradientType", ")", "{", "case", "BLACK_WHITE_GRADIENT", ":", "gm", "=", "...
Constructs a gradientMapper to draw one of the pre-defined gradients For example, GradientMapper.getGradientMapper(GradientMapper.RAINBOW_GRADIENT, 0, 10) @param gradientType One of the gradient types, eg GradientMapper.BLACK_WHITE_GRADIENT @param min Start of the gradient @param max End of the gradient @return
[ "Constructs", "a", "gradientMapper", "to", "draw", "one", "of", "the", "pre", "-", "defined", "gradients" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color/GradientMapper.java#L81-L132
casmi/casmi
src/main/java/casmi/graphics/material/Material.java
Material.setAmbient
public void setAmbient(float red, float green, float blue) { """ Sets the ambient reflectance for shapes drawn to the screen. @param red The red color of the ambient reflectance. @param green The green color of the ambient reflectance. @param blue The blue color of the ambient reflectance. """ ...
java
public void setAmbient(float red, float green, float blue){ ambient[0]=red; ambient[1]=green; ambient[2]=blue; Am = true; }
[ "public", "void", "setAmbient", "(", "float", "red", ",", "float", "green", ",", "float", "blue", ")", "{", "ambient", "[", "0", "]", "=", "red", ";", "ambient", "[", "1", "]", "=", "green", ";", "ambient", "[", "2", "]", "=", "blue", ";", "Am", ...
Sets the ambient reflectance for shapes drawn to the screen. @param red The red color of the ambient reflectance. @param green The green color of the ambient reflectance. @param blue The blue color of the ambient reflectance.
[ "Sets", "the", "ambient", "reflectance", "for", "shapes", "drawn", "to", "the", "screen", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/material/Material.java#L84-L89
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnGatewaysInner.java
VpnGatewaysInner.getByResourceGroupAsync
public Observable<VpnGatewayInner> getByResourceGroupAsync(String resourceGroupName, String gatewayName) { """ Retrieves the details of a virtual wan vpn gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @throws IllegalArgumentException th...
java
public Observable<VpnGatewayInner> getByResourceGroupAsync(String resourceGroupName, String gatewayName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1<ServiceResponse<VpnGatewayInner>, VpnGatewayInner>() { @Override public VpnGatewayInn...
[ "public", "Observable", "<", "VpnGatewayInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "gatewayName", ")", ".", "map...
Retrieves the details of a virtual wan vpn gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VpnGatewayInner object
[ "Retrieves", "the", "details", "of", "a", "virtual", "wan", "vpn", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnGatewaysInner.java#L151-L158
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/EfficientCacheView.java
EfficientCacheView.clearViewCached
public void clearViewCached(int parentId, int viewId) { """ Clear the cache for the view specify @param parentId the parent id of the view to remove (if the view was retrieve with this parent id) @param viewId id of the view to remove from the cache """ SparseArray<View> sparseArrayViewsParent =...
java
public void clearViewCached(int parentId, int viewId) { SparseArray<View> sparseArrayViewsParent = mSparseSparseArrayView.get(parentId); if (sparseArrayViewsParent != null) { sparseArrayViewsParent.remove(viewId); } }
[ "public", "void", "clearViewCached", "(", "int", "parentId", ",", "int", "viewId", ")", "{", "SparseArray", "<", "View", ">", "sparseArrayViewsParent", "=", "mSparseSparseArrayView", ".", "get", "(", "parentId", ")", ";", "if", "(", "sparseArrayViewsParent", "!=...
Clear the cache for the view specify @param parentId the parent id of the view to remove (if the view was retrieve with this parent id) @param viewId id of the view to remove from the cache
[ "Clear", "the", "cache", "for", "the", "view", "specify" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/EfficientCacheView.java#L43-L48
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getNavShowLists
protected Content getNavShowLists(DocPath link) { """ Get "FRAMES" link, to switch to the frame version of the output. @param link File to be linked, "index.html" @return a content tree for the link """ DocLink dl = new DocLink(link, path.getPath(), null); Content framesContent = getHyperLi...
java
protected Content getNavShowLists(DocPath link) { DocLink dl = new DocLink(link, path.getPath(), null); Content framesContent = getHyperLink(dl, framesLabel, "", "_top"); Content li = HtmlTree.LI(framesContent); return li; }
[ "protected", "Content", "getNavShowLists", "(", "DocPath", "link", ")", "{", "DocLink", "dl", "=", "new", "DocLink", "(", "link", ",", "path", ".", "getPath", "(", ")", ",", "null", ")", ";", "Content", "framesContent", "=", "getHyperLink", "(", "dl", ",...
Get "FRAMES" link, to switch to the frame version of the output. @param link File to be linked, "index.html" @return a content tree for the link
[ "Get", "FRAMES", "link", "to", "switch", "to", "the", "frame", "version", "of", "the", "output", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L620-L625
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/DTDElement.java
DTDElement.addNsDefault
public DTDAttribute addNsDefault (InputProblemReporter rep, PrefixedName attrName, int valueType, DefaultAttrValue defValue, boolean fullyValidate) throws XMLStreamException { """ Method called to add a definition of a namespace-declaration pseudo-attribute with a default value. @param...
java
public DTDAttribute addNsDefault (InputProblemReporter rep, PrefixedName attrName, int valueType, DefaultAttrValue defValue, boolean fullyValidate) throws XMLStreamException { /* Let's simplify handling a bit: although theoretically all * combinations of value can be used, ...
[ "public", "DTDAttribute", "addNsDefault", "(", "InputProblemReporter", "rep", ",", "PrefixedName", "attrName", ",", "int", "valueType", ",", "DefaultAttrValue", "defValue", ",", "boolean", "fullyValidate", ")", "throws", "XMLStreamException", "{", "/* Let's simplify handl...
Method called to add a definition of a namespace-declaration pseudo-attribute with a default value. @param rep Reporter to use to report non-fatal problems @param fullyValidate Whether this is being invoked for actual DTD validation, or just the "typing non-validator" @return Attribute that acts as the placeholder, i...
[ "Method", "called", "to", "add", "a", "definition", "of", "a", "namespace", "-", "declaration", "pseudo", "-", "attribute", "with", "a", "default", "value", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/DTDElement.java#L322-L359
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
SubWriterHolderWriter.addIndexComment
protected void addIndexComment(Element member, Content contentTree) { """ Add the index comment. @param member the member being documented @param contentTree the content tree to which the comment will be added """ List<? extends DocTree> tags = utils.getFirstSentenceTrees(member); addIndexC...
java
protected void addIndexComment(Element member, Content contentTree) { List<? extends DocTree> tags = utils.getFirstSentenceTrees(member); addIndexComment(member, tags, contentTree); }
[ "protected", "void", "addIndexComment", "(", "Element", "member", ",", "Content", "contentTree", ")", "{", "List", "<", "?", "extends", "DocTree", ">", "tags", "=", "utils", ".", "getFirstSentenceTrees", "(", "member", ")", ";", "addIndexComment", "(", "member...
Add the index comment. @param member the member being documented @param contentTree the content tree to which the comment will be added
[ "Add", "the", "index", "comment", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java#L173-L176
rollbar/rollbar-java
rollbar-android/src/main/java/com/rollbar/android/Rollbar.java
Rollbar.log
public void log(Throwable error, String description) { """ Record an error with human readable description at the default level returned by {@link com.rollbar.notifier.Rollbar#level}. @param error the error. @param description human readable description of error. """ log(error, null, description...
java
public void log(Throwable error, String description) { log(error, null, description, null); }
[ "public", "void", "log", "(", "Throwable", "error", ",", "String", "description", ")", "{", "log", "(", "error", ",", "null", ",", "description", ",", "null", ")", ";", "}" ]
Record an error with human readable description at the default level returned by {@link com.rollbar.notifier.Rollbar#level}. @param error the error. @param description human readable description of error.
[ "Record", "an", "error", "with", "human", "readable", "description", "at", "the", "default", "level", "returned", "by", "{", "@link", "com", ".", "rollbar", ".", "notifier", ".", "Rollbar#level", "}", "." ]
train
https://github.com/rollbar/rollbar-java/blob/5eb4537d1363722b51cfcce55b427cbd8489f17b/rollbar-android/src/main/java/com/rollbar/android/Rollbar.java#L679-L681
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java
PassthroughResourcesImpl.postRequest
public String postRequest(String endpoint, String payload, HashMap<String, Object> parameters) throws SmartsheetException { """ Issue an HTTP POST request. @param endpoint the API endpoint @param payload a JSON payload string @param parameters optional list of resource parameters @return a JSON response stri...
java
public String postRequest(String endpoint, String payload, HashMap<String, Object> parameters) throws SmartsheetException { Util.throwIfNull(payload); return passthroughRequest(HttpMethod.POST, endpoint, payload, parameters); }
[ "public", "String", "postRequest", "(", "String", "endpoint", ",", "String", "payload", ",", "HashMap", "<", "String", ",", "Object", ">", "parameters", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "payload", ")", ";", "return", ...
Issue an HTTP POST request. @param endpoint the API endpoint @param payload a JSON payload string @param parameters optional list of resource parameters @return a JSON response string @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestException if there is any problem with t...
[ "Issue", "an", "HTTP", "POST", "request", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java#L78-L81
alkacon/opencms-core
src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java
CmsContentEditor.changeSimpleValue
private void changeSimpleValue(String attributeName, int index, String value, List<String> parentPathElements) { """ Changes a simple type entity value.<p> @param attributeName the attribute name @param index the value index @param value the value @param parentPathElements the parent path elements """ ...
java
private void changeSimpleValue(String attributeName, int index, String value, List<String> parentPathElements) { CmsAttributeHandler handler = getAttributeHandler(attributeName, parentPathElements); handler.changeValue(value, index); }
[ "private", "void", "changeSimpleValue", "(", "String", "attributeName", ",", "int", "index", ",", "String", "value", ",", "List", "<", "String", ">", "parentPathElements", ")", "{", "CmsAttributeHandler", "handler", "=", "getAttributeHandler", "(", "attributeName", ...
Changes a simple type entity value.<p> @param attributeName the attribute name @param index the value index @param value the value @param parentPathElements the parent path elements
[ "Changes", "a", "simple", "type", "entity", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java#L2128-L2132
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java
ScriptActionsInner.getExecutionDetailAsync
public Observable<RuntimeScriptActionDetailInner> getExecutionDetailAsync(String resourceGroupName, String clusterName, String scriptExecutionId) { """ Gets the script execution detail for the given script execution ID. @param resourceGroupName The name of the resource group. @param clusterName The name of the...
java
public Observable<RuntimeScriptActionDetailInner> getExecutionDetailAsync(String resourceGroupName, String clusterName, String scriptExecutionId) { return getExecutionDetailWithServiceResponseAsync(resourceGroupName, clusterName, scriptExecutionId).map(new Func1<ServiceResponse<RuntimeScriptActionDetailInner>, ...
[ "public", "Observable", "<", "RuntimeScriptActionDetailInner", ">", "getExecutionDetailAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "scriptExecutionId", ")", "{", "return", "getExecutionDetailWithServiceResponseAsync", "(", "resourc...
Gets the script execution detail for the given script execution ID. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param scriptExecutionId The script execution Id @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to t...
[ "Gets", "the", "script", "execution", "detail", "for", "the", "given", "script", "execution", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java#L332-L339
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java
ScenarioPortrayal.setHistogramRange
public void setHistogramRange(String histogramID, int lower, int upper) { """ Set the histogram range to be displayed @param histogramID The histogram ID @param lower The lower value for the histogram @param upper The upper value for the histogram """ if (this.histograms.containsKey(histogramID))...
java
public void setHistogramRange(String histogramID, int lower, int upper) { if (this.histograms.containsKey(histogramID)) this.histograms.get(histogramID).setYAxisRange(lower, upper); }
[ "public", "void", "setHistogramRange", "(", "String", "histogramID", ",", "int", "lower", ",", "int", "upper", ")", "{", "if", "(", "this", ".", "histograms", ".", "containsKey", "(", "histogramID", ")", ")", "this", ".", "histograms", ".", "get", "(", "...
Set the histogram range to be displayed @param histogramID The histogram ID @param lower The lower value for the histogram @param upper The upper value for the histogram
[ "Set", "the", "histogram", "range", "to", "be", "displayed" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java#L428-L431
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/qjournal/server/Journal.java
Journal.copyMetaFilesForUpgrade
private synchronized void copyMetaFilesForUpgrade() throws IOException { """ After an upgrade we must ensure that the current directory still holds all epoch, committed txid and paxos files that it had before we did the upgrade. """ Configuration conf = new Configuration(); File currentDir = journalS...
java
private synchronized void copyMetaFilesForUpgrade() throws IOException { Configuration conf = new Configuration(); File currentDir = journalStorage.getSingularStorageDir().getCurrentDir(); File prevDir = journalStorage.getSingularStorageDir().getPreviousTmp(); FileSystem fs = FileSystem.getLocal(conf).g...
[ "private", "synchronized", "void", "copyMetaFilesForUpgrade", "(", ")", "throws", "IOException", "{", "Configuration", "conf", "=", "new", "Configuration", "(", ")", ";", "File", "currentDir", "=", "journalStorage", ".", "getSingularStorageDir", "(", ")", ".", "ge...
After an upgrade we must ensure that the current directory still holds all epoch, committed txid and paxos files that it had before we did the upgrade.
[ "After", "an", "upgrade", "we", "must", "ensure", "that", "the", "current", "directory", "still", "holds", "all", "epoch", "committed", "txid", "and", "paxos", "files", "that", "it", "had", "before", "we", "did", "the", "upgrade", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/server/Journal.java#L212-L226
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.putThreadLocal
public synchronized final void putThreadLocal(Object key, Object value) { """ Put a value that can later be retrieved using a given key. <p> @param key the key used to index the value @param value the value to save """ if (sealed) onSealedMutation(); if (threadLocalMap == null) t...
java
public synchronized final void putThreadLocal(Object key, Object value) { if (sealed) onSealedMutation(); if (threadLocalMap == null) threadLocalMap = new HashMap<Object,Object>(); threadLocalMap.put(key, value); }
[ "public", "synchronized", "final", "void", "putThreadLocal", "(", "Object", "key", ",", "Object", "value", ")", "{", "if", "(", "sealed", ")", "onSealedMutation", "(", ")", ";", "if", "(", "threadLocalMap", "==", "null", ")", "threadLocalMap", "=", "new", ...
Put a value that can later be retrieved using a given key. <p> @param key the key used to index the value @param value the value to save
[ "Put", "a", "value", "that", "can", "later", "be", "retrieved", "using", "a", "given", "key", ".", "<p", ">" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L2193-L2199
haraldk/TwelveMonkeys
imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java
QuickDrawContext.frameArc
public void frameArc(final Rectangle2D pRectangle, int pStartAngle, int pArcAngle) { """ FrameArc(r,int,int) // outline arc with the size, pattern, and pattern mode of the graphics pen. @param pRectangle the rectangle to frame @param pStartAngle start angle in degrees (starting from 12'o clock, this differs ...
java
public void frameArc(final Rectangle2D pRectangle, int pStartAngle, int pArcAngle) { frameShape(toArc(pRectangle, pStartAngle, pArcAngle, false)); }
[ "public", "void", "frameArc", "(", "final", "Rectangle2D", "pRectangle", ",", "int", "pStartAngle", ",", "int", "pArcAngle", ")", "{", "frameShape", "(", "toArc", "(", "pRectangle", ",", "pStartAngle", ",", "pArcAngle", ",", "false", ")", ")", ";", "}" ]
FrameArc(r,int,int) // outline arc with the size, pattern, and pattern mode of the graphics pen. @param pRectangle the rectangle to frame @param pStartAngle start angle in degrees (starting from 12'o clock, this differs from Java) @param pArcAngle rotation angle in degrees (starting from {@code pStartAngle}, this d...
[ "FrameArc", "(", "r", "int", "int", ")", "//", "outline", "arc", "with", "the", "size", "pattern", "and", "pattern", "mode", "of", "the", "graphics", "pen", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java#L728-L730
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOption.java
DigitalOption.getValue
@Override public RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationException { // Get underlying and numeraire // Get S(T) RandomVariable underlyingAtMaturity = model.getAssetValue(maturity, underlyingIndex); // The payoff: values = indicator(underlyi...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "AssetModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "// Get underlying and numeraire", "// Get S(T)", "RandomVariable", "underlyingAtMaturity", ...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOption.java#L79-L100
b3log/latke
latke-core/src/main/java/org/json/JSONArray.java
JSONArray.optEnum
public <E extends Enum<E>> E optEnum(Class<E> clazz, int index) { """ Get the enum value associated with a key. @param <E> Enum Type @param clazz The type of enum to retrieve. @param index The index must be between 0 and length() - 1. @return The enum value at the index location or null if not found "...
java
public <E extends Enum<E>> E optEnum(Class<E> clazz, int index) { return this.optEnum(clazz, index, null); }
[ "public", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "optEnum", "(", "Class", "<", "E", ">", "clazz", ",", "int", "index", ")", "{", "return", "this", ".", "optEnum", "(", "clazz", ",", "index", ",", "null", ")", ";", "}" ]
Get the enum value associated with a key. @param <E> Enum Type @param clazz The type of enum to retrieve. @param index The index must be between 0 and length() - 1. @return The enum value at the index location or null if not found
[ "Get", "the", "enum", "value", "associated", "with", "a", "key", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONArray.java#L660-L662
OpenLiberty/open-liberty
dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java
LifecycleCallbackHelper.doPostConstruct
@SuppressWarnings("rawtypes") public void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs) throws InjectionException { """ Processes the PostConstruct callback method for the application main class @param clazz the application main class object @param postConstructs a list of PostConstr...
java
@SuppressWarnings("rawtypes") public void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs) throws InjectionException { mainClassName = clazz.getName(); doPostConstruct(clazz, postConstructs, null); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "doPostConstruct", "(", "Class", "clazz", ",", "List", "<", "LifecycleCallback", ">", "postConstructs", ")", "throws", "InjectionException", "{", "mainClassName", "=", "clazz", ".", "getName", "(...
Processes the PostConstruct callback method for the application main class @param clazz the application main class object @param postConstructs a list of PostConstruct metadata in the application client module @throws InjectionException
[ "Processes", "the", "PostConstruct", "callback", "method", "for", "the", "application", "main", "class" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L47-L51
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingnewssearch/src/main/java/com/microsoft/azure/cognitiveservices/search/newssearch/implementation/BingNewsImpl.java
BingNewsImpl.categoryWithServiceResponseAsync
public Observable<ServiceResponse<NewsModel>> categoryWithServiceResponseAsync(CategoryOptionalParameter categoryOptionalParameter) { """ The News Category API lets lets you search on Bing and get back a list of top news articles by category. This section provides technical details about the query parameters and h...
java
public Observable<ServiceResponse<NewsModel>> categoryWithServiceResponseAsync(CategoryOptionalParameter categoryOptionalParameter) { final String acceptLanguage = categoryOptionalParameter != null ? categoryOptionalParameter.acceptLanguage() : null; final String userAgent = categoryOptionalParameter !=...
[ "public", "Observable", "<", "ServiceResponse", "<", "NewsModel", ">", ">", "categoryWithServiceResponseAsync", "(", "CategoryOptionalParameter", "categoryOptionalParameter", ")", "{", "final", "String", "acceptLanguage", "=", "categoryOptionalParameter", "!=", "null", "?",...
The News Category API lets lets you search on Bing and get back a list of top news articles by category. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searchi...
[ "The", "News", "Category", "API", "lets", "lets", "you", "search", "on", "Bing", "and", "get", "back", "a", "list", "of", "top", "news", "articles", "by", "category", ".", "This", "section", "provides", "technical", "details", "about", "the", "query", "par...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingnewssearch/src/main/java/com/microsoft/azure/cognitiveservices/search/newssearch/implementation/BingNewsImpl.java#L405-L424
Azure/azure-sdk-for-java
eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/implementation/EventGridClientImpl.java
EventGridClientImpl.publishEvents
public void publishEvents(String topicHostname, List<EventGridEvent> events) { """ Publishes a batch of events to an Azure Event Grid topic. @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net @param events An array of events to be published to Event Grid. @throws Illega...
java
public void publishEvents(String topicHostname, List<EventGridEvent> events) { publishEventsWithServiceResponseAsync(topicHostname, events).toBlocking().single().body(); }
[ "public", "void", "publishEvents", "(", "String", "topicHostname", ",", "List", "<", "EventGridEvent", ">", "events", ")", "{", "publishEventsWithServiceResponseAsync", "(", "topicHostname", ",", "events", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")...
Publishes a batch of events to an Azure Event Grid topic. @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net @param events An array of events to be published to Event Grid. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if...
[ "Publishes", "a", "batch", "of", "events", "to", "an", "Azure", "Event", "Grid", "topic", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/data-plane/src/main/java/com/microsoft/azure/eventgrid/implementation/EventGridClientImpl.java#L207-L209
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.encodeEndpoint
public static String encodeEndpoint(String uri, String operation) { """ This method converts the supplied URI and optional operation into an endpoint descriptor. @param uri The URI @param operation The optional operation @return The endpoint descriptor """ StringBuilder buf=new StringBuilder(); ...
java
public static String encodeEndpoint(String uri, String operation) { StringBuilder buf=new StringBuilder(); if (uri != null && !uri.trim().isEmpty()) { buf.append(uri); } if (operation != null && !operation.trim().isEmpty()) { buf.append('['); buf.appen...
[ "public", "static", "String", "encodeEndpoint", "(", "String", "uri", ",", "String", "operation", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "uri", "!=", "null", "&&", "!", "uri", ".", "trim", "(", ")", "."...
This method converts the supplied URI and optional operation into an endpoint descriptor. @param uri The URI @param operation The optional operation @return The endpoint descriptor
[ "This", "method", "converts", "the", "supplied", "URI", "and", "optional", "operation", "into", "an", "endpoint", "descriptor", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L40-L51
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.addMetadataCascadePolicy
public BoxMetadataCascadePolicy.Info addMetadataCascadePolicy(String scope, String templateKey) { """ Creates a new Metadata Cascade Policy on a folder. @param scope the scope of the metadata cascade policy. @param templateKey the key of the template. @return information about the Metadata Cascade ...
java
public BoxMetadataCascadePolicy.Info addMetadataCascadePolicy(String scope, String templateKey) { return BoxMetadataCascadePolicy.create(this.getAPI(), this.getID(), scope, templateKey); }
[ "public", "BoxMetadataCascadePolicy", ".", "Info", "addMetadataCascadePolicy", "(", "String", "scope", ",", "String", "templateKey", ")", "{", "return", "BoxMetadataCascadePolicy", ".", "create", "(", "this", ".", "getAPI", "(", ")", ",", "this", ".", "getID", "...
Creates a new Metadata Cascade Policy on a folder. @param scope the scope of the metadata cascade policy. @param templateKey the key of the template. @return information about the Metadata Cascade Policy.
[ "Creates", "a", "new", "Metadata", "Cascade", "Policy", "on", "a", "folder", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L1120-L1123
OpenTSDB/opentsdb
src/query/expression/Expressions.java
Expressions.parseExpressions
public static List<ExpressionTree> parseExpressions( final List<String> expressions, final TSQuery ts_query, final List<String> metric_queries) { """ Parses a list of string express...
java
public static List<ExpressionTree> parseExpressions( final List<String> expressions, final TSQuery ts_query, final List<String> metric_queries) { final List<ExpressionTree> trees = ...
[ "public", "static", "List", "<", "ExpressionTree", ">", "parseExpressions", "(", "final", "List", "<", "String", ">", "expressions", ",", "final", "TSQuery", "ts_query", ",", "final", "List", "<", "String", ">", "metric_queries", ")", "{", "final", "List", "...
Parses a list of string expressions into the proper trees, adding the metrics to the {@code metric_queries} list. @param expressions A list of zero or more expressions (if empty, you get an empty tree list back) @param ts_query The original query with timestamps @param metric_queries The list to fill with metrics to fe...
[ "Parses", "a", "list", "of", "string", "expressions", "into", "the", "proper", "trees", "adding", "the", "metrics", "to", "the", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/query/expression/Expressions.java#L79-L96
LearnLib/learnlib
datastructures/pta/src/main/java/de/learnlib/datastructure/pta/pta/BasePTA.java
BasePTA.addSample
public void addSample(int[] sample, SP lastProperty) { """ Adds a sample to the PTA, and sets the property of the last reached (or inserted) state accordingly. @param sample the word to add to the PTA @param lastProperty the property of the last state to set """ S target = getOrCreateState(sample...
java
public void addSample(int[] sample, SP lastProperty) { S target = getOrCreateState(sample); if (!target.tryMergeStateProperty(lastProperty)) { throw new IllegalStateException(); } }
[ "public", "void", "addSample", "(", "int", "[", "]", "sample", ",", "SP", "lastProperty", ")", "{", "S", "target", "=", "getOrCreateState", "(", "sample", ")", ";", "if", "(", "!", "target", ".", "tryMergeStateProperty", "(", "lastProperty", ")", ")", "{...
Adds a sample to the PTA, and sets the property of the last reached (or inserted) state accordingly. @param sample the word to add to the PTA @param lastProperty the property of the last state to set
[ "Adds", "a", "sample", "to", "the", "PTA", "and", "sets", "the", "property", "of", "the", "last", "reached", "(", "or", "inserted", ")", "state", "accordingly", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/datastructures/pta/src/main/java/de/learnlib/datastructure/pta/pta/BasePTA.java#L112-L117
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newServiceInvocationException
public static ServiceInvocationException newServiceInvocationException(String message, Object... args) { """ Constructs and initializes a new {@link ServiceInvocationException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing th...
java
public static ServiceInvocationException newServiceInvocationException(String message, Object... args) { return newServiceInvocationException(null, message, args); }
[ "public", "static", "ServiceInvocationException", "newServiceInvocationException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newServiceInvocationException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link ServiceInvocationException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link ServiceInvocationException exception}. @param args {@link Object[] arguments} used to replace format placeho...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "ServiceInvocationException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L671-L673
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.declareType
public boolean declareType(StaticScope scope, String name, JSType type) { """ Records declared global type names. This makes resolution faster and more robust in the common case. @param name The name of the type to be recorded. @param type The actual type being associated with the name. @return True if this ...
java
public boolean declareType(StaticScope scope, String name, JSType type) { checkState(!name.isEmpty()); if (getTypeForScopeInternal(getCreationScope(scope, name), name) != null) { return false; } register(scope, type, name); return true; }
[ "public", "boolean", "declareType", "(", "StaticScope", "scope", ",", "String", "name", ",", "JSType", "type", ")", "{", "checkState", "(", "!", "name", ".", "isEmpty", "(", ")", ")", ";", "if", "(", "getTypeForScopeInternal", "(", "getCreationScope", "(", ...
Records declared global type names. This makes resolution faster and more robust in the common case. @param name The name of the type to be recorded. @param type The actual type being associated with the name. @return True if this name is not already defined, false otherwise.
[ "Records", "declared", "global", "type", "names", ".", "This", "makes", "resolution", "faster", "and", "more", "robust", "in", "the", "common", "case", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1139-L1147
haraldk/TwelveMonkeys
imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java
QuickDrawContext.frameRoundRect
public void frameRoundRect(final Rectangle2D pRectangle, int pArcW, int pArcH) { """ FrameRoundRect(r,int,int) // outline round rect with the size, pattern, and pattern mode of the graphics pen. @param pRectangle the rectangle to frame @param pArcW width of the oval defining the rounded corner. @param p...
java
public void frameRoundRect(final Rectangle2D pRectangle, int pArcW, int pArcH) { frameShape(toRoundRect(pRectangle, pArcW, pArcH)); }
[ "public", "void", "frameRoundRect", "(", "final", "Rectangle2D", "pRectangle", ",", "int", "pArcW", ",", "int", "pArcH", ")", "{", "frameShape", "(", "toRoundRect", "(", "pRectangle", ",", "pArcW", ",", "pArcH", ")", ")", ";", "}" ]
FrameRoundRect(r,int,int) // outline round rect with the size, pattern, and pattern mode of the graphics pen. @param pRectangle the rectangle to frame @param pArcW width of the oval defining the rounded corner. @param pArcH height of the oval defining the rounded corner.
[ "FrameRoundRect", "(", "r", "int", "int", ")", "//", "outline", "round", "rect", "with", "the", "size", "pattern", "and", "pattern", "mode", "of", "the", "graphics", "pen", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java#L594-L596
osglworks/java-tool
src/main/java/org/osgl/util/IO.java
IO.readContentAsString
public static String readContentAsString(URL url, String encoding) { """ Read file content to a String @param url The url resource to read @param encoding encoding used to read the file into string content @return The String content """ try { return readContentAsString(url.openStream...
java
public static String readContentAsString(URL url, String encoding) { try { return readContentAsString(url.openStream(), encoding); } catch (IOException e) { throw E.ioException(e); } }
[ "public", "static", "String", "readContentAsString", "(", "URL", "url", ",", "String", "encoding", ")", "{", "try", "{", "return", "readContentAsString", "(", "url", ".", "openStream", "(", ")", ",", "encoding", ")", ";", "}", "catch", "(", "IOException", ...
Read file content to a String @param url The url resource to read @param encoding encoding used to read the file into string content @return The String content
[ "Read", "file", "content", "to", "a", "String" ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/IO.java#L1525-L1531
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java
ArrayWrappedCallByReference.processLocalStore
private void processLocalStore(int seen) { """ looks for stores to registers, if that store is an array, builds a wrapper info for it and stores it in the wrappers collection. If it is a regular store, sees if this value, came from a wrapper array passed into a method, and if so reports it. @param seen the cu...
java
private void processLocalStore(int seen) { if (stack.getStackDepth() == 0) { return; } OpcodeStack.Item itm = stack.getStackItem(0); String sig = itm.getSignature(); if (sig.startsWith(Values.SIG_ARRAY_PREFIX)) { int reg = RegisterUtils.getAStoreReg(this, ...
[ "private", "void", "processLocalStore", "(", "int", "seen", ")", "{", "if", "(", "stack", ".", "getStackDepth", "(", ")", "==", "0", ")", "{", "return", ";", "}", "OpcodeStack", ".", "Item", "itm", "=", "stack", ".", "getStackItem", "(", "0", ")", ";...
looks for stores to registers, if that store is an array, builds a wrapper info for it and stores it in the wrappers collection. If it is a regular store, sees if this value, came from a wrapper array passed into a method, and if so reports it. @param seen the currently parsed opcode
[ "looks", "for", "stores", "to", "registers", "if", "that", "store", "is", "an", "array", "builds", "a", "wrapper", "info", "for", "it", "and", "stores", "it", "in", "the", "wrappers", "collection", ".", "If", "it", "is", "a", "regular", "store", "sees", ...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/ArrayWrappedCallByReference.java#L255-L274
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/RuleConditions.java
RuleConditions.createInCondition
public static Node createInCondition(Variable var, Node cond) { """ Create an "IN" condition. <p> @param var is the variable @param cond is either a member or a hedging condition @return the in condition """ checkNode(cond, MEMBER); // make sure the member is part of the variable Member member; sw...
java
public static Node createInCondition(Variable var, Node cond) { checkNode(cond, MEMBER); // make sure the member is part of the variable Member member; switch (cond.getNodeType()) { case MEMBER: member = cond.cast(); break; default: throw new FuzzerException(cond + ": unexpected IN condition...
[ "public", "static", "Node", "createInCondition", "(", "Variable", "var", ",", "Node", "cond", ")", "{", "checkNode", "(", "cond", ",", "MEMBER", ")", ";", "// make sure the member is part of the variable", "Member", "member", ";", "switch", "(", "cond", ".", "ge...
Create an "IN" condition. <p> @param var is the variable @param cond is either a member or a hedging condition @return the in condition
[ "Create", "an", "IN", "condition", ".", "<p", ">" ]
train
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/RuleConditions.java#L26-L43
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/domain/controller/operations/coordination/OperationCoordinatorStepHandler.java
OperationCoordinatorStepHandler.executeDirect
private void executeDirect(OperationContext context, ModelNode operation, boolean checkPrivate) throws OperationFailedException { """ Directly handles the op in the standard way the default prepare step handler would @param context the operation execution context @param operation the operation @param checkPriva...
java
private void executeDirect(OperationContext context, ModelNode operation, boolean checkPrivate) throws OperationFailedException { if (HOST_CONTROLLER_LOGGER.isTraceEnabled()) { HOST_CONTROLLER_LOGGER.tracef("%s executing direct", getClass().getSimpleName()); } PrepareStepHandler.exec...
[ "private", "void", "executeDirect", "(", "OperationContext", "context", ",", "ModelNode", "operation", ",", "boolean", "checkPrivate", ")", "throws", "OperationFailedException", "{", "if", "(", "HOST_CONTROLLER_LOGGER", ".", "isTraceEnabled", "(", ")", ")", "{", "HO...
Directly handles the op in the standard way the default prepare step handler would @param context the operation execution context @param operation the operation @param checkPrivate {@code true} if a check should be made for a direct user call to a private operation @throws OperationFailedException if there is no handle...
[ "Directly", "handles", "the", "op", "in", "the", "standard", "way", "the", "default", "prepare", "step", "handler", "would" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/coordination/OperationCoordinatorStepHandler.java#L135-L140
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerEmbedded.java
OStringSerializerEmbedded.toStream
public StringBuilder toStream(final StringBuilder iOutput, Object iValue) { """ Serialize the class name size + class name + object content @param iValue """ if (iValue != null) { if (!(iValue instanceof OSerializableStream)) throw new OSerializationException("Cannot serialize the objec...
java
public StringBuilder toStream(final StringBuilder iOutput, Object iValue) { if (iValue != null) { if (!(iValue instanceof OSerializableStream)) throw new OSerializationException("Cannot serialize the object since it's not implements the OSerializableStream interface"); OSerializableStream ...
[ "public", "StringBuilder", "toStream", "(", "final", "StringBuilder", "iOutput", ",", "Object", "iValue", ")", "{", "if", "(", "iValue", "!=", "null", ")", "{", "if", "(", "!", "(", "iValue", "instanceof", "OSerializableStream", ")", ")", "throw", "new", "...
Serialize the class name size + class name + object content @param iValue
[ "Serialize", "the", "class", "name", "size", "+", "class", "name", "+", "object", "content" ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerEmbedded.java#L46-L57
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/TemplateRest.java
TemplateRest.updateTemplate
@PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload) { """ Updates the information of an specific template If the template it is not in the database, it returns 404 with empty payload <pre> PUT /templ...
java
@PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedT...
[ "@", "PUT", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_XML", ")", "@", "Produces", "(", "MediaType", ".", "APPLICATION_XML", ")", "public", "Response", "updateTemplate", "(", "@", "Context", "HttpHeaders", "hh", ",", "String", "payload", ")", "{", ...
Updates the information of an specific template If the template it is not in the database, it returns 404 with empty payload <pre> PUT /templates Request: POST /templates HTTP/1.1 Accept: application/xml Response: {@code <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <message code="204" message="The templ...
[ "Updates", "the", "information", "of", "an", "specific", "template", "If", "the", "template", "it", "is", "not", "in", "the", "database", "it", "returns", "404", "with", "empty", "payload" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/TemplateRest.java#L351-L367
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
SingleSessionIoHandlerDelegate.messageReceived
public void messageReceived(IoSession session, Object message) throws Exception { """ Delegates the method call to the {@link SingleSessionIoHandler#messageReceived(Object)} method of the handler assigned to this session. """ SingleSessionIoHandler handler = (SingleSessionIoHandler) sessi...
java
public void messageReceived(IoSession session, Object message) throws Exception { SingleSessionIoHandler handler = (SingleSessionIoHandler) session .getAttribute(HANDLER); handler.messageReceived(message); }
[ "public", "void", "messageReceived", "(", "IoSession", "session", ",", "Object", "message", ")", "throws", "Exception", "{", "SingleSessionIoHandler", "handler", "=", "(", "SingleSessionIoHandler", ")", "session", ".", "getAttribute", "(", "HANDLER", ")", ";", "ha...
Delegates the method call to the {@link SingleSessionIoHandler#messageReceived(Object)} method of the handler assigned to this session.
[ "Delegates", "the", "method", "call", "to", "the", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java#L136-L141
twitter/cloudhopper-commons
ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java
SslContextFactory.streamCopy
private static void streamCopy(InputStream is, OutputStream os, byte[] buf, boolean close) throws IOException { """ Copy the contents of is to os. @param is @param os @param buf Can be null @param close If true, is is closed after the copy. @throws IOException """ int len; if (buf == null)...
java
private static void streamCopy(InputStream is, OutputStream os, byte[] buf, boolean close) throws IOException { int len; if (buf == null) { buf = new byte[4096]; } while ((len = is.read(buf)) > 0) { os.write(buf, 0, len); } os.flush(); if (...
[ "private", "static", "void", "streamCopy", "(", "InputStream", "is", ",", "OutputStream", "os", ",", "byte", "[", "]", "buf", ",", "boolean", "close", ")", "throws", "IOException", "{", "int", "len", ";", "if", "(", "buf", "==", "null", ")", "{", "buf"...
Copy the contents of is to os. @param is @param os @param buf Can be null @param close If true, is is closed after the copy. @throws IOException
[ "Copy", "the", "contents", "of", "is", "to", "os", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java#L382-L394
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/RobotiumWebClient.java
RobotiumWebClient.onJsPrompt
@Override public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult r) { """ Overrides onJsPrompt in order to create {@code WebElement} objects based on the web elements attributes prompted by the injections of JavaScript """ if(message != null && (message.co...
java
@Override public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult r) { if(message != null && (message.contains(";,") || message.contains("robotium-finished"))){ if(message.equals("robotium-finished")){ webElementCreator.setFinished(true); } else{ ...
[ "@", "Override", "public", "boolean", "onJsPrompt", "(", "WebView", "view", ",", "String", "url", ",", "String", "message", ",", "String", "defaultValue", ",", "JsPromptResult", "r", ")", "{", "if", "(", "message", "!=", "null", "&&", "(", "message", ".", ...
Overrides onJsPrompt in order to create {@code WebElement} objects based on the web elements attributes prompted by the injections of JavaScript
[ "Overrides", "onJsPrompt", "in", "order", "to", "create", "{" ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/RobotiumWebClient.java#L68-L89
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java
ScriptUtils.executeSqlScript
public static void executeSqlScript(Connection connection, Resource resource) throws ScriptException { """ Execute the given SQL script using default settings for statement separators, comment delimiters, and exception handling flags. <p> Statement separators and comments will be removed before executing indiv...
java
public static void executeSqlScript(Connection connection, Resource resource) throws ScriptException { executeSqlScript(connection, new EncodedResource(resource)); }
[ "public", "static", "void", "executeSqlScript", "(", "Connection", "connection", ",", "Resource", "resource", ")", "throws", "ScriptException", "{", "executeSqlScript", "(", "connection", ",", "new", "EncodedResource", "(", "resource", ")", ")", ";", "}" ]
Execute the given SQL script using default settings for statement separators, comment delimiters, and exception handling flags. <p> Statement separators and comments will be removed before executing individual statements within the supplied script. <p> <strong>Warning</strong>: this method does <em>not</em> release the...
[ "Execute", "the", "given", "SQL", "script", "using", "default", "settings", "for", "statement", "separators", "comment", "delimiters", "and", "exception", "handling", "flags", ".", "<p", ">", "Statement", "separators", "and", "comments", "will", "be", "removed", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java#L371-L373
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/PartitionedFileSourceBase.java
PartitionedFileSourceBase.getLowWaterMark
private long getLowWaterMark(Iterable<WorkUnitState> previousStates, String lowWaterMark) { """ Gets the LWM for this job runs. The new LWM is the HWM of the previous run + 1 unit (day,hour,minute..etc). If there was no previous execution then it is set to the given lowWaterMark + 1 unit. """ long lowWat...
java
private long getLowWaterMark(Iterable<WorkUnitState> previousStates, String lowWaterMark) { long lowWaterMarkValue = retriever.getWatermarkFromString(lowWaterMark); // Find the max HWM from the previous states, this is the new current LWM for (WorkUnitState previousState : previousStates) { if (prev...
[ "private", "long", "getLowWaterMark", "(", "Iterable", "<", "WorkUnitState", ">", "previousStates", ",", "String", "lowWaterMark", ")", "{", "long", "lowWaterMarkValue", "=", "retriever", ".", "getWatermarkFromString", "(", "lowWaterMark", ")", ";", "// Find the max H...
Gets the LWM for this job runs. The new LWM is the HWM of the previous run + 1 unit (day,hour,minute..etc). If there was no previous execution then it is set to the given lowWaterMark + 1 unit.
[ "Gets", "the", "LWM", "for", "this", "job", "runs", ".", "The", "new", "LWM", "is", "the", "HWM", "of", "the", "previous", "run", "+", "1", "unit", "(", "day", "hour", "minute", "..", "etc", ")", ".", "If", "there", "was", "no", "previous", "execut...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/PartitionedFileSourceBase.java#L354-L369
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleUploads.java
ModuleUploads.fetchOne
public CMAUpload fetchOne(String spaceId, String uploadId) { """ Get information about the given upload. <p> This method will override the configuration specified through {@link CMAClient.Builder#setSpaceId(String)} and will ignore {@link CMAClient.Builder#setEnvironmentId(String)}. @param spaceId which sp...
java
public CMAUpload fetchOne(String spaceId, String uploadId) { assertNotNull(spaceId, "spaceId"); assertNotNull(uploadId, "uploadId"); return service.fetchOne(spaceId, uploadId).blockingFirst(); }
[ "public", "CMAUpload", "fetchOne", "(", "String", "spaceId", ",", "String", "uploadId", ")", "{", "assertNotNull", "(", "spaceId", ",", "\"spaceId\"", ")", ";", "assertNotNull", "(", "uploadId", ",", "\"uploadId\"", ")", ";", "return", "service", ".", "fetchOn...
Get information about the given upload. <p> This method will override the configuration specified through {@link CMAClient.Builder#setSpaceId(String)} and will ignore {@link CMAClient.Builder#setEnvironmentId(String)}. @param spaceId which space is this upload hosted under? @param uploadId what id does the upload hav...
[ "Get", "information", "about", "the", "given", "upload", ".", "<p", ">", "This", "method", "will", "override", "the", "configuration", "specified", "through", "{", "@link", "CMAClient", ".", "Builder#setSpaceId", "(", "String", ")", "}", "and", "will", "ignore...
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleUploads.java#L182-L187
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java
UnicodeSet.addAllTo
public static <T, U extends Collection<T>> U addAllTo(Iterable<T> source, U target) { """ Utility for adding the contents of an iterable to a collection. @hide unsupported on Android """ for (T item : source) { target.add(item); } return target; }
java
public static <T, U extends Collection<T>> U addAllTo(Iterable<T> source, U target) { for (T item : source) { target.add(item); } return target; }
[ "public", "static", "<", "T", ",", "U", "extends", "Collection", "<", "T", ">", ">", "U", "addAllTo", "(", "Iterable", "<", "T", ">", "source", ",", "U", "target", ")", "{", "for", "(", "T", "item", ":", "source", ")", "{", "target", ".", "add", ...
Utility for adding the contents of an iterable to a collection. @hide unsupported on Android
[ "Utility", "for", "adding", "the", "contents", "of", "an", "iterable", "to", "a", "collection", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L4528-L4533
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java
PhotosInterface.addTags
public void addTags(String photoId, String[] tags) throws FlickrException { """ Add tags to a photo. This method requires authentication with 'write' permission. @param photoId The photo ID @param tags The tags @throws FlickrException """ Map<String, Object> parameters = new HashMap<String, ...
java
public void addTags(String photoId, String[] tags) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_ADD_TAGS); parameters.put("photo_id", photoId); parameters.put("tags", StringUtilities.join(tags, " ", true));...
[ "public", "void", "addTags", "(", "String", "photoId", ",", "String", "[", "]", "tags", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", "...
Add tags to a photo. This method requires authentication with 'write' permission. @param photoId The photo ID @param tags The tags @throws FlickrException
[ "Add", "tags", "to", "a", "photo", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java#L142-L153
duracloud/duracloud
s3storageprovider/src/main/java/org/duracloud/s3storage/S3StorageProvider.java
S3StorageProvider.getSpaceCount
protected String getSpaceCount(String spaceId, int maxCount) { """ /* Counts the number of items in a space up to the maxCount. If maxCount is reached or exceeded, the returned string will indicate this with a trailing '+' character (e.g. 1000+). Note that anecdotal evidence shows that this method of countin...
java
protected String getSpaceCount(String spaceId, int maxCount) { List<String> spaceContentChunk = null; long count = 0; do { String marker = null; if (spaceContentChunk != null && spaceContentChunk.size() > 0) { marker = spaceContentChunk.get(spaceContentCh...
[ "protected", "String", "getSpaceCount", "(", "String", "spaceId", ",", "int", "maxCount", ")", "{", "List", "<", "String", ">", "spaceContentChunk", "=", "null", ";", "long", "count", "=", "0", ";", "do", "{", "String", "marker", "=", "null", ";", "if", ...
/* Counts the number of items in a space up to the maxCount. If maxCount is reached or exceeded, the returned string will indicate this with a trailing '+' character (e.g. 1000+). Note that anecdotal evidence shows that this method of counting (using size of chunked calls) is faster in most cases than enumerating the ...
[ "/", "*", "Counts", "the", "number", "of", "items", "in", "a", "space", "up", "to", "the", "maxCount", ".", "If", "maxCount", "is", "reached", "or", "exceeded", "the", "returned", "string", "will", "indicate", "this", "with", "a", "trailing", "+", "chara...
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/s3storageprovider/src/main/java/org/duracloud/s3storage/S3StorageProvider.java#L409-L430
auth0/jwks-rsa-java
src/main/java/com/auth0/jwk/JwkProviderBuilder.java
JwkProviderBuilder.build
public JwkProvider build() { """ Creates a {@link JwkProvider} @return a newly created {@link JwkProvider} """ JwkProvider urlProvider = new UrlJwkProvider(url); if (this.rateLimited) { urlProvider = new RateLimitedJwkProvider(urlProvider, bucket); } if (this.cach...
java
public JwkProvider build() { JwkProvider urlProvider = new UrlJwkProvider(url); if (this.rateLimited) { urlProvider = new RateLimitedJwkProvider(urlProvider, bucket); } if (this.cached) { urlProvider = new GuavaCachedJwkProvider(urlProvider, cacheSize, expiresIn, ...
[ "public", "JwkProvider", "build", "(", ")", "{", "JwkProvider", "urlProvider", "=", "new", "UrlJwkProvider", "(", "url", ")", ";", "if", "(", "this", ".", "rateLimited", ")", "{", "urlProvider", "=", "new", "RateLimitedJwkProvider", "(", "urlProvider", ",", ...
Creates a {@link JwkProvider} @return a newly created {@link JwkProvider}
[ "Creates", "a", "{", "@link", "JwkProvider", "}" ]
train
https://github.com/auth0/jwks-rsa-java/blob/9deba212be4278e50ae75a54b3bc6c96359b7e69/src/main/java/com/auth0/jwk/JwkProviderBuilder.java#L120-L129
Nexmo/nexmo-java
src/main/java/com/nexmo/client/redact/RedactClient.java
RedactClient.redactTransaction
public void redactTransaction(String id, RedactRequest.Product product, RedactRequest.Type type) throws IOException, NexmoClientException { """ Submit a request to the Redact API to redact a transaction. @param id The transaction id to redact. @param product The {@link com.nexmo.client.redact.RedactReques...
java
public void redactTransaction(String id, RedactRequest.Product product, RedactRequest.Type type) throws IOException, NexmoClientException { RedactRequest request = new RedactRequest(id, product); request.setType(type); this.redactTransaction(request); }
[ "public", "void", "redactTransaction", "(", "String", "id", ",", "RedactRequest", ".", "Product", "product", ",", "RedactRequest", ".", "Type", "type", ")", "throws", "IOException", ",", "NexmoClientException", "{", "RedactRequest", "request", "=", "new", "RedactR...
Submit a request to the Redact API to redact a transaction. @param id The transaction id to redact. @param product The {@link com.nexmo.client.redact.RedactRequest.Product} which corresponds to the transaction. @param type The {@link com.nexmo.client.redact.RedactRequest.Type} which is required if redacting SM...
[ "Submit", "a", "request", "to", "the", "Redact", "API", "to", "redact", "a", "transaction", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/redact/RedactClient.java#L67-L72
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setFieldByAlias
public void setFieldByAlias(String alias, Object value) { """ Set the value of a field using its alias. @param alias field alias @param value field value """ set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value); }
java
public void setFieldByAlias(String alias, Object value) { set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value); }
[ "public", "void", "setFieldByAlias", "(", "String", "alias", ",", "Object", "value", ")", "{", "set", "(", "getParentFile", "(", ")", ".", "getCustomFields", "(", ")", ".", "getFieldByAlias", "(", "FieldTypeClass", ".", "TASK", ",", "alias", ")", ",", "val...
Set the value of a field using its alias. @param alias field alias @param value field value
[ "Set", "the", "value", "of", "a", "field", "using", "its", "alias", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3743-L3746
jhipster/jhipster
jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java
QueryService.buildSpecification
protected <X> Specification<ENTITY> buildSpecification(Filter<X> filter, SingularAttribute<? super ENTITY, X> field) { """ Helper function to return a specification for filtering on a single field, where equality, and null/non-null conditions are supported. @param filter the individual attribute filter...
java
protected <X> Specification<ENTITY> buildSpecification(Filter<X> filter, SingularAttribute<? super ENTITY, X> field) { return buildSpecification(filter, root -> root.get(field)); }
[ "protected", "<", "X", ">", "Specification", "<", "ENTITY", ">", "buildSpecification", "(", "Filter", "<", "X", ">", "filter", ",", "SingularAttribute", "<", "?", "super", "ENTITY", ",", "X", ">", "field", ")", "{", "return", "buildSpecification", "(", "fi...
Helper function to return a specification for filtering on a single field, where equality, and null/non-null conditions are supported. @param filter the individual attribute filter coming from the frontend. @param field the JPA static metamodel representing the field. @param <X> The type of the attribute which is ...
[ "Helper", "function", "to", "return", "a", "specification", "for", "filtering", "on", "a", "single", "field", "where", "equality", "and", "null", "/", "non", "-", "null", "conditions", "are", "supported", "." ]
train
https://github.com/jhipster/jhipster/blob/5dcf4239c7cc035e188ef02447d3c628fac5c5d9/jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java#L55-L58
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
MapMessage.with
@SuppressWarnings("unchecked") public M with(final String key, final String value) { """ Adds an item to the data Map in fluent style. @param key The name of the data item. @param value The value of the data item. @return {@code this} """ put(key, value); return (M) this; }
java
@SuppressWarnings("unchecked") public M with(final String key, final String value) { put(key, value); return (M) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "M", "with", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "put", "(", "key", ",", "value", ")", ";", "return", "(", "M", ")", "this", ";", "}" ]
Adds an item to the data Map in fluent style. @param key The name of the data item. @param value The value of the data item. @return {@code this}
[ "Adds", "an", "item", "to", "the", "data", "Map", "in", "fluent", "style", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java#L665-L669
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonArray.java
JsonArray.put
public JsonArray put(int index, Object value) throws JsonException { """ Sets the value at {@code index} to {@code value}, null padding this array to the required length if necessary. If a value already exists at {@code index}, it will be replaced. @param value a {@link JsonObject}, {@link JsonArray}, String,...
java
public JsonArray put(int index, Object value) throws JsonException { checkIfFrozen(); while (values.size() <= index) { values.add(JSON_NULL); } values.set(index, wrap(value)); return this; }
[ "public", "JsonArray", "put", "(", "int", "index", ",", "Object", "value", ")", "throws", "JsonException", "{", "checkIfFrozen", "(", ")", ";", "while", "(", "values", ".", "size", "(", ")", "<=", "index", ")", "{", "values", ".", "add", "(", "JSON_NUL...
Sets the value at {@code index} to {@code value}, null padding this array to the required length if necessary. If a value already exists at {@code index}, it will be replaced. @param value a {@link JsonObject}, {@link JsonArray}, String, Boolean, Integer, Long, Double, or {@code null}. May not be {@link Double#isNaN()...
[ "Sets", "the", "value", "at", "{", "@code", "index", "}", "to", "{", "@code", "value", "}", "null", "padding", "this", "array", "to", "the", "required", "length", "if", "necessary", ".", "If", "a", "value", "already", "exists", "at", "{", "@code", "ind...
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonArray.java#L222-L229
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.evaluateROC
public <T extends ROC> T evaluateROC(JavaRDD<DataSet> data, int thresholdSteps, int evaluationMinibatchSize) { """ Perform ROC analysis/evaluation on the given DataSet in a distributed manner @param data Test set data (to evaluate on) @param thresholdSteps Number of threshold steps ...
java
public <T extends ROC> T evaluateROC(JavaRDD<DataSet> data, int thresholdSteps, int evaluationMinibatchSize) { return (T)doEvaluation(data, new org.deeplearning4j.eval.ROC(thresholdSteps), evaluationMinibatchSize); }
[ "public", "<", "T", "extends", "ROC", ">", "T", "evaluateROC", "(", "JavaRDD", "<", "DataSet", ">", "data", ",", "int", "thresholdSteps", ",", "int", "evaluationMinibatchSize", ")", "{", "return", "(", "T", ")", "doEvaluation", "(", "data", ",", "new", "...
Perform ROC analysis/evaluation on the given DataSet in a distributed manner @param data Test set data (to evaluate on) @param thresholdSteps Number of threshold steps for ROC - see {@link ROC} @param evaluationMinibatchSize Minibatch size to use when performing ROC evaluation @return ROC f...
[ "Perform", "ROC", "analysis", "/", "evaluation", "on", "the", "given", "DataSet", "in", "a", "distributed", "manner" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L675-L677
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Long checkNull(Long value, long elseValue) { """ 检查Long是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Long} @since 1.0.8 """ return checkNull(value, Long.valueOf(elseValue)); }
java
public static Long checkNull(Long value, long elseValue) { return checkNull(value, Long.valueOf(elseValue)); }
[ "public", "static", "Long", "checkNull", "(", "Long", "value", ",", "long", "elseValue", ")", "{", "return", "checkNull", "(", "value", ",", "Long", ".", "valueOf", "(", "elseValue", ")", ")", ";", "}" ]
检查Long是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Long} @since 1.0.8
[ "检查Long是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1267-L1269
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java
InsertAllRequest.of
public static InsertAllRequest of(String datasetId, String tableId, Iterable<RowToInsert> rows) { """ Returns a {@code InsertAllRequest} object given the destination table and the rows to insert. """ return newBuilder(datasetId, tableId, rows).build(); }
java
public static InsertAllRequest of(String datasetId, String tableId, Iterable<RowToInsert> rows) { return newBuilder(datasetId, tableId, rows).build(); }
[ "public", "static", "InsertAllRequest", "of", "(", "String", "datasetId", ",", "String", "tableId", ",", "Iterable", "<", "RowToInsert", ">", "rows", ")", "{", "return", "newBuilder", "(", "datasetId", ",", "tableId", ",", "rows", ")", ".", "build", "(", "...
Returns a {@code InsertAllRequest} object given the destination table and the rows to insert.
[ "Returns", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java#L409-L411
alkacon/opencms-core
src/org/opencms/ui/apps/sessions/CmsSessionsTable.java
CmsSessionsTable.onItemClick
void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) { """ Handles the table item clicks, including clicks on images inside of a table item.<p> @param event the click event @param itemId of the clicked row @param propertyId column id """ if (!event.isCtrlKey() && !even...
java
void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) { if (!event.isCtrlKey() && !event.isShiftKey()) { changeValueIfNotMultiSelect(itemId); // don't interfere with multi-selection using control key if (event.getButton().equals(MouseButton.RIGHT...
[ "void", "onItemClick", "(", "MouseEvents", ".", "ClickEvent", "event", ",", "Object", "itemId", ",", "Object", "propertyId", ")", "{", "if", "(", "!", "event", ".", "isCtrlKey", "(", ")", "&&", "!", "event", ".", "isShiftKey", "(", ")", ")", "{", "chan...
Handles the table item clicks, including clicks on images inside of a table item.<p> @param event the click event @param itemId of the clicked row @param propertyId column id
[ "Handles", "the", "table", "item", "clicks", "including", "clicks", "on", "images", "inside", "of", "a", "table", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sessions/CmsSessionsTable.java#L613-L628
netty/netty
codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySessionHandler.java
SpdySessionHandler.issueSessionError
private void issueSessionError( ChannelHandlerContext ctx, SpdySessionStatus status) { """ /* SPDY Session Error Handling: When a session error occurs, the endpoint encountering the error must first send a GOAWAY frame with the Stream-ID of the most recently received stream from the remote endpoi...
java
private void issueSessionError( ChannelHandlerContext ctx, SpdySessionStatus status) { sendGoAwayFrame(ctx, status).addListener(new ClosingChannelFutureListener(ctx, ctx.newPromise())); }
[ "private", "void", "issueSessionError", "(", "ChannelHandlerContext", "ctx", ",", "SpdySessionStatus", "status", ")", "{", "sendGoAwayFrame", "(", "ctx", ",", "status", ")", ".", "addListener", "(", "new", "ClosingChannelFutureListener", "(", "ctx", ",", "ctx", "....
/* SPDY Session Error Handling: When a session error occurs, the endpoint encountering the error must first send a GOAWAY frame with the Stream-ID of the most recently received stream from the remote endpoint, and the error code for why the session is terminating. After sending the GOAWAY frame, the endpoint must clo...
[ "/", "*", "SPDY", "Session", "Error", "Handling", ":" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySessionHandler.java#L660-L664
JodaOrg/joda-time-jsptags
src/main/java/org/joda/time/contrib/jsptag/DateTimeZoneSupport.java
DateTimeZoneSupport.getDateTimeZone
static DateTimeZone getDateTimeZone(PageContext pc, Tag fromTag) { """ Determines and returns the time zone to be used by the given action. <p> If the given action is nested inside a &lt;dateTimeZone&gt; action, the time zone is taken from the enclosing &lt;dateTimeZone&gt; action. <p> Otherwise, the time zon...
java
static DateTimeZone getDateTimeZone(PageContext pc, Tag fromTag) { DateTimeZone tz = null; Tag t = findAncestorWithClass(fromTag, DateTimeZoneSupport.class); if (t != null) { // use time zone from parent <timeZone> tag DateTimeZoneSupport parent = (DateTimeZoneSupport) t...
[ "static", "DateTimeZone", "getDateTimeZone", "(", "PageContext", "pc", ",", "Tag", "fromTag", ")", "{", "DateTimeZone", "tz", "=", "null", ";", "Tag", "t", "=", "findAncestorWithClass", "(", "fromTag", ",", "DateTimeZoneSupport", ".", "class", ")", ";", "if", ...
Determines and returns the time zone to be used by the given action. <p> If the given action is nested inside a &lt;dateTimeZone&gt; action, the time zone is taken from the enclosing &lt;dateTimeZone&gt; action. <p> Otherwise, the time zone configuration setting <tt>org.joda.time.FMT_TIME_ZONE</tt> is used. @param pc ...
[ "Determines", "and", "returns", "the", "time", "zone", "to", "be", "used", "by", "the", "given", "action", ".", "<p", ">", "If", "the", "given", "action", "is", "nested", "inside", "a", "&lt", ";", "dateTimeZone&gt", ";", "action", "the", "time", "zone",...
train
https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/DateTimeZoneSupport.java#L109-L134
assaydepot/assaydepot-java
src/main/java/com/assaydepot/AssayDepotTreeImpl.java
AssayDepotTreeImpl.buildFacetString
private String buildFacetString(List<String> facetNames, List<String>facetValues ) { """ Takes in a list of names/values and pairs them up to make a good url. if the list sizes don't match up does the best it can by matching up the smallest number of pairs. @param facetNames @param facetValues @return "...
java
private String buildFacetString(List<String> facetNames, List<String>facetValues ) { StringBuilder builder = new StringBuilder(); if( facetNames != null && facetValues != null ) { int pairsCount = -1; if( facetNames.size() != facetValues.size() ) { pairsCount = facetNames.size() > facetValues.size(...
[ "private", "String", "buildFacetString", "(", "List", "<", "String", ">", "facetNames", ",", "List", "<", "String", ">", "facetValues", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "facetNames", "!=", "null", ...
Takes in a list of names/values and pairs them up to make a good url. if the list sizes don't match up does the best it can by matching up the smallest number of pairs. @param facetNames @param facetValues @return
[ "Takes", "in", "a", "list", "of", "names", "/", "values", "and", "pairs", "them", "up", "to", "make", "a", "good", "url", ".", "if", "the", "list", "sizes", "don", "t", "match", "up", "does", "the", "best", "it", "can", "by", "matching", "up", "the...
train
https://github.com/assaydepot/assaydepot-java/blob/26a1af17651dbee3d7e9c17932eabea828933d01/src/main/java/com/assaydepot/AssayDepotTreeImpl.java#L203-L229
apache/reef
lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/evaluator/AggregateContainer.java
AggregateContainer.aggregateTasklets
private void aggregateTasklets(final AggregateTriggerType type) { """ Performs the output aggregation and generates the {@link WorkerToMasterReports} to report back to the {@link org.apache.reef.vortex.driver.VortexDriver}. """ final List<WorkerToMasterReport> workerToMasterReports = new ArrayList<>(); ...
java
private void aggregateTasklets(final AggregateTriggerType type) { final List<WorkerToMasterReport> workerToMasterReports = new ArrayList<>(); final List<Object> results = new ArrayList<>(); final List<Integer> aggregatedTasklets = new ArrayList<>(); // Synchronization to prevent duplication of work on ...
[ "private", "void", "aggregateTasklets", "(", "final", "AggregateTriggerType", "type", ")", "{", "final", "List", "<", "WorkerToMasterReport", ">", "workerToMasterReports", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "List", "<", "Object", ">", "result...
Performs the output aggregation and generates the {@link WorkerToMasterReports} to report back to the {@link org.apache.reef.vortex.driver.VortexDriver}.
[ "Performs", "the", "output", "aggregation", "and", "generates", "the", "{" ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/evaluator/AggregateContainer.java#L104-L142
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/action/ActionableHelper.java
ActionableHelper.deleteFilePathOnExit
public static void deleteFilePathOnExit(FilePath workspace, String path) throws IOException, InterruptedException { """ Deletes a FilePath file on exit. @param workspace The build workspace. @param path The path in the workspace. @throws IOException In case of a missing file. """ FilePath fil...
java
public static void deleteFilePathOnExit(FilePath workspace, String path) throws IOException, InterruptedException { FilePath filePath = new FilePath(workspace, path); deleteFilePathOnExit(filePath); }
[ "public", "static", "void", "deleteFilePathOnExit", "(", "FilePath", "workspace", ",", "String", "path", ")", "throws", "IOException", ",", "InterruptedException", "{", "FilePath", "filePath", "=", "new", "FilePath", "(", "workspace", ",", "path", ")", ";", "del...
Deletes a FilePath file on exit. @param workspace The build workspace. @param path The path in the workspace. @throws IOException In case of a missing file.
[ "Deletes", "a", "FilePath", "file", "on", "exit", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/action/ActionableHelper.java#L295-L298
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/query/StructuredQueryBuilder.java
StructuredQueryBuilder.andNot
public StructuredQueryDefinition andNot(StructuredQueryDefinition positive, StructuredQueryDefinition negative) { """ Defines an AND NOT query combining a positive and negative query. You can use an AND or OR query over a list of query definitions as the positive or negative query. @param positive the positi...
java
public StructuredQueryDefinition andNot(StructuredQueryDefinition positive, StructuredQueryDefinition negative) { checkQuery(positive); checkQuery(negative); return new AndNotQuery(positive, negative); }
[ "public", "StructuredQueryDefinition", "andNot", "(", "StructuredQueryDefinition", "positive", ",", "StructuredQueryDefinition", "negative", ")", "{", "checkQuery", "(", "positive", ")", ";", "checkQuery", "(", "negative", ")", ";", "return", "new", "AndNotQuery", "("...
Defines an AND NOT query combining a positive and negative query. You can use an AND or OR query over a list of query definitions as the positive or negative query. @param positive the positive query definition @param negative the negative query definition @return the StructuredQueryDefinition for the AND NOT ...
[ "Defines", "an", "AND", "NOT", "query", "combining", "a", "positive", "and", "negative", "query", ".", "You", "can", "use", "an", "AND", "or", "OR", "query", "over", "a", "list", "of", "query", "definitions", "as", "the", "positive", "or", "negative", "q...
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/query/StructuredQueryBuilder.java#L346-L350
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyBufferPool.java
NettyBufferPool.getNumberOfAllocatedChunks
private long getNumberOfAllocatedChunks(Object arena, String chunkListFieldName) throws NoSuchFieldException, IllegalAccessException { """ Returns the number of allocated bytes of the given arena and chunk list. @param arena Arena to gather statistics about. @param chunkListFieldName Chunk list...
java
private long getNumberOfAllocatedChunks(Object arena, String chunkListFieldName) throws NoSuchFieldException, IllegalAccessException { // Each PoolArena<ByteBuffer> stores its allocated PoolChunk<ByteBuffer> // instances grouped by usage (field qInit, q000, q025, etc.) in // PoolChunkList<ByteBuffer> lists. E...
[ "private", "long", "getNumberOfAllocatedChunks", "(", "Object", "arena", ",", "String", "chunkListFieldName", ")", "throws", "NoSuchFieldException", ",", "IllegalAccessException", "{", "// Each PoolArena<ByteBuffer> stores its allocated PoolChunk<ByteBuffer>", "// instances grouped b...
Returns the number of allocated bytes of the given arena and chunk list. @param arena Arena to gather statistics about. @param chunkListFieldName Chunk list to check. @return Number of total allocated bytes by this arena. @throws NoSuchFieldException Error getting the statistics (should not happen whe...
[ "Returns", "the", "number", "of", "allocated", "bytes", "of", "the", "given", "arena", "and", "chunk", "list", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyBufferPool.java#L188-L223
dustin/java-memcached-client
src/main/java/net/spy/memcached/auth/AuthThreadMonitor.java
AuthThreadMonitor.authConnection
public synchronized void authConnection(MemcachedConnection conn, OperationFactory opFact, AuthDescriptor authDescriptor, MemcachedNode node) { """ Authenticate a new connection. This is typically used by a MemcachedNode in order to authenticate a connection right after it has been established. If ...
java
public synchronized void authConnection(MemcachedConnection conn, OperationFactory opFact, AuthDescriptor authDescriptor, MemcachedNode node) { interruptOldAuth(node); AuthThread newSASLAuthenticator = new AuthThread(conn, opFact, authDescriptor, node); nodeMap.put(node, newSASLAuthentic...
[ "public", "synchronized", "void", "authConnection", "(", "MemcachedConnection", "conn", ",", "OperationFactory", "opFact", ",", "AuthDescriptor", "authDescriptor", ",", "MemcachedNode", "node", ")", "{", "interruptOldAuth", "(", "node", ")", ";", "AuthThread", "newSAS...
Authenticate a new connection. This is typically used by a MemcachedNode in order to authenticate a connection right after it has been established. If an old, but not yet completed authentication exists this will stop it in order to create a new authentication attempt. @param conn @param opFact @param authDescriptor ...
[ "Authenticate", "a", "new", "connection", ".", "This", "is", "typically", "used", "by", "a", "MemcachedNode", "in", "order", "to", "authenticate", "a", "connection", "right", "after", "it", "has", "been", "established", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/auth/AuthThreadMonitor.java#L57-L64
juebanlin/util4j
util4j/src/main/java/net/jueb/util4j/proxy/methodProxy/MethodHandleUtil.java
MethodHandleUtil.findMethodHandle
public static MethodHandle findMethodHandle(Object target,String methodName,Class<?> ...ptypes) { """ 获取对象方法句柄 @param target 对象 @param methodName 方法名 @param ptypes 方法参数类型列表 @return """ MethodHandle mh=null; MethodHandles.Lookup lookup = MethodHandles.lookup(); try { MethodType type = Met...
java
public static MethodHandle findMethodHandle(Object target,String methodName,Class<?> ...ptypes) { MethodHandle mh=null; MethodHandles.Lookup lookup = MethodHandles.lookup(); try { MethodType type = MethodType.methodType(target.getClass(),ptypes); mh = lookup.findVirtual(target.getClass(),met...
[ "public", "static", "MethodHandle", "findMethodHandle", "(", "Object", "target", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "ptypes", ")", "{", "MethodHandle", "mh", "=", "null", ";", "MethodHandles", ".", "Lookup", "lookup", "=", "Meth...
获取对象方法句柄 @param target 对象 @param methodName 方法名 @param ptypes 方法参数类型列表 @return
[ "获取对象方法句柄" ]
train
https://github.com/juebanlin/util4j/blob/c404b2dbdedf7a8890533b351257fa8af4f1439f/util4j/src/main/java/net/jueb/util4j/proxy/methodProxy/MethodHandleUtil.java#L68-L78