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
strator-dev/greenpepper-open
confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/historic/LinearExecutionChartBuilder.java
LinearExecutionChartBuilder.newInstance
public static AbstractChartBuilder newInstance(HistoricParameters settings, List<Execution> executions) { """ <p>newInstance.</p> @param settings a {@link com.greenpepper.confluence.macros.historic.HistoricParameters} object. @param executions a {@link java.util.List} object. @return a {@link com.greenpepper....
java
public static AbstractChartBuilder newInstance(HistoricParameters settings, List<Execution> executions) { return new LinearExecutionChartBuilder(settings, executions); }
[ "public", "static", "AbstractChartBuilder", "newInstance", "(", "HistoricParameters", "settings", ",", "List", "<", "Execution", ">", "executions", ")", "{", "return", "new", "LinearExecutionChartBuilder", "(", "settings", ",", "executions", ")", ";", "}" ]
<p>newInstance.</p> @param settings a {@link com.greenpepper.confluence.macros.historic.HistoricParameters} object. @param executions a {@link java.util.List} object. @return a {@link com.greenpepper.confluence.macros.historic.AbstractChartBuilder} object.
[ "<p", ">", "newInstance", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/historic/LinearExecutionChartBuilder.java#L70-L73
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormatSymbols.java
DecimalFormatSymbols.setPatternForCurrencySpacing
public void setPatternForCurrencySpacing(int itemType, boolean beforeCurrency, String pattern) { """ <strong>[icu]</strong> Sets the indicated currency spacing pattern or value. See {@link #getPatternForCurrencySpacing} for more information. <p>Values for currency match and surrounding match must be {@link an...
java
public void setPatternForCurrencySpacing(int itemType, boolean beforeCurrency, String pattern) { if (itemType < CURRENCY_SPC_CURRENCY_MATCH || itemType > CURRENCY_SPC_INSERT ) { throw new IllegalArgumentException("unknown currency spacing: " + itemType); } if (beforeCurre...
[ "public", "void", "setPatternForCurrencySpacing", "(", "int", "itemType", ",", "boolean", "beforeCurrency", ",", "String", "pattern", ")", "{", "if", "(", "itemType", "<", "CURRENCY_SPC_CURRENCY_MATCH", "||", "itemType", ">", "CURRENCY_SPC_INSERT", ")", "{", "throw"...
<strong>[icu]</strong> Sets the indicated currency spacing pattern or value. See {@link #getPatternForCurrencySpacing} for more information. <p>Values for currency match and surrounding match must be {@link android.icu.text.UnicodeSet} patterns. Values for insert can be any string. <p><strong>Note:</strong> ICU4J doe...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Sets", "the", "indicated", "currency", "spacing", "pattern", "or", "value", ".", "See", "{", "@link", "#getPatternForCurrencySpacing", "}", "for", "more", "information", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormatSymbols.java#L1006-L1016
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/json/MapExtractor.java
MapExtractor.setObjectValue
public Object setObjectValue(StringToObjectConverter pConverter, Object pMap, String pKey, Object pValue) throws IllegalAccessException, InvocationTargetException { """ Set the value within a map, where the attribute is taken as key into the map. @param pConverter the global converter in order to be...
java
public Object setObjectValue(StringToObjectConverter pConverter, Object pMap, String pKey, Object pValue) throws IllegalAccessException, InvocationTargetException { Map<Object,Object> map = (Map<Object,Object>) pMap; Object oldValue = null; Object oldKey = pKey; for (Map.Entr...
[ "public", "Object", "setObjectValue", "(", "StringToObjectConverter", "pConverter", ",", "Object", "pMap", ",", "String", "pKey", ",", "Object", "pValue", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "Map", "<", "Object", ",", "Obj...
Set the value within a map, where the attribute is taken as key into the map. @param pConverter the global converter in order to be able do dispatch for serializing inner data types @param pMap map on which to set the value @param pKey key in the map where to put the value @param pValue the new value to set @return th...
[ "Set", "the", "value", "within", "a", "map", "where", "the", "attribute", "is", "taken", "as", "key", "into", "the", "map", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/MapExtractor.java#L118-L139
casmi/casmi
src/main/java/casmi/graphics/Graphics.java
Graphics.setLightAttenuation
public void setLightAttenuation(int i, float constant, float liner, float quadratic) { """ Set attenuation rates for point lights, spot lights, and ambient lights. """ float c[] = { constant }; float l[] = { liner }; float q[] = { quadratic }; gl.glEnable(GL2.GL_LIGHTING); gl.glEnable(GL2.GL_LIG...
java
public void setLightAttenuation(int i, float constant, float liner, float quadratic) { float c[] = { constant }; float l[] = { liner }; float q[] = { quadratic }; gl.glEnable(GL2.GL_LIGHTING); gl.glEnable(GL2.GL_LIGHT0 + i); gl.glLightfv(GL2.GL_LIGHT0 + i, GL2.GL_CONSTANT_ATTENUATION, c, 0); gl.glL...
[ "public", "void", "setLightAttenuation", "(", "int", "i", ",", "float", "constant", ",", "float", "liner", ",", "float", "quadratic", ")", "{", "float", "c", "[", "]", "=", "{", "constant", "}", ";", "float", "l", "[", "]", "=", "{", "liner", "}", ...
Set attenuation rates for point lights, spot lights, and ambient lights.
[ "Set", "attenuation", "rates", "for", "point", "lights", "spot", "lights", "and", "ambient", "lights", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/Graphics.java#L613-L622
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java
Interpolate1D_F32.bisectionSearch
protected void bisectionSearch(float val, int lowerLimit, int upperLimit) { """ Searches the x array by bisecting it. This takes advantage of the data being monotonic. This finds a center index which has the following property: x[center] &le; val &lt; x[center+1] From that it selects index0 which is center - ...
java
protected void bisectionSearch(float val, int lowerLimit, int upperLimit) { while (upperLimit - lowerLimit > 1) { int middle = (upperLimit + lowerLimit) / 2; if (val >= x[middle] && ascend) { lowerLimit = middle; } else { upperLimit = middle; } } // decide if it should hunt or locate next tim...
[ "protected", "void", "bisectionSearch", "(", "float", "val", ",", "int", "lowerLimit", ",", "int", "upperLimit", ")", "{", "while", "(", "upperLimit", "-", "lowerLimit", ">", "1", ")", "{", "int", "middle", "=", "(", "upperLimit", "+", "lowerLimit", ")", ...
Searches the x array by bisecting it. This takes advantage of the data being monotonic. This finds a center index which has the following property: x[center] &le; val &lt; x[center+1] From that it selects index0 which is center - M/2. @param val The value that is to be interpolated. @param lowerLimit Lower limit fo...
[ "Searches", "the", "x", "array", "by", "bisecting", "it", ".", "This", "takes", "advantage", "of", "the", "data", "being", "monotonic", ".", "This", "finds", "a", "center", "index", "which", "has", "the", "following", "property", ":", "x", "[", "center", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java#L200-L221
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ReadablePartialConverter.java
ReadablePartialConverter.getChronology
public Chronology getChronology(Object object, DateTimeZone zone) { """ Gets the chronology, which is taken from the ReadablePartial. @param object the ReadablePartial to convert, must not be null @param zone the specified zone to use, null means default zone @return the chronology, never null """ ...
java
public Chronology getChronology(Object object, DateTimeZone zone) { return getChronology(object, (Chronology) null).withZone(zone); }
[ "public", "Chronology", "getChronology", "(", "Object", "object", ",", "DateTimeZone", "zone", ")", "{", "return", "getChronology", "(", "object", ",", "(", "Chronology", ")", "null", ")", ".", "withZone", "(", "zone", ")", ";", "}" ]
Gets the chronology, which is taken from the ReadablePartial. @param object the ReadablePartial to convert, must not be null @param zone the specified zone to use, null means default zone @return the chronology, never null
[ "Gets", "the", "chronology", "which", "is", "taken", "from", "the", "ReadablePartial", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ReadablePartialConverter.java#L52-L54
scalecube/socketio
src/main/java/io/scalecube/socketio/pipeline/ResourceHandler.java
ResourceHandler.sendError
private void sendError(ChannelHandlerContext ctx, HttpResponseStatus status) { """ Sends an Error response with status message @param ctx channel context @param status status """ HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status); response.headers().set(HttpHeaderNames.CO...
java
private void sendError(ChannelHandlerContext ctx, HttpResponseStatus status) { HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status); response.headers().set(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=UTF-8"); ByteBuf content = Unpooled.copiedBuffer("Failure: " + status.toStri...
[ "private", "void", "sendError", "(", "ChannelHandlerContext", "ctx", ",", "HttpResponseStatus", "status", ")", "{", "HttpResponse", "response", "=", "new", "DefaultHttpResponse", "(", "HttpVersion", ".", "HTTP_1_1", ",", "status", ")", ";", "response", ".", "heade...
Sends an Error response with status message @param ctx channel context @param status status
[ "Sends", "an", "Error", "response", "with", "status", "message" ]
train
https://github.com/scalecube/socketio/blob/bad28fe7a132320750173e7cb71ad6d3688fb626/src/main/java/io/scalecube/socketio/pipeline/ResourceHandler.java#L168-L176
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java
ExpressRouteCrossConnectionsInner.beginCreateOrUpdateAsync
public Observable<ExpressRouteCrossConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { """ Update the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnection...
java
public Observable<ExpressRouteCrossConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1<ServiceResponse<E...
[ "public", "Observable", "<", "ExpressRouteCrossConnectionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "ExpressRouteCrossConnectionInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceRe...
Update the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param parameters Parameters supplied to the update express route crossConnection operation. @throws IllegalArgumentException thrown if para...
[ "Update", "the", "specified", "ExpressRouteCrossConnection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java#L546-L553
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
VarianceOfVolume.computeVolumes
private void computeVolumes(KNNQuery<O> knnq, int dim, DBIDs ids, WritableDoubleDataStore vols) { """ Compute volumes @param knnq KNN query @param dim Data dimensionality @param ids IDs to process @param vols Volume storage """ FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Volume", ids....
java
private void computeVolumes(KNNQuery<O> knnq, int dim, DBIDs ids, WritableDoubleDataStore vols) { FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Volume", ids.size(), LOG) : null; double scaleconst = MathUtil.SQRTPI * FastMath.pow(GammaDistribution.gamma(1 + dim * .5), -1. / dim); boolean warned...
[ "private", "void", "computeVolumes", "(", "KNNQuery", "<", "O", ">", "knnq", ",", "int", "dim", ",", "DBIDs", "ids", ",", "WritableDoubleDataStore", "vols", ")", "{", "FiniteProgress", "prog", "=", "LOG", ".", "isVerbose", "(", ")", "?", "new", "FiniteProg...
Compute volumes @param knnq KNN query @param dim Data dimensionality @param ids IDs to process @param vols Volume storage
[ "Compute", "volumes" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java#L158-L179
azkaban/azkaban
azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
ProcessJob.assignUserFileOwnership
private void assignUserFileOwnership(final String effectiveUser, final String fileName) throws Exception { """ Changes permissions on file/directory so that the file/directory is owned by the user and the group remains the azkaban service account name. Leverages execute-as-user with "root" as the user to...
java
private void assignUserFileOwnership(final String effectiveUser, final String fileName) throws Exception { final ExecuteAsUser executeAsUser = new ExecuteAsUser( this.getSysProps().getString(AZKABAN_SERVER_NATIVE_LIB_FOLDER)); final String groupName = this.getSysProps().getString(AZKABAN_SERVER_GR...
[ "private", "void", "assignUserFileOwnership", "(", "final", "String", "effectiveUser", ",", "final", "String", "fileName", ")", "throws", "Exception", "{", "final", "ExecuteAsUser", "executeAsUser", "=", "new", "ExecuteAsUser", "(", "this", ".", "getSysProps", "(", ...
Changes permissions on file/directory so that the file/directory is owned by the user and the group remains the azkaban service account name. Leverages execute-as-user with "root" as the user to run the command. @param effectiveUser user/proxy user running the job @param fileName the name of the file whose permission...
[ "Changes", "permissions", "on", "file", "/", "directory", "so", "that", "the", "file", "/", "directory", "is", "owned", "by", "the", "user", "and", "the", "group", "remains", "the", "azkaban", "service", "account", "name", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java#L398-L411
playn/playn
scene/src/playn/scene/LayerUtil.java
LayerUtil.layerToParent
public static Point layerToParent(Layer layer, Layer parent, float x, float y) { """ Converts the supplied point from coordinates relative to the specified child layer to coordinates relative to the specified parent layer. """ Point into = new Point(x, y); return layerToParent(layer, parent, into, int...
java
public static Point layerToParent(Layer layer, Layer parent, float x, float y) { Point into = new Point(x, y); return layerToParent(layer, parent, into, into); }
[ "public", "static", "Point", "layerToParent", "(", "Layer", "layer", ",", "Layer", "parent", ",", "float", "x", ",", "float", "y", ")", "{", "Point", "into", "=", "new", "Point", "(", "x", ",", "y", ")", ";", "return", "layerToParent", "(", "layer", ...
Converts the supplied point from coordinates relative to the specified child layer to coordinates relative to the specified parent layer.
[ "Converts", "the", "supplied", "point", "from", "coordinates", "relative", "to", "the", "specified", "child", "layer", "to", "coordinates", "relative", "to", "the", "specified", "parent", "layer", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L74-L77
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.sendTransaction
public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalResponse> proposalResponses, User userContext) { """ Send transaction to one of the orderers on the channel using a specific user context. @param proposalResponses The proposal responses to be sent to the orderer. @param userContext ...
java
public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalResponse> proposalResponses, User userContext) { return sendTransaction(proposalResponses, getOrderers(), userContext); }
[ "public", "CompletableFuture", "<", "TransactionEvent", ">", "sendTransaction", "(", "Collection", "<", "ProposalResponse", ">", "proposalResponses", ",", "User", "userContext", ")", "{", "return", "sendTransaction", "(", "proposalResponses", ",", "getOrderers", "(", ...
Send transaction to one of the orderers on the channel using a specific user context. @param proposalResponses The proposal responses to be sent to the orderer. @param userContext The usercontext used for signing transaction. @return a future allowing access to the result of the transaction invocation once compl...
[ "Send", "transaction", "to", "one", "of", "the", "orderers", "on", "the", "channel", "using", "a", "specific", "user", "context", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4631-L4635
h2oai/h2o-3
h2o-core/src/main/java/water/jdbc/SQLManager.java
SQLManager.initializeDatabaseDriver
static void initializeDatabaseDriver(String databaseType) { """ Initializes database driver for databases with JDBC driver version lower than 4.0 @param databaseType Name of target database from JDBC connection string """ String driverClass = System.getProperty(JDBC_DRIVER_CLASS_KEY_PREFIX + databaseTyp...
java
static void initializeDatabaseDriver(String databaseType) { String driverClass = System.getProperty(JDBC_DRIVER_CLASS_KEY_PREFIX + databaseType); if (driverClass != null) { Log.debug("Loading " + driverClass + " to initialize database of type " + databaseType); try { Class.forName(driverClas...
[ "static", "void", "initializeDatabaseDriver", "(", "String", "databaseType", ")", "{", "String", "driverClass", "=", "System", ".", "getProperty", "(", "JDBC_DRIVER_CLASS_KEY_PREFIX", "+", "databaseType", ")", ";", "if", "(", "driverClass", "!=", "null", ")", "{",...
Initializes database driver for databases with JDBC driver version lower than 4.0 @param databaseType Name of target database from JDBC connection string
[ "Initializes", "database", "driver", "for", "databases", "with", "JDBC", "driver", "version", "lower", "than", "4", ".", "0" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/jdbc/SQLManager.java#L497-L528
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java
RSAUtils.verifySignature
public static boolean verifySignature(RSAPublicKey key, byte[] message, byte[] signature) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException { """ Verify a signature with RSA public key, using {@link #DEFAULT_SIGNATURE_ALGORITHM}. @param key @param message @param signature @...
java
public static boolean verifySignature(RSAPublicKey key, byte[] message, byte[] signature) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException { return verifySignature(key, message, signature, DEFAULT_SIGNATURE_ALGORITHM); }
[ "public", "static", "boolean", "verifySignature", "(", "RSAPublicKey", "key", ",", "byte", "[", "]", "message", ",", "byte", "[", "]", "signature", ")", "throws", "InvalidKeyException", ",", "NoSuchAlgorithmException", ",", "SignatureException", "{", "return", "ve...
Verify a signature with RSA public key, using {@link #DEFAULT_SIGNATURE_ALGORITHM}. @param key @param message @param signature @return @throws InvalidKeyException @throws NoSuchAlgorithmException @throws SignatureException
[ "Verify", "a", "signature", "with", "RSA", "public", "key", "using", "{", "@link", "#DEFAULT_SIGNATURE_ALGORITHM", "}", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java#L309-L312
aws/aws-sdk-java
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/CreateTaskSetRequest.java
CreateTaskSetRequest.getServiceRegistries
public java.util.List<ServiceRegistry> getServiceRegistries() { """ <p> The details of the service discovery registries to assign to this task set. For more information, see <a href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>. </p> @return The det...
java
public java.util.List<ServiceRegistry> getServiceRegistries() { if (serviceRegistries == null) { serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>(); } return serviceRegistries; }
[ "public", "java", ".", "util", ".", "List", "<", "ServiceRegistry", ">", "getServiceRegistries", "(", ")", "{", "if", "(", "serviceRegistries", "==", "null", ")", "{", "serviceRegistries", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkIntern...
<p> The details of the service discovery registries to assign to this task set. For more information, see <a href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>. </p> @return The details of the service discovery registries to assign to this task set. For more ...
[ "<p", ">", "The", "details", "of", "the", "service", "discovery", "registries", "to", "assign", "to", "this", "task", "set", ".", "For", "more", "information", "see", "<a", "href", "=", "http", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/CreateTaskSetRequest.java#L393-L398
VoltDB/voltdb
src/frontend/org/voltdb/importer/ChannelDistributer.java
ChannelDistributer.loggedDistributerException
static DistributerException loggedDistributerException(Throwable cause, String format, Object...args) { """ Boiler plate method to log an error message and wrap, and return a {@link DistributerException} around the message and cause @param cause fault origin {@link Throwable} @param format a {@link String#for...
java
static DistributerException loggedDistributerException(Throwable cause, String format, Object...args) { Optional<DistributerException> causeFor = DistributerException.isCauseFor(cause); if (causeFor.isPresent()) { return causeFor.get(); } String msg = String.format(format, ar...
[ "static", "DistributerException", "loggedDistributerException", "(", "Throwable", "cause", ",", "String", "format", ",", "Object", "...", "args", ")", "{", "Optional", "<", "DistributerException", ">", "causeFor", "=", "DistributerException", ".", "isCauseFor", "(", ...
Boiler plate method to log an error message and wrap, and return a {@link DistributerException} around the message and cause @param cause fault origin {@link Throwable} @param format a {@link String#format(String, Object...) compliant format string @param args formatter arguments @return a {@link DistributerException}
[ "Boiler", "plate", "method", "to", "log", "an", "error", "message", "and", "wrap", "and", "return", "a", "{", "@link", "DistributerException", "}", "around", "the", "message", "and", "cause" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ChannelDistributer.java#L129-L142
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.orMoreEqual
public ZealotKhala orMoreEqual(String field, Object value) { """ 生成带" OR "前缀大于等于查询的SQL片段. @param field 数据库字段 @param value 值 @return ZealotKhala实例 """ return this.doNormal(ZealotConst.OR_PREFIX, field, value, ZealotConst.GTE_SUFFIX, true); }
java
public ZealotKhala orMoreEqual(String field, Object value) { return this.doNormal(ZealotConst.OR_PREFIX, field, value, ZealotConst.GTE_SUFFIX, true); }
[ "public", "ZealotKhala", "orMoreEqual", "(", "String", "field", ",", "Object", "value", ")", "{", "return", "this", ".", "doNormal", "(", "ZealotConst", ".", "OR_PREFIX", ",", "field", ",", "value", ",", "ZealotConst", ".", "GTE_SUFFIX", ",", "true", ")", ...
生成带" OR "前缀大于等于查询的SQL片段. @param field 数据库字段 @param value 值 @return ZealotKhala实例
[ "生成带", "OR", "前缀大于等于查询的SQL片段", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L816-L818
wisdom-framework/wisdom
core/wisdom-ipojo-module/src/main/java/org/wisdom/ipojo/module/WisdomServiceVisitor.java
WisdomServiceVisitor.visitEnd
public void visitEnd() { """ End of the visit. Declare the "component", "provides" and "instance" elements. @see org.objectweb.asm.AnnotationVisitor#visitEnd() """ String classname = workbench.getType().getClassName(); component.addAttribute(new Attribute("classname", classname)); ...
java
public void visitEnd() { String classname = workbench.getType().getClassName(); component.addAttribute(new Attribute("classname", classname)); // Generates the provides attribute. component.addElement(ElementHelper.getProvidesElement(specifications)); if (workbench.getRoot() =...
[ "public", "void", "visitEnd", "(", ")", "{", "String", "classname", "=", "workbench", ".", "getType", "(", ")", ".", "getClassName", "(", ")", ";", "component", ".", "addAttribute", "(", "new", "Attribute", "(", "\"classname\"", ",", "classname", ")", ")",...
End of the visit. Declare the "component", "provides" and "instance" elements. @see org.objectweb.asm.AnnotationVisitor#visitEnd()
[ "End", "of", "the", "visit", ".", "Declare", "the", "component", "provides", "and", "instance", "elements", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-ipojo-module/src/main/java/org/wisdom/ipojo/module/WisdomServiceVisitor.java#L70-L87
real-logic/agrona
agrona/src/main/java/org/agrona/AsciiEncoding.java
AsciiEncoding.parseIntAscii
public static int parseIntAscii(final CharSequence cs, final int index, final int length) { """ Parse an ASCII encoded int from a {@link CharSequence}. @param cs to parse. @param index at which the number begins. @param length of the encoded number in characters. @return the parsed value. """ ...
java
public static int parseIntAscii(final CharSequence cs, final int index, final int length) { final int endExclusive = index + length; final int first = cs.charAt(index); int i = index; if (first == MINUS_SIGN) { i++; } int tally = 0; for (...
[ "public", "static", "int", "parseIntAscii", "(", "final", "CharSequence", "cs", ",", "final", "int", "index", ",", "final", "int", "length", ")", "{", "final", "int", "endExclusive", "=", "index", "+", "length", ";", "final", "int", "first", "=", "cs", "...
Parse an ASCII encoded int from a {@link CharSequence}. @param cs to parse. @param index at which the number begins. @param length of the encoded number in characters. @return the parsed value.
[ "Parse", "an", "ASCII", "encoded", "int", "from", "a", "{", "@link", "CharSequence", "}", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/AsciiEncoding.java#L121-L144
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/Manager.java
Manager.getDatabase
@InterfaceAudience.Private public Database getDatabase(String name, boolean mustExist) { """ Instantiates a database but doesn't open the file yet. in CBLManager.m - (CBLDatabase*) _databaseNamed: (NSString*)name mustExist: (BOOL)mustExist error: (NSError**)outError @exclude """ synchronized...
java
@InterfaceAudience.Private public Database getDatabase(String name, boolean mustExist) { synchronized (lockDatabases) { if (options.isReadOnly()) mustExist = true; Database db = databases.get(name); if (db == null) { if (!isValidDatabaseNam...
[ "@", "InterfaceAudience", ".", "Private", "public", "Database", "getDatabase", "(", "String", "name", ",", "boolean", "mustExist", ")", "{", "synchronized", "(", "lockDatabases", ")", "{", "if", "(", "options", ".", "isReadOnly", "(", ")", ")", "mustExist", ...
Instantiates a database but doesn't open the file yet. in CBLManager.m - (CBLDatabase*) _databaseNamed: (NSString*)name mustExist: (BOOL)mustExist error: (NSError**)outError @exclude
[ "Instantiates", "a", "database", "but", "doesn", "t", "open", "the", "file", "yet", ".", "in", "CBLManager", ".", "m", "-", "(", "CBLDatabase", "*", ")", "_databaseNamed", ":", "(", "NSString", "*", ")", "name", "mustExist", ":", "(", "BOOL", ")", "mus...
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/Manager.java#L558-L581
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.removeAlias
@Override public void removeAlias(Object alias, boolean askPermission, boolean coordinate) { """ Removes an alias from the cache mapping. @param alias the alias assoicated with cache id @param askPermission True implies that execution must ask the coordinating CacheUnit for permission (No effect on CoreCac...
java
@Override public void removeAlias(Object alias, boolean askPermission, boolean coordinate) { final String methodName = "removeAlias()"; if (this.featureSupport.isAliasSupported()) { if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR b...
[ "@", "Override", "public", "void", "removeAlias", "(", "Object", "alias", ",", "boolean", "askPermission", ",", "boolean", "coordinate", ")", "{", "final", "String", "methodName", "=", "\"removeAlias()\"", ";", "if", "(", "this", ".", "featureSupport", ".", "i...
Removes an alias from the cache mapping. @param alias the alias assoicated with cache id @param askPermission True implies that execution must ask the coordinating CacheUnit for permission (No effect on CoreCache). @param coordinate Indicates that the value should be set in other caches caching this value. (No effect ...
[ "Removes", "an", "alias", "from", "the", "cache", "mapping", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L715-L726
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/IconCache.java
IconCache.put
public BufferedImage put(IconRow iconRow, BufferedImage image) { """ Cache the icon image for the icon row @param iconRow icon row @param image icon image @return previous cached icon image or null """ return put(iconRow.getId(), image); }
java
public BufferedImage put(IconRow iconRow, BufferedImage image) { return put(iconRow.getId(), image); }
[ "public", "BufferedImage", "put", "(", "IconRow", "iconRow", ",", "BufferedImage", "image", ")", "{", "return", "put", "(", "iconRow", ".", "getId", "(", ")", ",", "image", ")", ";", "}" ]
Cache the icon image for the icon row @param iconRow icon row @param image icon image @return previous cached icon image or null
[ "Cache", "the", "icon", "image", "for", "the", "icon", "row" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/IconCache.java#L94-L96
yegor256/takes
src/main/java/org/takes/rs/RsFluent.java
RsFluent.withHeader
public RsFluent withHeader(final CharSequence key, final CharSequence value) { """ With this header. @param key Key @param value Value @return New fluent response """ return new RsFluent(new RsWithHeader(this, key, value)); }
java
public RsFluent withHeader(final CharSequence key, final CharSequence value) { return new RsFluent(new RsWithHeader(this, key, value)); }
[ "public", "RsFluent", "withHeader", "(", "final", "CharSequence", "key", ",", "final", "CharSequence", "value", ")", "{", "return", "new", "RsFluent", "(", "new", "RsWithHeader", "(", "this", ",", "key", ",", "value", ")", ")", ";", "}" ]
With this header. @param key Key @param value Value @return New fluent response
[ "With", "this", "header", "." ]
train
https://github.com/yegor256/takes/blob/a4f4d939c8f8e0af190025716ad7f22b7de40e70/src/main/java/org/takes/rs/RsFluent.java#L81-L84
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java
ChineseCalendar.handleGetMonthLength
protected int handleGetMonthLength(int extendedYear, int month) { """ Override Calendar method to return the number of days in the given extended year and month. <p>Note: This method also reads the IS_LEAP_MONTH field to determine whether or not the given month is a leap month. """ int thisStart =...
java
protected int handleGetMonthLength(int extendedYear, int month) { int thisStart = handleComputeMonthStart(extendedYear, month, true) - EPOCH_JULIAN_DAY + 1; // Julian day -> local days int nextStart = newMoonNear(thisStart + SYNODIC_GAP, true); return nextStart - thisStart; }
[ "protected", "int", "handleGetMonthLength", "(", "int", "extendedYear", ",", "int", "month", ")", "{", "int", "thisStart", "=", "handleComputeMonthStart", "(", "extendedYear", ",", "month", ",", "true", ")", "-", "EPOCH_JULIAN_DAY", "+", "1", ";", "// Julian day...
Override Calendar method to return the number of days in the given extended year and month. <p>Note: This method also reads the IS_LEAP_MONTH field to determine whether or not the given month is a leap month.
[ "Override", "Calendar", "method", "to", "return", "the", "number", "of", "days", "in", "the", "given", "extended", "year", "and", "month", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L451-L456
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/GeomFactory3dfx.java
GeomFactory3dfx.newPoint
@SuppressWarnings("static-method") public Point3dfx newPoint(DoubleProperty x, DoubleProperty y, DoubleProperty z) { """ Create a point with properties. @param x the x property. @param y the y property. @param z the z property. @return the vector. """ return new Point3dfx(x, y, z); }
java
@SuppressWarnings("static-method") public Point3dfx newPoint(DoubleProperty x, DoubleProperty y, DoubleProperty z) { return new Point3dfx(x, y, z); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "Point3dfx", "newPoint", "(", "DoubleProperty", "x", ",", "DoubleProperty", "y", ",", "DoubleProperty", "z", ")", "{", "return", "new", "Point3dfx", "(", "x", ",", "y", ",", "z", ")", ";", "...
Create a point with properties. @param x the x property. @param y the y property. @param z the z property. @return the vector.
[ "Create", "a", "point", "with", "properties", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/GeomFactory3dfx.java#L116-L119
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.beginGetFlowLogStatusAsync
public Observable<FlowLogInformationInner> beginGetFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { """ Queries status of flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The na...
java
public Observable<FlowLogInformationInner> beginGetFlowLogStatusAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) { return beginGetFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).map(new Func1<ServiceResponse<FlowLogInformationInne...
[ "public", "Observable", "<", "FlowLogInformationInner", ">", "beginGetFlowLogStatusAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "targetResourceId", ")", "{", "return", "beginGetFlowLogStatusWithServiceResponseAsync", "(", "re...
Queries status of flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param targetResourceId The target resource where getting the flow logging status. @throws IllegalArgumentException thrown if ...
[ "Queries", "status", "of", "flow", "log", "on", "a", "specified", "resource", "." ]
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#L2073-L2080
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncCAS
@Override public <T> OperationFuture<CASResponse> asyncCAS(String key, long casId, int exp, T value, Transcoder<T> tc) { """ Asynchronous CAS operation. @param <T> @param key the key @param casId the CAS identifier (from a gets operation) @param exp the expiration of this object @param value the new val...
java
@Override public <T> OperationFuture<CASResponse> asyncCAS(String key, long casId, int exp, T value, Transcoder<T> tc) { CachedData co = tc.encode(value); final CountDownLatch latch = new CountDownLatch(1); final OperationFuture<CASResponse> rv = new OperationFuture<CASResponse>(key, latch, operat...
[ "@", "Override", "public", "<", "T", ">", "OperationFuture", "<", "CASResponse", ">", "asyncCAS", "(", "String", "key", ",", "long", "casId", ",", "int", "exp", ",", "T", "value", ",", "Transcoder", "<", "T", ">", "tc", ")", "{", "CachedData", "co", ...
Asynchronous CAS operation. @param <T> @param key the key @param casId the CAS identifier (from a gets operation) @param exp the expiration of this object @param value the new value @param tc the transcoder to serialize and unserialize the value @return a future that will indicate the status of the CAS @throws Illegal...
[ "Asynchronous", "CAS", "operation", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L620-L655
googlegenomics/dataflow-java
src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java
LikelihoodFn.pGenotype
private static double pGenotype(Genotype g, double refProb) { """ Compute the probability of a genotype given the reference allele probability. """ switch(g) { case REF_HOMOZYGOUS: return refProb * refProb; case HETEROZYGOUS: return refProb * (1.0 - refProb); case NONREF_H...
java
private static double pGenotype(Genotype g, double refProb) { switch(g) { case REF_HOMOZYGOUS: return refProb * refProb; case HETEROZYGOUS: return refProb * (1.0 - refProb); case NONREF_HOMOZYGOUS: return (1.0 - refProb) * (1.0 - refProb); default: throw new I...
[ "private", "static", "double", "pGenotype", "(", "Genotype", "g", ",", "double", "refProb", ")", "{", "switch", "(", "g", ")", "{", "case", "REF_HOMOZYGOUS", ":", "return", "refProb", "*", "refProb", ";", "case", "HETEROZYGOUS", ":", "return", "refProb", "...
Compute the probability of a genotype given the reference allele probability.
[ "Compute", "the", "probability", "of", "a", "genotype", "given", "the", "reference", "allele", "probability", "." ]
train
https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/verifybamid/LikelihoodFn.java#L105-L116
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.logv
public void logv(Level level, String format, Object param1) { """ Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. @param level the level @param format the message format string @param param1 the sole parameter """ if (isEnabled(level)) { ...
java
public void logv(Level level, String format, Object param1) { if (isEnabled(level)) { doLog(level, FQCN, format, new Object[] { param1 }, null); } }
[ "public", "void", "logv", "(", "Level", "level", ",", "String", "format", ",", "Object", "param1", ")", "{", "if", "(", "isEnabled", "(", "level", ")", ")", "{", "doLog", "(", "level", ",", "FQCN", ",", "format", ",", "new", "Object", "[", "]", "{"...
Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. @param level the level @param format the message format string @param param1 the sole parameter
[ "Issue", "a", "log", "message", "at", "the", "given", "log", "level", "using", "{", "@link", "java", ".", "text", ".", "MessageFormat", "}", "-", "style", "formatting", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L2124-L2128
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.disableAsync
public Observable<Void> disableAsync(String resourceGroupName, String workflowName) { """ Disables a workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse}...
java
public Observable<Void> disableAsync(String resourceGroupName, String workflowName) { return disableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return...
[ "public", "Observable", "<", "Void", ">", "disableAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ")", "{", "return", "disableWithServiceResponseAsync", "(", "resourceGroupName", ",", "workflowName", ")", ".", "map", "(", "new", "Func1", ...
Disables a workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Disables", "a", "workflow", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L992-L999
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DirectUpdateDoublesSketchR.java
DirectUpdateDoublesSketchR.checkDirectMemCapacity
static void checkDirectMemCapacity(final int k, final long n, final long memCapBytes) { """ Checks the validity of the direct memory capacity assuming n, k. @param k the given value of k @param n the given value of n @param memCapBytes the current memory capacity in bytes """ final int reqBufBytes = get...
java
static void checkDirectMemCapacity(final int k, final long n, final long memCapBytes) { final int reqBufBytes = getUpdatableStorageBytes(k, n); if (memCapBytes < reqBufBytes) { throw new SketchesArgumentException("Possible corruption: Memory capacity too small: " + memCapBytes + " < " + reqBufB...
[ "static", "void", "checkDirectMemCapacity", "(", "final", "int", "k", ",", "final", "long", "n", ",", "final", "long", "memCapBytes", ")", "{", "final", "int", "reqBufBytes", "=", "getUpdatableStorageBytes", "(", "k", ",", "n", ")", ";", "if", "(", "memCap...
Checks the validity of the direct memory capacity assuming n, k. @param k the given value of k @param n the given value of n @param memCapBytes the current memory capacity in bytes
[ "Checks", "the", "validity", "of", "the", "direct", "memory", "capacity", "assuming", "n", "k", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DirectUpdateDoublesSketchR.java#L193-L200
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.grantResourcePermission
public Map<String, Map<String, List<String>>> grantResourcePermission(String subjectid, String resourcePath, EnumSet<App.AllowedMethods> permission, boolean allowGuestAccess) { """ Grants a permission to a subject that allows them to call the specified HTTP methods on a given resource. @param subjectid subject...
java
public Map<String, Map<String, List<String>>> grantResourcePermission(String subjectid, String resourcePath, EnumSet<App.AllowedMethods> permission, boolean allowGuestAccess) { if (StringUtils.isBlank(subjectid) || StringUtils.isBlank(resourcePath) || permission == null) { return Collections.emptyMap(); } i...
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "grantResourcePermission", "(", "String", "subjectid", ",", "String", "resourcePath", ",", "EnumSet", "<", "App", ".", "AllowedMethods", ">", "permission", ...
Grants a permission to a subject that allows them to call the specified HTTP methods on a given resource. @param subjectid subject id (user id) @param resourcePath resource path or object type @param permission a set of HTTP methods @param allowGuestAccess if true - all unauthenticated requests will go through, 'false'...
[ "Grants", "a", "permission", "to", "a", "subject", "that", "allows", "them", "to", "call", "the", "specified", "HTTP", "methods", "on", "a", "given", "resource", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1444-L1455
mangstadt/biweekly
src/main/java/biweekly/component/ICalComponent.java
ICalComponent.setComponent
public <T extends ICalComponent> List<T> setComponent(Class<T> clazz, T component) { """ Replaces all sub-components of a given class with the given component. If the component instance is null, then all instances of that component will be removed. @param clazz the component's class @param component the compon...
java
public <T extends ICalComponent> List<T> setComponent(Class<T> clazz, T component) { List<ICalComponent> replaced = components.replace(clazz, component); return castList(replaced, clazz); }
[ "public", "<", "T", "extends", "ICalComponent", ">", "List", "<", "T", ">", "setComponent", "(", "Class", "<", "T", ">", "clazz", ",", "T", "component", ")", "{", "List", "<", "ICalComponent", ">", "replaced", "=", "components", ".", "replace", "(", "c...
Replaces all sub-components of a given class with the given component. If the component instance is null, then all instances of that component will be removed. @param clazz the component's class @param component the component or null to remove all components of the given class @param <T> the component class @return the...
[ "Replaces", "all", "sub", "-", "components", "of", "a", "given", "class", "with", "the", "given", "component", ".", "If", "the", "component", "instance", "is", "null", "then", "all", "instances", "of", "that", "component", "will", "be", "removed", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/ICalComponent.java#L345-L348
Nexmo/nexmo-java
src/main/java/com/nexmo/client/insight/StandardInsightRequest.java
StandardInsightRequest.withNumberAndCountry
public static StandardInsightRequest withNumberAndCountry(String number, String country) { """ Construct a StandardInsightRequest with a number and country. @param number A single phone number that you need insight about in national or international format. @param country If a number does not have a country c...
java
public static StandardInsightRequest withNumberAndCountry(String number, String country) { return new Builder(number).country(country).build(); }
[ "public", "static", "StandardInsightRequest", "withNumberAndCountry", "(", "String", "number", ",", "String", "country", ")", "{", "return", "new", "Builder", "(", "number", ")", ".", "country", "(", "country", ")", ".", "build", "(", ")", ";", "}" ]
Construct a StandardInsightRequest with a number and country. @param number A single phone number that you need insight about in national or international format. @param country If a number does not have a country code or it is uncertain, set the two-character country code. @return A new {@link StandardInsightReques...
[ "Construct", "a", "StandardInsightRequest", "with", "a", "number", "and", "country", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/insight/StandardInsightRequest.java#L58-L60
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setBaselineFinishText
public void setBaselineFinishText(int baselineNumber, String value) { """ Sets the baseline finish text value. @param baselineNumber baseline number @param value baseline finish text value """ set(selectField(TaskFieldLists.BASELINE_FINISHES, baselineNumber), value); }
java
public void setBaselineFinishText(int baselineNumber, String value) { set(selectField(TaskFieldLists.BASELINE_FINISHES, baselineNumber), value); }
[ "public", "void", "setBaselineFinishText", "(", "int", "baselineNumber", ",", "String", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "BASELINE_FINISHES", ",", "baselineNumber", ")", ",", "value", ")", ";", "}" ]
Sets the baseline finish text value. @param baselineNumber baseline number @param value baseline finish text value
[ "Sets", "the", "baseline", "finish", "text", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4141-L4144
graphhopper/graphhopper
core/src/main/java/com/graphhopper/util/GHUtility.java
GHUtility.getEdgeKey
public static int getEdgeKey(Graph graph, int edgeId, int node, boolean reverse) { """ Returns the edge key for a given edge id and adjacent node. This is needed in a few places where the base node is not known. """ EdgeIteratorState edgeIteratorState = graph.getEdgeIteratorState(edgeId, node); ...
java
public static int getEdgeKey(Graph graph, int edgeId, int node, boolean reverse) { EdgeIteratorState edgeIteratorState = graph.getEdgeIteratorState(edgeId, node); return GHUtility.createEdgeKey(edgeIteratorState.getBaseNode(), edgeIteratorState.getAdjNode(), edgeId, reverse); }
[ "public", "static", "int", "getEdgeKey", "(", "Graph", "graph", ",", "int", "edgeId", ",", "int", "node", ",", "boolean", "reverse", ")", "{", "EdgeIteratorState", "edgeIteratorState", "=", "graph", ".", "getEdgeIteratorState", "(", "edgeId", ",", "node", ")",...
Returns the edge key for a given edge id and adjacent node. This is needed in a few places where the base node is not known.
[ "Returns", "the", "edge", "key", "for", "a", "given", "edge", "id", "and", "adjacent", "node", ".", "This", "is", "needed", "in", "a", "few", "places", "where", "the", "base", "node", "is", "not", "known", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/util/GHUtility.java#L498-L501
spockframework/spock
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java
GroovyRuntimeUtil.getAttribute
public static Object getAttribute(Object target, String name) { """ Note: This method may throw checked exceptions although it doesn't say so. """ try { return InvokerHelper.getAttribute(target, name); } catch (InvokerInvocationException e) { ExceptionUtil.sneakyThrow(e.getCause()); r...
java
public static Object getAttribute(Object target, String name) { try { return InvokerHelper.getAttribute(target, name); } catch (InvokerInvocationException e) { ExceptionUtil.sneakyThrow(e.getCause()); return null; // never reached } }
[ "public", "static", "Object", "getAttribute", "(", "Object", "target", ",", "String", "name", ")", "{", "try", "{", "return", "InvokerHelper", ".", "getAttribute", "(", "target", ",", "name", ")", ";", "}", "catch", "(", "InvokerInvocationException", "e", ")...
Note: This method may throw checked exceptions although it doesn't say so.
[ "Note", ":", "This", "method", "may", "throw", "checked", "exceptions", "although", "it", "doesn", "t", "say", "so", "." ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java#L290-L297
Grasia/phatsim
phat-agents/src/main/java/phat/agents/automaton/Automaton.java
Automaton.addTransition
public void addTransition(Automaton newTransition, boolean first) { """ Añadir transición a un estado en la lista de transiciones pendientes. La lista queda ordenada de mayor a menor prioridad. @param newTransition Estado destino de la transición @param first es true si se quiere que se ponga el primero en co...
java
public void addTransition(Automaton newTransition, boolean first) { newTransition.parent = this; if (this.pendingTransitions.isEmpty()) { this.pendingTransitions.add(newTransition); } else { int i = 0; for (Automaton ps : pendingTransitions) { ...
[ "public", "void", "addTransition", "(", "Automaton", "newTransition", ",", "boolean", "first", ")", "{", "newTransition", ".", "parent", "=", "this", ";", "if", "(", "this", ".", "pendingTransitions", ".", "isEmpty", "(", ")", ")", "{", "this", ".", "pendi...
Añadir transición a un estado en la lista de transiciones pendientes. La lista queda ordenada de mayor a menor prioridad. @param newTransition Estado destino de la transición @param first es true si se quiere que se ponga el primero en cola si varios tienen la misa prioridad (caso de pausar un estado porque te interes...
[ "Añadir", "transición", "a", "un", "estado", "en", "la", "lista", "de", "transiciones", "pendientes", ".", "La", "lista", "queda", "ordenada", "de", "mayor", "a", "menor", "prioridad", "." ]
train
https://github.com/Grasia/phatsim/blob/2d4fc8189be9730b34c8e3e1a08fb4800e01c5df/phat-agents/src/main/java/phat/agents/automaton/Automaton.java#L206-L228
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/UsersApi.java
UsersApi.deleteUser
public ApiSuccessResponse deleteUser(String dbid, Boolean keepPlaces) throws ApiException { """ Remove a user. Remove the specified user, along with their associated login, places, and DNs. This removes the [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) object and any ass...
java
public ApiSuccessResponse deleteUser(String dbid, Boolean keepPlaces) throws ApiException { ApiResponse<ApiSuccessResponse> resp = deleteUserWithHttpInfo(dbid, keepPlaces); return resp.getData(); }
[ "public", "ApiSuccessResponse", "deleteUser", "(", "String", "dbid", ",", "Boolean", "keepPlaces", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "deleteUserWithHttpInfo", "(", "dbid", ",", "keepPlaces", ")", ";", "...
Remove a user. Remove the specified user, along with their associated login, places, and DNs. This removes the [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) object and any associated [CfgAgentLogin](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgAgentLogi...
[ "Remove", "a", "user", ".", "Remove", "the", "specified", "user", "along", "with", "their", "associated", "login", "places", "and", "DNs", ".", "This", "removes", "the", "[", "CfgPerson", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", ...
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/UsersApi.java#L259-L262
nwillc/almost-functional
src/main/java/almost/functional/utils/Preconditions.java
Preconditions.checkNotNull
public static <T> T checkNotNull(final T reference, final String errorMessage) { """ Check that a reference is not null, throwing a IllegalArgumentException if it is. @param reference The reference to check @param errorMessage the message for the exception if the reference is null @param <T> the t...
java
public static <T> T checkNotNull(final T reference, final String errorMessage) { return precondition(reference, Predicates.<T>notNull(), IllegalArgumentException.class, errorMessage); }
[ "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "final", "T", "reference", ",", "final", "String", "errorMessage", ")", "{", "return", "precondition", "(", "reference", ",", "Predicates", ".", "<", "T", ">", "notNull", "(", ")", ",", "Illega...
Check that a reference is not null, throwing a IllegalArgumentException if it is. @param reference The reference to check @param errorMessage the message for the exception if the reference is null @param <T> the type of the reference @throws java.lang.IllegalArgumentException if the reference is null
[ "Check", "that", "a", "reference", "is", "not", "null", "throwing", "a", "IllegalArgumentException", "if", "it", "is", "." ]
train
https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/utils/Preconditions.java#L69-L72
EdwardRaff/JSAT
JSAT/src/jsat/driftdetectors/ADWIN.java
ADWIN.setDelta
public void setDelta(double delta) { """ Sets the upper bound on the false positive rate for detecting concept drifts @param delta the upper bound on false positives in (0,1) """ if(delta <= 0 || delta >= 1 || Double.isNaN(delta)) throw new IllegalArgumentException("delta must be in (0,1)...
java
public void setDelta(double delta) { if(delta <= 0 || delta >= 1 || Double.isNaN(delta)) throw new IllegalArgumentException("delta must be in (0,1), not " + delta); this.delta = delta; }
[ "public", "void", "setDelta", "(", "double", "delta", ")", "{", "if", "(", "delta", "<=", "0", "||", "delta", ">=", "1", "||", "Double", ".", "isNaN", "(", "delta", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"delta must be in (0,1), not \""...
Sets the upper bound on the false positive rate for detecting concept drifts @param delta the upper bound on false positives in (0,1)
[ "Sets", "the", "upper", "bound", "on", "the", "false", "positive", "rate", "for", "detecting", "concept", "drifts" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/driftdetectors/ADWIN.java#L98-L103
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsNotLoadFromServer
public FessMessages addErrorsNotLoadFromServer(String property, String arg0) { """ Add the created action message for the key 'errors.not_load_from_server' with parameters. <pre> message: Could not load from this server: {0} </pre> @param property The property name for the message. (NotNull) @param arg0 The p...
java
public FessMessages addErrorsNotLoadFromServer(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_not_load_from_server, arg0)); return this; }
[ "public", "FessMessages", "addErrorsNotLoadFromServer", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_not_load_from_server", ",", "arg0"...
Add the created action message for the key 'errors.not_load_from_server' with parameters. <pre> message: Could not load from this server: {0} </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "not_load_from_server", "with", "parameters", ".", "<pre", ">", "message", ":", "Could", "not", "load", "from", "this", "server", ":", "{", "0", "}", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1507-L1511
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getOptionalFieldValue
@SafeVarargs public static <T> T getOptionalFieldValue(Object object, String fieldName, Class<T>... fieldType) { """ Get optional field value from instance or class. Retrieve named field value from given instance or class; if field is missing return null. Note that this method does not throw exceptions. Also, ...
java
@SafeVarargs public static <T> T getOptionalFieldValue(Object object, String fieldName, Class<T>... fieldType) { Class<?> clazz = null; if(object instanceof Class<?>) { clazz = (Class<?>)object; object = null; } else { clazz = object.getClass(); } return getField...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "T", "getOptionalFieldValue", "(", "Object", "object", ",", "String", "fieldName", ",", "Class", "<", "T", ">", "...", "fieldType", ")", "{", "Class", "<", "?", ">", "clazz", "=", "null", ";", "if"...
Get optional field value from instance or class. Retrieve named field value from given instance or class; if field is missing return null. Note that this method does not throw exceptions. Also, if optional desired field type is present and named field is of different type returns null. @param object instance or class ...
[ "Get", "optional", "field", "value", "from", "instance", "or", "class", ".", "Retrieve", "named", "field", "value", "from", "given", "instance", "or", "class", ";", "if", "field", "is", "missing", "return", "null", ".", "Note", "that", "this", "method", "d...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L743-L755
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java
ClassFileVersion.of
public static ClassFileVersion of(TypeDescription typeDescription, ClassFileLocator classFileLocator) throws IOException { """ Extracts a class' class version. @param typeDescription The type for which to locate a class file version. @param classFileLocator The class file locator to query for a class file. @...
java
public static ClassFileVersion of(TypeDescription typeDescription, ClassFileLocator classFileLocator) throws IOException { ClassReader classReader = OpenedClassReader.of(classFileLocator.locate(typeDescription.getName()).resolve()); VersionExtractor versionExtractor = new VersionExtractor(); cla...
[ "public", "static", "ClassFileVersion", "of", "(", "TypeDescription", "typeDescription", ",", "ClassFileLocator", "classFileLocator", ")", "throws", "IOException", "{", "ClassReader", "classReader", "=", "OpenedClassReader", ".", "of", "(", "classFileLocator", ".", "loc...
Extracts a class' class version. @param typeDescription The type for which to locate a class file version. @param classFileLocator The class file locator to query for a class file. @return The type's class file version. @throws IOException If an error occurs while reading the class file.
[ "Extracts", "a", "class", "class", "version", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java#L297-L302
f2prateek/dart
henson/src/main/java/dart/henson/Bundler.java
Bundler.put
public Bundler put(String key, CharSequence[] value) { """ Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a CharSequence array object, or null @return this...
java
public Bundler put(String key, CharSequence[] value) { delegate.putCharSequenceArray(key, value); return this; }
[ "public", "Bundler", "put", "(", "String", "key", ",", "CharSequence", "[", "]", "value", ")", "{", "delegate", ".", "putCharSequenceArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a CharSequence array object, or null @return this bundler instance to chain method calls
[ "Inserts", "a", "CharSequence", "array", "value", "into", "the", "mapping", "of", "the", "underlying", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/f2prateek/dart/blob/7163b1b148e5141817975ae7dad99d58a8589aeb/henson/src/main/java/dart/henson/Bundler.java#L296-L299
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/NamedOdsDocument.java
NamedOdsDocument.addChildCellStyle
public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) { """ Add a cell style for a given data type. Use only if you want to flush data before the end of the document construction. Do not produce any effect if the type is Type.STRING or Type.VOID @param style the style @param t...
java
public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) { this.odsElements.addChildCellStyle(style, type); }
[ "public", "void", "addChildCellStyle", "(", "final", "TableCellStyle", "style", ",", "final", "TableCell", ".", "Type", "type", ")", "{", "this", ".", "odsElements", ".", "addChildCellStyle", "(", "style", ",", "type", ")", ";", "}" ]
Add a cell style for a given data type. Use only if you want to flush data before the end of the document construction. Do not produce any effect if the type is Type.STRING or Type.VOID @param style the style @param type the data type
[ "Add", "a", "cell", "style", "for", "a", "given", "data", "type", ".", "Use", "only", "if", "you", "want", "to", "flush", "data", "before", "the", "end", "of", "the", "document", "construction", ".", "Do", "not", "produce", "any", "effect", "if", "the"...
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/NamedOdsDocument.java#L168-L170
RestComm/jss7
m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/router/ServerM3UARouter.java
ServerM3UARouter.getAs
public AsImpl getAs(int dpc, int opc, short si) { """ <p> Match the passed dpc, opc and si with Tree structure and return the As from corresponding matched {@link SINode}. </p> <p> For example if AS1 is added for Routing Key with DPC=123 only. The tree will be formed with 123 as {@link DPCNode} parent node ...
java
public AsImpl getAs(int dpc, int opc, short si) { for (FastList.Node<DPCNode> n = dpcList.head(), end = dpcList.tail(); (n = n.getNext()) != end;) { DPCNode dpcNode = n.getValue(); if (dpcNode.dpc == dpc) { return dpcNode.getAs(opc, si); } } re...
[ "public", "AsImpl", "getAs", "(", "int", "dpc", ",", "int", "opc", ",", "short", "si", ")", "{", "for", "(", "FastList", ".", "Node", "<", "DPCNode", ">", "n", "=", "dpcList", ".", "head", "(", ")", ",", "end", "=", "dpcList", ".", "tail", "(", ...
<p> Match the passed dpc, opc and si with Tree structure and return the As from corresponding matched {@link SINode}. </p> <p> For example if AS1 is added for Routing Key with DPC=123 only. The tree will be formed with 123 as {@link DPCNode} parent node and -1 as {@link OPCNode} leaf and within {@link OPCNode} -1 as {...
[ "<p", ">", "Match", "the", "passed", "dpc", "opc", "and", "si", "with", "Tree", "structure", "and", "return", "the", "As", "from", "corresponding", "matched", "{", "@link", "SINode", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/router/ServerM3UARouter.java#L117-L125
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/BaseScreen.java
BaseScreen.doCommand
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { """ Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to par...
java
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if (strCommand.indexOf('=') == -1) if (this.getMainRecord() != null) { int iDocType = this.getMainRecord().commandToDocType(strCommand); if (iDocType > ScreenConstants.LAS...
[ "public", "boolean", "doCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iCommandOptions", ")", "{", "if", "(", "strCommand", ".", "indexOf", "(", "'", "'", ")", "==", "-", "1", ")", "if", "(", "this", ".", "getMain...
Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to parent (with me as the source). Note: Never pass to a parent or child that matches the source (to avoid an e...
[ "Process", "the", "command", ".", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", "all", "children", "(", "with", "me", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/BaseScreen.java#L331-L345
jblas-project/jblas
src/main/java/org/jblas/Singular.java
Singular.sparseSVD
public static ComplexFloatMatrix[] sparseSVD(ComplexFloatMatrix A) { """ Compute a singular-value decomposition of A (sparse variant). Sparse means that the matrices U and V are not square but only have as many columns (or rows) as necessary. @param A @return A ComplexFloatMatrix[3] array of U, S, V such tha...
java
public static ComplexFloatMatrix[] sparseSVD(ComplexFloatMatrix A) { int m = A.rows; int n = A.columns; ComplexFloatMatrix U = new ComplexFloatMatrix(m, min(m, n)); FloatMatrix S = new FloatMatrix(min(m, n)); ComplexFloatMatrix V = new ComplexFloatMatrix(min(m, n), n); ...
[ "public", "static", "ComplexFloatMatrix", "[", "]", "sparseSVD", "(", "ComplexFloatMatrix", "A", ")", "{", "int", "m", "=", "A", ".", "rows", ";", "int", "n", "=", "A", ".", "columns", ";", "ComplexFloatMatrix", "U", "=", "new", "ComplexFloatMatrix", "(", ...
Compute a singular-value decomposition of A (sparse variant). Sparse means that the matrices U and V are not square but only have as many columns (or rows) as necessary. @param A @return A ComplexFloatMatrix[3] array of U, S, V such that A = U * diag(S) * V*
[ "Compute", "a", "singular", "-", "value", "decomposition", "of", "A", "(", "sparse", "variant", ")", ".", "Sparse", "means", "that", "the", "matrices", "U", "and", "V", "are", "not", "square", "but", "only", "have", "as", "many", "columns", "(", "or", ...
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/Singular.java#L214-L231
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.getAllParticipants
public Stream<LsParticipant> getAllParticipants(int surveyId) throws LimesurveyRCException { """ Gets all participants from a survey. @param surveyId the survey id of the survey you want the participants @return the all participants @throws LimesurveyRCException the limesurvey rc exception """ LsA...
java
public Stream<LsParticipant> getAllParticipants(int surveyId) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); params.setStart(0); params.setLimit(-1); List<LsParticipant> participants = gson.fromJson(callRC(new LsApiBody("list_participants", para...
[ "public", "Stream", "<", "LsParticipant", ">", "getAllParticipants", "(", "int", "surveyId", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "params", ".", "setStart", "(",...
Gets all participants from a survey. @param surveyId the survey id of the survey you want the participants @return the all participants @throws LimesurveyRCException the limesurvey rc exception
[ "Gets", "all", "participants", "from", "a", "survey", "." ]
train
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L402-L410
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java
MultiChangeBuilder.insertAbsolutely
public MultiChangeBuilder<PS, SEG, S> insertAbsolutely(int paragraphIndex, int columnPosition, StyledDocument<PS, SEG, S> document) { """ Inserts the given rich-text content at the position returned from {@code getAbsolutePosition(paragraphIndex, columnPosition)}. <p><b>Caution:</b> see {@link StyledDocument#g...
java
public MultiChangeBuilder<PS, SEG, S> insertAbsolutely(int paragraphIndex, int columnPosition, StyledDocument<PS, SEG, S> document) { int pos = area.getAbsolutePosition(paragraphIndex, columnPosition); return replaceAbsolutely(pos, pos, document); }
[ "public", "MultiChangeBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "insertAbsolutely", "(", "int", "paragraphIndex", ",", "int", "columnPosition", ",", "StyledDocument", "<", "PS", ",", "SEG", ",", "S", ">", "document", ")", "{", "int", "pos", "=", "a...
Inserts the given rich-text content at the position returned from {@code getAbsolutePosition(paragraphIndex, columnPosition)}. <p><b>Caution:</b> see {@link StyledDocument#getAbsolutePosition(int, int)} to know how the column index argument can affect the returned position.</p> @param document The rich-text content t...
[ "Inserts", "the", "given", "rich", "-", "text", "content", "at", "the", "position", "returned", "from", "{", "@code", "getAbsolutePosition", "(", "paragraphIndex", "columnPosition", ")", "}", "." ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java#L225-L228
awslabs/amazon-sqs-java-extended-client-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java
AmazonSQSExtendedClient.deleteMessageBatch
public DeleteMessageBatchResult deleteMessageBatch(String queueUrl, List<DeleteMessageBatchRequestEntry> entries) { """ <p> Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. Als...
java
public DeleteMessageBatchResult deleteMessageBatch(String queueUrl, List<DeleteMessageBatchRequestEntry> entries) { DeleteMessageBatchRequest deleteMessageBatchRequest = new DeleteMessageBatchRequest(queueUrl, entries); return deleteMessageBatch(deleteMessageBatchRequest); }
[ "public", "DeleteMessageBatchResult", "deleteMessageBatch", "(", "String", "queueUrl", ",", "List", "<", "DeleteMessageBatchRequestEntry", ">", "entries", ")", "{", "DeleteMessageBatchRequest", "deleteMessageBatchRequest", "=", "new", "DeleteMessageBatchRequest", "(", "queueU...
<p> Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. Also deletes the message payloads from Amazon S3 when necessary. </p> <p> <b>IMPORTANT:</b> Because the batch request can result in...
[ "<p", ">", "Deletes", "up", "to", "ten", "messages", "from", "the", "specified", "queue", ".", "This", "is", "a", "batch", "version", "of", "DeleteMessage", ".", "The", "result", "of", "the", "delete", "action", "on", "each", "message", "is", "reported", ...
train
https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java#L972-L975
Pkmmte/CircularImageView
circularimageview-eclipse/CircularImageView/src/com/pkmmte/circularimageview/CircularImageView.java
CircularImageView.refreshBitmapShader
public void refreshBitmapShader() { """ Reinitializes the shader texture used to fill in the Circle upon drawing. """ shader = new BitmapShader(Bitmap.createScaledBitmap(image, canvasSize, canvasSize, false), Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); }
java
public void refreshBitmapShader() { shader = new BitmapShader(Bitmap.createScaledBitmap(image, canvasSize, canvasSize, false), Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); }
[ "public", "void", "refreshBitmapShader", "(", ")", "{", "shader", "=", "new", "BitmapShader", "(", "Bitmap", ".", "createScaledBitmap", "(", "image", ",", "canvasSize", ",", "canvasSize", ",", "false", ")", ",", "Shader", ".", "TileMode", ".", "CLAMP", ",", ...
Reinitializes the shader texture used to fill in the Circle upon drawing.
[ "Reinitializes", "the", "shader", "texture", "used", "to", "fill", "in", "the", "Circle", "upon", "drawing", "." ]
train
https://github.com/Pkmmte/CircularImageView/blob/aca59f32d9267c943eb6c930bdaed59c417a4d16/circularimageview-eclipse/CircularImageView/src/com/pkmmte/circularimageview/CircularImageView.java#L354-L357
lkwg82/enforcer-rules
src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
EnforcerRuleUtils.getPomModel
private Model getPomModel ( String groupId, String artifactId, String version, File pom ) throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException { """ This method gets the model for the defined artifact. Looks first in the filesystem, then tries to get it from ...
java
private Model getPomModel ( String groupId, String artifactId, String version, File pom ) throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException { Model model = null; // do we want to look in the reactor like the // project builder? Would ...
[ "private", "Model", "getPomModel", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "File", "pom", ")", "throws", "ArtifactResolutionException", ",", "ArtifactNotFoundException", ",", "IOException", ",", "XmlPullParserException", "...
This method gets the model for the defined artifact. Looks first in the filesystem, then tries to get it from the repo. @param groupId the group id @param artifactId the artifact id @param version the version @param pom the pom @return the pom model @throws ArtifactResolutionException the artifact resolution excepti...
[ "This", "method", "gets", "the", "model", "for", "the", "defined", "artifact", ".", "Looks", "first", "in", "the", "filesystem", "then", "tries", "to", "get", "it", "from", "the", "repo", "." ]
train
https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L176-L219
google/closure-templates
java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java
JavaQualifiedNames.getQualifiedName
public static String getQualifiedName(Descriptors.Descriptor msg, ProtoFlavor flavor) { """ Returns the fully-qualified name for the message descriptor with the given flavor (uses '.' inner class seperator). """ return getClassName(msg, flavor).replace('$', '.'); }
java
public static String getQualifiedName(Descriptors.Descriptor msg, ProtoFlavor flavor) { return getClassName(msg, flavor).replace('$', '.'); }
[ "public", "static", "String", "getQualifiedName", "(", "Descriptors", ".", "Descriptor", "msg", ",", "ProtoFlavor", "flavor", ")", "{", "return", "getClassName", "(", "msg", ",", "flavor", ")", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "}" ...
Returns the fully-qualified name for the message descriptor with the given flavor (uses '.' inner class seperator).
[ "Returns", "the", "fully", "-", "qualified", "name", "for", "the", "message", "descriptor", "with", "the", "given", "flavor", "(", "uses", ".", "inner", "class", "seperator", ")", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java#L70-L72
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/r/morpher/Thin.java
Thin.processSkeleton
public void processSkeleton( BinaryFast binary, int[][] kernel ) { """ Takes an image and a kernel and thins it the specified number of times. @param binary the BinaryFast input image. @param kernel the kernel to apply. """ int oldForeEdge = 0; int oldBackEdge = 0; while( !(binary.g...
java
public void processSkeleton( BinaryFast binary, int[][] kernel ) { int oldForeEdge = 0; int oldBackEdge = 0; while( !(binary.getForegroundEdgePixels().size() == oldForeEdge && binary.getBackgroundEdgePixels().size() == oldBackEdge) ) { oldForeEdge = binary.getForegroundEdgePixels().s...
[ "public", "void", "processSkeleton", "(", "BinaryFast", "binary", ",", "int", "[", "]", "[", "]", "kernel", ")", "{", "int", "oldForeEdge", "=", "0", ";", "int", "oldBackEdge", "=", "0", ";", "while", "(", "!", "(", "binary", ".", "getForegroundEdgePixel...
Takes an image and a kernel and thins it the specified number of times. @param binary the BinaryFast input image. @param kernel the kernel to apply.
[ "Takes", "an", "image", "and", "a", "kernel", "and", "thins", "it", "the", "specified", "number", "of", "times", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/r/morpher/Thin.java#L94-L105
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java
ZoneOffset.parseNumber
private static int parseNumber(CharSequence offsetId, int pos, boolean precededByColon) { """ Parse a two digit zero-prefixed number. @param offsetId the offset ID, not null @param pos the position to parse, valid @param precededByColon should this number be prefixed by a precededByColon @return the parse...
java
private static int parseNumber(CharSequence offsetId, int pos, boolean precededByColon) { if (precededByColon && offsetId.charAt(pos - 1) != ':') { throw new DateTimeException("Invalid ID for ZoneOffset, colon not found when expected: " + offsetId); } char ch1 = offsetId.charAt(pos);...
[ "private", "static", "int", "parseNumber", "(", "CharSequence", "offsetId", ",", "int", "pos", ",", "boolean", "precededByColon", ")", "{", "if", "(", "precededByColon", "&&", "offsetId", ".", "charAt", "(", "pos", "-", "1", ")", "!=", "'", "'", ")", "{"...
Parse a two digit zero-prefixed number. @param offsetId the offset ID, not null @param pos the position to parse, valid @param precededByColon should this number be prefixed by a precededByColon @return the parsed number, from 0 to 99
[ "Parse", "a", "two", "digit", "zero", "-", "prefixed", "number", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java#L256-L266
DiUS/pact-jvm
pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslJsonArray.java
LambdaDslJsonArray.minMaxArrayLike
public LambdaDslJsonArray minMaxArrayLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonBody> nestedObject) { """ Element that is an array with a minimum and maximum size where each item must match the following example @param minSize minimum size of the array @param maxSize maximum size of the array...
java
public LambdaDslJsonArray minMaxArrayLike(Integer minSize, Integer maxSize, Consumer<LambdaDslJsonBody> nestedObject) { final PactDslJsonBody arrayLike = pactArray.minMaxArrayLike(minSize, maxSize); final LambdaDslJsonBody dslBody = new LambdaDslJsonBody(arrayLike); nestedObject.accept(dslBody); arrayLi...
[ "public", "LambdaDslJsonArray", "minMaxArrayLike", "(", "Integer", "minSize", ",", "Integer", "maxSize", ",", "Consumer", "<", "LambdaDslJsonBody", ">", "nestedObject", ")", "{", "final", "PactDslJsonBody", "arrayLike", "=", "pactArray", ".", "minMaxArrayLike", "(", ...
Element that is an array with a minimum and maximum size where each item must match the following example @param minSize minimum size of the array @param maxSize maximum size of the array
[ "Element", "that", "is", "an", "array", "with", "a", "minimum", "and", "maximum", "size", "where", "each", "item", "must", "match", "the", "following", "example" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslJsonArray.java#L372-L378
hal/core
gui/src/main/java/org/jboss/as/console/client/domain/model/impl/HostInfoStoreImpl.java
HostInfoStoreImpl.loadServerInstances
@Override @Deprecated public void loadServerInstances(final String serverGroup, final AsyncCallback<List<ServerInstance>> callback) { """ Deprecated: Use topology functions instead. See {@link org.jboss.as.console.client.domain.topology.TopologyFunctions} @param serverGroup @param callback """ ...
java
@Override @Deprecated public void loadServerInstances(final String serverGroup, final AsyncCallback<List<ServerInstance>> callback) { final List<ServerInstance> instancesOfGroup = new LinkedList<ServerInstance>(); loadHostsAndServerInstances(new SimpleCallback<List<HostInfo>>() { @Ov...
[ "@", "Override", "@", "Deprecated", "public", "void", "loadServerInstances", "(", "final", "String", "serverGroup", ",", "final", "AsyncCallback", "<", "List", "<", "ServerInstance", ">", ">", "callback", ")", "{", "final", "List", "<", "ServerInstance", ">", ...
Deprecated: Use topology functions instead. See {@link org.jboss.as.console.client.domain.topology.TopologyFunctions} @param serverGroup @param callback
[ "Deprecated", ":", "Use", "topology", "functions", "instead", ".", "See", "{", "@link", "org", ".", "jboss", ".", "as", ".", "console", ".", "client", ".", "domain", ".", "topology", ".", "TopologyFunctions", "}" ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/domain/model/impl/HostInfoStoreImpl.java#L193-L213
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
PythonEnvironmentFactory.create_local_execution_environment
public PythonStreamExecutionEnvironment create_local_execution_environment(int parallelism, Configuration config) { """ A thin wrapper layer over {@link StreamExecutionEnvironment#createLocalEnvironment(int, Configuration)}. @param parallelism The parallelism for the local environment. @param config Pass a cus...
java
public PythonStreamExecutionEnvironment create_local_execution_environment(int parallelism, Configuration config) { return new PythonStreamExecutionEnvironment( StreamExecutionEnvironment.createLocalEnvironment(parallelism, config), new Path(localTmpPath), scriptName); }
[ "public", "PythonStreamExecutionEnvironment", "create_local_execution_environment", "(", "int", "parallelism", ",", "Configuration", "config", ")", "{", "return", "new", "PythonStreamExecutionEnvironment", "(", "StreamExecutionEnvironment", ".", "createLocalEnvironment", "(", "...
A thin wrapper layer over {@link StreamExecutionEnvironment#createLocalEnvironment(int, Configuration)}. @param parallelism The parallelism for the local environment. @param config Pass a custom configuration into the cluster @return A local python execution environment with the specified parallelism.
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "StreamExecutionEnvironment#createLocalEnvironment", "(", "int", "Configuration", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java#L74-L77
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/internal/document/DocumentEditor.java
DocumentEditor.doSetAllValues
protected void doSetAllValues( Map<? extends String, ?> values ) { """ The method that does the actual setting for all of the {@link #putAll(Map)} method. This method may be overridden by subclasses when additional work needs to be performed during this operation. @param values the map containing the fields to...
java
protected void doSetAllValues( Map<? extends String, ?> values ) { if (values != null) { document.putAll(Utility.unwrapValues(values)); } }
[ "protected", "void", "doSetAllValues", "(", "Map", "<", "?", "extends", "String", ",", "?", ">", "values", ")", "{", "if", "(", "values", "!=", "null", ")", "{", "document", ".", "putAll", "(", "Utility", ".", "unwrapValues", "(", "values", ")", ")", ...
The method that does the actual setting for all of the {@link #putAll(Map)} method. This method may be overridden by subclasses when additional work needs to be performed during this operation. @param values the map containing the fields to be added
[ "The", "method", "that", "does", "the", "actual", "setting", "for", "all", "of", "the", "{", "@link", "#putAll", "(", "Map", ")", "}", "method", ".", "This", "method", "may", "be", "overridden", "by", "subclasses", "when", "additional", "work", "needs", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/internal/document/DocumentEditor.java#L615-L619
couchbase/CouchbaseMock
src/main/java/com/couchbase/mock/memcached/VBucketStore.java
VBucketStore.forceDeleteMutation
void forceDeleteMutation(Item itm, VBucketCoordinates coords) { """ Forces the deletion of an item from the case. @see #forceStorageMutation(Item, VBucketCoordinates) @param itm @param coords """ forceMutation(itm.getKeySpec().vbId, itm, coords, true); }
java
void forceDeleteMutation(Item itm, VBucketCoordinates coords) { forceMutation(itm.getKeySpec().vbId, itm, coords, true); }
[ "void", "forceDeleteMutation", "(", "Item", "itm", ",", "VBucketCoordinates", "coords", ")", "{", "forceMutation", "(", "itm", ".", "getKeySpec", "(", ")", ".", "vbId", ",", "itm", ",", "coords", ",", "true", ")", ";", "}" ]
Forces the deletion of an item from the case. @see #forceStorageMutation(Item, VBucketCoordinates) @param itm @param coords
[ "Forces", "the", "deletion", "of", "an", "item", "from", "the", "case", "." ]
train
https://github.com/couchbase/CouchbaseMock/blob/2085bbebade1d5b6356480e7bf335139d08383da/src/main/java/com/couchbase/mock/memcached/VBucketStore.java#L323-L325
tvesalainen/util
util/src/main/java/org/vesalainen/nio/FileUtil.java
FileUtil.copyResource
public static final void copyResource(String source, Path target, Class<?> cls) throws IOException { """ Copies class resource to path @param source As in getResourceAsStream @param target Target file @param cls A class for finding class loader. @throws IOException @see java.lang.Class#getResourceAsStream(jav...
java
public static final void copyResource(String source, Path target, Class<?> cls) throws IOException { try (InputStream is = cls.getResourceAsStream(source)) { Files.copy(is, target, REPLACE_EXISTING); } }
[ "public", "static", "final", "void", "copyResource", "(", "String", "source", ",", "Path", "target", ",", "Class", "<", "?", ">", "cls", ")", "throws", "IOException", "{", "try", "(", "InputStream", "is", "=", "cls", ".", "getResourceAsStream", "(", "sourc...
Copies class resource to path @param source As in getResourceAsStream @param target Target file @param cls A class for finding class loader. @throws IOException @see java.lang.Class#getResourceAsStream(java.lang.String)
[ "Copies", "class", "resource", "to", "path" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/FileUtil.java#L218-L224
arquillian/arquillian-cube
kubernetes/istio/istio/src/main/java/org/arquillian/cube/istio/impl/IstioAssistant.java
IstioAssistant.deployIstioResources
public List<IstioResource> deployIstioResources(final Path directory) throws IOException { """ Deploys all y(a)ml and json files located at given directory. @param directory where resources files are stored @throws IOException """ final List<IstioResource> istioResources = new ArrayList<>();...
java
public List<IstioResource> deployIstioResources(final Path directory) throws IOException { final List<IstioResource> istioResources = new ArrayList<>(); if (Files.isDirectory(directory)) { Files.list(directory) .filter(ResourceFilter::filterKubernetesResource) ...
[ "public", "List", "<", "IstioResource", ">", "deployIstioResources", "(", "final", "Path", "directory", ")", "throws", "IOException", "{", "final", "List", "<", "IstioResource", ">", "istioResources", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", ...
Deploys all y(a)ml and json files located at given directory. @param directory where resources files are stored @throws IOException
[ "Deploys", "all", "y", "(", "a", ")", "ml", "and", "json", "files", "located", "at", "given", "directory", "." ]
train
https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/kubernetes/istio/istio/src/main/java/org/arquillian/cube/istio/impl/IstioAssistant.java#L80-L107
Coveros/selenified
src/main/java/com/coveros/selenified/application/App.java
App.isNotPrompt
private boolean isNotPrompt(String action, String expected, String perform) { """ Determines if a prompt is present or not, and can be interacted with. If it's not present, an indication that the confirmation can't be clicked on is written to the log file @param action - the action occurring @param expecte...
java
private boolean isNotPrompt(String action, String expected, String perform) { // wait for element to be present if (!is.promptPresent()) { waitFor.promptPresent(); } if (!is.promptPresent()) { reporter.fail(action, expected, "Unable to " + perform + " prompt as it...
[ "private", "boolean", "isNotPrompt", "(", "String", "action", ",", "String", "expected", ",", "String", "perform", ")", "{", "// wait for element to be present", "if", "(", "!", "is", ".", "promptPresent", "(", ")", ")", "{", "waitFor", ".", "promptPresent", "...
Determines if a prompt is present or not, and can be interacted with. If it's not present, an indication that the confirmation can't be clicked on is written to the log file @param action - the action occurring @param expected - the expected result @param perform - the action occurring to the prompt @return Boolean...
[ "Determines", "if", "a", "prompt", "is", "present", "or", "not", "and", "can", "be", "interacted", "with", ".", "If", "it", "s", "not", "present", "an", "indication", "that", "the", "confirmation", "can", "t", "be", "clicked", "on", "is", "written", "to"...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/App.java#L831-L841
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java
ZipMessage.addEntry
public ZipMessage addEntry(File file) { """ Adds new zip archive entry. Entry can be a file or directory. In case of directory all files will be automatically added to the zip archive. Directory structures are retained throughout this process. @param file @return """ try { addEntry(new E...
java
public ZipMessage addEntry(File file) { try { addEntry(new Entry(file)); } catch (IOException e) { throw new CitrusRuntimeException("Failed to read zip entry content from given file", e); } return this; }
[ "public", "ZipMessage", "addEntry", "(", "File", "file", ")", "{", "try", "{", "addEntry", "(", "new", "Entry", "(", "file", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "CitrusRuntimeException", "(", "\"Failed to read zi...
Adds new zip archive entry. Entry can be a file or directory. In case of directory all files will be automatically added to the zip archive. Directory structures are retained throughout this process. @param file @return
[ "Adds", "new", "zip", "archive", "entry", ".", "Entry", "can", "be", "a", "file", "or", "directory", ".", "In", "case", "of", "directory", "all", "files", "will", "be", "automatically", "added", "to", "the", "zip", "archive", ".", "Directory", "structures"...
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java#L83-L90
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java
ModelBuilder3D.translateStructure
private void translateStructure(Point3d originalCoord, Point3d newCoord, IAtomContainer ac) { """ Translates the template ring system to new coordinates. @param originalCoord original coordinates of the placed ring atom from template @param newCoord new coordinates from branch placement @param ac ...
java
private void translateStructure(Point3d originalCoord, Point3d newCoord, IAtomContainer ac) { Point3d transVector = new Point3d(originalCoord); transVector.sub(newCoord); for (int i = 0; i < ac.getAtomCount(); i++) { if (!(ac.getAtom(i).getFlag(CDKConstants.ISPLACED))) { ...
[ "private", "void", "translateStructure", "(", "Point3d", "originalCoord", ",", "Point3d", "newCoord", ",", "IAtomContainer", "ac", ")", "{", "Point3d", "transVector", "=", "new", "Point3d", "(", "originalCoord", ")", ";", "transVector", ".", "sub", "(", "newCoor...
Translates the template ring system to new coordinates. @param originalCoord original coordinates of the placed ring atom from template @param newCoord new coordinates from branch placement @param ac AtomContainer contains atoms of ring system
[ "Translates", "the", "template", "ring", "system", "to", "new", "coordinates", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java#L544-L553
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java
SqlConnRunner.update
public int update(Connection conn, Entity record, Entity where) throws SQLException { """ 更新数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @param where 条件 @return 影响行数 @throws SQLException SQL执行异常 """ checkConn(conn); if(CollectionUtil.isEmpty(record)){ throw new SQLException("Empt...
java
public int update(Connection conn, Entity record, Entity where) throws SQLException { checkConn(conn); if(CollectionUtil.isEmpty(record)){ throw new SQLException("Empty entity provided!"); } if(CollectionUtil.isEmpty(where)){ //不允许做全表更新 throw new SQLException("Empty where provided!"); } ...
[ "public", "int", "update", "(", "Connection", "conn", ",", "Entity", "record", ",", "Entity", "where", ")", "throws", "SQLException", "{", "checkConn", "(", "conn", ")", ";", "if", "(", "CollectionUtil", ".", "isEmpty", "(", "record", ")", ")", "{", "thr...
更新数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @param where 条件 @return 影响行数 @throws SQLException SQL执行异常
[ "更新数据<br", ">", "此方法不会关闭Connection" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L263-L290
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java
MainClassFinder.findSingleMainClass
public static String findSingleMainClass(File rootFolder, String annotationName) throws IOException { """ Find a single main class from the given {@code rootFolder}. A main class annotated with an annotation with the given {@code annotationName} will be preferred over a main class with no such annotation. @p...
java
public static String findSingleMainClass(File rootFolder, String annotationName) throws IOException { SingleMainClassCallback callback = new SingleMainClassCallback(annotationName); MainClassFinder.doWithMainClasses(rootFolder, callback); return callback.getMainClassName(); }
[ "public", "static", "String", "findSingleMainClass", "(", "File", "rootFolder", ",", "String", "annotationName", ")", "throws", "IOException", "{", "SingleMainClassCallback", "callback", "=", "new", "SingleMainClassCallback", "(", "annotationName", ")", ";", "MainClassF...
Find a single main class from the given {@code rootFolder}. A main class annotated with an annotation with the given {@code annotationName} will be preferred over a main class with no such annotation. @param rootFolder the root folder to search @param annotationName the name of the annotation that may be present on the...
[ "Find", "a", "single", "main", "class", "from", "the", "given", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java#L107-L112
janus-project/guava.janusproject.io
guava/src/com/google/common/collect/Maps.java
Maps.filterValues
public static <K, V> Map<K, V> filterValues( Map<K, V> unfiltered, final Predicate<? super V> valuePredicate) { """ Returns a map containing the mappings in {@code unfiltered} whose values satisfy a predicate. The returned map is a live view of {@code unfiltered}; changes to one affect the other. <p>The...
java
public static <K, V> Map<K, V> filterValues( Map<K, V> unfiltered, final Predicate<? super V> valuePredicate) { if (unfiltered instanceof SortedMap) { return filterValues((SortedMap<K, V>) unfiltered, valuePredicate); } else if (unfiltered instanceof BiMap) { return filterValues((BiMap<K, V>) ...
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "filterValues", "(", "Map", "<", "K", ",", "V", ">", "unfiltered", ",", "final", "Predicate", "<", "?", "super", "V", ">", "valuePredicate", ")", "{", "if", "(", "unfilt...
Returns a map containing the mappings in {@code unfiltered} whose values satisfy a predicate. The returned map is a live view of {@code unfiltered}; changes to one affect the other. <p>The resulting map's {@code keySet()}, {@code entrySet()}, and {@code values()} views have iterators that don't support {@code remove()...
[ "Returns", "a", "map", "containing", "the", "mappings", "in", "{", "@code", "unfiltered", "}", "whose", "values", "satisfy", "a", "predicate", ".", "The", "returned", "map", "is", "a", "live", "view", "of", "{", "@code", "unfiltered", "}", ";", "changes", ...
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/collect/Maps.java#L2263-L2271
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.enterTextInWebElement
public void enterTextInWebElement(By by, String text) { """ Enters text in a WebElement matching the specified By object. @param by the By object. Examples are: {@code By.id("id")} and {@code By.name("name")} @param text the text to enter in the {@link WebElement} field """ if(config.commandLogging){ ...
java
public void enterTextInWebElement(By by, String text){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "enterTextInWebElement("+by+", \""+text+"\")"); } if(waiter.waitForWebElement(by, 0, Timeout.getSmallTimeout(), false) == null) { Assert.fail("WebElement with " + webUtils.splitNameByUpperCas...
[ "public", "void", "enterTextInWebElement", "(", "By", "by", ",", "String", "text", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"enterTextInWebElement(\"", "+", "by", "+", ...
Enters text in a WebElement matching the specified By object. @param by the By object. Examples are: {@code By.id("id")} and {@code By.name("name")} @param text the text to enter in the {@link WebElement} field
[ "Enters", "text", "in", "a", "WebElement", "matching", "the", "specified", "By", "object", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2695-L2704
micronaut-projects/micronaut-core
tracing/src/main/java/io/micronaut/tracing/brave/instrument/http/HttpTracingFactory.java
HttpTracingFactory.httpServerHandler
@Singleton HttpServerHandler<HttpRequest<?>, HttpResponse<?>> httpServerHandler(HttpTracing httpTracing) { """ The {@link HttpServerHandler} bean. @param httpTracing The {@link HttpTracing} bean @return The {@link HttpServerHandler} bean """ return HttpServerHandler.create(httpTracing, new Http...
java
@Singleton HttpServerHandler<HttpRequest<?>, HttpResponse<?>> httpServerHandler(HttpTracing httpTracing) { return HttpServerHandler.create(httpTracing, new HttpServerAdapter<HttpRequest<?>, HttpResponse<?>>() { @Override public String method(HttpRequest<?> request) { ...
[ "@", "Singleton", "HttpServerHandler", "<", "HttpRequest", "<", "?", ">", ",", "HttpResponse", "<", "?", ">", ">", "httpServerHandler", "(", "HttpTracing", "httpTracing", ")", "{", "return", "HttpServerHandler", ".", "create", "(", "httpTracing", ",", "new", "...
The {@link HttpServerHandler} bean. @param httpTracing The {@link HttpTracing} bean @return The {@link HttpServerHandler} bean
[ "The", "{", "@link", "HttpServerHandler", "}", "bean", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/tracing/src/main/java/io/micronaut/tracing/brave/instrument/http/HttpTracingFactory.java#L110-L150
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java
FileUtils.isUnderDirectory
public static boolean isUnderDirectory(File child, File parent) { """ If child is under parent, will return true, otherwise, return false. @param child @param parent @return """ if (child == null || parent == null) return false; URI childUri = child.toURI(); URI relati...
java
public static boolean isUnderDirectory(File child, File parent) { if (child == null || parent == null) return false; URI childUri = child.toURI(); URI relativeUri = parent.toURI().relativize(childUri); return relativeUri.equals(childUri) ? false : true; }
[ "public", "static", "boolean", "isUnderDirectory", "(", "File", "child", ",", "File", "parent", ")", "{", "if", "(", "child", "==", "null", "||", "parent", "==", "null", ")", "return", "false", ";", "URI", "childUri", "=", "child", ".", "toURI", "(", "...
If child is under parent, will return true, otherwise, return false. @param child @param parent @return
[ "If", "child", "is", "under", "parent", "will", "return", "true", "otherwise", "return", "false", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L218-L226
samskivert/samskivert
src/main/java/com/samskivert/util/DefaultLogProvider.java
DefaultLogProvider.obtainTermSize
protected static void obtainTermSize () { """ Attempts to obtain the dimensions of the terminal window in which we're running. This is extremely platform specific, but feel free to add code to do the right thing for your platform. """ if (_tdimens == null) { _tdimens = TermUtil.getTermina...
java
protected static void obtainTermSize () { if (_tdimens == null) { _tdimens = TermUtil.getTerminalSize(); // if we were unable to obtain our dimensions, use defaults if (_tdimens == null) { _tdimens = new Dimension(132, 24); } } }
[ "protected", "static", "void", "obtainTermSize", "(", ")", "{", "if", "(", "_tdimens", "==", "null", ")", "{", "_tdimens", "=", "TermUtil", ".", "getTerminalSize", "(", ")", ";", "// if we were unable to obtain our dimensions, use defaults", "if", "(", "_tdimens", ...
Attempts to obtain the dimensions of the terminal window in which we're running. This is extremely platform specific, but feel free to add code to do the right thing for your platform.
[ "Attempts", "to", "obtain", "the", "dimensions", "of", "the", "terminal", "window", "in", "which", "we", "re", "running", ".", "This", "is", "extremely", "platform", "specific", "but", "feel", "free", "to", "add", "code", "to", "do", "the", "right", "thing...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/DefaultLogProvider.java#L167-L177
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java
ElementUI.afterMoveChild
@Override protected void afterMoveChild(ElementBase child, ElementBase before) { """ Element has been moved to a different position under this parent. Adjust wrapped components accordingly. @param child Child element that was moved. @param before Child element was moved before this one. """ mo...
java
@Override protected void afterMoveChild(ElementBase child, ElementBase before) { moveChild(((ElementUI) child).getOuterComponent(), ((ElementUI) before).getOuterComponent()); updateMasks(); }
[ "@", "Override", "protected", "void", "afterMoveChild", "(", "ElementBase", "child", ",", "ElementBase", "before", ")", "{", "moveChild", "(", "(", "(", "ElementUI", ")", "child", ")", ".", "getOuterComponent", "(", ")", ",", "(", "(", "ElementUI", ")", "b...
Element has been moved to a different position under this parent. Adjust wrapped components accordingly. @param child Child element that was moved. @param before Child element was moved before this one.
[ "Element", "has", "been", "moved", "to", "a", "different", "position", "under", "this", "parent", ".", "Adjust", "wrapped", "components", "accordingly", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java#L506-L510
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDate.java
LocalDate.withPeriodAdded
public LocalDate withPeriodAdded(ReadablePeriod period, int scalar) { """ Returns a copy of this date with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is best...
java
public LocalDate withPeriodAdded(ReadablePeriod period, int scalar) { if (period == null || scalar == 0) { return this; } long instant = getLocalMillis(); Chronology chrono = getChronology(); for (int i = 0; i < period.size(); i++) { long value = FieldUtil...
[ "public", "LocalDate", "withPeriodAdded", "(", "ReadablePeriod", "period", ",", "int", "scalar", ")", "{", "if", "(", "period", "==", "null", "||", "scalar", "==", "0", ")", "{", "return", "this", ";", "}", "long", "instant", "=", "getLocalMillis", "(", ...
Returns a copy of this date with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is best achieved using methods like {@link #withFieldAdded(DurationFieldType, int)} or {@li...
[ "Returns", "a", "copy", "of", "this", "date", "with", "the", "specified", "period", "added", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", ".", "<p", ">", "This", "method", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDate.java#L1159-L1173
ops4j/org.ops4j.pax.web
pax-web-undertow/src/main/java/org/ops4j/pax/web/service/undertow/internal/ServerControllerImpl.java
ServerControllerImpl.configureUndertow
private HttpHandler configureUndertow(Configuration configuration, Undertow.Builder builder, HttpHandler rootHandler) { """ Configuration using <code>org.ops4j.pax.web</code> PID - only listeners and NCSA logging @param configuration @param builder @param rootHandler current root handler @return """ ...
java
private HttpHandler configureUndertow(Configuration configuration, Undertow.Builder builder, HttpHandler rootHandler) { if (configuration.isLogNCSAFormatEnabled()) { String logNCSADirectory = configuration.getLogNCSADirectory(); String logNCSAFormat = configuration.getLogNCSAFormat(); ...
[ "private", "HttpHandler", "configureUndertow", "(", "Configuration", "configuration", ",", "Undertow", ".", "Builder", "builder", ",", "HttpHandler", "rootHandler", ")", "{", "if", "(", "configuration", ".", "isLogNCSAFormatEnabled", "(", ")", ")", "{", "String", ...
Configuration using <code>org.ops4j.pax.web</code> PID - only listeners and NCSA logging @param configuration @param builder @param rootHandler current root handler @return
[ "Configuration", "using", "<code", ">", "org", ".", "ops4j", ".", "pax", ".", "web<", "/", "code", ">", "PID", "-", "only", "listeners", "and", "NCSA", "logging" ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-undertow/src/main/java/org/ops4j/pax/web/service/undertow/internal/ServerControllerImpl.java#L349-L393
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/ExtensionRegistryLite.java
ExtensionRegistryLite.findLiteExtensionByNumber
@SuppressWarnings("unchecked") public <ContainingType extends MessageLite> GeneratedMessageLite.GeneratedExtension<ContainingType, ?> findLiteExtensionByNumber( final ContainingType containingTypeDefaultInstance, final int fieldNumber) { """ Find an extension by containing type ...
java
@SuppressWarnings("unchecked") public <ContainingType extends MessageLite> GeneratedMessageLite.GeneratedExtension<ContainingType, ?> findLiteExtensionByNumber( final ContainingType containingTypeDefaultInstance, final int fieldNumber) { return (GeneratedMessageLite.GeneratedExte...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "ContainingType", "extends", "MessageLite", ">", "GeneratedMessageLite", ".", "GeneratedExtension", "<", "ContainingType", ",", "?", ">", "findLiteExtensionByNumber", "(", "final", "ContainingType", "con...
Find an extension by containing type and field number. @return Information about the extension if found, or {@code null} otherwise.
[ "Find", "an", "extension", "by", "containing", "type", "and", "field", "number", "." ]
train
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/ExtensionRegistryLite.java#L111-L120
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/DecomposeEssential.java
DecomposeEssential.decompose
public void decompose( DMatrixRMaj U , DMatrixRMaj S , DMatrixRMaj V ) { """ Compute the decomposition given the SVD of E=U*S*V<sup>T</sup>. @param U Orthogonal matrix from SVD. @param S Diagonal matrix containing singular values from SVD. @param V Orthogonal matrix from SVD. """ // this ensures the res...
java
public void decompose( DMatrixRMaj U , DMatrixRMaj S , DMatrixRMaj V ) { // this ensures the resulting rotation matrix will have a determinant of +1 and thus be a real rotation matrix if( CommonOps_DDRM.det(U) < 0 ) { CommonOps_DDRM.scale(-1,U); CommonOps_DDRM.scale(-1,S); } if( CommonOps_DDRM.det(V) < 0...
[ "public", "void", "decompose", "(", "DMatrixRMaj", "U", ",", "DMatrixRMaj", "S", ",", "DMatrixRMaj", "V", ")", "{", "// this ensures the resulting rotation matrix will have a determinant of +1 and thus be a real rotation matrix", "if", "(", "CommonOps_DDRM", ".", "det", "(", ...
Compute the decomposition given the SVD of E=U*S*V<sup>T</sup>. @param U Orthogonal matrix from SVD. @param S Diagonal matrix containing singular values from SVD. @param V Orthogonal matrix from SVD.
[ "Compute", "the", "decomposition", "given", "the", "SVD", "of", "E", "=", "U", "*", "S", "*", "V<sup", ">", "T<", "/", "sup", ">", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/DecomposeEssential.java#L107-L124
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dslTemplate
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, List<?> args) { """ Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression """ return dslTemplate(cl, createTemplate(tem...
java
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, List<?> args) { return dslTemplate(cl, createTemplate(template), args); }
[ "public", "static", "<", "T", ">", "DslTemplate", "<", "T", ">", "dslTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "String", "template", ",", "List", "<", "?", ">", "args", ")", "{", "return", "dslTemplate", "(", "cl", ",", "cr...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L347-L349
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/RSA.java
RSA.encryptStr
@Deprecated public String encryptStr(String data, KeyType keyType, Charset charset) { """ 分组加密 @param data 数据 @param keyType 密钥类型 @param charset 加密前编码 @return 加密后的密文 @throws CryptoException 加密异常 @since 3.1.1 @deprecated 请使用 {@link #encryptBcd(String, KeyType, Charset)} """ return encryptBcd(data,...
java
@Deprecated public String encryptStr(String data, KeyType keyType, Charset charset) { return encryptBcd(data, keyType, charset); }
[ "@", "Deprecated", "public", "String", "encryptStr", "(", "String", "data", ",", "KeyType", "keyType", ",", "Charset", "charset", ")", "{", "return", "encryptBcd", "(", "data", ",", "keyType", ",", "charset", ")", ";", "}" ]
分组加密 @param data 数据 @param keyType 密钥类型 @param charset 加密前编码 @return 加密后的密文 @throws CryptoException 加密异常 @since 3.1.1 @deprecated 请使用 {@link #encryptBcd(String, KeyType, Charset)}
[ "分组加密" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/RSA.java#L143-L146
diffplug/durian
src/com/diffplug/common/base/StringPrinter.java
StringPrinter.toOutputStream
public OutputStream toOutputStream(Charset charset) { """ Creates an OutputStream which will print its content to the given StringPrinter, encoding bytes according to the given Charset. Doesn't matter if you close the stream or not, because StringPrinter doesn't have a close(). <p> Strings are sent to the consu...
java
public OutputStream toOutputStream(Charset charset) { CharsetDecoder decoder = charset.newDecoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE) .replaceWith("?"); ByteBuffer decoderIn = ByteBuffer.allocate(DECODER_BUFFER); CharBuffer decoderOut = Cha...
[ "public", "OutputStream", "toOutputStream", "(", "Charset", "charset", ")", "{", "CharsetDecoder", "decoder", "=", "charset", ".", "newDecoder", "(", ")", ".", "onMalformedInput", "(", "CodingErrorAction", ".", "REPLACE", ")", ".", "onUnmappableCharacter", "(", "C...
Creates an OutputStream which will print its content to the given StringPrinter, encoding bytes according to the given Charset. Doesn't matter if you close the stream or not, because StringPrinter doesn't have a close(). <p> Strings are sent to the consumer as soon as their constituent bytes are written to this OutputS...
[ "Creates", "an", "OutputStream", "which", "will", "print", "its", "content", "to", "the", "given", "StringPrinter", "encoding", "bytes", "according", "to", "the", "given", "Charset", ".", "Doesn", "t", "matter", "if", "you", "close", "the", "stream", "or", "...
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/StringPrinter.java#L85-L143
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/jvm/CRTable.java
CRTable.put
public void put(Object tree, int flags, int startPc, int endPc) { """ Create a new CRTEntry and add it to the entries. @param tree The tree or the list of trees for which we are storing the code pointers. @param flags The set of flags designating type of the entry. @param startPc The starting code posi...
java
public void put(Object tree, int flags, int startPc, int endPc) { entries.append(new CRTEntry(tree, flags, startPc, endPc)); }
[ "public", "void", "put", "(", "Object", "tree", ",", "int", "flags", ",", "int", "startPc", ",", "int", "endPc", ")", "{", "entries", ".", "append", "(", "new", "CRTEntry", "(", "tree", ",", "flags", ",", "startPc", ",", "endPc", ")", ")", ";", "}"...
Create a new CRTEntry and add it to the entries. @param tree The tree or the list of trees for which we are storing the code pointers. @param flags The set of flags designating type of the entry. @param startPc The starting code position. @param endPc The ending code position.
[ "Create", "a", "new", "CRTEntry", "and", "add", "it", "to", "the", "entries", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/jvm/CRTable.java#L81-L83
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/chains/EndPointInfoImpl.java
EndPointInfoImpl.updateHost
public String updateHost(final String newHost) { """ Update the host value for this end point. Will emit an AttributeChangeNotification if the value changed. @param newHost The new (or current) host name value. If no change, no notification is sent. @return String The previous host value """ valid...
java
public String updateHost(final String newHost) { validateHostName(newHost); String oldHost = this.host; this.host = newHost; if (!oldHost.equals(newHost)) { sendNotification(new AttributeChangeNotification(this, sequenceNum.incrementAndGet(), System.currentTimeMillis(), thi...
[ "public", "String", "updateHost", "(", "final", "String", "newHost", ")", "{", "validateHostName", "(", "newHost", ")", ";", "String", "oldHost", "=", "this", ".", "host", ";", "this", ".", "host", "=", "newHost", ";", "if", "(", "!", "oldHost", ".", "...
Update the host value for this end point. Will emit an AttributeChangeNotification if the value changed. @param newHost The new (or current) host name value. If no change, no notification is sent. @return String The previous host value
[ "Update", "the", "host", "value", "for", "this", "end", "point", ".", "Will", "emit", "an", "AttributeChangeNotification", "if", "the", "value", "changed", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/chains/EndPointInfoImpl.java#L114-L126
danidemi/jlubricant
jlubricant-embeddable-hsql/src/main/java/com/danidemi/jlubricant/embeddable/database/utils/DatasourceTemplate.java
DatasourceTemplate.queryForObject
public <T> T queryForObject(String sql, Class<T> requiredType) throws SQLException { """ Execute a query that returns a single value that can be cast to the given type. """ return queryForObject(sql, getSingleColumnRowMapper(requiredType)); }
java
public <T> T queryForObject(String sql, Class<T> requiredType) throws SQLException { return queryForObject(sql, getSingleColumnRowMapper(requiredType)); }
[ "public", "<", "T", ">", "T", "queryForObject", "(", "String", "sql", ",", "Class", "<", "T", ">", "requiredType", ")", "throws", "SQLException", "{", "return", "queryForObject", "(", "sql", ",", "getSingleColumnRowMapper", "(", "requiredType", ")", ")", ";"...
Execute a query that returns a single value that can be cast to the given type.
[ "Execute", "a", "query", "that", "returns", "a", "single", "value", "that", "can", "be", "cast", "to", "the", "given", "type", "." ]
train
https://github.com/danidemi/jlubricant/blob/a9937c141c69ec34b768bd603b8093e496329b3a/jlubricant-embeddable-hsql/src/main/java/com/danidemi/jlubricant/embeddable/database/utils/DatasourceTemplate.java#L71-L73
groovy/groovy-core
src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
StaticInvocationWriter.tryBridgeMethod
protected boolean tryBridgeMethod(MethodNode target, Expression receiver, boolean implicitThis, TupleExpression args) { """ Attempts to make a direct method call on a bridge method, if it exists. """ ClassNode lookupClassNode; if (target.isProtected()) { lookupClassNode = controller...
java
protected boolean tryBridgeMethod(MethodNode target, Expression receiver, boolean implicitThis, TupleExpression args) { ClassNode lookupClassNode; if (target.isProtected()) { lookupClassNode = controller.getClassNode(); if (controller.isInClosure()) { lookupClassN...
[ "protected", "boolean", "tryBridgeMethod", "(", "MethodNode", "target", ",", "Expression", "receiver", ",", "boolean", "implicitThis", ",", "TupleExpression", "args", ")", "{", "ClassNode", "lookupClassNode", ";", "if", "(", "target", ".", "isProtected", "(", ")",...
Attempts to make a direct method call on a bridge method, if it exists.
[ "Attempts", "to", "make", "a", "direct", "method", "call", "on", "a", "bridge", "method", "if", "it", "exists", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java#L177-L206
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java
DocumentUrl.deleteDocumentUrl
public static MozuUrl deleteDocumentUrl(String documentId, String documentListName) { """ Get Resource Url for DeleteDocument @param documentId Unique identifier for a document, used by content and document calls. Document IDs are associated with document types, document type lists, sites, and tenants. @param do...
java
public static MozuUrl deleteDocumentUrl(String documentId, String documentListName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documents/{documentId}"); formatter.formatUrl("documentId", documentId); formatter.formatUrl("documentListName", documentListName); ...
[ "public", "static", "MozuUrl", "deleteDocumentUrl", "(", "String", "documentId", ",", "String", "documentListName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}/documents/{documentId}\"", ")", ";", ...
Get Resource Url for DeleteDocument @param documentId Unique identifier for a document, used by content and document calls. Document IDs are associated with document types, document type lists, sites, and tenants. @param documentListName Name of content documentListName to delete @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteDocument" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java#L150-L156
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/transport/DojoHttpTransport.java
DojoHttpTransport.endLayerModules
protected String endLayerModules(HttpServletRequest request, Object arg) { """ Handles the {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#END_LAYER_MODULES} layer listener event. @param request the http request object @param arg the set of required modules @return the layer contr...
java
protected String endLayerModules(HttpServletRequest request, Object arg) { // Save module list in request attribute for processing during {@code END_RESPONSE} request.setAttribute(ADD_REQUIRE_DEPS_REQATTRNAME, arg); return "}});require({cache:{}});"; //$NON-NLS-1$ }
[ "protected", "String", "endLayerModules", "(", "HttpServletRequest", "request", ",", "Object", "arg", ")", "{", "// Save module list in request attribute for processing during {@code END_RESPONSE}\r", "request", ".", "setAttribute", "(", "ADD_REQUIRE_DEPS_REQATTRNAME", ",", "arg"...
Handles the {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#END_LAYER_MODULES} layer listener event. @param request the http request object @param arg the set of required modules @return the layer contribution
[ "Handles", "the", "{", "@link", "com", ".", "ibm", ".", "jaggr", ".", "core", ".", "transport", ".", "IHttpTransport", ".", "LayerContributionType#END_LAYER_MODULES", "}", "layer", "listener", "event", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/transport/DojoHttpTransport.java#L311-L315
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java
CmsCategoriesTab.buildTreeItem
private CmsTreeItem buildTreeItem(CmsCategoryTreeEntry category, List<String> selectedCategories) { """ Builds a tree item for the given category.<p> @param category the category @param selectedCategories the selected categories @return the tree item widget """ m_categories.put(category.getPath...
java
private CmsTreeItem buildTreeItem(CmsCategoryTreeEntry category, List<String> selectedCategories) { m_categories.put(category.getPath(), category); // set the list item widget CmsDataValue dataValue = new CmsDataValue( 600, 3, CmsCategoryBean.SMALL_ICON_CLASS...
[ "private", "CmsTreeItem", "buildTreeItem", "(", "CmsCategoryTreeEntry", "category", ",", "List", "<", "String", ">", "selectedCategories", ")", "{", "m_categories", ".", "put", "(", "category", ".", "getPath", "(", ")", ",", "category", ")", ";", "// set the lis...
Builds a tree item for the given category.<p> @param category the category @param selectedCategories the selected categories @return the tree item widget
[ "Builds", "a", "tree", "item", "for", "the", "given", "category", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java#L358-L386
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.postQuery
public Response postQuery(final String system, final InputStream input, final String resource, final HttpHeaders httpHeaders) { """ This method will be called when a HTTP client sends a POST request to an existing resource with 'application/query+xml' as Content-Type. @param system The implementation...
java
public Response postQuery(final String system, final InputStream input, final String resource, final HttpHeaders httpHeaders) { final JaxRx impl = Systems.getInstance(system); final Document doc = new SchemaChecker("post").check(input); final Map<QueryParameter, String> param = get...
[ "public", "Response", "postQuery", "(", "final", "String", "system", ",", "final", "InputStream", "input", ",", "final", "String", "resource", ",", "final", "HttpHeaders", "httpHeaders", ")", "{", "final", "JaxRx", "impl", "=", "Systems", ".", "getInstance", "...
This method will be called when a HTTP client sends a POST request to an existing resource with 'application/query+xml' as Content-Type. @param system The implementation system. @param input The input stream. @param resource The resource @param httpHeaders HTTP header attributes. @return The {@link Response} which can...
[ "This", "method", "will", "be", "called", "when", "a", "HTTP", "client", "sends", "a", "POST", "request", "to", "an", "existing", "resource", "with", "application", "/", "query", "+", "xml", "as", "Content", "-", "Type", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L307-L315
agmip/agmip-common-functions
src/main/java/org/agmip/common/Event.java
Event.updateEvent
public void updateEvent(String key, String value, boolean useTemp, boolean toNext) { """ Update the current event with given key and value, if current event not available, add a new one into array @param key The variable's key for a event @param value The input value for the key @param useTemp The flag for i...
java
public void updateEvent(String key, String value, boolean useTemp, boolean toNext) { if (isEventExist()) { getCurrentEvent().put(key, value); } else { HashMap tmp; if ("date".equals(key)) { tmp = addEvent(value, useTemp); } else { ...
[ "public", "void", "updateEvent", "(", "String", "key", ",", "String", "value", ",", "boolean", "useTemp", ",", "boolean", "toNext", ")", "{", "if", "(", "isEventExist", "(", ")", ")", "{", "getCurrentEvent", "(", ")", ".", "put", "(", "key", ",", "valu...
Update the current event with given key and value, if current event not available, add a new one into array @param key The variable's key for a event @param value The input value for the key @param useTemp The flag for if using the template to build new event @param toNext The flag for if move the pointer to the next ...
[ "Update", "the", "current", "event", "with", "given", "key", "and", "value", "if", "current", "event", "not", "available", "add", "a", "new", "one", "into", "array" ]
train
https://github.com/agmip/agmip-common-functions/blob/4efa3042178841b026ca6fba9c96da02fbfb9a8e/src/main/java/org/agmip/common/Event.java#L98-L114
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java
MultiLayerNetwork.activateSelectedLayers
public INDArray activateSelectedLayers(int from, int to, INDArray input) { """ Calculate activation for few layers at once. Suitable for autoencoder partial activation. In example: in 10-layer deep autoencoder, layers 0 - 4 inclusive are used for encoding part, and layers 5-9 inclusive are used for decoding par...
java
public INDArray activateSelectedLayers(int from, int to, INDArray input) { if (input == null) throw new IllegalStateException("Unable to perform activation; no input found"); if (from < 0 || from >= layers.length || from >= to) throw new IllegalStateException("Unable to perform a...
[ "public", "INDArray", "activateSelectedLayers", "(", "int", "from", ",", "int", "to", ",", "INDArray", "input", ")", "{", "if", "(", "input", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"Unable to perform activation; no input found\"", ")", ...
Calculate activation for few layers at once. Suitable for autoencoder partial activation. In example: in 10-layer deep autoencoder, layers 0 - 4 inclusive are used for encoding part, and layers 5-9 inclusive are used for decoding part. @param from first layer to be activated, inclusive @param to last layer to be acti...
[ "Calculate", "activation", "for", "few", "layers", "at", "once", ".", "Suitable", "for", "autoencoder", "partial", "activation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java#L819-L839
calimero-project/calimero-core
src/tuwien/auto/calimero/dptxlator/TranslatorTypes.java
TranslatorTypes.createTranslator
public static DPTXlator createTranslator(final String dptId, final byte... data) throws KNXException, KNXIllegalArgumentException { """ Creates a DPT translator for the given datapoint type ID. @param dptId datapoint type ID, formatted as <code>&lt;main number&gt;.&lt;sub number&gt;</code> with a sub number ...
java
public static DPTXlator createTranslator(final String dptId, final byte... data) throws KNXException, KNXIllegalArgumentException { final DPTXlator t = createTranslator(0, dptId); if (data.length > 0) t.setData(data); return t; }
[ "public", "static", "DPTXlator", "createTranslator", "(", "final", "String", "dptId", ",", "final", "byte", "...", "data", ")", "throws", "KNXException", ",", "KNXIllegalArgumentException", "{", "final", "DPTXlator", "t", "=", "createTranslator", "(", "0", ",", ...
Creates a DPT translator for the given datapoint type ID. @param dptId datapoint type ID, formatted as <code>&lt;main number&gt;.&lt;sub number&gt;</code> with a sub number &lt; 100 zero-padded to 3 digits, e.g. "1.001" @param data (optional) KNX datapoint data to set in the created translator for translation @return ...
[ "Creates", "a", "DPT", "translator", "for", "the", "given", "datapoint", "type", "ID", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/dptxlator/TranslatorTypes.java#L649-L656
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.addTrait
@Override public void addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws AtlasException { """ Adds a new trait to the list of existing entities represented by their respective guids @param entityGuids list of guids of entities @param traitInstance trait instance json that needs to be add...
java
@Override public void addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws AtlasException { Preconditions.checkNotNull(entityGuids, "entityGuids list cannot be null"); Preconditions.checkNotNull(traitInstance, "Trait instance cannot be null"); final String traitName = trait...
[ "@", "Override", "public", "void", "addTrait", "(", "List", "<", "String", ">", "entityGuids", ",", "ITypedStruct", "traitInstance", ")", "throws", "AtlasException", "{", "Preconditions", ".", "checkNotNull", "(", "entityGuids", ",", "\"entityGuids list cannot be null...
Adds a new trait to the list of existing entities represented by their respective guids @param entityGuids list of guids of entities @param traitInstance trait instance json that needs to be added to entities @throws AtlasException
[ "Adds", "a", "new", "trait", "to", "the", "list", "of", "existing", "entities", "represented", "by", "their", "respective", "guids" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L566-L591
aws/aws-sdk-java
aws-java-sdk-secretsmanager/src/main/java/com/amazonaws/services/secretsmanager/model/SecretListEntry.java
SecretListEntry.setSecretVersionsToStages
public void setSecretVersionsToStages(java.util.Map<String, java.util.List<String>> secretVersionsToStages) { """ <p> A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> that each is attached to. Staging labels are used to keep track of the ...
java
public void setSecretVersionsToStages(java.util.Map<String, java.util.List<String>> secretVersionsToStages) { this.secretVersionsToStages = secretVersionsToStages; }
[ "public", "void", "setSecretVersionsToStages", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "secretVersionsToStages", ")", "{", "this", ".", "secretVersionsToStages", "=", "secretVersionsT...
<p> A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> that each is attached to. Staging labels are used to keep track of the different versions during the rotation process. </p> <note> <p> A version that does not have any <code>SecretVersionStage...
[ "<p", ">", "A", "list", "of", "all", "of", "the", "currently", "assigned", "<code", ">", "SecretVersionStage<", "/", "code", ">", "staging", "labels", "and", "the", "<code", ">", "SecretVersionId<", "/", "code", ">", "that", "each", "is", "attached", "to",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-secretsmanager/src/main/java/com/amazonaws/services/secretsmanager/model/SecretListEntry.java#L794-L796
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
Node.getSubscriptions
public List<Subscription> getSubscriptions(List<ExtensionElement> additionalExtensions, Collection<ExtensionElement> returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Get the subscriptions currently associated with this node. ...
java
public List<Subscription> getSubscriptions(List<ExtensionElement> additionalExtensions, Collection<ExtensionElement> returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getSubscriptions(SubscriptionsNamespace.basic, additio...
[ "public", "List", "<", "Subscription", ">", "getSubscriptions", "(", "List", "<", "ExtensionElement", ">", "additionalExtensions", ",", "Collection", "<", "ExtensionElement", ">", "returnedExtensions", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ","...
Get the subscriptions currently associated with this node. <p> {@code additionalExtensions} can be used e.g. to add a "Result Set Management" extension. {@code returnedExtensions} will be filled with the stanza extensions found in the answer. </p> @param additionalExtensions @param returnedExtensions a collection that...
[ "Get", "the", "subscriptions", "currently", "associated", "with", "this", "node", ".", "<p", ">", "{", "@code", "additionalExtensions", "}", "can", "be", "used", "e", ".", "g", ".", "to", "add", "a", "Result", "Set", "Management", "extension", ".", "{", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java#L155-L158
landawn/AbacusUtil
src/com/landawn/abacus/util/ClassUtil.java
ClassUtil.getPropValue
@SuppressWarnings("unchecked") public static <T> T getPropValue(final Object entity, final Method propGetMethod) { """ Return the specified {@code propValue} got by the specified method {@code propSetMethod} in the specified {@code entity}. @param entity MapEntity is not supported @param propGetMethod ...
java
@SuppressWarnings("unchecked") public static <T> T getPropValue(final Object entity, final Method propGetMethod) { try { return (T) propGetMethod.invoke(entity); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { throw N.toRuntime...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getPropValue", "(", "final", "Object", "entity", ",", "final", "Method", "propGetMethod", ")", "{", "try", "{", "return", "(", "T", ")", "propGetMethod", ".", "inv...
Return the specified {@code propValue} got by the specified method {@code propSetMethod} in the specified {@code entity}. @param entity MapEntity is not supported @param propGetMethod @return
[ "Return", "the", "specified", "{", "@code", "propValue", "}", "got", "by", "the", "specified", "method", "{", "@code", "propSetMethod", "}", "in", "the", "specified", "{", "@code", "entity", "}", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/ClassUtil.java#L1764-L1771
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java
MapFixture.setBooleanValueForIn
public void setBooleanValueForIn(boolean value, String name, Map<String, Object> map) { """ Stores boolean value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in. """ setValueForIn(Boolean.valueOf(value), name, map); }
java
public void setBooleanValueForIn(boolean value, String name, Map<String, Object> map) { setValueForIn(Boolean.valueOf(value), name, map); }
[ "public", "void", "setBooleanValueForIn", "(", "boolean", "value", ",", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "setValueForIn", "(", "Boolean", ".", "valueOf", "(", "value", ")", ",", "name", ",", "map", ")", ...
Stores boolean value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in.
[ "Stores", "boolean", "value", "in", "map", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java#L75-L77
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java
StreamHelper.readStreamLines
@Nullable @ReturnsMutableCopy public static ICommonsList <String> readStreamLines (@WillClose @Nullable final InputStream aIS, @Nonnull @Nonempty final Charset aCharset) { """ Get the content of the passed stream as a list of lines in the passed character...
java
@Nullable @ReturnsMutableCopy public static ICommonsList <String> readStreamLines (@WillClose @Nullable final InputStream aIS, @Nonnull @Nonempty final Charset aCharset) { return readStreamLines (aIS, aCharset, 0, CGlobal.ILLEGAL_UINT); }
[ "@", "Nullable", "@", "ReturnsMutableCopy", "public", "static", "ICommonsList", "<", "String", ">", "readStreamLines", "(", "@", "WillClose", "@", "Nullable", "final", "InputStream", "aIS", ",", "@", "Nonnull", "@", "Nonempty", "final", "Charset", "aCharset", ")...
Get the content of the passed stream as a list of lines in the passed character set. @param aIS The input stream to read from. May be <code>null</code>. @param aCharset The character set to use. May not be <code>null</code>. @return <code>null</code> if the input stream is <code>null</code>, the content lines otherwis...
[ "Get", "the", "content", "of", "the", "passed", "stream", "as", "a", "list", "of", "lines", "in", "the", "passed", "character", "set", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java#L1069-L1075
googleads/googleads-java-lib
modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsSoapContextHandler.java
JaxWsSoapContextHandler.addHeader
public void addHeader(String namespace, String headerName, SOAPElement headerValue) { """ Adds a header to the list of SOAP request headers. @param namespace the namespace the header belongs to @param headerName the name of the header element @param headerValue the value of the header element """ this...
java
public void addHeader(String namespace, String headerName, SOAPElement headerValue) { this.soapHeaders.add(headerValue); }
[ "public", "void", "addHeader", "(", "String", "namespace", ",", "String", "headerName", ",", "SOAPElement", "headerValue", ")", "{", "this", ".", "soapHeaders", ".", "add", "(", "headerValue", ")", ";", "}" ]
Adds a header to the list of SOAP request headers. @param namespace the namespace the header belongs to @param headerName the name of the header element @param headerValue the value of the header element
[ "Adds", "a", "header", "to", "the", "list", "of", "SOAP", "request", "headers", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsSoapContextHandler.java#L160-L162