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
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.dropZone
public static Cluster dropZone(Cluster intermediateCluster, int dropZoneId) { """ Given a interim cluster with a previously vacated zone, constructs a new cluster object with the drop zone completely removed @param intermediateCluster @param dropZoneId @return adjusted cluster with the zone dropped """ ...
java
public static Cluster dropZone(Cluster intermediateCluster, int dropZoneId) { // Filter out nodes that don't belong to the zone being dropped Set<Node> survivingNodes = new HashSet<Node>(); for(int nodeId: intermediateCluster.getNodeIds()) { if(intermediateCluster.getNodeById(nodeId)...
[ "public", "static", "Cluster", "dropZone", "(", "Cluster", "intermediateCluster", ",", "int", "dropZoneId", ")", "{", "// Filter out nodes that don't belong to the zone being dropped", "Set", "<", "Node", ">", "survivingNodes", "=", "new", "HashSet", "<", "Node", ">", ...
Given a interim cluster with a previously vacated zone, constructs a new cluster object with the drop zone completely removed @param intermediateCluster @param dropZoneId @return adjusted cluster with the zone dropped
[ "Given", "a", "interim", "cluster", "with", "a", "previously", "vacated", "zone", "constructs", "a", "new", "cluster", "object", "with", "the", "drop", "zone", "completely", "removed" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L335-L359
datacleaner/AnalyzerBeans
components/pattern-finder/src/main/java/org/eobjects/analyzer/beans/stringpattern/TokenizerConfiguration.java
TokenizerConfiguration.setDistriminateTokenLength
public void setDistriminateTokenLength(TokenType tokenType, boolean discriminateTokenLength) { """ Sets which tokens should be discriminated (when matching) based on length. For example, if "hello" and "hi" should be matched, then length discrimination should be false. If only "hello" and "world", but not "hi" ...
java
public void setDistriminateTokenLength(TokenType tokenType, boolean discriminateTokenLength) { _discriminateTokenLength.put(tokenType, Boolean.valueOf(discriminateTokenLength)); }
[ "public", "void", "setDistriminateTokenLength", "(", "TokenType", "tokenType", ",", "boolean", "discriminateTokenLength", ")", "{", "_discriminateTokenLength", ".", "put", "(", "tokenType", ",", "Boolean", ".", "valueOf", "(", "discriminateTokenLength", ")", ")", ";",...
Sets which tokens should be discriminated (when matching) based on length. For example, if "hello" and "hi" should be matched, then length discrimination should be false. If only "hello" and "world", but not "hi" should be matched then length discrimination should be true.
[ "Sets", "which", "tokens", "should", "be", "discriminated", "(", "when", "matching", ")", "based", "on", "length", ".", "For", "example", "if", "hello", "and", "hi", "should", "be", "matched", "then", "length", "discrimination", "should", "be", "false", ".",...
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/pattern-finder/src/main/java/org/eobjects/analyzer/beans/stringpattern/TokenizerConfiguration.java#L140-L142
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JmxUtils.java
JmxUtils.unregisterJMXBean
public static void unregisterJMXBean(ServletContext servletContext, String resourceType, String mBeanPrefix) { """ Unregister the JMX Bean @param servletContext the servlet context @param resourceType the resource type @param mBeanPrefix the mBeanPrefix """ try { MBeanServer mbs = ManagementFact...
java
public static void unregisterJMXBean(ServletContext servletContext, String resourceType, String mBeanPrefix) { try { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); if (mbs != null) { ObjectName jawrConfigMgrObjName = JmxUtils.getMBeanObjectName(servletContext, resourceType, mBeanPre...
[ "public", "static", "void", "unregisterJMXBean", "(", "ServletContext", "servletContext", ",", "String", "resourceType", ",", "String", "mBeanPrefix", ")", "{", "try", "{", "MBeanServer", "mbs", "=", "ManagementFactory", ".", "getPlatformMBeanServer", "(", ")", ";",...
Unregister the JMX Bean @param servletContext the servlet context @param resourceType the resource type @param mBeanPrefix the mBeanPrefix
[ "Unregister", "the", "JMX", "Bean" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JmxUtils.java#L118-L144
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMFiles.java
JMFiles.appendLine
public static Writer appendLine(Writer writer, String line) { """ Append line writer. @param writer the writer @param line the line @return the writer """ return append(writer, line + JMString.LINE_SEPARATOR); }
java
public static Writer appendLine(Writer writer, String line) { return append(writer, line + JMString.LINE_SEPARATOR); }
[ "public", "static", "Writer", "appendLine", "(", "Writer", "writer", ",", "String", "line", ")", "{", "return", "append", "(", "writer", ",", "line", "+", "JMString", ".", "LINE_SEPARATOR", ")", ";", "}" ]
Append line writer. @param writer the writer @param line the line @return the writer
[ "Append", "line", "writer", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMFiles.java#L51-L53
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.putAsync
public CompletableFuture<Object> putAsync(final Consumer<HttpConfig> configuration) { """ Executes an asynchronous PUT request on the configured URI (asynchronous alias to `put(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specific con...
java
public CompletableFuture<Object> putAsync(final Consumer<HttpConfig> configuration) { return CompletableFuture.supplyAsync(() -> put(configuration), getExecutor()); }
[ "public", "CompletableFuture", "<", "Object", ">", "putAsync", "(", "final", "Consumer", "<", "HttpConfig", ">", "configuration", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "(", ")", "->", "put", "(", "configuration", ")", ",", "getExecu...
Executes an asynchronous PUT request on the configured URI (asynchronous alias to `put(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specific configuration. [source,java] ---- HttpBuilder http = HttpBuilder.configure(config -> { config.getReq...
[ "Executes", "an", "asynchronous", "PUT", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "put", "(", "Consumer", ")", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", "function", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L1025-L1027
davidmoten/rxjava-extras
src/main/java/com/github/davidmoten/rx/Serialized.java
Serialized.read
public static <T extends Serializable> Observable<T> read(final ObjectInputStream ois) { """ Returns the deserialized objects from the given {@link InputStream} as an {@link Observable} stream. @param ois the {@link ObjectInputStream} @param <T> the generic type of the returned stream @return the stream of...
java
public static <T extends Serializable> Observable<T> read(final ObjectInputStream ois) { return Observable.create(new SyncOnSubscribe<ObjectInputStream,T>() { @Override protected ObjectInputStream generateState() { return ois; } @Override ...
[ "public", "static", "<", "T", "extends", "Serializable", ">", "Observable", "<", "T", ">", "read", "(", "final", "ObjectInputStream", "ois", ")", "{", "return", "Observable", ".", "create", "(", "new", "SyncOnSubscribe", "<", "ObjectInputStream", ",", "T", "...
Returns the deserialized objects from the given {@link InputStream} as an {@link Observable} stream. @param ois the {@link ObjectInputStream} @param <T> the generic type of the returned stream @return the stream of deserialized objects from the {@link InputStream} as an {@link Observable}.
[ "Returns", "the", "deserialized", "objects", "from", "the", "given", "{", "@link", "InputStream", "}", "as", "an", "{", "@link", "Observable", "}", "stream", "." ]
train
https://github.com/davidmoten/rxjava-extras/blob/a91d2ba7d454843250e0b0fce36084f9fb02a551/src/main/java/com/github/davidmoten/rx/Serialized.java#L46-L70
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java
EcKey.fromJsonWebKey
public static EcKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters, Provider provider) { """ Converts JSON web key to EC key pair and include the private key if set to true. @param jwk @param includePrivateParameters true if the EC key pair should include the private key. False otherwise. @para...
java
public static EcKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters, Provider provider) { try { if (jwk.kid() != null) { return new EcKey(jwk.kid(), jwk.toEC(includePrivateParameters, provider)); } else { throw new IllegalArgumentException(...
[ "public", "static", "EcKey", "fromJsonWebKey", "(", "JsonWebKey", "jwk", ",", "boolean", "includePrivateParameters", ",", "Provider", "provider", ")", "{", "try", "{", "if", "(", "jwk", ".", "kid", "(", ")", "!=", "null", ")", "{", "return", "new", "EcKey"...
Converts JSON web key to EC key pair and include the private key if set to true. @param jwk @param includePrivateParameters true if the EC key pair should include the private key. False otherwise. @param provider the Java Security Provider @return EcKey
[ "Converts", "JSON", "web", "key", "to", "EC", "key", "pair", "and", "include", "the", "private", "key", "if", "set", "to", "true", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java#L222-L232
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipEntryUtil.java
ZipEntryUtil.addEntry
static void addEntry(ZipEntry zipEntry, InputStream in, ZipOutputStream out) throws IOException { """ Adds a given ZIP entry to a ZIP file. @param zipEntry new ZIP entry. @param in contents of the ZIP entry. @param out target ZIP stream. """ out.putNextEntry(zipEntry); if (in != null) { I...
java
static void addEntry(ZipEntry zipEntry, InputStream in, ZipOutputStream out) throws IOException { out.putNextEntry(zipEntry); if (in != null) { IOUtils.copy(in, out); } out.closeEntry(); }
[ "static", "void", "addEntry", "(", "ZipEntry", "zipEntry", ",", "InputStream", "in", ",", "ZipOutputStream", "out", ")", "throws", "IOException", "{", "out", ".", "putNextEntry", "(", "zipEntry", ")", ";", "if", "(", "in", "!=", "null", ")", "{", "IOUtils"...
Adds a given ZIP entry to a ZIP file. @param zipEntry new ZIP entry. @param in contents of the ZIP entry. @param out target ZIP stream.
[ "Adds", "a", "given", "ZIP", "entry", "to", "a", "ZIP", "file", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipEntryUtil.java#L128-L134
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Collections2.java
Collections2.safeContains
static boolean safeContains(Collection<?> collection, @Nullable Object object) { """ Delegates to {@link Collection#contains}. Returns {@code false} if the {@code contains} method throws a {@code ClassCastException} or {@code NullPointerException}. """ checkNotNull(collection); try { return col...
java
static boolean safeContains(Collection<?> collection, @Nullable Object object) { checkNotNull(collection); try { return collection.contains(object); } catch (ClassCastException e) { return false; } catch (NullPointerException e) { return false; } }
[ "static", "boolean", "safeContains", "(", "Collection", "<", "?", ">", "collection", ",", "@", "Nullable", "Object", "object", ")", "{", "checkNotNull", "(", "collection", ")", ";", "try", "{", "return", "collection", ".", "contains", "(", "object", ")", "...
Delegates to {@link Collection#contains}. Returns {@code false} if the {@code contains} method throws a {@code ClassCastException} or {@code NullPointerException}.
[ "Delegates", "to", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Collections2.java#L101-L110
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java
CalligraphyUtils.applyFontToTextView
public static boolean applyFontToTextView(final Context context, final TextView textView, final String filePath) { """ Useful for manually fonts to a TextView. Will not default back to font set in {@link uk.co.chrisjenx.calligraphy.CalligraphyConfig} @param context Context @param textView Not null, TextView ...
java
public static boolean applyFontToTextView(final Context context, final TextView textView, final String filePath) { return applyFontToTextView(context, textView, filePath, false); }
[ "public", "static", "boolean", "applyFontToTextView", "(", "final", "Context", "context", ",", "final", "TextView", "textView", ",", "final", "String", "filePath", ")", "{", "return", "applyFontToTextView", "(", "context", ",", "textView", ",", "filePath", ",", ...
Useful for manually fonts to a TextView. Will not default back to font set in {@link uk.co.chrisjenx.calligraphy.CalligraphyConfig} @param context Context @param textView Not null, TextView to apply to. @param filePath if null/empty will do nothing. @return true if fonts been applied
[ "Useful", "for", "manually", "fonts", "to", "a", "TextView", ".", "Will", "not", "default", "back", "to", "font", "set", "in", "{", "@link", "uk", ".", "co", ".", "chrisjenx", ".", "calligraphy", ".", "CalligraphyConfig", "}" ]
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java#L107-L109
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.generateUniqueCodes
public void generateUniqueCodes(final String couponCode, final Coupon coupon) { """ Generates unique codes for a bulk coupon. @param couponCode recurly coupon code (must have been created as type: bulk) @param coupon A coupon with number of unique codes set """ doPOST(Coupon.COUPON_RESOURCE + "/" +...
java
public void generateUniqueCodes(final String couponCode, final Coupon coupon) { doPOST(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.GENERATE_RESOURCE, coupon, null); }
[ "public", "void", "generateUniqueCodes", "(", "final", "String", "couponCode", ",", "final", "Coupon", "coupon", ")", "{", "doPOST", "(", "Coupon", ".", "COUPON_RESOURCE", "+", "\"/\"", "+", "couponCode", "+", "Coupon", ".", "GENERATE_RESOURCE", ",", "coupon", ...
Generates unique codes for a bulk coupon. @param couponCode recurly coupon code (must have been created as type: bulk) @param coupon A coupon with number of unique codes set
[ "Generates", "unique", "codes", "for", "a", "bulk", "coupon", "." ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1731-L1734
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateFleetResult.java
CreateFleetResult.withTags
public CreateFleetResult withTags(java.util.Map<String, String> tags) { """ <p> The list of all tags added to the fleet. </p> @param tags The list of all tags added to the fleet. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); r...
java
public CreateFleetResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateFleetResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The list of all tags added to the fleet. </p> @param tags The list of all tags added to the fleet. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "list", "of", "all", "tags", "added", "to", "the", "fleet", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateFleetResult.java#L206-L209
ThreeTen/threetenbp
src/main/java/org/threeten/bp/zone/TzdbZoneRulesCompiler.java
TzdbZoneRulesCompiler.parseZoneLine
private boolean parseZoneLine(StringTokenizer st, List<TZDBZone> zoneList) { """ Parses a Zone line. @param st the tokenizer, not null @return true if the zone is complete """ TZDBZone zone = new TZDBZone(); zoneList.add(zone); zone.standardOffset = parseOffset(st.nextToken()); ...
java
private boolean parseZoneLine(StringTokenizer st, List<TZDBZone> zoneList) { TZDBZone zone = new TZDBZone(); zoneList.add(zone); zone.standardOffset = parseOffset(st.nextToken()); String savingsRule = parseOptional(st.nextToken()); if (savingsRule == null) { zone.fixe...
[ "private", "boolean", "parseZoneLine", "(", "StringTokenizer", "st", ",", "List", "<", "TZDBZone", ">", "zoneList", ")", "{", "TZDBZone", "zone", "=", "new", "TZDBZone", "(", ")", ";", "zoneList", ".", "add", "(", "zone", ")", ";", "zone", ".", "standard...
Parses a Zone line. @param st the tokenizer, not null @return true if the zone is complete
[ "Parses", "a", "Zone", "line", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/zone/TzdbZoneRulesCompiler.java#L731-L758
acromusashi/acromusashi-stream-ml
src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java
LofCalculator.updateKDistance
protected static void updateKDistance(int kn, LofPoint targetPoint, LofDataSet dataSet) { """ 対象点のK距離とK距離近傍データのIDを更新する。 @param kn K値 @param targetPoint 判定対象点 @param dataSet 全体データ """ // 対象点のK距離、K距離近傍を算出する。 KDistanceResult kResult = calculateKDistance(kn, targetPoint, dataSet); targ...
java
protected static void updateKDistance(int kn, LofPoint targetPoint, LofDataSet dataSet) { // 対象点のK距離、K距離近傍を算出する。 KDistanceResult kResult = calculateKDistance(kn, targetPoint, dataSet); targetPoint.setkDistance(kResult.getkDistance()); targetPoint.setkDistanceNeighbor(kResult.getkDist...
[ "protected", "static", "void", "updateKDistance", "(", "int", "kn", ",", "LofPoint", "targetPoint", ",", "LofDataSet", "dataSet", ")", "{", "// 対象点のK距離、K距離近傍を算出する。", "KDistanceResult", "kResult", "=", "calculateKDistance", "(", "kn", ",", "targetPoint", ",", "dataSe...
対象点のK距離とK距離近傍データのIDを更新する。 @param kn K値 @param targetPoint 判定対象点 @param dataSet 全体データ
[ "対象点のK距離とK距離近傍データのIDを更新する。" ]
train
https://github.com/acromusashi/acromusashi-stream-ml/blob/26d6799a917cacda68e21d506c75cfeb17d832a6/src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java#L331-L337
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.sshKey_keyName_PUT
public void sshKey_keyName_PUT(String keyName, OvhSshKey body) throws IOException { """ Alter this object properties REST: PUT /me/sshKey/{keyName} @param body [required] New object properties @param keyName [required] Name of this public SSH key """ String qPath = "/me/sshKey/{keyName}"; StringBuilde...
java
public void sshKey_keyName_PUT(String keyName, OvhSshKey body) throws IOException { String qPath = "/me/sshKey/{keyName}"; StringBuilder sb = path(qPath, keyName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "sshKey_keyName_PUT", "(", "String", "keyName", ",", "OvhSshKey", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/sshKey/{keyName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "keyName", ")", ";", ...
Alter this object properties REST: PUT /me/sshKey/{keyName} @param body [required] New object properties @param keyName [required] Name of this public SSH key
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1306-L1310
recommenders/rival
rival-evaluate/src/main/java/net/recommenders/rival/evaluation/strategy/MultipleStrategyRunner.java
MultipleStrategyRunner.generateOutput
public static void generateOutput(final DataModelIF<Long, Long> testModel, final Map<Long, List<Pair<Long, Double>>> mapUserRecommendations, final EvaluationStrategy<Long, Long> strategy, final EvaluationStrategy.OUTPUT_FORMAT format, final File rankingFolder, final File groundtruthFolder, final...
java
public static void generateOutput(final DataModelIF<Long, Long> testModel, final Map<Long, List<Pair<Long, Double>>> mapUserRecommendations, final EvaluationStrategy<Long, Long> strategy, final EvaluationStrategy.OUTPUT_FORMAT format, final File rankingFolder, final File groundtruthFolder, final...
[ "public", "static", "void", "generateOutput", "(", "final", "DataModelIF", "<", "Long", ",", "Long", ">", "testModel", ",", "final", "Map", "<", "Long", ",", "List", "<", "Pair", "<", "Long", ",", "Double", ">", ">", ">", "mapUserRecommendations", ",", "...
Runs multiple strategies on some data and outputs the result into a file. @param testModel The test datamodel. @param mapUserRecommendations A map with the recommendations for the users. @param strategy The strategy to use. @param format The format of the printer @param rankingFolder Where to write output. @param grou...
[ "Runs", "multiple", "strategies", "on", "some", "data", "and", "outputs", "the", "result", "into", "a", "file", "." ]
train
https://github.com/recommenders/rival/blob/6ee8223e91810ae1c6052899595af3906e0c34c6/rival-evaluate/src/main/java/net/recommenders/rival/evaluation/strategy/MultipleStrategyRunner.java#L300-L308
JodaOrg/joda-time
src/main/java/org/joda/time/PeriodType.java
PeriodType.addIndexedField
boolean addIndexedField(ReadablePeriod period, int index, int[] values, int valueToAdd) { """ Adds to the indexed field part of the period. @param period the period to query @param index the index to use @param values the array to populate @param valueToAdd the value to add @return true if the array is ...
java
boolean addIndexedField(ReadablePeriod period, int index, int[] values, int valueToAdd) { if (valueToAdd == 0) { return false; } int realIndex = iIndices[index]; if (realIndex == -1) { throw new UnsupportedOperationException("Field is not supported"); } ...
[ "boolean", "addIndexedField", "(", "ReadablePeriod", "period", ",", "int", "index", ",", "int", "[", "]", "values", ",", "int", "valueToAdd", ")", "{", "if", "(", "valueToAdd", "==", "0", ")", "{", "return", "false", ";", "}", "int", "realIndex", "=", ...
Adds to the indexed field part of the period. @param period the period to query @param index the index to use @param values the array to populate @param valueToAdd the value to add @return true if the array is updated @throws UnsupportedOperationException if not supported
[ "Adds", "to", "the", "indexed", "field", "part", "of", "the", "period", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/PeriodType.java#L706-L716
wildfly-swarm-archive/ARCHIVE-wildfly-swarm
container/api/src/main/java/org/wildfly/swarm/container/Container.java
Container.iface
public Container iface(String name, String expression) { """ Configure a network interface. @param name The name of the interface. @param expression The expression to define the interface. @return The container. """ this.interfaces.add(new Interface(name, expression)); return this; ...
java
public Container iface(String name, String expression) { this.interfaces.add(new Interface(name, expression)); return this; }
[ "public", "Container", "iface", "(", "String", "name", ",", "String", "expression", ")", "{", "this", ".", "interfaces", ".", "add", "(", "new", "Interface", "(", "name", ",", "expression", ")", ")", ";", "return", "this", ";", "}" ]
Configure a network interface. @param name The name of the interface. @param expression The expression to define the interface. @return The container.
[ "Configure", "a", "network", "interface", "." ]
train
https://github.com/wildfly-swarm-archive/ARCHIVE-wildfly-swarm/blob/28ef71bcfa743a7267666e0ed2919c37b356c09b/container/api/src/main/java/org/wildfly/swarm/container/Container.java#L316-L319
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.emailAddress
public static Validator<CharSequence> emailAddress(@NonNull final Context context, @StringRes final int resourceId) { """ Creates and returns a validator, which allows to validate texts to ensure, that they represent valid email addresses. Empty texts are als...
java
public static Validator<CharSequence> emailAddress(@NonNull final Context context, @StringRes final int resourceId) { return new EmailAddressValidator(context, resourceId); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "emailAddress", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ")", "{", "return", "new", "EmailAddressValidator", "(", "context", ",", "resource...
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid email addresses. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param resourceId...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "represent", "valid", "email", "addresses", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L1042-L1045
alkacon/opencms-core
src/org/opencms/util/CmsPathTree.java
CmsPathTree.setValue
public void setValue(List<P> path, V value) { """ Sets the value for the sub-path given, starting from this node.<p> @param path the path @param value the value to set """ ensureNode(path).setValue(value); }
java
public void setValue(List<P> path, V value) { ensureNode(path).setValue(value); }
[ "public", "void", "setValue", "(", "List", "<", "P", ">", "path", ",", "V", "value", ")", "{", "ensureNode", "(", "path", ")", ".", "setValue", "(", "value", ")", ";", "}" ]
Sets the value for the sub-path given, starting from this node.<p> @param path the path @param value the value to set
[ "Sets", "the", "value", "for", "the", "sub", "-", "path", "given", "starting", "from", "this", "node", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsPathTree.java#L181-L185
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipAssert.java
SipAssert.assertNoSubscriptionErrors
public static void assertNoSubscriptionErrors(String msg, EventSubscriber subscription) { """ Asserts that the given Subscription has not encountered any errors while processing received subscription responses and received NOTIFY requests. Assertion failure output includes the given message text along with the e...
java
public static void assertNoSubscriptionErrors(String msg, EventSubscriber subscription) { assertNotNull("Null assert object passed in", subscription); StringBuffer buf = new StringBuffer(msg == null ? "Subscription error(s)" : msg); Iterator<String> i = subscription.getEventErrors().iterator(); wh...
[ "public", "static", "void", "assertNoSubscriptionErrors", "(", "String", "msg", ",", "EventSubscriber", "subscription", ")", "{", "assertNotNull", "(", "\"Null assert object passed in\"", ",", "subscription", ")", ";", "StringBuffer", "buf", "=", "new", "StringBuffer", ...
Asserts that the given Subscription has not encountered any errors while processing received subscription responses and received NOTIFY requests. Assertion failure output includes the given message text along with the encountered error(s). @param msg message text to include if the assertion fails. @param subscription ...
[ "Asserts", "that", "the", "given", "Subscription", "has", "not", "encountered", "any", "errors", "while", "processing", "received", "subscription", "responses", "and", "received", "NOTIFY", "requests", ".", "Assertion", "failure", "output", "includes", "the", "given...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipAssert.java#L767-L778
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion7.java
CmsImportVersion7.addResourceRelationRules
protected void addResourceRelationRules(Digester digester, String xpath) { """ Adds the XML digester rules for resource relations.<p> @param digester the digester to add the rules to @param xpath the base xpath for the rules """ String xp_rels = xpath + N_RELATIONS + "/" + N_RELATION; dige...
java
protected void addResourceRelationRules(Digester digester, String xpath) { String xp_rels = xpath + N_RELATIONS + "/" + N_RELATION; digester.addCallMethod(xp_rels, "addRelation"); digester.addCallMethod(xp_rels + "/" + N_ID, "setRelationId", 0); digester.addCallMethod(xp_rels + "/" + N_...
[ "protected", "void", "addResourceRelationRules", "(", "Digester", "digester", ",", "String", "xpath", ")", "{", "String", "xp_rels", "=", "xpath", "+", "N_RELATIONS", "+", "\"/\"", "+", "N_RELATION", ";", "digester", ".", "addCallMethod", "(", "xp_rels", ",", ...
Adds the XML digester rules for resource relations.<p> @param digester the digester to add the rules to @param xpath the base xpath for the rules
[ "Adds", "the", "XML", "digester", "rules", "for", "resource", "relations", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion7.java#L3112-L3119
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/DBIDUtil.java
DBIDUtil.internalIntersectionSize
private static int internalIntersectionSize(DBIDs first, DBIDs second) { """ Compute the set intersection size of two sets. @param first First set @param second Second set @return size """ second = second.size() > 16 && !(second instanceof SetDBIDs) ? newHashSet(second) : second; int c = 0; fo...
java
private static int internalIntersectionSize(DBIDs first, DBIDs second) { second = second.size() > 16 && !(second instanceof SetDBIDs) ? newHashSet(second) : second; int c = 0; for(DBIDIter it = first.iter(); it.valid(); it.advance()) { if(second.contains(it)) { c++; } } return c;...
[ "private", "static", "int", "internalIntersectionSize", "(", "DBIDs", "first", ",", "DBIDs", "second", ")", "{", "second", "=", "second", ".", "size", "(", ")", ">", "16", "&&", "!", "(", "second", "instanceof", "SetDBIDs", ")", "?", "newHashSet", "(", "...
Compute the set intersection size of two sets. @param first First set @param second Second set @return size
[ "Compute", "the", "set", "intersection", "size", "of", "two", "sets", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/DBIDUtil.java#L354-L363
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java
OverrideHelper.getResolvedFeatures
public ResolvedFeatures getResolvedFeatures(JvmDeclaredType type) { """ Returns the resolved features that are defined in the given <code>type</code> and its supertypes. Considers private methods of super types, too. @param type the type. Has to be contained in a resource. @return the resolved features. """...
java
public ResolvedFeatures getResolvedFeatures(JvmDeclaredType type) { ITypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type.eResource().getResourceSet()); LightweightTypeReference contextType = owner.toLightweightTypeReference(type); return getResolvedFeatures(contextType); }
[ "public", "ResolvedFeatures", "getResolvedFeatures", "(", "JvmDeclaredType", "type", ")", "{", "ITypeReferenceOwner", "owner", "=", "new", "StandardTypeReferenceOwner", "(", "services", ",", "type", ".", "eResource", "(", ")", ".", "getResourceSet", "(", ")", ")", ...
Returns the resolved features that are defined in the given <code>type</code> and its supertypes. Considers private methods of super types, too. @param type the type. Has to be contained in a resource. @return the resolved features.
[ "Returns", "the", "resolved", "features", "that", "are", "defined", "in", "the", "given", "<code", ">", "type<", "/", "code", ">", "and", "its", "supertypes", ".", "Considers", "private", "methods", "of", "super", "types", "too", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java#L190-L194
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java
FileOperations.getFileFromComputeNode
public void getFileFromComputeNode(String poolId, String nodeId, String fileName, OutputStream outputStream) throws BatchErrorException, IOException { """ Downloads the specified file from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the c...
java
public void getFileFromComputeNode(String poolId, String nodeId, String fileName, OutputStream outputStream) throws BatchErrorException, IOException { getFileFromComputeNode(poolId, nodeId, fileName, null, outputStream); }
[ "public", "void", "getFileFromComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "fileName", ",", "OutputStream", "outputStream", ")", "throws", "BatchErrorException", ",", "IOException", "{", "getFileFromComputeNode", "(", "poolId", ",", ...
Downloads the specified file from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node. @param fileName The name of the file to download. @param outputStream A stream into which the file contents will be written. @throws BatchErrorExcepti...
[ "Downloads", "the", "specified", "file", "from", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java#L297-L299
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java
CommonDatabaseMetaData.getColumnPrivileges
public ResultSet getColumnPrivileges(final String catalog, final String schema, final String table, final String columnNamePattern) throws SQLException { """ Retrieves a description of the access rights for a table's columns. <p/> <P>Only privileges matching the column name criteria are returned. Th...
java
public ResultSet getColumnPrivileges(final String catalog, final String schema, final String table, final String columnNamePattern) throws SQLException { log.info("getting empty result set, column privileges"); return getEmptyResultSet(); }
[ "public", "ResultSet", "getColumnPrivileges", "(", "final", "String", "catalog", ",", "final", "String", "schema", ",", "final", "String", "table", ",", "final", "String", "columnNamePattern", ")", "throws", "SQLException", "{", "log", ".", "info", "(", "\"getti...
Retrieves a description of the access rights for a table's columns. <p/> <P>Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE. <p/> <P>Each privilige description has the following columns: <OL> <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</...
[ "Retrieves", "a", "description", "of", "the", "access", "rights", "for", "a", "table", "s", "columns", ".", "<p", "/", ">", "<P", ">", "Only", "privileges", "matching", "the", "column", "name", "criteria", "are", "returned", ".", "They", "are", "ordered", ...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java#L1586-L1590
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/SubscriptionMessageHandler.java
SubscriptionMessageHandler.resetCreateSubscriptionMessage
protected void resetCreateSubscriptionMessage(MESubscription subscription, boolean isLocalBus) { """ Method to reset the Subscription message object and reinitialise it as a create proxy subscription message @param subscription The subscription to add to the message. @param isLocalBus The subscription is ...
java
protected void resetCreateSubscriptionMessage(MESubscription subscription, boolean isLocalBus) { if (tc.isEntryEnabled()) SibTr.entry(tc, "resetCreateSubscriptionMessage", new Object[]{subscription, new Boolean(isLocalBus)}); // Reset the state reset(); // Indicate that this is a create messag...
[ "protected", "void", "resetCreateSubscriptionMessage", "(", "MESubscription", "subscription", ",", "boolean", "isLocalBus", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"resetCreateSubscriptionMessage\"", ...
Method to reset the Subscription message object and reinitialise it as a create proxy subscription message @param subscription The subscription to add to the message. @param isLocalBus The subscription is being sent to a the local bus
[ "Method", "to", "reset", "the", "Subscription", "message", "object", "and", "reinitialise", "it", "as", "a", "create", "proxy", "subscription", "message" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/SubscriptionMessageHandler.java#L172-L208
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/InputSplitTracker.java
InputSplitTracker.addInputSplitToLog
void addInputSplitToLog(final ExecutionVertex vertex, final int sequenceNumber, final InputSplit inputSplit) { """ Adds the given input split to the vertex's log and stores it under the specified sequence number. @param vertex the vertex for which the input split shall be stored @param sequenceNumber the seq...
java
void addInputSplitToLog(final ExecutionVertex vertex, final int sequenceNumber, final InputSplit inputSplit) { final List<InputSplit> inputSplitLog = this.splitMap.get(vertex.getID()); if (inputSplitLog == null) { LOG.error("Cannot find input split log for vertex " + vertex + " (" + vertex.getID() + ")"); re...
[ "void", "addInputSplitToLog", "(", "final", "ExecutionVertex", "vertex", ",", "final", "int", "sequenceNumber", ",", "final", "InputSplit", "inputSplit", ")", "{", "final", "List", "<", "InputSplit", ">", "inputSplitLog", "=", "this", ".", "splitMap", ".", "get"...
Adds the given input split to the vertex's log and stores it under the specified sequence number. @param vertex the vertex for which the input split shall be stored @param sequenceNumber the sequence number identifying the log entry under which the input split shall be stored @param inputSplit the input split to be st...
[ "Adds", "the", "given", "input", "split", "to", "the", "vertex", "s", "log", "and", "stores", "it", "under", "the", "specified", "sequence", "number", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/InputSplitTracker.java#L143-L160
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
ConfigurationAbstractImpl.getString
public String getString(String key, String defaultValue) { """ Returns the string value for the specified key. If no value for this key is found in the configuration <code>defaultValue</code> is returned. @param key the key @param defaultValue the default value @return the value for the key, or <code>default...
java
public String getString(String key, String defaultValue) { String ret = properties.getProperty(key); if (ret == null) { if(defaultValue == null) { logger.info("No value for key '" + key + "'"); } else { ...
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "ret", "=", "properties", ".", "getProperty", "(", "key", ")", ";", "if", "(", "ret", "==", "null", ")", "{", "if", "(", "defaultValue", "==", "nu...
Returns the string value for the specified key. If no value for this key is found in the configuration <code>defaultValue</code> is returned. @param key the key @param defaultValue the default value @return the value for the key, or <code>defaultValue</code>
[ "Returns", "the", "string", "value", "for", "the", "specified", "key", ".", "If", "no", "value", "for", "this", "key", "is", "found", "in", "the", "configuration", "<code", ">", "defaultValue<", "/", "code", ">", "is", "returned", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java#L78-L98
shrinkwrap/descriptors
metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/PackageInfo.java
PackageInfo.copy
public static void copy(final File sourceFile, final String destDirectory, final boolean verbose) throws IOException { """ Copies the given sourceFile into the specified directory. The source file post fix defines which variant of the package info file is created. <p> If the source file ends with <code>.java</c...
java
public static void copy(final File sourceFile, final String destDirectory, final boolean verbose) throws IOException { String destFileName = PACKAGE_HTML_NAME; if (sourceFile.getName().endsWith("java")) { destFileName = PACKAGE_JAVA_NAME; } final File destFile = new File(des...
[ "public", "static", "void", "copy", "(", "final", "File", "sourceFile", ",", "final", "String", "destDirectory", ",", "final", "boolean", "verbose", ")", "throws", "IOException", "{", "String", "destFileName", "=", "PACKAGE_HTML_NAME", ";", "if", "(", "sourceFil...
Copies the given sourceFile into the specified directory. The source file post fix defines which variant of the package info file is created. <p> If the source file ends with <code>.java</code>, then the destination file name is <code>package-info.java</code> otherwise the file name is <code>package.html</code>. @para...
[ "Copies", "the", "given", "sourceFile", "into", "the", "specified", "directory", ".", "The", "source", "file", "post", "fix", "defines", "which", "variant", "of", "the", "package", "info", "file", "is", "created", ".", "<p", ">", "If", "the", "source", "fi...
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/PackageInfo.java#L72-L84
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java
MmffAtomTypeMatcher.symbolicTypes
String[] symbolicTypes(final IAtomContainer container) { """ Obtain the MMFF symbolic types to the atoms of the provided structure. @param container structure representation @return MMFF symbolic types for each atom index """ EdgeToBondMap bonds = EdgeToBondMap.withSpaceFor(container); int[...
java
String[] symbolicTypes(final IAtomContainer container) { EdgeToBondMap bonds = EdgeToBondMap.withSpaceFor(container); int[][] graph = GraphUtil.toAdjList(container, bonds); return symbolicTypes(container, graph, bonds, new HashSet<IBond>()); }
[ "String", "[", "]", "symbolicTypes", "(", "final", "IAtomContainer", "container", ")", "{", "EdgeToBondMap", "bonds", "=", "EdgeToBondMap", ".", "withSpaceFor", "(", "container", ")", ";", "int", "[", "]", "[", "]", "graph", "=", "GraphUtil", ".", "toAdjList...
Obtain the MMFF symbolic types to the atoms of the provided structure. @param container structure representation @return MMFF symbolic types for each atom index
[ "Obtain", "the", "MMFF", "symbolic", "types", "to", "the", "atoms", "of", "the", "provided", "structure", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java#L102-L106
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.addGroup
public Group addGroup(String name, String path) throws GitLabApiException { """ Creates a new project group. Available only for users who can create groups. <pre><code>GitLab Endpoint: POST /groups</code></pre> @param name the name of the group to add @param path the path for the group @return the created ...
java
public Group addGroup(String name, String path) throws GitLabApiException { Form formData = new Form(); formData.param("name", name); formData.param("path", path); Response response = post(Response.Status.CREATED, formData, "groups"); return (response.readEntity(Group.class)); ...
[ "public", "Group", "addGroup", "(", "String", "name", ",", "String", "path", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "Form", "(", ")", ";", "formData", ".", "param", "(", "\"name\"", ",", "name", ")", ";", "formData", "....
Creates a new project group. Available only for users who can create groups. <pre><code>GitLab Endpoint: POST /groups</code></pre> @param name the name of the group to add @param path the path for the group @return the created Group instance @throws GitLabApiException if any exception occurs
[ "Creates", "a", "new", "project", "group", ".", "Available", "only", "for", "users", "who", "can", "create", "groups", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L468-L475
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java
MSPDITimephasedWorkNormaliser.validateSameDay
private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list) { """ Ensures that the start and end dates for ranges fit within the working times for a given day. @param calendar current calendar @param list assignment data """ for (TimephasedWork assignment : list) { ...
java
private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list) { for (TimephasedWork assignment : list) { Date assignmentStart = assignment.getStart(); Date calendarStartTime = calendar.getStartTime(assignmentStart); Date assignmentStartTime = DateHelpe...
[ "private", "void", "validateSameDay", "(", "ProjectCalendar", "calendar", ",", "LinkedList", "<", "TimephasedWork", ">", "list", ")", "{", "for", "(", "TimephasedWork", "assignment", ":", "list", ")", "{", "Date", "assignmentStart", "=", "assignment", ".", "getS...
Ensures that the start and end dates for ranges fit within the working times for a given day. @param calendar current calendar @param list assignment data
[ "Ensures", "that", "the", "start", "and", "end", "dates", "for", "ranges", "fit", "within", "the", "working", "times", "for", "a", "given", "day", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java#L279-L309
baratine/baratine
web/src/main/java/com/caucho/v5/io/SocketChannelStream.java
SocketChannelStream.readTimeout
@Override public int readTimeout(byte []buf, int offset, int length, long timeout) throws IOException { """ Reads bytes from the socket. @param buf byte buffer receiving the bytes @param offset offset into the buffer @param length number of bytes to read @return number of bytes read or -1 @exception t...
java
@Override public int readTimeout(byte []buf, int offset, int length, long timeout) throws IOException { return read(buf, offset, length); /* Socket s = _s; if (s == null) { return -1; } int oldTimeout = s.getSoTimeout(); s.setSoTimeout((int) timeout); try {...
[ "@", "Override", "public", "int", "readTimeout", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ",", "long", "timeout", ")", "throws", "IOException", "{", "return", "read", "(", "buf", ",", "offset", ",", "length", ")", ";", ...
Reads bytes from the socket. @param buf byte buffer receiving the bytes @param offset offset into the buffer @param length number of bytes to read @return number of bytes read or -1 @exception throws ClientDisconnectException if the connection is dropped
[ "Reads", "bytes", "from", "the", "socket", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/SocketChannelStream.java#L273-L304
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/api/support/DefaultPageMounter.java
DefaultPageMounter.dispose
public void dispose() { """ Automatically unregister the {@link org.ops4j.pax.wicket.api.PageMounter} from the OSGi registry """ synchronized (this) { if (serviceRegistration == null) { throw new IllegalStateException(String.format("%s [%s] had not been registered.", getClas...
java
public void dispose() { synchronized (this) { if (serviceRegistration == null) { throw new IllegalStateException(String.format("%s [%s] had not been registered.", getClass() .getSimpleName(), this)); } serviceRegistration.unregister(); ...
[ "public", "void", "dispose", "(", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "serviceRegistration", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "String", ".", "format", "(", "\"%s [%s] had not been registered.\"", ",", ...
Automatically unregister the {@link org.ops4j.pax.wicket.api.PageMounter} from the OSGi registry
[ "Automatically", "unregister", "the", "{" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/api/support/DefaultPageMounter.java#L87-L96
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java
Interpolate1D_F32.setInput
public void setInput(float x[], float y[], int size) { """ Sets the data that is being interpolated. @param x Where the points are sample at. Not modifed. Reference saved. @param y The value at the sample points. Not modifed. Reference saved. @param size The number of points used. """ if (x.length < siz...
java
public void setInput(float x[], float y[], int size) { if (x.length < size || y.length < size) { throw new IllegalArgumentException("Arrays too small for size."); } if (size < M) { throw new IllegalArgumentException("Not enough data points for M"); } this.x = x; this.y = y; this.size = size; this...
[ "public", "void", "setInput", "(", "float", "x", "[", "]", ",", "float", "y", "[", "]", ",", "int", "size", ")", "{", "if", "(", "x", ".", "length", "<", "size", "||", "y", ".", "length", "<", "size", ")", "{", "throw", "new", "IllegalArgumentExc...
Sets the data that is being interpolated. @param x Where the points are sample at. Not modifed. Reference saved. @param y The value at the sample points. Not modifed. Reference saved. @param size The number of points used.
[ "Sets", "the", "data", "that", "is", "being", "interpolated", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java#L80-L93
beihaifeiwu/dolphin
dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/formatter/StringHelper.java
StringHelper.partiallyUnqualify
public static String partiallyUnqualify(String name, String qualifierBase) { """ Partially unqualifies a qualified name. For example, with a base of 'org.hibernate' the name 'org.hibernate.internal.util.StringHelper' would become 'util.StringHelper'. @param name The (potentially) qualified name. @pa...
java
public static String partiallyUnqualify(String name, String qualifierBase) { if (name == null || !name.startsWith(qualifierBase)) { return name; } return name.substring(qualifierBase.length() + 1); // +1 to start after the following '.' }
[ "public", "static", "String", "partiallyUnqualify", "(", "String", "name", ",", "String", "qualifierBase", ")", "{", "if", "(", "name", "==", "null", "||", "!", "name", ".", "startsWith", "(", "qualifierBase", ")", ")", "{", "return", "name", ";", "}", "...
Partially unqualifies a qualified name. For example, with a base of 'org.hibernate' the name 'org.hibernate.internal.util.StringHelper' would become 'util.StringHelper'. @param name The (potentially) qualified name. @param qualifierBase The qualifier base. @return The name itself, or the partially unqualifie...
[ "Partially", "unqualifies", "a", "qualified", "name", ".", "For", "example", "with", "a", "base", "of", "org", ".", "hibernate", "the", "name", "org", ".", "hibernate", ".", "internal", ".", "util", ".", "StringHelper", "would", "become", "util", ".", "Str...
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/formatter/StringHelper.java#L270-L275
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.fromRunnable
public static <R> Observable<R> fromRunnable(final Runnable run, final R result, Scheduler scheduler) { """ Return an Observable that calls the given Runnable and emits the given result when an Observer subscribes. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/fromRu...
java
public static <R> Observable<R> fromRunnable(final Runnable run, final R result, Scheduler scheduler) { return Observable.create(OperatorFromFunctionals.fromRunnable(run, result)).subscribeOn(scheduler); }
[ "public", "static", "<", "R", ">", "Observable", "<", "R", ">", "fromRunnable", "(", "final", "Runnable", "run", ",", "final", "R", "result", ",", "Scheduler", "scheduler", ")", "{", "return", "Observable", ".", "create", "(", "OperatorFromFunctionals", ".",...
Return an Observable that calls the given Runnable and emits the given result when an Observer subscribes. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/fromRunnable.s.png" alt=""> @param <R> the return type @param run the runnable to invoke on each subscription @param sche...
[ "Return", "an", "Observable", "that", "calls", "the", "given", "Runnable", "and", "emits", "the", "given", "result", "when", "an", "Observer", "subscribes", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L2077-L2079
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/BaseChart.java
BaseChart.onSizeChanged
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { """ This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0. @param w Current width of this view. @param h Current height of t...
java
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); mWidth = w; mHeight = h; mLeftPadding = getPaddingLeft(); mTopPadding = getPaddingTop(); mRightPadding = getPaddingRight(); mBottomPadd...
[ "@", "Override", "protected", "void", "onSizeChanged", "(", "int", "w", ",", "int", "h", ",", "int", "oldw", ",", "int", "oldh", ")", "{", "super", ".", "onSizeChanged", "(", "w", ",", "h", ",", "oldw", ",", "oldh", ")", ";", "mWidth", "=", "w", ...
This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0. @param w Current width of this view. @param h Current height of this view. @param oldw Old width of this view. @param oldh Old height of this view.
[ "This", "is", "called", "during", "layout", "when", "the", "size", "of", "this", "view", "has", "changed", ".", "If", "you", "were", "just", "added", "to", "the", "view", "hierarchy", "you", "re", "called", "with", "the", "old", "values", "of", "0", "....
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/BaseChart.java#L232-L247
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseShortObj
@Nullable public static Short parseShortObj (@Nullable final Object aObject, @Nullable final Short aDefault) { """ Parse the given {@link Object} as {@link Short} with radix {@value #DEFAULT_RADIX}. @param aObject The object to parse. May be <code>null</code>. @param aDefault The default value to be retur...
java
@Nullable public static Short parseShortObj (@Nullable final Object aObject, @Nullable final Short aDefault) { return parseShortObj (aObject, DEFAULT_RADIX, aDefault); }
[ "@", "Nullable", "public", "static", "Short", "parseShortObj", "(", "@", "Nullable", "final", "Object", "aObject", ",", "@", "Nullable", "final", "Short", "aDefault", ")", "{", "return", "parseShortObj", "(", "aObject", ",", "DEFAULT_RADIX", ",", "aDefault", "...
Parse the given {@link Object} as {@link Short} with radix {@value #DEFAULT_RADIX}. @param aObject The object to parse. May be <code>null</code>. @param aDefault The default value to be returned if the passed object cannot be converted to a Short. May be <code>null</code>. @return <code>aDefault</code> if the object d...
[ "Parse", "the", "given", "{", "@link", "Object", "}", "as", "{", "@link", "Short", "}", "with", "radix", "{", "@value", "#DEFAULT_RADIX", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L1277-L1281
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java
DRL5Expressions.innerCreator
public final void innerCreator() throws RecognitionException { """ src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:614:1: innerCreator :{...}? => ID classCreatorRest ; """ try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:615:5: ({...}? => ID classCreatorRest ) // src...
java
public final void innerCreator() throws RecognitionException { try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:615:5: ({...}? => ID classCreatorRest ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:615:7: {...}? => ID classCreatorRest { if ( !((!(helper.validateIde...
[ "public", "final", "void", "innerCreator", "(", ")", "throws", "RecognitionException", "{", "try", "{", "// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:615:5: ({...}? => ID classCreatorRest )", "// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:615:7: {...}? ...
src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:614:1: innerCreator :{...}? => ID classCreatorRest ;
[ "src", "/", "main", "/", "resources", "/", "org", "/", "drools", "/", "compiler", "/", "lang", "/", "DRL5Expressions", ".", "g", ":", "614", ":", "1", ":", "innerCreator", ":", "{", "...", "}", "?", "=", ">", "ID", "classCreatorRest", ";" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java#L4860-L4885
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Bhattacharyya
public static double Bhattacharyya(double[] histogram1, double[] histogram2) { """ Bhattacharyya distance between two normalized histograms. @param histogram1 Normalized histogram. @param histogram2 Normalized histogram. @return The Bhattacharyya distance between the two histograms. """ int bins =...
java
public static double Bhattacharyya(double[] histogram1, double[] histogram2) { int bins = histogram1.length; // histogram bins double b = 0; // Bhattacharyya's coefficient for (int i = 0; i < bins; i++) b += Math.sqrt(histogram1[i]) * Math.sqrt(histogram2[i]); // Bhattachar...
[ "public", "static", "double", "Bhattacharyya", "(", "double", "[", "]", "histogram1", ",", "double", "[", "]", "histogram2", ")", "{", "int", "bins", "=", "histogram1", ".", "length", ";", "// histogram bins", "double", "b", "=", "0", ";", "// Bhattacharyya'...
Bhattacharyya distance between two normalized histograms. @param histogram1 Normalized histogram. @param histogram2 Normalized histogram. @return The Bhattacharyya distance between the two histograms.
[ "Bhattacharyya", "distance", "between", "two", "normalized", "histograms", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L68-L77
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalCell.java
CrystalCell.transfToOrthonormal
public Matrix4d transfToOrthonormal(Matrix4d m) { """ Transform given Matrix4d in crystal basis to the orthonormal basis using the PDB axes convention (NCODE=1) @param m @return """ Vector3d trans = new Vector3d(m.m03,m.m13,m.m23); transfToOrthonormal(trans); Matrix3d rot = new Matrix3d(); m.getRot...
java
public Matrix4d transfToOrthonormal(Matrix4d m) { Vector3d trans = new Vector3d(m.m03,m.m13,m.m23); transfToOrthonormal(trans); Matrix3d rot = new Matrix3d(); m.getRotationScale(rot); // see Giacovazzo section 2.E, eq. 2.E.1 // Rprime = MT-1 * R * MT rot.mul(this.getMTranspose()); rot.mul(this.getMTran...
[ "public", "Matrix4d", "transfToOrthonormal", "(", "Matrix4d", "m", ")", "{", "Vector3d", "trans", "=", "new", "Vector3d", "(", "m", ".", "m03", ",", "m", ".", "m13", ",", "m", ".", "m23", ")", ";", "transfToOrthonormal", "(", "trans", ")", ";", "Matrix...
Transform given Matrix4d in crystal basis to the orthonormal basis using the PDB axes convention (NCODE=1) @param m @return
[ "Transform", "given", "Matrix4d", "in", "crystal", "basis", "to", "the", "orthonormal", "basis", "using", "the", "PDB", "axes", "convention", "(", "NCODE", "=", "1", ")" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalCell.java#L280-L292
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/CGroupMemoryWatcher.java
CGroupMemoryWatcher.failTasksWithMaxMemory
private void failTasksWithMaxMemory(long memoryToRelease) { """ Starting from the tasks use the highest amount of memory, fail the tasks until the memory released meets the requirement @param memoryToRelease the mix memory to get released """ List<TaskAttemptID> allTasks = new ArrayList<TaskAttemptI...
java
private void failTasksWithMaxMemory(long memoryToRelease) { List<TaskAttemptID> allTasks = new ArrayList<TaskAttemptID>(); allTasks.addAll(processTreeInfoMap.keySet()); // Sort the tasks descendingly according to RSS memory usage Collections.sort(allTasks, new Comparator<TaskAttemptID>() { @...
[ "private", "void", "failTasksWithMaxMemory", "(", "long", "memoryToRelease", ")", "{", "List", "<", "TaskAttemptID", ">", "allTasks", "=", "new", "ArrayList", "<", "TaskAttemptID", ">", "(", ")", ";", "allTasks", ".", "addAll", "(", "processTreeInfoMap", ".", ...
Starting from the tasks use the highest amount of memory, fail the tasks until the memory released meets the requirement @param memoryToRelease the mix memory to get released
[ "Starting", "from", "the", "tasks", "use", "the", "highest", "amount", "of", "memory", "fail", "the", "tasks", "until", "the", "memory", "released", "meets", "the", "requirement" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/CGroupMemoryWatcher.java#L668-L703
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeDouble
public static int writeDouble(byte[] array, int offset, double v) { """ Write a double to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written """ return writeLong(array, offset, Double.doubleToLongBits(v)); ...
java
public static int writeDouble(byte[] array, int offset, double v) { return writeLong(array, offset, Double.doubleToLongBits(v)); }
[ "public", "static", "int", "writeDouble", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "double", "v", ")", "{", "return", "writeLong", "(", "array", ",", "offset", ",", "Double", ".", "doubleToLongBits", "(", "v", ")", ")", ";", "}" ]
Write a double to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written
[ "Write", "a", "double", "to", "the", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L168-L170
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java
NumberUtilities.isValidLong
public static boolean isValidLong(@Nullable final String longStr, final long lowerBound, final long upperBound, final boolean includeLowerBound, final boolean includeUpperBound) { """ Given a long integer string, it checks if it's a valid long (base on apaches NumberUtils.createLong) and if it's between the lower...
java
public static boolean isValidLong(@Nullable final String longStr, final long lowerBound, final long upperBound, final boolean includeLowerBound, final boolean includeUpperBound) { if (lowerBound > upperBound) { throw new IllegalArgumentException(ExceptionValues.INVALID_BOUNDS); } else if (!i...
[ "public", "static", "boolean", "isValidLong", "(", "@", "Nullable", "final", "String", "longStr", ",", "final", "long", "lowerBound", ",", "final", "long", "upperBound", ",", "final", "boolean", "includeLowerBound", ",", "final", "boolean", "includeUpperBound", ")...
Given a long integer string, it checks if it's a valid long (base on apaches NumberUtils.createLong) and if it's between the lowerBound and upperBound. @param longStr the long integer string to check @param lowerBound the lower bound of the interval @param upperBound the upper bound of the interva...
[ "Given", "a", "long", "integer", "string", "it", "checks", "if", "it", "s", "a", "valid", "long", "(", "base", "on", "apaches", "NumberUtils", ".", "createLong", ")", "and", "if", "it", "s", "between", "the", "lowerBound", "and", "upperBound", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java#L108-L118
apache/predictionio-sdk-java
client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java
EventClient.deleteItemAsFuture
public FutureAPIResponse deleteItemAsFuture(String iid, DateTime eventTime) throws IOException { """ Sends a delete item request. @param iid ID of the item @param eventTime timestamp of the event """ return createEventAsFuture(new Event() .event("$delete") .entityType("item") ...
java
public FutureAPIResponse deleteItemAsFuture(String iid, DateTime eventTime) throws IOException { return createEventAsFuture(new Event() .event("$delete") .entityType("item") .entityId(iid) .eventTime(eventTime)); }
[ "public", "FutureAPIResponse", "deleteItemAsFuture", "(", "String", "iid", ",", "DateTime", "eventTime", ")", "throws", "IOException", "{", "return", "createEventAsFuture", "(", "new", "Event", "(", ")", ".", "event", "(", "\"$delete\"", ")", ".", "entityType", ...
Sends a delete item request. @param iid ID of the item @param eventTime timestamp of the event
[ "Sends", "a", "delete", "item", "request", "." ]
train
https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L562-L569
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
ClustersInner.getGatewaySettingsAsync
public Observable<GatewaySettingsInner> getGatewaySettingsAsync(String resourceGroupName, String clusterName) { """ Gets the gateway settings for the specified cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown ...
java
public Observable<GatewaySettingsInner> getGatewaySettingsAsync(String resourceGroupName, String clusterName) { return getGatewaySettingsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1<ServiceResponse<GatewaySettingsInner>, GatewaySettingsInner>() { @Override publi...
[ "public", "Observable", "<", "GatewaySettingsInner", ">", "getGatewaySettingsAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ")", "{", "return", "getGatewaySettingsWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ")", ".", ...
Gets the gateway settings for the specified cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the GatewaySettingsInner object
[ "Gets", "the", "gateway", "settings", "for", "the", "specified", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L1488-L1495
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java
GSAConfiguration.addBroadcastSetForApplyFunction
public void addBroadcastSetForApplyFunction(String name, DataSet<?> data) { """ Adds a data set as a broadcast set to the apply function. @param name The name under which the broadcast data is available in the apply function. @param data The data set to be broadcast. """ this.bcVarsApply.add(new Tuple2<>...
java
public void addBroadcastSetForApplyFunction(String name, DataSet<?> data) { this.bcVarsApply.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForApplyFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsApply", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the apply function. @param name The name under which the broadcast data is available in the apply function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "apply", "function", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java#L80-L82
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesValue
public static void escapePropertiesValue(final Reader reader, final Writer writer, final PropertiesValueEscapeLevel level) throws IOException { """ <p> Perform a (configurable) Java Properties Value <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. <...
java
public static void escapePropertiesValue(final Reader reader, final Writer writer, final PropertiesValueEscapeLevel level) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (level == null) { ...
[ "public", "static", "void", "escapePropertiesValue", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ",", "final", "PropertiesValueEscapeLevel", "level", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw",...
<p> Perform a (configurable) Java Properties Value <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.properties.PropertiesValueEscapeLevel} argument value. </p> <p> All...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "Java", "Properties", "Value", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Wri...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L571-L584
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java
HazardCurve.createHazardCurveFromSurvivalProbabilities
public static HazardCurve createHazardCurveFromSurvivalProbabilities( String name, double[] times, double[] givenSurvivalProbabilities, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { """ Create a haz...
java
public static HazardCurve createHazardCurveFromSurvivalProbabilities( String name, double[] times, double[] givenSurvivalProbabilities, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { return createHazard...
[ "public", "static", "HazardCurve", "createHazardCurveFromSurvivalProbabilities", "(", "String", "name", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenSurvivalProbabilities", ",", "boolean", "[", "]", "isParameter", ",", "InterpolationMethod", "inter...
Create a hazard curve from given times and given survival probabilities using given interpolation and extrapolation methods. @param name The name of this hazard curve. @param times Array of times as doubles. @param givenSurvivalProbabilities Array of corresponding survival probabilities. @param isParameter Array of bo...
[ "Create", "a", "hazard", "curve", "from", "given", "times", "and", "given", "survival", "probabilities", "using", "given", "interpolation", "and", "extrapolation", "methods", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/HazardCurve.java#L109-L116
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/FastMathCalc.java
FastMathCalc.splitAdd
private static void splitAdd(final double a[], final double b[], final double ans[]) { """ Add two numbers in split form. @param a first term of addition @param b second term of addition @param ans placeholder where to put the result """ ans[0] = a[0] + b[0]; ans[1] = a[1] + b[1]; r...
java
private static void splitAdd(final double a[], final double b[], final double ans[]) { ans[0] = a[0] + b[0]; ans[1] = a[1] + b[1]; resplit(ans); }
[ "private", "static", "void", "splitAdd", "(", "final", "double", "a", "[", "]", ",", "final", "double", "b", "[", "]", ",", "final", "double", "ans", "[", "]", ")", "{", "ans", "[", "0", "]", "=", "a", "[", "0", "]", "+", "b", "[", "0", "]", ...
Add two numbers in split form. @param a first term of addition @param b second term of addition @param ans placeholder where to put the result
[ "Add", "two", "numbers", "in", "split", "form", "." ]
train
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMathCalc.java#L376-L381
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java
Sort.bucketSort
public static void bucketSort( int[] arr, int m ) { """ bucket sort algorithm @param arr an int array @param m the large-most one for all the Integers in arr """ int[] count = new int[m]; int j, i = 0; //System.out.println(count[0]==0?"true":"false"); for ( j = 0; j < arr.le...
java
public static void bucketSort( int[] arr, int m ) { int[] count = new int[m]; int j, i = 0; //System.out.println(count[0]==0?"true":"false"); for ( j = 0; j < arr.length; j++ ) { count[ arr[j] ]++; } //loop and filter the elements for ( j ...
[ "public", "static", "void", "bucketSort", "(", "int", "[", "]", "arr", ",", "int", "m", ")", "{", "int", "[", "]", "count", "=", "new", "int", "[", "m", "]", ";", "int", "j", ",", "i", "=", "0", ";", "//System.out.println(count[0]==0?\"true\":\"false\"...
bucket sort algorithm @param arr an int array @param m the large-most one for all the Integers in arr
[ "bucket", "sort", "algorithm" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java#L356-L373
wuman/android-oauth-client
library/src/main/java/com/wuman/android/auth/AuthorizationFlow.java
AuthorizationFlow.newCredential
private Credential newCredential(String userId) { """ Returns a new OAuth 2.0 credential instance based on the given user ID. @param userId user ID or {@code null} if not using a persisted credential store """ Credential.Builder builder = new Credential.Builder(getMethod()) .setTran...
java
private Credential newCredential(String userId) { Credential.Builder builder = new Credential.Builder(getMethod()) .setTransport(getTransport()) .setJsonFactory(getJsonFactory()) .setTokenServerEncodedUrl(getTokenServerEncodedUrl()) .setClientAuthe...
[ "private", "Credential", "newCredential", "(", "String", "userId", ")", "{", "Credential", ".", "Builder", "builder", "=", "new", "Credential", ".", "Builder", "(", "getMethod", "(", ")", ")", ".", "setTransport", "(", "getTransport", "(", ")", ")", ".", "...
Returns a new OAuth 2.0 credential instance based on the given user ID. @param userId user ID or {@code null} if not using a persisted credential store
[ "Returns", "a", "new", "OAuth", "2", ".", "0", "credential", "instance", "based", "on", "the", "given", "user", "ID", "." ]
train
https://github.com/wuman/android-oauth-client/blob/6e01b81b7319a6954a1156e8b93c0b5cbeb61446/library/src/main/java/com/wuman/android/auth/AuthorizationFlow.java#L372-L388
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addHours
private void addHours(MpxjTreeNode parentNode, ProjectCalendarDateRanges hours) { """ Add hours to a parent object. @param parentNode parent node @param hours list of ranges """ for (DateRange range : hours) { final DateRange r = range; MpxjTreeNode rangeNode = new MpxjTreeNod...
java
private void addHours(MpxjTreeNode parentNode, ProjectCalendarDateRanges hours) { for (DateRange range : hours) { final DateRange r = range; MpxjTreeNode rangeNode = new MpxjTreeNode(range) { @Override public String toString() { return m_t...
[ "private", "void", "addHours", "(", "MpxjTreeNode", "parentNode", ",", "ProjectCalendarDateRanges", "hours", ")", "{", "for", "(", "DateRange", "range", ":", "hours", ")", "{", "final", "DateRange", "r", "=", "range", ";", "MpxjTreeNode", "rangeNode", "=", "ne...
Add hours to a parent object. @param parentNode parent node @param hours list of ranges
[ "Add", "hours", "to", "a", "parent", "object", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L311-L325
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CSTransformer.java
CSTransformer.transformMetaData
public static KeyValueNode<?> transformMetaData(final CSNodeWrapper node) { """ Transforms a MetaData CSNode into a KeyValuePair that can be added to a ContentSpec object. @param node The CSNode to be transformed. @return The transformed KeyValuePair object. """ return transformMet...
java
public static KeyValueNode<?> transformMetaData(final CSNodeWrapper node) { return transformMetaData(node, new HashMap<Integer, Node>(), new HashMap<String, SpecTopic>(), new ArrayList<CSNodeWrapper>()); }
[ "public", "static", "KeyValueNode", "<", "?", ">", "transformMetaData", "(", "final", "CSNodeWrapper", "node", ")", "{", "return", "transformMetaData", "(", "node", ",", "new", "HashMap", "<", "Integer", ",", "Node", ">", "(", ")", ",", "new", "HashMap", "...
Transforms a MetaData CSNode into a KeyValuePair that can be added to a ContentSpec object. @param node The CSNode to be transformed. @return The transformed KeyValuePair object.
[ "Transforms", "a", "MetaData", "CSNode", "into", "a", "KeyValuePair", "that", "can", "be", "added", "to", "a", "ContentSpec", "object", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CSTransformer.java#L259-L261
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.putAt
public static void putAt(List self, List splice, List values) { """ A helper method to allow lists to work with subscript operators. <pre class="groovyTestCase">def list = ["a", true, 42, 9.4] list[1, 4] = ["x", false] assert list == ["a", "x", 42, 9.4, false]</pre> @param self a List @param splice the su...
java
public static void putAt(List self, List splice, List values) { if (splice.isEmpty()) { if ( ! values.isEmpty() ) throw new IllegalArgumentException("Trying to replace 0 elements with "+values.size()+" elements"); return; } Object first = splice.iterator()...
[ "public", "static", "void", "putAt", "(", "List", "self", ",", "List", "splice", ",", "List", "values", ")", "{", "if", "(", "splice", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "!", "values", ".", "isEmpty", "(", ")", ")", "throw", "new", "I...
A helper method to allow lists to work with subscript operators. <pre class="groovyTestCase">def list = ["a", true, 42, 9.4] list[1, 4] = ["x", false] assert list == ["a", "x", 42, 9.4, false]</pre> @param self a List @param splice the subset of the list to set @param values the value to put at the given sublist @si...
[ "A", "helper", "method", "to", "allow", "lists", "to", "work", "with", "subscript", "operators", ".", "<pre", "class", "=", "groovyTestCase", ">", "def", "list", "=", "[", "a", "true", "42", "9", ".", "4", "]", "list", "[", "1", "4", "]", "=", "[",...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L8081-L8098
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRestEntity.java
EnforcementJobRestEntity.createEnforcementJob
@POST public Response createEnforcementJob(@Context UriInfo uriInfo, @RequestBody EnforcementJob enforcementJob) throws ConflictException, InternalException, NotFoundException { """ Creates a new enforcement <pre> POST /enforcements Request: POST /agreements HTTP/1.1 Accept: application/xml or ap...
java
@POST public Response createEnforcementJob(@Context UriInfo uriInfo, @RequestBody EnforcementJob enforcementJob) throws ConflictException, InternalException, NotFoundException{ logger.debug("StartOf createEnforcementJob - REQUEST Insert /enforcement"); EnforcementJobHelperE enforcementJobHe...
[ "@", "POST", "public", "Response", "createEnforcementJob", "(", "@", "Context", "UriInfo", "uriInfo", ",", "@", "RequestBody", "EnforcementJob", "enforcementJob", ")", "throws", "ConflictException", ",", "InternalException", ",", "NotFoundException", "{", "logger", "....
Creates a new enforcement <pre> POST /enforcements Request: POST /agreements HTTP/1.1 Accept: application/xml or application/json Response: {@code <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <message code="201" message= "The enforcementJob has been stored successfully in the SLA Repository Database"/...
[ "Creates", "a", "new", "enforcement" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRestEntity.java#L287-L313
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.curveFromTo
public void curveFromTo(float x1, float y1, float x3, float y3) { """ Appends a B&#xea;zier curve to the path, starting from the current point. @param x1 x-coordinate of the first control point @param y1 y-coordinate of the first control point @param x3 x-coordinate of the end...
java
public void curveFromTo(float x1, float y1, float x3, float y3) { content.append(x1).append(' ').append(y1).append(' ').append(x3).append(' ').append(y3).append(" y").append_i(separator); }
[ "public", "void", "curveFromTo", "(", "float", "x1", ",", "float", "y1", ",", "float", "x3", ",", "float", "y3", ")", "{", "content", ".", "append", "(", "x1", ")", ".", "append", "(", "'", "'", ")", ".", "append", "(", "y1", ")", ".", "append", ...
Appends a B&#xea;zier curve to the path, starting from the current point. @param x1 x-coordinate of the first control point @param y1 y-coordinate of the first control point @param x3 x-coordinate of the ending point (= new current point) @param y3 y-coordinate of the ending...
[ "Appends", "a", "B&#xea", ";", "zier", "curve", "to", "the", "path", "starting", "from", "the", "current", "point", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L755-L757
atomix/atomix
core/src/main/java/io/atomix/core/map/impl/AbstractAtomicMapService.java
AbstractAtomicMapService.valuesEqual
protected boolean valuesEqual(byte[] oldValue, byte[] newValue) { """ Returns a boolean indicating whether the given entry values are equal. @param oldValue the first value to compare @param newValue the second value to compare @return indicates whether the two values are equal """ return (oldValue ==...
java
protected boolean valuesEqual(byte[] oldValue, byte[] newValue) { return (oldValue == null && newValue == null) || (oldValue != null && newValue != null && Arrays.equals(oldValue, newValue)); }
[ "protected", "boolean", "valuesEqual", "(", "byte", "[", "]", "oldValue", ",", "byte", "[", "]", "newValue", ")", "{", "return", "(", "oldValue", "==", "null", "&&", "newValue", "==", "null", ")", "||", "(", "oldValue", "!=", "null", "&&", "newValue", ...
Returns a boolean indicating whether the given entry values are equal. @param oldValue the first value to compare @param newValue the second value to compare @return indicates whether the two values are equal
[ "Returns", "a", "boolean", "indicating", "whether", "the", "given", "entry", "values", "are", "equal", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/core/src/main/java/io/atomix/core/map/impl/AbstractAtomicMapService.java#L234-L237
js-lib-com/net-client
src/main/java/js/net/client/HttpRmiTransaction.java
HttpRmiTransaction.setMethod
public void setMethod(String className, String methodName) { """ Set remote class and method. Compiles remote method path into format ready to be inserted into request URI, see {@link #methodPath}. <p> Method path format is described below. Note that extension is hard coded to <code>rmi</code>. <pre> reques...
java
public void setMethod(String className, String methodName) { Params.notNullOrEmpty(className, "Class name"); Params.notNullOrEmpty(methodName, "Method name"); StringBuilder builder = new StringBuilder(); builder.append(Files.dot2urlpath(className)); builder.append('/'); builder.append(methodName); ...
[ "public", "void", "setMethod", "(", "String", "className", ",", "String", "methodName", ")", "{", "Params", ".", "notNullOrEmpty", "(", "className", ",", "\"Class name\"", ")", ";", "Params", ".", "notNullOrEmpty", "(", "methodName", ",", "\"Method name\"", ")",...
Set remote class and method. Compiles remote method path into format ready to be inserted into request URI, see {@link #methodPath}. <p> Method path format is described below. Note that extension is hard coded to <code>rmi</code>. <pre> request-uri = class-name "/" method-name "." extension class-name = &lt; qualified...
[ "Set", "remote", "class", "and", "method", ".", "Compiles", "remote", "method", "path", "into", "format", "ready", "to", "be", "inserted", "into", "request", "URI", "see", "{", "@link", "#methodPath", "}", ".", "<p", ">", "Method", "path", "format", "is", ...
train
https://github.com/js-lib-com/net-client/blob/0489f85d8baa1be1ff115aa79929e0cf05d4c72d/src/main/java/js/net/client/HttpRmiTransaction.java#L235-L245
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/utility/MessagingSecurityUtility.java
MessagingSecurityUtility.createAuthenticationData
public static AuthenticationData createAuthenticationData(String userName, UserRegistry userRegistry) { """ Create the AuthenticationData from the UserName @param userName @return """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, CLASS_NAME + "create...
java
public static AuthenticationData createAuthenticationData(String userName, UserRegistry userRegistry) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, CLASS_NAME + "createAuthenticationData", userName); } AuthenticationData authData = new WSAuthent...
[ "public", "static", "AuthenticationData", "createAuthenticationData", "(", "String", "userName", ",", "UserRegistry", "userRegistry", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{"...
Create the AuthenticationData from the UserName @param userName @return
[ "Create", "the", "AuthenticationData", "from", "the", "UserName" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/utility/MessagingSecurityUtility.java#L64-L79
voldemort/voldemort
src/java/voldemort/rest/GetMetadataResponseSender.java
GetMetadataResponseSender.sendResponse
@Override public void sendResponse(StoreStats performanceStats, boolean isFromLocalZone, long startTimeInMs) throws Exception { """ Sends a normal HTTP response containing the serialization information in a XML format """ ChannelBuffer res...
java
@Override public void sendResponse(StoreStats performanceStats, boolean isFromLocalZone, long startTimeInMs) throws Exception { ChannelBuffer responseContent = ChannelBuffers.dynamicBuffer(this.responseValue.length); responseContent.writeByt...
[ "@", "Override", "public", "void", "sendResponse", "(", "StoreStats", "performanceStats", ",", "boolean", "isFromLocalZone", ",", "long", "startTimeInMs", ")", "throws", "Exception", "{", "ChannelBuffer", "responseContent", "=", "ChannelBuffers", ".", "dynamicBuffer", ...
Sends a normal HTTP response containing the serialization information in a XML format
[ "Sends", "a", "normal", "HTTP", "response", "containing", "the", "serialization", "information", "in", "a", "XML", "format" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/rest/GetMetadataResponseSender.java#L33-L62
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java
Query.whereLessThan
@Nonnull public Query whereLessThan(@Nonnull String field, @Nonnull Object value) { """ Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less than the specified value. @param field The name of the field to compare. @param valu...
java
@Nonnull public Query whereLessThan(@Nonnull String field, @Nonnull Object value) { return whereLessThan(FieldPath.fromDotSeparatedString(field), value); }
[ "@", "Nonnull", "public", "Query", "whereLessThan", "(", "@", "Nonnull", "String", "field", ",", "@", "Nonnull", "Object", "value", ")", "{", "return", "whereLessThan", "(", "FieldPath", ".", "fromDotSeparatedString", "(", "field", ")", ",", "value", ")", ";...
Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less than the specified value. @param field The name of the field to compare. @param value The value for comparison. @return The created Query.
[ "Creates", "and", "returns", "a", "new", "Query", "with", "the", "additional", "filter", "that", "documents", "must", "contain", "the", "specified", "field", "and", "the", "value", "should", "be", "less", "than", "the", "specified", "value", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java#L457-L460
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.getOperationStatus
public OperationStatusResponseInner getOperationStatus(String userName, String operationUrl) { """ Gets the status of long running operation. @param userName The name of the user. @param operationUrl The operation url of long running operation @throws IllegalArgumentException thrown if parameters fail the val...
java
public OperationStatusResponseInner getOperationStatus(String userName, String operationUrl) { return getOperationStatusWithServiceResponseAsync(userName, operationUrl).toBlocking().single().body(); }
[ "public", "OperationStatusResponseInner", "getOperationStatus", "(", "String", "userName", ",", "String", "operationUrl", ")", "{", "return", "getOperationStatusWithServiceResponseAsync", "(", "userName", ",", "operationUrl", ")", ".", "toBlocking", "(", ")", ".", "sing...
Gets the status of long running operation. @param userName The name of the user. @param operationUrl The operation url of long running operation @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all othe...
[ "Gets", "the", "status", "of", "long", "running", "operation", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L382-L384
Alluxio/alluxio
core/common/src/main/java/alluxio/util/io/FileUtils.java
FileUtils.changeLocalFileUser
public static void changeLocalFileUser(String path, String user) throws IOException { """ Changes the local file's user. @param path that will change owner @param user the new user """ UserPrincipalLookupService lookupService = FileSystems.getDefault().getUserPrincipalLookupService(); Posix...
java
public static void changeLocalFileUser(String path, String user) throws IOException { UserPrincipalLookupService lookupService = FileSystems.getDefault().getUserPrincipalLookupService(); PosixFileAttributeView view = Files.getFileAttributeView(Paths.get(path), PosixFileAttributeView.class, ...
[ "public", "static", "void", "changeLocalFileUser", "(", "String", "path", ",", "String", "user", ")", "throws", "IOException", "{", "UserPrincipalLookupService", "lookupService", "=", "FileSystems", ".", "getDefault", "(", ")", ".", "getUserPrincipalLookupService", "(...
Changes the local file's user. @param path that will change owner @param user the new user
[ "Changes", "the", "local", "file", "s", "user", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/FileUtils.java#L143-L151
threerings/nenya
core/src/main/java/com/threerings/miso/client/SceneObject.java
SceneObject.relocateObject
public void relocateObject (MisoSceneMetrics metrics, int tx, int ty) { """ Updates this object's origin tile coordinate. Its bounds and other cached screen coordinate information are updated. """ // Log.info("Relocating object " + this + " to " + // StringUtil.coordsToString(tx, ty))...
java
public void relocateObject (MisoSceneMetrics metrics, int tx, int ty) { // Log.info("Relocating object " + this + " to " + // StringUtil.coordsToString(tx, ty)); info.x = tx; info.y = ty; computeInfo(metrics); }
[ "public", "void", "relocateObject", "(", "MisoSceneMetrics", "metrics", ",", "int", "tx", ",", "int", "ty", ")", "{", "// Log.info(\"Relocating object \" + this + \" to \" +", "// StringUtil.coordsToString(tx, ty));", "info", ".", "x", "=", "tx", ";...
Updates this object's origin tile coordinate. Its bounds and other cached screen coordinate information are updated.
[ "Updates", "this", "object", "s", "origin", "tile", "coordinate", ".", "Its", "bounds", "and", "other", "cached", "screen", "coordinate", "information", "are", "updated", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneObject.java#L248-L255
samskivert/pythagoras
src/main/java/pythagoras/d/Matrix4.java
Matrix4.setToSkew
public Matrix4 setToSkew (IPlane plane, IVector3 amount) { """ Sets this to a skew by the specified amount relative to the given plane. @return a reference to this matrix, for chaining. """ return setToSkew(plane.normal(), plane.constant(), amount); }
java
public Matrix4 setToSkew (IPlane plane, IVector3 amount) { return setToSkew(plane.normal(), plane.constant(), amount); }
[ "public", "Matrix4", "setToSkew", "(", "IPlane", "plane", ",", "IVector3", "amount", ")", "{", "return", "setToSkew", "(", "plane", ".", "normal", "(", ")", ",", "plane", ".", "constant", "(", ")", ",", "amount", ")", ";", "}" ]
Sets this to a skew by the specified amount relative to the given plane. @return a reference to this matrix, for chaining.
[ "Sets", "this", "to", "a", "skew", "by", "the", "specified", "amount", "relative", "to", "the", "given", "plane", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Matrix4.java#L341-L343
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/lang/URIUtils.java
URIUtils.appendSchemeHostPort
public static void appendSchemeHostPort(StringBuilder url, String scheme, String server, int port) { """ Append scheme, host and port URI prefix, handling IPv6 address encoding and default ports @param url StringBuilder to append to @param scheme the URI scheme @param server the URI server @param port t...
java
public static void appendSchemeHostPort(StringBuilder url, String scheme, String server, int port) { url.append(scheme).append("://").append(HostPort.normalizeHost(server)); if (port > 0) { switch (scheme) { case "http": if (port != 80) ...
[ "public", "static", "void", "appendSchemeHostPort", "(", "StringBuilder", "url", ",", "String", "scheme", ",", "String", "server", ",", "int", "port", ")", "{", "url", ".", "append", "(", "scheme", ")", ".", "append", "(", "\"://\"", ")", ".", "append", ...
Append scheme, host and port URI prefix, handling IPv6 address encoding and default ports @param url StringBuilder to append to @param scheme the URI scheme @param server the URI server @param port the URI port
[ "Append", "scheme", "host", "and", "port", "URI", "prefix", "handling", "IPv6", "address", "encoding", "and", "default", "ports" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/lang/URIUtils.java#L872-L891
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/data/AnyValueMap.java
AnyValueMap.getAsMapWithDefault
public AnyValueMap getAsMapWithDefault(String key, AnyValueMap defaultValue) { """ Converts map element into an AnyValueMap or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return AnyValueMap value of the element or de...
java
public AnyValueMap getAsMapWithDefault(String key, AnyValueMap defaultValue) { AnyValueMap result = getAsNullableMap(key); return result != null ? result : defaultValue; }
[ "public", "AnyValueMap", "getAsMapWithDefault", "(", "String", "key", ",", "AnyValueMap", "defaultValue", ")", "{", "AnyValueMap", "result", "=", "getAsNullableMap", "(", "key", ")", ";", "return", "result", "!=", "null", "?", "result", ":", "defaultValue", ";",...
Converts map element into an AnyValueMap or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return AnyValueMap value of the element or default value if conversion is not supported. @see #getAsNullableMap(String)
[ "Converts", "map", "element", "into", "an", "AnyValueMap", "or", "returns", "default", "value", "if", "conversion", "is", "not", "possible", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/data/AnyValueMap.java#L606-L609
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/NonBlockingProperties.java
NonBlockingProperties.setProperty
@Nullable public String setProperty (final String sKey, final String sValue) { """ Calls the <tt>Hashtable</tt> method <code>put</code>. Provided for parallelism with the <tt>getProperty</tt> method. Enforces use of strings for property keys and values. The value returned is the result of the <tt>Hashtable</t...
java
@Nullable public String setProperty (final String sKey, final String sValue) { return put (sKey, sValue); }
[ "@", "Nullable", "public", "String", "setProperty", "(", "final", "String", "sKey", ",", "final", "String", "sValue", ")", "{", "return", "put", "(", "sKey", ",", "sValue", ")", ";", "}" ]
Calls the <tt>Hashtable</tt> method <code>put</code>. Provided for parallelism with the <tt>getProperty</tt> method. Enforces use of strings for property keys and values. The value returned is the result of the <tt>Hashtable</tt> call to <code>put</code>. @param sKey the key to be placed into this property list. @para...
[ "Calls", "the", "<tt", ">", "Hashtable<", "/", "tt", ">", "method", "<code", ">", "put<", "/", "code", ">", ".", "Provided", "for", "parallelism", "with", "the", "<tt", ">", "getProperty<", "/", "tt", ">", "method", ".", "Enforces", "use", "of", "strin...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/NonBlockingProperties.java#L137-L141
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java
RDBMEntityLockStore.deleteExpired
public void deleteExpired(Date expiration, Class entityType, String entityKey) throws LockingException { """ Delete IEntityLocks from the underlying store that have expired as of <code>expiration</code> . Params <code>entityType</code> and <code>entityKey</code> are optional. @param expiration java...
java
public void deleteExpired(Date expiration, Class entityType, String entityKey) throws LockingException { Connection conn = null; try { conn = RDBMServices.getConnection(); primDeleteExpired(expiration, entityType, entityKey, conn); } catch (SQLException sqle) ...
[ "public", "void", "deleteExpired", "(", "Date", "expiration", ",", "Class", "entityType", ",", "String", "entityKey", ")", "throws", "LockingException", "{", "Connection", "conn", "=", "null", ";", "try", "{", "conn", "=", "RDBMServices", ".", "getConnection", ...
Delete IEntityLocks from the underlying store that have expired as of <code>expiration</code> . Params <code>entityType</code> and <code>entityKey</code> are optional. @param expiration java.util.Date @param entityType Class @param entityKey String
[ "Delete", "IEntityLocks", "from", "the", "underlying", "store", "that", "have", "expired", "as", "of", "<code", ">", "expiration<", "/", "code", ">", ".", "Params", "<code", ">", "entityType<", "/", "code", ">", "and", "<code", ">", "entityKey<", "/", "cod...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L151-L162
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_webstorage_serviceName_storage_duration_POST
public OvhOrder cdn_webstorage_serviceName_storage_duration_POST(String serviceName, String duration, OvhOrderStorageEnum storage) throws IOException { """ Create order REST: POST /order/cdn/webstorage/{serviceName}/storage/{duration} @param storage [required] Storage option that will be ordered @param servic...
java
public OvhOrder cdn_webstorage_serviceName_storage_duration_POST(String serviceName, String duration, OvhOrderStorageEnum storage) throws IOException { String qPath = "/order/cdn/webstorage/{serviceName}/storage/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new Has...
[ "public", "OvhOrder", "cdn_webstorage_serviceName_storage_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhOrderStorageEnum", "storage", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/webstorage/{serviceName}/storage/{d...
Create order REST: POST /order/cdn/webstorage/{serviceName}/storage/{duration} @param storage [required] Storage option that will be ordered @param serviceName [required] The internal name of your CDN Static offer @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5498-L5505
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.doIn
private ZealotKhala doIn(String prefix, String field, Collection<?> values, boolean match, boolean positive) { """ 执行生成in范围查询SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param values 集合的值 @param match 是否匹配 @param positive true则表示是in,否则是not in @return ZealotKhala实例的当前实例 """ return this.doInByTyp...
java
private ZealotKhala doIn(String prefix, String field, Collection<?> values, boolean match, boolean positive) { return this.doInByType(prefix, field, values, match, ZealotConst.OBJTYPE_COLLECTION, positive); }
[ "private", "ZealotKhala", "doIn", "(", "String", "prefix", ",", "String", "field", ",", "Collection", "<", "?", ">", "values", ",", "boolean", "match", ",", "boolean", "positive", ")", "{", "return", "this", ".", "doInByType", "(", "prefix", ",", "field", ...
执行生成in范围查询SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param values 集合的值 @param match 是否匹配 @param positive true则表示是in,否则是not in @return ZealotKhala实例的当前实例
[ "执行生成in范围查询SQL片段的方法", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L493-L495
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.createFileName
private String createFileName(final String title, final String contentType) { """ Creates a file name for a file based on a weblog handle, title string and a content-type. @param handle Weblog handle @param title Title to be used as basis for file name (or null) @param contentType Content type of file (must n...
java
private String createFileName(final String title, final String contentType) { if (handle == null) { throw new IllegalArgumentException("weblog handle cannot be null"); } if (contentType == null) { throw new IllegalArgumentException("contentType cannot be null"); ...
[ "private", "String", "createFileName", "(", "final", "String", "title", ",", "final", "String", "contentType", ")", "{", "if", "(", "handle", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"weblog handle cannot be null\"", ")", ";", "...
Creates a file name for a file based on a weblog handle, title string and a content-type. @param handle Weblog handle @param title Title to be used as basis for file name (or null) @param contentType Content type of file (must not be null) If a title is specified, the method will apply the same create-anchor logic we...
[ "Creates", "a", "file", "name", "for", "a", "file", "based", "on", "a", "weblog", "handle", "title", "string", "and", "a", "content", "-", "type", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L699-L741
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/MemoryUtil.java
MemoryUtil.checkSize
public static void checkSize(final int size, final String className) { """ Performs default check on the size of a "registry" of UI widgets (or similar). In practice "size" is likely to be the size of a java Collection but it could be anything you want. This is a convenience which should be adequate for the ma...
java
public static void checkSize(final int size, final String className) { if (MemoryUtil.WARN_THRESHOLD < size) { MemoryUtil.log(className + " may be leaking memory, it contains a large number of items: " + size); } }
[ "public", "static", "void", "checkSize", "(", "final", "int", "size", ",", "final", "String", "className", ")", "{", "if", "(", "MemoryUtil", ".", "WARN_THRESHOLD", "<", "size", ")", "{", "MemoryUtil", ".", "log", "(", "className", "+", "\" may be leaking me...
Performs default check on the size of a "registry" of UI widgets (or similar). In practice "size" is likely to be the size of a java Collection but it could be anything you want. This is a convenience which should be adequate for the majority of cases. @param size The current size of a component registry (or similar)...
[ "Performs", "default", "check", "on", "the", "size", "of", "a", "registry", "of", "UI", "widgets", "(", "or", "similar", ")", ".", "In", "practice", "size", "is", "likely", "to", "be", "the", "size", "of", "a", "java", "Collection", "but", "it", "could...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/MemoryUtil.java#L43-L47
jfinal/jfinal
src/main/java/com/jfinal/plugin/redis/Cache.java
Cache.pexpire
public Long pexpire(Object key, long milliseconds) { """ 这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。 """ Jedis jedis = getJedis(); try { return jedis.pexpire(keyToBytes(key), milliseconds); } finally {close(jedis);} }
java
public Long pexpire(Object key, long milliseconds) { Jedis jedis = getJedis(); try { return jedis.pexpire(keyToBytes(key), milliseconds); } finally {close(jedis);} }
[ "public", "Long", "pexpire", "(", "Object", "key", ",", "long", "milliseconds", ")", "{", "Jedis", "jedis", "=", "getJedis", "(", ")", ";", "try", "{", "return", "jedis", ".", "pexpire", "(", "keyToBytes", "(", "key", ")", ",", "milliseconds", ")", ";"...
这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。
[ "这个命令和", "EXPIRE", "命令的作用类似,但是它以毫秒为单位设置", "key", "的生存时间,而不像", "EXPIRE", "命令那样,以秒为单位。" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/redis/Cache.java#L340-L346
super-csv/super-csv
super-csv/src/main/java/org/supercsv/cellprocessor/constraint/IsElementOf.java
IsElementOf.execute
public Object execute(final Object value, final CsvContext context) { """ {@inheritDoc} @throws SuperCsvConstraintViolationException if value isn't in the Collection """ if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of ...
java
public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); }
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "if", "(", "!", "collection", ".", "contains", "(", "value", ")", ")", "{", "throw", "new", "SuperCsvConstraintViolationException", "(", "String", ...
{@inheritDoc} @throws SuperCsvConstraintViolationException if value isn't in the Collection
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/IsElementOf.java#L94-L102
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/QuotedStringTokenizer.java
QuotedStringTokenizer.charsMatch
private boolean charsMatch(char[] chars, int pos1, int pos2, int len2) { """ @return true if two sequences of chars match within the array. @param chars char set @param pos1 position 1 @param pos2 position 2 @param len2 length to compare """ return charsMatch(chars, pos1, len2, pos2, len2); ...
java
private boolean charsMatch(char[] chars, int pos1, int pos2, int len2) { return charsMatch(chars, pos1, len2, pos2, len2); }
[ "private", "boolean", "charsMatch", "(", "char", "[", "]", "chars", ",", "int", "pos1", ",", "int", "pos2", ",", "int", "len2", ")", "{", "return", "charsMatch", "(", "chars", ",", "pos1", ",", "len2", ",", "pos2", ",", "len2", ")", ";", "}" ]
@return true if two sequences of chars match within the array. @param chars char set @param pos1 position 1 @param pos2 position 2 @param len2 length to compare
[ "@return", "true", "if", "two", "sequences", "of", "chars", "match", "within", "the", "array", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/QuotedStringTokenizer.java#L186-L188
getsentry/sentry-java
sentry/src/main/java/io/sentry/connection/AsyncConnection.java
AsyncConnection.doClose
@SuppressWarnings("checkstyle:magicnumber") private void doClose() throws IOException { """ Close the connection whether it's from the shutdown hook or not. @see #close() """ logger.debug("Gracefully shutting down Sentry async threads."); closed = true; executorService.shutdown()...
java
@SuppressWarnings("checkstyle:magicnumber") private void doClose() throws IOException { logger.debug("Gracefully shutting down Sentry async threads."); closed = true; executorService.shutdown(); try { if (shutdownTimeout == -1L) { // Block until the execut...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "void", "doClose", "(", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"Gracefully shutting down Sentry async threads.\"", ")", ";", "closed", "=", "true", ";", "executorSer...
Close the connection whether it's from the shutdown hook or not. @see #close()
[ "Close", "the", "connection", "whether", "it", "s", "from", "the", "shutdown", "hook", "or", "not", "." ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/connection/AsyncConnection.java#L128-L157
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/scripting/engine/ScriptingEngines.java
ScriptingEngines.createBindings
public Bindings createBindings(ScriptEngine scriptEngine, VariableScope variableScope) { """ override to build a spring aware ScriptingEngines @param engineBindin @param scriptEngine """ return scriptBindingsFactory.createBindings(variableScope, scriptEngine.createBindings()); }
java
public Bindings createBindings(ScriptEngine scriptEngine, VariableScope variableScope) { return scriptBindingsFactory.createBindings(variableScope, scriptEngine.createBindings()); }
[ "public", "Bindings", "createBindings", "(", "ScriptEngine", "scriptEngine", ",", "VariableScope", "variableScope", ")", "{", "return", "scriptBindingsFactory", ".", "createBindings", "(", "variableScope", ",", "scriptEngine", ".", "createBindings", "(", ")", ")", ";"...
override to build a spring aware ScriptingEngines @param engineBindin @param scriptEngine
[ "override", "to", "build", "a", "spring", "aware", "ScriptingEngines" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/scripting/engine/ScriptingEngines.java#L146-L148
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWorkerPoolInstanceMetricsWithServiceResponseAsync
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listWorkerPoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter) { """ Get metrics for a specific instance of a worke...
java
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listWorkerPoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final Boolean details, final String filter) { return listWorkerPoolInstanceMetricsSinglePageA...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ResourceMetricInner", ">", ">", ">", "listWorkerPoolInstanceMetricsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "workerP...
Get metrics for a specific instance of a worker pool of an App Service Environment. Get metrics for a specific instance of a worker pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param workerPoolNa...
[ "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "worker", "pool", "of", "an", "App", "Service", "Environme...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L5853-L5865
line/armeria
core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java
ServerSentEvents.fromPublisher
public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<? extends ServerSentEvent> contentPublisher, HttpHeaders trailingHeaders) { """ Creates a new Server-Sent Events stream from the specified {@link Publish...
java
public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<? extends ServerSentEvent> contentPublisher, HttpHeaders trailingHeaders) { requireNonNull(headers, "headers"); requireNonNull(contentPublishe...
[ "public", "static", "HttpResponse", "fromPublisher", "(", "HttpHeaders", "headers", ",", "Publisher", "<", "?", "extends", "ServerSentEvent", ">", "contentPublisher", ",", "HttpHeaders", "trailingHeaders", ")", "{", "requireNonNull", "(", "headers", ",", "\"headers\""...
Creates a new Server-Sent Events stream from the specified {@link Publisher}. @param headers the HTTP headers supposed to send @param contentPublisher the {@link Publisher} which publishes the objects supposed to send as contents @param trailingHeaders the trailing HTTP headers supposed to send
[ "Creates", "a", "new", "Server", "-", "Sent", "Events", "stream", "from", "the", "specified", "{", "@link", "Publisher", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java#L109-L117
zhegexiaohuozi/SeimiCrawler
seimicrawler/src/main/java/cn/wanghaomiao/seimi/struct/Response.java
Response.render
public <T> T render(Class<T> bean) throws Exception { """ 通过bean中定义的Xpath注解进行自动填充 @param bean -- @param <T> -- @return -- @throws Exception -- """ if (bodyType.equals(BodyType.TEXT)) { return parse(bean, this.content); } else { throw new SeimiProcessExcepiton("can ...
java
public <T> T render(Class<T> bean) throws Exception { if (bodyType.equals(BodyType.TEXT)) { return parse(bean, this.content); } else { throw new SeimiProcessExcepiton("can not parse struct from binary"); } }
[ "public", "<", "T", ">", "T", "render", "(", "Class", "<", "T", ">", "bean", ")", "throws", "Exception", "{", "if", "(", "bodyType", ".", "equals", "(", "BodyType", ".", "TEXT", ")", ")", "{", "return", "parse", "(", "bean", ",", "this", ".", "co...
通过bean中定义的Xpath注解进行自动填充 @param bean -- @param <T> -- @return -- @throws Exception --
[ "通过bean中定义的Xpath注解进行自动填充" ]
train
https://github.com/zhegexiaohuozi/SeimiCrawler/blob/c9069490616c38c6de059ddc86b79febd6d17641/seimicrawler/src/main/java/cn/wanghaomiao/seimi/struct/Response.java#L164-L170
icode/ameba
src/main/java/ameba/websocket/internal/LocalizationMessages.java
LocalizationMessages.ENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG
public static String ENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG(Object arg0, Object arg1, Object arg2, Object arg3) { """ MaxMessageSize {0} on method {1} in endpoint {2} is larger than the container incoming buffer size {3}. """ return localizer.localize(localizableENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG(arg0, arg...
java
public static String ENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG(Object arg0, Object arg1, Object arg2, Object arg3) { return localizer.localize(localizableENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG(arg0, arg1, arg2, arg3)); }
[ "public", "static", "String", "ENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG", "(", "Object", "arg0", ",", "Object", "arg1", ",", "Object", "arg2", ",", "Object", "arg3", ")", "{", "return", "localizer", ".", "localize", "(", "localizableENDPOINT_MAX_MESSAGE_SIZE_TOO_LONG", "(",...
MaxMessageSize {0} on method {1} in endpoint {2} is larger than the container incoming buffer size {3}.
[ "MaxMessageSize", "{", "0", "}", "on", "method", "{", "1", "}", "in", "endpoint", "{", "2", "}", "is", "larger", "than", "the", "container", "incoming", "buffer", "size", "{", "3", "}", "." ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/websocket/internal/LocalizationMessages.java#L33-L35
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> toFunc( final Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action, final R result) { """ Converts an {@link Action9} to a function that calls the action and returns a specified value. @param action the ...
java
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> toFunc( final Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action, final R result) { return new Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R>() { @Override public R call(T1 t1, T2...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "T9", ",", "R", ">", "Func9", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", ...
Converts an {@link Action9} to a function that calls the action and returns a specified value. @param action the {@link Action9} to convert @param result the value to return from the function call @return a {@link Func9} that calls {@code action} and returns {@code result}
[ "Converts", "an", "{", "@link", "Action9", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "a", "specified", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L359-L368
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/ProcessorDef.java
ProcessorDef.getRebuild
public boolean getRebuild(final ProcessorDef[] defaultProviders, final int index) { """ Gets a boolean value indicating whether all targets must be rebuilt regardless of dependency analysis. @param defaultProviders array of ProcessorDef's in descending priority @param index index to first element in array t...
java
public boolean getRebuild(final ProcessorDef[] defaultProviders, final int index) { if (isReference()) { return ((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef")).getRebuild(defaultProviders, index); } if (this.rebuild != null) { return this.rebuild.booleanValue(); } else { ...
[ "public", "boolean", "getRebuild", "(", "final", "ProcessorDef", "[", "]", "defaultProviders", ",", "final", "int", "index", ")", "{", "if", "(", "isReference", "(", ")", ")", "{", "return", "(", "(", "ProcessorDef", ")", "getCheckedRef", "(", "ProcessorDef"...
Gets a boolean value indicating whether all targets must be rebuilt regardless of dependency analysis. @param defaultProviders array of ProcessorDef's in descending priority @param index index to first element in array that should be considered @return true if all targets should be rebuilt.
[ "Gets", "a", "boolean", "value", "indicating", "whether", "all", "targets", "must", "be", "rebuilt", "regardless", "of", "dependency", "analysis", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/ProcessorDef.java#L407-L419
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/impl/matcher/Optimizer.java
Optimizer.extractPrefixFromOr
static Matcher extractPrefixFromOr(Matcher matcher) { """ Extract common prefix from OR clause. This is beneficial because it reduces the amount that needs to be checked for each branch. For example: {@code "ab|ac" => "a(b|c)"}. """ if (matcher instanceof OrMatcher) { // Get the prefix for the first...
java
static Matcher extractPrefixFromOr(Matcher matcher) { if (matcher instanceof OrMatcher) { // Get the prefix for the first condition List<Matcher> matchers = matcher.<OrMatcher>as().matchers(); if (matchers.isEmpty()) { return matcher; } Matcher prefix = PatternUtils.getPrefix(m...
[ "static", "Matcher", "extractPrefixFromOr", "(", "Matcher", "matcher", ")", "{", "if", "(", "matcher", "instanceof", "OrMatcher", ")", "{", "// Get the prefix for the first condition", "List", "<", "Matcher", ">", "matchers", "=", "matcher", ".", "<", "OrMatcher", ...
Extract common prefix from OR clause. This is beneficial because it reduces the amount that needs to be checked for each branch. For example: {@code "ab|ac" => "a(b|c)"}.
[ "Extract", "common", "prefix", "from", "OR", "clause", ".", "This", "is", "beneficial", "because", "it", "reduces", "the", "amount", "that", "needs", "to", "be", "checked", "for", "each", "branch", ".", "For", "example", ":", "{" ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/Optimizer.java#L345-L371
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/dynamic/ProxyUtils.java
ProxyUtils.createServiceInstance
public static <T> T createServiceInstance(T impl, String name, String category, String subsystem, Class<T> interf, Class<?>... additionalInterfaces) { """ Creates a monitored proxy instance for a service. Service in this context means, that the ServiceStatsCallHandler and ServiceStatsFactory are used. @param <T> ...
java
public static <T> T createServiceInstance(T impl, String name, String category, String subsystem, Class<T> interf, Class<?>... additionalInterfaces){ return createServiceInstance(impl, name, category, subsystem, false, interf, additionalInterfaces); }
[ "public", "static", "<", "T", ">", "T", "createServiceInstance", "(", "T", "impl", ",", "String", "name", ",", "String", "category", ",", "String", "subsystem", ",", "Class", "<", "T", ">", "interf", ",", "Class", "<", "?", ">", "...", "additionalInterfa...
Creates a monitored proxy instance for a service. Service in this context means, that the ServiceStatsCallHandler and ServiceStatsFactory are used. @param <T> the server interface. @param impl the implementation of T. @param name name for this instance. @param category category of this instance. @param subsystem subsys...
[ "Creates", "a", "monitored", "proxy", "instance", "for", "a", "service", ".", "Service", "in", "this", "context", "means", "that", "the", "ServiceStatsCallHandler", "and", "ServiceStatsFactory", "are", "used", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/dynamic/ProxyUtils.java#L122-L130
apache/incubator-gobblin
gobblin-api/src/main/java/org/apache/gobblin/configuration/State.java
State.setProp
public void setProp(String key, Object value) { """ Set a property. <p> Both key and value are stored as strings. </p> @param key property key @param value property value """ this.specProperties.put(key, value.toString()); }
java
public void setProp(String key, Object value) { this.specProperties.put(key, value.toString()); }
[ "public", "void", "setProp", "(", "String", "key", ",", "Object", "value", ")", "{", "this", ".", "specProperties", ".", "put", "(", "key", ",", "value", ".", "toString", "(", ")", ")", ";", "}" ]
Set a property. <p> Both key and value are stored as strings. </p> @param key property key @param value property value
[ "Set", "a", "property", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/configuration/State.java#L202-L204
WiQuery/wiquery
wiquery-core/src/main/java/org/odlabs/wiquery/core/javascript/helper/EventsHelper.java
EventsHelper.die
public static ChainableStatement die(EventLabel eventLabel, JsScope jsScope) { """ This does the opposite of live, it removes a bound live event. @param eventLabel Event @param jsScope Scope to use @return the jQuery code """ return new DefaultChainableStatement("die", JsUtils.quotes(eventLabel.getEve...
java
public static ChainableStatement die(EventLabel eventLabel, JsScope jsScope) { return new DefaultChainableStatement("die", JsUtils.quotes(eventLabel.getEventLabel()), jsScope.render()); }
[ "public", "static", "ChainableStatement", "die", "(", "EventLabel", "eventLabel", ",", "JsScope", "jsScope", ")", "{", "return", "new", "DefaultChainableStatement", "(", "\"die\"", ",", "JsUtils", ".", "quotes", "(", "eventLabel", ".", "getEventLabel", "(", ")", ...
This does the opposite of live, it removes a bound live event. @param eventLabel Event @param jsScope Scope to use @return the jQuery code
[ "This", "does", "the", "opposite", "of", "live", "it", "removes", "a", "bound", "live", "event", "." ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-core/src/main/java/org/odlabs/wiquery/core/javascript/helper/EventsHelper.java#L157-L161
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.beginCreateOrUpdate
public NetworkInterfaceTapConfigurationInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { """ Creates or updates a Tap configuration in the specified NetworkInterface. @param resourceGr...
java
public NetworkInterfaceTapConfigurationInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tap...
[ "public", "NetworkInterfaceTapConfigurationInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ",", "String", "tapConfigurationName", ",", "NetworkInterfaceTapConfigurationInner", "tapConfigurationParameters", ")", "{", "return"...
Creates or updates a Tap configuration in the specified NetworkInterface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param tapConfigurationName The name of the tap configuration. @param tapConfigurationParameters Parameters supplied to the c...
[ "Creates", "or", "updates", "a", "Tap", "configuration", "in", "the", "specified", "NetworkInterface", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java#L444-L446
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageHandleFactoryImpl.java
JsMessageHandleFactoryImpl.createJsMessageHandle
public final JsMessageHandle createJsMessageHandle(SIBUuid8 uuid ,long value ) throws NullPointerException { """ Create a new JsMessageHandle to represent ...
java
public final JsMessageHandle createJsMessageHandle(SIBUuid8 uuid ,long value ) throws NullPointerException { if (uuid == null) { throw new NullPointe...
[ "public", "final", "JsMessageHandle", "createJsMessageHandle", "(", "SIBUuid8", "uuid", ",", "long", "value", ")", "throws", "NullPointerException", "{", "if", "(", "uuid", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"uuid\"", ")", ";"...
Create a new JsMessageHandle to represent an SIBusMessage. @param destinationName The name of the SIBus Destination @param localOnly Indicates that the Destination should be localized to the local Messaging Engine. @return JsMessageHandle The new JsMessageHandle. @exception NullPointerException Thrown if eit...
[ "Create", "a", "new", "JsMessageHandle", "to", "represent", "an", "SIBusMessage", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageHandleFactoryImpl.java#L47-L56
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Instant.java
Instant.ofEpochSecond
public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { """ Obtains an instance of {@code Instant} using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second. <p> This method allows an arbitrary number of nanoseconds to be passed in. The factory will alter the v...
java
public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { long secs = Math.addExact(epochSecond, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); int nos = (int)Math.floorMod(nanoAdjustment, NANOS_PER_SECOND); return create(secs, nos); }
[ "public", "static", "Instant", "ofEpochSecond", "(", "long", "epochSecond", ",", "long", "nanoAdjustment", ")", "{", "long", "secs", "=", "Math", ".", "addExact", "(", "epochSecond", ",", "Math", ".", "floorDiv", "(", "nanoAdjustment", ",", "NANOS_PER_SECOND", ...
Obtains an instance of {@code Instant} using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second. <p> This method allows an arbitrary number of nanoseconds to be passed in. The factory will alter the values of the second and nanosecond in order to ensure that the stored nanosecond is in the...
[ "Obtains", "an", "instance", "of", "{", "@code", "Instant", "}", "using", "seconds", "from", "the", "epoch", "of", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", "and", "nanosecond", "fraction", "of", "second", ".", "<p", ">", "This", "method"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Instant.java#L321-L325
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NamespacesInner.java
NamespacesInner.listKeysAsync
public Observable<SharedAccessAuthorizationRuleListResultInner> listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { """ Gets the Primary and Secondary ConnectionStrings to the namespace. @param resourceGroupName The name of the resource group. @param namespaceName The ...
java
public Observable<SharedAccessAuthorizationRuleListResultInner> listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1<ServiceResponse<SharedAccessAuthorizationRu...
[ "public", "Observable", "<", "SharedAccessAuthorizationRuleListResultInner", ">", "listKeysAsync", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "String", "authorizationRuleName", ")", "{", "return", "listKeysWithServiceResponseAsync", "(", "resourc...
Gets the Primary and Secondary ConnectionStrings to the namespace. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. @throws IllegalArgumentException thrown if parame...
[ "Gets", "the", "Primary", "and", "Secondary", "ConnectionStrings", "to", "the", "namespace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NamespacesInner.java#L1327-L1334
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/PubSubRealization.java
PubSubRealization.createConsumerDispatcher
private ConsumerDispatcher createConsumerDispatcher( ConsumerDispatcherState state, SubscriptionItemStream subscription) { """ <p>This method is used to create a consumer dispatcher for subscriptions A ...
java
private ConsumerDispatcher createConsumerDispatcher( ConsumerDispatcherState state, SubscriptionItemStream subscription) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) ...
[ "private", "ConsumerDispatcher", "createConsumerDispatcher", "(", "ConsumerDispatcherState", "state", ",", "SubscriptionItemStream", "subscription", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")",...
<p>This method is used to create a consumer dispatcher for subscriptions A subscription can be either durable or non-durable. If the subscription is durable, the reference stream should be persistent, otherwise it can be a temporary reference stream.</p> @param state The state object @param subscription The subscripti...
[ "<p", ">", "This", "method", "is", "used", "to", "create", "a", "consumer", "dispatcher", "for", "subscriptions", "A", "subscription", "can", "be", "either", "durable", "or", "non", "-", "durable", ".", "If", "the", "subscription", "is", "durable", "the", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/PubSubRealization.java#L570-L591
alibaba/otter
node/etl/src/main/java/com/alibaba/otter/node/etl/transform/transformer/RowDataTransformer.java
RowDataTransformer.buildName
private void buildName(EventData data, EventData result, DataMediaPair pair) { """ 设置对应的目标库schema.name,需要考虑mutl配置情况 <pre> case: 1. 源:offer , 目:offer 2. 源:offer[1-128] , 目:offer 3. 源:offer[1-128] , 目:offer[1-128] 4. 源:offer , 目:offer[1-128] 不支持,会报错 """ DataMedia targetDataMedia = pair.getTarget(...
java
private void buildName(EventData data, EventData result, DataMediaPair pair) { DataMedia targetDataMedia = pair.getTarget(); DataMedia sourceDataMedia = pair.getSource(); String schemaName = buildName(data.getSchemaName(), sourceDataMedia.getNamespaceMode(), targetDataMed...
[ "private", "void", "buildName", "(", "EventData", "data", ",", "EventData", "result", ",", "DataMediaPair", "pair", ")", "{", "DataMedia", "targetDataMedia", "=", "pair", ".", "getTarget", "(", ")", ";", "DataMedia", "sourceDataMedia", "=", "pair", ".", "getSo...
设置对应的目标库schema.name,需要考虑mutl配置情况 <pre> case: 1. 源:offer , 目:offer 2. 源:offer[1-128] , 目:offer 3. 源:offer[1-128] , 目:offer[1-128] 4. 源:offer , 目:offer[1-128] 不支持,会报错
[ "设置对应的目标库schema", ".", "name,需要考虑mutl配置情况" ]
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/node/etl/src/main/java/com/alibaba/otter/node/etl/transform/transformer/RowDataTransformer.java#L146-L155
legsem/legstar-core2
legstar-base/src/main/java/com/legstar/base/finder/CobolTypeFinder.java
CobolTypeFinder.indexOf
public int indexOf(byte[] hostData, int start, int length) { """ Lookup for the signature of a Cobol type. <p/> Attempts at finding the type one byte at a time delegating the matching to specialized classes. @param hostData the incoming host data where the matching type might appear @param start where to s...
java
public int indexOf(byte[] hostData, int start, int length) { int pos = start; while (length - pos >= getSignatureLen()) { if (match(hostData, pos, length)) { return pos; } pos++; } return -1; }
[ "public", "int", "indexOf", "(", "byte", "[", "]", "hostData", ",", "int", "start", ",", "int", "length", ")", "{", "int", "pos", "=", "start", ";", "while", "(", "length", "-", "pos", ">=", "getSignatureLen", "(", ")", ")", "{", "if", "(", "match"...
Lookup for the signature of a Cobol type. <p/> Attempts at finding the type one byte at a time delegating the matching to specialized classes. @param hostData the incoming host data where the matching type might appear @param start where to start looking in the incoming host data @param length where to stop looking in...
[ "Lookup", "for", "the", "signature", "of", "a", "Cobol", "type", ".", "<p", "/", ">", "Attempts", "at", "finding", "the", "type", "one", "byte", "at", "a", "time", "delegating", "the", "matching", "to", "specialized", "classes", "." ]
train
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base/src/main/java/com/legstar/base/finder/CobolTypeFinder.java#L25-L34
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/facade/ServletContextFacade.java
ServletContextFacade.addMappingFilter
public void addMappingFilter(String mapping, com.ibm.websphere.servlet.filter.IFilterConfig config) { """ Adds a filter against a specified mapping into this context @param mapping @param config """ context.addMappingFilter(mapping, config); }
java
public void addMappingFilter(String mapping, com.ibm.websphere.servlet.filter.IFilterConfig config){ context.addMappingFilter(mapping, config); }
[ "public", "void", "addMappingFilter", "(", "String", "mapping", ",", "com", ".", "ibm", ".", "websphere", ".", "servlet", ".", "filter", ".", "IFilterConfig", "config", ")", "{", "context", ".", "addMappingFilter", "(", "mapping", ",", "config", ")", ";", ...
Adds a filter against a specified mapping into this context @param mapping @param config
[ "Adds", "a", "filter", "against", "a", "specified", "mapping", "into", "this", "context" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/facade/ServletContextFacade.java#L90-L92
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java
RequestUtil.addParameter
public static void addParameter(final Map<String, String[]> parameters, final String name, final String value) { """ Add the request parameter to the parameters collection. If a parameter already exists with the given name then the Map will contain an array of all registered values. @param parameters the map t...
java
public static void addParameter(final Map<String, String[]> parameters, final String name, final String value) { if (parameters.containsKey(name)) { // This field contains multiple values, append the new value to the existing values. String[] oldValues = parameters.get(name); String[] newValues = new String[...
[ "public", "static", "void", "addParameter", "(", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "parameters", ",", "final", "String", "name", ",", "final", "String", "value", ")", "{", "if", "(", "parameters", ".", "containsKey", "(", "name...
Add the request parameter to the parameters collection. If a parameter already exists with the given name then the Map will contain an array of all registered values. @param parameters the map to store non-file request parameters in. @param name the name of the parameter. @param value the parameter value.
[ "Add", "the", "request", "parameter", "to", "the", "parameters", "collection", ".", "If", "a", "parameter", "already", "exists", "with", "the", "given", "name", "then", "the", "Map", "will", "contain", "an", "array", "of", "all", "registered", "values", "." ...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java#L49-L60