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
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/ApplicationWindowSetter.java
ApplicationWindowSetter.postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { """ If the given bean is an implementation of {@link ApplicationWindowAware}, it will have its application window set to the window provided to this instance at construction time. """ if (bean instanceo...
java
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof ApplicationWindowAware) { ((ApplicationWindowAware)bean).setApplicationWindow(window); } return bean; }
[ "public", "Object", "postProcessBeforeInitialization", "(", "Object", "bean", ",", "String", "beanName", ")", "throws", "BeansException", "{", "if", "(", "bean", "instanceof", "ApplicationWindowAware", ")", "{", "(", "(", "ApplicationWindowAware", ")", "bean", ")", ...
If the given bean is an implementation of {@link ApplicationWindowAware}, it will have its application window set to the window provided to this instance at construction time.
[ "If", "the", "given", "bean", "is", "an", "implementation", "of", "{", "@link", "ApplicationWindowAware", "}", "it", "will", "have", "its", "application", "window", "set", "to", "the", "window", "provided", "to", "this", "instance", "at", "construction", "time...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/ApplicationWindowSetter.java#L61-L66
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withStringArrayList
public Postcard withStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) { """ Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList object, or n...
java
public Postcard withStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) { mBundle.putStringArrayList(key, value); return this; }
[ "public", "Postcard", "withStringArrayList", "(", "@", "Nullable", "String", "key", ",", "@", "Nullable", "ArrayList", "<", "String", ">", "value", ")", "{", "mBundle", ".", "putStringArrayList", "(", "key", ",", "value", ")", ";", "return", "this", ";", "...
Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList object, or null @return current
[ "Inserts", "an", "ArrayList", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L442-L445
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201811/reportservice/RunAdExchangeReport.java
RunAdExchangeReport.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws IOException, InterruptedException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws IOException, InterruptedException { // Get the ReportService. ReportServiceInterface reportService = adManagerServices.get(session, ReportServiceInterface.class); // Create report query. Re...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "IOException", ",", "InterruptedException", "{", "// Get the ReportService.", "ReportServiceInterface", "reportService", "=", "adManager...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors. @throws IOException if the report's contents could not be written to a temp...
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201811/reportservice/RunAdExchangeReport.java#L65-L115
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java
SchemaTool.modifyTable
private void modifyTable(String tableName, HTableDescriptor newDescriptor) { """ add the column families which are not already present to the given table """ LOG.info("Modifying table " + tableName); HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies(); try { List<HColumnDescri...
java
private void modifyTable(String tableName, HTableDescriptor newDescriptor) { LOG.info("Modifying table " + tableName); HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies(); try { List<HColumnDescriptor> columnsToAdd = Lists.newArrayList(); HTableDescriptor currentFamilies = hbaseA...
[ "private", "void", "modifyTable", "(", "String", "tableName", ",", "HTableDescriptor", "newDescriptor", ")", "{", "LOG", ".", "info", "(", "\"Modifying table \"", "+", "tableName", ")", ";", "HColumnDescriptor", "[", "]", "newFamilies", "=", "newDescriptor", ".", ...
add the column families which are not already present to the given table
[ "add", "the", "column", "families", "which", "are", "not", "already", "present", "to", "the", "given", "table" ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L369-L395
code4everything/util
src/main/java/com/zhazhapan/util/office/MsWordUtils.java
MsWordUtils.setStyle
public static void setStyle(XWPFRun run, Map<String, Object> styles) { """ 设置XWPFRun样式<br><br> <p> 样式接受的参数:<br> property: italic, type: boolean<br> property: underline, type: class org.apache.poi.xwpf.usermodel.UnderlinePatterns<br> property: strikeThrough, type: boolean<br> property: strike, type: boolean<br>...
java
public static void setStyle(XWPFRun run, Map<String, Object> styles) { if (Checker.isNotEmpty(styles)) { styles.forEach((key, value) -> { String methodName = "set" + key.substring(0, 1).toUpperCase() + key.substring(1); try { ReflectUtils.invokeMet...
[ "public", "static", "void", "setStyle", "(", "XWPFRun", "run", ",", "Map", "<", "String", ",", "Object", ">", "styles", ")", "{", "if", "(", "Checker", ".", "isNotEmpty", "(", "styles", ")", ")", "{", "styles", ".", "forEach", "(", "(", "key", ",", ...
设置XWPFRun样式<br><br> <p> 样式接受的参数:<br> property: italic, type: boolean<br> property: underline, type: class org.apache.poi.xwpf.usermodel.UnderlinePatterns<br> property: strikeThrough, type: boolean<br> property: strike, type: boolean<br> property: doubleStrikethrough, type: boolean<br> property: smallCaps, type: boolean...
[ "设置XWPFRun样式<br", ">", "<br", ">", "<p", ">", "样式接受的参数:<br", ">", "property", ":", "italic", "type", ":", "boolean<br", ">", "property", ":", "underline", "type", ":", "class", "org", ".", "apache", ".", "poi", ".", "xwpf", ".", "usermodel", ".", "Underl...
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/office/MsWordUtils.java#L282-L293
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.isNumeric
@ArgumentsChecked @Throws( { """ Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank account number). @param value a readable sequence of {@c...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalNumericArgumentException.class }) public static <T extends CharSequence> T isNumeric(@Nonnull final T value, @Nullable final String name) { Check.notNull(value, "value"); if (!matches(NumericRegularExpressionHolder.getPattern(), value)) { t...
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalNumericArgumentException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "isNumeric", "(", "@", "Nonnull", "...
Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank account number). @param value a readable sequence of {@code char} values which must be a number @par...
[ "Ensures", "that", "a", "readable", "sequence", "of", "{", "@code", "char", "}", "values", "is", "numeric", ".", "Numeric", "arguments", "consist", "only", "of", "the", "characters", "0", "-", "9", "and", "may", "start", "with", "0", "(", "compared", "to...
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1348-L1356
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/scheduling/cron/CronExpression.java
CronExpression.nextTimeAfter
public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis) { """ This will search for the next time within the next durationInMillis millisecond. Be aware that the duration is specified in millis, but in fact the limit is checked on a day-to-day basis. @param afterTime A date-ti...
java
public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis) { return nextTimeAfter(afterTime, afterTime.plus(Duration.ofMillis(durationInMillis))); }
[ "public", "ZonedDateTime", "nextTimeAfter", "(", "ZonedDateTime", "afterTime", ",", "long", "durationInMillis", ")", "{", "return", "nextTimeAfter", "(", "afterTime", ",", "afterTime", ".", "plus", "(", "Duration", ".", "ofMillis", "(", "durationInMillis", ")", ")...
This will search for the next time within the next durationInMillis millisecond. Be aware that the duration is specified in millis, but in fact the limit is checked on a day-to-day basis. @param afterTime A date-time with a time-zone in the ISO-8601 calendar system @param durationInMillis The maximum duration i...
[ "This", "will", "search", "for", "the", "next", "time", "within", "the", "next", "durationInMillis", "millisecond", ".", "Be", "aware", "that", "the", "duration", "is", "specified", "in", "millis", "but", "in", "fact", "the", "limit", "is", "checked", "on", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/scheduling/cron/CronExpression.java#L240-L242
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findIndexOf
public static <T> int findIndexOf(T[] self, int startIndex, @ClosureParams(FirstParam.Component.class) Closure condition) { """ Iterates over the elements of an Array, starting from a specified startIndex, and returns the index of the first item that satisfies the condition specified by the closure. @param se...
java
public static <T> int findIndexOf(T[] self, int startIndex, @ClosureParams(FirstParam.Component.class) Closure condition) { return findIndexOf(new ArrayIterator<T>(self), startIndex, condition); }
[ "public", "static", "<", "T", ">", "int", "findIndexOf", "(", "T", "[", "]", "self", ",", "int", "startIndex", ",", "@", "ClosureParams", "(", "FirstParam", ".", "Component", ".", "class", ")", "Closure", "condition", ")", "{", "return", "findIndexOf", "...
Iterates over the elements of an Array, starting from a specified startIndex, and returns the index of the first item that satisfies the condition specified by the closure. @param self an Array @param startIndex start matching from this index @param condition the matching condition @return an integer that is th...
[ "Iterates", "over", "the", "elements", "of", "an", "Array", "starting", "from", "a", "specified", "startIndex", "and", "returns", "the", "index", "of", "the", "first", "item", "that", "satisfies", "the", "condition", "specified", "by", "the", "closure", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L16806-L16808
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaUtils.java
SibRaUtils.objectsNotEqual
public static boolean objectsNotEqual(final Object one, final Object two) { """ Compares two objects for equality. @param one the first object @param two the second object @return <code>true</code> if the two objects are <b>not </b> equal, othewise <code>false</code> """ return (one == null) ?...
java
public static boolean objectsNotEqual(final Object one, final Object two) { return (one == null) ? (two != null) : (!one.equals(two)); }
[ "public", "static", "boolean", "objectsNotEqual", "(", "final", "Object", "one", ",", "final", "Object", "two", ")", "{", "return", "(", "one", "==", "null", ")", "?", "(", "two", "!=", "null", ")", ":", "(", "!", "one", ".", "equals", "(", "two", ...
Compares two objects for equality. @param one the first object @param two the second object @return <code>true</code> if the two objects are <b>not </b> equal, othewise <code>false</code>
[ "Compares", "two", "objects", "for", "equality", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaUtils.java#L82-L86
zxing/zxing
android/src/com/google/zxing/client/android/wifi/WifiConfigManager.java
WifiConfigManager.updateNetwork
private static void updateNetwork(WifiManager wifiManager, WifiConfiguration config) { """ Update the network: either create a new network or modify an existing network @param config the new network configuration """ Integer foundNetworkID = findNetworkInExistingConfig(wifiManager, config.SSID); if (f...
java
private static void updateNetwork(WifiManager wifiManager, WifiConfiguration config) { Integer foundNetworkID = findNetworkInExistingConfig(wifiManager, config.SSID); if (foundNetworkID != null) { Log.i(TAG, "Removing old configuration for network " + config.SSID); wifiManager.removeNetwork(foundNet...
[ "private", "static", "void", "updateNetwork", "(", "WifiManager", "wifiManager", ",", "WifiConfiguration", "config", ")", "{", "Integer", "foundNetworkID", "=", "findNetworkInExistingConfig", "(", "wifiManager", ",", "config", ".", "SSID", ")", ";", "if", "(", "fo...
Update the network: either create a new network or modify an existing network @param config the new network configuration
[ "Update", "the", "network", ":", "either", "create", "a", "new", "network", "or", "modify", "an", "existing", "network" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/android/src/com/google/zxing/client/android/wifi/WifiConfigManager.java#L107-L126
korpling/ANNIS
annis-service/src/main/java/annis/security/ANNISUserConfigurationManager.java
ANNISUserConfigurationManager.writeUser
public boolean writeUser(User user) { """ Writes the user to the disk @param user @return True if successful. """ // save user info to file if (resourcePath != null) { lock.writeLock().lock(); try { File userDir = new File(resourcePath, "users"); if (userDir.isDirectory()) { // get ...
java
public boolean writeUser(User user) { // save user info to file if (resourcePath != null) { lock.writeLock().lock(); try { File userDir = new File(resourcePath, "users"); if (userDir.isDirectory()) { // get the file which corresponds to the user File userFile = new File(userDir.getAbsoluteP...
[ "public", "boolean", "writeUser", "(", "User", "user", ")", "{", "// save user info to file", "if", "(", "resourcePath", "!=", "null", ")", "{", "lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "try", "{", "File", "userDir", "=", "new", ...
Writes the user to the disk @param user @return True if successful.
[ "Writes", "the", "user", "to", "the", "disk" ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/security/ANNISUserConfigurationManager.java#L173-L196
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyFiles
public static void copyFiles(File[] files, File[] destinationFiles) throws IOException { """ 批量复制文件,并重命名 @param files 文件数组 @param destinationFiles 目标文件数组,与文件数组一一对应 @throws IOException 异常 """ int length = Integer.min(files.length, destinationFiles.length); for (int i = 0; i < length; i++)...
java
public static void copyFiles(File[] files, File[] destinationFiles) throws IOException { int length = Integer.min(files.length, destinationFiles.length); for (int i = 0; i < length; i++) { copyFile(files[i], destinationFiles[i]); } }
[ "public", "static", "void", "copyFiles", "(", "File", "[", "]", "files", ",", "File", "[", "]", "destinationFiles", ")", "throws", "IOException", "{", "int", "length", "=", "Integer", ".", "min", "(", "files", ".", "length", ",", "destinationFiles", ".", ...
批量复制文件,并重命名 @param files 文件数组 @param destinationFiles 目标文件数组,与文件数组一一对应 @throws IOException 异常
[ "批量复制文件,并重命名" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L513-L518
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/DCModuleGenerator.java
DCModuleGenerator.generateSimpleElement
protected final Element generateSimpleElement(final String name, final String value) { """ Utility method to generate a single element containing a string. <p> @param name the name of the elment to generate. @param value the value of the text in the element. @return the element generated. """ fin...
java
protected final Element generateSimpleElement(final String name, final String value) { final Element element = new Element(name, getDCNamespace()); element.addContent(value); return element; }
[ "protected", "final", "Element", "generateSimpleElement", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "final", "Element", "element", "=", "new", "Element", "(", "name", ",", "getDCNamespace", "(", ")", ")", ";", "element", ".",...
Utility method to generate a single element containing a string. <p> @param name the name of the elment to generate. @param value the value of the text in the element. @return the element generated.
[ "Utility", "method", "to", "generate", "a", "single", "element", "containing", "a", "string", ".", "<p", ">" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/DCModuleGenerator.java#L229-L233
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-lambda-support/src/com/amazon/ask/SkillStreamHandler.java
SkillStreamHandler.handleRequest
@Override public final void handleRequest(InputStream input, OutputStream output, Context context) throws IOException { """ This method is the primary entry point when executing your Lambda function. The configured {@code SkillStreamHandler} determines the type of request and passes the request to the config...
java
@Override public final void handleRequest(InputStream input, OutputStream output, Context context) throws IOException { byte[] inputBytes = IOUtils.toByteArray(input); for (AlexaSkill skill : skills) { SkillResponse response = skill.execute(new BaseSkillRequest(inputBytes), context); ...
[ "@", "Override", "public", "final", "void", "handleRequest", "(", "InputStream", "input", ",", "OutputStream", "output", ",", "Context", "context", ")", "throws", "IOException", "{", "byte", "[", "]", "inputBytes", "=", "IOUtils", ".", "toByteArray", "(", "inp...
This method is the primary entry point when executing your Lambda function. The configured {@code SkillStreamHandler} determines the type of request and passes the request to the configured {@code Skill}. <p> Any errors that occur in either the {@code Skill} or the {@code SkillStreamHandler} are converted into a {@cod...
[ "This", "method", "is", "the", "primary", "entry", "point", "when", "executing", "your", "Lambda", "function", ".", "The", "configured", "{", "@code", "SkillStreamHandler", "}", "determines", "the", "type", "of", "request", "and", "passes", "the", "request", "...
train
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-lambda-support/src/com/amazon/ask/SkillStreamHandler.java#L67-L80
foundation-runtime/configuration
configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/InfraPropertyPlaceholderConfigurer.java
InfraPropertyPlaceholderConfigurer.resolvePlaceholder
@Override protected String resolvePlaceholder(String placeholder, Properties props) { """ trim the string value before it is returned to the caller method. @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#resolvePlaceholder(String, java.util.Properties) """ String reso...
java
@Override protected String resolvePlaceholder(String placeholder, Properties props) { String resolvedPlaceholder = super.resolvePlaceholder(placeholder, props); if (null == resolvedPlaceholder) { LOGGER.trace("could not resolve place holder for key: " + placeholder + ". Please check your configur...
[ "@", "Override", "protected", "String", "resolvePlaceholder", "(", "String", "placeholder", ",", "Properties", "props", ")", "{", "String", "resolvedPlaceholder", "=", "super", ".", "resolvePlaceholder", "(", "placeholder", ",", "props", ")", ";", "if", "(", "nu...
trim the string value before it is returned to the caller method. @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#resolvePlaceholder(String, java.util.Properties)
[ "trim", "the", "string", "value", "before", "it", "is", "returned", "to", "the", "caller", "method", "." ]
train
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/InfraPropertyPlaceholderConfigurer.java#L42-L52
greenjoe/sergeants
src/main/java/pl/joegreen/sergeants/framework/model/api/UpdatableGameState.java
UpdatableGameState.createInitialGameState
public static UpdatableGameState createInitialGameState(GameStartApiResponse startData, GameUpdateApiResponse firstUpdateData) { """ Creates the first game state just after the game is started. Can be done only after both messages are received from server: {@link GameStartApiResponse} and {@link GameUpdateApiResp...
java
public static UpdatableGameState createInitialGameState(GameStartApiResponse startData, GameUpdateApiResponse firstUpdateData) { return new UpdatableGameState( firstUpdateData.getTurn(), startData, MapPatcher.patch(firstUpdateData.getMapDiff(), new int[]{}), MapPatcher.patch(firs...
[ "public", "static", "UpdatableGameState", "createInitialGameState", "(", "GameStartApiResponse", "startData", ",", "GameUpdateApiResponse", "firstUpdateData", ")", "{", "return", "new", "UpdatableGameState", "(", "firstUpdateData", ".", "getTurn", "(", ")", ",", "startDat...
Creates the first game state just after the game is started. Can be done only after both messages are received from server: {@link GameStartApiResponse} and {@link GameUpdateApiResponse}. Cannot be use for further updates, as later game updates from server contain only differences.
[ "Creates", "the", "first", "game", "state", "just", "after", "the", "game", "is", "started", ".", "Can", "be", "done", "only", "after", "both", "messages", "are", "received", "from", "server", ":", "{" ]
train
https://github.com/greenjoe/sergeants/blob/db624bcea8597843210f138b82bc4a26b3ec92ca/src/main/java/pl/joegreen/sergeants/framework/model/api/UpdatableGameState.java#L44-L51
apache/incubator-heron
heron/packing/src/java/org/apache/heron/packing/roundrobin/ResourceCompliantRRPacking.java
ResourceCompliantRRPacking.repack
@Override public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> componentChanges) { """ Get a new packing plan given an existing packing plan and component-level changes. @return new packing plan """ this.numContainers = currentPackingPlan.getContainers().size(); resetToFi...
java
@Override public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> componentChanges) { this.numContainers = currentPackingPlan.getContainers().size(); resetToFirstContainer(); int additionalContainers = computeNumAdditionalContainers(componentChanges, currentPackingPlan); if (ad...
[ "@", "Override", "public", "PackingPlan", "repack", "(", "PackingPlan", "currentPackingPlan", ",", "Map", "<", "String", ",", "Integer", ">", "componentChanges", ")", "{", "this", ".", "numContainers", "=", "currentPackingPlan", ".", "getContainers", "(", ")", "...
Get a new packing plan given an existing packing plan and component-level changes. @return new packing plan
[ "Get", "a", "new", "packing", "plan", "given", "an", "existing", "packing", "plan", "and", "component", "-", "level", "changes", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/packing/src/java/org/apache/heron/packing/roundrobin/ResourceCompliantRRPacking.java#L153-L182
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
Function.getArgumentJSO
@SuppressWarnings("unchecked") public <T extends JavaScriptObject> T getArgumentJSO(int argIdx, int pos) { """ Utility method for safety getting a JavaScriptObject present at a certain position in the list of arguments composed by arrays. """ return (T) getArgument(argIdx, pos, JavaScriptObject.class); ...
java
@SuppressWarnings("unchecked") public <T extends JavaScriptObject> T getArgumentJSO(int argIdx, int pos) { return (T) getArgument(argIdx, pos, JavaScriptObject.class); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "JavaScriptObject", ">", "T", "getArgumentJSO", "(", "int", "argIdx", ",", "int", "pos", ")", "{", "return", "(", "T", ")", "getArgument", "(", "argIdx", ",", "pos", ",", ...
Utility method for safety getting a JavaScriptObject present at a certain position in the list of arguments composed by arrays.
[ "Utility", "method", "for", "safety", "getting", "a", "JavaScriptObject", "present", "at", "a", "certain", "position", "in", "the", "list", "of", "arguments", "composed", "by", "arrays", "." ]
train
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L148-L151
junit-team/junit4
src/main/java/junit/framework/Assert.java
Assert.assertNotSame
static public void assertNotSame(String message, Object expected, Object actual) { """ Asserts that two objects do not refer to the same object. If they do refer to the same object an AssertionFailedError is thrown with the given message. """ if (expected == actual) { failSame(message); ...
java
static public void assertNotSame(String message, Object expected, Object actual) { if (expected == actual) { failSame(message); } }
[ "static", "public", "void", "assertNotSame", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "if", "(", "expected", "==", "actual", ")", "{", "failSame", "(", "message", ")", ";", "}", "}" ]
Asserts that two objects do not refer to the same object. If they do refer to the same object an AssertionFailedError is thrown with the given message.
[ "Asserts", "that", "two", "objects", "do", "not", "refer", "to", "the", "same", "object", ".", "If", "they", "do", "refer", "to", "the", "same", "object", "an", "AssertionFailedError", "is", "thrown", "with", "the", "given", "message", "." ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/junit/framework/Assert.java#L304-L308
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java
ColorXyz.rgbToXyz
public static void rgbToXyz( int r , int g , int b , double xyz[] ) { """ Conversion from 8-bit RGB into XYZ. 8-bit = range of 0 to 255. """ srgbToXyz(r/255.0,g/255.0,b/255.0,xyz); }
java
public static void rgbToXyz( int r , int g , int b , double xyz[] ) { srgbToXyz(r/255.0,g/255.0,b/255.0,xyz); }
[ "public", "static", "void", "rgbToXyz", "(", "int", "r", ",", "int", "g", ",", "int", "b", ",", "double", "xyz", "[", "]", ")", "{", "srgbToXyz", "(", "r", "/", "255.0", ",", "g", "/", "255.0", ",", "b", "/", "255.0", ",", "xyz", ")", ";", "}...
Conversion from 8-bit RGB into XYZ. 8-bit = range of 0 to 255.
[ "Conversion", "from", "8", "-", "bit", "RGB", "into", "XYZ", ".", "8", "-", "bit", "=", "range", "of", "0", "to", "255", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java#L56-L58
Coolerfall/Android-HttpDownloadManager
library/src/main/java/com/coolerfall/download/DownloadDelivery.java
DownloadDelivery.postFailure
void postFailure(final DownloadRequest request, final int statusCode, final String errMsg) { """ Post download failure event. @param request download request @param statusCode status code @param errMsg error message """ downloadPoster.execute(new Runnable() { @Override public void run() { ...
java
void postFailure(final DownloadRequest request, final int statusCode, final String errMsg) { downloadPoster.execute(new Runnable() { @Override public void run() { request.downloadCallback().onFailure(request.downloadId(), statusCode, errMsg); } }); }
[ "void", "postFailure", "(", "final", "DownloadRequest", "request", ",", "final", "int", "statusCode", ",", "final", "String", "errMsg", ")", "{", "downloadPoster", ".", "execute", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run...
Post download failure event. @param request download request @param statusCode status code @param errMsg error message
[ "Post", "download", "failure", "event", "." ]
train
https://github.com/Coolerfall/Android-HttpDownloadManager/blob/2b32451c1799c77708c12bf8155e43c7dc25bc57/library/src/main/java/com/coolerfall/download/DownloadDelivery.java#L85-L91
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/LineInput.java
LineInput.readLine
public int readLine(char[] c,int off,int len) throws IOException { """ Read a line ended by CR, LF or CRLF. The default or supplied encoding is used to convert bytes to characters. @param c Character buffer to place the line into. @param off Offset into the buffer. @param len Maximum length of line. ...
java
public int readLine(char[] c,int off,int len) throws IOException { int blen=fillLine(len); if (blen<0) return -1; if (blen==0) return 0; _byteBuffer.setStream(_mark,blen); int read=0; while(read<len && _reader.ready()...
[ "public", "int", "readLine", "(", "char", "[", "]", "c", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "int", "blen", "=", "fillLine", "(", "len", ")", ";", "if", "(", "blen", "<", "0", ")", "return", "-", "1", ";", "...
Read a line ended by CR, LF or CRLF. The default or supplied encoding is used to convert bytes to characters. @param c Character buffer to place the line into. @param off Offset into the buffer. @param len Maximum length of line. @return The length of the line or -1 for EOF. @exception IOException
[ "Read", "a", "line", "ended", "by", "CR", "LF", "or", "CRLF", ".", "The", "default", "or", "supplied", "encoding", "is", "used", "to", "convert", "bytes", "to", "characters", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/LineInput.java#L217-L241
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java
HiveTask.addJar
public static void addJar(State state, String jar) { """ Add the input jar to the Hive session before running the task. """ state.setProp(ADD_JARS, state.getProp(ADD_JARS, "") + "," + jar); }
java
public static void addJar(State state, String jar) { state.setProp(ADD_JARS, state.getProp(ADD_JARS, "") + "," + jar); }
[ "public", "static", "void", "addJar", "(", "State", "state", ",", "String", "jar", ")", "{", "state", ".", "setProp", "(", "ADD_JARS", ",", "state", ".", "getProp", "(", "ADD_JARS", ",", "\"\"", ")", "+", "\",\"", "+", "jar", ")", ";", "}" ]
Add the input jar to the Hive session before running the task.
[ "Add", "the", "input", "jar", "to", "the", "Hive", "session", "before", "running", "the", "task", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java#L80-L82
milaboratory/milib
src/main/java/com/milaboratory/core/motif/BitapPattern.java
BitapPattern.substitutionAndIndelMatcherLast
public BitapMatcher substitutionAndIndelMatcherLast(int maxNumberOfErrors, final Sequence sequence) { """ Returns a BitapMatcher preforming a fuzzy search in a whole {@code sequence}. Search allows no more than {@code maxNumberOfErrors} number of substitutions/insertions/deletions. Matcher will return positions ...
java
public BitapMatcher substitutionAndIndelMatcherLast(int maxNumberOfErrors, final Sequence sequence) { return substitutionAndIndelMatcherLast(maxNumberOfErrors, sequence, 0, sequence.size()); }
[ "public", "BitapMatcher", "substitutionAndIndelMatcherLast", "(", "int", "maxNumberOfErrors", ",", "final", "Sequence", "sequence", ")", "{", "return", "substitutionAndIndelMatcherLast", "(", "maxNumberOfErrors", ",", "sequence", ",", "0", ",", "sequence", ".", "size", ...
Returns a BitapMatcher preforming a fuzzy search in a whole {@code sequence}. Search allows no more than {@code maxNumberOfErrors} number of substitutions/insertions/deletions. Matcher will return positions of last matched letter in the motif in ascending order. @param maxNumberOfErrors maximal number of allowed subs...
[ "Returns", "a", "BitapMatcher", "preforming", "a", "fuzzy", "search", "in", "a", "whole", "{", "@code", "sequence", "}", ".", "Search", "allows", "no", "more", "than", "{", "@code", "maxNumberOfErrors", "}", "number", "of", "substitutions", "/", "insertions", ...
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/motif/BitapPattern.java#L174-L176
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/GridRansacLineDetector.java
GridRansacLineDetector.convertToLineSegment
private LineSegment2D_F32 convertToLineSegment(List<Edgel> matchSet, LinePolar2D_F32 model) { """ Lines are found in polar form and this coverts them into line segments by finding the extreme points of points on the line. @param matchSet Set of points belonging to the line. @param model Detected line. @retur...
java
private LineSegment2D_F32 convertToLineSegment(List<Edgel> matchSet, LinePolar2D_F32 model) { float minT = Float.MAX_VALUE; float maxT = -Float.MAX_VALUE; LineParametric2D_F32 line = UtilLine2D_F32.convert(model,(LineParametric2D_F32)null); Point2D_F32 p = new Point2D_F32(); for( Edgel e : matchSet ) { p...
[ "private", "LineSegment2D_F32", "convertToLineSegment", "(", "List", "<", "Edgel", ">", "matchSet", ",", "LinePolar2D_F32", "model", ")", "{", "float", "minT", "=", "Float", ".", "MAX_VALUE", ";", "float", "maxT", "=", "-", "Float", ".", "MAX_VALUE", ";", "L...
Lines are found in polar form and this coverts them into line segments by finding the extreme points of points on the line. @param matchSet Set of points belonging to the line. @param model Detected line. @return Line segement.
[ "Lines", "are", "found", "in", "polar", "form", "and", "this", "coverts", "them", "into", "line", "segments", "by", "finding", "the", "extreme", "points", "of", "points", "on", "the", "line", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/GridRansacLineDetector.java#L190-L214
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java
BaseConvertToNative.setPayloadProperty
public void setPayloadProperty(BaseMessage message, Object msg, String strKey, Class<?> classKey) { """ Move this standard payload properties from the message to the xml. @param message @param msg @param strKey """ Object data = message.get(strKey); if (data == null) return; ...
java
public void setPayloadProperty(BaseMessage message, Object msg, String strKey, Class<?> classKey) { Object data = message.get(strKey); if (data == null) return; this.setPayloadProperty(data, msg, strKey, classKey); }
[ "public", "void", "setPayloadProperty", "(", "BaseMessage", "message", ",", "Object", "msg", ",", "String", "strKey", ",", "Class", "<", "?", ">", "classKey", ")", "{", "Object", "data", "=", "message", ".", "get", "(", "strKey", ")", ";", "if", "(", "...
Move this standard payload properties from the message to the xml. @param message @param msg @param strKey
[ "Move", "this", "standard", "payload", "properties", "from", "the", "message", "to", "the", "xml", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java#L196-L202
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Reductions.java
Reductions.maximum
public static <E extends Comparable<E>> E maximum(Iterator<E> iterator, E init) { """ Returns the max element contained in the iterator @param <E> the iterator element type parameter @param iterator the iterator to be consumed @param init the initial value to be used @return the max element contained in the ...
java
public static <E extends Comparable<E>> E maximum(Iterator<E> iterator, E init) { return Reductions.reduce(iterator, BinaryOperator.maxBy(new ComparableComparator<E>()), init); }
[ "public", "static", "<", "E", "extends", "Comparable", "<", "E", ">", ">", "E", "maximum", "(", "Iterator", "<", "E", ">", "iterator", ",", "E", "init", ")", "{", "return", "Reductions", ".", "reduce", "(", "iterator", ",", "BinaryOperator", ".", "maxB...
Returns the max element contained in the iterator @param <E> the iterator element type parameter @param iterator the iterator to be consumed @param init the initial value to be used @return the max element contained in the iterator
[ "Returns", "the", "max", "element", "contained", "in", "the", "iterator" ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Reductions.java#L225-L227
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/GCRules.java
GCRules.maxAge
public DurationRule maxAge(long maxAge, TimeUnit timeUnit) { """ Creates a new instance of the DurationRule @param maxAge - maximum age of the cell to keep @param timeUnit - timeunit for the age """ return maxAge(Duration.ofNanos(TimeUnit.NANOSECONDS.convert(maxAge, timeUnit))); }
java
public DurationRule maxAge(long maxAge, TimeUnit timeUnit) { return maxAge(Duration.ofNanos(TimeUnit.NANOSECONDS.convert(maxAge, timeUnit))); }
[ "public", "DurationRule", "maxAge", "(", "long", "maxAge", ",", "TimeUnit", "timeUnit", ")", "{", "return", "maxAge", "(", "Duration", ".", "ofNanos", "(", "TimeUnit", ".", "NANOSECONDS", ".", "convert", "(", "maxAge", ",", "timeUnit", ")", ")", ")", ";", ...
Creates a new instance of the DurationRule @param maxAge - maximum age of the cell to keep @param timeUnit - timeunit for the age
[ "Creates", "a", "new", "instance", "of", "the", "DurationRule" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/GCRules.java#L66-L68
craterdog/java-security-framework
java-secure-messaging-api/src/main/java/craterdog/security/MessageCryptex.java
MessageCryptex.decryptStream
public final void decryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException { """ This method decrypts a byte stream from an encrypted byte stream. @param sharedKey The shared key used for the encryption. @param input The encrypted byte stream. @param output The decrypted b...
java
public final void decryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException { logger.entry(); CipherInputStream cipherInput = null; try { logger.debug("Creating a special input stream to do the work..."); cipherInput = decryptionIn...
[ "public", "final", "void", "decryptStream", "(", "SecretKey", "sharedKey", ",", "InputStream", "input", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "logger", ".", "entry", "(", ")", ";", "CipherInputStream", "cipherInput", "=", "null", ";",...
This method decrypts a byte stream from an encrypted byte stream. @param sharedKey The shared key used for the encryption. @param input The encrypted byte stream. @param output The decrypted byte stream. @throws java.io.IOException Unable to decrypt the stream.
[ "This", "method", "decrypts", "a", "byte", "stream", "from", "an", "encrypted", "byte", "stream", "." ]
train
https://github.com/craterdog/java-security-framework/blob/a5634c19812d473b608bc11060f5cbb4b4b0b5da/java-secure-messaging-api/src/main/java/craterdog/security/MessageCryptex.java#L229-L243
twitter/chill
chill-java/src/main/java/com/twitter/chill/config/ConfiguredInstantiator.java
ConfiguredInstantiator.reflect
static KryoInstantiator reflect(Class<? extends KryoInstantiator> instClass, Config optConf) throws ConfigurationException { """ This instantiates a KryoInstantiator by: 1) checking if it has a constructor that takes Config 2) checking for a no-arg constructor """ try { try { return ins...
java
static KryoInstantiator reflect(Class<? extends KryoInstantiator> instClass, Config optConf) throws ConfigurationException { try { try { return instClass.getConstructor(Config.class).newInstance(optConf); } catch (NoSuchMethodException ex3) { return instClass.newInstance(); } ...
[ "static", "KryoInstantiator", "reflect", "(", "Class", "<", "?", "extends", "KryoInstantiator", ">", "instClass", ",", "Config", "optConf", ")", "throws", "ConfigurationException", "{", "try", "{", "try", "{", "return", "instClass", ".", "getConstructor", "(", "...
This instantiates a KryoInstantiator by: 1) checking if it has a constructor that takes Config 2) checking for a no-arg constructor
[ "This", "instantiates", "a", "KryoInstantiator", "by", ":", "1", ")", "checking", "if", "it", "has", "a", "constructor", "that", "takes", "Config", "2", ")", "checking", "for", "a", "no", "-", "arg", "constructor" ]
train
https://github.com/twitter/chill/blob/0919984ec3aeb320ff522911c726425e9f18ea41/chill-java/src/main/java/com/twitter/chill/config/ConfiguredInstantiator.java#L97-L115
alkacon/opencms-core
src/org/opencms/jsp/decorator/CmsDecorationObject.java
CmsDecorationObject.getContentDecoration
public String getContentDecoration(I_CmsDecoratorConfiguration config, String text, String contentLocale) { """ Gets the decorated content for this decoration object.<p> @param config the configuration used @param text the text to be decorated @param contentLocale the locale of the content to be decorated @r...
java
public String getContentDecoration(I_CmsDecoratorConfiguration config, String text, String contentLocale) { StringBuffer content = new StringBuffer(); // TODO: we have to handle with word phrases, too // add the pretext if (!config.hasUsed(m_decorationKey) && m_decorationDefinition.isM...
[ "public", "String", "getContentDecoration", "(", "I_CmsDecoratorConfiguration", "config", ",", "String", "text", ",", "String", "contentLocale", ")", "{", "StringBuffer", "content", "=", "new", "StringBuffer", "(", ")", ";", "// TODO: we have to handle with word phrases, ...
Gets the decorated content for this decoration object.<p> @param config the configuration used @param text the text to be decorated @param contentLocale the locale of the content to be decorated @return decorated content
[ "Gets", "the", "decorated", "content", "for", "this", "decoration", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/decorator/CmsDecorationObject.java#L101-L125
apache/groovy
src/main/groovy/groovy/beans/VetoableASTTransformation.java
VetoableASTTransformation.visit
public void visit(ASTNode[] nodes, SourceUnit source) { """ Handles the bulk of the processing, mostly delegating to other methods. @param nodes the AST nodes @param source the source unit for the nodes """ if (!(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) { ...
java
public void visit(ASTNode[] nodes, SourceUnit source) { if (!(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) { throw new RuntimeException("Internal error: wrong types: $node.class / $parent.class"); } AnnotationNode node = (AnnotationNode) nodes[0]; ...
[ "public", "void", "visit", "(", "ASTNode", "[", "]", "nodes", ",", "SourceUnit", "source", ")", "{", "if", "(", "!", "(", "nodes", "[", "0", "]", "instanceof", "AnnotationNode", ")", "||", "!", "(", "nodes", "[", "1", "]", "instanceof", "AnnotatedNode"...
Handles the bulk of the processing, mostly delegating to other methods. @param nodes the AST nodes @param source the source unit for the nodes
[ "Handles", "the", "bulk", "of", "the", "processing", "mostly", "delegating", "to", "other", "methods", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/beans/VetoableASTTransformation.java#L103-L121
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java
ResourceFormatGeneratorService.getGeneratorForFormat
public ResourceFormatGenerator getGeneratorForFormat(final String format) throws UnsupportedFormatException { """ Return a parser for the exact format name @param format the format name @return the parser found for the format @throws com.dtolabs.rundeck.core.resources.format.UnsupportedFormatException if...
java
public ResourceFormatGenerator getGeneratorForFormat(final String format) throws UnsupportedFormatException { try { return providerOfType(format); } catch (ExecutionServiceException e) { throw new UnsupportedFormatException("No provider available to parse format: " + format, e); ...
[ "public", "ResourceFormatGenerator", "getGeneratorForFormat", "(", "final", "String", "format", ")", "throws", "UnsupportedFormatException", "{", "try", "{", "return", "providerOfType", "(", "format", ")", ";", "}", "catch", "(", "ExecutionServiceException", "e", ")",...
Return a parser for the exact format name @param format the format name @return the parser found for the format @throws com.dtolabs.rundeck.core.resources.format.UnsupportedFormatException if no provider for the format exists
[ "Return", "a", "parser", "for", "the", "exact", "format", "name" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java#L128-L134
JOML-CI/JOML
src/org/joml/Vector2d.java
Vector2d.set
public Vector2d set(int index, ByteBuffer buffer) { """ Read this vector from the supplied {@link ByteBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given ByteBuffer. @param index the absolute position into the ByteBuffer @param buff...
java
public Vector2d set(int index, ByteBuffer buffer) { MemUtil.INSTANCE.get(this, index, buffer); return this; }
[ "public", "Vector2d", "set", "(", "int", "index", ",", "ByteBuffer", "buffer", ")", "{", "MemUtil", ".", "INSTANCE", ".", "get", "(", "this", ",", "index", ",", "buffer", ")", ";", "return", "this", ";", "}" ]
Read this vector from the supplied {@link ByteBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given ByteBuffer. @param index the absolute position into the ByteBuffer @param buffer values will be read in <code>x, y</code> order @return this
[ "Read", "this", "vector", "from", "the", "supplied", "{", "@link", "ByteBuffer", "}", "starting", "at", "the", "specified", "absolute", "buffer", "position", "/", "index", ".", "<p", ">", "This", "method", "will", "not", "increment", "the", "position", "of",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector2d.java#L301-L304
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/URLConnectionTools.java
URLConnectionTools.openURLConnection
public static URLConnection openURLConnection(URL url, int timeout) throws IOException { """ Open HttpURLConnection. Recommended way to open URL connections in Java 1.7 and 1.8. https://eventuallyconsistent.net/2011/08/02/working-with-urlconnection-and-timeouts/ @param url URL to open @param timeout timeout in ...
java
public static URLConnection openURLConnection(URL url, int timeout) throws IOException { URLConnection huc = url.openConnection(); huc.setReadTimeout(timeout); huc.setConnectTimeout(timeout); return huc; }
[ "public", "static", "URLConnection", "openURLConnection", "(", "URL", "url", ",", "int", "timeout", ")", "throws", "IOException", "{", "URLConnection", "huc", "=", "url", ".", "openConnection", "(", ")", ";", "huc", ".", "setReadTimeout", "(", "timeout", ")", ...
Open HttpURLConnection. Recommended way to open URL connections in Java 1.7 and 1.8. https://eventuallyconsistent.net/2011/08/02/working-with-urlconnection-and-timeouts/ @param url URL to open @param timeout timeout in milli seconds @throws IOException an error in opening the URL
[ "Open", "HttpURLConnection", ".", "Recommended", "way", "to", "open", "URL", "connections", "in", "Java", "1", ".", "7", "and", "1", ".", "8", ".", "https", ":", "//", "eventuallyconsistent", ".", "net", "/", "2011", "/", "08", "/", "02", "/", "working...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/URLConnectionTools.java#L57-L62
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.setRole
@Override public void setRole(String username, String newrole) throws RolesException { """ Assign a role to a user. @param username The username of the user. @param newrole The new role to assign the user. @throws RolesException if there was an error during assignment. """ List<String> users_with_ro...
java
@Override public void setRole(String username, String newrole) throws RolesException { List<String> users_with_role = new ArrayList<String>(); if (user_list.containsKey(username)) { List<String> roles_of_user = user_list.get(username); if (!roles_of_user.contains(newrole)) { // Update our user list ...
[ "@", "Override", "public", "void", "setRole", "(", "String", "username", ",", "String", "newrole", ")", "throws", "RolesException", "{", "List", "<", "String", ">", "users_with_role", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", ...
Assign a role to a user. @param username The username of the user. @param newrole The new role to assign the user. @throws RolesException if there was an error during assignment.
[ "Assign", "a", "role", "to", "a", "user", "." ]
train
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L289-L325
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getPvPStatInfo
public void getPvPStatInfo(String api, Callback<PvPStat> callback) throws GuildWars2Exception, NullPointerException { """ For more info on pvp stat API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/stats">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callbac...
java
public void getPvPStatInfo(String api, Callback<PvPStat> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, api)); gw2API.getPvPStatInfo(api).enqueue(callback); }
[ "public", "void", "getPvPStatInfo", "(", "String", "api", ",", "Callback", "<", "PvPStat", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ParamType", ".", "API", ",", "ap...
For more info on pvp stat API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/stats">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param api Guild Wars 2 API key @param callback callback tha...
[ "For", "more", "info", "on", "pvp", "stat", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "pvp", "/", "stats", ">", "here<", "/", "a", ">", "<br", "/", ">", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2192-L2195
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.getClassPathElement
public static String getClassPathElement(final URL anURL, final String encoding) throws IllegalArgumentException { """ Converts the supplied URL to a class path element. @param anURL The non-null URL for which to acquire a classPath element. @param encoding The encoding used by Maven. @return The full (i.e...
java
public static String getClassPathElement(final URL anURL, final String encoding) throws IllegalArgumentException { // Check sanity Validate.notNull(anURL, "anURL"); final String protocol = anURL.getProtocol(); String toReturn = null; if (FILE.supports(protocol)) { ...
[ "public", "static", "String", "getClassPathElement", "(", "final", "URL", "anURL", ",", "final", "String", "encoding", ")", "throws", "IllegalArgumentException", "{", "// Check sanity", "Validate", ".", "notNull", "(", "anURL", ",", "\"anURL\"", ")", ";", "final",...
Converts the supplied URL to a class path element. @param anURL The non-null URL for which to acquire a classPath element. @param encoding The encoding used by Maven. @return The full (i.e. non-chopped) classpath element corresponding to the supplied URL. @throws java.lang.IllegalArgumentException if the supplied U...
[ "Converts", "the", "supplied", "URL", "to", "a", "class", "path", "element", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L293-L322
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/core/support/LabelInfo.java
LabelInfo.configureLabelFor
public void configureLabelFor(JLabel label, JComponent component) { """ Configures the given label with the property values described by this instance and then sets it as the label for the given component. @param label The label to be configured. @param component The component that the label is 'for'. @thr...
java
public void configureLabelFor(JLabel label, JComponent component) { Assert.notNull(label, "label"); Assert.notNull(component, "component"); configureLabel(label); if (!(component instanceof JPanel)) { String labelText = label.getText(); if (!labelText.endsWith...
[ "public", "void", "configureLabelFor", "(", "JLabel", "label", ",", "JComponent", "component", ")", "{", "Assert", ".", "notNull", "(", "label", ",", "\"label\"", ")", ";", "Assert", ".", "notNull", "(", "component", ",", "\"component\"", ")", ";", "configur...
Configures the given label with the property values described by this instance and then sets it as the label for the given component. @param label The label to be configured. @param component The component that the label is 'for'. @throws IllegalArgumentException if either argument is null. @see JLabel#setLabelFor(j...
[ "Configures", "the", "given", "label", "with", "the", "property", "values", "described", "by", "this", "instance", "and", "then", "sets", "it", "as", "the", "label", "for", "the", "given", "component", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/core/support/LabelInfo.java#L366-L389
google/closure-compiler
src/com/google/javascript/jscomp/AnalyzePrototypeProperties.java
AnalyzePrototypeProperties.getNameInfoForName
private NameInfo getNameInfoForName(String name, SymbolType type) { """ Gets the name info for the property or variable of a given name, and creates a new one if necessary. @param name The name of the symbol. @param type The type of symbol. """ Map<String, NameInfo> map = type == PROPERTY ? propertyNa...
java
private NameInfo getNameInfoForName(String name, SymbolType type) { Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo; if (map.containsKey(name)) { return map.get(name); } else { NameInfo nameInfo = new NameInfo(name); map.put(name, nameInfo); symbolGraph....
[ "private", "NameInfo", "getNameInfoForName", "(", "String", "name", ",", "SymbolType", "type", ")", "{", "Map", "<", "String", ",", "NameInfo", ">", "map", "=", "type", "==", "PROPERTY", "?", "propertyNameInfo", ":", "varNameInfo", ";", "if", "(", "map", "...
Gets the name info for the property or variable of a given name, and creates a new one if necessary. @param name The name of the symbol. @param type The type of symbol.
[ "Gets", "the", "name", "info", "for", "the", "property", "or", "variable", "of", "a", "given", "name", "and", "creates", "a", "new", "one", "if", "necessary", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AnalyzePrototypeProperties.java#L175-L185
samskivert/samskivert
src/main/java/com/samskivert/util/PropertiesUtil.java
PropertiesUtil.requireProperty
public static String requireProperty (Properties props, String key, String missingMessage) { """ Returns the specified property from the supplied properties object. @throws MissingPropertyException with the supplied message if the property does not exist or is the empty string. """ String value = pro...
java
public static String requireProperty (Properties props, String key, String missingMessage) { String value = props.getProperty(key); if (StringUtil.isBlank(value)) { throw new MissingPropertyException(key, missingMessage); } return value; }
[ "public", "static", "String", "requireProperty", "(", "Properties", "props", ",", "String", "key", ",", "String", "missingMessage", ")", "{", "String", "value", "=", "props", ".", "getProperty", "(", "key", ")", ";", "if", "(", "StringUtil", ".", "isBlank", ...
Returns the specified property from the supplied properties object. @throws MissingPropertyException with the supplied message if the property does not exist or is the empty string.
[ "Returns", "the", "specified", "property", "from", "the", "supplied", "properties", "object", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PropertiesUtil.java#L222-L229
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/SetupOptions.java
SetupOptions.getWorkDir
public File getWorkDir() { """ Returns the location of the work directory (TE_BASE/work). @return A File denoting a directory location; it is created if it does not exist. """ if (null == this.workDir) { File dir = new File(teBaseDir, "work"); if (!dir.exists() && !dir.mkdir()) { ...
java
public File getWorkDir() { if (null == this.workDir) { File dir = new File(teBaseDir, "work"); if (!dir.exists() && !dir.mkdir()) { throw new RuntimeException("Failed to create directory at " + dir.getAbsolutePath()); } this.workDir = dir; } return wo...
[ "public", "File", "getWorkDir", "(", ")", "{", "if", "(", "null", "==", "this", ".", "workDir", ")", "{", "File", "dir", "=", "new", "File", "(", "teBaseDir", ",", "\"work\"", ")", ";", "if", "(", "!", "dir", ".", "exists", "(", ")", "&&", "!", ...
Returns the location of the work directory (TE_BASE/work). @return A File denoting a directory location; it is created if it does not exist.
[ "Returns", "the", "location", "of", "the", "work", "directory", "(", "TE_BASE", "/", "work", ")", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/SetupOptions.java#L154-L164
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.deleteTopic
public PubsubFuture<Void> deleteTopic(final String canonicalTopic) { """ Delete a Pub/Sub topic. @param canonicalTopic The canonical (including project) name of the topic to delete. @return A future that is completed when this request is completed. The future will be completed with {@code null} if the respons...
java
public PubsubFuture<Void> deleteTopic(final String canonicalTopic) { validateCanonicalTopic(canonicalTopic); return delete("delete topic", canonicalTopic, VOID); }
[ "public", "PubsubFuture", "<", "Void", ">", "deleteTopic", "(", "final", "String", "canonicalTopic", ")", "{", "validateCanonicalTopic", "(", "canonicalTopic", ")", ";", "return", "delete", "(", "\"delete topic\"", ",", "canonicalTopic", ",", "VOID", ")", ";", "...
Delete a Pub/Sub topic. @param canonicalTopic The canonical (including project) name of the topic to delete. @return A future that is completed when this request is completed. The future will be completed with {@code null} if the response is 404.
[ "Delete", "a", "Pub", "/", "Sub", "topic", "." ]
train
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L342-L345
Minecrell/TerminalConsoleAppender
src/main/java/net/minecrell/terminalconsole/util/LoggerNamePatternSelector.java
LoggerNamePatternSelector.createSelector
@PluginFactory public static LoggerNamePatternSelector createSelector( @Required(message = "Default pattern is required") @PluginAttribute(value = "defaultPattern") String defaultPattern, @PluginElement("PatternMatch") PatternMatch[] properties, @PluginAttribute(value = "alwaysWr...
java
@PluginFactory public static LoggerNamePatternSelector createSelector( @Required(message = "Default pattern is required") @PluginAttribute(value = "defaultPattern") String defaultPattern, @PluginElement("PatternMatch") PatternMatch[] properties, @PluginAttribute(value = "alwaysWr...
[ "@", "PluginFactory", "public", "static", "LoggerNamePatternSelector", "createSelector", "(", "@", "Required", "(", "message", "=", "\"Default pattern is required\"", ")", "@", "PluginAttribute", "(", "value", "=", "\"defaultPattern\"", ")", "String", "defaultPattern", ...
Creates a new {@link LoggerNamePatternSelector}. @param defaultPattern The default pattern to use if no logger name matches @param properties The pattern match rules to use @param alwaysWriteExceptions Write exceptions even if pattern does not include exception conversion @param disableAnsi If true, disable all ANSI e...
[ "Creates", "a", "new", "{", "@link", "LoggerNamePatternSelector", "}", "." ]
train
https://github.com/Minecrell/TerminalConsoleAppender/blob/a540454b397ee488993019fbcacc49b2d88f1752/src/main/java/net/minecrell/terminalconsole/util/LoggerNamePatternSelector.java#L151-L160
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/xml/DOMCloner.java
DOMCloner.cloneNode
public Node cloneNode(Document doc, Node eold) { """ Clone an existing node. @param doc Document @param eold Existing node @return Cloned node """ return doc.importNode(eold, true); }
java
public Node cloneNode(Document doc, Node eold) { return doc.importNode(eold, true); }
[ "public", "Node", "cloneNode", "(", "Document", "doc", ",", "Node", "eold", ")", "{", "return", "doc", ".", "importNode", "(", "eold", ",", "true", ")", ";", "}" ]
Clone an existing node. @param doc Document @param eold Existing node @return Cloned node
[ "Clone", "an", "existing", "node", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/xml/DOMCloner.java#L87-L89
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.beanMap
public static Collection beanMap(String property, Object[] objs) { """ Map dynamically using a bean property name. @param property the name of a bean property @param objs an array of objects @return collection @throws ClassCastException if there is an error invoking the method on any object. """ ...
java
public static Collection beanMap(String property, Object[] objs) { return beanMap(property, java.util.Arrays.asList(objs), false); }
[ "public", "static", "Collection", "beanMap", "(", "String", "property", ",", "Object", "[", "]", "objs", ")", "{", "return", "beanMap", "(", "property", ",", "java", ".", "util", ".", "Arrays", ".", "asList", "(", "objs", ")", ",", "false", ")", ";", ...
Map dynamically using a bean property name. @param property the name of a bean property @param objs an array of objects @return collection @throws ClassCastException if there is an error invoking the method on any object.
[ "Map", "dynamically", "using", "a", "bean", "property", "name", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L658-L660
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/WrappedSQLTransformation.java
WrappedSQLTransformation.generateReadValueFromCursor
@Override public void generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName) { """ /* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.AbstractSQLTransform#generateReadValueFromCursor(com.squareup.javap...
java
@Override public void generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName) { methodBuilder.addCode(READ_FROM_CURSOR, cursorName, indexName); }
[ "@", "Override", "public", "void", "generateReadValueFromCursor", "(", "Builder", "methodBuilder", ",", "SQLiteDaoDefinition", "daoDefinition", ",", "TypeName", "paramTypeName", ",", "String", "cursorName", ",", "String", "indexName", ")", "{", "methodBuilder", ".", "...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.AbstractSQLTransform#generateReadValueFromCursor(com.squareup.javapoet.MethodSpec.Builder, com.abubusoft.kripton.processor.sqlite.model.SQLiteDaoDefinition, com.squareup.javapoet.TypeName, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/WrappedSQLTransformation.java#L52-L55
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java
Normalizer.compare
public static int compare(int char32a, String str2, int options) { """ Convenience method that can have faster implementation by not allocating buffers. @param char32a the first code point to be checked against @param str2 the second string @param options A bit set of options """ return in...
java
public static int compare(int char32a, String str2, int options) { return internalCompare(UTF16.valueOf(char32a), str2, options); }
[ "public", "static", "int", "compare", "(", "int", "char32a", ",", "String", "str2", ",", "int", "options", ")", "{", "return", "internalCompare", "(", "UTF16", ".", "valueOf", "(", "char32a", ")", ",", "str2", ",", "options", ")", ";", "}" ]
Convenience method that can have faster implementation by not allocating buffers. @param char32a the first code point to be checked against @param str2 the second string @param options A bit set of options
[ "Convenience", "method", "that", "can", "have", "faster", "implementation", "by", "not", "allocating", "buffers", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L1302-L1304
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java
AbstractLIBORCovarianceModel.getFactorLoading
public RandomVariableInterface[] getFactorLoading(double time, int component, RandomVariableInterface[] realizationAtTimeIndex) { """ Return the factor loading for a given time and component index. The factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br> <i>f<sub>j</sub>f<sub>k</su...
java
public RandomVariableInterface[] getFactorLoading(double time, int component, RandomVariableInterface[] realizationAtTimeIndex) { int timeIndex = timeDiscretization.getTimeIndex(time); if(timeIndex < 0) { timeIndex = -timeIndex - 2; } return getFactorLoading(timeIndex, component, realizationAtTimeIndex); }
[ "public", "RandomVariableInterface", "[", "]", "getFactorLoading", "(", "double", "time", ",", "int", "component", ",", "RandomVariableInterface", "[", "]", "realizationAtTimeIndex", ")", "{", "int", "timeIndex", "=", "timeDiscretization", ".", "getTimeIndex", "(", ...
Return the factor loading for a given time and component index. The factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br> <i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br> is the instantaneous covariance of the component <i>j</i>...
[ "Return", "the", "factor", "loading", "for", "a", "given", "time", "and", "component", "index", ".", "The", "factor", "loading", "is", "the", "vector", "<i", ">", "f<sub", ">", "i<", "/", "sub", ">", "<", "/", "i", ">", "such", "that", "the", "scalar...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java#L86-L92
cryptomator/cryptofs
src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProvider.java
CryptoFileSystemProvider.changePassphrase
public static void changePassphrase(Path pathToVault, String masterkeyFilename, byte[] pepper, CharSequence oldPassphrase, CharSequence newPassphrase) throws InvalidPassphraseException, FileSystemNeedsMigrationException, IOException { """ Changes the passphrase of a vault at the given path. @param pathToVau...
java
public static void changePassphrase(Path pathToVault, String masterkeyFilename, byte[] pepper, CharSequence oldPassphrase, CharSequence newPassphrase) throws InvalidPassphraseException, FileSystemNeedsMigrationException, IOException { if (Migrators.get().needsMigration(pathToVault, masterkeyFilename)) { thro...
[ "public", "static", "void", "changePassphrase", "(", "Path", "pathToVault", ",", "String", "masterkeyFilename", ",", "byte", "[", "]", "pepper", ",", "CharSequence", "oldPassphrase", ",", "CharSequence", "newPassphrase", ")", "throws", "InvalidPassphraseException", ",...
Changes the passphrase of a vault at the given path. @param pathToVault Vault directory @param masterkeyFilename Name of the masterkey file @param pepper An application-specific pepper added to the salt during key-derivation (if applicable) @param oldPassphrase Current passphrase @param newPassphrase Future passphrase...
[ "Changes", "the", "passphrase", "of", "a", "vault", "at", "the", "given", "path", "." ]
train
https://github.com/cryptomator/cryptofs/blob/67fc1a4950dd1c150cd2e2c75bcabbeb7c9ac82e/src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProvider.java#L220-L233
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java
FileSystemUtil.supportsRename
public static boolean supportsRename(URI fsUri, Configuration conf) { """ Determine whether a FileSystem that supports efficient file renaming is being used. Two known FileSystem implementations that currently lack this feature are S3N and S3A. @param fsUri the FileSystem URI @param conf the FileSystem Config...
java
public static boolean supportsRename(URI fsUri, Configuration conf) { String fsUriScheme = fsUri.getScheme(); // Only S3 is known to not support renaming, but allow configuration override. // This logic is intended as a temporary placeholder solution and should // be revisited once HADOOP-9565 has been...
[ "public", "static", "boolean", "supportsRename", "(", "URI", "fsUri", ",", "Configuration", "conf", ")", "{", "String", "fsUriScheme", "=", "fsUri", ".", "getScheme", "(", ")", ";", "// Only S3 is known to not support renaming, but allow configuration override.", "// This...
Determine whether a FileSystem that supports efficient file renaming is being used. Two known FileSystem implementations that currently lack this feature are S3N and S3A. @param fsUri the FileSystem URI @param conf the FileSystem Configuration @return {@code true} if the FileSystem URI or {@link FileSystemProperties#S...
[ "Determine", "whether", "a", "FileSystem", "that", "supports", "efficient", "file", "renaming", "is", "being", "used", ".", "Two", "known", "FileSystem", "implementations", "that", "currently", "lack", "this", "feature", "are", "S3N", "and", "S3A", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java#L710-L718
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java
HttpFields.addDateField
public void addDateField(String name, long date) { """ Sets the value of a date field. @param name the field name @param date the field date value """ String d = DateGenerator.formatDate(date); add(name, d); }
java
public void addDateField(String name, long date) { String d = DateGenerator.formatDate(date); add(name, d); }
[ "public", "void", "addDateField", "(", "String", "name", ",", "long", "date", ")", "{", "String", "d", "=", "DateGenerator", ".", "formatDate", "(", "date", ")", ";", "add", "(", "name", ",", "d", ")", ";", "}" ]
Sets the value of a date field. @param name the field name @param date the field date value
[ "Sets", "the", "value", "of", "a", "date", "field", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L695-L698
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.queryBlockchainInfo
public BlockchainInfo queryBlockchainInfo(Peer peer, User userContext) throws ProposalException, InvalidArgumentException { """ query for chain information @param peer The peer to send the request to @param userContext the user context to use. @return a {@link BlockchainInfo} object containing the chai...
java
public BlockchainInfo queryBlockchainInfo(Peer peer, User userContext) throws ProposalException, InvalidArgumentException { return queryBlockchainInfo(Collections.singleton(peer), userContext); }
[ "public", "BlockchainInfo", "queryBlockchainInfo", "(", "Peer", "peer", ",", "User", "userContext", ")", "throws", "ProposalException", ",", "InvalidArgumentException", "{", "return", "queryBlockchainInfo", "(", "Collections", ".", "singleton", "(", "peer", ")", ",", ...
query for chain information @param peer The peer to send the request to @param userContext the user context to use. @return a {@link BlockchainInfo} object containing the chain info requested @throws InvalidArgumentException @throws ProposalException
[ "query", "for", "chain", "information" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3115-L3119
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/plugins/PluginCommandLine.java
PluginCommandLine.getOptionValue
public String getOptionValue(final char shortOption, final String defaultValue) { """ Returns the value of the specified option If the option is not present, returns the default value. @param shortOption The option short name @param defaultValue The default value @return The option value or, if not speci...
java
public String getOptionValue(final char shortOption, final String defaultValue) { return (String) commandLine.getValue("-" + shortOption, defaultValue); }
[ "public", "String", "getOptionValue", "(", "final", "char", "shortOption", ",", "final", "String", "defaultValue", ")", "{", "return", "(", "String", ")", "commandLine", ".", "getValue", "(", "\"-\"", "+", "shortOption", ",", "defaultValue", ")", ";", "}" ]
Returns the value of the specified option If the option is not present, returns the default value. @param shortOption The option short name @param defaultValue The default value @return The option value or, if not specified, the default value * @see it.jnrpe.ICommandLine#getOptionValue(char, String)
[ "Returns", "the", "value", "of", "the", "specified", "option", "If", "the", "option", "is", "not", "present", "returns", "the", "default", "value", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/plugins/PluginCommandLine.java#L130-L132
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.curveTo
public void curveTo(float x1, float y1, float x2, float y2, 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 x2 x-coord...
java
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) { content.append(x1).append(' ').append(y1).append(' ').append(x2).append(' ').append(y2).append(' ').append(x3).append(' ').append(y3).append(" c").append_i(separator); }
[ "public", "void", "curveTo", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ",", "float", "x3", ",", "float", "y3", ")", "{", "content", ".", "append", "(", "x1", ")", ".", "append", "(", "'", "'", ")", ".", "ap...
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 x2 x-coordinate of the second control point @param y2 y-coordinate of the second control point...
[ "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#L729-L731
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/host/controller/mgmt/HostControllerRegistrationHandler.java
HostControllerRegistrationHandler.sendFailedResponse
static void sendFailedResponse(final ManagementRequestContext<RegistrationContext> context, final byte errorCode, final String message) throws IOException { """ Send a failed operation response. @param context the request context @param errorCode the error code @param message the operation message @throws IO...
java
static void sendFailedResponse(final ManagementRequestContext<RegistrationContext> context, final byte errorCode, final String message) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader()); final FlushableDataOutput output = context.wri...
[ "static", "void", "sendFailedResponse", "(", "final", "ManagementRequestContext", "<", "RegistrationContext", ">", "context", ",", "final", "byte", "errorCode", ",", "final", "String", "message", ")", "throws", "IOException", "{", "final", "ManagementResponseHeader", ...
Send a failed operation response. @param context the request context @param errorCode the error code @param message the operation message @throws IOException for any error
[ "Send", "a", "failed", "operation", "response", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/mgmt/HostControllerRegistrationHandler.java#L745-L765
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/DataDecoder.java
DataDecoder.decodeShortObj
public static Short decodeShortObj(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a signed Short object from exactly 1 or 3 bytes. If null is returned, then 1 byte was read. @param src source of encoded bytes @param srcOffset offset into source array @return signed Short ob...
java
public static Short decodeShortObj(byte[] src, int srcOffset) throws CorruptEncodingException { try { int b = src[srcOffset]; if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) { return null; } return decodeShort(src, srcOffset + 1)...
[ "public", "static", "Short", "decodeShortObj", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "try", "{", "int", "b", "=", "src", "[", "srcOffset", "]", ";", "if", "(", "b", "==", "NULL_BYTE_HIGH", ...
Decodes a signed Short object from exactly 1 or 3 bytes. If null is returned, then 1 byte was read. @param src source of encoded bytes @param srcOffset offset into source array @return signed Short object or null
[ "Decodes", "a", "signed", "Short", "object", "from", "exactly", "1", "or", "3", "bytes", ".", "If", "null", "is", "returned", "then", "1", "byte", "was", "read", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/DataDecoder.java#L192-L204
oboehm/jfachwert
src/main/java/de/jfachwert/bank/Geldbetrag.java
Geldbetrag.validate
public static BigDecimal validate(BigDecimal zahl, CurrencyUnit currency) { """ Validiert die uebergebene Zahl. @param zahl als String @param currency die Waehrung @return die Zahl zur Weitervarabeitung """ if (zahl.scale() == 0) { return zahl.setScale(currency.getDefaultFractionDi...
java
public static BigDecimal validate(BigDecimal zahl, CurrencyUnit currency) { if (zahl.scale() == 0) { return zahl.setScale(currency.getDefaultFractionDigits(), RoundingMode.HALF_UP); } return zahl; }
[ "public", "static", "BigDecimal", "validate", "(", "BigDecimal", "zahl", ",", "CurrencyUnit", "currency", ")", "{", "if", "(", "zahl", ".", "scale", "(", ")", "==", "0", ")", "{", "return", "zahl", ".", "setScale", "(", "currency", ".", "getDefaultFraction...
Validiert die uebergebene Zahl. @param zahl als String @param currency die Waehrung @return die Zahl zur Weitervarabeitung
[ "Validiert", "die", "uebergebene", "Zahl", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/bank/Geldbetrag.java#L568-L573
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.generateEntityQualifiedName
public static String generateEntityQualifiedName(SQLiteDaoDefinition dao, SQLiteEntity entity) { """ Generate entity qualified name. @param dao the dao @param entity the entity @return the string """ String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDA...
java
public static String generateEntityQualifiedName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement()); entityName = m2mEntity.getQualifiedName(); } else { entityName = entity.getName().toString...
[ "public", "static", "String", "generateEntityQualifiedName", "(", "SQLiteDaoDefinition", "dao", ",", "SQLiteEntity", "entity", ")", "{", "String", "entityName", ";", "if", "(", "entity", "==", "null", ")", "{", "M2MEntity", "m2mEntity", "=", "M2MEntity", ".", "e...
Generate entity qualified name. @param dao the dao @param entity the entity @return the string
[ "Generate", "entity", "qualified", "name", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L1318-L1327
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/util/form/SimpleFormValidator.java
SimpleFormValidator.valueGreaterThan
public FormInputValidator valueGreaterThan (VisValidatableTextField field, String errorMsg, float value, boolean validIfEqualsValue) { """ Validates if entered text is greater than (or equal) entered number <p> Can be used in combination with {@link #integerNumber(VisValidatableTextField, String)} to only allows ...
java
public FormInputValidator valueGreaterThan (VisValidatableTextField field, String errorMsg, float value, boolean validIfEqualsValue) { ValidatorWrapper wrapper = new ValidatorWrapper(errorMsg, new GreaterThanValidator(value, validIfEqualsValue)); field.addValidator(wrapper); add(field); return wrapper; }
[ "public", "FormInputValidator", "valueGreaterThan", "(", "VisValidatableTextField", "field", ",", "String", "errorMsg", ",", "float", "value", ",", "boolean", "validIfEqualsValue", ")", "{", "ValidatorWrapper", "wrapper", "=", "new", "ValidatorWrapper", "(", "errorMsg",...
Validates if entered text is greater than (or equal) entered number <p> Can be used in combination with {@link #integerNumber(VisValidatableTextField, String)} to only allows integers.
[ "Validates", "if", "entered", "text", "is", "greater", "than", "(", "or", "equal", ")", "entered", "number", "<p", ">", "Can", "be", "used", "in", "combination", "with", "{" ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/form/SimpleFormValidator.java#L141-L146
OpenLiberty/open-liberty
dev/com.ibm.ws.jca/src/com/ibm/ws/jca/internal/BootstrapContextImpl.java
BootstrapContextImpl.stopTask
private void stopTask(ThreadContextDescriptor raThreadContextDescriptor, ArrayList<ThreadContext> threadContext) { """ Stop the resource adapter context descriptor task if one was started. @param raThreadContextDescriptor @param threadContext """ if (raThreadContextDescriptor != null) r...
java
private void stopTask(ThreadContextDescriptor raThreadContextDescriptor, ArrayList<ThreadContext> threadContext) { if (raThreadContextDescriptor != null) raThreadContextDescriptor.taskStopping(threadContext); }
[ "private", "void", "stopTask", "(", "ThreadContextDescriptor", "raThreadContextDescriptor", ",", "ArrayList", "<", "ThreadContext", ">", "threadContext", ")", "{", "if", "(", "raThreadContextDescriptor", "!=", "null", ")", "raThreadContextDescriptor", ".", "taskStopping",...
Stop the resource adapter context descriptor task if one was started. @param raThreadContextDescriptor @param threadContext
[ "Stop", "the", "resource", "adapter", "context", "descriptor", "task", "if", "one", "was", "started", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca/src/com/ibm/ws/jca/internal/BootstrapContextImpl.java#L1142-L1145
bremersee/pagebuilder
bremersee-pagebuilder/src/main/java/org/bremersee/pagebuilder/PageControlFactory.java
PageControlFactory.newPageControl
public <E, T> PageControlDto newPageControl(final Page<E> page, final PageEntryTransformer<T, E> transformer, final String pageUrl, final Locale locale) { """ Creates a new {@link PageControlDto} from the given page.<br> The page URL must be the plain URL (with no p...
java
public <E, T> PageControlDto newPageControl(final Page<E> page, final PageEntryTransformer<T, E> transformer, final String pageUrl, final Locale locale) { return newPageControl(PageBuilderUtils.createPageDto(page, transformer), pageUrl, locale); }
[ "public", "<", "E", ",", "T", ">", "PageControlDto", "newPageControl", "(", "final", "Page", "<", "E", ">", "page", ",", "final", "PageEntryTransformer", "<", "T", ",", "E", ">", "transformer", ",", "final", "String", "pageUrl", ",", "final", "Locale", "...
Creates a new {@link PageControlDto} from the given page.<br> The page URL must be the plain URL (with no page control query parameters), e. g.: http://example.org/myapp/mypage.html<br> If the locale is not present, the default locale will be used. @param page the page @param transformer the page entry transfor...
[ "Creates", "a", "new", "{", "@link", "PageControlDto", "}", "from", "the", "given", "page", ".", "<br", ">", "The", "page", "URL", "must", "be", "the", "plain", "URL", "(", "with", "no", "page", "control", "query", "parameters", ")", "e", ".", "g", "...
train
https://github.com/bremersee/pagebuilder/blob/498614b02f577b08d2d65131ba472a09f080a192/bremersee-pagebuilder/src/main/java/org/bremersee/pagebuilder/PageControlFactory.java#L390-L393
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.eachMatch
public static <T extends CharSequence> T eachMatch(T self, Pattern pattern, @ClosureParams(value=FromString.class, options= { """ Process each regex group matched substring of the given pattern. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as m...
java
public static <T extends CharSequence> T eachMatch(T self, Pattern pattern, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) { eachMatch(self.toString(), pattern, closure); return self; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "eachMatch", "(", "T", "self", ",", "Pattern", "pattern", ",", "@", "ClosureParams", "(", "value", "=", "FromString", ".", "class", ",", "options", "=", "{", "\"List<String>\"", ",", "\"Str...
Process each regex group matched substring of the given pattern. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as many arguments as there are match groups, then each parameter will be one match group. @param self the source CharSequence @param patt...
[ "Process", "each", "regex", "group", "matched", "substring", "of", "the", "given", "pattern", ".", "If", "the", "closure", "parameter", "takes", "one", "argument", "an", "array", "with", "all", "match", "groups", "is", "passed", "to", "it", ".", "If", "the...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L710-L713
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateScenes
private void generateScenes(final Metadata m, final Element e) { """ Generation of scenes tag. @param m source @param e element to attach new element to """ final Element scenesElement = new Element("scenes", NS); for (final Scene scene : m.getScenes()) { final Element sceneElem...
java
private void generateScenes(final Metadata m, final Element e) { final Element scenesElement = new Element("scenes", NS); for (final Scene scene : m.getScenes()) { final Element sceneElement = new Element("scene", NS); addNotNullElement(sceneElement, "sceneTitle", scene.getTitle(...
[ "private", "void", "generateScenes", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "Element", "scenesElement", "=", "new", "Element", "(", "\"scenes\"", ",", "NS", ")", ";", "for", "(", "final", "Scene", "scene", ":", "m...
Generation of scenes tag. @param m source @param e element to attach new element to
[ "Generation", "of", "scenes", "tag", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L369-L384
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/tagging/disambiguation/rules/DisambiguationPatternRuleReplacer.java
DisambiguationPatternRuleReplacer.skipMaxTokens
@Override protected int skipMaxTokens(AnalyzedTokenReadings[] tokens, PatternTokenMatcher matcher, int firstMatchToken, int prevSkipNext, PatternTokenMatcher prevElement, int m, int remainingElems) throws IOException { """ /* (non-Javadoc) @see org.languagetool.rules.patterns.AbstractPatternRulePerformer#skipMa...
java
@Override protected int skipMaxTokens(AnalyzedTokenReadings[] tokens, PatternTokenMatcher matcher, int firstMatchToken, int prevSkipNext, PatternTokenMatcher prevElement, int m, int remainingElems) throws IOException { int maxSkip = 0; int maxOccurrences = matcher.getPatternToken().getMaxOccurrence() == -1 ? ...
[ "@", "Override", "protected", "int", "skipMaxTokens", "(", "AnalyzedTokenReadings", "[", "]", "tokens", ",", "PatternTokenMatcher", "matcher", ",", "int", "firstMatchToken", ",", "int", "prevSkipNext", ",", "PatternTokenMatcher", "prevElement", ",", "int", "m", ",",...
/* (non-Javadoc) @see org.languagetool.rules.patterns.AbstractPatternRulePerformer#skipMaxTokens(org.languagetool.AnalyzedTokenReadings[], org.languagetool.rules.patterns.PatternTokenMatcher, int, int, org.languagetool.rules.patterns.PatternTokenMatcher, int, int)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/tagging/disambiguation/rules/DisambiguationPatternRuleReplacer.java#L198-L211
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/util/StringUtilities.java
StringUtilities.isValidEmailAddress
public static boolean isValidEmailAddress(String email, boolean strict) { """ Returns <CODE>true</CODE> if the given string is a valid email address. @param email The email address to be checked @param strict <CODE>true</CODE> if strict rules should be applied when checking the email address @return <CODE>true<...
java
public static boolean isValidEmailAddress(String email, boolean strict) { Pattern p = strict ? strictEmailPattern : laxEmailPattern; return p.matcher(email).matches(); }
[ "public", "static", "boolean", "isValidEmailAddress", "(", "String", "email", ",", "boolean", "strict", ")", "{", "Pattern", "p", "=", "strict", "?", "strictEmailPattern", ":", "laxEmailPattern", ";", "return", "p", ".", "matcher", "(", "email", ")", ".", "m...
Returns <CODE>true</CODE> if the given string is a valid email address. @param email The email address to be checked @param strict <CODE>true</CODE> if strict rules should be applied when checking the email address @return <CODE>true</CODE> if the given string is a valid email address
[ "Returns", "<CODE", ">", "true<", "/", "CODE", ">", "if", "the", "given", "string", "is", "a", "valid", "email", "address", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/StringUtilities.java#L612-L616
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpScsrlsqvqrHost
public static int cusolverSpScsrlsqvqrHost( cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, Pointer rankA, ...
java
public static int cusolverSpScsrlsqvqrHost( cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, Pointer rankA, ...
[ "public", "static", "int", "cusolverSpScsrlsqvqrHost", "(", "cusolverSpHandle", "handle", ",", "int", "m", ",", "int", "n", ",", "int", "nnz", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrValA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA...
<pre> ----------- CPU least square solver by QR factorization solve min|b - A*x| [lsq] stands for least square [v] stands for vector [qr] stands for QR factorization </pre>
[ "<pre", ">", "-----------", "CPU", "least", "square", "solver", "by", "QR", "factorization", "solve", "min|b", "-", "A", "*", "x|", "[", "lsq", "]", "stands", "for", "least", "square", "[", "v", "]", "stands", "for", "vector", "[", "qr", "]", "stands",...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L816-L833
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java
SelectMultiMenuRenderer.createSelectItem
protected SelectItem createSelectItem(FacesContext context, UISelectItems uiSelectItems, Object value, Object label) { """ Copied from the InputRenderer class of PrimeFaces 5.1. @param context @param uiSelectItems @param value @param label @return """ String var = (String) uiSelectItems.getAttribut...
java
protected SelectItem createSelectItem(FacesContext context, UISelectItems uiSelectItems, Object value, Object label) { String var = (String) uiSelectItems.getAttributes().get("var"); Map<String, Object> attrs = uiSelectItems.getAttributes(); Map<String, Object> requestMap = context.getExternalContext().getRequ...
[ "protected", "SelectItem", "createSelectItem", "(", "FacesContext", "context", ",", "UISelectItems", "uiSelectItems", ",", "Object", "value", ",", "Object", "label", ")", "{", "String", "var", "=", "(", "String", ")", "uiSelectItems", ".", "getAttributes", "(", ...
Copied from the InputRenderer class of PrimeFaces 5.1. @param context @param uiSelectItems @param value @param label @return
[ "Copied", "from", "the", "InputRenderer", "class", "of", "PrimeFaces", "5", ".", "1", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java#L515-L550
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionsInner.java
ConnectionsInner.get
public ConnectionInner get(String resourceGroupName, String automationAccountName, String connectionName) { """ Retrieve the connection identified by connection name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param connectionNam...
java
public ConnectionInner get(String resourceGroupName, String automationAccountName, String connectionName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, connectionName).toBlocking().single().body(); }
[ "public", "ConnectionInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "connectionName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "connectionName",...
Retrieve the connection identified by connection name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param connectionName The name of connection. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponse...
[ "Retrieve", "the", "connection", "identified", "by", "connection", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionsInner.java#L196-L198
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java
CallableProcedureStatement.registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException { """ <p>Registers the designated output parameter. This version of the method <code>registerOutParameter</code> should be used for a user-defined or <code>REF</code> output parameter. Examples of user-d...
java
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException { CallParameter callParameter = getParameter(parameterIndex); callParameter.setOutputSqlType(sqlType); callParameter.setTypeName(typeName); callParameter.setOutput(true); }
[ "public", "void", "registerOutParameter", "(", "int", "parameterIndex", ",", "int", "sqlType", ",", "String", "typeName", ")", "throws", "SQLException", "{", "CallParameter", "callParameter", "=", "getParameter", "(", "parameterIndex", ")", ";", "callParameter", "."...
<p>Registers the designated output parameter. This version of the method <code>registerOutParameter</code> should be used for a user-defined or <code>REF</code> output parameter. Examples of user-defined types include: <code>STRUCT</code>, <code>DISTINCT</code>, <code>JAVA_OBJECT</code>, and named array types.</p> <p>...
[ "<p", ">", "Registers", "the", "designated", "output", "parameter", ".", "This", "version", "of", "the", "method", "<code", ">", "registerOutParameter<", "/", "code", ">", "should", "be", "used", "for", "a", "user", "-", "defined", "or", "<code", ">", "REF...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java#L572-L578
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.setKeywordValue
public ULocale setKeywordValue(String keyword, String value) { """ <strong>[icu]</strong> Given a keyword and a value, return a new locale with an updated keyword and value. If the keyword is null, this removes all keywords from the locale id. Otherwise, if the value is null, this removes the value for this key...
java
public ULocale setKeywordValue(String keyword, String value) { return new ULocale(setKeywordValue(localeID, keyword, value), (Locale)null); }
[ "public", "ULocale", "setKeywordValue", "(", "String", "keyword", ",", "String", "value", ")", "{", "return", "new", "ULocale", "(", "setKeywordValue", "(", "localeID", ",", "keyword", ",", "value", ")", ",", "(", "Locale", ")", "null", ")", ";", "}" ]
<strong>[icu]</strong> Given a keyword and a value, return a new locale with an updated keyword and value. If the keyword is null, this removes all keywords from the locale id. Otherwise, if the value is null, this removes the value for this keyword from the locale id. Otherwise, this adds/replaces the value for this...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Given", "a", "keyword", "and", "a", "value", "return", "a", "new", "locale", "with", "an", "updated", "keyword", "and", "value", ".", "If", "the", "keyword", "is", "null", "this", "removes", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1231-L1233
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.vps_serviceName_ip_duration_GET
public OvhOrder vps_serviceName_ip_duration_GET(String serviceName, String duration, OvhGeolocationEnum country, Long number) throws IOException { """ Get prices and contracts information REST: GET /order/vps/{serviceName}/ip/{duration} @param number [required] Number of IPs to order @param country [required]...
java
public OvhOrder vps_serviceName_ip_duration_GET(String serviceName, String duration, OvhGeolocationEnum country, Long number) throws IOException { String qPath = "/order/vps/{serviceName}/ip/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "country", country); query(sb, "number", nu...
[ "public", "OvhOrder", "vps_serviceName_ip_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhGeolocationEnum", "country", ",", "Long", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/vps/{serviceName}/ip/{durati...
Get prices and contracts information REST: GET /order/vps/{serviceName}/ip/{duration} @param number [required] Number of IPs to order @param country [required] Choose a geolocation for your IP Address @param serviceName [required] The internal name of your VPS offer @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3418-L3425
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java
ChemModelManipulator.getRelevantReaction
public static IReaction getRelevantReaction(IChemModel chemModel, IAtom atom) { """ Retrieves the first IReaction containing a given IAtom from an IChemModel. @param chemModel The IChemModel object. @param atom The IAtom object to search. @return The IAtomContainer object found, null if none...
java
public static IReaction getRelevantReaction(IChemModel chemModel, IAtom atom) { IReaction reaction = null; if (chemModel.getReactionSet() != null) { IReactionSet reactionSet = chemModel.getReactionSet(); reaction = ReactionSetManipulator.getRelevantReaction(reactionSet, atom); ...
[ "public", "static", "IReaction", "getRelevantReaction", "(", "IChemModel", "chemModel", ",", "IAtom", "atom", ")", "{", "IReaction", "reaction", "=", "null", ";", "if", "(", "chemModel", ".", "getReactionSet", "(", ")", "!=", "null", ")", "{", "IReactionSet", ...
Retrieves the first IReaction containing a given IAtom from an IChemModel. @param chemModel The IChemModel object. @param atom The IAtom object to search. @return The IAtomContainer object found, null if none is found.
[ "Retrieves", "the", "first", "IReaction", "containing", "a", "given", "IAtom", "from", "an", "IChemModel", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java#L255-L262
aalmiray/Json-lib
src/main/java/net/sf/json/xml/XMLSerializer.java
XMLSerializer.removeNamespace
public void removeNamespace( String prefix, String elementName ) { """ Removes a namespace from the root element.<br> If the elementName is null or blank, the namespace will be removed from the root element. @param prefix namespace prefix @param elementName name of target element """ if( prefix == ...
java
public void removeNamespace( String prefix, String elementName ) { if( prefix == null ){ prefix = ""; } if( StringUtils.isBlank( elementName ) ){ rootNamespace.remove( prefix.trim() ); }else{ Map nameSpaces = (Map) namespacesPerElement.get( elementName ); name...
[ "public", "void", "removeNamespace", "(", "String", "prefix", ",", "String", "elementName", ")", "{", "if", "(", "prefix", "==", "null", ")", "{", "prefix", "=", "\"\"", ";", "}", "if", "(", "StringUtils", ".", "isBlank", "(", "elementName", ")", ")", ...
Removes a namespace from the root element.<br> If the elementName is null or blank, the namespace will be removed from the root element. @param prefix namespace prefix @param elementName name of target element
[ "Removes", "a", "namespace", "from", "the", "root", "element", ".", "<br", ">", "If", "the", "elementName", "is", "null", "or", "blank", "the", "namespace", "will", "be", "removed", "from", "the", "root", "element", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/xml/XMLSerializer.java#L464-L474
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java
IntegrationAccountsInner.listKeyVaultKeys
public List<KeyVaultKeyInner> listKeyVaultKeys(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys) { """ Gets the integration account's Key Vault keys. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name....
java
public List<KeyVaultKeyInner> listKeyVaultKeys(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys) { return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).toBlocking().single().body(); }
[ "public", "List", "<", "KeyVaultKeyInner", ">", "listKeyVaultKeys", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "ListKeyVaultKeysDefinition", "listKeyVaultKeys", ")", "{", "return", "listKeyVaultKeysWithServiceResponseAsync", "(", "resour...
Gets the integration account's Key Vault keys. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param listKeyVaultKeys The key vault parameters. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the r...
[ "Gets", "the", "integration", "account", "s", "Key", "Vault", "keys", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L1032-L1034
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.roundRectangle
public void roundRectangle(float x, float y, float w, float h, float r) { """ Adds a round rectangle to the current path. @param x x-coordinate of the starting point @param y y-coordinate of the starting point @param w width @param h height @param r radius of the arc corner """ if (w < 0) { ...
java
public void roundRectangle(float x, float y, float w, float h, float r) { if (w < 0) { x += w; w = -w; } if (h < 0) { y += h; h = -h; } if (r < 0) r = -r; float b = 0.4477f; moveTo(x + r, y); line...
[ "public", "void", "roundRectangle", "(", "float", "x", ",", "float", "y", ",", "float", "w", ",", "float", "h", ",", "float", "r", ")", "{", "if", "(", "w", "<", "0", ")", "{", "x", "+=", "w", ";", "w", "=", "-", "w", ";", "}", "if", "(", ...
Adds a round rectangle to the current path. @param x x-coordinate of the starting point @param y y-coordinate of the starting point @param w width @param h height @param r radius of the arc corner
[ "Adds", "a", "round", "rectangle", "to", "the", "current", "path", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2586-L2607
code4everything/util
src/main/java/com/zhazhapan/util/NetUtils.java
NetUtils.addCookie
public static boolean addCookie(HttpServletResponse response, String name, String value) { """ 添加Cookie @param response {@link HttpServletResponse} @param name Cookie名 @param value Cookie值 @return {@link Boolean} @since 1.0.8 """ return addCookie(new Cookie(name, value), response); }
java
public static boolean addCookie(HttpServletResponse response, String name, String value) { return addCookie(new Cookie(name, value), response); }
[ "public", "static", "boolean", "addCookie", "(", "HttpServletResponse", "response", ",", "String", "name", ",", "String", "value", ")", "{", "return", "addCookie", "(", "new", "Cookie", "(", "name", ",", "value", ")", ",", "response", ")", ";", "}" ]
添加Cookie @param response {@link HttpServletResponse} @param name Cookie名 @param value Cookie值 @return {@link Boolean} @since 1.0.8
[ "添加Cookie" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/NetUtils.java#L591-L593
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/AbstractLongList.java
AbstractLongList.binarySearchFromTo
public int binarySearchFromTo(long key, int from, int to) { """ Searches the receiver for the specified value using the binary search algorithm. The receiver must <strong>must</strong> be sorted (as by the sort method) prior to making this call. If it is not sorted, the results are undefined: in particular, t...
java
public int binarySearchFromTo(long key, int from, int to) { int low=from; int high=to; while (low <= high) { int mid =(low + high)/2; long midVal = get(mid); if (midVal < key) low = mid + 1; else if (midVal > key) high = mid - 1; else return mid; // key found } return -(low + 1); // key not ...
[ "public", "int", "binarySearchFromTo", "(", "long", "key", ",", "int", "from", ",", "int", "to", ")", "{", "int", "low", "=", "from", ";", "int", "high", "=", "to", ";", "while", "(", "low", "<=", "high", ")", "{", "int", "mid", "=", "(", "low", ...
Searches the receiver for the specified value using the binary search algorithm. The receiver must <strong>must</strong> be sorted (as by the sort method) prior to making this call. If it is not sorted, the results are undefined: in particular, the call may enter an infinite loop. If the receiver contains multiple e...
[ "Searches", "the", "receiver", "for", "the", "specified", "value", "using", "the", "binary", "search", "algorithm", ".", "The", "receiver", "must", "<strong", ">", "must<", "/", "strong", ">", "be", "sorted", "(", "as", "by", "the", "sort", "method", ")", ...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/AbstractLongList.java#L142-L154
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalInfo.java
DateIntervalInfo.cloneUnfrozenDII
private Object cloneUnfrozenDII() //throws IllegalStateException { """ /* Clone an unfrozen DateIntervalInfo object. @return a copy of the object """ try { DateIntervalInfo other = (DateIntervalInfo) super.clone(); other.fFallbackIntervalPattern=fFallbackIntervalPattern; ...
java
private Object cloneUnfrozenDII() //throws IllegalStateException { try { DateIntervalInfo other = (DateIntervalInfo) super.clone(); other.fFallbackIntervalPattern=fFallbackIntervalPattern; other.fFirstDateInPtnIsLaterDate = fFirstDateInPtnIsLaterDate; if (fInt...
[ "private", "Object", "cloneUnfrozenDII", "(", ")", "//throws IllegalStateException", "{", "try", "{", "DateIntervalInfo", "other", "=", "(", "DateIntervalInfo", ")", "super", ".", "clone", "(", ")", ";", "other", ".", "fFallbackIntervalPattern", "=", "fFallbackInter...
/* Clone an unfrozen DateIntervalInfo object. @return a copy of the object
[ "/", "*", "Clone", "an", "unfrozen", "DateIntervalInfo", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalInfo.java#L932-L952
ThreeTen/threetenbp
src/main/java/org/threeten/bp/ZonedDateTime.java
ZonedDateTime.ofStrict
public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) { """ Obtains an instance of {@code ZonedDateTime} strictly validating the combination of local date-time, offset and zone ID. <p> This creates a zoned date-time ensuring that the offset is valid for the local dat...
java
public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) { Jdk8Methods.requireNonNull(localDateTime, "localDateTime"); Jdk8Methods.requireNonNull(offset, "offset"); Jdk8Methods.requireNonNull(zone, "zone"); ZoneRules rules = zone.getRules(); ...
[ "public", "static", "ZonedDateTime", "ofStrict", "(", "LocalDateTime", "localDateTime", ",", "ZoneOffset", "offset", ",", "ZoneId", "zone", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "localDateTime", ",", "\"localDateTime\"", ")", ";", "Jdk8Methods", ".", ...
Obtains an instance of {@code ZonedDateTime} strictly validating the combination of local date-time, offset and zone ID. <p> This creates a zoned date-time ensuring that the offset is valid for the local date-time according to the rules of the specified zone. If the offset is invalid, an exception is thrown. @param lo...
[ "Obtains", "an", "instance", "of", "{", "@code", "ZonedDateTime", "}", "strictly", "validating", "the", "combination", "of", "local", "date", "-", "time", "offset", "and", "zone", "ID", ".", "<p", ">", "This", "creates", "a", "zoned", "date", "-", "time", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/ZonedDateTime.java#L440-L458
js-lib-com/commons
src/main/java/js/lang/Config.java
Config.setAttribute
public void setAttribute(String name, String value) { """ Set configuration object attribute. If attribute already exists overwrite old value. Empty value is not accepted but null is considered indication to remove attribute. So that, an existing attribute cannot be either null or empty. @param name attribute...
java
public void setAttribute(String name, String value) { Params.notNullOrEmpty(name, "Attribute name"); Params.notEmpty(value, "Attribute value"); if(value != null) { attributes.put(name, value); } else { attributes.remove(name); } }
[ "public", "void", "setAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "Params", ".", "notNullOrEmpty", "(", "name", ",", "\"Attribute name\"", ")", ";", "Params", ".", "notEmpty", "(", "value", ",", "\"Attribute value\"", ")", ";", "if",...
Set configuration object attribute. If attribute already exists overwrite old value. Empty value is not accepted but null is considered indication to remove attribute. So that, an existing attribute cannot be either null or empty. @param name attribute name, @param value attribute value, null ignored. @throws IllegalA...
[ "Set", "configuration", "object", "attribute", ".", "If", "attribute", "already", "exists", "overwrite", "old", "value", ".", "Empty", "value", "is", "not", "accepted", "but", "null", "is", "considered", "indication", "to", "remove", "attribute", ".", "So", "t...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L116-L126
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/JobLauncherUtils.java
JobLauncherUtils.cleanJobStagingData
public static void cleanJobStagingData(State state, Logger logger) throws IOException { """ Cleanup staging data of all tasks of a job. @param state a {@link State} instance storing job configuration properties @param logger a {@link Logger} used for logging """ Preconditions.checkArgument(state.contai...
java
public static void cleanJobStagingData(State state, Logger logger) throws IOException { Preconditions.checkArgument(state.contains(ConfigurationKeys.WRITER_STAGING_DIR), "Missing required property " + ConfigurationKeys.WRITER_STAGING_DIR); Preconditions.checkArgument(state.contains(ConfigurationKeys.WRI...
[ "public", "static", "void", "cleanJobStagingData", "(", "State", "state", ",", "Logger", "logger", ")", "throws", "IOException", "{", "Preconditions", ".", "checkArgument", "(", "state", ".", "contains", "(", "ConfigurationKeys", ".", "WRITER_STAGING_DIR", ")", ",...
Cleanup staging data of all tasks of a job. @param state a {@link State} instance storing job configuration properties @param logger a {@link Logger} used for logging
[ "Cleanup", "staging", "data", "of", "all", "tasks", "of", "a", "job", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/JobLauncherUtils.java#L134-L168
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/addon/AddOn.java
AddOn.setAddOnLoaded
protected void setAddOnLoaded(boolean isLoaded) { """ Changes the add-on loading state. Fires a property change event ({@link #PROPERTY_LOAD_STATE}). @param isLoaded The new add-on loading state. """ String oldState = mMetaData.getStatus(); mMetaData.setStatus(AddOnMetadata.LOAD); fi...
java
protected void setAddOnLoaded(boolean isLoaded) { String oldState = mMetaData.getStatus(); mMetaData.setStatus(AddOnMetadata.LOAD); firePropertyChangedEvent(new PropertyChangeEvent(this, PROPERTY_LOAD_STATE, oldState, mMetaData.getStatus())); }
[ "protected", "void", "setAddOnLoaded", "(", "boolean", "isLoaded", ")", "{", "String", "oldState", "=", "mMetaData", ".", "getStatus", "(", ")", ";", "mMetaData", ".", "setStatus", "(", "AddOnMetadata", ".", "LOAD", ")", ";", "firePropertyChangedEvent", "(", "...
Changes the add-on loading state. Fires a property change event ({@link #PROPERTY_LOAD_STATE}). @param isLoaded The new add-on loading state.
[ "Changes", "the", "add", "-", "on", "loading", "state", ".", "Fires", "a", "property", "change", "event", "(", "{", "@link", "#PROPERTY_LOAD_STATE", "}", ")", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/addon/AddOn.java#L96-L100
alkacon/opencms-core
src/org/opencms/ui/apps/modules/CmsModuleInfoDialog.java
CmsModuleInfoDialog.formatExplorerType
CmsResourceInfo formatExplorerType(CmsExplorerTypeSettings explorerType) { """ Creates the resource info box for an explorer type.<p> @param explorerType the explorer type @return the resource info box """ Resource icon = CmsResourceUtil.getBigIconResource(explorerType, null); String title...
java
CmsResourceInfo formatExplorerType(CmsExplorerTypeSettings explorerType) { Resource icon = CmsResourceUtil.getBigIconResource(explorerType, null); String title = CmsVaadinUtils.getMessageText(explorerType.getKey()); if (title.startsWith("???")) { title = explorerType.getName(); ...
[ "CmsResourceInfo", "formatExplorerType", "(", "CmsExplorerTypeSettings", "explorerType", ")", "{", "Resource", "icon", "=", "CmsResourceUtil", ".", "getBigIconResource", "(", "explorerType", ",", "null", ")", ";", "String", "title", "=", "CmsVaadinUtils", ".", "getMes...
Creates the resource info box for an explorer type.<p> @param explorerType the explorer type @return the resource info box
[ "Creates", "the", "resource", "info", "box", "for", "an", "explorer", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/modules/CmsModuleInfoDialog.java#L151-L164
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.hasBeenEnhancedForFeature
public static Boolean hasBeenEnhancedForFeature(final Class<?> controllerClass, final String featureName) { """ Checks to see if a class is marked with @grails.artefact.Enhanced and if the enhancedFor attribute of the annotation contains a specific feature name @param controllerClass The class to inspect @par...
java
public static Boolean hasBeenEnhancedForFeature(final Class<?> controllerClass, final String featureName) { boolean hasBeenEnhanced = false; final Enhanced enhancedAnnotation = controllerClass.getAnnotation(Enhanced.class); if(enhancedAnnotation != null) { final String[] enhancedFor ...
[ "public", "static", "Boolean", "hasBeenEnhancedForFeature", "(", "final", "Class", "<", "?", ">", "controllerClass", ",", "final", "String", "featureName", ")", "{", "boolean", "hasBeenEnhanced", "=", "false", ";", "final", "Enhanced", "enhancedAnnotation", "=", "...
Checks to see if a class is marked with @grails.artefact.Enhanced and if the enhancedFor attribute of the annotation contains a specific feature name @param controllerClass The class to inspect @param featureName The name of a feature to check for @return true if controllerClass is marked with Enhanced and the enhance...
[ "Checks", "to", "see", "if", "a", "class", "is", "marked", "with", "@grails", ".", "artefact", ".", "Enhanced", "and", "if", "the", "enhancedFor", "attribute", "of", "the", "annotation", "contains", "a", "specific", "feature", "name" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L990-L1000
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.analyzeImage
public ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter) { """ This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is...
java
public ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter) { return analyzeImageWithServiceResponseAsync(url, analyzeImageOptionalParameter).toBlocking().single().body(); }
[ "public", "ImageAnalysis", "analyzeImage", "(", "String", "url", ",", "AnalyzeImageOptionalParameter", "analyzeImageOptionalParameter", ")", "{", "return", "analyzeImageWithServiceResponseAsync", "(", "url", ",", "analyzeImageOptionalParameter", ")", ".", "toBlocking", "(", ...
This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in ...
[ "This", "operation", "extracts", "a", "rich", "set", "of", "visual", "features", "based", "on", "the", "image", "content", ".", "Two", "input", "methods", "are", "supported", "--", "(", "1", ")", "Uploading", "an", "image", "or", "(", "2", ")", "specifyi...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L2241-L2243
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfDocument.java
PdfDocument.setAction
void setAction(PdfAction action, float llx, float lly, float urx, float ury) { """ Implements an action in an area. @param action the <CODE>PdfAction</CODE> @param llx the lower left x corner of the activation area @param lly the lower left y corner of the activation area @param urx the upper right x corner of...
java
void setAction(PdfAction action, float llx, float lly, float urx, float ury) { addAnnotation(new PdfAnnotation(writer, llx, lly, urx, ury, action)); }
[ "void", "setAction", "(", "PdfAction", "action", ",", "float", "llx", ",", "float", "lly", ",", "float", "urx", ",", "float", "ury", ")", "{", "addAnnotation", "(", "new", "PdfAnnotation", "(", "writer", ",", "llx", ",", "lly", ",", "urx", ",", "ury", ...
Implements an action in an area. @param action the <CODE>PdfAction</CODE> @param llx the lower left x corner of the activation area @param lly the lower left y corner of the activation area @param urx the upper right x corner of the activation area @param ury the upper right y corner of the activation area
[ "Implements", "an", "action", "in", "an", "area", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfDocument.java#L2051-L2053
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/base/Json.java
Json.resource_to_string
public String resource_to_string(base_resource resrc, options option, String onerror) { """ Converts MPS resource to Json string. @param resrc nitro resource. @param option options class object. @return returns a String """ String result = "{ "; if (option != null || (!onerror.equals(""))) { ...
java
public String resource_to_string(base_resource resrc, options option, String onerror) { String result = "{ "; if (option != null || (!onerror.equals(""))) { result = result + "\"params\":{"; if(option != null) { if (option.get_action() != null) { result = result + "\"action\":\"...
[ "public", "String", "resource_to_string", "(", "base_resource", "resrc", ",", "options", "option", ",", "String", "onerror", ")", "{", "String", "result", "=", "\"{ \"", ";", "if", "(", "option", "!=", "null", "||", "(", "!", "onerror", ".", "equals", "(",...
Converts MPS resource to Json string. @param resrc nitro resource. @param option options class object. @return returns a String
[ "Converts", "MPS", "resource", "to", "Json", "string", "." ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/base/Json.java#L104-L127
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.indexOf
public int indexOf(E e, int index) { """ Returns the index of the first occurrence of the specified element in this list, searching forwards from <tt>index</tt>, or returns -1 if the element is not found. More formally, returns the lowest index <tt>i</tt> such that <tt>(i&nbsp;&gt;=&nbsp;index&nbsp;&amp;&amp;&...
java
public int indexOf(E e, int index) { Object[] elements = getArray(); return indexOf(e, elements, index, elements.length); }
[ "public", "int", "indexOf", "(", "E", "e", ",", "int", "index", ")", "{", "Object", "[", "]", "elements", "=", "getArray", "(", ")", ";", "return", "indexOf", "(", "e", ",", "elements", ",", "index", ",", "elements", ".", "length", ")", ";", "}" ]
Returns the index of the first occurrence of the specified element in this list, searching forwards from <tt>index</tt>, or returns -1 if the element is not found. More formally, returns the lowest index <tt>i</tt> such that <tt>(i&nbsp;&gt;=&nbsp;index&nbsp;&amp;&amp;&nbsp;(e==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp...
[ "Returns", "the", "index", "of", "the", "first", "occurrence", "of", "the", "specified", "element", "in", "this", "list", "searching", "forwards", "from", "<tt", ">", "index<", "/", "tt", ">", "or", "returns", "-", "1", "if", "the", "element", "is", "not...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L194-L197
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/js/JavascriptEngine.java
JavascriptEngine.execEval
public Object execEval(String arg) { """ Launch eval function on the argument given in parameter @param arg the argument @return the evaluated object """ try { return scriptEngine.eval("eval(" + arg + ")"); } catch (ScriptException e) { throw new BundlingProcessException("Error while evaluating ...
java
public Object execEval(String arg) { try { return scriptEngine.eval("eval(" + arg + ")"); } catch (ScriptException e) { throw new BundlingProcessException("Error while evaluating a script", e); } }
[ "public", "Object", "execEval", "(", "String", "arg", ")", "{", "try", "{", "return", "scriptEngine", ".", "eval", "(", "\"eval(\"", "+", "arg", "+", "\")\"", ")", ";", "}", "catch", "(", "ScriptException", "e", ")", "{", "throw", "new", "BundlingProcess...
Launch eval function on the argument given in parameter @param arg the argument @return the evaluated object
[ "Launch", "eval", "function", "on", "the", "argument", "given", "in", "parameter" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/js/JavascriptEngine.java#L315-L321
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_account_POST
public OvhTaskPop domain_account_POST(String domain, String accountName, String description, String password, Long size) throws IOException { """ Create new mailbox in server REST: POST /email/domain/{domain}/account @param accountName [required] Account name @param password [required] Account password @para...
java
public OvhTaskPop domain_account_POST(String domain, String accountName, String description, String password, Long size) throws IOException { String qPath = "/email/domain/{domain}/account"; StringBuilder sb = path(qPath, domain); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "accountName...
[ "public", "OvhTaskPop", "domain_account_POST", "(", "String", "domain", ",", "String", "accountName", ",", "String", "description", ",", "String", "password", ",", "Long", "size", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/a...
Create new mailbox in server REST: POST /email/domain/{domain}/account @param accountName [required] Account name @param password [required] Account password @param description [required] Description Account @param size [required] Account size in bytes (default : 5000000000) (possible values : /email/domain/{domain}/a...
[ "Create", "new", "mailbox", "in", "server" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L890-L900
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsFailedToStopJob
public FessMessages addErrorsFailedToStopJob(String property, String arg0) { """ Add the created action message for the key 'errors.failed_to_stop_job' with parameters. <pre> message: Failed to stop job {0}. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for...
java
public FessMessages addErrorsFailedToStopJob(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_failed_to_stop_job, arg0)); return this; }
[ "public", "FessMessages", "addErrorsFailedToStopJob", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_failed_to_stop_job", ",", "arg0", ...
Add the created action message for the key 'errors.failed_to_stop_job' with parameters. <pre> message: Failed to stop job {0}. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "failed_to_stop_job", "with", "parameters", ".", "<pre", ">", "message", ":", "Failed", "to", "stop", "job", "{", "0", "}", ".", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1537-L1541
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/system.java
system.navigateToActivity
public static void navigateToActivity(Context A, Class<?> B) { """ Navigate to an activity.<br> e.g. navigateToActivity(context, SecondActivity.class) @param A From Activity @param B Destination Activity """ Intent myIntent = new Intent(A, B); A.startActivity(myIntent); }
java
public static void navigateToActivity(Context A, Class<?> B) { Intent myIntent = new Intent(A, B); A.startActivity(myIntent); }
[ "public", "static", "void", "navigateToActivity", "(", "Context", "A", ",", "Class", "<", "?", ">", "B", ")", "{", "Intent", "myIntent", "=", "new", "Intent", "(", "A", ",", "B", ")", ";", "A", ".", "startActivity", "(", "myIntent", ")", ";", "}" ]
Navigate to an activity.<br> e.g. navigateToActivity(context, SecondActivity.class) @param A From Activity @param B Destination Activity
[ "Navigate", "to", "an", "activity", ".", "<br", ">", "e", ".", "g", ".", "navigateToActivity", "(", "context", "SecondActivity", ".", "class", ")" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/system.java#L122-L125
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.doOnLifecycle
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> doOnLifecycle(final Consumer<? super Subscription> onSubscribe, final LongConsumer onRequest, final Action onCancel) { """ Calls the appropriate onXXX meth...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> doOnLifecycle(final Consumer<? super Subscription> onSubscribe, final LongConsumer onRequest, final Action onCancel) { ObjectHelper.requireNonNull(onSub...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "PASS_THROUGH", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", "doOnLifecycle", "(", "final", "Consumer", "<"...
Calls the appropriate onXXX method (shared between all Subscribers) for the lifecycle events of the sequence (subscription, cancellation, requesting). <p> <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnNext.png" alt=""> <dl> <dt><b>Backpressure:</b></dt> <dd>The ...
[ "Calls", "the", "appropriate", "onXXX", "method", "(", "shared", "between", "all", "Subscribers", ")", "for", "the", "lifecycle", "events", "of", "the", "sequence", "(", "subscription", "cancellation", "requesting", ")", ".", "<p", ">", "<img", "width", "=", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L9032-L9041
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Strings.java
Strings.arrayToDelimitedString
public static String arrayToDelimitedString(Object[] arr, String delim) { """ Convenience method to return a String array as a delimited (e.g. CSV) String. E.g. useful for <code>toString()</code> implementations. @param arr the array to display @param delim the delimiter to use (probably a ",") @return the del...
java
public static String arrayToDelimitedString(Object[] arr, String delim) { if (Objects.isEmpty(arr)) { return ""; } if (arr.length == 1) { return Objects.nullSafeToString(arr[0]); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < arr.len...
[ "public", "static", "String", "arrayToDelimitedString", "(", "Object", "[", "]", "arr", ",", "String", "delim", ")", "{", "if", "(", "Objects", ".", "isEmpty", "(", "arr", ")", ")", "{", "return", "\"\"", ";", "}", "if", "(", "arr", ".", "length", "=...
Convenience method to return a String array as a delimited (e.g. CSV) String. E.g. useful for <code>toString()</code> implementations. @param arr the array to display @param delim the delimiter to use (probably a ",") @return the delimited String
[ "Convenience", "method", "to", "return", "a", "String", "array", "as", "a", "delimited", "(", "e", ".", "g", ".", "CSV", ")", "String", ".", "E", ".", "g", ".", "useful", "for", "<code", ">", "toString", "()", "<", "/", "code", ">", "implementations"...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Strings.java#L1119-L1134
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/tai/TAIRequestHelper.java
TAIRequestHelper.requestShouldBeHandledByTAI
public boolean requestShouldBeHandledByTAI(HttpServletRequest request, SocialTaiRequest socialTaiRequest) { """ Returns whether the provided request should be handled by the social login TAI, based on the request path and information in the {@link SocialTaiRequest} object provided. @param request @param socia...
java
public boolean requestShouldBeHandledByTAI(HttpServletRequest request, SocialTaiRequest socialTaiRequest) { // 241526 don't process jmx requests with this interceptor if (isJmxConnectorRequest(request)) { return false; } String loginHint = webUtils.getLoginHint(request); ...
[ "public", "boolean", "requestShouldBeHandledByTAI", "(", "HttpServletRequest", "request", ",", "SocialTaiRequest", "socialTaiRequest", ")", "{", "// 241526 don't process jmx requests with this interceptor", "if", "(", "isJmxConnectorRequest", "(", "request", ")", ")", "{", "r...
Returns whether the provided request should be handled by the social login TAI, based on the request path and information in the {@link SocialTaiRequest} object provided. @param request @param socialTaiRequest @return
[ "Returns", "whether", "the", "provided", "request", "should", "be", "handled", "by", "the", "social", "login", "TAI", "based", "on", "the", "request", "path", "and", "information", "in", "the", "{", "@link", "SocialTaiRequest", "}", "object", "provided", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/tai/TAIRequestHelper.java#L53-L61
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.initialiseSessionController
public SessionController initialiseSessionController(@NonNull SessionCreateManager sessionCreateManager, @NonNull PushManager pushMgr, @NonNull AtomicInteger state, ...
java
public SessionController initialiseSessionController(@NonNull SessionCreateManager sessionCreateManager, @NonNull PushManager pushMgr, @NonNull AtomicInteger state, ...
[ "public", "SessionController", "initialiseSessionController", "(", "@", "NonNull", "SessionCreateManager", "sessionCreateManager", ",", "@", "NonNull", "PushManager", "pushMgr", ",", "@", "NonNull", "AtomicInteger", "state", ",", "@", "NonNull", "ComapiAuthenticator", "au...
Initialise controller for creating and managing session. @param sessionCreateManager Manager for the process of creation of a new session @param pushMgr Push messaging manager. @param state SDK global state. @param auth ComapiImplementation calls authentication request callb...
[ "Initialise", "controller", "for", "creating", "and", "managing", "session", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L149-L159
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.invokeConstructorQuiet
public MethodHandle invokeConstructorQuiet(MethodHandles.Lookup lookup, Class<?> target) { """ Apply the chain of transforms and bind them to a constructor specified using the end signature plus the given class. The constructor will be retrieved using the given Lookup and must match the end signature's argument...
java
public MethodHandle invokeConstructorQuiet(MethodHandles.Lookup lookup, Class<?> target) { try { return invokeConstructor(lookup, target); } catch (IllegalAccessException | NoSuchMethodException e) { throw new InvalidTransformException(e); } }
[ "public", "MethodHandle", "invokeConstructorQuiet", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "Class", "<", "?", ">", "target", ")", "{", "try", "{", "return", "invokeConstructor", "(", "lookup", ",", "target", ")", ";", "}", "catch", "(", "Illegal...
Apply the chain of transforms and bind them to a constructor specified using the end signature plus the given class. The constructor will be retrieved using the given Lookup and must match the end signature's arguments exactly. If the final handle's type does not exactly match the initial type for this Binder, an addi...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "a", "constructor", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", ".", "The", "constructor", "will", "be", "retrieved", "using", "the", "given", "Lo...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1362-L1368
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java
CachedXPathAPI.selectNodeIterator
public NodeIterator selectNodeIterator(Node contextNode, String str) throws TransformerException { """ Use an XPath string to select a nodelist. XPath namespace prefixes are resolved from the contextNode. @param contextNode The node to start searching from. @param str A valid XPath string. @return...
java
public NodeIterator selectNodeIterator(Node contextNode, String str) throws TransformerException { return selectNodeIterator(contextNode, str, contextNode); }
[ "public", "NodeIterator", "selectNodeIterator", "(", "Node", "contextNode", ",", "String", "str", ")", "throws", "TransformerException", "{", "return", "selectNodeIterator", "(", "contextNode", ",", "str", ",", "contextNode", ")", ";", "}" ]
Use an XPath string to select a nodelist. XPath namespace prefixes are resolved from the contextNode. @param contextNode The node to start searching from. @param str A valid XPath string. @return A NodeIterator, should never be null. @throws TransformerException
[ "Use", "an", "XPath", "string", "to", "select", "a", "nodelist", ".", "XPath", "namespace", "prefixes", "are", "resolved", "from", "the", "contextNode", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java#L160-L164
spotify/helios
helios-tools/src/main/java/com/spotify/helios/cli/Target.java
Target.from
public static List<Target> from(final String srvName, final Iterable<String> domains) { """ Create targets for a list of domains. @param srvName The SRV name. @param domains A list of domains. @return A list of targets. """ final ImmutableList.Builder<Target> builder = ImmutableList.builder(); f...
java
public static List<Target> from(final String srvName, final Iterable<String> domains) { final ImmutableList.Builder<Target> builder = ImmutableList.builder(); for (final String domain : domains) { builder.add(new SrvTarget(srvName, domain)); } return builder.build(); }
[ "public", "static", "List", "<", "Target", ">", "from", "(", "final", "String", "srvName", ",", "final", "Iterable", "<", "String", ">", "domains", ")", "{", "final", "ImmutableList", ".", "Builder", "<", "Target", ">", "builder", "=", "ImmutableList", "."...
Create targets for a list of domains. @param srvName The SRV name. @param domains A list of domains. @return A list of targets.
[ "Create", "targets", "for", "a", "list", "of", "domains", "." ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-tools/src/main/java/com/spotify/helios/cli/Target.java#L167-L173