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
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/geopap4/DaoMetadata.java
DaoMetadata.fillProjectMetadata
public static void fillProjectMetadata(Connection connection, String name, String description, String notes, String creationUser) throws Exception { """ Populate the project metadata table. @param name the project name @param description an optional description. @param notes optional notes. @...
java
public static void fillProjectMetadata(Connection connection, String name, String description, String notes, String creationUser) throws Exception { Date creationDate = new Date(); if (name == null) { name = "project-" + ETimeUtilities.INSTANCE.TIME_FORMATTER_LOCAL.format(creationDate); ...
[ "public", "static", "void", "fillProjectMetadata", "(", "Connection", "connection", ",", "String", "name", ",", "String", "description", ",", "String", "notes", ",", "String", "creationUser", ")", "throws", "Exception", "{", "Date", "creationDate", "=", "new", "...
Populate the project metadata table. @param name the project name @param description an optional description. @param notes optional notes. @param creationUser the user creating the project. @throws java.io.IOException if something goes wrong.
[ "Populate", "the", "project", "metadata", "table", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/geopap4/DaoMetadata.java#L74-L97
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java
GVRGenericConstraint.setAngularLowerLimits
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) { """ Sets the lower limits for the "moving" body rotation relative to joint point. @param limitX the X axis lower rotation limit (in radians) @param limitY the Y axis lower rotation limit (in radians) @param limitZ the Z axis lower r...
java
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ); }
[ "public", "void", "setAngularLowerLimits", "(", "float", "limitX", ",", "float", "limitY", ",", "float", "limitZ", ")", "{", "Native3DGenericConstraint", ".", "setAngularLowerLimits", "(", "getNative", "(", ")", ",", "limitX", ",", "limitY", ",", "limitZ", ")", ...
Sets the lower limits for the "moving" body rotation relative to joint point. @param limitX the X axis lower rotation limit (in radians) @param limitY the Y axis lower rotation limit (in radians) @param limitZ the Z axis lower rotation limit (in radians)
[ "Sets", "the", "lower", "limits", "for", "the", "moving", "body", "rotation", "relative", "to", "joint", "point", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L105-L107
gwt-maven-plugin/gwt-maven-plugin
src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java
RunMojo.copyDirectoryStructureIfModified
private void copyDirectoryStructureIfModified(File sourceDir, File destDir) throws IOException { """ Copied a directory structure with deafault exclusions (.svn, CVS, etc) @param sourceDir The source directory to copy, must not be <code>null</code>. @param destDir The target directory to copy to, m...
java
private void copyDirectoryStructureIfModified(File sourceDir, File destDir) throws IOException { DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir( sourceDir ); scanner.addDefaultExcludes(); scanner.scan(); /* * NOTE: Make sure t...
[ "private", "void", "copyDirectoryStructureIfModified", "(", "File", "sourceDir", ",", "File", "destDir", ")", "throws", "IOException", "{", "DirectoryScanner", "scanner", "=", "new", "DirectoryScanner", "(", ")", ";", "scanner", ".", "setBasedir", "(", "sourceDir", ...
Copied a directory structure with deafault exclusions (.svn, CVS, etc) @param sourceDir The source directory to copy, must not be <code>null</code>. @param destDir The target directory to copy to, must not be <code>null</code>. @throws java.io.IOException If the directory structure could not be copied.
[ "Copied", "a", "directory", "structure", "with", "deafault", "exclusions", "(", ".", "svn", "CVS", "etc", ")" ]
train
https://github.com/gwt-maven-plugin/gwt-maven-plugin/blob/0cdd5054b43f182cc22a8acf61ec79ac42b0dfdc/src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java#L542-L566
alkacon/opencms-core
src/org/opencms/db/generic/CmsHistoryDriver.java
CmsHistoryDriver.internalCleanup
protected void internalCleanup(CmsDbContext dbc, I_CmsHistoryResource resource) throws CmsDataAccessException { """ Deletes all historical entries of subresources of a folder without any historical netry left.<p> @param dbc the current database context @param resource the resource to check @throws CmsDataAc...
java
protected void internalCleanup(CmsDbContext dbc, I_CmsHistoryResource resource) throws CmsDataAccessException { Connection conn = null; PreparedStatement stmt = null; ResultSet res = null; Map<CmsUUID, Integer> tmpSubResources = new HashMap<CmsUUID, Integer>(); // if is folder ...
[ "protected", "void", "internalCleanup", "(", "CmsDbContext", "dbc", ",", "I_CmsHistoryResource", "resource", ")", "throws", "CmsDataAccessException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "ResultSet", "res", "=",...
Deletes all historical entries of subresources of a folder without any historical netry left.<p> @param dbc the current database context @param resource the resource to check @throws CmsDataAccessException if something goes wrong
[ "Deletes", "all", "historical", "entries", "of", "subresources", "of", "a", "folder", "without", "any", "historical", "netry", "left", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsHistoryDriver.java#L1606-L1643
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ReferrerURLCookieHandler.java
ReferrerURLCookieHandler.invalidateCookie
public void invalidateCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, boolean enableHttpOnly) { """ Invalidate (clear) the referrer URL cookie in the HttpServletResponse. Setting age to 0 invalidates it. @param res """ Cookie c = new Cookie(cookieName, ""); if (co...
java
public void invalidateCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, boolean enableHttpOnly) { Cookie c = new Cookie(cookieName, ""); if (cookieName.equals("WASReqURL")) { c.setPath(getPathName(req)); } else { c.setPath("/"); } ...
[ "public", "void", "invalidateCookie", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "String", "cookieName", ",", "boolean", "enableHttpOnly", ")", "{", "Cookie", "c", "=", "new", "Cookie", "(", "cookieName", ",", "\"\"", ")", ";", "...
Invalidate (clear) the referrer URL cookie in the HttpServletResponse. Setting age to 0 invalidates it. @param res
[ "Invalidate", "(", "clear", ")", "the", "referrer", "URL", "cookie", "in", "the", "HttpServletResponse", ".", "Setting", "age", "to", "0", "invalidates", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ReferrerURLCookieHandler.java#L130-L145
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/optimization/EstimateKeywordTraffic.java
EstimateKeywordTraffic.calculateMean
private static Double calculateMean(Money minMoney, Money maxMoney) { """ Returns the mean of the {@code microAmount} of the two Money values if neither is null, else returns null. """ if (minMoney == null || maxMoney == null) { return null; } return calculateMean(minMoney.getMicroAmount(), ...
java
private static Double calculateMean(Money minMoney, Money maxMoney) { if (minMoney == null || maxMoney == null) { return null; } return calculateMean(minMoney.getMicroAmount(), maxMoney.getMicroAmount()); }
[ "private", "static", "Double", "calculateMean", "(", "Money", "minMoney", ",", "Money", "maxMoney", ")", "{", "if", "(", "minMoney", "==", "null", "||", "maxMoney", "==", "null", ")", "{", "return", "null", ";", "}", "return", "calculateMean", "(", "minMon...
Returns the mean of the {@code microAmount} of the two Money values if neither is null, else returns null.
[ "Returns", "the", "mean", "of", "the", "{" ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/optimization/EstimateKeywordTraffic.java#L283-L288
unbescape/unbescape
src/main/java/org/unbescape/json/JsonEscape.java
JsonEscape.unescapeJson
public static void unescapeJson(final Reader reader, final Writer writer) throws IOException { """ <p> Perform a JSON <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operatio...
java
public static void unescapeJson(final Reader reader, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } JsonEscapeUtil.unescape(reader, writer); }
[ "public", "static", "void", "unescapeJson", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writer' ...
<p> Perform a JSON <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> JSON unescape of SECs and u-based escapes. </p> <p> This method is <strong>threa...
[ "<p", ">", "Perform", "a", "JSON", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", "p", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/json/JsonEscape.java#L957-L966
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java
ChannelUtils.debugTrace
@Override protected void debugTrace(Object logTool, String msg, Object... parameters) { """ Debug trace using either Tr or Logger @param logTool Caller's LogTool (should be Logger OR TraceComponent) @param msg Debug message @see ChannelUtilsBase#debugTrace(Object, String) """ Tr.debug((Trace...
java
@Override protected void debugTrace(Object logTool, String msg, Object... parameters) { Tr.debug((TraceComponent) logTool, msg, parameters); }
[ "@", "Override", "protected", "void", "debugTrace", "(", "Object", "logTool", ",", "String", "msg", ",", "Object", "...", "parameters", ")", "{", "Tr", ".", "debug", "(", "(", "TraceComponent", ")", "logTool", ",", "msg", ",", "parameters", ")", ";", "}"...
Debug trace using either Tr or Logger @param logTool Caller's LogTool (should be Logger OR TraceComponent) @param msg Debug message @see ChannelUtilsBase#debugTrace(Object, String)
[ "Debug", "trace", "using", "either", "Tr", "or", "Logger" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java#L196-L199
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/EntityFieldAnnotationRule.java
EntityFieldAnnotationRule.checkForGenerator
private void checkForGenerator(final Class<?> clazz, Field field, GeneratedValue generatedValue, String schemaName) { """ Validate for generator. @param clazz @param field @param generatedValue @param schemaName @throws RuleValidationException """ TableGenerator tableGenerator = field.getAnnota...
java
private void checkForGenerator(final Class<?> clazz, Field field, GeneratedValue generatedValue, String schemaName) { TableGenerator tableGenerator = field.getAnnotation(TableGenerator.class); SequenceGenerator sequenceGenerator = field.getAnnotation(SequenceGenerator.class); if (tableGene...
[ "private", "void", "checkForGenerator", "(", "final", "Class", "<", "?", ">", "clazz", ",", "Field", "field", ",", "GeneratedValue", "generatedValue", ",", "String", "schemaName", ")", "{", "TableGenerator", "tableGenerator", "=", "field", ".", "getAnnotation", ...
Validate for generator. @param clazz @param field @param generatedValue @param schemaName @throws RuleValidationException
[ "Validate", "for", "generator", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/EntityFieldAnnotationRule.java#L248-L282
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/MusicOnHoldApi.java
MusicOnHoldApi.sendMOHSettingsAsync
public com.squareup.okhttp.Call sendMOHSettingsAsync(String musicFile, Boolean musicEnabled, final ApiCallback<SendMOHSettingsResponse> callback) throws ApiException { """ Update MOH settings. (asynchronously) Adds or updates MOH setting. @param musicFile The Name of WAV file. (required) @param musicEnabled Def...
java
public com.squareup.okhttp.Call sendMOHSettingsAsync(String musicFile, Boolean musicEnabled, final ApiCallback<SendMOHSettingsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = nu...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "sendMOHSettingsAsync", "(", "String", "musicFile", ",", "Boolean", "musicEnabled", ",", "final", "ApiCallback", "<", "SendMOHSettingsResponse", ">", "callback", ")", "throws", "ApiException", "{", "Pro...
Update MOH settings. (asynchronously) Adds or updates MOH setting. @param musicFile The Name of WAV file. (required) @param musicEnabled Define is music enabled/disabled. (required) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException If fail to process th...
[ "Update", "MOH", "settings", ".", "(", "asynchronously", ")", "Adds", "or", "updates", "MOH", "setting", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/MusicOnHoldApi.java#L645-L670
m-m-m/util
datatype/src/main/java/net/sf/mmm/util/datatype/api/color/GenericColor.java
GenericColor.valueOf
public static GenericColor valueOf(Color color) { """ Converts the given {@link Color} to a {@link GenericColor}. @param color is the discrete RGBA {@link Color}. @return the corresponding {@link GenericColor}. """ Objects.requireNonNull(color, "color"); Red red = new Red(color.getRed()); Gree...
java
public static GenericColor valueOf(Color color) { Objects.requireNonNull(color, "color"); Red red = new Red(color.getRed()); Green green = new Green(color.getGreen()); Blue blue = new Blue(color.getBlue()); Alpha alpha = new Alpha(color.getAlpha()); return valueOf(red, green, blue, alpha); }
[ "public", "static", "GenericColor", "valueOf", "(", "Color", "color", ")", "{", "Objects", ".", "requireNonNull", "(", "color", ",", "\"color\"", ")", ";", "Red", "red", "=", "new", "Red", "(", "color", ".", "getRed", "(", ")", ")", ";", "Green", "gree...
Converts the given {@link Color} to a {@link GenericColor}. @param color is the discrete RGBA {@link Color}. @return the corresponding {@link GenericColor}.
[ "Converts", "the", "given", "{", "@link", "Color", "}", "to", "a", "{", "@link", "GenericColor", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/datatype/src/main/java/net/sf/mmm/util/datatype/api/color/GenericColor.java#L140-L148
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java
UCharacter.getPropertyValueEnumNoThrow
@Deprecated public static int getPropertyValueEnumNoThrow(int property, CharSequence valueAlias) { """ Same as {@link #getPropertyValueEnum(int, CharSequence)}, except doesn't throw exception. Instead, returns UProperty.UNDEFINED. @param property Same as {@link #getPropertyValueEnum(int, CharSequence)} @par...
java
@Deprecated public static int getPropertyValueEnumNoThrow(int property, CharSequence valueAlias) { return UPropertyAliases.INSTANCE.getPropertyValueEnumNoThrow(property, valueAlias); }
[ "@", "Deprecated", "public", "static", "int", "getPropertyValueEnumNoThrow", "(", "int", "property", ",", "CharSequence", "valueAlias", ")", "{", "return", "UPropertyAliases", ".", "INSTANCE", ".", "getPropertyValueEnumNoThrow", "(", "property", ",", "valueAlias", ")"...
Same as {@link #getPropertyValueEnum(int, CharSequence)}, except doesn't throw exception. Instead, returns UProperty.UNDEFINED. @param property Same as {@link #getPropertyValueEnum(int, CharSequence)} @param valueAlias Same as {@link #getPropertyValueEnum(int, CharSequence)} @return returns UProperty.UNDEFINED if t...
[ "Same", "as", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java#L4232-L4235
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java
JSONCompareUtil.isUsableAsUniqueKey
public static boolean isUsableAsUniqueKey(String candidate, JSONArray array) throws JSONException { """ <p>Looks to see if candidate field is a possible unique key across a array of objects. Returns true IFF:</p> <ol> <li>array is an array of JSONObject <li>candidate is a top-level field in each of of the obje...
java
public static boolean isUsableAsUniqueKey(String candidate, JSONArray array) throws JSONException { Set<Object> seenValues = new HashSet<Object>(); for (int i = 0; i < array.length(); i++) { Object item = array.get(i); if (item instanceof JSONObject) { JSONObject ...
[ "public", "static", "boolean", "isUsableAsUniqueKey", "(", "String", "candidate", ",", "JSONArray", "array", ")", "throws", "JSONException", "{", "Set", "<", "Object", ">", "seenValues", "=", "new", "HashSet", "<", "Object", ">", "(", ")", ";", "for", "(", ...
<p>Looks to see if candidate field is a possible unique key across a array of objects. Returns true IFF:</p> <ol> <li>array is an array of JSONObject <li>candidate is a top-level field in each of of the objects in the array <li>candidate is a simple value (not JSONObject or JSONArray) <li>candidate is unique across all...
[ "<p", ">", "Looks", "to", "see", "if", "candidate", "field", "is", "a", "possible", "unique", "key", "across", "a", "array", "of", "objects", ".", "Returns", "true", "IFF", ":", "<", "/", "p", ">", "<ol", ">", "<li", ">", "array", "is", "an", "arra...
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java#L91-L112
Twitter4J/Twitter4J
twitter4j-core/src/internal-json/java/twitter4j/JSONImplFactory.java
JSONImplFactory.createUserMentionEntity
public static UserMentionEntity createUserMentionEntity(int start, int end, String name, String screenName, long id) { """ static factory method for twitter-text-java @return user mention entity @since Twitter4J 2.2.6 """ return new UserMe...
java
public static UserMentionEntity createUserMentionEntity(int start, int end, String name, String screenName, long id) { return new UserMentionEntityJSONImpl(start, end, name, screenName, id); }
[ "public", "static", "UserMentionEntity", "createUserMentionEntity", "(", "int", "start", ",", "int", "end", ",", "String", "name", ",", "String", "screenName", ",", "long", "id", ")", "{", "return", "new", "UserMentionEntityJSONImpl", "(", "start", ",", "end", ...
static factory method for twitter-text-java @return user mention entity @since Twitter4J 2.2.6
[ "static", "factory", "method", "for", "twitter", "-", "text", "-", "java" ]
train
https://github.com/Twitter4J/Twitter4J/blob/8376fade8d557896bb9319fb46e39a55b134b166/twitter4j-core/src/internal-json/java/twitter4j/JSONImplFactory.java#L284-L287
lessthanoptimal/ejml
main/ejml-ddense/generate/org/ejml/dense/row/misc/GenerateInverseFromMinor.java
GenerateInverseFromMinor.printMinors
public void printMinors(int matrix[], int N, PrintStream stream) { """ Put the core auto-code algorithm here so an external class can call it """ this.N = N; this.stream = stream; // compute all the minors int index = 0; for( int i = 1; i <= N; i++ ) { for( ...
java
public void printMinors(int matrix[], int N, PrintStream stream) { this.N = N; this.stream = stream; // compute all the minors int index = 0; for( int i = 1; i <= N; i++ ) { for( int j = 1; j <= N; j++ , index++) { stream.print(" double m"+i+""...
[ "public", "void", "printMinors", "(", "int", "matrix", "[", "]", ",", "int", "N", ",", "PrintStream", "stream", ")", "{", "this", ".", "N", "=", "N", ";", "this", ".", "stream", "=", "stream", ";", "// compute all the minors", "int", "index", "=", "0",...
Put the core auto-code algorithm here so an external class can call it
[ "Put", "the", "core", "auto", "-", "code", "algorithm", "here", "so", "an", "external", "class", "can", "call", "it" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/generate/org/ejml/dense/row/misc/GenerateInverseFromMinor.java#L147-L173
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpMethodBase.java
HttpMethodBase.readResponseHeaders
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { """ Reads the response headers from the given {@link HttpConnection connection}. <p> Subclasses may want to override this method to to customize the processing. </p> <p> "It must be possible t...
java
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.readResponseHeaders(HttpState," + "HttpConnection)"); getResponseHeaderGroup().clear(); Header[] headers = HttpParser.parseHeader...
[ "protected", "void", "readResponseHeaders", "(", "HttpState", "state", ",", "HttpConnection", "conn", ")", "throws", "IOException", ",", "HttpException", "{", "LOG", ".", "trace", "(", "\"enter HttpMethodBase.readResponseHeaders(HttpState,\"", "+", "\"HttpConnection)\"", ...
Reads the response headers from the given {@link HttpConnection connection}. <p> Subclasses may want to override this method to to customize the processing. </p> <p> "It must be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by ap...
[ "Reads", "the", "response", "headers", "from", "the", "given", "{", "@link", "HttpConnection", "connection", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpMethodBase.java#L2063-L2074
HiddenStage/divide
Shared/src/main/java/io/divide/shared/transitory/TransientObject.java
TransientObject.put
public void put(String key, Object object, boolean serialize) { """ Add a specific key value pair to this object. @param key key to identify this element by. @param object object to be added. @param serialize whether to manually serialize this object and store it as a json blob. """ if(serialize) ...
java
public void put(String key, Object object, boolean serialize){ if(serialize) put(key,gson.toJson(object)); else put(key,object); }
[ "public", "void", "put", "(", "String", "key", ",", "Object", "object", ",", "boolean", "serialize", ")", "{", "if", "(", "serialize", ")", "put", "(", "key", ",", "gson", ".", "toJson", "(", "object", ")", ")", ";", "else", "put", "(", "key", ",",...
Add a specific key value pair to this object. @param key key to identify this element by. @param object object to be added. @param serialize whether to manually serialize this object and store it as a json blob.
[ "Add", "a", "specific", "key", "value", "pair", "to", "this", "object", "." ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Shared/src/main/java/io/divide/shared/transitory/TransientObject.java#L167-L172
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/AllianceApi.java
AllianceApi.getAlliancesAllianceId
public AllianceResponse getAlliancesAllianceId(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { """ Get alliance information Public information about an alliance --- This route is cached for up to 3600 seconds @param allianceId An EVE alliance ID (required) @param ...
java
public AllianceResponse getAlliancesAllianceId(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<AllianceResponse> resp = getAlliancesAllianceIdWithHttpInfo(allianceId, datasource, ifNoneMatch); return resp.getData(); }
[ "public", "AllianceResponse", "getAlliancesAllianceId", "(", "Integer", "allianceId", ",", "String", "datasource", ",", "String", "ifNoneMatch", ")", "throws", "ApiException", "{", "ApiResponse", "<", "AllianceResponse", ">", "resp", "=", "getAlliancesAllianceIdWithHttpIn...
Get alliance information Public information about an alliance --- This route is cached for up to 3600 seconds @param allianceId An EVE alliance ID (required) @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be retu...
[ "Get", "alliance", "information", "Public", "information", "about", "an", "alliance", "---", "This", "route", "is", "cached", "for", "up", "to", "3600", "seconds" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/AllianceApi.java#L271-L275
yidongnan/grpc-spring-boot-starter
grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util/GrpcUtils.java
GrpcUtils.extractMethodName
public static String extractMethodName(final MethodDescriptor<?, ?> method) { """ Extracts the method name from the given method. @param method The method to get the method name from. @return The extracted method name. @see #extractServiceName(MethodDescriptor) """ // This method is the equivalent...
java
public static String extractMethodName(final MethodDescriptor<?, ?> method) { // This method is the equivalent of MethodDescriptor.extractFullServiceName final String fullMethodName = method.getFullMethodName(); final int index = fullMethodName.lastIndexOf('/'); if (index == -1) { ...
[ "public", "static", "String", "extractMethodName", "(", "final", "MethodDescriptor", "<", "?", ",", "?", ">", "method", ")", "{", "// This method is the equivalent of MethodDescriptor.extractFullServiceName", "final", "String", "fullMethodName", "=", "method", ".", "getFu...
Extracts the method name from the given method. @param method The method to get the method name from. @return The extracted method name. @see #extractServiceName(MethodDescriptor)
[ "Extracts", "the", "method", "name", "from", "the", "given", "method", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util/GrpcUtils.java#L48-L56
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java
ConfigRestClientUtil.addDocuments
public String addDocuments(String indexName, String indexType,String addTemplate, List<?> beans,String refreshOption) throws ElasticSearchException { """ 批量创建索引 @param indexName @param indexType @param addTemplate @param beans @param refreshOption refresh=wait_for refresh=false refresh=true refresh Empty...
java
public String addDocuments(String indexName, String indexType,String addTemplate, List<?> beans,String refreshOption) throws ElasticSearchException{ StringBuilder builder = new StringBuilder(); for(Object bean:beans) { ESTemplateHelper.evalBuilkTemplate(esUtil,builder,indexName,indexType,addTemplate,bean,"index"...
[ "public", "String", "addDocuments", "(", "String", "indexName", ",", "String", "indexType", ",", "String", "addTemplate", ",", "List", "<", "?", ">", "beans", ",", "String", "refreshOption", ")", "throws", "ElasticSearchException", "{", "StringBuilder", "builder",...
批量创建索引 @param indexName @param indexType @param addTemplate @param beans @param refreshOption refresh=wait_for refresh=false refresh=true refresh Empty string or true Refresh the relevant primary and replica shards (not the whole index) immediately after the operation occurs, so that the updated document appears in sea...
[ "批量创建索引" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java#L116-L125
codegist/crest
core/src/main/java/org/codegist/crest/CRestBuilder.java
CRestBuilder.bindDeserializer
public CRestBuilder bindDeserializer(Class<? extends Deserializer> deserializer, Class<?>[] classes, Map<String, Object> config) { """ <p>Binds a deserializer to a list of interface method's return types.</p> <p>By default, <b>CRest</b> handle the following types:</p> <ul> <li>all primitives and wrapper types</...
java
public CRestBuilder bindDeserializer(Class<? extends Deserializer> deserializer, Class<?>[] classes, Map<String, Object> config) { this.classDeserializerBuilder.register(deserializer, classes, config); return this; }
[ "public", "CRestBuilder", "bindDeserializer", "(", "Class", "<", "?", "extends", "Deserializer", ">", "deserializer", ",", "Class", "<", "?", ">", "[", "]", "classes", ",", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "this", ".", "class...
<p>Binds a deserializer to a list of interface method's return types.</p> <p>By default, <b>CRest</b> handle the following types:</p> <ul> <li>all primitives and wrapper types</li> <li>java.io.InputStream</li> <li>java.io.Reader</li> </ul> <p>Meaning that any interface method return type can be by default one of these ...
[ "<p", ">", "Binds", "a", "deserializer", "to", "a", "list", "of", "interface", "method", "s", "return", "types", ".", "<", "/", "p", ">", "<p", ">", "By", "default", "<b", ">", "CRest<", "/", "b", ">", "handle", "the", "following", "types", ":", "<...
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/CRestBuilder.java#L565-L568
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/SessionApi.java
SessionApi.initializeWorkspaceAsync
public com.squareup.okhttp.Call initializeWorkspaceAsync(String code, String redirectUri, String state, String authorization, final ApiCallback<ApiSuccessResponse> callback) throws ApiException { """ Get and register an auth token (asynchronously) Retrieve the authorization token using the authorization code. Wor...
java
public com.squareup.okhttp.Call initializeWorkspaceAsync(String code, String redirectUri, String state, String authorization, final ApiCallback<ApiSuccessResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener ...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "initializeWorkspaceAsync", "(", "String", "code", ",", "String", "redirectUri", ",", "String", "state", ",", "String", "authorization", ",", "final", "ApiCallback", "<", "ApiSuccessResponse", ">", "c...
Get and register an auth token (asynchronously) Retrieve the authorization token using the authorization code. Workspace then registers the token and prepares the user&#39;s environment. @param code The authorization code. You must include this parameter for the [Authorization Code Grant flow](/reference/authentication...
[ "Get", "and", "register", "an", "auth", "token", "(", "asynchronously", ")", "Retrieve", "the", "authorization", "token", "using", "the", "authorization", "code", ".", "Workspace", "then", "registers", "the", "token", "and", "prepares", "the", "user&#39", ";", ...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/SessionApi.java#L1129-L1154
kiegroup/jbpm
jbpm-flow-builder/src/main/java/org/jbpm/compiler/xml/processes/RuleFlowMigrator.java
RuleFlowMigrator.portToCurrentVersion
private static String portToCurrentVersion(String xml, String xsl) throws Exception { """ *********************************************************************** Utility method that applies a given xsl transform to the given xml to transform a drools 4 ruleflow to version 5. @param xml the ruleflow to be transf...
java
private static String portToCurrentVersion(String xml, String xsl) throws Exception { // convert it. String version5XML = XSLTransformation.transform(xsl, xml, null); // Add the namespace attribute to the process element as it is not added by the XSL transformation. version5XML = version5XML.re...
[ "private", "static", "String", "portToCurrentVersion", "(", "String", "xml", ",", "String", "xsl", ")", "throws", "Exception", "{", "// convert it.", "String", "version5XML", "=", "XSLTransformation", ".", "transform", "(", "xsl", ",", "xml", ",", "null", ")", ...
*********************************************************************** Utility method that applies a given xsl transform to the given xml to transform a drools 4 ruleflow to version 5. @param xml the ruleflow to be transformed @param xsl the xsl transform to apply to the ruleflow xml @return the ruleflow xml transform...
[ "***********************************************************************", "Utility", "method", "that", "applies", "a", "given", "xsl", "transform", "to", "the", "given", "xml", "to", "transform", "a", "drools", "4", "ruleflow", "to", "version", "5", "." ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-flow-builder/src/main/java/org/jbpm/compiler/xml/processes/RuleFlowMigrator.java#L142-L149
axibase/atsd-api-java
src/main/java/com/axibase/tsd/client/MetaDataService.java
MetaDataService.retrieveMetricSeries
public List<Series> retrieveMetricSeries(String metricName) { """ Retrieve series list of the specified metric @param metricName metric name @return list of series """ return retrieveMetricSeries(metricName, Collections.<String, String>emptyMap()); }
java
public List<Series> retrieveMetricSeries(String metricName) { return retrieveMetricSeries(metricName, Collections.<String, String>emptyMap()); }
[ "public", "List", "<", "Series", ">", "retrieveMetricSeries", "(", "String", "metricName", ")", "{", "return", "retrieveMetricSeries", "(", "metricName", ",", "Collections", ".", "<", "String", ",", "String", ">", "emptyMap", "(", ")", ")", ";", "}" ]
Retrieve series list of the specified metric @param metricName metric name @return list of series
[ "Retrieve", "series", "list", "of", "the", "specified", "metric" ]
train
https://github.com/axibase/atsd-api-java/blob/63a0767d08b202dad2ebef4372ff947d6fba0246/src/main/java/com/axibase/tsd/client/MetaDataService.java#L585-L587
FasterXML/woodstox
src/main/java/com/ctc/wstx/sr/StreamScanner.java
StreamScanner.throwParseError
@Override public void throwParseError(String format, Object arg, Object arg2) throws XMLStreamException { """ Throws generic parse error with specified message and current parsing location. <p> Note: public access only because core code in other packages needs to access it. """ String m...
java
@Override public void throwParseError(String format, Object arg, Object arg2) throws XMLStreamException { String msg = (arg != null || arg2 != null) ? MessageFormat.format(format, new Object[] { arg, arg2 }) : format; throw constructWfcException(msg); }
[ "@", "Override", "public", "void", "throwParseError", "(", "String", "format", ",", "Object", "arg", ",", "Object", "arg2", ")", "throws", "XMLStreamException", "{", "String", "msg", "=", "(", "arg", "!=", "null", "||", "arg2", "!=", "null", ")", "?", "M...
Throws generic parse error with specified message and current parsing location. <p> Note: public access only because core code in other packages needs to access it.
[ "Throws", "generic", "parse", "error", "with", "specified", "message", "and", "current", "parsing", "location", ".", "<p", ">", "Note", ":", "public", "access", "only", "because", "core", "code", "in", "other", "packages", "needs", "to", "access", "it", "." ...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sr/StreamScanner.java#L498-L505
jenkinsci/jenkins
core/src/main/java/hudson/model/Descriptor.java
Descriptor.newInstancesFromHeteroList
public static <T extends Describable<T>> List<T> newInstancesFromHeteroList(StaplerRequest req, JSONObject formData, String key, Collection<? extends Descriptor<T>> descriptors) throws FormException { """ Used to build {@link Describable} instance list from {@code <f:hetero-list>} tag. @para...
java
public static <T extends Describable<T>> List<T> newInstancesFromHeteroList(StaplerRequest req, JSONObject formData, String key, Collection<? extends Descriptor<T>> descriptors) throws FormException { return newInstancesFromHeteroList(req,formData.get(key),descriptors); }
[ "public", "static", "<", "T", "extends", "Describable", "<", "T", ">", ">", "List", "<", "T", ">", "newInstancesFromHeteroList", "(", "StaplerRequest", "req", ",", "JSONObject", "formData", ",", "String", "key", ",", "Collection", "<", "?", "extends", "Descr...
Used to build {@link Describable} instance list from {@code <f:hetero-list>} tag. @param req Request that represents the form submission. @param formData Structured form data that represents the contains data for the list of describables. @param key The JSON property name for 'formData' that represents the data for th...
[ "Used", "to", "build", "{", "@link", "Describable", "}", "instance", "list", "from", "{", "@code", "<f", ":", "hetero", "-", "list", ">", "}", "tag", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Descriptor.java#L1017-L1022
alkacon/opencms-core
src/org/opencms/xml/types/CmsXmlVfsImageValue.java
CmsXmlVfsImageValue.setFormat
public void setFormat(CmsObject cms, String format) { """ Sets the format information of the image.<p> @param cms the current users contexts @param format the format information of the image """ if (CmsStringUtil.isEmptyOrWhitespaceOnly(format)) { m_format = ""; if (m_eleme...
java
public void setFormat(CmsObject cms, String format) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(format)) { m_format = ""; if (m_element.element(PARAM_FORMAT) != null) { m_element.remove(m_element.element(PARAM_FORMAT)); } } else { m_format...
[ "public", "void", "setFormat", "(", "CmsObject", "cms", ",", "String", "format", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "format", ")", ")", "{", "m_format", "=", "\"\"", ";", "if", "(", "m_element", ".", "element", "(", ...
Sets the format information of the image.<p> @param cms the current users contexts @param format the format information of the image
[ "Sets", "the", "format", "information", "of", "the", "image", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/types/CmsXmlVfsImageValue.java#L248-L259
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/ui/CmsDroppedElementModeSelectionDialog.java
CmsDroppedElementModeSelectionDialog.showDialog
public static void showDialog(final CmsUUID referenceId, final AsyncCallback<String> createModeCallback) { """ Shows the dialog.<p> @param referenceId the structure id of the resource for which to load the dialog @param createModeCallback the callback to call with the result """ CmsRpcAction<CmsL...
java
public static void showDialog(final CmsUUID referenceId, final AsyncCallback<String> createModeCallback) { CmsRpcAction<CmsListInfoBean> action = new CmsRpcAction<CmsListInfoBean>() { @Override public void execute() { start(0, true); CmsCoreProvider.get...
[ "public", "static", "void", "showDialog", "(", "final", "CmsUUID", "referenceId", ",", "final", "AsyncCallback", "<", "String", ">", "createModeCallback", ")", "{", "CmsRpcAction", "<", "CmsListInfoBean", ">", "action", "=", "new", "CmsRpcAction", "<", "CmsListInf...
Shows the dialog.<p> @param referenceId the structure id of the resource for which to load the dialog @param createModeCallback the callback to call with the result
[ "Shows", "the", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/ui/CmsDroppedElementModeSelectionDialog.java#L64-L85
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java
JSONEmitter.addObject
public JSONEmitter addObject(String name, String value) { """ Add a one-field object consisting of the given name and string value. This generates the JSON text: <pre> {"name":"value"} </pre> @param name Name of new field. @param value Value of new field as a string. @return The same JSONEmitter obj...
java
public JSONEmitter addObject(String name, String value) { checkComma(); write("{\""); write(encodeString(name)); write("\":\""); if (value != null) { write(encodeString(value)); } write("\"}"); return this; }
[ "public", "JSONEmitter", "addObject", "(", "String", "name", ",", "String", "value", ")", "{", "checkComma", "(", ")", ";", "write", "(", "\"{\\\"\"", ")", ";", "write", "(", "encodeString", "(", "name", ")", ")", ";", "write", "(", "\"\\\":\\\"\"", ")",...
Add a one-field object consisting of the given name and string value. This generates the JSON text: <pre> {"name":"value"} </pre> @param name Name of new field. @param value Value of new field as a string. @return The same JSONEmitter object, which allows call chaining.
[ "Add", "a", "one", "-", "field", "object", "consisting", "of", "the", "given", "name", "and", "string", "value", ".", "This", "generates", "the", "JSON", "text", ":", "<pre", ">", "{", "name", ":", "value", "}", "<", "/", "pre", ">" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java#L211-L221
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/util/db/DbUtils.java
DbUtils.printStackTrace
public static void printStackTrace(SQLException e, PrintWriter pw) { """ Print the stack trace for a SQLException to a specified PrintWriter. @param e SQLException to print stack trace of @param pw PrintWriter to print to """ SQLException next = e; while (next != null) { next....
java
public static void printStackTrace(SQLException e, PrintWriter pw) { SQLException next = e; while (next != null) { next.printStackTrace(pw); next = next.getNextException(); if (next != null) { pw.println("Next SQLException:"); } } ...
[ "public", "static", "void", "printStackTrace", "(", "SQLException", "e", ",", "PrintWriter", "pw", ")", "{", "SQLException", "next", "=", "e", ";", "while", "(", "next", "!=", "null", ")", "{", "next", ".", "printStackTrace", "(", "pw", ")", ";", "next",...
Print the stack trace for a SQLException to a specified PrintWriter. @param e SQLException to print stack trace of @param pw PrintWriter to print to
[ "Print", "the", "stack", "trace", "for", "a", "SQLException", "to", "a", "specified", "PrintWriter", "." ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/util/db/DbUtils.java#L207-L217
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyDecoder.java
KeyDecoder.decodeByteDesc
public static byte decodeByteDesc(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a signed byte from exactly 1 byte, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return signed byte value """ try {...
java
public static byte decodeByteDesc(byte[] src, int srcOffset) throws CorruptEncodingException { try { return (byte)(src[srcOffset] ^ 0x7f); } catch (IndexOutOfBoundsException e) { throw new CorruptEncodingException(null, e); } }
[ "public", "static", "byte", "decodeByteDesc", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "try", "{", "return", "(", "byte", ")", "(", "src", "[", "srcOffset", "]", "^", "0x7f", ")", ";", "}", ...
Decodes a signed byte from exactly 1 byte, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return signed byte value
[ "Decodes", "a", "signed", "byte", "from", "exactly", "1", "byte", "as", "encoded", "for", "descending", "order", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L116-L124
google/closure-compiler
src/com/google/javascript/jscomp/Es6TemplateLiterals.java
Es6TemplateLiterals.visitTaggedTemplateLiteral
static void visitTaggedTemplateLiteral(NodeTraversal t, Node n, boolean addTypes) { """ Converts tag`a\tb${bar}` to: // A global (module) scoped variable var $jscomp$templatelit$0 = ["a\tb"]; // cooked string array $jscomp$templatelit$0.raw = ["a\\tb"]; // raw string array ... // A call to the tagging func...
java
static void visitTaggedTemplateLiteral(NodeTraversal t, Node n, boolean addTypes) { AstFactory astFactory = t.getCompiler().createAstFactory(); JSTypeRegistry registry = t.getCompiler().getTypeRegistry(); JSType stringType = createType(addTypes, registry, JSTypeNative.STRING_TYPE); JSType arrayType = cr...
[ "static", "void", "visitTaggedTemplateLiteral", "(", "NodeTraversal", "t", ",", "Node", "n", ",", "boolean", "addTypes", ")", "{", "AstFactory", "astFactory", "=", "t", ".", "getCompiler", "(", ")", ".", "createAstFactory", "(", ")", ";", "JSTypeRegistry", "re...
Converts tag`a\tb${bar}` to: // A global (module) scoped variable var $jscomp$templatelit$0 = ["a\tb"]; // cooked string array $jscomp$templatelit$0.raw = ["a\\tb"]; // raw string array ... // A call to the tagging function tag($jscomp$templatelit$0, bar); See template_literal_test.js for more examples. @param n A...
[ "Converts", "tag", "a", "\\", "tb$", "{", "bar", "}", "to", ":", "//", "A", "global", "(", "module", ")", "scoped", "variable", "var", "$jscomp$templatelit$0", "=", "[", "a", "\\", "tb", "]", ";", "//", "cooked", "string", "array", "$jscomp$templatelit$0...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6TemplateLiterals.java#L102-L168
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java
LinkedPE.enrichWithCM
protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all) { """ Gets parent complexes or complex members recursively according to the type of the linkage. @param seed elements to link @param all already found links """ Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAc...
java
protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all) { Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAcc, seed, all); if (blacklist != null) addition = blacklist.getNonUbiqueObjects(addition); if (!addition.isEmpty()) { all.addAll(addition); enrichWithGeneri...
[ "protected", "void", "enrichWithCM", "(", "Set", "<", "BioPAXElement", ">", "seed", ",", "Set", "<", "BioPAXElement", ">", "all", ")", "{", "Set", "addition", "=", "access", "(", "type", "==", "Type", ".", "TO_GENERAL", "?", "complexAcc", ":", "memberAcc",...
Gets parent complexes or complex members recursively according to the type of the linkage. @param seed elements to link @param all already found links
[ "Gets", "parent", "complexes", "or", "complex", "members", "recursively", "according", "to", "the", "type", "of", "the", "linkage", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java#L134-L145
banq/jdonframework
src/main/java/com/jdon/util/UtilDateTime.java
UtilDateTime.toDate
public static java.util.Date toDate(String dateTime) { """ Converts a date and time String into a Date @param dateTime A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional @return The corresponding Date """ // dateTime must have one space between the date and t...
java
public static java.util.Date toDate(String dateTime) { // dateTime must have one space between the date and time... String date = dateTime.substring(0, dateTime.indexOf(" ")); String time = dateTime.substring(dateTime.indexOf(" ") + 1); return toDate(date, time); }
[ "public", "static", "java", ".", "util", ".", "Date", "toDate", "(", "String", "dateTime", ")", "{", "// dateTime must have one space between the date and time...\r", "String", "date", "=", "dateTime", ".", "substring", "(", "0", ",", "dateTime", ".", "indexOf", "...
Converts a date and time String into a Date @param dateTime A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional @return The corresponding Date
[ "Converts", "a", "date", "and", "time", "String", "into", "a", "Date" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L303-L309
pravega/pravega
bindings/src/main/java/io/pravega/storage/hdfs/HDFSExceptionHelpers.java
HDFSExceptionHelpers.convertException
static <T> StreamSegmentException convertException(String segmentName, Throwable e) { """ Translates HDFS specific Exceptions to Pravega-equivalent Exceptions. @param segmentName Name of the stream segment on which the exception occurs. @param e The exception to be translated. @return The exception...
java
static <T> StreamSegmentException convertException(String segmentName, Throwable e) { if (e instanceof RemoteException) { e = ((RemoteException) e).unwrapRemoteException(); } if (e instanceof PathNotFoundException || e instanceof FileNotFoundException) { return new Strea...
[ "static", "<", "T", ">", "StreamSegmentException", "convertException", "(", "String", "segmentName", ",", "Throwable", "e", ")", "{", "if", "(", "e", "instanceof", "RemoteException", ")", "{", "e", "=", "(", "(", "RemoteException", ")", "e", ")", ".", "unw...
Translates HDFS specific Exceptions to Pravega-equivalent Exceptions. @param segmentName Name of the stream segment on which the exception occurs. @param e The exception to be translated. @return The exception to be thrown.
[ "Translates", "HDFS", "specific", "Exceptions", "to", "Pravega", "-", "equivalent", "Exceptions", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/bindings/src/main/java/io/pravega/storage/hdfs/HDFSExceptionHelpers.java#L36-L50
ThreeTen/threetenbp
src/main/java/org/threeten/bp/LocalDate.java
LocalDate.ofYearDay
public static LocalDate ofYearDay(int year, int dayOfYear) { """ Obtains an instance of {@code LocalDate} from a year and day-of-year. <p> The day-of-year must be valid for the year, otherwise an exception will be thrown. @param year the year to represent, from MIN_YEAR to MAX_YEAR @param dayOfYear the day...
java
public static LocalDate ofYearDay(int year, int dayOfYear) { YEAR.checkValidValue(year); DAY_OF_YEAR.checkValidValue(dayOfYear); boolean leap = IsoChronology.INSTANCE.isLeapYear(year); if (dayOfYear == 366 && leap == false) { throw new DateTimeException("Invalid date 'DayOfYe...
[ "public", "static", "LocalDate", "ofYearDay", "(", "int", "year", ",", "int", "dayOfYear", ")", "{", "YEAR", ".", "checkValidValue", "(", "year", ")", ";", "DAY_OF_YEAR", ".", "checkValidValue", "(", "dayOfYear", ")", ";", "boolean", "leap", "=", "IsoChronol...
Obtains an instance of {@code LocalDate} from a year and day-of-year. <p> The day-of-year must be valid for the year, otherwise an exception will be thrown. @param year the year to represent, from MIN_YEAR to MAX_YEAR @param dayOfYear the day-of-year to represent, from 1 to 366 @return the local date, not null @thro...
[ "Obtains", "an", "instance", "of", "{", "@code", "LocalDate", "}", "from", "a", "year", "and", "day", "-", "of", "-", "year", ".", "<p", ">", "The", "day", "-", "of", "-", "year", "must", "be", "valid", "for", "the", "year", "otherwise", "an", "exc...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/LocalDate.java#L254-L268
LearnLib/automatalib
serialization/etf/src/main/java/net/automatalib/serialization/etf/writer/DFA2ETFWriter.java
DFA2ETFWriter.writeETF
@Override protected void writeETF(PrintWriter pw, DFA<?, I> dfa, Alphabet<I> inputs) { """ Write DFA specific parts in the ETF. - initial state, - the valuations for the state 'id', - the letters in the alphabet, - the transitions, - the state labels (rejecting/accepting), - the mapping from states to ...
java
@Override protected void writeETF(PrintWriter pw, DFA<?, I> dfa, Alphabet<I> inputs) { writeETFInternal(pw, dfa, inputs); }
[ "@", "Override", "protected", "void", "writeETF", "(", "PrintWriter", "pw", ",", "DFA", "<", "?", ",", "I", ">", "dfa", ",", "Alphabet", "<", "I", ">", "inputs", ")", "{", "writeETFInternal", "(", "pw", ",", "dfa", ",", "inputs", ")", ";", "}" ]
Write DFA specific parts in the ETF. - initial state, - the valuations for the state 'id', - the letters in the alphabet, - the transitions, - the state labels (rejecting/accepting), - the mapping from states to state labels. @param pw the Writer. @param dfa the DFA to write. @param inputs the alphabet.
[ "Write", "DFA", "specific", "parts", "in", "the", "ETF", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/serialization/etf/src/main/java/net/automatalib/serialization/etf/writer/DFA2ETFWriter.java#L63-L66
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java
ObjectUtils.unwrapProxy
public static Object unwrapProxy(Object bean, Boolean recursive) { """ This is a utility method for getting raw objects that may have been proxied. It is intended to be used in cases where raw implementations are needed rather than working with interfaces which they implement. @param bean the potential proxy....
java
public static Object unwrapProxy(Object bean, Boolean recursive) { Assert.notNull(recursive, "recursive"); Object unwrapped = bean; // If the given object is a proxy, set the return value as the object being proxied, otherwise return the given // object if ((bean != null) && (...
[ "public", "static", "Object", "unwrapProxy", "(", "Object", "bean", ",", "Boolean", "recursive", ")", "{", "Assert", ".", "notNull", "(", "recursive", ",", "\"recursive\"", ")", ";", "Object", "unwrapped", "=", "bean", ";", "// If the given object is a proxy, set ...
This is a utility method for getting raw objects that may have been proxied. It is intended to be used in cases where raw implementations are needed rather than working with interfaces which they implement. @param bean the potential proxy. @param recursive whether to procceeed recursively through nested proxies. @retu...
[ "This", "is", "a", "utility", "method", "for", "getting", "raw", "objects", "that", "may", "have", "been", "proxied", ".", "It", "is", "intended", "to", "be", "used", "in", "cases", "where", "raw", "implementations", "are", "needed", "rather", "than", "wor...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java#L242-L264
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateLocations
private void generateLocations(final Metadata m, final Element e) { """ Generation of location tags. @param m source @param e element to attach new element to """ final GMLGenerator geoRssGenerator = new GMLGenerator(); for (final Location location : m.getLocations()) { final El...
java
private void generateLocations(final Metadata m, final Element e) { final GMLGenerator geoRssGenerator = new GMLGenerator(); for (final Location location : m.getLocations()) { final Element locationElement = new Element("location", NS); addNotNullAttribute(locationElement, "descr...
[ "private", "void", "generateLocations", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "GMLGenerator", "geoRssGenerator", "=", "new", "GMLGenerator", "(", ")", ";", "for", "(", "final", "Location", "location", ":", "m", ".", ...
Generation of location tags. @param m source @param e element to attach new element to
[ "Generation", "of", "location", "tags", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L392-L406
jcuda/jcufft
JCufftJava/src/main/java/jcuda/jcufft/JCufft.java
JCufft.cufftPlan1d
public static int cufftPlan1d(cufftHandle plan, int nx, int type, int batch) { """ <pre> Creates a 1D FFT plan configuration for a specified signal size and data type. cufftResult cufftPlan1d( cufftHandle *plan, int nx, cufftType type, int batch ); The batch input parameter tells CUFFT how many 1D transfor...
java
public static int cufftPlan1d(cufftHandle plan, int nx, int type, int batch) { plan.setDimension(1); plan.setType(type); plan.setSize(nx, 0, 0); plan.setBatchSize(batch); return checkResult(cufftPlan1dNative(plan, nx, type, batch)); }
[ "public", "static", "int", "cufftPlan1d", "(", "cufftHandle", "plan", ",", "int", "nx", ",", "int", "type", ",", "int", "batch", ")", "{", "plan", ".", "setDimension", "(", "1", ")", ";", "plan", ".", "setType", "(", "type", ")", ";", "plan", ".", ...
<pre> Creates a 1D FFT plan configuration for a specified signal size and data type. cufftResult cufftPlan1d( cufftHandle *plan, int nx, cufftType type, int batch ); The batch input parameter tells CUFFT how many 1D transforms to configure. Input ---- plan Pointer to a cufftHandle object nx The transform size (e...
[ "<pre", ">", "Creates", "a", "1D", "FFT", "plan", "configuration", "for", "a", "specified", "signal", "size", "and", "data", "type", "." ]
train
https://github.com/jcuda/jcufft/blob/833c87ffb0864f7ee7270fddef8af57f48939b3a/JCufftJava/src/main/java/jcuda/jcufft/JCufft.java#L210-L217
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/random/RandomInteger.java
RandomInteger.updateInteger
public static int updateInteger(int value, int range) { """ Updates (drifts) a integer value within specified range defined @param value a integer value to drift. @param range (optional) a range. Default: 10% of the value @return updated random integer value. """ range = range == 0 ? (int) (0.1 * value)...
java
public static int updateInteger(int value, int range) { range = range == 0 ? (int) (0.1 * value) : range; int min = value - range; int max = value + range; return nextInteger(min, max); }
[ "public", "static", "int", "updateInteger", "(", "int", "value", ",", "int", "range", ")", "{", "range", "=", "range", "==", "0", "?", "(", "int", ")", "(", "0.1", "*", "value", ")", ":", "range", ";", "int", "min", "=", "value", "-", "range", ";...
Updates (drifts) a integer value within specified range defined @param value a integer value to drift. @param range (optional) a range. Default: 10% of the value @return updated random integer value.
[ "Updates", "(", "drifts", ")", "a", "integer", "value", "within", "specified", "range", "defined" ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/random/RandomInteger.java#L65-L70
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java
CmsAliasBulkEditHelper.validateSingleAliasRow
private void validateSingleAliasRow(CmsObject cms, CmsAliasTableRow row) { """ Validates a single alias row.<p> @param cms the current CMS context @param row the row to validate """ Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); if (row.getStructureId() == null) ...
java
private void validateSingleAliasRow(CmsObject cms, CmsAliasTableRow row) { Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); if (row.getStructureId() == null) { String path = row.getResourcePath(); try { CmsResource resource = cms.readR...
[ "private", "void", "validateSingleAliasRow", "(", "CmsObject", "cms", ",", "CmsAliasTableRow", "row", ")", "{", "Locale", "locale", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getWorkplaceLocale", "(", "cms", ")", ";", "if", "(", "row", ".", ...
Validates a single alias row.<p> @param cms the current CMS context @param row the row to validate
[ "Validates", "a", "single", "alias", "row", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java#L312-L332
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ConnectionMonitorsInner.java
ConnectionMonitorsInner.beginCreateOrUpdate
public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { """ Create or update a connection monitor. @param resourceGroupName The name of the resource group containing Network Watcher. @param n...
java
public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking(...
[ "public", "ConnectionMonitorResultInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "connectionMonitorName", ",", "ConnectionMonitorInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceRespon...
Create or update a connection monitor. @param resourceGroupName The name of the resource group containing Network Watcher. @param networkWatcherName The name of the Network Watcher resource. @param connectionMonitorName The name of the connection monitor. @param parameters Parameters that define the operation to creat...
[ "Create", "or", "update", "a", "connection", "monitor", "." ]
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/ConnectionMonitorsInner.java#L204-L206
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyNodeImpl.java
PolicyNodeImpl.getPolicyNodesExpected
Set<PolicyNodeImpl> getPolicyNodesExpected(int depth, String expectedOID, boolean matchAny) { """ Finds all nodes at the specified depth whose expected_policy_set contains the specified expected OID (if matchAny is false) or the special OID "any value" (if matchAny is true). @param depth an int repres...
java
Set<PolicyNodeImpl> getPolicyNodesExpected(int depth, String expectedOID, boolean matchAny) { if (expectedOID.equals(ANY_POLICY)) { return getPolicyNodes(depth); } else { return getPolicyNodesExpectedHelper(depth, expectedOID, matchAny); } }
[ "Set", "<", "PolicyNodeImpl", ">", "getPolicyNodesExpected", "(", "int", "depth", ",", "String", "expectedOID", ",", "boolean", "matchAny", ")", "{", "if", "(", "expectedOID", ".", "equals", "(", "ANY_POLICY", ")", ")", "{", "return", "getPolicyNodes", "(", ...
Finds all nodes at the specified depth whose expected_policy_set contains the specified expected OID (if matchAny is false) or the special OID "any value" (if matchAny is true). @param depth an int representing the desired depth @param expectedOID a String encoding the valid OID to match @param matchAny a boolean indi...
[ "Finds", "all", "nodes", "at", "the", "specified", "depth", "whose", "expected_policy_set", "contains", "the", "specified", "expected", "OID", "(", "if", "matchAny", "is", "false", ")", "or", "the", "special", "OID", "any", "value", "(", "if", "matchAny", "i...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyNodeImpl.java#L334-L342
briandilley/jsonrpc4j
src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java
JsonRpcClient.internalWriteRequest
private void internalWriteRequest(String methodName, Object arguments, OutputStream output, String id) throws IOException { """ Writes a request. @param methodName the method name @param arguments the arguments @param output the stream @param id the optional id @throws IOException on error ...
java
private void internalWriteRequest(String methodName, Object arguments, OutputStream output, String id) throws IOException { final ObjectNode request = internalCreateRequest(methodName, arguments, id); logger.debug("Request {}", request); writeAndFlushValue(output, request); }
[ "private", "void", "internalWriteRequest", "(", "String", "methodName", ",", "Object", "arguments", ",", "OutputStream", "output", ",", "String", "id", ")", "throws", "IOException", "{", "final", "ObjectNode", "request", "=", "internalCreateRequest", "(", "methodNam...
Writes a request. @param methodName the method name @param arguments the arguments @param output the stream @param id the optional id @throws IOException on error
[ "Writes", "a", "request", "." ]
train
https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java#L304-L308
xwiki/xwiki-rendering
xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java
IconTransformation.convertToDeepTree
private Block convertToDeepTree(Block sourceTree, String iconName) { """ Converts a standard XDOM tree into a deep tree: sibling are transformed into parent/child relationships and the leaf node is an Image node referencing the passed icon name. @param sourceTree the source tree to modify @param iconName the ...
java
private Block convertToDeepTree(Block sourceTree, String iconName) { XDOM targetTree = new XDOM(Collections.<Block>emptyList()); Block pointer = targetTree; for (Block block : sourceTree.getChildren()) { pointer.addChild(block); pointer = block; } // A...
[ "private", "Block", "convertToDeepTree", "(", "Block", "sourceTree", ",", "String", "iconName", ")", "{", "XDOM", "targetTree", "=", "new", "XDOM", "(", "Collections", ".", "<", "Block", ">", "emptyList", "(", ")", ")", ";", "Block", "pointer", "=", "targe...
Converts a standard XDOM tree into a deep tree: sibling are transformed into parent/child relationships and the leaf node is an Image node referencing the passed icon name. @param sourceTree the source tree to modify @param iconName the name of the icon to display when a match is found @return the modified tree
[ "Converts", "a", "standard", "XDOM", "tree", "into", "a", "deep", "tree", ":", "sibling", "are", "transformed", "into", "parent", "/", "child", "relationships", "and", "the", "leaf", "node", "is", "an", "Image", "node", "referencing", "the", "passed", "icon"...
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java#L136-L147
apache/reef
lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/api/VortexAggregateFuture.java
VortexAggregateFuture.aggregationCompleted
@Private @Override public void aggregationCompleted(final List<Integer> taskletIds, final TOutput result) { """ Aggregation has completed for a list of Tasklets, with an aggregated result. """ try { completedTasklets(result, taskletIds); } catch (final InterruptedException e) { throw ne...
java
@Private @Override public void aggregationCompleted(final List<Integer> taskletIds, final TOutput result) { try { completedTasklets(result, taskletIds); } catch (final InterruptedException e) { throw new RuntimeException(e); } }
[ "@", "Private", "@", "Override", "public", "void", "aggregationCompleted", "(", "final", "List", "<", "Integer", ">", "taskletIds", ",", "final", "TOutput", "result", ")", "{", "try", "{", "completedTasklets", "(", "result", ",", "taskletIds", ")", ";", "}",...
Aggregation has completed for a list of Tasklets, with an aggregated result.
[ "Aggregation", "has", "completed", "for", "a", "list", "of", "Tasklets", "with", "an", "aggregated", "result", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/api/VortexAggregateFuture.java#L125-L133
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java
TaskClient.logMessageForTask
public void logMessageForTask(String taskId, String logMessage) { """ Log execution messages for a task. @param taskId id of the task @param logMessage the message to be logged """ Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); stub.addLog( ...
java
public void logMessageForTask(String taskId, String logMessage) { Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); stub.addLog( TaskServicePb.AddLogRequest.newBuilder() .setTaskId(taskId) .setLog(logMe...
[ "public", "void", "logMessageForTask", "(", "String", "taskId", ",", "String", "logMessage", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskId", ")", ",", "\"Task id cannot be blank\"", ")", ";", "stub", ".", "a...
Log execution messages for a task. @param taskId id of the task @param logMessage the message to be logged
[ "Log", "execution", "messages", "for", "a", "task", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java#L175-L183
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java
HttpClientUpgradeHandler.setUpgradeRequestHeaders
private void setUpgradeRequestHeaders(ChannelHandlerContext ctx, HttpRequest request) { """ Adds all upgrade request headers necessary for an upgrade to the supported protocols. """ // Set the UPGRADE header on the request. request.headers().set(HttpHeaderNames.UPGRADE, upgradeCodec.protocol())...
java
private void setUpgradeRequestHeaders(ChannelHandlerContext ctx, HttpRequest request) { // Set the UPGRADE header on the request. request.headers().set(HttpHeaderNames.UPGRADE, upgradeCodec.protocol()); // Add all protocol-specific headers to the request. Set<CharSequence> connectionPar...
[ "private", "void", "setUpgradeRequestHeaders", "(", "ChannelHandlerContext", "ctx", ",", "HttpRequest", "request", ")", "{", "// Set the UPGRADE header on the request.", "request", ".", "headers", "(", ")", ".", "set", "(", "HttpHeaderNames", ".", "UPGRADE", ",", "upg...
Adds all upgrade request headers necessary for an upgrade to the supported protocols.
[ "Adds", "all", "upgrade", "request", "headers", "necessary", "for", "an", "upgrade", "to", "the", "supported", "protocols", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java#L265-L281
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/visitor/AbstractTypeCheckVisitor.java
AbstractTypeCheckVisitor.typecheckLetBeSt
protected Map.Entry<PType, AMultiBindListDefinition> typecheckLetBeSt( INode node, ILexLocation nodeLocation, PMultipleBind bind, PExp suchThat, INode body, TypeCheckInfo question) throws AnalysisException { """ Type check method for let be such that @param node @param nodeLocation @param bind @param ...
java
protected Map.Entry<PType, AMultiBindListDefinition> typecheckLetBeSt( INode node, ILexLocation nodeLocation, PMultipleBind bind, PExp suchThat, INode body, TypeCheckInfo question) throws AnalysisException { final PDefinition def = AstFactory.newAMultiBindListDefinition(nodeLocation, question.assistantFacto...
[ "protected", "Map", ".", "Entry", "<", "PType", ",", "AMultiBindListDefinition", ">", "typecheckLetBeSt", "(", "INode", "node", ",", "ILexLocation", "nodeLocation", ",", "PMultipleBind", "bind", ",", "PExp", "suchThat", ",", "INode", "body", ",", "TypeCheckInfo", ...
Type check method for let be such that @param node @param nodeLocation @param bind @param suchThat @param body @param question @return a pair of the type and definition @throws AnalysisException
[ "Type", "check", "method", "for", "let", "be", "such", "that" ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/visitor/AbstractTypeCheckVisitor.java#L244-L299
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.putMethodAnalysis
public void putMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor, Object object) { """ Store a method analysis object. Note that the cached analysis object could be a special value (indicating null or an exception). @param analysisClass class the method analysis object belongs to @para...
java
public void putMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor, Object object) { if (object == null) { throw new IllegalArgumentException(); } Map<MethodDescriptor, Object> objectMap = getObjectMap(analysisClass); objectMap.put(methodDescriptor, objec...
[ "public", "void", "putMethodAnalysis", "(", "Class", "<", "?", ">", "analysisClass", ",", "MethodDescriptor", "methodDescriptor", ",", "Object", "object", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "...
Store a method analysis object. Note that the cached analysis object could be a special value (indicating null or an exception). @param analysisClass class the method analysis object belongs to @param methodDescriptor method descriptor identifying the analyzed method @param object the analysis object to cache
[ "Store", "a", "method", "analysis", "object", ".", "Note", "that", "the", "cached", "analysis", "object", "could", "be", "a", "special", "value", "(", "indicating", "null", "or", "an", "exception", ")", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L152-L158
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildMethodsSummary
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { """ Build the method summary. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added """ MemberSummaryWriter writer = ...
java
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters.get(VisibleMemberMap.Kind.METHODS); VisibleMemberMap visibleMemberMap = getVisibleMemberMap(VisibleMemberMap.Kind.METHODS); addSummary(write...
[ "public", "void", "buildMethodsSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", ".", "get", "(", "VisibleMemberMap", ".", "Kind", ".", "METHODS", ")", ";", "VisibleMemberMa...
Build the method summary. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "method", "summary", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java#L304-L310
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java
BingImagesImpl.detailsAsync
public Observable<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter) { """ The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This section provides technical details about the query parameters ...
java
public Observable<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter) { return detailsWithServiceResponseAsync(query, detailsOptionalParameter).map(new Func1<ServiceResponse<ImageInsights>, ImageInsights>() { @Override public ImageInsights call(Se...
[ "public", "Observable", "<", "ImageInsights", ">", "detailsAsync", "(", "String", "query", ",", "DetailsOptionalParameter", "detailsOptionalParameter", ")", "{", "return", "detailsWithServiceResponseAsync", "(", "query", ",", "detailsOptionalParameter", ")", ".", "map", ...
The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This section provides technical details about the query parameters and headers that you use to request insights of images and the JSON response objects that contain them. For examples that ...
[ "The", "Image", "Detail", "Search", "API", "lets", "you", "search", "on", "Bing", "and", "get", "back", "insights", "about", "an", "image", "such", "as", "webpages", "that", "include", "the", "image", ".", "This", "section", "provides", "technical", "details...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java#L502-L509
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/TextSimilarity.java
TextSimilarity.similar
public static String similar(String strA, String strB, int scale) { """ 计算相似度百分比 @param strA 字符串1 @param strB 字符串2 @param scale 保留小数 @return 百分比 """ return NumberUtil.formatPercent(similar(strA, strB), scale); }
java
public static String similar(String strA, String strB, int scale) { return NumberUtil.formatPercent(similar(strA, strB), scale); }
[ "public", "static", "String", "similar", "(", "String", "strA", ",", "String", "strB", ",", "int", "scale", ")", "{", "return", "NumberUtil", ".", "formatPercent", "(", "similar", "(", "strA", ",", "strB", ")", ",", "scale", ")", ";", "}" ]
计算相似度百分比 @param strA 字符串1 @param strB 字符串2 @param scale 保留小数 @return 百分比
[ "计算相似度百分比" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/TextSimilarity.java#L45-L47
apache/flink
flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java
InstantiationUtil.resolveClassByName
public static <T> Class<T> resolveClassByName( DataInputView in, ClassLoader cl) throws IOException { """ Loads a class by name from the given input stream and reflectively instantiates it. <p>This method will use {@link DataInputView#readUTF()} to read the class name, and then attempt to load the class ...
java
public static <T> Class<T> resolveClassByName( DataInputView in, ClassLoader cl) throws IOException { return resolveClassByName(in, cl, Object.class); }
[ "public", "static", "<", "T", ">", "Class", "<", "T", ">", "resolveClassByName", "(", "DataInputView", "in", ",", "ClassLoader", "cl", ")", "throws", "IOException", "{", "return", "resolveClassByName", "(", "in", ",", "cl", ",", "Object", ".", "class", ")"...
Loads a class by name from the given input stream and reflectively instantiates it. <p>This method will use {@link DataInputView#readUTF()} to read the class name, and then attempt to load the class from the given ClassLoader. @param in The stream to read the class name from. @param cl The class loader to resolve the...
[ "Loads", "a", "class", "by", "name", "from", "the", "given", "input", "stream", "and", "reflectively", "instantiates", "it", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java#L678-L682
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/MutableClock.java
MutableClock.withZone
@Override public MutableClock withZone(ZoneId zone) { """ Returns a {@code MutableClock} that uses the specified time-zone and that has shared updates with this clock. <p> Two clocks with shared updates always have the same instant, and all updates applied to either clock affect both clocks. @param zone...
java
@Override public MutableClock withZone(ZoneId zone) { Objects.requireNonNull(zone, "zone"); if (zone.equals(this.zone)) { return this; } return new MutableClock(instantHolder, zone); }
[ "@", "Override", "public", "MutableClock", "withZone", "(", "ZoneId", "zone", ")", "{", "Objects", ".", "requireNonNull", "(", "zone", ",", "\"zone\"", ")", ";", "if", "(", "zone", ".", "equals", "(", "this", ".", "zone", ")", ")", "{", "return", "this...
Returns a {@code MutableClock} that uses the specified time-zone and that has shared updates with this clock. <p> Two clocks with shared updates always have the same instant, and all updates applied to either clock affect both clocks. @param zone the time-zone to use for the returned clock, not null @return a view of ...
[ "Returns", "a", "{", "@code", "MutableClock", "}", "that", "uses", "the", "specified", "time", "-", "zone", "and", "that", "has", "shared", "updates", "with", "this", "clock", ".", "<p", ">", "Two", "clocks", "with", "shared", "updates", "always", "have", ...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/MutableClock.java#L291-L298
awltech/org.parallelj
parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/loop/KWhileLoop.java
KWhileLoop.complete
private void complete(KSplit split, KCall call) { """ Called at the end of a KWhileLoop @param split @param call @return void """ reset(call.getProcess()); split.split(call); }
java
private void complete(KSplit split, KCall call) { reset(call.getProcess()); split.split(call); }
[ "private", "void", "complete", "(", "KSplit", "split", ",", "KCall", "call", ")", "{", "reset", "(", "call", ".", "getProcess", "(", ")", ")", ";", "split", ".", "split", "(", "call", ")", ";", "}" ]
Called at the end of a KWhileLoop @param split @param call @return void
[ "Called", "at", "the", "end", "of", "a", "KWhileLoop" ]
train
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/kernel/loop/KWhileLoop.java#L145-L148
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java
GuiceUtil.isOptional
public boolean isOptional(MemberLiteral<?, ?> member) { """ Returns true if the passed method has an {@literal @}{@code Inject} annotation and the injection is marked as optional ( {@literal @}{@code Inject(optional = true)}). Note that {@link javax.inject.Inject} does not have an optional parameter and ther...
java
public boolean isOptional(MemberLiteral<?, ?> member) { Inject annotation = member.getAnnotation(Inject.class); return annotation != null && annotation.optional(); }
[ "public", "boolean", "isOptional", "(", "MemberLiteral", "<", "?", ",", "?", ">", "member", ")", "{", "Inject", "annotation", "=", "member", ".", "getAnnotation", "(", "Inject", ".", "class", ")", ";", "return", "annotation", "!=", "null", "&&", "annotatio...
Returns true if the passed method has an {@literal @}{@code Inject} annotation and the injection is marked as optional ( {@literal @}{@code Inject(optional = true)}). Note that {@link javax.inject.Inject} does not have an optional parameter and therefore cannot be optional. @param member method to be checked @return ...
[ "Returns", "true", "if", "the", "passed", "method", "has", "an", "{", "@literal", "@", "}", "{", "@code", "Inject", "}", "annotation", "and", "the", "injection", "is", "marked", "as", "optional", "(", "{", "@literal", "@", "}", "{", "@code", "Inject", ...
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java#L122-L125
logic-ng/LogicNG
src/main/java/org/logicng/formulas/FormulaFactory.java
FormulaFactory.containsComplement
private static boolean containsComplement(final LinkedHashSet<Formula> formulas, final Formula f) { """ Returns {@code true} if a given list of formulas contains the negation of a given formula, {@code false} otherwise. @param formulas the list of formulas @param f the formula @return {@code true} if a...
java
private static boolean containsComplement(final LinkedHashSet<Formula> formulas, final Formula f) { return formulas.contains(f.negate()); }
[ "private", "static", "boolean", "containsComplement", "(", "final", "LinkedHashSet", "<", "Formula", ">", "formulas", ",", "final", "Formula", "f", ")", "{", "return", "formulas", ".", "contains", "(", "f", ".", "negate", "(", ")", ")", ";", "}" ]
Returns {@code true} if a given list of formulas contains the negation of a given formula, {@code false} otherwise. @param formulas the list of formulas @param f the formula @return {@code true} if a given list of formulas contains a given formula, {@code false} otherwise
[ "Returns", "{" ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L167-L169
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
SizeTieredCompactionStrategy.trimToThresholdWithHotness
@VisibleForTesting static Pair<List<SSTableReader>, Double> trimToThresholdWithHotness(List<SSTableReader> bucket, int maxThreshold) { """ Returns a (bucket, hotness) pair or null if there were not enough sstables in the bucket to meet minThreshold. If there are more than maxThreshold sstables, the coldest ss...
java
@VisibleForTesting static Pair<List<SSTableReader>, Double> trimToThresholdWithHotness(List<SSTableReader> bucket, int maxThreshold) { // Sort by sstable hotness (descending). We first build a map because the hotness may change during the sort. final Map<SSTableReader, Double> hotnessSnapshot = ...
[ "@", "VisibleForTesting", "static", "Pair", "<", "List", "<", "SSTableReader", ">", ",", "Double", ">", "trimToThresholdWithHotness", "(", "List", "<", "SSTableReader", ">", "bucket", ",", "int", "maxThreshold", ")", "{", "// Sort by sstable hotness (descending). We f...
Returns a (bucket, hotness) pair or null if there were not enough sstables in the bucket to meet minThreshold. If there are more than maxThreshold sstables, the coldest sstables will be trimmed to meet the threshold.
[ "Returns", "a", "(", "bucket", "hotness", ")", "pair", "or", "null", "if", "there", "were", "not", "enough", "sstables", "in", "the", "bucket", "to", "meet", "minThreshold", ".", "If", "there", "are", "more", "than", "maxThreshold", "sstables", "the", "col...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java#L137-L159
alkacon/opencms-core
src/org/opencms/main/CmsSessionManager.java
CmsSessionManager.killSession
public void killSession(CmsObject cms, CmsUUID sessionid) throws CmsException { """ Destroys a session given the session id. Only allowed for users which have the "account manager" role.<p> @param cms the current CMS context @param sessionid the session id @throws CmsException if something goes wrong ""...
java
public void killSession(CmsObject cms, CmsUUID sessionid) throws CmsException { OpenCms.getRoleManager().checkRole(cms, CmsRole.ACCOUNT_MANAGER); m_sessionStorageProvider.remove(sessionid); }
[ "public", "void", "killSession", "(", "CmsObject", "cms", ",", "CmsUUID", "sessionid", ")", "throws", "CmsException", "{", "OpenCms", ".", "getRoleManager", "(", ")", ".", "checkRole", "(", "cms", ",", "CmsRole", ".", "ACCOUNT_MANAGER", ")", ";", "m_sessionSto...
Destroys a session given the session id. Only allowed for users which have the "account manager" role.<p> @param cms the current CMS context @param sessionid the session id @throws CmsException if something goes wrong
[ "Destroys", "a", "session", "given", "the", "session", "id", ".", "Only", "allowed", "for", "users", "which", "have", "the", "account", "manager", "role", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsSessionManager.java#L322-L327
jxnet/Jxnet
jxnet-core/src/main/java/com/ardikars/jxnet/PcapPktHdr.java
PcapPktHdr.newInstance
public static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec) { """ Create new PcapPktHdr instance. @param caplen capture length. @param len length. @param tvSec tv_sec. @param tvUsec tv_usec. @return returns PcapPktHdr. """ return new PcapPktHdr(caplen, len, ...
java
public static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec) { return new PcapPktHdr(caplen, len, tvSec, tvUsec); }
[ "public", "static", "PcapPktHdr", "newInstance", "(", "final", "int", "caplen", ",", "final", "int", "len", ",", "final", "int", "tvSec", ",", "final", "long", "tvUsec", ")", "{", "return", "new", "PcapPktHdr", "(", "caplen", ",", "len", ",", "tvSec", ",...
Create new PcapPktHdr instance. @param caplen capture length. @param len length. @param tvSec tv_sec. @param tvUsec tv_usec. @return returns PcapPktHdr.
[ "Create", "new", "PcapPktHdr", "instance", "." ]
train
https://github.com/jxnet/Jxnet/blob/3ef28eb83c149ff134df1841d12bcbea3d8fe163/jxnet-core/src/main/java/com/ardikars/jxnet/PcapPktHdr.java#L67-L69
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildHeadRequest
public HttpRequest buildHeadRequest(GenericUrl url) throws IOException { """ Builds a {@code HEAD} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request """ return buildRequest(HttpMethods.HEAD, url, null); }
java
public HttpRequest buildHeadRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.HEAD, url, null); }
[ "public", "HttpRequest", "buildHeadRequest", "(", "GenericUrl", "url", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "HEAD", ",", "url", ",", "null", ")", ";", "}" ]
Builds a {@code HEAD} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "HEAD", "}", "request", "for", "the", "given", "URL", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L159-L161
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java
AnnotatedTextBuilder.addMarkup
public AnnotatedTextBuilder addMarkup(String markup, String interpretAs) { """ Add a markup text snippet like {@code <b attr='something'>} or {@code <div>}. These parts will be ignored by LanguageTool when using {@link org.languagetool.JLanguageTool#check(AnnotatedText)}. @param interpretAs A string that will be...
java
public AnnotatedTextBuilder addMarkup(String markup, String interpretAs) { parts.add(new TextPart(markup, TextPart.Type.MARKUP)); parts.add(new TextPart(interpretAs, TextPart.Type.FAKE_CONTENT)); return this; }
[ "public", "AnnotatedTextBuilder", "addMarkup", "(", "String", "markup", ",", "String", "interpretAs", ")", "{", "parts", ".", "add", "(", "new", "TextPart", "(", "markup", ",", "TextPart", ".", "Type", ".", "MARKUP", ")", ")", ";", "parts", ".", "add", "...
Add a markup text snippet like {@code <b attr='something'>} or {@code <div>}. These parts will be ignored by LanguageTool when using {@link org.languagetool.JLanguageTool#check(AnnotatedText)}. @param interpretAs A string that will be used by the checker instead of the markup. This is usually whitespace, e.g. {@code \n...
[ "Add", "a", "markup", "text", "snippet", "like", "{" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java#L104-L108
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemgroup_binding.java
systemgroup_binding.get
public static systemgroup_binding get(nitro_service service, String groupname) throws Exception { """ Use this API to fetch systemgroup_binding resource of given name . """ systemgroup_binding obj = new systemgroup_binding(); obj.set_groupname(groupname); systemgroup_binding response = (systemgroup_bindi...
java
public static systemgroup_binding get(nitro_service service, String groupname) throws Exception{ systemgroup_binding obj = new systemgroup_binding(); obj.set_groupname(groupname); systemgroup_binding response = (systemgroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "systemgroup_binding", "get", "(", "nitro_service", "service", ",", "String", "groupname", ")", "throws", "Exception", "{", "systemgroup_binding", "obj", "=", "new", "systemgroup_binding", "(", ")", ";", "obj", ".", "set_groupname", "(", "group...
Use this API to fetch systemgroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "systemgroup_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemgroup_binding.java#L114-L119
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java
TitlePaneMenuButtonPainter.paintMenu
private void paintMenu(Graphics2D g, JComponent c, int width, int height, ButtonColors colors) { """ Paint the button using the specified colors. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the componen...
java
private void paintMenu(Graphics2D g, JComponent c, int width, int height, ButtonColors colors) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); g.setColor(colors.top); g.drawLine(0, 0, width - 2, 0); g.setColor(colors.leftOuter); g.draw...
[ "private", "void", "paintMenu", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ",", "ButtonColors", "colors", ")", "{", "g", ".", "setRenderingHint", "(", "RenderingHints", ".", "KEY_ANTIALIASING", ",", "RenderingHin...
Paint the button using the specified colors. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component. @param colors the color set to use to paint the button.
[ "Paint", "the", "button", "using", "the", "specified", "colors", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java#L147-L187
xcesco/kripton
kripton-shared-preferences/src/main/java/com/abubusoft/kripton/common/PrefsTypeAdapterUtils.java
PrefsTypeAdapterUtils.toJava
public static <D, J> J toJava(Class<? extends PreferenceTypeAdapter<J, D>> clazz, D value) { """ To java. @param <D> the generic type @param <J> the generic type @param clazz the clazz @param value the value @return the j """ @SuppressWarnings("unchecked") PreferenceTypeAdapter<J, D> adapter = cache...
java
public static <D, J> J toJava(Class<? extends PreferenceTypeAdapter<J, D>> clazz, D value) { @SuppressWarnings("unchecked") PreferenceTypeAdapter<J, D> adapter = cache.get(clazz); if (adapter == null) { adapter = generateAdapter(clazz); } return adapter.toJava(value); }
[ "public", "static", "<", "D", ",", "J", ">", "J", "toJava", "(", "Class", "<", "?", "extends", "PreferenceTypeAdapter", "<", "J", ",", "D", ">", ">", "clazz", ",", "D", "value", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "PreferenceT...
To java. @param <D> the generic type @param <J> the generic type @param clazz the clazz @param value the value @return the j
[ "To", "java", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-shared-preferences/src/main/java/com/abubusoft/kripton/common/PrefsTypeAdapterUtils.java#L46-L55
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_protocol_GET
public OvhExchangeServiceProtocol organizationName_service_exchangeService_protocol_GET(String organizationName, String exchangeService) throws IOException { """ Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/protocol @param organizationName [required] The int...
java
public OvhExchangeServiceProtocol organizationName_service_exchangeService_protocol_GET(String organizationName, String exchangeService) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/protocol"; StringBuilder sb = path(qPath, organizationName, exchangeService); S...
[ "public", "OvhExchangeServiceProtocol", "organizationName_service_exchangeService_protocol_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/service/{exchangeServ...
Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/protocol @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2282-L2287
hector-client/hector
core/src/main/java/me/prettyprint/cassandra/model/MutatorImpl.java
MutatorImpl.addSubDelete
public <SN,N,V> Mutator<K> addSubDelete(K key, String cf, HSuperColumn<SN,N,V> sc) { """ Deletes the columns defined in the HSuperColumn. If there are no HColumns attached, we delete the whole thing. """ return addSubDelete(key, cf, sc, keyspace.createClock()); }
java
public <SN,N,V> Mutator<K> addSubDelete(K key, String cf, HSuperColumn<SN,N,V> sc) { return addSubDelete(key, cf, sc, keyspace.createClock()); }
[ "public", "<", "SN", ",", "N", ",", "V", ">", "Mutator", "<", "K", ">", "addSubDelete", "(", "K", "key", ",", "String", "cf", ",", "HSuperColumn", "<", "SN", ",", "N", ",", "V", ">", "sc", ")", "{", "return", "addSubDelete", "(", "key", ",", "c...
Deletes the columns defined in the HSuperColumn. If there are no HColumns attached, we delete the whole thing.
[ "Deletes", "the", "columns", "defined", "in", "the", "HSuperColumn", ".", "If", "there", "are", "no", "HColumns", "attached", "we", "delete", "the", "whole", "thing", "." ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/cassandra/model/MutatorImpl.java#L149-L151
lastaflute/lastaflute
src/main/java/org/lastaflute/core/message/UserMessages.java
UserMessages.saveSuccessAttribute
public void saveSuccessAttribute(String key, Object value) { """ Save validation success attribute, derived in validation process, e.g. selected data, <br> to avoid duplicate database access between validation and main logic. <pre> String <span style="color: #553000">keyOfProduct</span> = Product.<span style="c...
java
public void saveSuccessAttribute(String key, Object value) { assertArgumentNotNull("key", key); assertArgumentNotNull("value", value); assertLocked(); if (successAttributeMap == null) { successAttributeMap = new LinkedHashMap<String, Object>(4); } successAttri...
[ "public", "void", "saveSuccessAttribute", "(", "String", "key", ",", "Object", "value", ")", "{", "assertArgumentNotNull", "(", "\"key\"", ",", "key", ")", ";", "assertArgumentNotNull", "(", "\"value\"", ",", "value", ")", ";", "assertLocked", "(", ")", ";", ...
Save validation success attribute, derived in validation process, e.g. selected data, <br> to avoid duplicate database access between validation and main logic. <pre> String <span style="color: #553000">keyOfProduct</span> = Product.<span style="color: #70226C">class</span>.getName(); ValidationSuccess <span style="col...
[ "Save", "validation", "success", "attribute", "derived", "in", "validation", "process", "e", ".", "g", ".", "selected", "data", "<br", ">", "to", "avoid", "duplicate", "database", "access", "between", "validation", "and", "main", "logic", ".", "<pre", ">", "...
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/core/message/UserMessages.java#L324-L332
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferFastAggregation.java
BufferFastAggregation.priorityqueue_xor
public static MutableRoaringBitmap priorityqueue_xor(ImmutableRoaringBitmap... bitmaps) { """ Uses a priority queue to compute the xor aggregate. This function runs in linearithmic (O(n log n)) time with respect to the number of bitmaps. @param bitmaps input bitmaps @return aggregated bitmap @see #horizont...
java
public static MutableRoaringBitmap priorityqueue_xor(ImmutableRoaringBitmap... bitmaps) { // code could be faster, see priorityqueue_or if (bitmaps.length < 2) { throw new IllegalArgumentException("Expecting at least 2 bitmaps"); } final PriorityQueue<ImmutableRoaringBitmap> pq = new Prior...
[ "public", "static", "MutableRoaringBitmap", "priorityqueue_xor", "(", "ImmutableRoaringBitmap", "...", "bitmaps", ")", "{", "// code could be faster, see priorityqueue_or", "if", "(", "bitmaps", ".", "length", "<", "2", ")", "{", "throw", "new", "IllegalArgumentException"...
Uses a priority queue to compute the xor aggregate. This function runs in linearithmic (O(n log n)) time with respect to the number of bitmaps. @param bitmaps input bitmaps @return aggregated bitmap @see #horizontal_xor(ImmutableRoaringBitmap...)
[ "Uses", "a", "priority", "queue", "to", "compute", "the", "xor", "aggregate", "." ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferFastAggregation.java#L583-L602
alkacon/opencms-core
src/org/opencms/importexport/CmsExport.java
CmsExport.exportOrgUnit
protected void exportOrgUnit(Element parent, CmsOrganizationalUnit orgunit) throws SAXException, CmsException { """ Exports one single organizational unit with all it's data.<p> @param parent the parent node to add the groups to @param orgunit the group to be exported @throws SAXException if something goes ...
java
protected void exportOrgUnit(Element parent, CmsOrganizationalUnit orgunit) throws SAXException, CmsException { Element orgunitElement = parent.addElement(CmsImportVersion10.N_ORGUNIT); getSaxWriter().writeOpen(orgunitElement); Element name = orgunitElement.addElement(CmsImportVersion10.N_NAME...
[ "protected", "void", "exportOrgUnit", "(", "Element", "parent", ",", "CmsOrganizationalUnit", "orgunit", ")", "throws", "SAXException", ",", "CmsException", "{", "Element", "orgunitElement", "=", "parent", ".", "addElement", "(", "CmsImportVersion10", ".", "N_ORGUNIT"...
Exports one single organizational unit with all it's data.<p> @param parent the parent node to add the groups to @param orgunit the group to be exported @throws SAXException if something goes wrong processing the manifest.xml @throws CmsException if something goes wrong reading the data to export
[ "Exports", "one", "single", "organizational", "unit", "with", "all", "it", "s", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExport.java#L1021-L1061
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/ConnectionPool.java
ConnectionPool.getTableCreatingConnection
public TableCreatingConnection getTableCreatingConnection() throws SQLException { """ Gets a TableCreatingConnection. <p> </p> This derives from the same pool, but wraps the Connection in an appropriate TableCreatingConnection before returning it. @return The next available Connection from the p...
java
public TableCreatingConnection getTableCreatingConnection() throws SQLException { if (ddlConverter == null) { return null; } else { Connection c = getReadWriteConnection(); return new TableCreatingConnection(c, ddlConverter); } }
[ "public", "TableCreatingConnection", "getTableCreatingConnection", "(", ")", "throws", "SQLException", "{", "if", "(", "ddlConverter", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "Connection", "c", "=", "getReadWriteConnection", "(", ")", ";...
Gets a TableCreatingConnection. <p> </p> This derives from the same pool, but wraps the Connection in an appropriate TableCreatingConnection before returning it. @return The next available Connection from the pool, wrapped as a TableCreatingException, or null if this ConnectionPool hasn't been configured with a DDLCon...
[ "Gets", "a", "TableCreatingConnection", ".", "<p", ">", "<", "/", "p", ">", "This", "derives", "from", "the", "same", "pool", "but", "wraps", "the", "Connection", "in", "an", "appropriate", "TableCreatingConnection", "before", "returning", "it", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/ConnectionPool.java#L269-L277
lucasr/probe
library/src/main/java/org/lucasr/probe/ViewClassUtil.java
ViewClassUtil.findViewClass
static Class<?> findViewClass(Context context, String name) throws ClassNotFoundException { """ Tries to load class using a predefined list of class prefixes for Android views. """ if (name.indexOf('.') >= 0) { return loadViewClass(context, name); } for (String...
java
static Class<?> findViewClass(Context context, String name) throws ClassNotFoundException { if (name.indexOf('.') >= 0) { return loadViewClass(context, name); } for (String prefix : VIEW_CLASS_PREFIX_LIST) { try { return loadViewClass(context,...
[ "static", "Class", "<", "?", ">", "findViewClass", "(", "Context", "context", ",", "String", "name", ")", "throws", "ClassNotFoundException", "{", "if", "(", "name", ".", "indexOf", "(", "'", "'", ")", ">=", "0", ")", "{", "return", "loadViewClass", "(",...
Tries to load class using a predefined list of class prefixes for Android views.
[ "Tries", "to", "load", "class", "using", "a", "predefined", "list", "of", "class", "prefixes", "for", "Android", "views", "." ]
train
https://github.com/lucasr/probe/blob/cd15cc04383a1bf85de2f4c345d2018415b9ddc9/library/src/main/java/org/lucasr/probe/ViewClassUtil.java#L63-L78
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.shearY
public Matrix3x2f shearY(float xFactor, Matrix3x2f dest) { """ Apply shearing to this matrix by shearing along the Y axis using the X axis factor <code>xFactor</code>, and store the result in <code>dest</code>. @param xFactor the factor for the X component to shear along the Y axis @param dest will hold the...
java
public Matrix3x2f shearY(float xFactor, Matrix3x2f dest) { float nm00 = m00 + m10 * xFactor; float nm01 = m01 + m11 * xFactor; dest.m00 = nm00; dest.m01 = nm01; dest.m10 = m10; dest.m11 = m11; dest.m20 = m20; dest.m21 = m21; return dest; }
[ "public", "Matrix3x2f", "shearY", "(", "float", "xFactor", ",", "Matrix3x2f", "dest", ")", "{", "float", "nm00", "=", "m00", "+", "m10", "*", "xFactor", ";", "float", "nm01", "=", "m01", "+", "m11", "*", "xFactor", ";", "dest", ".", "m00", "=", "nm00...
Apply shearing to this matrix by shearing along the Y axis using the X axis factor <code>xFactor</code>, and store the result in <code>dest</code>. @param xFactor the factor for the X component to shear along the Y axis @param dest will hold the result @return dest
[ "Apply", "shearing", "to", "this", "matrix", "by", "shearing", "along", "the", "Y", "axis", "using", "the", "X", "axis", "factor", "<code", ">", "xFactor<", "/", "code", ">", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L2365-L2375
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generateAlgorithm
public static String generateAlgorithm(AsymmetricAlgorithm asymmetricAlgorithm, DigestAlgorithm digestAlgorithm) { """ 生成算法,格式为XXXwithXXX @param asymmetricAlgorithm 非对称算法 @param digestAlgorithm 摘要算法 @return 算法 @since 4.4.1 """ final String digestPart = (null == digestAlgorithm) ? "NONE" : digestAlgori...
java
public static String generateAlgorithm(AsymmetricAlgorithm asymmetricAlgorithm, DigestAlgorithm digestAlgorithm) { final String digestPart = (null == digestAlgorithm) ? "NONE" : digestAlgorithm.name(); return StrUtil.format("{}with{}", digestPart, asymmetricAlgorithm.getValue()); }
[ "public", "static", "String", "generateAlgorithm", "(", "AsymmetricAlgorithm", "asymmetricAlgorithm", ",", "DigestAlgorithm", "digestAlgorithm", ")", "{", "final", "String", "digestPart", "=", "(", "null", "==", "digestAlgorithm", ")", "?", "\"NONE\"", ":", "digestAlg...
生成算法,格式为XXXwithXXX @param asymmetricAlgorithm 非对称算法 @param digestAlgorithm 摘要算法 @return 算法 @since 4.4.1
[ "生成算法,格式为XXXwithXXX" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L277-L280
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java
Util.extractStyle
static String extractStyle(String style, String attribute) { """ Extract the style value from a Inkscape encoded string @param style The style string to be decoded @param attribute The style attribute to retrieve @return The value for the given attribute """ if (style == null) { return ""; } ...
java
static String extractStyle(String style, String attribute) { if (style == null) { return ""; } StringTokenizer tokens = new StringTokenizer(style,";"); while (tokens.hasMoreTokens()) { String token = tokens.nextToken(); String key = token.substring(0,token.indexOf(':')); if (key.equa...
[ "static", "String", "extractStyle", "(", "String", "style", ",", "String", "attribute", ")", "{", "if", "(", "style", "==", "null", ")", "{", "return", "\"\"", ";", "}", "StringTokenizer", "tokens", "=", "new", "StringTokenizer", "(", "style", ",", "\";\""...
Extract the style value from a Inkscape encoded string @param style The style string to be decoded @param attribute The style attribute to retrieve @return The value for the given attribute
[ "Extract", "the", "style", "value", "from", "a", "Inkscape", "encoded", "string" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java#L87-L103
jhy/jsoup
src/main/java/org/jsoup/safety/Whitelist.java
Whitelist.addEnforcedAttribute
public Whitelist addEnforcedAttribute(String tag, String attribute, String value) { """ Add an enforced attribute to a tag. An enforced attribute will always be added to the element. If the element already has the attribute set, it will be overridden with this value. <p> E.g.: <code>addEnforcedAttribute("a", "r...
java
public Whitelist addEnforcedAttribute(String tag, String attribute, String value) { Validate.notEmpty(tag); Validate.notEmpty(attribute); Validate.notEmpty(value); TagName tagName = TagName.valueOf(tag); tagNames.add(tagName); AttributeKey attrKey = AttributeKey.valueOf(...
[ "public", "Whitelist", "addEnforcedAttribute", "(", "String", "tag", ",", "String", "attribute", ",", "String", "value", ")", "{", "Validate", ".", "notEmpty", "(", "tag", ")", ";", "Validate", ".", "notEmpty", "(", "attribute", ")", ";", "Validate", ".", ...
Add an enforced attribute to a tag. An enforced attribute will always be added to the element. If the element already has the attribute set, it will be overridden with this value. <p> E.g.: <code>addEnforcedAttribute("a", "rel", "nofollow")</code> will make all <code>a</code> tags output as <code>&lt;a href="..." rel="...
[ "Add", "an", "enforced", "attribute", "to", "a", "tag", ".", "An", "enforced", "attribute", "will", "always", "be", "added", "to", "the", "element", ".", "If", "the", "element", "already", "has", "the", "attribute", "set", "it", "will", "be", "overridden",...
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/safety/Whitelist.java#L331-L349
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java
JingleManager.createOutgoingJingleSession
public JingleSession createOutgoingJingleSession(EntityFullJid responder) throws XMPPException { """ Creates an Jingle session to start a communication with another user. @param responder the fully qualified jabber ID with resource of the other user. @return The session on which the negotiation can be run....
java
public JingleSession createOutgoingJingleSession(EntityFullJid responder) throws XMPPException { JingleSession session = new JingleSession(connection, null, connection.getUser(), responder, jingleMediaManagers); triggerSessionCreated(session); return session; }
[ "public", "JingleSession", "createOutgoingJingleSession", "(", "EntityFullJid", "responder", ")", "throws", "XMPPException", "{", "JingleSession", "session", "=", "new", "JingleSession", "(", "connection", ",", "null", ",", "connection", ".", "getUser", "(", ")", ",...
Creates an Jingle session to start a communication with another user. @param responder the fully qualified jabber ID with resource of the other user. @return The session on which the negotiation can be run.
[ "Creates", "an", "Jingle", "session", "to", "start", "a", "communication", "with", "another", "user", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java#L521-L527
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.supportedVpnDevices
public String supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { """ Gets a xml format representation for supported vpn devices. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgu...
java
public String supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); }
[ "public", "String", "supportedVpnDevices", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "supportedVpnDevicesWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName", ")", ".", "toBlocking", "(...
Gets a xml format representation for supported vpn devices. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is reject...
[ "Gets", "a", "xml", "format", "representation", "for", "supported", "vpn", "devices", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2256-L2258
Metatavu/edelphi
smvcj/src/main/java/fi/metatavu/edelphi/smvcj/dispatcher/Servlet.java
Servlet.service
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { """ Processes all application requests, delegating them to their corresponding page, binary and JSON controllers. """ if (sessionSynchronization) { String syncKe...
java
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { if (sessionSynchronization) { String syncKey = getSyncKey(request); synchronized (getSyncObject(syncKey)) { try { doService(request, response); ...
[ "@", "Override", "protected", "void", "service", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "java", ".", "io", ".", "IOException", "{", "if", "(", "sessionSynchronization", ")", "{", "Strin...
Processes all application requests, delegating them to their corresponding page, binary and JSON controllers.
[ "Processes", "all", "application", "requests", "delegating", "them", "to", "their", "corresponding", "page", "binary", "and", "JSON", "controllers", "." ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/smvcj/src/main/java/fi/metatavu/edelphi/smvcj/dispatcher/Servlet.java#L81-L97
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java
OpenShiftManagedClustersInner.getByResourceGroupAsync
public Observable<OpenShiftManagedClusterInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { """ Gets a OpenShift managed cluster. Gets the details of the managed OpenShift cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @p...
java
public Observable<OpenShiftManagedClusterInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, OpenShiftManagedClusterInner>() { @...
[ "public", "Observable", "<", "OpenShiftManagedClusterInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")"...
Gets a OpenShift managed cluster. Gets the details of the managed OpenShift cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @param resourceName The name of the OpenShift managed cluster resource. @throws IllegalArgumentException thrown if parameters fail the v...
[ "Gets", "a", "OpenShift", "managed", "cluster", ".", "Gets", "the", "details", "of", "the", "managed", "OpenShift", "cluster", "with", "a", "specified", "resource", "group", "and", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java#L382-L389
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.getQueue
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { """ Looks up and returns a JMS queue. @param queueName remote queue name @param contextUrl the context url (or null for local) @return javax.jms.Queue """ try { String jndiName = null; ...
java
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { try { String jndiName = null; if (contextUrl == null) { jndiName = namingProvider.qualifyJmsQueueName(queueName); } else { jndiName = queueN...
[ "public", "Queue", "getQueue", "(", "String", "contextUrl", ",", "String", "queueName", ")", "throws", "ServiceLocatorException", "{", "try", "{", "String", "jndiName", "=", "null", ";", "if", "(", "contextUrl", "==", "null", ")", "{", "jndiName", "=", "nami...
Looks up and returns a JMS queue. @param queueName remote queue name @param contextUrl the context url (or null for local) @return javax.jms.Queue
[ "Looks", "up", "and", "returns", "a", "JMS", "queue", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L246-L260
ops4j/org.ops4j.base
ops4j-base-io/src/main/java/org/ops4j/io/StreamUtils.java
StreamUtils.copyStreamToWriter
public static void copyStreamToWriter( InputStream in, Writer out, String encoding, boolean close ) throws IOException { """ Copies an InputStream to a Writer. @param in The input byte stream of data. @param out The Writer to receive the streamed data as characters. @param encoding The enco...
java
public static void copyStreamToWriter( InputStream in, Writer out, String encoding, boolean close ) throws IOException { InputStreamReader reader = new InputStreamReader( in, encoding ); copyReaderToWriter( reader, out, close ); }
[ "public", "static", "void", "copyStreamToWriter", "(", "InputStream", "in", ",", "Writer", "out", ",", "String", "encoding", ",", "boolean", "close", ")", "throws", "IOException", "{", "InputStreamReader", "reader", "=", "new", "InputStreamReader", "(", "in", ",...
Copies an InputStream to a Writer. @param in The input byte stream of data. @param out The Writer to receive the streamed data as characters. @param encoding The encoding used in the byte stream. @param close true if the Reader and OutputStream should be closed after the completion. @throws IOException ...
[ "Copies", "an", "InputStream", "to", "a", "Writer", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-io/src/main/java/org/ops4j/io/StreamUtils.java#L282-L287
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java
SchedulerImpl.readInTask
private ScheduleTaskImpl readInTask(Element el) throws PageException { """ read in a single task element @param el @return matching task to Element @throws PageException """ long timeout = su.toLong(el, "timeout"); if (timeout > 0 && timeout < 1000) timeout *= 1000; if (timeout < 0) timeout = 600000; ...
java
private ScheduleTaskImpl readInTask(Element el) throws PageException { long timeout = su.toLong(el, "timeout"); if (timeout > 0 && timeout < 1000) timeout *= 1000; if (timeout < 0) timeout = 600000; try { ScheduleTaskImpl st = new ScheduleTaskImpl(this, su.toString(el, "name").trim(), su.toResource(config, el,...
[ "private", "ScheduleTaskImpl", "readInTask", "(", "Element", "el", ")", "throws", "PageException", "{", "long", "timeout", "=", "su", ".", "toLong", "(", "el", ",", "\"timeout\"", ")", ";", "if", "(", "timeout", ">", "0", "&&", "timeout", "<", "1000", ")...
read in a single task element @param el @return matching task to Element @throws PageException
[ "read", "in", "a", "single", "task", "element" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/SchedulerImpl.java#L184-L201
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF5.java
CommonOps_DDF5.multAddOuter
public static void multAddOuter( double alpha , DMatrix5x5 A , double beta , DMatrix5 u , DMatrix5 v , DMatrix5x5 C ) { """ C = &alpha;A + &beta;u*v<sup>T</sup> @param alpha scale factor applied to A @param A matrix @param beta scale factor applies to outer product @param u vector @param v vector @param C ...
java
public static void multAddOuter( double alpha , DMatrix5x5 A , double beta , DMatrix5 u , DMatrix5 v , DMatrix5x5 C ) { C.a11 = alpha*A.a11 + beta*u.a1*v.a1; C.a12 = alpha*A.a12 + beta*u.a1*v.a2; C.a13 = alpha*A.a13 + beta*u.a1*v.a3; C.a14 = alpha*A.a14 + beta*u.a1*v.a4; C.a15 = ...
[ "public", "static", "void", "multAddOuter", "(", "double", "alpha", ",", "DMatrix5x5", "A", ",", "double", "beta", ",", "DMatrix5", "u", ",", "DMatrix5", "v", ",", "DMatrix5x5", "C", ")", "{", "C", ".", "a11", "=", "alpha", "*", "A", ".", "a11", "+",...
C = &alpha;A + &beta;u*v<sup>T</sup> @param alpha scale factor applied to A @param A matrix @param beta scale factor applies to outer product @param u vector @param v vector @param C Storage for solution. Can be same instance as A.
[ "C", "=", "&alpha", ";", "A", "+", "&beta", ";", "u", "*", "v<sup", ">", "T<", "/", "sup", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF5.java#L999-L1025
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toDate
public static DateTime toDate(String str, TimeZone tz) throws PageException { """ cast a Object to a DateTime Object @param str String to cast @param tz @return casted DateTime Object @throws PageException """ return DateCaster.toDateAdvanced(str, tz); }
java
public static DateTime toDate(String str, TimeZone tz) throws PageException { return DateCaster.toDateAdvanced(str, tz); }
[ "public", "static", "DateTime", "toDate", "(", "String", "str", ",", "TimeZone", "tz", ")", "throws", "PageException", "{", "return", "DateCaster", ".", "toDateAdvanced", "(", "str", ",", "tz", ")", ";", "}" ]
cast a Object to a DateTime Object @param str String to cast @param tz @return casted DateTime Object @throws PageException
[ "cast", "a", "Object", "to", "a", "DateTime", "Object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L2885-L2887
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnSitesInner.java
VpnSitesInner.updateTagsAsync
public Observable<VpnSiteInner> updateTagsAsync(String resourceGroupName, String vpnSiteName, Map<String, String> tags) { """ Updates VpnSite tags. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being updated. @param tags Resource tags. @throws Ill...
java
public Observable<VpnSiteInner> updateTagsAsync(String resourceGroupName, String vpnSiteName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName, tags).map(new Func1<ServiceResponse<VpnSiteInner>, VpnSiteInner>() { @Override public VpnSit...
[ "public", "Observable", "<", "VpnSiteInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "vpnSiteName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGrou...
Updates VpnSite tags. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being updated. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "VpnSite", "tags", "." ]
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/VpnSitesInner.java#L475-L482
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributeCollection.java
DBaseFileAttributeCollection.fireAttributeAddedEvent
protected void fireAttributeAddedEvent(String name, AttributeValue attr) { """ Fire the addition event. @param name is the name of the attribute for which the event occured. @param attr is the value of the attribute. """ if (this.listeners != null && isEventFirable()) { final AttributeChangeEvent even...
java
protected void fireAttributeAddedEvent(String name, AttributeValue attr) { if (this.listeners != null && isEventFirable()) { final AttributeChangeEvent event = new AttributeChangeEvent( //source this, //type Type.ADDITION, //old name null, //old value null, //current na...
[ "protected", "void", "fireAttributeAddedEvent", "(", "String", "name", ",", "AttributeValue", "attr", ")", "{", "if", "(", "this", ".", "listeners", "!=", "null", "&&", "isEventFirable", "(", ")", ")", "{", "final", "AttributeChangeEvent", "event", "=", "new",...
Fire the addition event. @param name is the name of the attribute for which the event occured. @param attr is the value of the attribute.
[ "Fire", "the", "addition", "event", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributeCollection.java#L860-L879
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Config.java
Config.getProperty
public static String getProperty(Class<?> aClass,String key,ResourceBundle resourceBundle) { """ Get the property @param aClass the class associate with property @param key the property key @param resourceBundle the resource bundle default used if property not found @return the property key """ return g...
java
public static String getProperty(Class<?> aClass,String key,ResourceBundle resourceBundle) { return getSettings().getProperty(aClass, key, resourceBundle); }
[ "public", "static", "String", "getProperty", "(", "Class", "<", "?", ">", "aClass", ",", "String", "key", ",", "ResourceBundle", "resourceBundle", ")", "{", "return", "getSettings", "(", ")", ".", "getProperty", "(", "aClass", ",", "key", ",", "resourceBundl...
Get the property @param aClass the class associate with property @param key the property key @param resourceBundle the resource bundle default used if property not found @return the property key
[ "Get", "the", "property" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Config.java#L172-L175
jayantk/jklol
src/com/jayantkrish/jklol/ccg/lambda2/Expression2.java
Expression2.substitute
public Expression2 substitute(String value, String replacement) { """ Replaces all occurrences of {@code value} in this expression with {@code replacement}. @param value @param replacement @return """ return substitute(Expression2.constant(value), Expression2.constant(replacement)); }
java
public Expression2 substitute(String value, String replacement) { return substitute(Expression2.constant(value), Expression2.constant(replacement)); }
[ "public", "Expression2", "substitute", "(", "String", "value", ",", "String", "replacement", ")", "{", "return", "substitute", "(", "Expression2", ".", "constant", "(", "value", ")", ",", "Expression2", ".", "constant", "(", "replacement", ")", ")", ";", "}"...
Replaces all occurrences of {@code value} in this expression with {@code replacement}. @param value @param replacement @return
[ "Replaces", "all", "occurrences", "of", "{", "@code", "value", "}", "in", "this", "expression", "with", "{", "@code", "replacement", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/lambda2/Expression2.java#L251-L253
bugsnag/bugsnag-java
bugsnag/src/main/java/com/bugsnag/Report.java
Report.getExceptions
@Expose protected List<Exception> getExceptions() { """ Get the exceptions for the report. @return the exceptions that make up the error. """ List<Exception> exceptions = new ArrayList<Exception>(); exceptions.add(exception); Throwable currentThrowable = exception.getThrowable()...
java
@Expose protected List<Exception> getExceptions() { List<Exception> exceptions = new ArrayList<Exception>(); exceptions.add(exception); Throwable currentThrowable = exception.getThrowable().getCause(); while (currentThrowable != null) { exceptions.add(new Exception(confi...
[ "@", "Expose", "protected", "List", "<", "Exception", ">", "getExceptions", "(", ")", "{", "List", "<", "Exception", ">", "exceptions", "=", "new", "ArrayList", "<", "Exception", ">", "(", ")", ";", "exceptions", ".", "add", "(", "exception", ")", ";", ...
Get the exceptions for the report. @return the exceptions that make up the error.
[ "Get", "the", "exceptions", "for", "the", "report", "." ]
train
https://github.com/bugsnag/bugsnag-java/blob/11817d63949bcf2b2b6b765a1d37305cdec356f2/bugsnag/src/main/java/com/bugsnag/Report.java#L67-L79
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/JNDIEntry.java
JNDIEntry.activate
protected synchronized void activate(BundleContext context, Map<String, Object> props) { """ Registers the JNDI service for the supplied properties as long as the jndiName and value are set @param context @param props The properties containing values for <code>"jndiName"</code> and <code>"value"</code> """...
java
protected synchronized void activate(BundleContext context, Map<String, Object> props) { String jndiName = (String) props.get("jndiName"); String originalValue = (String) props.get("value"); //Since we declare a default value of false in the metatype, if decode isn't specified, props should ret...
[ "protected", "synchronized", "void", "activate", "(", "BundleContext", "context", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "String", "jndiName", "=", "(", "String", ")", "props", ".", "get", "(", "\"jndiName\"", ")", ";", "String",...
Registers the JNDI service for the supplied properties as long as the jndiName and value are set @param context @param props The properties containing values for <code>"jndiName"</code> and <code>"value"</code>
[ "Registers", "the", "JNDI", "service", "for", "the", "supplied", "properties", "as", "long", "as", "the", "jndiName", "and", "value", "are", "set" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/JNDIEntry.java#L57-L87
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.countByU_T
@Override public int countByU_T(long userId, int type) { """ Returns the number of commerce accounts where userId = &#63; and type = &#63;. @param userId the user ID @param type the type @return the number of matching commerce accounts """ FinderPath finderPath = FINDER_PATH_COUNT_BY_U_T; Object[] f...
java
@Override public int countByU_T(long userId, int type) { FinderPath finderPath = FINDER_PATH_COUNT_BY_U_T; Object[] finderArgs = new Object[] { userId, type }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); quer...
[ "@", "Override", "public", "int", "countByU_T", "(", "long", "userId", ",", "int", "type", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_U_T", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "userId", ",", "ty...
Returns the number of commerce accounts where userId = &#63; and type = &#63;. @param userId the user ID @param type the type @return the number of matching commerce accounts
[ "Returns", "the", "number", "of", "commerce", "accounts", "where", "userId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L1786-L1833
mikepenz/FastAdapter
library-extensions-expandable/src/main/java/com/mikepenz/fastadapter/expandable/ExpandableExtension.java
ExpandableExtension.notifyAdapterSubItemsChanged
public int notifyAdapterSubItemsChanged(int position, int previousCount) { """ notifies the fastAdapter about new / removed items within a sub hierarchy NOTE this currently only works for sub items with only 1 level @param position the global position of the parent item @param previousCount the previous ...
java
public int notifyAdapterSubItemsChanged(int position, int previousCount) { Item item = mFastAdapter.getItem(position); if (item != null && item instanceof IExpandable) { IExpandable expandable = (IExpandable) item; IAdapter adapter = mFastAdapter.getAdapter(position); ...
[ "public", "int", "notifyAdapterSubItemsChanged", "(", "int", "position", ",", "int", "previousCount", ")", "{", "Item", "item", "=", "mFastAdapter", ".", "getItem", "(", "position", ")", ";", "if", "(", "item", "!=", "null", "&&", "item", "instanceof", "IExp...
notifies the fastAdapter about new / removed items within a sub hierarchy NOTE this currently only works for sub items with only 1 level @param position the global position of the parent item @param previousCount the previous count of sub items @return the new count of subItems
[ "notifies", "the", "fastAdapter", "about", "new", "/", "removed", "items", "within", "a", "sub", "hierarchy", "NOTE", "this", "currently", "only", "works", "for", "sub", "items", "with", "only", "1", "level" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions-expandable/src/main/java/com/mikepenz/fastadapter/expandable/ExpandableExtension.java#L182-L194
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/auth/AbstractAuthenticationStrategy.java
AbstractAuthenticationStrategy.resolveUser
private User resolveUser(RequestContext requestContext, List<String> emails) { """ Determines a common <code>User</code> corresponding to the given list of e-mail addresses. If none of the e-mail addresses are in use, returns <code>null</code>. If the e-mail addresses are associated to multiple user accounts, an ...
java
private User resolveUser(RequestContext requestContext, List<String> emails) { User user = null; UserEmailDAO userEmailDAO = new UserEmailDAO(); for (String email : emails) { UserEmail userEmail = userEmailDAO.findByAddress(email); if (userEmail != null) { if (user == null) { u...
[ "private", "User", "resolveUser", "(", "RequestContext", "requestContext", ",", "List", "<", "String", ">", "emails", ")", "{", "User", "user", "=", "null", ";", "UserEmailDAO", "userEmailDAO", "=", "new", "UserEmailDAO", "(", ")", ";", "for", "(", "String",...
Determines a common <code>User</code> corresponding to the given list of e-mail addresses. If none of the e-mail addresses are in use, returns <code>null</code>. If the e-mail addresses are associated to multiple user accounts, an <code>SmvcRuntimeException</code> is thrown. @param requestContext Request context @para...
[ "Determines", "a", "common", "<code", ">", "User<", "/", "code", ">", "corresponding", "to", "the", "given", "list", "of", "e", "-", "mail", "addresses", ".", "If", "none", "of", "the", "e", "-", "mail", "addresses", "are", "in", "use", "returns", "<co...
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/auth/AbstractAuthenticationStrategy.java#L140-L157
javagl/ND
nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/i/IntTupleNeighborhoodIterables.java
IntTupleNeighborhoodIterables.vonNeumannNeighborhoodIterable
public static Iterable<MutableIntTuple> vonNeumannNeighborhoodIterable( IntTuple center, final int radius) { """ Creates an iterable that provides iterators for iterating over the Von Neumann neighborhood of the given center and the given radius.<br> <br> Also see <a href="../../package-summary.html#Ne...
java
public static Iterable<MutableIntTuple> vonNeumannNeighborhoodIterable( IntTuple center, final int radius) { final IntTuple localCenter = IntTuples.copy(center); return new Iterable<MutableIntTuple>() { @Override public Iterator<MutableIntTuple> iterato...
[ "public", "static", "Iterable", "<", "MutableIntTuple", ">", "vonNeumannNeighborhoodIterable", "(", "IntTuple", "center", ",", "final", "int", "radius", ")", "{", "final", "IntTuple", "localCenter", "=", "IntTuples", ".", "copy", "(", "center", ")", ";", "return...
Creates an iterable that provides iterators for iterating over the Von Neumann neighborhood of the given center and the given radius.<br> <br> Also see <a href="../../package-summary.html#Neighborhoods"> Neighborhoods</a> @param center The center of the Von Neumann neighborhood. A copy of this tuple will be stored int...
[ "Creates", "an", "iterable", "that", "provides", "iterators", "for", "iterating", "over", "the", "Von", "Neumann", "neighborhood", "of", "the", "given", "center", "and", "the", "given", "radius", ".", "<br", ">", "<br", ">", "Also", "see", "<a", "href", "=...
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/i/IntTupleNeighborhoodIterables.java#L132-L144
js-lib-com/commons
src/main/java/js/lang/Config.java
Config.getAttribute
public <T> T getAttribute(String name, Class<T> type, T defaultValue) { """ Get attribute value converted to requested type or default value if there is no attribute with requested name. If given default value is null and attribute is not found this method still returns null, that is, the requested default value...
java
public <T> T getAttribute(String name, Class<T> type, T defaultValue) { Params.notNullOrEmpty(name, "Attribute name"); Params.notNull(type, "Attribute type"); String value = attributes.get(name); return value != null ? converter.asObject(value, type) : defaultValue; }
[ "public", "<", "T", ">", "T", "getAttribute", "(", "String", "name", ",", "Class", "<", "T", ">", "type", ",", "T", "defaultValue", ")", "{", "Params", ".", "notNullOrEmpty", "(", "name", ",", "\"Attribute name\"", ")", ";", "Params", ".", "notNull", "...
Get attribute value converted to requested type or default value if there is no attribute with requested name. If given default value is null and attribute is not found this method still returns null, that is, the requested default value. @param name attribute name, @param type type to converter attribute value to, @p...
[ "Get", "attribute", "value", "converted", "to", "requested", "type", "or", "default", "value", "if", "there", "is", "no", "attribute", "with", "requested", "name", ".", "If", "given", "default", "value", "is", "null", "and", "attribute", "is", "not", "found"...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L320-L326
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
CandidateFilter.filterTarget
public boolean filterTarget(final T filteringTarget, final V referencingObject) { """ function to analyze the target item according to the reference object to decide whether the item should be filtered. @param filteringTarget: object to be checked. @param referencingObject: object which contains statistics ba...
java
public boolean filterTarget(final T filteringTarget, final V referencingObject) { logger.debug(String.format("start filtering '%s' with factor filter for '%s'", filteringTarget == null ? "(null)" : filteringTarget.toString(), this.getName())); final Collection<FactorFilter<T, V>> filterList = t...
[ "public", "boolean", "filterTarget", "(", "final", "T", "filteringTarget", ",", "final", "V", "referencingObject", ")", "{", "logger", ".", "debug", "(", "String", ".", "format", "(", "\"start filtering '%s' with factor filter for '%s'\"", ",", "filteringTarget", "=="...
function to analyze the target item according to the reference object to decide whether the item should be filtered. @param filteringTarget: object to be checked. @param referencingObject: object which contains statistics based on which a decision is made whether the object being checked need to be filtered or not. @r...
[ "function", "to", "analyze", "the", "target", "item", "according", "to", "the", "reference", "object", "to", "decide", "whether", "the", "item", "should", "be", "filtered", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java#L72-L89
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/graph/ui/LogFileWriter.java
LogFileWriter.readEvents
public List<Pair<UIEvent, Table>> readEvents(long startOffset) throws IOException { """ Read all of the events starting at a specific file offset @return All of the UI events """ if(endStaticInfoOffset >= file.length()){ return Collections.emptyList(); } List<Pair<UIEven...
java
public List<Pair<UIEvent, Table>> readEvents(long startOffset) throws IOException { if(endStaticInfoOffset >= file.length()){ return Collections.emptyList(); } List<Pair<UIEvent, Table>> out = new ArrayList<>(); try (RandomAccessFile f = new RandomAccessFile(file, "r"); File...
[ "public", "List", "<", "Pair", "<", "UIEvent", ",", "Table", ">", ">", "readEvents", "(", "long", "startOffset", ")", "throws", "IOException", "{", "if", "(", "endStaticInfoOffset", ">=", "file", ".", "length", "(", ")", ")", "{", "return", "Collections", ...
Read all of the events starting at a specific file offset @return All of the UI events
[ "Read", "all", "of", "the", "events", "starting", "at", "a", "specific", "file", "offset" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/graph/ui/LogFileWriter.java#L189-L242