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
prestodb/presto
presto-main/src/main/java/com/facebook/presto/operator/scalar/MapToMapCast.java
MapToMapCast.buildProcessor
private MethodHandle buildProcessor(FunctionManager functionManager, Type fromType, Type toType, boolean isKey) { """ The signature of the returned MethodHandle is (Block fromMap, int position, ConnectorSession session, BlockBuilder mapBlockBuilder)void. The processor will get the value from fromMap, cast it and ...
java
private MethodHandle buildProcessor(FunctionManager functionManager, Type fromType, Type toType, boolean isKey) { MethodHandle getter = nativeValueGetter(fromType); // Adapt cast that takes ([ConnectorSession,] ?) to one that takes (?, ConnectorSession), where ? is the return type of getter. ...
[ "private", "MethodHandle", "buildProcessor", "(", "FunctionManager", "functionManager", ",", "Type", "fromType", ",", "Type", "toType", ",", "boolean", "isKey", ")", "{", "MethodHandle", "getter", "=", "nativeValueGetter", "(", "fromType", ")", ";", "// Adapt cast t...
The signature of the returned MethodHandle is (Block fromMap, int position, ConnectorSession session, BlockBuilder mapBlockBuilder)void. The processor will get the value from fromMap, cast it and write to toBlock.
[ "The", "signature", "of", "the", "returned", "MethodHandle", "is", "(", "Block", "fromMap", "int", "position", "ConnectorSession", "session", "BlockBuilder", "mapBlockBuilder", ")", "void", ".", "The", "processor", "will", "get", "the", "value", "from", "fromMap",...
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/operator/scalar/MapToMapCast.java#L105-L127
SonarSource/sonarqube
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/charset/MssqlCharsetHandler.java
MssqlCharsetHandler.isCollationCorrect
private static boolean isCollationCorrect(String collation) { """ Collation is correct if contains {@link #CASE_SENSITIVE_ACCENT_SENSITIVE} or {@link #BIN} or {@link #BIN2}. """ return containsIgnoreCase(collation, CASE_SENSITIVE_ACCENT_SENSITIVE) || containsIgnoreCase(collation, BIN) || contai...
java
private static boolean isCollationCorrect(String collation) { return containsIgnoreCase(collation, CASE_SENSITIVE_ACCENT_SENSITIVE) || containsIgnoreCase(collation, BIN) || containsIgnoreCase(collation, BIN2); }
[ "private", "static", "boolean", "isCollationCorrect", "(", "String", "collation", ")", "{", "return", "containsIgnoreCase", "(", "collation", ",", "CASE_SENSITIVE_ACCENT_SENSITIVE", ")", "||", "containsIgnoreCase", "(", "collation", ",", "BIN", ")", "||", "containsIgn...
Collation is correct if contains {@link #CASE_SENSITIVE_ACCENT_SENSITIVE} or {@link #BIN} or {@link #BIN2}.
[ "Collation", "is", "correct", "if", "contains", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/charset/MssqlCharsetHandler.java#L91-L95
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.decimalFormat
public static DecimalFormat decimalFormat(final String pattern, final Locale locale) { """ <p> Same as {@link #decimalFormat(String)} for the specified locale. </p> @param pattern Format pattern that follows the conventions of {@link java.text.DecimalFormat DecimalFormat} @param locale Target locale @ret...
java
public static DecimalFormat decimalFormat(final String pattern, final Locale locale) { return withinLocale(new Callable<DecimalFormat>() { public DecimalFormat call() throws Exception { return decimalFormat(pattern); } }, locale); }
[ "public", "static", "DecimalFormat", "decimalFormat", "(", "final", "String", "pattern", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "DecimalFormat", ">", "(", ")", "{", "public", "DecimalFormat", "call", ...
<p> Same as {@link #decimalFormat(String)} for the specified locale. </p> @param pattern Format pattern that follows the conventions of {@link java.text.DecimalFormat DecimalFormat} @param locale Target locale @return a DecimalFormat instance for the current thread
[ "<p", ">", "Same", "as", "{", "@link", "#decimalFormat", "(", "String", ")", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L692-L705
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeMyFriendsRequestAsync
@Deprecated public static RequestAsyncTask executeMyFriendsRequestAsync(Session session, GraphUserListCallback callback) { """ Starts a new Request configured to retrieve a user's friend list. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Request.newMyFriend...
java
@Deprecated public static RequestAsyncTask executeMyFriendsRequestAsync(Session session, GraphUserListCallback callback) { return newMyFriendsRequest(session, callback).executeAsync(); }
[ "@", "Deprecated", "public", "static", "RequestAsyncTask", "executeMyFriendsRequestAsync", "(", "Session", "session", ",", "GraphUserListCallback", "callback", ")", "{", "return", "newMyFriendsRequest", "(", "session", ",", "callback", ")", ".", "executeAsync", "(", "...
Starts a new Request configured to retrieve a user's friend list. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Request.newMyFriendsRequest(...).executeAsync(); @param session the Session to use, or null; if non-null, the session must be in an opened state @param callba...
[ "Starts", "a", "new", "Request", "configured", "to", "retrieve", "a", "user", "s", "friend", "list", ".", "<p", "/", ">", "This", "should", "only", "be", "called", "from", "the", "UI", "thread", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1133-L1136
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/viewholder/EfficientViewHolder.java
EfficientViewHolder.setTextSize
public void setTextSize(int viewId, int unit, float size) { """ Equivalent to calling TextView.setTextSize @param viewId The id of the view whose text size should change @param unit The desired dimension unit. @param size The desired size in the given units. """ ViewHelper.setTextSize(mCacheVi...
java
public void setTextSize(int viewId, int unit, float size) { ViewHelper.setTextSize(mCacheView, viewId, unit, size); }
[ "public", "void", "setTextSize", "(", "int", "viewId", ",", "int", "unit", ",", "float", "size", ")", "{", "ViewHelper", ".", "setTextSize", "(", "mCacheView", ",", "viewId", ",", "unit", ",", "size", ")", ";", "}" ]
Equivalent to calling TextView.setTextSize @param viewId The id of the view whose text size should change @param unit The desired dimension unit. @param size The desired size in the given units.
[ "Equivalent", "to", "calling", "TextView", ".", "setTextSize" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/viewholder/EfficientViewHolder.java#L345-L347
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java
JobAgentsInner.beginUpdateAsync
public Observable<JobAgentInner> beginUpdateAsync(String resourceGroupName, String serverName, String jobAgentName) { """ Updates a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param ...
java
public Observable<JobAgentInner> beginUpdateAsync(String resourceGroupName, String serverName, String jobAgentName) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName).map(new Func1<ServiceResponse<JobAgentInner>, JobAgentInner>() { @Override public ...
[ "public", "Observable", "<", "JobAgentInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ...
Updates a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent to be updated. @throws IllegalArgumentException t...
[ "Updates", "a", "job", "agent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java#L876-L883
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/ArgUtils.java
ArgUtils.notNull
public static void notNull(final Object arg, final String name) { """ 値がnullでないかどうか検証する。 @param arg 検証対象の値 @param name 検証対象の引数の名前 @throws IllegalArgumentException {@literal arg == null.} """ if(arg == null) { throw new IllegalArgumentException(String.format("%s should not be null.", na...
java
public static void notNull(final Object arg, final String name) { if(arg == null) { throw new IllegalArgumentException(String.format("%s should not be null.", name)); } }
[ "public", "static", "void", "notNull", "(", "final", "Object", "arg", ",", "final", "String", "name", ")", "{", "if", "(", "arg", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"%s should not be null....
値がnullでないかどうか検証する。 @param arg 検証対象の値 @param name 検証対象の引数の名前 @throws IllegalArgumentException {@literal arg == null.}
[ "値がnullでないかどうか検証する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/ArgUtils.java#L22-L26
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.addRow
public static void addRow(Matrix A, int i, double c) { """ Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+ c @param A the matrix to perform he update on @param i the row to update @param c the constant to add to each element """ addRow(A, i, 0, A.cols(), c); }
java
public static void addRow(Matrix A, int i, double c) { addRow(A, i, 0, A.cols(), c); }
[ "public", "static", "void", "addRow", "(", "Matrix", "A", ",", "int", "i", ",", "double", "c", ")", "{", "addRow", "(", "A", ",", "i", ",", "0", ",", "A", ".", "cols", "(", ")", ",", "c", ")", ";", "}" ]
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+ c @param A the matrix to perform he update on @param i the row to update @param c the constant to add to each element
[ "Updates", "the", "values", "of", "row", "<tt", ">", "i<", "/", "tt", ">", "in", "the", "given", "matrix", "to", "be", "A", "[", "i", ":", "]", "=", "A", "[", "i", ":", "]", "+", "c" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L45-L48
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java
JvmTypesBuilder.setBody
public void setBody(/* @Nullable */ JvmExecutable executable, /* @Nullable */ StringConcatenationClient strategy) { """ Attaches the given compile strategy to the given {@link JvmExecutable} such that the compiler knows how to implement the {@link JvmExecutable} when it is translated to Java source code. @para...
java
public void setBody(/* @Nullable */ JvmExecutable executable, /* @Nullable */ StringConcatenationClient strategy) { removeExistingBody(executable); setCompilationStrategy(executable, strategy); }
[ "public", "void", "setBody", "(", "/* @Nullable */", "JvmExecutable", "executable", ",", "/* @Nullable */", "StringConcatenationClient", "strategy", ")", "{", "removeExistingBody", "(", "executable", ")", ";", "setCompilationStrategy", "(", "executable", ",", "strategy", ...
Attaches the given compile strategy to the given {@link JvmExecutable} such that the compiler knows how to implement the {@link JvmExecutable} when it is translated to Java source code. @param executable the operation or constructor to add the method body to. If <code>null</code> this method does nothing. @param strat...
[ "Attaches", "the", "given", "compile", "strategy", "to", "the", "given", "{", "@link", "JvmExecutable", "}", "such", "that", "the", "compiler", "knows", "how", "to", "implement", "the", "{", "@link", "JvmExecutable", "}", "when", "it", "is", "translated", "t...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java#L238-L241
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/AclXmlFactory.java
AclXmlFactory.convertToXml
protected XmlWriter convertToXml(Grantee grantee, XmlWriter xml) throws SdkClientException { """ Returns an XML fragment representing the specified Grantee. @param grantee The grantee to convert to an XML representation that can be sent to Amazon S3 as part of a request. @param xml The XmlWriter to which to...
java
protected XmlWriter convertToXml(Grantee grantee, XmlWriter xml) throws SdkClientException { if (grantee instanceof CanonicalGrantee) { return convertToXml((CanonicalGrantee)grantee, xml); } else if (grantee instanceof EmailAddressGrantee) { return convertToXml((EmailAddressGrant...
[ "protected", "XmlWriter", "convertToXml", "(", "Grantee", "grantee", ",", "XmlWriter", "xml", ")", "throws", "SdkClientException", "{", "if", "(", "grantee", "instanceof", "CanonicalGrantee", ")", "{", "return", "convertToXml", "(", "(", "CanonicalGrantee", ")", "...
Returns an XML fragment representing the specified Grantee. @param grantee The grantee to convert to an XML representation that can be sent to Amazon S3 as part of a request. @param xml The XmlWriter to which to concatenate this node to. @return The given XmlWriter containing the specified grantee. @throws SdkClient...
[ "Returns", "an", "XML", "fragment", "representing", "the", "specified", "Grantee", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/AclXmlFactory.java#L87-L97
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java
MapTileTransitionModel.getTransition
private static TransitionType getTransition(TransitionType a, TransitionType b, int ox, int oy) { """ Get the new transition type from two transitions. @param a The inner transition. @param b The outer transition. @param ox The horizontal offset to update. @param oy The vertical offset to update. @return Th...
java
private static TransitionType getTransition(TransitionType a, TransitionType b, int ox, int oy) { final TransitionType type = getTransitionHorizontalVertical(a, b, ox, oy); if (type != null) { return type; } return getTransitionDiagonals(a, b, ox, oy); ...
[ "private", "static", "TransitionType", "getTransition", "(", "TransitionType", "a", ",", "TransitionType", "b", ",", "int", "ox", ",", "int", "oy", ")", "{", "final", "TransitionType", "type", "=", "getTransitionHorizontalVertical", "(", "a", ",", "b", ",", "o...
Get the new transition type from two transitions. @param a The inner transition. @param b The outer transition. @param ox The horizontal offset to update. @param oy The vertical offset to update. @return The new transition type, <code>null</code> if none.
[ "Get", "the", "new", "transition", "type", "from", "two", "transitions", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java#L51-L59
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getExplodedToSortedSet
@Nonnull @ReturnsMutableCopy public static CommonsTreeSet <String> getExplodedToSortedSet (@Nonnull final String sSep, @Nullable final String sElements) { """ Take a concatenated String and return a sorted {@link CommonsTreeSet} of all elements i...
java
@Nonnull @ReturnsMutableCopy public static CommonsTreeSet <String> getExplodedToSortedSet (@Nonnull final String sSep, @Nullable final String sElements) { return getExploded (sSep, sElements, -1, new CommonsTreeSet <> ()); }
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "CommonsTreeSet", "<", "String", ">", "getExplodedToSortedSet", "(", "@", "Nonnull", "final", "String", "sSep", ",", "@", "Nullable", "final", "String", "sElements", ")", "{", "return", "getExploded", ...
Take a concatenated String and return a sorted {@link CommonsTreeSet} of all elements in the passed string, using specified separator string. @param sSep The separator to use. May not be <code>null</code>. @param sElements The concatenated String to convert. May be <code>null</code> or empty. @return The sorted {@link...
[ "Take", "a", "concatenated", "String", "and", "return", "a", "sorted", "{", "@link", "CommonsTreeSet", "}", "of", "all", "elements", "in", "the", "passed", "string", "using", "specified", "separator", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L2334-L2340
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/dataconversion/StandardConversions.java
StandardConversions.convertJavaToText
public static byte[] convertJavaToText(Object source, MediaType sourceMediaType, MediaType destinationMediaType) { """ Converts a java object to a text/plain representation. @param source Object to convert. @param sourceMediaType The MediaType for the source object. @param destinationMediaType The required text...
java
public static byte[] convertJavaToText(Object source, MediaType sourceMediaType, MediaType destinationMediaType) { if (source == null) return null; if (sourceMediaType == null || destinationMediaType == null) { throw new NullPointerException("sourceMediaType and destinationMediaType cannot be null!...
[ "public", "static", "byte", "[", "]", "convertJavaToText", "(", "Object", "source", ",", "MediaType", "sourceMediaType", ",", "MediaType", "destinationMediaType", ")", "{", "if", "(", "source", "==", "null", ")", "return", "null", ";", "if", "(", "sourceMediaT...
Converts a java object to a text/plain representation. @param source Object to convert. @param sourceMediaType The MediaType for the source object. @param destinationMediaType The required text/plain specification. @return byte[] with the text/plain representation of the object with the requested charset.
[ "Converts", "a", "java", "object", "to", "a", "text", "/", "plain", "representation", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/dataconversion/StandardConversions.java#L182-L195
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/EdgeIntensityPolygon.java
EdgeIntensityPolygon.computeEdge
public boolean computeEdge(Polygon2D_F64 polygon , boolean ccw ) { """ Checks to see if its a valid polygon or a false positive by looking at edge intensity @param polygon The polygon being tested @param ccw True if the polygon is counter clockwise @return true if it could compute the edge intensity, otherwis...
java
public boolean computeEdge(Polygon2D_F64 polygon , boolean ccw ) { averageInside = 0; averageOutside = 0; double tangentSign = ccw ? 1 : -1; int totalSides = 0; for (int i = polygon.size()-1,j=0; j < polygon.size(); i=j,j++) { Point2D_F64 a = polygon.get(i); Point2D_F64 b = polygon.get(j); double...
[ "public", "boolean", "computeEdge", "(", "Polygon2D_F64", "polygon", ",", "boolean", "ccw", ")", "{", "averageInside", "=", "0", ";", "averageOutside", "=", "0", ";", "double", "tangentSign", "=", "ccw", "?", "1", ":", "-", "1", ";", "int", "totalSides", ...
Checks to see if its a valid polygon or a false positive by looking at edge intensity @param polygon The polygon being tested @param ccw True if the polygon is counter clockwise @return true if it could compute the edge intensity, otherwise false
[ "Checks", "to", "see", "if", "its", "a", "valid", "polygon", "or", "a", "false", "positive", "by", "looking", "at", "edge", "intensity" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/EdgeIntensityPolygon.java#L95-L146
radkovo/jStyleParser
src/main/java/cz/vutbr/web/csskit/OutputUtil.java
OutputUtil.appendCalcArgs
public static StringBuilder appendCalcArgs(StringBuilder sb, CalcArgs args) { """ Appends the calc() function arguments to a string builder. @param sb the string builder to be modified @param args the calc arguments @return Modified <code>sb</code> to allow chaining """ final String astr = args.evaluat...
java
public static StringBuilder appendCalcArgs(StringBuilder sb, CalcArgs args) { final String astr = args.evaluate(CalcArgs.stringEvaluator); if (!astr.startsWith(FUNCTION_OPENING)) { sb.append(FUNCTION_OPENING); sb.append(astr); sb.append(FUNCTION_CLOSING); } else { sb.a...
[ "public", "static", "StringBuilder", "appendCalcArgs", "(", "StringBuilder", "sb", ",", "CalcArgs", "args", ")", "{", "final", "String", "astr", "=", "args", ".", "evaluate", "(", "CalcArgs", ".", "stringEvaluator", ")", ";", "if", "(", "!", "astr", ".", "...
Appends the calc() function arguments to a string builder. @param sb the string builder to be modified @param args the calc arguments @return Modified <code>sb</code> to allow chaining
[ "Appends", "the", "calc", "()", "function", "arguments", "to", "a", "string", "builder", "." ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/csskit/OutputUtil.java#L160-L170
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java
SwiftAPIClient.setCorrectSize
private void setCorrectSize(StoredObject tmp, Container cObj) { """ Swift has a bug where container listing might wrongly report size 0 for large objects. It's seems to be a well known issue in Swift without solution. We have to provide work around for this. If container listing reports size 0 for some object,...
java
private void setCorrectSize(StoredObject tmp, Container cObj) { long objectSize = tmp.getContentLength(); if (objectSize == 0) { // we may hit a well known Swift bug. // container listing reports 0 for large objects. StoredObject soDirect = cObj .getObject(tmp.getName()); long ...
[ "private", "void", "setCorrectSize", "(", "StoredObject", "tmp", ",", "Container", "cObj", ")", "{", "long", "objectSize", "=", "tmp", ".", "getContentLength", "(", ")", ";", "if", "(", "objectSize", "==", "0", ")", "{", "// we may hit a well known Swift bug.", ...
Swift has a bug where container listing might wrongly report size 0 for large objects. It's seems to be a well known issue in Swift without solution. We have to provide work around for this. If container listing reports size 0 for some object, we send additional HEAD on that object to verify it's size. @param tmp JOSS...
[ "Swift", "has", "a", "bug", "where", "container", "listing", "might", "wrongly", "report", "size", "0", "for", "large", "objects", ".", "It", "s", "seems", "to", "be", "a", "well", "known", "issue", "in", "Swift", "without", "solution", ".", "We", "have"...
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L839-L851
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceEncryptionProtectorsInner.java
ManagedInstanceEncryptionProtectorsInner.listByInstanceAsync
public Observable<Page<ManagedInstanceEncryptionProtectorInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName) { """ Gets a list of managed instance encryption protectors. @param resourceGroupName The name of the resource group that contains the resource. You can obtain t...
java
public Observable<Page<ManagedInstanceEncryptionProtectorInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName) { return listByInstanceWithServiceResponseAsync(resourceGroupName, managedInstanceName) .map(new Func1<ServiceResponse<Page<ManagedInstanceEncryption...
[ "public", "Observable", "<", "Page", "<", "ManagedInstanceEncryptionProtectorInner", ">", ">", "listByInstanceAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "managedInstanceName", ")", "{", "return", "listByInstanceWithServiceResponseAsync", "(...
Gets a list of managed instance encryption protectors. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @throws IllegalArgumentException thrown if...
[ "Gets", "a", "list", "of", "managed", "instance", "encryption", "protectors", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceEncryptionProtectorsInner.java#L134-L142
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.buildSetPropertyExpression
public static MethodCallExpression buildSetPropertyExpression(final Expression objectExpression, final String propertyName, final ClassNode targetClassNode, final Expression valueExpression) { """ Build static direct call to setter of a property @param objectExpression @param propertyName @param targetClassNo...
java
public static MethodCallExpression buildSetPropertyExpression(final Expression objectExpression, final String propertyName, final ClassNode targetClassNode, final Expression valueExpression) { String methodName = "set" + MetaClassHelper.capitalize(propertyName); MethodCallExpression methodCallExpression...
[ "public", "static", "MethodCallExpression", "buildSetPropertyExpression", "(", "final", "Expression", "objectExpression", ",", "final", "String", "propertyName", ",", "final", "ClassNode", "targetClassNode", ",", "final", "Expression", "valueExpression", ")", "{", "String...
Build static direct call to setter of a property @param objectExpression @param propertyName @param targetClassNode @param valueExpression @return The method call expression
[ "Build", "static", "direct", "call", "to", "setter", "of", "a", "property" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1333-L1341
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/MethodResource.java
MethodResource.getObjectMethodsForSDef
@Path("/ { """ Lists all Service Definitions methods that can be invoked on a digital object, for the supplied Service Definition. GET /objects/{pid}/methods/{sDef} ? format asOfDateTime """sDef}") @GET @Produces({ HTML, XML }) public Response getObjectMethodsForSDef( @PathParam(Res...
java
@Path("/{sDef}") @GET @Produces({ HTML, XML }) public Response getObjectMethodsForSDef( @PathParam(RestParam.PID) String pid, @PathParam(RestParam.SDEF) String sDef, @QueryParam(RestParam.AS_OF_DATE_TIME) String dTime, @Quer...
[ "@", "Path", "(", "\"/{sDef}\"", ")", "@", "GET", "@", "Produces", "(", "{", "HTML", ",", "XML", "}", ")", "public", "Response", "getObjectMethodsForSDef", "(", "@", "PathParam", "(", "RestParam", ".", "PID", ")", "String", "pid", ",", "@", "PathParam", ...
Lists all Service Definitions methods that can be invoked on a digital object, for the supplied Service Definition. GET /objects/{pid}/methods/{sDef} ? format asOfDateTime
[ "Lists", "all", "Service", "Definitions", "methods", "that", "can", "be", "invoked", "on", "a", "digital", "object", "for", "the", "supplied", "Service", "Definition", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/MethodResource.java#L73-L90
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.findByG_K
@Override public CPOptionCategory findByG_K(long groupId, String key) throws NoSuchCPOptionCategoryException { """ Returns the cp option category where groupId = &#63; and key = &#63; or throws a {@link NoSuchCPOptionCategoryException} if it could not be found. @param groupId the group ID @param key the key...
java
@Override public CPOptionCategory findByG_K(long groupId, String key) throws NoSuchCPOptionCategoryException { CPOptionCategory cpOptionCategory = fetchByG_K(groupId, key); if (cpOptionCategory == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("grou...
[ "@", "Override", "public", "CPOptionCategory", "findByG_K", "(", "long", "groupId", ",", "String", "key", ")", "throws", "NoSuchCPOptionCategoryException", "{", "CPOptionCategory", "cpOptionCategory", "=", "fetchByG_K", "(", "groupId", ",", "key", ")", ";", "if", ...
Returns the cp option category where groupId = &#63; and key = &#63; or throws a {@link NoSuchCPOptionCategoryException} if it could not be found. @param groupId the group ID @param key the key @return the matching cp option category @throws NoSuchCPOptionCategoryException if a matching cp option category could not be...
[ "Returns", "the", "cp", "option", "category", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPOptionCategoryException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L2525-L2551
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java
AbstractExtraLanguageGenerator.doGenerate
@Override public void doGenerate(EObject object, ExtraLanguageAppendable appendable, IExtraLanguageGeneratorContext context) { """ Generate the given object. <p>This function calls the {@link #before(EObject, IExtraLanguageGeneratorContext)}, {@link #generate(EObject, ExtraLanguageAppendable, IExtraLanguageGe...
java
@Override public void doGenerate(EObject object, ExtraLanguageAppendable appendable, IExtraLanguageGeneratorContext context) { try { before(object, context); generate(object, appendable, context); } finally { after(object, context); } }
[ "@", "Override", "public", "void", "doGenerate", "(", "EObject", "object", ",", "ExtraLanguageAppendable", "appendable", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "try", "{", "before", "(", "object", ",", "context", ")", ";", "generate", "(", "...
Generate the given object. <p>This function calls the {@link #before(EObject, IExtraLanguageGeneratorContext)}, {@link #generate(EObject, ExtraLanguageAppendable, IExtraLanguageGeneratorContext)}, and {@link #after(EObject, IExtraLanguageGeneratorContext)} functions. @param object the object. @param appendable the ta...
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L560-L568
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java
DBaseFileReader.read4ByteIntegerRecordValue
@SuppressWarnings("checkstyle:magicnumber") private static int read4ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData, int rawOffset, OutputParameter<Long> value) throws IOException { """ Read a 4 BYTE INTEGER record value. @param field is the current parsed field. @param...
java
@SuppressWarnings("checkstyle:magicnumber") private static int read4ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData, int rawOffset, OutputParameter<Long> value) throws IOException { final int rawNumber = EndianNumbers.toLEInt( rawData[rawOffset], rawData[rawOffset + 1], ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "static", "int", "read4ByteIntegerRecordValue", "(", "DBaseFileField", "field", ",", "int", "nrecord", ",", "int", "nfield", ",", "byte", "[", "]", "rawData", ",", "int", "rawOffset", ",",...
Read a 4 BYTE INTEGER record value. @param field is the current parsed field. @param nrecord is the number of the record @param nfield is the number of the field @param rawData raw data @param rawOffset is the index at which the data could be obtained @param value will be set with the value extracted from the dBASE fi...
[ "Read", "a", "4", "BYTE", "INTEGER", "record", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1199-L1211
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/advancedoperations/UsePortfolioBiddingStrategy.java
UsePortfolioBiddingStrategy.createSharedBudget
private static Budget createSharedBudget( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { """ Creates an explicit budget to be used only to create the Campaign. @param adWordsServices the user to run the example with @param session the AdWordsSession @throws Ap...
java
private static Budget createSharedBudget( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { // Get the BudgetService, which loads the required classes. BudgetServiceInterface budgetService = adWordsServices.get(session, BudgetServiceInterface.class); /...
[ "private", "static", "Budget", "createSharedBudget", "(", "AdWordsServicesInterface", "adWordsServices", ",", "AdWordsSession", "session", ")", "throws", "RemoteException", "{", "// Get the BudgetService, which loads the required classes.", "BudgetServiceInterface", "budgetService", ...
Creates an explicit budget to be used only to create the Campaign. @param adWordsServices the user to run the example with @param session the AdWordsSession @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Creates", "an", "explicit", "budget", "to", "be", "used", "only", "to", "create", "the", "Campaign", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/advancedoperations/UsePortfolioBiddingStrategy.java#L195-L222
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.isEpsilonEqual
@Pure @Inline(value = "MathUtil.isEpsilonEqual($1, $2, Double.NaN)", imported = { """ Replies if the given values are near. @param v1 first value. @param v2 second value. @return <code>true</code> if the given {@code v1} is near {@code v2}, otherwise <code>false</code>. @see Math#ulp(double) """MathUti...
java
@Pure @Inline(value = "MathUtil.isEpsilonEqual($1, $2, Double.NaN)", imported = {MathUtil.class}) public static boolean isEpsilonEqual(double v1, double v2) { return isEpsilonEqual(v1, v2, Double.NaN); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"MathUtil.isEpsilonEqual($1, $2, Double.NaN)\"", ",", "imported", "=", "{", "MathUtil", ".", "class", "}", ")", "public", "static", "boolean", "isEpsilonEqual", "(", "double", "v1", ",", "double", "v2", ")", "{"...
Replies if the given values are near. @param v1 first value. @param v2 second value. @return <code>true</code> if the given {@code v1} is near {@code v2}, otherwise <code>false</code>. @see Math#ulp(double)
[ "Replies", "if", "the", "given", "values", "are", "near", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L151-L155
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/ConfigManager.java
ConfigManager.getDefaultParentForEntityInRealm
public String getDefaultParentForEntityInRealm(String entType, String realmName) throws WIMException { """ Gets the default parent node that is for the specified entity type in specified realm. @param entType The entity type. e.g. Person, Group... @param realmName The name of the realm @return The default par...
java
public String getDefaultParentForEntityInRealm(String entType, String realmName) throws WIMException { String defaultParent = getDefaultParent(entType); if (realmName != null) { validateRealmName(realmName); String parent = null; RealmConfig realmConfig = getRealmConf...
[ "public", "String", "getDefaultParentForEntityInRealm", "(", "String", "entType", ",", "String", "realmName", ")", "throws", "WIMException", "{", "String", "defaultParent", "=", "getDefaultParent", "(", "entType", ")", ";", "if", "(", "realmName", "!=", "null", ")...
Gets the default parent node that is for the specified entity type in specified realm. @param entType The entity type. e.g. Person, Group... @param realmName The name of the realm @return The default parent node.
[ "Gets", "the", "default", "parent", "node", "that", "is", "for", "the", "specified", "entity", "type", "in", "specified", "realm", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/ConfigManager.java#L367-L385
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.findByG_T_E
@Override public List<CommerceNotificationTemplate> findByG_T_E(long groupId, String type, boolean enabled, int start, int end) { """ Returns a range of all the commerce notification templates where groupId = &#63; and type = &#63; and enabled = &#63;. <p> Useful when paginating results. Returns a maximum o...
java
@Override public List<CommerceNotificationTemplate> findByG_T_E(long groupId, String type, boolean enabled, int start, int end) { return findByG_T_E(groupId, type, enabled, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationTemplate", ">", "findByG_T_E", "(", "long", "groupId", ",", "String", "type", ",", "boolean", "enabled", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_T_E", "(", "groupId", "...
Returns a range of all the commerce notification templates where groupId = &#63; and type = &#63; and enabled = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <co...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L3408-L3412
openengsb/openengsb
components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java
EDBConverter.getEntryNameForMapValue
public static String getEntryNameForMapValue(String property, Integer index) { """ Returns the entry name for a map value in the EDB format. E.g. the map value for the property "map" with the index 0 would be "map.0.value". """ return getEntryNameForMap(property, false, index); }
java
public static String getEntryNameForMapValue(String property, Integer index) { return getEntryNameForMap(property, false, index); }
[ "public", "static", "String", "getEntryNameForMapValue", "(", "String", "property", ",", "Integer", "index", ")", "{", "return", "getEntryNameForMap", "(", "property", ",", "false", ",", "index", ")", ";", "}" ]
Returns the entry name for a map value in the EDB format. E.g. the map value for the property "map" with the index 0 would be "map.0.value".
[ "Returns", "the", "entry", "name", "for", "a", "map", "value", "in", "the", "EDB", "format", ".", "E", ".", "g", ".", "the", "map", "value", "for", "the", "property", "map", "with", "the", "index", "0", "would", "be", "map", ".", "0", ".", "value",...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java#L512-L514
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java
ScopeImpl.dup
public WriteableScope dup(Symbol newOwner) { """ Construct a fresh scope within this scope, with new owner, which shares its table with the outer scope. Used in connection with method leave if scope access is stack-like in order to avoid allocation of fresh tables. """ ScopeImpl result = new Sco...
java
public WriteableScope dup(Symbol newOwner) { ScopeImpl result = new ScopeImpl(this, newOwner, this.table, this.nelems); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode()); // new Error().printSta...
[ "public", "WriteableScope", "dup", "(", "Symbol", "newOwner", ")", "{", "ScopeImpl", "result", "=", "new", "ScopeImpl", "(", "this", ",", "newOwner", ",", "this", ".", "table", ",", "this", ".", "nelems", ")", ";", "shared", "++", ";", "// System.out.print...
Construct a fresh scope within this scope, with new owner, which shares its table with the outer scope. Used in connection with method leave if scope access is stack-like in order to avoid allocation of fresh tables.
[ "Construct", "a", "fresh", "scope", "within", "this", "scope", "with", "new", "owner", "which", "shares", "its", "table", "with", "the", "outer", "scope", ".", "Used", "in", "connection", "with", "method", "leave", "if", "scope", "access", "is", "stack", "...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java#L340-L346
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/UNode.java
UNode.createArrayNode
public static UNode createArrayNode(String name) { """ Create an ARRAY UNode with the given node name. @param name Name for new ARRAY node. @return New ARRAY UNode. """ return new UNode(name, NodeType.ARRAY, null, false, ""); }
java
public static UNode createArrayNode(String name) { return new UNode(name, NodeType.ARRAY, null, false, ""); }
[ "public", "static", "UNode", "createArrayNode", "(", "String", "name", ")", "{", "return", "new", "UNode", "(", "name", ",", "NodeType", ".", "ARRAY", ",", "null", ",", "false", ",", "\"\"", ")", ";", "}" ]
Create an ARRAY UNode with the given node name. @param name Name for new ARRAY node. @return New ARRAY UNode.
[ "Create", "an", "ARRAY", "UNode", "with", "the", "given", "node", "name", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L188-L190
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java
MetadataService.addMember
public CompletableFuture<Revision> addMember(Author author, String projectName, User member, ProjectRole projectRole) { """ Adds the specified {@code member} to the {@link ProjectMetadata} of the specified {@code projectName} with the specified {@code projectRole}....
java
public CompletableFuture<Revision> addMember(Author author, String projectName, User member, ProjectRole projectRole) { requireNonNull(author, "author"); requireNonNull(projectName, "projectName"); requireNonNull(member, "member"); require...
[ "public", "CompletableFuture", "<", "Revision", ">", "addMember", "(", "Author", "author", ",", "String", "projectName", ",", "User", "member", ",", "ProjectRole", "projectRole", ")", "{", "requireNonNull", "(", "author", ",", "\"author\"", ")", ";", "requireNon...
Adds the specified {@code member} to the {@link ProjectMetadata} of the specified {@code projectName} with the specified {@code projectRole}.
[ "Adds", "the", "specified", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java#L144-L159
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleUtility.java
LocaleUtility.getLocaleFromName
public static Locale getLocaleFromName(String name) { """ A helper function to convert a string of the form aa_BB_CC to a locale object. Why isn't this in Locale? """ String language = ""; String country = ""; String variant = ""; int i1 = name.indexOf('_'); if (i1 < ...
java
public static Locale getLocaleFromName(String name) { String language = ""; String country = ""; String variant = ""; int i1 = name.indexOf('_'); if (i1 < 0) { language = name; } else { language = name.substring(0, i1); ++i1; ...
[ "public", "static", "Locale", "getLocaleFromName", "(", "String", "name", ")", "{", "String", "language", "=", "\"\"", ";", "String", "country", "=", "\"\"", ";", "String", "variant", "=", "\"\"", ";", "int", "i1", "=", "name", ".", "indexOf", "(", "'", ...
A helper function to convert a string of the form aa_BB_CC to a locale object. Why isn't this in Locale?
[ "A", "helper", "function", "to", "convert", "a", "string", "of", "the", "form", "aa_BB_CC", "to", "a", "locale", "object", ".", "Why", "isn", "t", "this", "in", "Locale?" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleUtility.java#L27-L48
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache.monitor/src/com/ibm/ws/cache/stat/internal/CacheStatsModule.java
CacheStatsModule.onCacheMiss
public void onCacheMiss(String template, int locality) { """ Updates statistics for the cache miss case. @param template the template of the cache entry. The template cannot be null for Servlet cache. @param locality Whether the miss was local or remote """ final String methodName = "onCacheMiss(...
java
public void onCacheMiss(String template, int locality) { final String methodName = "onCacheMiss()"; CacheStatsModule csm = null; if ((csm = getCSM(template)) == null) { return; } if (tc.isDebugEnabled()) Tr.debug(tc, methodName + " cacheName=" + _sCacheNa...
[ "public", "void", "onCacheMiss", "(", "String", "template", ",", "int", "locality", ")", "{", "final", "String", "methodName", "=", "\"onCacheMiss()\"", ";", "CacheStatsModule", "csm", "=", "null", ";", "if", "(", "(", "csm", "=", "getCSM", "(", "template", ...
Updates statistics for the cache miss case. @param template the template of the cache entry. The template cannot be null for Servlet cache. @param locality Whether the miss was local or remote
[ "Updates", "statistics", "for", "the", "cache", "miss", "case", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache.monitor/src/com/ibm/ws/cache/stat/internal/CacheStatsModule.java#L810-L823
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/RepositoryTags.java
RepositoryTags.getAttribute
public String getAttribute(int elementId, String value) { """ returns the opening but non-closing xml-tag associated with the repository element with id <code>elementId</code>. @return the resulting tag """ return table.getKeyByValue(new Integer(elementId)) + "=\"" + value + "\""; }
java
public String getAttribute(int elementId, String value) { return table.getKeyByValue(new Integer(elementId)) + "=\"" + value + "\""; }
[ "public", "String", "getAttribute", "(", "int", "elementId", ",", "String", "value", ")", "{", "return", "table", ".", "getKeyByValue", "(", "new", "Integer", "(", "elementId", ")", ")", "+", "\"=\\\"\"", "+", "value", "+", "\"\\\"\"", ";", "}" ]
returns the opening but non-closing xml-tag associated with the repository element with id <code>elementId</code>. @return the resulting tag
[ "returns", "the", "opening", "but", "non", "-", "closing", "xml", "-", "tag", "associated", "with", "the", "repository", "element", "with", "id", "<code", ">", "elementId<", "/", "code", ">", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java#L242-L245
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/ServletUtil.java
ServletUtil.percentageGraph
public static String percentageGraph(int perc, int width) throws IOException { """ Generate the percentage graph and returns HTML representation string of the same. @param perc The percentage value for which graph is to be generated @param width The width of the display table @return HTML String representati...
java
public static String percentageGraph(int perc, int width) throws IOException { assert perc >= 0; assert perc <= 100; StringBuilder builder = new StringBuilder(); builder.append("<table border=\"1px\" width=\""); builder.append(width); builder.append("px\"><tr>"); if(perc > 0) { builder.appen...
[ "public", "static", "String", "percentageGraph", "(", "int", "perc", ",", "int", "width", ")", "throws", "IOException", "{", "assert", "perc", ">=", "0", ";", "assert", "perc", "<=", "100", ";", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ...
Generate the percentage graph and returns HTML representation string of the same. @param perc The percentage value for which graph is to be generated @param width The width of the display table @return HTML String representation of the percentage graph @throws IOException
[ "Generate", "the", "percentage", "graph", "and", "returns", "HTML", "representation", "string", "of", "the", "same", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/ServletUtil.java#L76-L92
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/style/StyleUtilities.java
StyleUtilities.substituteMark
public static void substituteMark( Rule rule, String wellKnownMarkName ) { """ Change the mark shape in a rule. @param rule the rule of which the mark has to be changed. @param wellKnownMarkName the name of the new mark. """ PointSymbolizer pointSymbolizer = StyleUtilities.pointSymbolizerFromRule(r...
java
public static void substituteMark( Rule rule, String wellKnownMarkName ) { PointSymbolizer pointSymbolizer = StyleUtilities.pointSymbolizerFromRule(rule); Mark oldMark = SLD.mark(pointSymbolizer); Graphic graphic = SLD.graphic(pointSymbolizer); graphic.graphicalSymbols().clear(); ...
[ "public", "static", "void", "substituteMark", "(", "Rule", "rule", ",", "String", "wellKnownMarkName", ")", "{", "PointSymbolizer", "pointSymbolizer", "=", "StyleUtilities", ".", "pointSymbolizerFromRule", "(", "rule", ")", ";", "Mark", "oldMark", "=", "SLD", ".",...
Change the mark shape in a rule. @param rule the rule of which the mark has to be changed. @param wellKnownMarkName the name of the new mark.
[ "Change", "the", "mark", "shape", "in", "a", "rule", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/style/StyleUtilities.java#L575-L589
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.noneSatisfy
@Deprecated public static boolean noneSatisfy(String string, CodePointPredicate predicate) { """ @return true if none of the code points in the {@code string} answer true for the specified {@code predicate}. @deprecated since 7.0. Use {@link #noneSatisfyCodePoint(String, CodePointPredicate)} instead. ""...
java
@Deprecated public static boolean noneSatisfy(String string, CodePointPredicate predicate) { return StringIterate.noneSatisfyCodePoint(string, predicate); }
[ "@", "Deprecated", "public", "static", "boolean", "noneSatisfy", "(", "String", "string", ",", "CodePointPredicate", "predicate", ")", "{", "return", "StringIterate", ".", "noneSatisfyCodePoint", "(", "string", ",", "predicate", ")", ";", "}" ]
@return true if none of the code points in the {@code string} answer true for the specified {@code predicate}. @deprecated since 7.0. Use {@link #noneSatisfyCodePoint(String, CodePointPredicate)} instead.
[ "@return", "true", "if", "none", "of", "the", "code", "points", "in", "the", "{", "@code", "string", "}", "answer", "true", "for", "the", "specified", "{", "@code", "predicate", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L939-L943
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_migration_migrationId_GET
public OvhMigration project_serviceName_migration_migrationId_GET(String serviceName, String migrationId) throws IOException { """ Get planned migration REST: GET /cloud/project/{serviceName}/migration/{migrationId} @param migrationId [required] Migration id @param serviceName [required] Service name API b...
java
public OvhMigration project_serviceName_migration_migrationId_GET(String serviceName, String migrationId) throws IOException { String qPath = "/cloud/project/{serviceName}/migration/{migrationId}"; StringBuilder sb = path(qPath, serviceName, migrationId); String resp = exec(qPath, "GET", sb.toString(), null); r...
[ "public", "OvhMigration", "project_serviceName_migration_migrationId_GET", "(", "String", "serviceName", ",", "String", "migrationId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/migration/{migrationId}\"", ";", "StringBuilder", "s...
Get planned migration REST: GET /cloud/project/{serviceName}/migration/{migrationId} @param migrationId [required] Migration id @param serviceName [required] Service name API beta
[ "Get", "planned", "migration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1040-L1045
jhalterman/failsafe
src/main/java/net/jodah/failsafe/FailurePolicy.java
FailurePolicy.handleIf
@SuppressWarnings("unchecked") public S handleIf(BiPredicate<R, ? extends Throwable> resultPredicate) { """ Specifies that a failure has occurred if the {@code resultPredicate} matches the execution result. @throws NullPointerException if {@code resultPredicate} is null """ Assert.notNull(resultPredic...
java
@SuppressWarnings("unchecked") public S handleIf(BiPredicate<R, ? extends Throwable> resultPredicate) { Assert.notNull(resultPredicate, "resultPredicate"); failuresChecked = true; failureConditions.add((BiPredicate<R, Throwable>) resultPredicate); return (S) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "S", "handleIf", "(", "BiPredicate", "<", "R", ",", "?", "extends", "Throwable", ">", "resultPredicate", ")", "{", "Assert", ".", "notNull", "(", "resultPredicate", ",", "\"resultPredicate\"", ")", ...
Specifies that a failure has occurred if the {@code resultPredicate} matches the execution result. @throws NullPointerException if {@code resultPredicate} is null
[ "Specifies", "that", "a", "failure", "has", "occurred", "if", "the", "{", "@code", "resultPredicate", "}", "matches", "the", "execution", "result", "." ]
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailurePolicy.java#L103-L109
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexExtension.java
RTreeIndexExtension.createFunction
private void createFunction(String name, GeometryFunction function) { """ Create the function for the connection @param name function name @param function geometry function """ try { Function.create(getGeoPackage().getConnection().getConnection(), name, function); } catch (SQLException e) { ...
java
private void createFunction(String name, GeometryFunction function) { try { Function.create(getGeoPackage().getConnection().getConnection(), name, function); } catch (SQLException e) { log.log(Level.SEVERE, "Failed to create function: " + name, e); } }
[ "private", "void", "createFunction", "(", "String", "name", ",", "GeometryFunction", "function", ")", "{", "try", "{", "Function", ".", "create", "(", "getGeoPackage", "(", ")", ".", "getConnection", "(", ")", ".", "getConnection", "(", ")", ",", "name", "...
Create the function for the connection @param name function name @param function geometry function
[ "Create", "the", "function", "for", "the", "connection" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexExtension.java#L175-L182
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/MapTilePathModel.java
MapTilePathModel.isTileBlocked
private boolean isTileBlocked(Pathfindable mover, int tx, int ty) { """ Check if tile is blocking. @param mover The mover reference. @param tx The horizontal tile to check. @param ty The vertical tile to check. @return <code>true</code> if blocked, <code>false</code> else. """ final Tile tile = m...
java
private boolean isTileBlocked(Pathfindable mover, int tx, int ty) { final Tile tile = map.getTile(tx, ty); if (tile != null) { final TilePath tilePath = tile.getFeature(TilePath.class); return mover.isBlocking(tilePath.getCategory()); } return false; ...
[ "private", "boolean", "isTileBlocked", "(", "Pathfindable", "mover", ",", "int", "tx", ",", "int", "ty", ")", "{", "final", "Tile", "tile", "=", "map", ".", "getTile", "(", "tx", ",", "ty", ")", ";", "if", "(", "tile", "!=", "null", ")", "{", "fina...
Check if tile is blocking. @param mover The mover reference. @param tx The horizontal tile to check. @param ty The vertical tile to check. @return <code>true</code> if blocked, <code>false</code> else.
[ "Check", "if", "tile", "is", "blocking", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/MapTilePathModel.java#L130-L139
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.listEventHubConsumerGroupsWithServiceResponseAsync
public Observable<ServiceResponse<Page<EventHubConsumerGroupInfoInner>>> listEventHubConsumerGroupsWithServiceResponseAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { """ Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in a...
java
public Observable<ServiceResponse<Page<EventHubConsumerGroupInfoInner>>> listEventHubConsumerGroupsWithServiceResponseAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) { return listEventHubConsumerGroupsSinglePageAsync(resourceGroupName, resourceName, eventHubEn...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "EventHubConsumerGroupInfoInner", ">", ">", ">", "listEventHubConsumerGroupsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "resourceName", ",", "final", "Str...
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of ...
[ "Get", "a", "list", "of", "the", "consumer", "groups", "in", "the", "Event", "Hub", "-", "compatible", "device", "-", "to", "-", "cloud", "endpoint", "in", "an", "IoT", "hub", ".", "Get", "a", "list", "of", "the", "consumer", "groups", "in", "the", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L1696-L1708
Prototik/HoloEverywhere
library/src/org/holoeverywhere/widget/datetimepicker/date/SimpleMonthView.java
SimpleMonthView.getDayFromLocation
public CalendarDay getDayFromLocation(float x, float y) { """ Calculates the day that the given x position is in, accounting for week number. Returns a Time referencing that day or null if @param x The x position of the touch event @return A time object for the tapped day or null if the position wasn't in a ...
java
public CalendarDay getDayFromLocation(float x, float y) { int dayStart = mPadding; if (x < dayStart || x > mWidth - mPadding) { return null; } // Selection is (x - start) / (pixels/day) == (x -s) * day / pixels int row = (int) (y - MONTH_HEADER_SIZE) / mRowHeight; ...
[ "public", "CalendarDay", "getDayFromLocation", "(", "float", "x", ",", "float", "y", ")", "{", "int", "dayStart", "=", "mPadding", ";", "if", "(", "x", "<", "dayStart", "||", "x", ">", "mWidth", "-", "mPadding", ")", "{", "return", "null", ";", "}", ...
Calculates the day that the given x position is in, accounting for week number. Returns a Time referencing that day or null if @param x The x position of the touch event @return A time object for the tapped day or null if the position wasn't in a day
[ "Calculates", "the", "day", "that", "the", "given", "x", "position", "is", "in", "accounting", "for", "week", "number", ".", "Returns", "a", "Time", "referencing", "that", "day", "or", "null", "if" ]
train
https://github.com/Prototik/HoloEverywhere/blob/b870abb5ab009a5a6dbab3fb855ec2854e35e125/library/src/org/holoeverywhere/widget/datetimepicker/date/SimpleMonthView.java#L448-L463
looly/hutool
hutool-db/src/main/java/cn/hutool/db/Db.java
Db.tx
public Db tx(TransactionLevel transactionLevel, VoidFunc1<Db> func) throws SQLException { """ 执行事务<br> 在同一事务中,所有对数据库操作都是原子的,同时提交或者同时回滚 @param transactionLevel 事务级别枚举,null表示使用JDBC默认事务 @param func 事务函数,所有操作应在同一函数下执行,确保在同一事务中 @return this @throws SQLException SQL异常 """ final Connection conn = getConnect...
java
public Db tx(TransactionLevel transactionLevel, VoidFunc1<Db> func) throws SQLException { final Connection conn = getConnection(); // 检查是否支持事务 checkTransactionSupported(conn); // 设置事务级别 if (null != transactionLevel) { final int level = transactionLevel.getLevel(); if (conn.getTransactionIsola...
[ "public", "Db", "tx", "(", "TransactionLevel", "transactionLevel", ",", "VoidFunc1", "<", "Db", ">", "func", ")", "throws", "SQLException", "{", "final", "Connection", "conn", "=", "getConnection", "(", ")", ";", "// 检查是否支持事务\r", "checkTransactionSupported", "(", ...
执行事务<br> 在同一事务中,所有对数据库操作都是原子的,同时提交或者同时回滚 @param transactionLevel 事务级别枚举,null表示使用JDBC默认事务 @param func 事务函数,所有操作应在同一函数下执行,确保在同一事务中 @return this @throws SQLException SQL异常
[ "执行事务<br", ">", "在同一事务中,所有对数据库操作都是原子的,同时提交或者同时回滚" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Db.java#L167-L204
kikinteractive/ice
ice/src/main/java/com/kik/config/ice/ConfigSystem.java
ConfigSystem.configModuleWithOverrides
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, OverrideConsumer<C> overrideConsumer) { """ Generates a Guice Module for use with Injector creation. THe generate Guice module binds a number of support classes to service a dynamically generate implementation of the provided confi...
java
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, OverrideConsumer<C> overrideConsumer) { checkNotNull(configInterface); checkNotNull(overrideConsumer); return configModuleWithOverrides(configInterface, Optional.empty(), Optional.ofNullable(overrideConsumer))...
[ "public", "static", "<", "C", ">", "Module", "configModuleWithOverrides", "(", "final", "Class", "<", "C", ">", "configInterface", ",", "OverrideConsumer", "<", "C", ">", "overrideConsumer", ")", "{", "checkNotNull", "(", "configInterface", ")", ";", "checkNotNu...
Generates a Guice Module for use with Injector creation. THe generate Guice module binds a number of support classes to service a dynamically generate implementation of the provided configuration interface. This method further overrides the annotated defaults on the configuration class as per the code in the given over...
[ "Generates", "a", "Guice", "Module", "for", "use", "with", "Injector", "creation", ".", "THe", "generate", "Guice", "module", "binds", "a", "number", "of", "support", "classes", "to", "service", "a", "dynamically", "generate", "implementation", "of", "the", "p...
train
https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/ConfigSystem.java#L107-L112
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.rewriteSelectStmt
private boolean rewriteSelectStmt() { """ Try to rewrite SELECT stmt if there is a matching materialized view. @return if SELECT stmt had been rewritten. Updates SELECT stmt transactionally. """ if (m_mvi != null) { final Table view = m_mvi.getDest(); final String viewName = vi...
java
private boolean rewriteSelectStmt() { if (m_mvi != null) { final Table view = m_mvi.getDest(); final String viewName = view.getTypeName(); // Get the map of select stmt's display column index -> view table (column name, column index) m_selectStmt.getFinalProjectio...
[ "private", "boolean", "rewriteSelectStmt", "(", ")", "{", "if", "(", "m_mvi", "!=", "null", ")", "{", "final", "Table", "view", "=", "m_mvi", ".", "getDest", "(", ")", ";", "final", "String", "viewName", "=", "view", ".", "getTypeName", "(", ")", ";", ...
Try to rewrite SELECT stmt if there is a matching materialized view. @return if SELECT stmt had been rewritten. Updates SELECT stmt transactionally.
[ "Try", "to", "rewrite", "SELECT", "stmt", "if", "there", "is", "a", "matching", "materialized", "view", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L128-L152
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateTrue
public static boolean validateTrue(boolean value, String errorMsgTemplate, Object... params) throws ValidateException { """ 检查指定值是否为<code>ture</code> @param value 值 @param errorMsgTemplate 错误消息内容模板(变量使用{}表示) @param params 模板中变量替换后的值 @return 检查过后的值 @throws ValidateException 检查不满足条件抛出的异常 @since 4.4.5 """...
java
public static boolean validateTrue(boolean value, String errorMsgTemplate, Object... params) throws ValidateException { if (isFalse(value)) { throw new ValidateException(errorMsgTemplate, params); } return value; }
[ "public", "static", "boolean", "validateTrue", "(", "boolean", "value", ",", "String", "errorMsgTemplate", ",", "Object", "...", "params", ")", "throws", "ValidateException", "{", "if", "(", "isFalse", "(", "value", ")", ")", "{", "throw", "new", "ValidateExce...
检查指定值是否为<code>ture</code> @param value 值 @param errorMsgTemplate 错误消息内容模板(变量使用{}表示) @param params 模板中变量替换后的值 @return 检查过后的值 @throws ValidateException 检查不满足条件抛出的异常 @since 4.4.5
[ "检查指定值是否为<code", ">", "ture<", "/", "code", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L92-L97
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java
ResolvableType.forArrayComponent
public static ResolvableType forArrayComponent(ResolvableType componentType) { """ Return a {@link ResolvableType} as a array of the specified {@code componentType}. @param componentType the component type @return a {@link ResolvableType} as an array of the specified component type """ LettuceAsser...
java
public static ResolvableType forArrayComponent(ResolvableType componentType) { LettuceAssert.notNull(componentType, "Component type must not be null"); Class<?> arrayClass = Array.newInstance(componentType.resolve(), 0).getClass(); return new ResolvableType(arrayClass, null, null, componentType)...
[ "public", "static", "ResolvableType", "forArrayComponent", "(", "ResolvableType", "componentType", ")", "{", "LettuceAssert", ".", "notNull", "(", "componentType", ",", "\"Component type must not be null\"", ")", ";", "Class", "<", "?", ">", "arrayClass", "=", "Array"...
Return a {@link ResolvableType} as a array of the specified {@code componentType}. @param componentType the component type @return a {@link ResolvableType} as an array of the specified component type
[ "Return", "a", "{", "@link", "ResolvableType", "}", "as", "a", "array", "of", "the", "specified", "{", "@code", "componentType", "}", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java#L1037-L1041
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.verifyIPFlowAsync
public Observable<VerificationIPFlowResultInner> verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { """ Verify IP flow from the specified VM to a location given the currently configured NSG rules. @param resourceGroupName The name of the resource gr...
java
public Observable<VerificationIPFlowResultInner> verifyIPFlowAsync(String resourceGroupName, String networkWatcherName, VerificationIPFlowParameters parameters) { return verifyIPFlowWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<VerificationIPFlowResult...
[ "public", "Observable", "<", "VerificationIPFlowResultInner", ">", "verifyIPFlowAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "VerificationIPFlowParameters", "parameters", ")", "{", "return", "verifyIPFlowWithServiceResponseAsync", "(", ...
Verify IP flow from the specified VM to a location given the currently configured NSG rules. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher. @param parameters Parameters that define the IP flow to be verified. @throws IllegalArgumentException thrown i...
[ "Verify", "IP", "flow", "from", "the", "specified", "VM", "to", "a", "location", "given", "the", "currently", "configured", "NSG", "rules", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L985-L992
tanhaichao/leopard-lang
leopard-servlet/src/main/java/io/leopard/web/servlet/CookieUtil.java
CookieUtil.deleteCookie
public static void deleteCookie(String name, String domain, HttpServletResponse response) { """ 删除cookie</br> @param name cookie名称 @param request http请求 @param response http响应 """ if (name == null || name.length() == 0) { throw new IllegalArgumentException("cookie名称不能为空."); } CookieUtil.setCookie...
java
public static void deleteCookie(String name, String domain, HttpServletResponse response) { if (name == null || name.length() == 0) { throw new IllegalArgumentException("cookie名称不能为空."); } CookieUtil.setCookie(name, "", -1, false, domain, response); }
[ "public", "static", "void", "deleteCookie", "(", "String", "name", ",", "String", "domain", ",", "HttpServletResponse", "response", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "...
删除cookie</br> @param name cookie名称 @param request http请求 @param response http响应
[ "删除cookie<", "/", "br", ">" ]
train
https://github.com/tanhaichao/leopard-lang/blob/8ab110f6ca4ea84484817a3d752253ac69ea268b/leopard-servlet/src/main/java/io/leopard/web/servlet/CookieUtil.java#L138-L143
unbescape/unbescape
src/main/java/org/unbescape/java/JavaEscape.java
JavaEscape.escapeJava
public static void escapeJava(final String text, final Writer writer) throws IOException { """ <p> Perform a Java level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this met...
java
public static void escapeJava(final String text, final Writer writer) throws IOException { escapeJava(text, writer, JavaEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
[ "public", "static", "void", "escapeJava", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeJava", "(", "text", ",", "writer", ",", "JavaEscapeLevel", ".", "LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET", ")", ...
<p> Perform a Java level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The Java basic escape set: <ul> <li>The <em>Single Escape Characters</em>: <tt>&#92;b<...
[ "<p", ">", "Perform", "a", "Java", "level", "2", "(", "basic", "set", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/java/JavaEscape.java#L453-L456
ModeShape/modeshape
modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java
ModeShapeRestClient.queryPlan
public String queryPlan( String query, String queryLanguage ) { """ Returns a string representation of a query plan in a given language. @param query a {@code String}, never {@code null} @param queryLanguage the language of the query, never {@code null} @return a {@code String} de...
java
public String queryPlan( String query, String queryLanguage ) { String url = jsonRestClient.appendToURL(QUERY_PLAN_METHOD); String contentType = contentTypeForQueryLanguage(queryLanguage); JSONRestClient.Response response = jsonRestClient.postStreamTextPlain(new Byte...
[ "public", "String", "queryPlan", "(", "String", "query", ",", "String", "queryLanguage", ")", "{", "String", "url", "=", "jsonRestClient", ".", "appendToURL", "(", "QUERY_PLAN_METHOD", ")", ";", "String", "contentType", "=", "contentTypeForQueryLanguage", "(", "qu...
Returns a string representation of a query plan in a given language. @param query a {@code String}, never {@code null} @param queryLanguage the language of the query, never {@code null} @return a {@code String} description of the plan, never {@code null}
[ "Returns", "a", "string", "representation", "of", "a", "query", "plan", "in", "a", "given", "language", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java#L145-L155
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.readStringTemplateGroup
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) { """ Reads a stringtemplate group from a stream. This will always return a group (empty if necessary), even if reading it from the stream fails. @param stream the stream to read from @return the string template group """ ...
java
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) { try { return new StringTemplateGroup( new InputStreamReader(stream, "UTF-8"), DefaultTemplateLexer.class, new StringTemplateErrorListener() { @Suppres...
[ "public", "static", "StringTemplateGroup", "readStringTemplateGroup", "(", "InputStream", "stream", ")", "{", "try", "{", "return", "new", "StringTemplateGroup", "(", "new", "InputStreamReader", "(", "stream", ",", "\"UTF-8\"", ")", ",", "DefaultTemplateLexer", ".", ...
Reads a stringtemplate group from a stream. This will always return a group (empty if necessary), even if reading it from the stream fails. @param stream the stream to read from @return the string template group
[ "Reads", "a", "stringtemplate", "group", "from", "a", "stream", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L1403-L1428
alipay/sofa-rpc
extension-impl/registry-zk/src/main/java/com/alipay/sofa/rpc/registry/zk/ZookeeperConfigObserver.java
ZookeeperConfigObserver.addConfigListener
public void addConfigListener(AbstractInterfaceConfig config, ConfigListener listener) { """ Add config listener. @param config the config @param listener the listener """ if (listener != null) { RegistryUtils.initOrAddList(configListenerMap, config, listener); } }
java
public void addConfigListener(AbstractInterfaceConfig config, ConfigListener listener) { if (listener != null) { RegistryUtils.initOrAddList(configListenerMap, config, listener); } }
[ "public", "void", "addConfigListener", "(", "AbstractInterfaceConfig", "config", ",", "ConfigListener", "listener", ")", "{", "if", "(", "listener", "!=", "null", ")", "{", "RegistryUtils", ".", "initOrAddList", "(", "configListenerMap", ",", "config", ",", "liste...
Add config listener. @param config the config @param listener the listener
[ "Add", "config", "listener", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-zk/src/main/java/com/alipay/sofa/rpc/registry/zk/ZookeeperConfigObserver.java#L57-L61
infinispan/infinispan
query/src/main/java/org/infinispan/query/backend/QueryInterceptor.java
QueryInterceptor.removeFromIndexes
private void removeFromIndexes(Object value, Object key, TransactionContext transactionContext) { """ Method that will be called when data needs to be removed from Lucene. """ performSearchWork(value, keyToString(key), WorkType.DELETE, transactionContext); }
java
private void removeFromIndexes(Object value, Object key, TransactionContext transactionContext) { performSearchWork(value, keyToString(key), WorkType.DELETE, transactionContext); }
[ "private", "void", "removeFromIndexes", "(", "Object", "value", ",", "Object", "key", ",", "TransactionContext", "transactionContext", ")", "{", "performSearchWork", "(", "value", ",", "keyToString", "(", "key", ")", ",", "WorkType", ".", "DELETE", ",", "transac...
Method that will be called when data needs to be removed from Lucene.
[ "Method", "that", "will", "be", "called", "when", "data", "needs", "to", "be", "removed", "from", "Lucene", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/backend/QueryInterceptor.java#L365-L367
oasp/oasp4j
modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/AbstractAccessControlProvider.java
AbstractAccessControlProvider.collectPermissionIds
public void collectPermissionIds(AccessControlGroup group, Set<String> permissions) { """ Recursive implementation of {@link #collectAccessControlIds(String, Set)} for {@link AccessControlGroup}s. @param group is the {@link AccessControlGroup} to traverse. @param permissions is the {@link Set} used to collect....
java
public void collectPermissionIds(AccessControlGroup group, Set<String> permissions) { boolean added = permissions.add(group.getId()); if (!added) { // we have already visited this node, stop recursion... return; } for (AccessControlPermission permission : group.getPermissions()) { per...
[ "public", "void", "collectPermissionIds", "(", "AccessControlGroup", "group", ",", "Set", "<", "String", ">", "permissions", ")", "{", "boolean", "added", "=", "permissions", ".", "add", "(", "group", ".", "getId", "(", ")", ")", ";", "if", "(", "!", "ad...
Recursive implementation of {@link #collectAccessControlIds(String, Set)} for {@link AccessControlGroup}s. @param group is the {@link AccessControlGroup} to traverse. @param permissions is the {@link Set} used to collect.
[ "Recursive", "implementation", "of", "{", "@link", "#collectAccessControlIds", "(", "String", "Set", ")", "}", "for", "{", "@link", "AccessControlGroup", "}", "s", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/AbstractAccessControlProvider.java#L175-L188
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchema.java
JSchema.setInterpreterCache
public void setInterpreterCache(int version, Object toCache) { """ Set an entry in the interpreter Cache (indexed by JMF encoding version, of which the first is expected to be 1). @param version the JMF encoding version @param toCache the Object that the SchemaInterpreter wishes to cache """ if (inter...
java
public void setInterpreterCache(int version, Object toCache) { if (interpCache == null) // JMF_ENCODING_VERSION is always the latest version we support interpCache = new Object[JMFRegistry.JMF_ENCODING_VERSION]; interpCache[version - 1] = toCache; }
[ "public", "void", "setInterpreterCache", "(", "int", "version", ",", "Object", "toCache", ")", "{", "if", "(", "interpCache", "==", "null", ")", "// JMF_ENCODING_VERSION is always the latest version we support", "interpCache", "=", "new", "Object", "[", "JMFRegistry", ...
Set an entry in the interpreter Cache (indexed by JMF encoding version, of which the first is expected to be 1). @param version the JMF encoding version @param toCache the Object that the SchemaInterpreter wishes to cache
[ "Set", "an", "entry", "in", "the", "interpreter", "Cache", "(", "indexed", "by", "JMF", "encoding", "version", "of", "which", "the", "first", "is", "expected", "to", "be", "1", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchema.java#L268-L273
triceo/splitlog
splitlog-core/src/main/java/com/github/triceo/splitlog/splitters/exceptions/ExceptionParser.java
ExceptionParser.parseLine
private LineType parseLine(final String line, final LineType... allowedLineTypes) throws ExceptionParseException { """ Parse one line in the log, when knowing the types of lines acceptable at this point in the log. @param line Line to parse. @param allowedLineTypes Possible line types, in the order of evalu...
java
private LineType parseLine(final String line, final LineType... allowedLineTypes) throws ExceptionParseException { for (final LineType possibleType : allowedLineTypes) { if ((possibleType == LineType.POST_END) || (possibleType == LineType.PRE_START)) { // this is garbage, all is acce...
[ "private", "LineType", "parseLine", "(", "final", "String", "line", ",", "final", "LineType", "...", "allowedLineTypes", ")", "throws", "ExceptionParseException", "{", "for", "(", "final", "LineType", "possibleType", ":", "allowedLineTypes", ")", "{", "if", "(", ...
Parse one line in the log, when knowing the types of lines acceptable at this point in the log. @param line Line to parse. @param allowedLineTypes Possible line types, in the order of evaluation. (Possible transitions.) If evaluation matches for a type, transition will be made and any subsequent types will be ignored....
[ "Parse", "one", "line", "in", "the", "log", "when", "knowing", "the", "types", "of", "lines", "acceptable", "at", "this", "point", "in", "the", "log", "." ]
train
https://github.com/triceo/splitlog/blob/4e1b188e8c814119f5cf7343bbc53917843d68a2/splitlog-core/src/main/java/com/github/triceo/splitlog/splitters/exceptions/ExceptionParser.java#L146-L169
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ExceptionHelper.java
ExceptionHelper.generateException
public static PersistenceBrokerSQLException generateException(String message, SQLException ex, String sql, Logger logger) { """ Method which support the conversion of {@link java.sql.SQLException} to OJB's runtime exception (with additional message details). @param message The error message to use, if <em>nul...
java
public static PersistenceBrokerSQLException generateException(String message, SQLException ex, String sql, Logger logger) { return generateException(message, ex, sql, null, null, logger, null); }
[ "public", "static", "PersistenceBrokerSQLException", "generateException", "(", "String", "message", ",", "SQLException", "ex", ",", "String", "sql", ",", "Logger", "logger", ")", "{", "return", "generateException", "(", "message", ",", "ex", ",", "sql", ",", "nu...
Method which support the conversion of {@link java.sql.SQLException} to OJB's runtime exception (with additional message details). @param message The error message to use, if <em>null</em> a standard message is used. @param ex The exception to convert (mandatory). @param sql The used sql-statement or <em>null</em>. @p...
[ "Method", "which", "support", "the", "conversion", "of", "{", "@link", "java", ".", "sql", ".", "SQLException", "}", "to", "OJB", "s", "runtime", "exception", "(", "with", "additional", "message", "details", ")", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ExceptionHelper.java#L51-L54
vkostyukov/la4j
src/main/java/org/la4j/Matrix.java
Matrix.removeRow
public Matrix removeRow(int i) { """ Removes one row from matrix. @param i the row index @return matrix without row. """ if (i >= rows || i < 0) { throw new IndexOutOfBoundsException("Illegal row number, must be 0.." + (rows - 1)); } Matrix result = blankOfShape(rows - 1,...
java
public Matrix removeRow(int i) { if (i >= rows || i < 0) { throw new IndexOutOfBoundsException("Illegal row number, must be 0.." + (rows - 1)); } Matrix result = blankOfShape(rows - 1, columns); for (int ii = 0; ii < i; ii++) { result.setRow(ii, getRow(ii)); ...
[ "public", "Matrix", "removeRow", "(", "int", "i", ")", "{", "if", "(", "i", ">=", "rows", "||", "i", "<", "0", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Illegal row number, must be 0..\"", "+", "(", "rows", "-", "1", ")", ")", ";", ...
Removes one row from matrix. @param i the row index @return matrix without row.
[ "Removes", "one", "row", "from", "matrix", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Matrix.java#L1105-L1121
akarnokd/ixjava
src/main/java/ix/Ix.java
Ix.groupBy
public final <K> Ix<GroupedIx<K, T>> groupBy(IxFunction<? super T, ? extends K> keySelector) { """ Groups elements of this sequence into distinct groups keyed by the keys returned by the keySelector. <p> The operator doesn't lose data and calling hasNext/next on either the returned Ix or on the inner GroupedIx ...
java
public final <K> Ix<GroupedIx<K, T>> groupBy(IxFunction<? super T, ? extends K> keySelector) { return groupBy(keySelector, IdentityHelper.<T>instance()); }
[ "public", "final", "<", "K", ">", "Ix", "<", "GroupedIx", "<", "K", ",", "T", ">", ">", "groupBy", "(", "IxFunction", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keySelector", ")", "{", "return", "groupBy", "(", "keySelector", ",", "Ide...
Groups elements of this sequence into distinct groups keyed by the keys returned by the keySelector. <p> The operator doesn't lose data and calling hasNext/next on either the returned Ix or on the inner GroupedIx can move the source sequence forward. <p> The result's iterator() and the inner groups' Iterators don't sup...
[ "Groups", "elements", "of", "this", "sequence", "into", "distinct", "groups", "keyed", "by", "the", "keys", "returned", "by", "the", "keySelector", ".", "<p", ">", "The", "operator", "doesn", "t", "lose", "data", "and", "calling", "hasNext", "/", "next", "...
train
https://github.com/akarnokd/ixjava/blob/add721bba550c36541faa450e40a975bb65e78d7/src/main/java/ix/Ix.java#L1308-L1310
js-lib-com/commons
src/main/java/js/io/FilesOutputStream.java
FilesOutputStream.addFileEntry
private void addFileEntry(String entryName, InputStream inputStream) throws IOException { """ Add file entry to this files archive. This method takes care to lazily write manifest just before first file entry. @param entryName entry name, @param inputStream file content. @throws IOException if file entry writ...
java
private void addFileEntry(String entryName, InputStream inputStream) throws IOException { // write lazily the manifest before adding the first file if (manifest != null) { addManifestEntry(); } ZipEntry entry = new ZipEntry(entryName); filesArchive.putNextEntry(entry); inputStream = new Buffer...
[ "private", "void", "addFileEntry", "(", "String", "entryName", ",", "InputStream", "inputStream", ")", "throws", "IOException", "{", "// write lazily the manifest before adding the first file\r", "if", "(", "manifest", "!=", "null", ")", "{", "addManifestEntry", "(", ")...
Add file entry to this files archive. This method takes care to lazily write manifest just before first file entry. @param entryName entry name, @param inputStream file content. @throws IOException if file entry write fails.
[ "Add", "file", "entry", "to", "this", "files", "archive", ".", "This", "method", "takes", "care", "to", "lazily", "write", "manifest", "just", "before", "first", "file", "entry", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesOutputStream.java#L191-L214
tomgibara/bits
src/main/java/com/tomgibara/bits/ImmutableBitStore.java
ImmutableBitStore.range
@Override public BitStore range(int from, int to) { """ /* @Override public Op and() { return IMM_AND; } @Override public Op or() { return IMM_OR; } @Override public Op xor() { return IMM_XOR; } @Override public Op set() { return IMM_SET; } """ return store.range(from, to).immutableVie...
java
@Override public BitStore range(int from, int to) { return store.range(from, to).immutableView(); }
[ "@", "Override", "public", "BitStore", "range", "(", "int", "from", ",", "int", "to", ")", "{", "return", "store", ".", "range", "(", "from", ",", "to", ")", ".", "immutableView", "(", ")", ";", "}" ]
/* @Override public Op and() { return IMM_AND; } @Override public Op or() { return IMM_OR; } @Override public Op xor() { return IMM_XOR; } @Override public Op set() { return IMM_SET; }
[ "/", "*", "@Override", "public", "Op", "and", "()", "{", "return", "IMM_AND", ";", "}" ]
train
https://github.com/tomgibara/bits/blob/56c32c0a30efd3d7c4e7c6600a0ca39e51eecc97/src/main/java/com/tomgibara/bits/ImmutableBitStore.java#L151-L154
teatrove/teatrove
build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/ClassDoc.java
ClassDoc.findMatchingMethod
public MethodDoc findMatchingMethod(MethodDoc method, MethodFinder mf) { """ Find a MethodDoc with a name and signature matching that of the specified MethodDoc and accepted by the specified MethodFinder. This method searches the interfaces and super class ancestry of the class represented by this ClassDoc for...
java
public MethodDoc findMatchingMethod(MethodDoc method, MethodFinder mf) { // Look in this class's interface set MethodDoc md = findMatchingInterfaceMethod(method, mf); if (md != null) { return md; } // Look in this class's superclass ancestry ClassDoc superC...
[ "public", "MethodDoc", "findMatchingMethod", "(", "MethodDoc", "method", ",", "MethodFinder", "mf", ")", "{", "// Look in this class's interface set", "MethodDoc", "md", "=", "findMatchingInterfaceMethod", "(", "method", ",", "mf", ")", ";", "if", "(", "md", "!=", ...
Find a MethodDoc with a name and signature matching that of the specified MethodDoc and accepted by the specified MethodFinder. This method searches the interfaces and super class ancestry of the class represented by this ClassDoc for a matching method.
[ "Find", "a", "MethodDoc", "with", "a", "name", "and", "signature", "matching", "that", "of", "the", "specified", "MethodDoc", "and", "accepted", "by", "the", "specified", "MethodFinder", ".", "This", "method", "searches", "the", "interfaces", "and", "super", "...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/ClassDoc.java#L277-L299
aws/aws-sdk-java
aws-java-sdk-lexmodelbuilding/src/main/java/com/amazonaws/services/lexmodelbuilding/model/BotChannelAssociation.java
BotChannelAssociation.withBotConfiguration
public BotChannelAssociation withBotConfiguration(java.util.Map<String, String> botConfiguration) { """ <p> Provides information necessary to communicate with the messaging platform. </p> @param botConfiguration Provides information necessary to communicate with the messaging platform. @return Returns a ref...
java
public BotChannelAssociation withBotConfiguration(java.util.Map<String, String> botConfiguration) { setBotConfiguration(botConfiguration); return this; }
[ "public", "BotChannelAssociation", "withBotConfiguration", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "botConfiguration", ")", "{", "setBotConfiguration", "(", "botConfiguration", ")", ";", "return", "this", ";", "}" ]
<p> Provides information necessary to communicate with the messaging platform. </p> @param botConfiguration Provides information necessary to communicate with the messaging platform. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Provides", "information", "necessary", "to", "communicate", "with", "the", "messaging", "platform", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lexmodelbuilding/src/main/java/com/amazonaws/services/lexmodelbuilding/model/BotChannelAssociation.java#L453-L456
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/SchedulesInner.java
SchedulesInner.listByAutomationAccountAsync
public Observable<Page<ScheduleInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) { """ Retrieve a list of schedules. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws Illegal...
java
public Observable<Page<ScheduleInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) { return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName) .map(new Func1<ServiceResponse<Page<ScheduleInner>>, Page<Schedul...
[ "public", "Observable", "<", "Page", "<", "ScheduleInner", ">", ">", "listByAutomationAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "automationAccountName", ")", "{", "return", "listByAutomationAccountWithServiceResponseAsync", "(", "...
Retrieve a list of schedules. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;ScheduleInner&gt; object
[ "Retrieve", "a", "list", "of", "schedules", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/SchedulesInner.java#L522-L530
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java
MappedParametrizedObjectEntry.getParameterDouble
public Double getParameterDouble(String name) throws RepositoryConfigurationException { """ Parse named parameter as Double. @param name parameter name @return Double value @throws RepositoryConfigurationException """ try { return StringNumberParser.parseDouble(getParameterValue(name...
java
public Double getParameterDouble(String name) throws RepositoryConfigurationException { try { return StringNumberParser.parseDouble(getParameterValue(name)); } catch (NumberFormatException e) { throw new RepositoryConfigurationException(name + ": unparseable Long. " + ...
[ "public", "Double", "getParameterDouble", "(", "String", "name", ")", "throws", "RepositoryConfigurationException", "{", "try", "{", "return", "StringNumberParser", ".", "parseDouble", "(", "getParameterValue", "(", "name", ")", ")", ";", "}", "catch", "(", "Numbe...
Parse named parameter as Double. @param name parameter name @return Double value @throws RepositoryConfigurationException
[ "Parse", "named", "parameter", "as", "Double", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java#L276-L286
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Call.java
Call.getGather
public Gather getGather(final String gatherId) throws Exception { """ Gets the gather DTMF parameters and results. @param gatherId gather id @return gather DTMF parameters and results @throws IOException unexpected error. """ final String gatherPath = StringUtils.join(new String[]{ ...
java
public Gather getGather(final String gatherId) throws Exception { final String gatherPath = StringUtils.join(new String[]{ getUri(), "gather", gatherId }, '/'); final JSONObject jsonObject = toJSONObject(client.get(gatherPath, null)); retur...
[ "public", "Gather", "getGather", "(", "final", "String", "gatherId", ")", "throws", "Exception", "{", "final", "String", "gatherPath", "=", "StringUtils", ".", "join", "(", "new", "String", "[", "]", "{", "getUri", "(", ")", ",", "\"gather\"", ",", "gather...
Gets the gather DTMF parameters and results. @param gatherId gather id @return gather DTMF parameters and results @throws IOException unexpected error.
[ "Gets", "the", "gather", "DTMF", "parameters", "and", "results", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Call.java#L514-L522
VueGWT/vue-gwt
core/src/main/java/com/axellience/vuegwt/core/client/vnode/builder/VNodeBuilder.java
VNodeBuilder.el
public VNode el(String tag, VNodeData data, Object... children) { """ Create a VNode with the given HTML tag @param tag HTML tag for the new VNode @param data Information for the new VNode (attributes...) @param children Children @return a new VNode of this tag """ return this.function.create(tag, da...
java
public VNode el(String tag, VNodeData data, Object... children) { return this.function.create(tag, data, children); }
[ "public", "VNode", "el", "(", "String", "tag", ",", "VNodeData", "data", ",", "Object", "...", "children", ")", "{", "return", "this", ".", "function", ".", "create", "(", "tag", ",", "data", ",", "children", ")", ";", "}" ]
Create a VNode with the given HTML tag @param tag HTML tag for the new VNode @param data Information for the new VNode (attributes...) @param children Children @return a new VNode of this tag
[ "Create", "a", "VNode", "with", "the", "given", "HTML", "tag" ]
train
https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/vnode/builder/VNodeBuilder.java#L48-L50
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getStrings
private void getStrings(HashSet<String> strHashSet, SearchCondition searchCondition, String searchConditionString, String prefixString, SimpleMDAGNode node) { """ Retrieves Strings corresponding to all valid _transition paths from a given node that satisfy a given condition. @param strHashSet a Has...
java
private void getStrings(HashSet<String> strHashSet, SearchCondition searchCondition, String searchConditionString, String prefixString, SimpleMDAGNode node) { int transitionSetBegin = node.getTransitionSetBeginIndex(); int onePastTransitionSetEnd = transitionSetBegin + node.getOutgoingTransitionSetS...
[ "private", "void", "getStrings", "(", "HashSet", "<", "String", ">", "strHashSet", ",", "SearchCondition", "searchCondition", ",", "String", "searchConditionString", ",", "String", "prefixString", ",", "SimpleMDAGNode", "node", ")", "{", "int", "transitionSetBegin", ...
Retrieves Strings corresponding to all valid _transition paths from a given node that satisfy a given condition. @param strHashSet a HashSet of Strings to contain all those in the MDAG satisfying {@code searchCondition} with {@code conditionString} @param searchCondition the SearchCondition enum f...
[ "Retrieves", "Strings", "corresponding", "to", "all", "valid", "_transition", "paths", "from", "a", "given", "node", "that", "satisfy", "a", "given", "condition", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L892-L911
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplBoolean_CustomFieldSerializer.java
OWLLiteralImplBoolean_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplBoolean instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplBoolean instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLLiteralImplBoolean", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplBoolean_CustomFieldSerializer.java#L84-L87
arquillian/arquillian-core
container/spi/src/main/java/org/jboss/arquillian/container/spi/client/deployment/Validate.java
Validate.configurationDirectoryExists
public static void configurationDirectoryExists(final String string, final String message) throws ConfigurationException { """ Checks that string is not null and not empty and it represents a path to a valid directory @param string The path to check @param message The exception message @throws Con...
java
public static void configurationDirectoryExists(final String string, final String message) throws ConfigurationException { if (string == null || string.length() == 0 || new File(string).isDirectory() == false) { throw new ConfigurationException(message); } }
[ "public", "static", "void", "configurationDirectoryExists", "(", "final", "String", "string", ",", "final", "String", "message", ")", "throws", "ConfigurationException", "{", "if", "(", "string", "==", "null", "||", "string", ".", "length", "(", ")", "==", "0"...
Checks that string is not null and not empty and it represents a path to a valid directory @param string The path to check @param message The exception message @throws ConfigurationException Thrown if string is empty, null or it does not represent a path the a valid directory
[ "Checks", "that", "string", "is", "not", "null", "and", "not", "empty", "and", "it", "represents", "a", "path", "to", "a", "valid", "directory" ]
train
https://github.com/arquillian/arquillian-core/blob/a85b91789b80cc77e0f0c2e2abac65c2255c0a81/container/spi/src/main/java/org/jboss/arquillian/container/spi/client/deployment/Validate.java#L137-L142
Nexmo/nexmo-java
src/main/java/com/nexmo/client/account/AccountClient.java
AccountClient.revokeSecret
public void revokeSecret(String apiKey, String secretId) throws IOException, NexmoClientException { """ Revoke a secret associated with a specific API key. @param apiKey The API key that the secret is associated to. @param secretId The id of the secret to revoke. @throws IOException if a network ...
java
public void revokeSecret(String apiKey, String secretId) throws IOException, NexmoClientException { revokeSecret(new SecretRequest(apiKey, secretId)); }
[ "public", "void", "revokeSecret", "(", "String", "apiKey", ",", "String", "secretId", ")", "throws", "IOException", ",", "NexmoClientException", "{", "revokeSecret", "(", "new", "SecretRequest", "(", "apiKey", ",", "secretId", ")", ")", ";", "}" ]
Revoke a secret associated with a specific API key. @param apiKey The API key that the secret is associated to. @param secretId The id of the secret to revoke. @throws IOException if a network error occurred contacting the Nexmo Account API @throws NexmoClientException if there was a problem wit hthe Nexmo...
[ "Revoke", "a", "secret", "associated", "with", "a", "specific", "API", "key", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/account/AccountClient.java#L195-L197
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.unionWorkSheetsRowJoin
static public WorkSheet unionWorkSheetsRowJoin(String w1FileName, String w2FileName, char delimitter, boolean secondSheetMetaData) throws Exception { """ Combine two work sheets where you join based on rows. Rows that are found in one but not the other are removed. If the second sheet is meta data then a meta da...
java
static public WorkSheet unionWorkSheetsRowJoin(String w1FileName, String w2FileName, char delimitter, boolean secondSheetMetaData) throws Exception { WorkSheet w1 = WorkSheet.readCSV(w1FileName, delimitter); WorkSheet w2 = WorkSheet.readCSV(w2FileName, delimitter); return unionWorkSheetsRowJoin(w1, w2, secondShee...
[ "static", "public", "WorkSheet", "unionWorkSheetsRowJoin", "(", "String", "w1FileName", ",", "String", "w2FileName", ",", "char", "delimitter", ",", "boolean", "secondSheetMetaData", ")", "throws", "Exception", "{", "WorkSheet", "w1", "=", "WorkSheet", ".", "readCSV...
Combine two work sheets where you join based on rows. Rows that are found in one but not the other are removed. If the second sheet is meta data then a meta data column will be added between the two joined columns @param w1FileName @param w2FileName @param delimitter @param secondSheetMetaData @return @throws Exceptio...
[ "Combine", "two", "work", "sheets", "where", "you", "join", "based", "on", "rows", ".", "Rows", "that", "are", "found", "in", "one", "but", "not", "the", "other", "are", "removed", ".", "If", "the", "second", "sheet", "is", "meta", "data", "then", "a",...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1358-L1363
sagiegurari/fax4j
src/main/java/org/fax4j/util/DefaultProcessExecutor.java
DefaultProcessExecutor.executeProcessImpl
@Override protected ProcessOutput executeProcessImpl(ConfigurationHolder configurationHolder,String command) throws IOException,InterruptedException { """ This function executes the given command and returns the process output. @param configurationHolder The configuration holder used when invoking the pr...
java
@Override protected ProcessOutput executeProcessImpl(ConfigurationHolder configurationHolder,String command) throws IOException,InterruptedException { //parse command List<String> commandList=this.parseCommand(configurationHolder,command); //invoke process ProcessBuilder...
[ "@", "Override", "protected", "ProcessOutput", "executeProcessImpl", "(", "ConfigurationHolder", "configurationHolder", ",", "String", "command", ")", "throws", "IOException", ",", "InterruptedException", "{", "//parse command", "List", "<", "String", ">", "commandList", ...
This function executes the given command and returns the process output. @param configurationHolder The configuration holder used when invoking the process @param command The command to execute @return The process output @throws IOException Any IO exception @throws InterruptedException If thread interrupted dur...
[ "This", "function", "executes", "the", "given", "command", "and", "returns", "the", "process", "output", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/DefaultProcessExecutor.java#L43-L72
apache/groovy
src/main/groovy/groovy/lang/MetaClassImpl.java
MetaClassImpl.setAttribute
public void setAttribute(Object object, String attribute, Object newValue) { """ Sets the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage. @param object The object to get the attribute from @param attribute The name of the attribute @param newVa...
java
public void setAttribute(Object object, String attribute, Object newValue) { setAttribute(theClass, object, attribute, newValue, false, false); }
[ "public", "void", "setAttribute", "(", "Object", "object", ",", "String", "attribute", ",", "Object", "newValue", ")", "{", "setAttribute", "(", "theClass", ",", "object", ",", "attribute", ",", "newValue", ",", "false", ",", "false", ")", ";", "}" ]
Sets the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage. @param object The object to get the attribute from @param attribute The name of the attribute @param newValue The new value of the attribute
[ "Sets", "the", "value", "of", "an", "attribute", "(", "field", ")", ".", "This", "method", "is", "to", "support", "the", "Groovy", "runtime", "and", "not", "for", "general", "client", "API", "usage", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/MetaClassImpl.java#L3892-L3894
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.makeMarginTransform
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double lmargin, double tmargin, double rmargin, double bmargin) { """ Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas ...
java
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double lmargin, double tmargin, double rmargin, double bmargin) { double swidth = iwidth + lmargin + rmargin; double sheight = iheight + tmargin + bmargin; double scale = Math.max(swidth / owidth, sheight ...
[ "public", "static", "String", "makeMarginTransform", "(", "double", "owidth", ",", "double", "oheight", ",", "double", "iwidth", ",", "double", "iheight", ",", "double", "lmargin", ",", "double", "tmargin", ",", "double", "rmargin", ",", "double", "bmargin", "...
Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas @param iwidth Width of inner (embedded) canvas @param iheight Height of inner (embedded) canvas @param lmargin Left margin (in inner canvas' units) @param tmargin Top margin (in inne...
[ "Make", "a", "transform", "string", "to", "add", "margins" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L580-L587
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/yaml/YamlUtil.java
YamlUtil.isOfSameType
public static boolean isOfSameType(YamlNode left, YamlNode right) { """ Checks if the two provided {@code nodes} are of the same type @param left The left-side node of the check @param right The right-side node of the check @return {@code true} if the provided nodes are of the same type """ retur...
java
public static boolean isOfSameType(YamlNode left, YamlNode right) { return left instanceof YamlMapping && right instanceof YamlMapping || left instanceof YamlSequence && right instanceof YamlSequence || left instanceof YamlScalar && right instanceof YamlScalar; }
[ "public", "static", "boolean", "isOfSameType", "(", "YamlNode", "left", ",", "YamlNode", "right", ")", "{", "return", "left", "instanceof", "YamlMapping", "&&", "right", "instanceof", "YamlMapping", "||", "left", "instanceof", "YamlSequence", "&&", "right", "insta...
Checks if the two provided {@code nodes} are of the same type @param left The left-side node of the check @param right The right-side node of the check @return {@code true} if the provided nodes are of the same type
[ "Checks", "if", "the", "two", "provided", "{", "@code", "nodes", "}", "are", "of", "the", "same", "type" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/yaml/YamlUtil.java#L161-L165
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/util/gateway/DiscordWebSocketAdapter.java
DiscordWebSocketAdapter.sendIdentify
private void sendIdentify(WebSocket websocket) { """ Sends the identify packet. @param websocket The websocket the identify packet should be sent to. """ ObjectNode identifyPacket = JsonNodeFactory.instance.objectNode() .put("op", GatewayOpcode.IDENTIFY.getCode()); ObjectNode...
java
private void sendIdentify(WebSocket websocket) { ObjectNode identifyPacket = JsonNodeFactory.instance.objectNode() .put("op", GatewayOpcode.IDENTIFY.getCode()); ObjectNode data = identifyPacket.putObject("d"); String token = api.getPrefixedToken(); data.put("token", token...
[ "private", "void", "sendIdentify", "(", "WebSocket", "websocket", ")", "{", "ObjectNode", "identifyPacket", "=", "JsonNodeFactory", ".", "instance", ".", "objectNode", "(", ")", ".", "put", "(", "\"op\"", ",", "GatewayOpcode", ".", "IDENTIFY", ".", "getCode", ...
Sends the identify packet. @param websocket The websocket the identify packet should be sent to.
[ "Sends", "the", "identify", "packet", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/gateway/DiscordWebSocketAdapter.java#L692-L739
grpc/grpc-java
cronet/src/main/java/io/grpc/cronet/CronetCallOptions.java
CronetCallOptions.withAnnotation
public static CallOptions withAnnotation(CallOptions callOptions, Object annotation) { """ Returns a copy of {@code callOptions} with {@code annotation} included as one of the Cronet annotation objects. When an RPC is made using a {@link CallOptions} instance returned by this method, the annotation objects will ...
java
public static CallOptions withAnnotation(CallOptions callOptions, Object annotation) { Collection<Object> existingAnnotations = callOptions.getOption(CRONET_ANNOTATIONS_KEY); ArrayList<Object> newAnnotations; if (existingAnnotations == null) { newAnnotations = new ArrayList<>(); } else { new...
[ "public", "static", "CallOptions", "withAnnotation", "(", "CallOptions", "callOptions", ",", "Object", "annotation", ")", "{", "Collection", "<", "Object", ">", "existingAnnotations", "=", "callOptions", ".", "getOption", "(", "CRONET_ANNOTATIONS_KEY", ")", ";", "Ar...
Returns a copy of {@code callOptions} with {@code annotation} included as one of the Cronet annotation objects. When an RPC is made using a {@link CallOptions} instance returned by this method, the annotation objects will be attached to the underlying Cronet bidirectional stream. When the stream finishes, the user can ...
[ "Returns", "a", "copy", "of", "{", "@code", "callOptions", "}", "with", "{", "@code", "annotation", "}", "included", "as", "one", "of", "the", "Cronet", "annotation", "objects", ".", "When", "an", "RPC", "is", "made", "using", "a", "{", "@link", "CallOpt...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/cronet/src/main/java/io/grpc/cronet/CronetCallOptions.java#L50-L61
EdwardRaff/JSAT
JSAT/src/jsat/distributions/discrete/Poisson.java
Poisson.setLambda
public void setLambda(double lambda) { """ Sets the average rate of the event occurring in a unit of time @param lambda the average rate of the event occurring """ if (Double.isNaN(lambda) || lambda <= 0 || Double.isInfinite(lambda)) throw new IllegalArgumentException("lambda must be p...
java
public void setLambda(double lambda) { if (Double.isNaN(lambda) || lambda <= 0 || Double.isInfinite(lambda)) throw new IllegalArgumentException("lambda must be positive, not " + lambda); this.lambda = lambda; }
[ "public", "void", "setLambda", "(", "double", "lambda", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "lambda", ")", "||", "lambda", "<=", "0", "||", "Double", ".", "isInfinite", "(", "lambda", ")", ")", "throw", "new", "IllegalArgumentException", "(...
Sets the average rate of the event occurring in a unit of time @param lambda the average rate of the event occurring
[ "Sets", "the", "average", "rate", "of", "the", "event", "occurring", "in", "a", "unit", "of", "time" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/discrete/Poisson.java#L58-L63
alkacon/opencms-core
src/org/opencms/ui/apps/CmsFileExplorer.java
CmsFileExplorer.initToolbarButtons
private void initToolbarButtons(I_CmsAppUIContext context) { """ Initializes the app specific toolbar buttons.<p> @param context the UI context """ m_publishButton = context.addPublishButton(new I_CmsUpdateListener<String>() { public void onUpdate(List<String> updatedItems) { ...
java
private void initToolbarButtons(I_CmsAppUIContext context) { m_publishButton = context.addPublishButton(new I_CmsUpdateListener<String>() { public void onUpdate(List<String> updatedItems) { updateAll(false); } }); m_newButton = CmsToolBar.createButton...
[ "private", "void", "initToolbarButtons", "(", "I_CmsAppUIContext", "context", ")", "{", "m_publishButton", "=", "context", ".", "addPublishButton", "(", "new", "I_CmsUpdateListener", "<", "String", ">", "(", ")", "{", "public", "void", "onUpdate", "(", "List", "...
Initializes the app specific toolbar buttons.<p> @param context the UI context
[ "Initializes", "the", "app", "specific", "toolbar", "buttons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsFileExplorer.java#L1840-L1889
wuman/orientdb-android
client/src/main/java/com/orientechnologies/orient/client/remote/OServerAdmin.java
OServerAdmin.createDatabase
public synchronized OServerAdmin createDatabase(final String iDatabaseType, String iStorageMode) throws IOException { """ Creates a database in a remote server. @param iDatabaseType 'document' or 'graph' @param iStorageMode local or memory @return The instance itself. Useful to execute method in chain @thr...
java
public synchronized OServerAdmin createDatabase(final String iDatabaseType, String iStorageMode) throws IOException { storage.checkConnection(); try { if (storage.getName() == null || storage.getName().length() <= 0) { OLogManager.instance().error(this, "Cannot create unnamed remote storage....
[ "public", "synchronized", "OServerAdmin", "createDatabase", "(", "final", "String", "iDatabaseType", ",", "String", "iStorageMode", ")", "throws", "IOException", "{", "storage", ".", "checkConnection", "(", ")", ";", "try", "{", "if", "(", "storage", ".", "getNa...
Creates a database in a remote server. @param iDatabaseType 'document' or 'graph' @param iStorageMode local or memory @return The instance itself. Useful to execute method in chain @throws IOException
[ "Creates", "a", "database", "in", "a", "remote", "server", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/client/src/main/java/com/orientechnologies/orient/client/remote/OServerAdmin.java#L164-L193
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setTags
public Operation setTags(Tags tags, OperationOption... options) { """ Sets the tags for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure """ return compute.setTags(getInstanceId(), tags, op...
java
public Operation setTags(Tags tags, OperationOption... options) { return compute.setTags(getInstanceId(), tags, options); }
[ "public", "Operation", "setTags", "(", "Tags", "tags", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setTags", "(", "getInstanceId", "(", ")", ",", "tags", ",", "options", ")", ";", "}" ]
Sets the tags for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "tags", "for", "this", "instance", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L393-L395
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java
RequestAttributeSourceFilter.addRequestCookies
protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { """ Add request cookies to the attributes map @param httpServletRequest Http Servlet Request @param attributes Map of attributes to add additional attributes to from the Http Request ...
java
protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { final Cookie[] cookies = httpServletRequest.getCookies(); if (cookies == null) { return; } for (final Cookie cookie : cookies) { final Stri...
[ "protected", "void", "addRequestCookies", "(", "final", "HttpServletRequest", "httpServletRequest", ",", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "final", "Cookie", "[", "]", "cookies", "=", "httpServletRequest...
Add request cookies to the attributes map @param httpServletRequest Http Servlet Request @param attributes Map of attributes to add additional attributes to from the Http Request
[ "Add", "request", "cookies", "to", "the", "attributes", "map" ]
train
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L436-L450
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.mutateRemoveHosts
public static Pair<AbstractTopology, Set<Integer>> mutateRemoveHosts(AbstractTopology currentTopology, Set<Integer> removalHosts) { """ Remove hosts from an existing topology @param currentTopology to extend @param removalHostInfos hos...
java
public static Pair<AbstractTopology, Set<Integer>> mutateRemoveHosts(AbstractTopology currentTopology, Set<Integer> removalHosts) { Set<Integer> removalPartitionIds = getPartitionIdsForHosts(currentTopology, removalHosts); return ...
[ "public", "static", "Pair", "<", "AbstractTopology", ",", "Set", "<", "Integer", ">", ">", "mutateRemoveHosts", "(", "AbstractTopology", "currentTopology", ",", "Set", "<", "Integer", ">", "removalHosts", ")", "{", "Set", "<", "Integer", ">", "removalPartitionId...
Remove hosts from an existing topology @param currentTopology to extend @param removalHostInfos hosts to be removed from topology @return update {@link AbstractTopology} with remaining hosts and removed partition IDs @throws RuntimeException if hosts are not valid for topology
[ "Remove", "hosts", "from", "an", "existing", "topology" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L946-L950
jayantk/jklol
src/com/jayantkrish/jklol/util/IntMultimap.java
IntMultimap.createFromUnsortedArrays
public static IntMultimap createFromUnsortedArrays(int[] keys, int[] values, int unsortedCapacity) { """ This method does not copy {@code keys} or {@code values}. @param keys @param values @param unsortedCapacity @return """ Preconditions.checkArgument(keys.length == values.length); ArrayUtils.so...
java
public static IntMultimap createFromUnsortedArrays(int[] keys, int[] values, int unsortedCapacity) { Preconditions.checkArgument(keys.length == values.length); ArrayUtils.sortKeyValuePairs(keys, values, 0, keys.length); return new IntMultimap(keys, values, unsortedCapacity); }
[ "public", "static", "IntMultimap", "createFromUnsortedArrays", "(", "int", "[", "]", "keys", ",", "int", "[", "]", "values", ",", "int", "unsortedCapacity", ")", "{", "Preconditions", ".", "checkArgument", "(", "keys", ".", "length", "==", "values", ".", "le...
This method does not copy {@code keys} or {@code values}. @param keys @param values @param unsortedCapacity @return
[ "This", "method", "does", "not", "copy", "{", "@code", "keys", "}", "or", "{", "@code", "values", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/util/IntMultimap.java#L114-L118
rey5137/material
material/src/main/java/com/rey/material/widget/ListPopupWindow.java
ListPopupWindow.onKeyUp
public boolean onKeyUp(int keyCode, KeyEvent event) { """ Filter key down events. By forwarding key up events to this function, views using non-modal ListPopupWindow can have it handle key selection of items. @param keyCode keyCode param passed to the host view's onKeyUp @param event event param passed to the...
java
public boolean onKeyUp(int keyCode, KeyEvent event) { if (isShowing() && mDropDownList.getSelectedItemPosition() >= 0) { boolean consumed = mDropDownList.onKeyUp(keyCode, event); if (consumed && isConfirmKey(keyCode)) { // if the list accepts the key events and the key ev...
[ "public", "boolean", "onKeyUp", "(", "int", "keyCode", ",", "KeyEvent", "event", ")", "{", "if", "(", "isShowing", "(", ")", "&&", "mDropDownList", ".", "getSelectedItemPosition", "(", ")", ">=", "0", ")", "{", "boolean", "consumed", "=", "mDropDownList", ...
Filter key down events. By forwarding key up events to this function, views using non-modal ListPopupWindow can have it handle key selection of items. @param keyCode keyCode param passed to the host view's onKeyUp @param event event param passed to the host view's onKeyUp @return true if the event was handled, false i...
[ "Filter", "key", "down", "events", ".", "By", "forwarding", "key", "up", "events", "to", "this", "function", "views", "using", "non", "-", "modal", "ListPopupWindow", "can", "have", "it", "handle", "key", "selection", "of", "items", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/ListPopupWindow.java#L987-L998
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.beginDelete
public void beginDelete(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { """ Deletes the specified tap configuration from the NetworkInterface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param ta...
java
public void beginDelete(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ",", "String", "tapConfigurationName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkInterfaceName", ",", "tapConfigurationNam...
Deletes the specified tap configuration from the NetworkInterface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param tapConfigurationName The name of the tap configuration. @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Deletes", "the", "specified", "tap", "configuration", "from", "the", "NetworkInterface", "." ]
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/NetworkInterfaceTapConfigurationsInner.java#L177-L179
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.writeWordVectors
@Deprecated public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull String path) throws IOException { """ Writes the word vectors to the given path. Note that this assumes an in memory cache @param vec the word2vec to write @param path the path to write @throws IOException """ Buf...
java
@Deprecated public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull String path) throws IOException { BufferedWriter write = new BufferedWriter( new OutputStreamWriter(new FileOutputStream(new File(path), false), "UTF-8")); writeWordVectors(vec, write); write.fl...
[ "@", "Deprecated", "public", "static", "void", "writeWordVectors", "(", "@", "NonNull", "Word2Vec", "vec", ",", "@", "NonNull", "String", "path", ")", "throws", "IOException", "{", "BufferedWriter", "write", "=", "new", "BufferedWriter", "(", "new", "OutputStrea...
Writes the word vectors to the given path. Note that this assumes an in memory cache @param vec the word2vec to write @param path the path to write @throws IOException
[ "Writes", "the", "word", "vectors", "to", "the", "given", "path", ".", "Note", "that", "this", "assumes", "an", "in", "memory", "cache" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L1478-L1487
square/javapoet
src/main/java/com/squareup/javapoet/CodeWriter.java
CodeWriter.stackClassName
private ClassName stackClassName(int stackDepth, String simpleName) { """ Returns the class named {@code simpleName} when nested in the class at {@code stackDepth}. """ ClassName className = ClassName.get(packageName, typeSpecStack.get(0).name); for (int i = 1; i <= stackDepth; i++) { className =...
java
private ClassName stackClassName(int stackDepth, String simpleName) { ClassName className = ClassName.get(packageName, typeSpecStack.get(0).name); for (int i = 1; i <= stackDepth; i++) { className = className.nestedClass(typeSpecStack.get(i).name); } return className.nestedClass(simpleName); }
[ "private", "ClassName", "stackClassName", "(", "int", "stackDepth", ",", "String", "simpleName", ")", "{", "ClassName", "className", "=", "ClassName", ".", "get", "(", "packageName", ",", "typeSpecStack", ".", "get", "(", "0", ")", ".", "name", ")", ";", "...
Returns the class named {@code simpleName} when nested in the class at {@code stackDepth}.
[ "Returns", "the", "class", "named", "{" ]
train
https://github.com/square/javapoet/blob/0f93da9a3d9a1da8d29fc993409fcf83d40452bc/src/main/java/com/squareup/javapoet/CodeWriter.java#L442-L448
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java
QuartzScheduler.unscheduleJob
public synchronized boolean unscheduleJob(final String jobName, final String groupName) throws SchedulerException { """ Unschedule a job. @param jobName @param groupName @return true if job is found and unscheduled. @throws SchedulerException """ return this.scheduler.deleteJob(new JobKey(jobName...
java
public synchronized boolean unscheduleJob(final String jobName, final String groupName) throws SchedulerException { return this.scheduler.deleteJob(new JobKey(jobName, groupName)); }
[ "public", "synchronized", "boolean", "unscheduleJob", "(", "final", "String", "jobName", ",", "final", "String", "groupName", ")", "throws", "SchedulerException", "{", "return", "this", ".", "scheduler", ".", "deleteJob", "(", "new", "JobKey", "(", "jobName", ",...
Unschedule a job. @param jobName @param groupName @return true if job is found and unscheduled. @throws SchedulerException
[ "Unschedule", "a", "job", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java#L152-L155
b3dgs/lionengine
lionengine-network/src/main/java/com/b3dgs/lionengine/network/ServerImpl.java
ServerImpl.writeIdAndName
private static void writeIdAndName(ClientSocket client, int id, String name) throws IOException { """ Send the id and the name to the client. @param client The client to send to. @param id The id to send. @param name The name to send. @throws IOException In case of error. """ // New client id ...
java
private static void writeIdAndName(ClientSocket client, int id, String name) throws IOException { // New client id client.getOut().writeByte(id); // New client name final byte[] data = name.getBytes(NetworkMessage.CHARSET); client.getOut().writeByte(data.length); clie...
[ "private", "static", "void", "writeIdAndName", "(", "ClientSocket", "client", ",", "int", "id", ",", "String", "name", ")", "throws", "IOException", "{", "// New client id", "client", ".", "getOut", "(", ")", ".", "writeByte", "(", "id", ")", ";", "// New cl...
Send the id and the name to the client. @param client The client to send to. @param id The id to send. @param name The name to send. @throws IOException In case of error.
[ "Send", "the", "id", "and", "the", "name", "to", "the", "client", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/ServerImpl.java#L55-L63
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.createCopy
public static PlainChangesLogImpl createCopy(List<ItemState> items, PlainChangesLog originalLog) { """ Creates a new instance of {@link PlainChangesLogImpl} by copying metadata from originalLog instance with Items provided. @param items @param originalLog @return """ return createCopy(items, origin...
java
public static PlainChangesLogImpl createCopy(List<ItemState> items, PlainChangesLog originalLog) { return createCopy(items, originalLog.getPairId(), originalLog); }
[ "public", "static", "PlainChangesLogImpl", "createCopy", "(", "List", "<", "ItemState", ">", "items", ",", "PlainChangesLog", "originalLog", ")", "{", "return", "createCopy", "(", "items", ",", "originalLog", ".", "getPairId", "(", ")", ",", "originalLog", ")", ...
Creates a new instance of {@link PlainChangesLogImpl} by copying metadata from originalLog instance with Items provided. @param items @param originalLog @return
[ "Creates", "a", "new", "instance", "of", "{", "@link", "PlainChangesLogImpl", "}", "by", "copying", "metadata", "from", "originalLog", "instance", "with", "Items", "provided", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L335-L338
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/service/AbstractDynamicService.java
AbstractDynamicService.whenState
protected static void whenState(final Endpoint endpoint, final LifecycleState wanted, Action1<LifecycleState> then) { """ Waits until the endpoint goes into the given state, calls the action and then unsubscribes. @param endpoint the endpoint to monitor. @param wanted the wanted state. @param then the action ...
java
protected static void whenState(final Endpoint endpoint, final LifecycleState wanted, Action1<LifecycleState> then) { endpoint .states() .filter(new Func1<LifecycleState, Boolean>() { @Override public Boolean call(LifecycleState state) { ...
[ "protected", "static", "void", "whenState", "(", "final", "Endpoint", "endpoint", ",", "final", "LifecycleState", "wanted", ",", "Action1", "<", "LifecycleState", ">", "then", ")", "{", "endpoint", ".", "states", "(", ")", ".", "filter", "(", "new", "Func1",...
Waits until the endpoint goes into the given state, calls the action and then unsubscribes. @param endpoint the endpoint to monitor. @param wanted the wanted state. @param then the action to execute when the state is reached.
[ "Waits", "until", "the", "endpoint", "goes", "into", "the", "given", "state", "calls", "the", "action", "and", "then", "unsubscribes", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/service/AbstractDynamicService.java#L219-L230
connect-group/thymesheet
src/main/java/com/connect_group/thymesheet/css/selectors/dom/internal/TagChecker.java
TagChecker.tagEquals
private boolean tagEquals(String tag1, String tag2) { """ Determine if the two specified tag names are equal. @param tag1 A tag name. @param tag2 A tag name. @return <code>true</code> if the tag names are equal, <code>false</code> otherwise. """ if (caseSensitive) { return tag1.equals(...
java
private boolean tagEquals(String tag1, String tag2) { if (caseSensitive) { return tag1.equals(tag2); } return tag1.equalsIgnoreCase(tag2); }
[ "private", "boolean", "tagEquals", "(", "String", "tag1", ",", "String", "tag2", ")", "{", "if", "(", "caseSensitive", ")", "{", "return", "tag1", ".", "equals", "(", "tag2", ")", ";", "}", "return", "tag1", ".", "equalsIgnoreCase", "(", "tag2", ")", "...
Determine if the two specified tag names are equal. @param tag1 A tag name. @param tag2 A tag name. @return <code>true</code> if the tag names are equal, <code>false</code> otherwise.
[ "Determine", "if", "the", "two", "specified", "tag", "names", "are", "equal", "." ]
train
https://github.com/connect-group/thymesheet/blob/b6384e385d3e3b54944d53993bbd396d2668a5a0/src/main/java/com/connect_group/thymesheet/css/selectors/dom/internal/TagChecker.java#L168-L174
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java
NodeImpl.makeIterableAndSetMapKey
public static NodeImpl makeIterableAndSetMapKey(final NodeImpl node, final Object key) { """ make it iterable and set map key. @param node node to build @param key map key to est @return iterable node implementation """ return new NodeImpl( // node.name, // node.parent, // true...
java
public static NodeImpl makeIterableAndSetMapKey(final NodeImpl node, final Object key) { return new NodeImpl( // node.name, // node.parent, // true, // null, // key, // node.kind, // node.parameterTypes, // node.parameterIndex, // node.value, /...
[ "public", "static", "NodeImpl", "makeIterableAndSetMapKey", "(", "final", "NodeImpl", "node", ",", "final", "Object", "key", ")", "{", "return", "new", "NodeImpl", "(", "//", "node", ".", "name", ",", "//", "node", ".", "parent", ",", "//", "true", ",", ...
make it iterable and set map key. @param node node to build @param key map key to est @return iterable node implementation
[ "make", "it", "iterable", "and", "set", "map", "key", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java#L334-L348
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java
WSRdbManagedConnectionImpl.getLocalTransaction
public final LocalTransaction getLocalTransaction() throws ResourceException { """ Returns an javax.resource.spi.LocalTransaction instance. The LocalTransaction interface is used by the container to manage local transactions for a RM instance. @return a LocalTransaction instance @exception ResourceException ...
java
public final LocalTransaction getLocalTransaction() throws ResourceException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(this, tc, "getLocalTransaction"); localTran = localTran == null ? n...
[ "public", "final", "LocalTransaction", "getLocalTransaction", "(", ")", "throws", "ResourceException", "{", "final", "boolean", "isTraceOn", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "if", "(", "isTraceOn", "&&", "tc", ".", "isEntryEnabled", ...
Returns an javax.resource.spi.LocalTransaction instance. The LocalTransaction interface is used by the container to manage local transactions for a RM instance. @return a LocalTransaction instance @exception ResourceException - There should not be an exception thrown in this case. We just need to declare it as it is p...
[ "Returns", "an", "javax", ".", "resource", ".", "spi", ".", "LocalTransaction", "instance", ".", "The", "LocalTransaction", "interface", "is", "used", "by", "the", "container", "to", "manage", "local", "transactions", "for", "a", "RM", "instance", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java#L3819-L3832
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/MetadataManager.java
MetadataManager.setDescriptor
public void setDescriptor(DescriptorRepository repository, boolean global) { """ Set the {@link org.apache.ojb.broker.metadata.DescriptorRepository} - if <i>global</i> was true, the given descriptor aquire global availability (<i>use with care!</i>), else the given descriptor was associated with the calling thre...
java
public void setDescriptor(DescriptorRepository repository, boolean global) { if (global) { if (log.isDebugEnabled()) log.debug("Set new global repository: " + repository); globalRepository = repository; } else { if (log.isDebugEnab...
[ "public", "void", "setDescriptor", "(", "DescriptorRepository", "repository", ",", "boolean", "global", ")", "{", "if", "(", "global", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"Set new global repository: \""...
Set the {@link org.apache.ojb.broker.metadata.DescriptorRepository} - if <i>global</i> was true, the given descriptor aquire global availability (<i>use with care!</i>), else the given descriptor was associated with the calling thread. @see #isEnablePerThreadChanges @see #setEnablePerThreadChanges
[ "Set", "the", "{", "@link", "org", ".", "apache", ".", "ojb", ".", "broker", ".", "metadata", ".", "DescriptorRepository", "}", "-", "if", "<i", ">", "global<", "/", "i", ">", "was", "true", "the", "given", "descriptor", "aquire", "global", "availability...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/MetadataManager.java#L408-L420
Jasig/uPortal
uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java
PersonImpl.setAttribute
@Override public void setAttribute(String key, Object value) { """ Sets the specified attribute to a value. <p>Reference implementation checks for the setting of the username attribute and updates the EntityIdentifier accordingly @param key Attribute's name @param value Attribute's value """ ...
java
@Override public void setAttribute(String key, Object value) { if (value == null) { setAttribute(key, null); } else { setAttribute(key, Collections.singletonList(value)); } }
[ "@", "Override", "public", "void", "setAttribute", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "setAttribute", "(", "key", ",", "null", ")", ";", "}", "else", "{", "setAttribute", "(", "key", ",...
Sets the specified attribute to a value. <p>Reference implementation checks for the setting of the username attribute and updates the EntityIdentifier accordingly @param key Attribute's name @param value Attribute's value
[ "Sets", "the", "specified", "attribute", "to", "a", "value", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java#L114-L121
line/armeria
core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java
JsonTextSequences.fromObject
public static HttpResponse fromObject(HttpHeaders headers, @Nullable Object content, ObjectMapper mapper) { """ Creates a new JSON Text Sequences of the specified {@code content}. @param headers the HTTP headers supposed to send @param content the object supposed to se...
java
public static HttpResponse fromObject(HttpHeaders headers, @Nullable Object content, ObjectMapper mapper) { return fromObject(headers, content, HttpHeaders.EMPTY_HEADERS, mapper); }
[ "public", "static", "HttpResponse", "fromObject", "(", "HttpHeaders", "headers", ",", "@", "Nullable", "Object", "content", ",", "ObjectMapper", "mapper", ")", "{", "return", "fromObject", "(", "headers", ",", "content", ",", "HttpHeaders", ".", "EMPTY_HEADERS", ...
Creates a new JSON Text Sequences of the specified {@code content}. @param headers the HTTP headers supposed to send @param content the object supposed to send as contents @param mapper the mapper which converts the content object into JSON Text Sequences
[ "Creates", "a", "new", "JSON", "Text", "Sequences", "of", "the", "specified", "{", "@code", "content", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java#L239-L242