repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java
InsertAllRequest.of
public static InsertAllRequest of(TableId tableId, Iterable<RowToInsert> rows) { return newBuilder(tableId, rows).build(); }
java
public static InsertAllRequest of(TableId tableId, Iterable<RowToInsert> rows) { return newBuilder(tableId, rows).build(); }
[ "public", "static", "InsertAllRequest", "of", "(", "TableId", "tableId", ",", "Iterable", "<", "RowToInsert", ">", "rows", ")", "{", "return", "newBuilder", "(", "tableId", ",", "rows", ")", ".", "build", "(", ")", ";", "}" ]
Returns a {@code InsertAllRequest} object given the destination table and the rows to insert.
[ "Returns", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java#L395-L397
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.multTransAB
public static void multTransAB(DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { if( b.numRows == 1) { // there are significantly faster algorithms when dealing with vectors if( a.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixVectorMult_DDRM.multTransA_reorde...
java
public static void multTransAB(DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { if( b.numRows == 1) { // there are significantly faster algorithms when dealing with vectors if( a.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixVectorMult_DDRM.multTransA_reorde...
[ "public", "static", "void", "multTransAB", "(", "DMatrix1Row", "a", ",", "DMatrix1Row", "b", ",", "DMatrix1Row", "c", ")", "{", "if", "(", "b", ".", "numRows", "==", "1", ")", "{", "// there are significantly faster algorithms when dealing with vectors", "if", "("...
<p> Performs the following operation:<br> <br> c = a<sup>T</sup> * b<sup>T</sup><br> c<sub>ij</sub> = &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>jk</sub>} </p> @param a The left matrix in the multiplication operation. Not modified. @param b The right matrix in the multiplication operation. Not modified. @param c W...
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "a<sup", ">", "T<", "/", "sup", ">", "*", "b<sup", ">", "T<", "/", "sup", ">", "<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "&sum", ";", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L215-L229
bingoohuang/excel2javabeans
src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java
BeansToExcelOnTemplate.mergeCols
private void mergeCols(ExcelRows excelRowsAnn, Cell templateCell, int itemSize) { val tmplRowIndexRef = templateCell.getRowIndex() + 1; for (val mergeColAnn : excelRowsAnn.mergeCols()) { val from = PoiUtil.findCell(sheet, mergeColAnn.fromColRef() + tmplRowIndexRef); val to = PoiU...
java
private void mergeCols(ExcelRows excelRowsAnn, Cell templateCell, int itemSize) { val tmplRowIndexRef = templateCell.getRowIndex() + 1; for (val mergeColAnn : excelRowsAnn.mergeCols()) { val from = PoiUtil.findCell(sheet, mergeColAnn.fromColRef() + tmplRowIndexRef); val to = PoiU...
[ "private", "void", "mergeCols", "(", "ExcelRows", "excelRowsAnn", ",", "Cell", "templateCell", ",", "int", "itemSize", ")", "{", "val", "tmplRowIndexRef", "=", "templateCell", ".", "getRowIndex", "(", ")", "+", "1", ";", "for", "(", "val", "mergeColAnn", ":"...
根据@ExcelRows注解的指示,合并横向合并单元格。 @param excelRowsAnn @ExcelRows注解值。 @param templateCell 模板单元格。 @param itemSize 在多少行上横向合并单元格。
[ "根据@ExcelRows注解的指示,合并横向合并单元格。" ]
train
https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java#L104-L118
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java
SOS.estimateInitialBeta
@Reference(authors = "Erich Schubert, Michael Gertz", // title = "Intrinsic t-Stochastic Neighbor Embedding for Visualization and Outlier Detection: A Remedy Against the Curse of Dimensionality?", // booktitle = "Proc. Int. Conf. Similarity Search and Applications, SISAP'2017", // url = "https://doi.o...
java
@Reference(authors = "Erich Schubert, Michael Gertz", // title = "Intrinsic t-Stochastic Neighbor Embedding for Visualization and Outlier Detection: A Remedy Against the Curse of Dimensionality?", // booktitle = "Proc. Int. Conf. Similarity Search and Applications, SISAP'2017", // url = "https://doi.o...
[ "@", "Reference", "(", "authors", "=", "\"Erich Schubert, Michael Gertz\"", ",", "//", "title", "=", "\"Intrinsic t-Stochastic Neighbor Embedding for Visualization and Outlier Detection: A Remedy Against the Curse of Dimensionality?\"", ",", "//", "booktitle", "=", "\"Proc. Int. Conf. ...
Estimate beta from the distances in a row. <p> This lacks a thorough mathematical argument, but is a handcrafted heuristic to avoid numerical problems. The average distance is usually too large, so we scale the average distance by 2*N/perplexity. Then estimate beta as 1/x. @param ignore Object to skip @param it Distan...
[ "Estimate", "beta", "from", "the", "distances", "in", "a", "row", ".", "<p", ">", "This", "lacks", "a", "thorough", "mathematical", "argument", "but", "is", "a", "handcrafted", "heuristic", "to", "avoid", "numerical", "problems", ".", "The", "average", "dist...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java#L244-L261
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/IntentUtils.java
IntentUtils.sendSms
public static Intent sendSms(String to, String message) { Uri smsUri = Uri.parse("tel:" + to); Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); intent.putExtra("address", to); intent.putExtra("sms_body", message); intent.setType("vnd.android-dir/mms-sms"); return i...
java
public static Intent sendSms(String to, String message) { Uri smsUri = Uri.parse("tel:" + to); Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); intent.putExtra("address", to); intent.putExtra("sms_body", message); intent.setType("vnd.android-dir/mms-sms"); return i...
[ "public", "static", "Intent", "sendSms", "(", "String", "to", ",", "String", "message", ")", "{", "Uri", "smsUri", "=", "Uri", ".", "parse", "(", "\"tel:\"", "+", "to", ")", ";", "Intent", "intent", "=", "new", "Intent", "(", "Intent", ".", "ACTION_VIE...
Send SMS message using built-in app @param to Receiver phone number @param message Text to send
[ "Send", "SMS", "message", "using", "built", "-", "in", "app" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/IntentUtils.java#L117-L124
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SourceInfoMap.java
SourceInfoMap.getMethodLine
public @CheckForNull SourceLineRange getMethodLine(String className, String methodName, String methodSignature) { return methodLineMap.get(new MethodDescriptor(className, methodName, methodSignature)); }
java
public @CheckForNull SourceLineRange getMethodLine(String className, String methodName, String methodSignature) { return methodLineMap.get(new MethodDescriptor(className, methodName, methodSignature)); }
[ "public", "@", "CheckForNull", "SourceLineRange", "getMethodLine", "(", "String", "className", ",", "String", "methodName", ",", "String", "methodSignature", ")", "{", "return", "methodLineMap", ".", "get", "(", "new", "MethodDescriptor", "(", "className", ",", "m...
Look up the line number range for a method. @param className name of class containing the method @param methodName name of method @param methodSignature signature of method @return the line number range, or null if no line number is known for the method
[ "Look", "up", "the", "line", "number", "range", "for", "a", "method", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SourceInfoMap.java#L310-L313
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.clickOn
@Conditioned @Quand("Je clique sur '(.*)-(.*)'[\\.|\\?]") @When("I click on '(.*)-(.*)'[\\.|\\?]") public void clickOn(String page, String toClick, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.debug("{} clickOn: {}", page, toClick); clickOn...
java
@Conditioned @Quand("Je clique sur '(.*)-(.*)'[\\.|\\?]") @When("I click on '(.*)-(.*)'[\\.|\\?]") public void clickOn(String page, String toClick, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.debug("{} clickOn: {}", page, toClick); clickOn...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je clique sur '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "@", "When", "(", "\"I click on '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "clickOn", "(", "String", "page", ",", "String", "toClick", ",", "List", "<", "GherkinStepCond...
Click on html element if all 'expected' parameters equals 'actual' parameters in conditions. @param page The concerned page of toClick @param toClick html element. @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalExcept...
[ "Click", "on", "html", "element", "if", "all", "expected", "parameters", "equals", "actual", "parameters", "in", "conditions", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L384-L390
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlUtils.java
ControlUtils.resolveDefaultBinding
public static String resolveDefaultBinding( String implBinding, String controlClass ) { int intfIndex = implBinding.indexOf(ControlInterface.INTERFACE_NAME); if (intfIndex >= 0) { implBinding = implBinding.substring(0,intfIndex) + controlClass + implBind...
java
public static String resolveDefaultBinding( String implBinding, String controlClass ) { int intfIndex = implBinding.indexOf(ControlInterface.INTERFACE_NAME); if (intfIndex >= 0) { implBinding = implBinding.substring(0,intfIndex) + controlClass + implBind...
[ "public", "static", "String", "resolveDefaultBinding", "(", "String", "implBinding", ",", "String", "controlClass", ")", "{", "int", "intfIndex", "=", "implBinding", ".", "indexOf", "(", "ControlInterface", ".", "INTERFACE_NAME", ")", ";", "if", "(", "intfIndex", ...
Implements the default control implementation binding algorithm ( <InterfaceName> + "Impl" ). See documentation for the org.apache.beehive.controls.api.bean.ControlInterface annotation. @param implBinding the value of the defaultBinding attribute returned from a ControlInterface annotation @param controlClass the act...
[ "Implements", "the", "default", "control", "implementation", "binding", "algorithm", "(", "<InterfaceName", ">", "+", "Impl", ")", ".", "See", "documentation", "for", "the", "org", ".", "apache", ".", "beehive", ".", "controls", ".", "api", ".", "bean", ".",...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlUtils.java#L40-L50
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getAllCurrencyID
public List<Integer> getAllCurrencyID() throws GuildWars2Exception { try { Response<List<Integer>> response = gw2API.getAllCurrencies().execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody()); return response.body(); } catch (IOException e) { throw new GuildWars2Except...
java
public List<Integer> getAllCurrencyID() throws GuildWars2Exception { try { Response<List<Integer>> response = gw2API.getAllCurrencies().execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody()); return response.body(); } catch (IOException e) { throw new GuildWars2Except...
[ "public", "List", "<", "Integer", ">", "getAllCurrencyID", "(", ")", "throws", "GuildWars2Exception", "{", "try", "{", "Response", "<", "List", "<", "Integer", ">>", "response", "=", "gw2API", ".", "getAllCurrencies", "(", ")", ".", "execute", "(", ")", ";...
For more info on Currency API go <a href="https://wiki.guildwars2.com/wiki/API:2/currencies">here</a><br/> Get all currency ids @return list of currency ids @throws GuildWars2Exception see {@link ErrorCode} for detail @see Currency currency info
[ "For", "more", "info", "on", "Currency", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "currencies", ">", "here<", "/", "a", ">", "<br", "/", ">", "Get", "all", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L1667-L1675
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/DefaultQueryParameter.java
DefaultQueryParameter.putIfNotSet
static void putIfNotSet(Map<String, String> target, Map<String, String> defaults) { for (final String key : defaults.keySet()) { if (!target.containsKey(key)) { target.put(key, defaults.get(key)); } } }
java
static void putIfNotSet(Map<String, String> target, Map<String, String> defaults) { for (final String key : defaults.keySet()) { if (!target.containsKey(key)) { target.put(key, defaults.get(key)); } } }
[ "static", "void", "putIfNotSet", "(", "Map", "<", "String", ",", "String", ">", "target", ",", "Map", "<", "String", ",", "String", ">", "defaults", ")", "{", "for", "(", "final", "String", "key", ":", "defaults", ".", "keySet", "(", ")", ")", "{", ...
Update a given map with some default values if not already present in map. @param target the map to be filled with values, if a key for them is not set already. @param defaults the list of defaults, to be set.
[ "Update", "a", "given", "map", "with", "some", "default", "values", "if", "not", "already", "present", "in", "map", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/DefaultQueryParameter.java#L37-L43
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/meta/PathProperties.java
PathProperties.removeAll
public void removeAll(Supplier<JournalContext> ctx, String path) { try (LockResource r = new LockResource(mLock.writeLock())) { Map<String, String> properties = mState.getProperties(path); if (!properties.isEmpty()) { mState.applyAndJournal(ctx, RemovePathPropertiesEntry.newBuilder().setPath(pat...
java
public void removeAll(Supplier<JournalContext> ctx, String path) { try (LockResource r = new LockResource(mLock.writeLock())) { Map<String, String> properties = mState.getProperties(path); if (!properties.isEmpty()) { mState.applyAndJournal(ctx, RemovePathPropertiesEntry.newBuilder().setPath(pat...
[ "public", "void", "removeAll", "(", "Supplier", "<", "JournalContext", ">", "ctx", ",", "String", "path", ")", "{", "try", "(", "LockResource", "r", "=", "new", "LockResource", "(", "mLock", ".", "writeLock", "(", ")", ")", ")", "{", "Map", "<", "Strin...
Removes all properties for path. @param ctx the journal context @param path the path
[ "Removes", "all", "properties", "for", "path", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/meta/PathProperties.java#L117-L124
CloudBees-community/syslog-java-client
src/main/java/com/cloudbees/syslog/sender/UdpSyslogMessageSender.java
UdpSyslogMessageSender.sendMessage
@Override public void sendMessage(SyslogMessage message) throws IOException { sendCounter.incrementAndGet(); long nanosBefore = System.nanoTime(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Writer out = new OutputStreamWriter(baos, UTF_8); ...
java
@Override public void sendMessage(SyslogMessage message) throws IOException { sendCounter.incrementAndGet(); long nanosBefore = System.nanoTime(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Writer out = new OutputStreamWriter(baos, UTF_8); ...
[ "@", "Override", "public", "void", "sendMessage", "(", "SyslogMessage", "message", ")", "throws", "IOException", "{", "sendCounter", ".", "incrementAndGet", "(", ")", ";", "long", "nanosBefore", "=", "System", ".", "nanoTime", "(", ")", ";", "try", "{", "Byt...
Send the given {@link com.cloudbees.syslog.SyslogMessage} over UDP. @param message the message to send @throws IOException
[ "Send", "the", "given", "{", "@link", "com", ".", "cloudbees", ".", "syslog", ".", "SyslogMessage", "}", "over", "UDP", "." ]
train
https://github.com/CloudBees-community/syslog-java-client/blob/41e01206e4ce17c6d225ffb443bf19792a3f3c3a/src/main/java/com/cloudbees/syslog/sender/UdpSyslogMessageSender.java#L76-L103
Squarespace/cldr
compiler/src/main/java/com/squarespace/cldr/codegen/CalendarCodeGenerator.java
CalendarCodeGenerator.buildTimeZoneAliases
private void buildTimeZoneAliases(TypeSpec.Builder type, Map<String, String> map) { MethodSpec.Builder method = MethodSpec.methodBuilder("getTimeZoneAlias") .addModifiers(PUBLIC, STATIC) .addParameter(String.class, "zoneId") .returns(String.class); method.beginControlFlow("switch (zoneI...
java
private void buildTimeZoneAliases(TypeSpec.Builder type, Map<String, String> map) { MethodSpec.Builder method = MethodSpec.methodBuilder("getTimeZoneAlias") .addModifiers(PUBLIC, STATIC) .addParameter(String.class, "zoneId") .returns(String.class); method.beginControlFlow("switch (zoneI...
[ "private", "void", "buildTimeZoneAliases", "(", "TypeSpec", ".", "Builder", "type", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "MethodSpec", ".", "Builder", "method", "=", "MethodSpec", ".", "methodBuilder", "(", "\"getTimeZoneAlias\"", ")...
Creates a switch table to resolve a retired time zone to a valid one.
[ "Creates", "a", "switch", "table", "to", "resolve", "a", "retired", "time", "zone", "to", "a", "valid", "one", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/compiler/src/main/java/com/squarespace/cldr/codegen/CalendarCodeGenerator.java#L186-L199
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java
IOUtil.readBytesFromOtherInputStream
public static int readBytesFromOtherInputStream(InputStream is, byte[] targetArray) throws IOException { assert targetArray != null; if (targetArray.length == 0) return 0; int len; int off = 0; while (off < targetArray.length && (len = is.read(targetArray, off, targetArray.le...
java
public static int readBytesFromOtherInputStream(InputStream is, byte[] targetArray) throws IOException { assert targetArray != null; if (targetArray.length == 0) return 0; int len; int off = 0; while (off < targetArray.length && (len = is.read(targetArray, off, targetArray.le...
[ "public", "static", "int", "readBytesFromOtherInputStream", "(", "InputStream", "is", ",", "byte", "[", "]", "targetArray", ")", "throws", "IOException", "{", "assert", "targetArray", "!=", "null", ";", "if", "(", "targetArray", ".", "length", "==", "0", ")", ...
从InputStream读取指定长度的字节出来 @param is 流 @param targetArray output @return 实际读取了多少字节,返回0表示遇到了文件尾部 @throws IOException
[ "从InputStream读取指定长度的字节出来" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java#L292-L303
voldemort/voldemort
src/java/voldemort/rest/coordinator/config/ClientConfigUtil.java
ClientConfigUtil.readSingleClientConfigAvro
@SuppressWarnings("unchecked") public static Properties readSingleClientConfigAvro(String configAvro) { Properties props = new Properties(); try { JsonDecoder decoder = new JsonDecoder(CLIENT_CONFIG_AVRO_SCHEMA, configAvro); GenericDatumReader<Object> datumReader = new Generi...
java
@SuppressWarnings("unchecked") public static Properties readSingleClientConfigAvro(String configAvro) { Properties props = new Properties(); try { JsonDecoder decoder = new JsonDecoder(CLIENT_CONFIG_AVRO_SCHEMA, configAvro); GenericDatumReader<Object> datumReader = new Generi...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Properties", "readSingleClientConfigAvro", "(", "String", "configAvro", ")", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "try", "{", "JsonDecoder", "decoder", "=", ...
Parses a string that contains single fat client config string in avro format @param configAvro Input string of avro format, that contains config for multiple stores @return Properties of single fat client config
[ "Parses", "a", "string", "that", "contains", "single", "fat", "client", "config", "string", "in", "avro", "format" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/rest/coordinator/config/ClientConfigUtil.java#L34-L48
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.listNext
public PagedList<CloudTask> listNext(final String nextPageLink, final TaskListNextOptions taskListNextOptions) { ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders> response = listNextSinglePageAsync(nextPageLink, taskListNextOptions).toBlocking().single(); return new PagedList<CloudTask>(respo...
java
public PagedList<CloudTask> listNext(final String nextPageLink, final TaskListNextOptions taskListNextOptions) { ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders> response = listNextSinglePageAsync(nextPageLink, taskListNextOptions).toBlocking().single(); return new PagedList<CloudTask>(respo...
[ "public", "PagedList", "<", "CloudTask", ">", "listNext", "(", "final", "String", "nextPageLink", ",", "final", "TaskListNextOptions", "taskListNextOptions", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "CloudTask", ">", ",", "TaskListHeaders", ">", "re...
Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks. @param nextPageLink The NextLink from the previous successful call to List...
[ "Lists", "all", "of", "the", "tasks", "that", "are", "associated", "with", "the", "specified", "job", ".", "For", "multi", "-", "instance", "tasks", "information", "such", "as", "affinityId", "executionInfo", "and", "nodeInfo", "refer", "to", "the", "primary",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L2441-L2449
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java
AccountsImpl.listNodeAgentSkusNextAsync
public Observable<Page<NodeAgentSku>> listNodeAgentSkusNextAsync(final String nextPageLink, final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions) { return listNodeAgentSkusNextWithServiceResponseAsync(nextPageLink, accountListNodeAgentSkusNextOptions) .map(new Func1<ServiceR...
java
public Observable<Page<NodeAgentSku>> listNodeAgentSkusNextAsync(final String nextPageLink, final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions) { return listNodeAgentSkusNextWithServiceResponseAsync(nextPageLink, accountListNodeAgentSkusNextOptions) .map(new Func1<ServiceR...
[ "public", "Observable", "<", "Page", "<", "NodeAgentSku", ">", ">", "listNodeAgentSkusNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "AccountListNodeAgentSkusNextOptions", "accountListNodeAgentSkusNextOptions", ")", "{", "return", "listNodeAgentSkusNextWith...
Lists all node agent SKUs supported by the Azure Batch service. @param nextPageLink The NextLink from the previous successful call to List operation. @param accountListNodeAgentSkusNextOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @return the ...
[ "Lists", "all", "node", "agent", "SKUs", "supported", "by", "the", "Azure", "Batch", "service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java#L799-L807
JetBrains/xodus
environment/src/main/java/jetbrains/exodus/env/EnvironmentImpl.java
EnvironmentImpl.loadMetaTree
@Nullable BTree loadMetaTree(final long rootAddress, final LogTip logTip) { if (rootAddress < 0 || rootAddress >= logTip.highAddress) return null; return new BTree(log, getBTreeBalancePolicy(), rootAddress, false, META_TREE_ID) { @NotNull @Override public DataIter...
java
@Nullable BTree loadMetaTree(final long rootAddress, final LogTip logTip) { if (rootAddress < 0 || rootAddress >= logTip.highAddress) return null; return new BTree(log, getBTreeBalancePolicy(), rootAddress, false, META_TREE_ID) { @NotNull @Override public DataIter...
[ "@", "Nullable", "BTree", "loadMetaTree", "(", "final", "long", "rootAddress", ",", "final", "LogTip", "logTip", ")", "{", "if", "(", "rootAddress", "<", "0", "||", "rootAddress", ">=", "logTip", ".", "highAddress", ")", "return", "null", ";", "return", "n...
Tries to load meta tree located at specified rootAddress. @param rootAddress tree root address. @return tree instance or null if the address is not valid.
[ "Tries", "to", "load", "meta", "tree", "located", "at", "specified", "rootAddress", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/env/EnvironmentImpl.java#L618-L628
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java
UTF16.valueOf
public static String valueOf(char source[], int start, int limit, int offset16) { switch (bounds(source, start, limit, offset16)) { case LEAD_SURROGATE_BOUNDARY: return new String(source, start + offset16, 2); case TRAIL_SURROGATE_BOUNDARY: return new String(source, start...
java
public static String valueOf(char source[], int start, int limit, int offset16) { switch (bounds(source, start, limit, offset16)) { case LEAD_SURROGATE_BOUNDARY: return new String(source, start + offset16, 2); case TRAIL_SURROGATE_BOUNDARY: return new String(source, start...
[ "public", "static", "String", "valueOf", "(", "char", "source", "[", "]", ",", "int", "start", ",", "int", "limit", ",", "int", "offset16", ")", "{", "switch", "(", "bounds", "(", "source", ",", "start", ",", "limit", ",", "offset16", ")", ")", "{", ...
Convenience method. Returns a one or two char string containing the UTF-32 value in UTF16 format. If offset16 indexes a surrogate character, the whole supplementary codepoint will be returned, except when either the leading or trailing surrogate character lies out of the specified subarray. In the latter case, only the...
[ "Convenience", "method", ".", "Returns", "a", "one", "or", "two", "char", "string", "containing", "the", "UTF", "-", "32", "value", "in", "UTF16", "format", ".", "If", "offset16", "indexes", "a", "surrogate", "character", "the", "whole", "supplementary", "co...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java#L710-L718
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ApiRequestExecutorImpl.java
ApiRequestExecutorImpl.createResponseChain
private Chain<ApiResponse> createResponseChain(IAsyncHandler<ApiResponse> responseHandler) { ResponseChain chain = new ResponseChain(policyImpls, context); chain.headHandler(responseHandler); chain.policyFailureHandler(result -> { if (apiConnectionResponse != null) { apiC...
java
private Chain<ApiResponse> createResponseChain(IAsyncHandler<ApiResponse> responseHandler) { ResponseChain chain = new ResponseChain(policyImpls, context); chain.headHandler(responseHandler); chain.policyFailureHandler(result -> { if (apiConnectionResponse != null) { apiC...
[ "private", "Chain", "<", "ApiResponse", ">", "createResponseChain", "(", "IAsyncHandler", "<", "ApiResponse", ">", "responseHandler", ")", "{", "ResponseChain", "chain", "=", "new", "ResponseChain", "(", "policyImpls", ",", "context", ")", ";", "chain", ".", "he...
Creates the chain used to apply policies in reverse order to the api response.
[ "Creates", "the", "chain", "used", "to", "apply", "policies", "in", "reverse", "order", "to", "the", "api", "response", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ApiRequestExecutorImpl.java#L824-L840
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper._hasSideEffects
protected Boolean _hasSideEffects(XSynchronizedExpression expression, ISideEffectContext context) { return hasSideEffects(expression.getExpression(), context); }
java
protected Boolean _hasSideEffects(XSynchronizedExpression expression, ISideEffectContext context) { return hasSideEffects(expression.getExpression(), context); }
[ "protected", "Boolean", "_hasSideEffects", "(", "XSynchronizedExpression", "expression", ",", "ISideEffectContext", "context", ")", "{", "return", "hasSideEffects", "(", "expression", ".", "getExpression", "(", ")", ",", "context", ")", ";", "}" ]
Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects.
[ "Test", "if", "the", "given", "expression", "has", "side", "effects", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L264-L266
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/TemplateDraft.java
TemplateDraft.serializeMergeFields
public static String serializeMergeFields(Map<String, FieldType> mergeFields) throws HelloSignException { if (mergeFields == null || mergeFields.isEmpty()) { return null; } JSONArray mergeFieldArray = new JSONArray(); for (String key : mergeFields.keySet()) { Fiel...
java
public static String serializeMergeFields(Map<String, FieldType> mergeFields) throws HelloSignException { if (mergeFields == null || mergeFields.isEmpty()) { return null; } JSONArray mergeFieldArray = new JSONArray(); for (String key : mergeFields.keySet()) { Fiel...
[ "public", "static", "String", "serializeMergeFields", "(", "Map", "<", "String", ",", "FieldType", ">", "mergeFields", ")", "throws", "HelloSignException", "{", "if", "(", "mergeFields", "==", "null", "||", "mergeFields", ".", "isEmpty", "(", ")", ")", "{", ...
Helper method to convert a Java Map into the JSON string required by the HelloSign API. @param mergeFields Map @return String @throws HelloSignException Thrown if there's a problem parsing JSONObjects
[ "Helper", "method", "to", "convert", "a", "Java", "Map", "into", "the", "JSON", "string", "required", "by", "the", "HelloSign", "API", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/TemplateDraft.java#L240-L257
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ClustersNames.java
ClustersNames.getClusterName
public String getClusterName(Configuration conf) { // ResourceManager address in Hadoop2 String clusterIdentifier = conf.get("yarn.resourcemanager.address"); clusterIdentifier = getClusterName(clusterIdentifier); // If job is running outside of Hadoop (Standalone) use hostname // If clusterIdentifi...
java
public String getClusterName(Configuration conf) { // ResourceManager address in Hadoop2 String clusterIdentifier = conf.get("yarn.resourcemanager.address"); clusterIdentifier = getClusterName(clusterIdentifier); // If job is running outside of Hadoop (Standalone) use hostname // If clusterIdentifi...
[ "public", "String", "getClusterName", "(", "Configuration", "conf", ")", "{", "// ResourceManager address in Hadoop2", "String", "clusterIdentifier", "=", "conf", ".", "get", "(", "\"yarn.resourcemanager.address\"", ")", ";", "clusterIdentifier", "=", "getClusterName", "(...
Returns the cluster name on which the application is running. Uses Hadoop configuration passed in to get the url of the resourceManager or jobtracker. The URL is then translated into a human readable cluster name using {@link #getClusterName(String)} <p> <b>MapReduce mode</b> Uses the value for "yarn.resourcemanager.a...
[ "Returns", "the", "cluster", "name", "on", "which", "the", "application", "is", "running", ".", "Uses", "Hadoop", "configuration", "passed", "in", "to", "get", "the", "url", "of", "the", "resourceManager", "or", "jobtracker", ".", "The", "URL", "is", "then",...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ClustersNames.java#L151-L168
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java
RuleBasedCollator.getCollationKey
@Override public CollationKey getCollationKey(String source) { if (source == null) { return null; } CollationBuffer buffer = null; try { buffer = getCollationBuffer(); return getCollationKey(source, buffer); } finally { releaseC...
java
@Override public CollationKey getCollationKey(String source) { if (source == null) { return null; } CollationBuffer buffer = null; try { buffer = getCollationBuffer(); return getCollationKey(source, buffer); } finally { releaseC...
[ "@", "Override", "public", "CollationKey", "getCollationKey", "(", "String", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "CollationBuffer", "buffer", "=", "null", ";", "try", "{", "buffer", "=", "getCollatio...
<p> Get a Collation key for the argument String source from this RuleBasedCollator. <p> General recommendation: <br> If comparison are to be done to the same String multiple times, it would be more efficient to generate CollationKeys for the Strings and use CollationKey.compareTo(CollationKey) for the comparisons. If t...
[ "<p", ">", "Get", "a", "Collation", "key", "for", "the", "argument", "String", "source", "from", "this", "RuleBasedCollator", ".", "<p", ">", "General", "recommendation", ":", "<br", ">", "If", "comparison", "are", "to", "be", "done", "to", "the", "same", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java#L1030-L1042
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java
PropertyBuilder.buildPropertyComments
public void buildPropertyComments(XMLNode node, Content propertyDocTree) { if (!configuration.nocomment) { writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); } }
java
public void buildPropertyComments(XMLNode node, Content propertyDocTree) { if (!configuration.nocomment) { writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); } }
[ "public", "void", "buildPropertyComments", "(", "XMLNode", "node", ",", "Content", "propertyDocTree", ")", "{", "if", "(", "!", "configuration", ".", "nocomment", ")", "{", "writer", ".", "addComments", "(", "(", "MethodDoc", ")", "properties", ".", "get", "...
Build the comments for the property. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param propertyDocTree the content tree to which the documentation will be added
[ "Build", "the", "comments", "for", "the", "property", ".", "Do", "nothing", "if", "{", "@link", "Configuration#nocomment", "}", "is", "set", "to", "true", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java#L205-L209
zxing/zxing
android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java
IntentIntegrator.parseActivityResult
public static IntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == REQUEST_CODE) { if (resultCode == Activity.RESULT_OK) { String contents = intent.getStringExtra("SCAN_RESULT"); String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT"); ...
java
public static IntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == REQUEST_CODE) { if (resultCode == Activity.RESULT_OK) { String contents = intent.getStringExtra("SCAN_RESULT"); String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT"); ...
[ "public", "static", "IntentResult", "parseActivityResult", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "intent", ")", "{", "if", "(", "requestCode", "==", "REQUEST_CODE", ")", "{", "if", "(", "resultCode", "==", "Activity", ".", "RESULT...
<p>Call this from your {@link Activity}'s {@link Activity#onActivityResult(int, int, Intent)} method.</p> @param requestCode request code from {@code onActivityResult()} @param resultCode result code from {@code onActivityResult()} @param intent {@link Intent} from {@code onActivityResult()} @return null if the event ...
[ "<p", ">", "Call", "this", "from", "your", "{", "@link", "Activity", "}", "s", "{", "@link", "Activity#onActivityResult", "(", "int", "int", "Intent", ")", "}", "method", ".", "<", "/", "p", ">" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java#L419-L437
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_lines_serviceName_hardware_POST
public OvhOrder telephony_lines_serviceName_hardware_POST(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException { String qPath = "/order/telephony/lines/{serviceName}/hardware"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Ob...
java
public OvhOrder telephony_lines_serviceName_hardware_POST(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException { String qPath = "/order/telephony/lines/{serviceName}/hardware"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Ob...
[ "public", "OvhOrder", "telephony_lines_serviceName_hardware_POST", "(", "String", "serviceName", ",", "String", "hardware", ",", "String", "mondialRelayId", ",", "Boolean", "retractation", ",", "String", "shippingContactId", ")", "throws", "IOException", "{", "String", ...
Create order REST: POST /order/telephony/lines/{serviceName}/hardware @param hardware [required] The hardware you want to order for this specific line @param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information entry. @param shippingCon...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6924-L6934
hdbeukel/james-extensions
src/main/java/org/jamesframework/ext/analysis/SearchRunResults.java
SearchRunResults.updateBestSolution
public void updateBestSolution(long time, double value, SolutionType newBestSolution){ times.add(time); values.add(value); bestSolution = newBestSolution; }
java
public void updateBestSolution(long time, double value, SolutionType newBestSolution){ times.add(time); values.add(value); bestSolution = newBestSolution; }
[ "public", "void", "updateBestSolution", "(", "long", "time", ",", "double", "value", ",", "SolutionType", "newBestSolution", ")", "{", "times", ".", "add", "(", "time", ")", ";", "values", ".", "add", "(", "value", ")", ";", "bestSolution", "=", "newBestSo...
Update the best found solution. The update time and newly obtained value are added to the list of updates and the final best solution is overwritten. @param time time at which the solution was found (milliseconds) @param value value of the solution @param newBestSolution newly found best solution
[ "Update", "the", "best", "found", "solution", ".", "The", "update", "time", "and", "newly", "obtained", "value", "are", "added", "to", "the", "list", "of", "updates", "and", "the", "final", "best", "solution", "is", "overwritten", "." ]
train
https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/SearchRunResults.java#L75-L79
Azure/azure-sdk-for-java
dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java
RecordSetsInner.updateAsync
public Observable<RecordSetInner> updateAsync(String resourceGroupName, String zoneName, String relativeRecordSetName, RecordType recordType, RecordSetInner parameters, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch).ma...
java
public Observable<RecordSetInner> updateAsync(String resourceGroupName, String zoneName, String relativeRecordSetName, RecordType recordType, RecordSetInner parameters, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch).ma...
[ "public", "Observable", "<", "RecordSetInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "zoneName", ",", "String", "relativeRecordSetName", ",", "RecordType", "recordType", ",", "RecordSetInner", "parameters", ",", "String", "ifMatch", ")...
Updates a record set within a DNS zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @param relativeRecordSetName The name of the record set, relative to the name of the zone. @param recordType The type of DNS record in this record set. ...
[ "Updates", "a", "record", "set", "within", "a", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java#L249-L256
ltearno/hexa.tools
hexa.core/src/main/java/fr/lteconsulting/hexa/linker/AppCacheLinker.java
AppCacheLinker.emitLandingPageCacheManifest
@SuppressWarnings( "rawtypes" ) private Artifact<?> emitLandingPageCacheManifest( LinkerContext context, TreeLogger logger, ArtifactSet artifacts ) throws UnableToCompleteException { StringBuilder publicSourcesSb = new StringBuilder(); StringBuilder staticResoucesSb = new StringBuilder(); if( artifacts != null...
java
@SuppressWarnings( "rawtypes" ) private Artifact<?> emitLandingPageCacheManifest( LinkerContext context, TreeLogger logger, ArtifactSet artifacts ) throws UnableToCompleteException { StringBuilder publicSourcesSb = new StringBuilder(); StringBuilder staticResoucesSb = new StringBuilder(); if( artifacts != null...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "private", "Artifact", "<", "?", ">", "emitLandingPageCacheManifest", "(", "LinkerContext", "context", ",", "TreeLogger", "logger", ",", "ArtifactSet", "artifacts", ")", "throws", "UnableToCompleteException", "{", "St...
Creates the cache-manifest resource specific for the landing page. @param context the linker environment @param logger the tree logger to record to @param artifacts {@code null} to generate an empty cache manifest
[ "Creates", "the", "cache", "-", "manifest", "resource", "specific", "for", "the", "landing", "page", "." ]
train
https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.core/src/main/java/fr/lteconsulting/hexa/linker/AppCacheLinker.java#L106-L169
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Diff.java
Diff.skippedComparison
public void skippedComparison(Node control, Node test) { if (differenceListenerDelegate != null) { differenceListenerDelegate.skippedComparison(control, test); } else { System.err.println("DifferenceListener.skippedComparison: " + "unhandled control...
java
public void skippedComparison(Node control, Node test) { if (differenceListenerDelegate != null) { differenceListenerDelegate.skippedComparison(control, test); } else { System.err.println("DifferenceListener.skippedComparison: " + "unhandled control...
[ "public", "void", "skippedComparison", "(", "Node", "control", ",", "Node", "test", ")", "{", "if", "(", "differenceListenerDelegate", "!=", "null", ")", "{", "differenceListenerDelegate", ".", "skippedComparison", "(", "control", ",", "test", ")", ";", "}", "...
DifferenceListener implementation. If the {@link Diff#overrideDifferenceListener overrideDifferenceListener} method has been called then the call will be delegated otherwise a message is printed to <code>System.err</code>. @param control @param test
[ "DifferenceListener", "implementation", ".", "If", "the", "{" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Diff.java#L334-L342
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/CreateOptions.java
CreateOptions.writeOptions
public static WriteOptions writeOptions(Boolean overwrite, Boolean forceSync){ WriteOptions wo = new WriteOptions(); if (overwrite != null) wo.setOverwrite(overwrite); if (forceSync != null) wo.setForcesync(forceSync); return wo; }
java
public static WriteOptions writeOptions(Boolean overwrite, Boolean forceSync){ WriteOptions wo = new WriteOptions(); if (overwrite != null) wo.setOverwrite(overwrite); if (forceSync != null) wo.setForcesync(forceSync); return wo; }
[ "public", "static", "WriteOptions", "writeOptions", "(", "Boolean", "overwrite", ",", "Boolean", "forceSync", ")", "{", "WriteOptions", "wo", "=", "new", "WriteOptions", "(", ")", ";", "if", "(", "overwrite", "!=", "null", ")", "wo", ".", "setOverwrite", "("...
Creates a WriteOptions from given overwrite and forceSync values. If null passed, it will use their default value.
[ "Creates", "a", "WriteOptions", "from", "given", "overwrite", "and", "forceSync", "values", ".", "If", "null", "passed", "it", "will", "use", "their", "default", "value", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/CreateOptions.java#L39-L46
TakahikoKawasaki/nv-cipher
src/main/java/com/neovisionaries/security/AESCipher.java
AESCipher.setKey
public AESCipher setKey(SecretKey key, IvParameterSpec iv) { return (AESCipher)setInit(key, iv); }
java
public AESCipher setKey(SecretKey key, IvParameterSpec iv) { return (AESCipher)setInit(key, iv); }
[ "public", "AESCipher", "setKey", "(", "SecretKey", "key", ",", "IvParameterSpec", "iv", ")", "{", "return", "(", "AESCipher", ")", "setInit", "(", "key", ",", "iv", ")", ";", "}" ]
Set cipher initialization parameters. <p> This method is an alias of {@link #setInit(java.security.Key, java.security.spec.AlgorithmParameterSpec) setInit(key, iv)}. </p> @param key Secret key. @param iv Initial vector. @return {@code this} object. @throws IllegalArgumentException {@code key} is {@code null}.
[ "Set", "cipher", "initialization", "parameters", "." ]
train
https://github.com/TakahikoKawasaki/nv-cipher/blob/d01aa4f53611e2724ae03633060f55bacf549175/src/main/java/com/neovisionaries/security/AESCipher.java#L228-L231
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java
LineNumberPanel.updateSize
private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int d = (int) Math.log10(lineCount) + 1; if (d < 1) {...
java
private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int d = (int) Math.log10(lineCount) + 1; if (d < 1) {...
[ "private", "void", "updateSize", "(", ")", "{", "int", "newLineCount", "=", "ActionUtils", ".", "getLineCount", "(", "pane", ")", ";", "if", "(", "newLineCount", "==", "lineCount", ")", "{", "return", ";", "}", "lineCount", "=", "newLineCount", ";", "int",...
Update the size of the line numbers based on the length of the document
[ "Update", "the", "size", "of", "the", "line", "numbers", "based", "on", "the", "length", "of", "the", "document" ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java#L146-L161
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/viewer/GeoBounds.java
GeoBounds.setRect
private void setRect(double minLat, double minLng, double maxLat, double maxLng) { if (!(minLat < maxLat)) { throw new IllegalArgumentException("GeoBounds is not valid - minLat must be less that maxLat."); } if (!(minLng < maxLng)) { if (minLng > 0 && ...
java
private void setRect(double minLat, double minLng, double maxLat, double maxLng) { if (!(minLat < maxLat)) { throw new IllegalArgumentException("GeoBounds is not valid - minLat must be less that maxLat."); } if (!(minLng < maxLng)) { if (minLng > 0 && ...
[ "private", "void", "setRect", "(", "double", "minLat", ",", "double", "minLng", ",", "double", "maxLat", ",", "double", "maxLng", ")", "{", "if", "(", "!", "(", "minLat", "<", "maxLat", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"G...
Sets the internal rectangle representation. @param minLat The minimum latitude. @param minLng The minimum longitude. @param maxLat The maximum latitude. @param maxLng The maximum longitude.
[ "Sets", "the", "internal", "rectangle", "representation", "." ]
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/viewer/GeoBounds.java#L62-L90
canoo/dolphin-platform
platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/gc/GarbageCollector.java
GarbageCollector.onBeanCreated
public synchronized void onBeanCreated(Object bean, boolean rootBean) { if (!configuration.isUseGc()) { return; } Assert.requireNonNull(bean, "bean"); if (allInstances.containsKey(bean)) { throw new IllegalArgumentException("Bean instance is already managed!"); ...
java
public synchronized void onBeanCreated(Object bean, boolean rootBean) { if (!configuration.isUseGc()) { return; } Assert.requireNonNull(bean, "bean"); if (allInstances.containsKey(bean)) { throw new IllegalArgumentException("Bean instance is already managed!"); ...
[ "public", "synchronized", "void", "onBeanCreated", "(", "Object", "bean", ",", "boolean", "rootBean", ")", "{", "if", "(", "!", "configuration", ".", "isUseGc", "(", ")", ")", "{", "return", ";", "}", "Assert", ".", "requireNonNull", "(", "bean", ",", "\...
This method must be called for each new Dolphin bean (see {@link RemotingBean}). Normally beans are created by {@link BeanManager#create(Class)} @param bean the bean that was created @param rootBean if this is true the bean is handled as a root bean. This bean don't need a reference.
[ "This", "method", "must", "be", "called", "for", "each", "new", "Dolphin", "bean", "(", "see", "{", "@link", "RemotingBean", "}", ")", ".", "Normally", "beans", "are", "created", "by", "{", "@link", "BeanManager#create", "(", "Class", ")", "}" ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/gc/GarbageCollector.java#L88-L112
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.notEmptyIfNotNull
public static String notEmptyIfNotNull(String value, String name) { return notEmptyIfNotNull(value, name, null); }
java
public static String notEmptyIfNotNull(String value, String name) { return notEmptyIfNotNull(value, name, null); }
[ "public", "static", "String", "notEmptyIfNotNull", "(", "String", "value", ",", "String", "name", ")", "{", "return", "notEmptyIfNotNull", "(", "value", ",", "name", ",", "null", ")", ";", "}" ]
Check that a string is not empty if its not null. @param value value. @param name parameter name for the exception message. @return the given value.
[ "Check", "that", "a", "string", "is", "not", "empty", "if", "its", "not", "null", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L104-L106
OpenLiberty/open-liberty
dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/MultiScopeRecoveryLog.java
MultiScopeRecoveryLog.associateLog
@Override public void associateLog(DistributedRecoveryLog otherLog, boolean failAssociatedLog) { if (tc.isEntryEnabled()) Tr.entry(tc, "associateLog", new Object[] { otherLog, failAssociatedLog, this }); if (otherLog instanceof MultiScopeLog) { _associatedLog = (...
java
@Override public void associateLog(DistributedRecoveryLog otherLog, boolean failAssociatedLog) { if (tc.isEntryEnabled()) Tr.entry(tc, "associateLog", new Object[] { otherLog, failAssociatedLog, this }); if (otherLog instanceof MultiScopeLog) { _associatedLog = (...
[ "@", "Override", "public", "void", "associateLog", "(", "DistributedRecoveryLog", "otherLog", ",", "boolean", "failAssociatedLog", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", "tc", ",", "\"associateLog\"", ",", "...
Associates another log with this one. PI45254. The code is protects against infinite recursion since associated logs are only marked as failed if the log isn't already mark as failed. The code does NOT protect against deadlock due to synchronization for logA->logB and logB->logA - this is not an issue since failAssocia...
[ "Associates", "another", "log", "with", "this", "one", ".", "PI45254", ".", "The", "code", "is", "protects", "against", "infinite", "recursion", "since", "associated", "logs", "are", "only", "marked", "as", "failed", "if", "the", "log", "isn", "t", "already"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/MultiScopeRecoveryLog.java#L2564-L2577
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/background/BackgroundModelStationary.java
BackgroundModelStationary.updateBackground
public void updateBackground( T frame , GrayU8 segment ) { updateBackground(frame); segment(frame,segment); }
java
public void updateBackground( T frame , GrayU8 segment ) { updateBackground(frame); segment(frame,segment); }
[ "public", "void", "updateBackground", "(", "T", "frame", ",", "GrayU8", "segment", ")", "{", "updateBackground", "(", "frame", ")", ";", "segment", "(", "frame", ",", "segment", ")", ";", "}" ]
Updates the background and segments it at the same time. In some implementations this can be significantly faster than doing it with separate function calls. Segmentation is performed using the model which it has prior to the update.
[ "Updates", "the", "background", "and", "segments", "it", "at", "the", "same", "time", ".", "In", "some", "implementations", "this", "can", "be", "significantly", "faster", "than", "doing", "it", "with", "separate", "function", "calls", ".", "Segmentation", "is...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/background/BackgroundModelStationary.java#L48-L51
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java
SSOCookieHelperImpl.addJwtCookies
protected boolean addJwtCookies(String cookieByteString, HttpServletRequest req, HttpServletResponse resp) { String baseName = getJwtCookieName(); if (baseName == null) { return false; } if ((!req.isSecure()) && getJwtCookieSecure()) { Tr.warning(tc, "JWT_COOKIE_...
java
protected boolean addJwtCookies(String cookieByteString, HttpServletRequest req, HttpServletResponse resp) { String baseName = getJwtCookieName(); if (baseName == null) { return false; } if ((!req.isSecure()) && getJwtCookieSecure()) { Tr.warning(tc, "JWT_COOKIE_...
[ "protected", "boolean", "addJwtCookies", "(", "String", "cookieByteString", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "{", "String", "baseName", "=", "getJwtCookieName", "(", ")", ";", "if", "(", "baseName", "==", "null", ")", "{...
Add the cookie or cookies as needed, depending on size of token. Return true if any cookies were added
[ "Add", "the", "cookie", "or", "cookies", "as", "needed", "depending", "on", "size", "of", "token", ".", "Return", "true", "if", "any", "cookies", "were", "added" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java#L129-L151
threerings/nenya
core/src/main/java/com/threerings/miso/client/MisoScenePanel.java
MisoScenePanel.handleObjectPressed
protected void handleObjectPressed (final SceneObject scobj, int mx, int my) { String action = scobj.info.action; final ObjectActionHandler handler = ObjectActionHandler.lookup(action); // if there's no handler, just fire the action immediately if (handler == null) { fir...
java
protected void handleObjectPressed (final SceneObject scobj, int mx, int my) { String action = scobj.info.action; final ObjectActionHandler handler = ObjectActionHandler.lookup(action); // if there's no handler, just fire the action immediately if (handler == null) { fir...
[ "protected", "void", "handleObjectPressed", "(", "final", "SceneObject", "scobj", ",", "int", "mx", ",", "int", "my", ")", "{", "String", "action", "=", "scobj", ".", "info", ".", "action", ";", "final", "ObjectActionHandler", "handler", "=", "ObjectActionHand...
Called when the user presses the mouse button over an object.
[ "Called", "when", "the", "user", "presses", "the", "mouse", "button", "over", "an", "object", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L443-L485
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTable.java
WTable.updateBeanValueForRenderedRows
private void updateBeanValueForRenderedRows() { WTableRowRenderer rowRenderer = (WTableRowRenderer) repeater.getRepeatedComponent(); TableModel model = getTableModel(); int index = 0; List<RowIdWrapper> wrappers = repeater.getBeanList(); int columnCount = getColumnCount(); for (RowIdWrapper wrapper : wr...
java
private void updateBeanValueForRenderedRows() { WTableRowRenderer rowRenderer = (WTableRowRenderer) repeater.getRepeatedComponent(); TableModel model = getTableModel(); int index = 0; List<RowIdWrapper> wrappers = repeater.getBeanList(); int columnCount = getColumnCount(); for (RowIdWrapper wrapper : wr...
[ "private", "void", "updateBeanValueForRenderedRows", "(", ")", "{", "WTableRowRenderer", "rowRenderer", "=", "(", "WTableRowRenderer", ")", "repeater", ".", "getRepeatedComponent", "(", ")", ";", "TableModel", "model", "=", "getTableModel", "(", ")", ";", "int", "...
Updates the bean using the table data model's {@link TableModel#setValueAt(Object, List, int)} method. This method only updates the data for the currently set row ids.
[ "Updates", "the", "bean", "using", "the", "table", "data", "model", "s", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTable.java#L400-L429
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java
BytecodeUtils.asList
public static Expression asList(Iterable<? extends Expression> items) { final ImmutableList<Expression> copy = ImmutableList.copyOf(items); if (copy.isEmpty()) { return MethodRef.IMMUTABLE_LIST_OF.get(0).invoke(); } // Note, we cannot necessarily use ImmutableList for anything besides the empty li...
java
public static Expression asList(Iterable<? extends Expression> items) { final ImmutableList<Expression> copy = ImmutableList.copyOf(items); if (copy.isEmpty()) { return MethodRef.IMMUTABLE_LIST_OF.get(0).invoke(); } // Note, we cannot necessarily use ImmutableList for anything besides the empty li...
[ "public", "static", "Expression", "asList", "(", "Iterable", "<", "?", "extends", "Expression", ">", "items", ")", "{", "final", "ImmutableList", "<", "Expression", ">", "copy", "=", "ImmutableList", ".", "copyOf", "(", "items", ")", ";", "if", "(", "copy"...
Returns an expression that returns a new {@link ArrayList} containing all the given items.
[ "Returns", "an", "expression", "that", "returns", "a", "new", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java#L794-L814
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java
LdapConnection.searchByOperationalAttribute
public SearchResult searchByOperationalAttribute(String dn, String filter, List<String> inEntityTypes, List<String> propNames, String oprAttribute) throws WIMException { String inEntityType = null; List<String> supportedProps = propNames; if (inEntityTypes != null && inEntityTypes.size() > 0) { ...
java
public SearchResult searchByOperationalAttribute(String dn, String filter, List<String> inEntityTypes, List<String> propNames, String oprAttribute) throws WIMException { String inEntityType = null; List<String> supportedProps = propNames; if (inEntityTypes != null && inEntityTypes.size() > 0) { ...
[ "public", "SearchResult", "searchByOperationalAttribute", "(", "String", "dn", ",", "String", "filter", ",", "List", "<", "String", ">", "inEntityTypes", ",", "List", "<", "String", ">", "propNames", ",", "String", "oprAttribute", ")", "throws", "WIMException", ...
Search using operational attribute specified in the parameter. @param dn The DN to search on @param filter The LDAP filter for the search. @param inEntityTypes The entity types to search for. @param propNames The property names to return. @param oprAttribute The operational attribute. @return The search results or nul...
[ "Search", "using", "operational", "attribute", "specified", "in", "the", "parameter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java#L2066-L2094
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/JQMPage.java
JQMPage.prepareTransparentOpened
private static void prepareTransparentOpened(boolean add, String transparentPageId) { Element p = Document.get().getBody(); if (p != null) { String s = JQM4GWT_DLG_TRANSPARENT_OPENED_PREFIX + transparentPageId; if (add) { p.addClassName(JQM4GWT_DLG_TRANSPARENT_OPE...
java
private static void prepareTransparentOpened(boolean add, String transparentPageId) { Element p = Document.get().getBody(); if (p != null) { String s = JQM4GWT_DLG_TRANSPARENT_OPENED_PREFIX + transparentPageId; if (add) { p.addClassName(JQM4GWT_DLG_TRANSPARENT_OPE...
[ "private", "static", "void", "prepareTransparentOpened", "(", "boolean", "add", ",", "String", "transparentPageId", ")", "{", "Element", "p", "=", "Document", ".", "get", "(", ")", ".", "getBody", "(", ")", ";", "if", "(", "p", "!=", "null", ")", "{", ...
Needed mostly in case of page container surrounded by external panels, so these panels could be synchronously disabled/enabled when "modal" dialog shown by jqm application. <br> from afterShow till beforeHide.
[ "Needed", "mostly", "in", "case", "of", "page", "container", "surrounded", "by", "external", "panels", "so", "these", "panels", "could", "be", "synchronously", "disabled", "/", "enabled", "when", "modal", "dialog", "shown", "by", "jqm", "application", ".", "<b...
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/JQMPage.java#L498-L512
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/impl/xmlConfiguration/CacheConfigurationProviderImpl.java
CacheConfigurationProviderImpl.handleCollection
@SuppressWarnings("unchecked") private boolean handleCollection( final ConfigurationContext ctx, final Class<?> _type, final Object cfg, final ParsedConfiguration _parsedCfg) { String _containerName = _parsedCfg.getContainer(); Method m; try { m = cfg.getClass().getMethod(constructGe...
java
@SuppressWarnings("unchecked") private boolean handleCollection( final ConfigurationContext ctx, final Class<?> _type, final Object cfg, final ParsedConfiguration _parsedCfg) { String _containerName = _parsedCfg.getContainer(); Method m; try { m = cfg.getClass().getMethod(constructGe...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "boolean", "handleCollection", "(", "final", "ConfigurationContext", "ctx", ",", "final", "Class", "<", "?", ">", "_type", ",", "final", "Object", "cfg", ",", "final", "ParsedConfiguration", "_parsedCf...
Get appropriate collection e.g. {@link Cache2kConfiguration#getListeners()} create the bean and add it to the collection. @return True, if applied, false if there is no getter for a collection.
[ "Get", "appropriate", "collection", "e", ".", "g", ".", "{", "@link", "Cache2kConfiguration#getListeners", "()", "}", "create", "the", "bean", "and", "add", "it", "to", "the", "collection", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/impl/xmlConfiguration/CacheConfigurationProviderImpl.java#L343-L372
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java
SwaptionDataLattice.getValue
public double getValue(int maturityInMonths, int tenorInMonths, int moneynessBP, QuotingConvention convention, double displacement, AnalyticModel model) { DataKey key = new DataKey(maturityInMonths, tenorInMonths, moneynessBP); return convertToConvention(getValue(key), key, convention, displacement, quotingConven...
java
public double getValue(int maturityInMonths, int tenorInMonths, int moneynessBP, QuotingConvention convention, double displacement, AnalyticModel model) { DataKey key = new DataKey(maturityInMonths, tenorInMonths, moneynessBP); return convertToConvention(getValue(key), key, convention, displacement, quotingConven...
[ "public", "double", "getValue", "(", "int", "maturityInMonths", ",", "int", "tenorInMonths", ",", "int", "moneynessBP", ",", "QuotingConvention", "convention", ",", "double", "displacement", ",", "AnalyticModel", "model", ")", "{", "DataKey", "key", "=", "new", ...
Return the value in the given quoting convention. Conversion involving receiver premium assumes zero wide collar. @param maturityInMonths The maturity of the option as offset in months from the reference date. @param tenorInMonths The tenor of the swap as offset in months from the option maturity. @param moneynessBP T...
[ "Return", "the", "value", "in", "the", "given", "quoting", "convention", ".", "Conversion", "involving", "receiver", "premium", "assumes", "zero", "wide", "collar", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java#L630-L633
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.zremrangeByScore
@Override public Long zremrangeByScore(final byte[] key, final double min, final double max) { checkIsInMultiOrPipeline(); client.zremrangeByScore(key, min, max); return client.getIntegerReply(); }
java
@Override public Long zremrangeByScore(final byte[] key, final double min, final double max) { checkIsInMultiOrPipeline(); client.zremrangeByScore(key, min, max); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "zremrangeByScore", "(", "final", "byte", "[", "]", "key", ",", "final", "double", "min", ",", "final", "double", "max", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "zremrangeByScore", "(", "key", ...
Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). <p> <b>Time complexity:</b> <p> O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation @param key @param min @param m...
[ "Remove", "all", "the", "elements", "in", "the", "sorted", "set", "at", "key", "with", "a", "score", "between", "min", "and", "max", "(", "including", "elements", "with", "score", "equal", "to", "min", "or", "max", ")", ".", "<p", ">", "<b", ">", "Ti...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L2607-L2612
aaberg/sql2o
core/src/main/java/org/sql2o/Sql2o.java
Sql2o.withConnection
public void withConnection(StatementRunnable runnable, Object argument) { Connection connection = null; try{ connection = open(); runnable.run(connection, argument); } catch (Throwable t) { throw new Sql2oException("An error occurred while executing Statement...
java
public void withConnection(StatementRunnable runnable, Object argument) { Connection connection = null; try{ connection = open(); runnable.run(connection, argument); } catch (Throwable t) { throw new Sql2oException("An error occurred while executing Statement...
[ "public", "void", "withConnection", "(", "StatementRunnable", "runnable", ",", "Object", "argument", ")", "{", "Connection", "connection", "=", "null", ";", "try", "{", "connection", "=", "open", "(", ")", ";", "runnable", ".", "run", "(", "connection", ",",...
Invokes the run method on the {@link org.sql2o.StatementRunnableWithResult} instance. This method guarantees that the connection is closed properly, when either the run method completes or if an exception occurs. @param runnable @param argument
[ "Invokes", "the", "run", "method", "on", "the", "{" ]
train
https://github.com/aaberg/sql2o/blob/01d3490a6d2440cf60f973d23508ac4ed57a8e20/core/src/main/java/org/sql2o/Sql2o.java#L258-L271
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java
QrCodePositionPatternDetector.createPositionPatternGraph
private void createPositionPatternGraph() { // Add items to NN search nn.setPoints((List)positionPatterns.toList(),false); for (int i = 0; i < positionPatterns.size(); i++) { PositionPatternNode f = positionPatterns.get(i); // The QR code version specifies the number of "modules"/blocks across the marker...
java
private void createPositionPatternGraph() { // Add items to NN search nn.setPoints((List)positionPatterns.toList(),false); for (int i = 0; i < positionPatterns.size(); i++) { PositionPatternNode f = positionPatterns.get(i); // The QR code version specifies the number of "modules"/blocks across the marker...
[ "private", "void", "createPositionPatternGraph", "(", ")", "{", "// Add items to NN search", "nn", ".", "setPoints", "(", "(", "List", ")", "positionPatterns", ".", "toList", "(", ")", ",", "false", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "...
Connects together position patterns. For each square, finds all of its neighbors based on center distance. Then considers them for connections
[ "Connects", "together", "position", "patterns", ".", "For", "each", "square", "finds", "all", "of", "its", "neighbors", "based", "on", "center", "distance", ".", "Then", "considers", "them", "for", "connections" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java#L241-L269
Metatavu/edelphi
edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/resources/GoogleDocumentDAO.java
GoogleDocumentDAO.updateName
public GoogleDocument updateName(GoogleDocument googleDocument, String name, String urlName) { googleDocument.setName(name); googleDocument.setUrlName(urlName); getEntityManager().persist(googleDocument); return googleDocument; }
java
public GoogleDocument updateName(GoogleDocument googleDocument, String name, String urlName) { googleDocument.setName(name); googleDocument.setUrlName(urlName); getEntityManager().persist(googleDocument); return googleDocument; }
[ "public", "GoogleDocument", "updateName", "(", "GoogleDocument", "googleDocument", ",", "String", "name", ",", "String", "urlName", ")", "{", "googleDocument", ".", "setName", "(", "name", ")", ";", "googleDocument", ".", "setUrlName", "(", "urlName", ")", ";", ...
Updates GoogleDocument name. This method does not update lastModifier and lastModified fields and thus should be called only by system operations (e.g. scheduler) @param googleDocument GoogleDocument entity @param name new resource name @param urlName new resource urlName @return Updated GoogleDocument
[ "Updates", "GoogleDocument", "name", ".", "This", "method", "does", "not", "update", "lastModifier", "and", "lastModified", "fields", "and", "thus", "should", "be", "called", "only", "by", "system", "operations", "(", "e", ".", "g", ".", "scheduler", ")" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/resources/GoogleDocumentDAO.java#L72-L77
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableArray.java
MutableArray.insertDate
@NonNull @Override public MutableArray insertDate(int index, Date value) { return insertValue(index, value); }
java
@NonNull @Override public MutableArray insertDate(int index, Date value) { return insertValue(index, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableArray", "insertDate", "(", "int", "index", ",", "Date", "value", ")", "{", "return", "insertValue", "(", "index", ",", "value", ")", ";", "}" ]
Inserts a Date object at the given index. @param index the index. This value must not exceed the bounds of the array. @param value the Date object @return The self object
[ "Inserts", "a", "Date", "object", "at", "the", "given", "index", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableArray.java#L527-L531
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
BinaryString.keyValue
public BinaryString keyValue(byte split1, byte split2, BinaryString keyName) { ensureMaterialized(); if (keyName == null || keyName.getSizeInBytes() == 0) { return null; } if (inFirstSegment() && keyName.inFirstSegment()) { // position in byte int byteIdx = 0; // position of last split1 int lastS...
java
public BinaryString keyValue(byte split1, byte split2, BinaryString keyName) { ensureMaterialized(); if (keyName == null || keyName.getSizeInBytes() == 0) { return null; } if (inFirstSegment() && keyName.inFirstSegment()) { // position in byte int byteIdx = 0; // position of last split1 int lastS...
[ "public", "BinaryString", "keyValue", "(", "byte", "split1", ",", "byte", "split2", ",", "BinaryString", "keyName", ")", "{", "ensureMaterialized", "(", ")", ";", "if", "(", "keyName", "==", "null", "||", "keyName", ".", "getSizeInBytes", "(", ")", "==", "...
Parse target string as key-value string and return the value matches key name. If accept any null arguments, return null. example: keyvalue('k1=v1;k2=v2', ';', '=', 'k2') = 'v2' keyvalue('k1:v1,k2:v2', ',', ':', 'k3') = NULL @param split1 separator between key-value tuple. @param split2 separator between key and val...
[ "Parse", "target", "string", "as", "key", "-", "value", "string", "and", "return", "the", "value", "matches", "key", "name", ".", "If", "accept", "any", "null", "arguments", "return", "null", ".", "example", ":", "keyvalue", "(", "k1", "=", "v1", ";", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L936-L965
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java
Configuration.setIfUnset
public void setIfUnset(String name, String value) { if (get(name) == null) { set(name, value); } }
java
public void setIfUnset(String name, String value) { if (get(name) == null) { set(name, value); } }
[ "public", "void", "setIfUnset", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "get", "(", "name", ")", "==", "null", ")", "{", "set", "(", "name", ",", "value", ")", ";", "}", "}" ]
Sets a property if it is currently unset. @param name the property name @param value the new value
[ "Sets", "a", "property", "if", "it", "is", "currently", "unset", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java#L437-L441
rnorth/visible-assertions
src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java
VisibleAssertions.assertRoughlyEquals
public static void assertRoughlyEquals(String message, Double expected, Double actual, Double epsilon) { String expectedInQuotes = inQuotesIfNotNull(expected); String actualInQuotes = inQuotesIfNotNull(actual); if (areBothNull(expected, actual)) { pass(message); } else if (...
java
public static void assertRoughlyEquals(String message, Double expected, Double actual, Double epsilon) { String expectedInQuotes = inQuotesIfNotNull(expected); String actualInQuotes = inQuotesIfNotNull(actual); if (areBothNull(expected, actual)) { pass(message); } else if (...
[ "public", "static", "void", "assertRoughlyEquals", "(", "String", "message", ",", "Double", "expected", ",", "Double", "actual", ",", "Double", "epsilon", ")", "{", "String", "expectedInQuotes", "=", "inQuotesIfNotNull", "(", "expected", ")", ";", "String", "act...
Assert that an actual value is approximately equal to an expected value - determined by whether the difference between the two values is less than a provided epsilon value. <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be shown. @param message message to display alo...
[ "Assert", "that", "an", "actual", "value", "is", "approximately", "equal", "to", "an", "expected", "value", "-", "determined", "by", "whether", "the", "difference", "between", "the", "two", "values", "is", "less", "than", "a", "provided", "epsilon", "value", ...
train
https://github.com/rnorth/visible-assertions/blob/6d7a7724db40ac0e9f87279553f814b790310b3b/src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java#L212-L224
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java
UtilWavelet.borderInverseUpper
public static int borderInverseUpper( WlBorderCoef<?> desc , BorderIndex1D border, int dataLength ) { WlCoef inner = desc.getInnerCoefficients(); int borderSize = borderForwardUpper(inner,dataLength); borderSize += borderSize%2; WlCoef uu = borderSize > 0 ? inner : null; WlCoef ul = uu; WlCoef ll = inner;...
java
public static int borderInverseUpper( WlBorderCoef<?> desc , BorderIndex1D border, int dataLength ) { WlCoef inner = desc.getInnerCoefficients(); int borderSize = borderForwardUpper(inner,dataLength); borderSize += borderSize%2; WlCoef uu = borderSize > 0 ? inner : null; WlCoef ul = uu; WlCoef ll = inner;...
[ "public", "static", "int", "borderInverseUpper", "(", "WlBorderCoef", "<", "?", ">", "desc", ",", "BorderIndex1D", "border", ",", "int", "dataLength", ")", "{", "WlCoef", "inner", "=", "desc", ".", "getInnerCoefficients", "(", ")", ";", "int", "borderSize", ...
Returns the upper border (offset from image edge) for an inverse wavelet transform.
[ "Returns", "the", "upper", "border", "(", "offset", "from", "image", "edge", ")", "for", "an", "inverse", "wavelet", "transform", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java#L247-L274
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlInterface interf, PyAppendable it, IExtraLanguageGeneratorContext context) { generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(interf).toString(), interf.getName(), true, interf.getExtends(), getTypeBuilder().getDocumentation(interf), true, inte...
java
protected void _generate(SarlInterface interf, PyAppendable it, IExtraLanguageGeneratorContext context) { generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(interf).toString(), interf.getName(), true, interf.getExtends(), getTypeBuilder().getDocumentation(interf), true, inte...
[ "protected", "void", "_generate", "(", "SarlInterface", "interf", ",", "PyAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "generateTypeDeclaration", "(", "this", ".", "qualifiedNameProvider", ".", "getFullyQualifiedName", "(", "interf", ")...
Generate the given object. @param interf the interface. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L898-L905
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java
ASpatialDb.createSpatialIndex
public void createSpatialIndex( String tableName, String geomColumnName ) throws Exception { if (geomColumnName == null) { geomColumnName = "the_geom"; } String realColumnName = getProperColumnNameCase(tableName, geomColumnName); String realTableName = getProperTableNameCase(...
java
public void createSpatialIndex( String tableName, String geomColumnName ) throws Exception { if (geomColumnName == null) { geomColumnName = "the_geom"; } String realColumnName = getProperColumnNameCase(tableName, geomColumnName); String realTableName = getProperTableNameCase(...
[ "public", "void", "createSpatialIndex", "(", "String", "tableName", ",", "String", "geomColumnName", ")", "throws", "Exception", "{", "if", "(", "geomColumnName", "==", "null", ")", "{", "geomColumnName", "=", "\"the_geom\"", ";", "}", "String", "realColumnName", ...
Create a spatial index. @param tableName the table name. @param geomColumnName the geometry column name. @throws Exception
[ "Create", "a", "spatial", "index", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java#L165-L180
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java
FileUtilsV2_2.contentEquals
public static boolean contentEquals(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // two not existing files are equal return true; } if (file1.isDirectory() || file2....
java
public static boolean contentEquals(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // two not existing files are equal return true; } if (file1.isDirectory() || file2....
[ "public", "static", "boolean", "contentEquals", "(", "File", "file1", ",", "File", "file2", ")", "throws", "IOException", "{", "boolean", "file1Exists", "=", "file1", ".", "exists", "(", ")", ";", "if", "(", "file1Exists", "!=", "file2", ".", "exists", "("...
Compares the contents of two files to determine if they are equal or not. <p> This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of the contents. <p> Code origin: Avalon @param file1 the first file @param file2 the second fi...
[ "Compares", "the", "contents", "of", "two", "files", "to", "determine", "if", "they", "are", "equal", "or", "not", ".", "<p", ">", "This", "method", "checks", "to", "see", "if", "the", "two", "files", "are", "different", "lengths", "or", "if", "they", ...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java#L230-L267
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java
TaskTracker.reserveSlots
public void reserveSlots(TaskType taskType, JobInProgress job, int numSlots) { JobID jobId = job.getJobID(); if (taskType == TaskType.MAP) { if (jobForFallowMapSlot != null && !jobForFallowMapSlot.getJobID().equals(jobId)) { throw new RuntimeException(trackerName + " already has " + ...
java
public void reserveSlots(TaskType taskType, JobInProgress job, int numSlots) { JobID jobId = job.getJobID(); if (taskType == TaskType.MAP) { if (jobForFallowMapSlot != null && !jobForFallowMapSlot.getJobID().equals(jobId)) { throw new RuntimeException(trackerName + " already has " + ...
[ "public", "void", "reserveSlots", "(", "TaskType", "taskType", ",", "JobInProgress", "job", ",", "int", "numSlots", ")", "{", "JobID", "jobId", "=", "job", ".", "getJobID", "(", ")", ";", "if", "(", "taskType", "==", "TaskType", ".", "MAP", ")", "{", "...
Reserve specified number of slots for a given <code>job</code>. @param taskType {@link TaskType} of the task @param job the job for which slots on this <code>TaskTracker</code> are to be reserved @param numSlots number of slots to be reserved
[ "Reserve", "specified", "number", "of", "slots", "for", "a", "given", "<code", ">", "job<", "/", "code", ">", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java#L120-L149
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java
TransactionSignature.decodeFromBitcoin
public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding, boolean requireCanonicalSValue) throws SignatureDecodeException, VerificationException { // Bitcoin encoding is DER signature + sighash byte. if (requireCanonicalEncoding && !isEncodingCanoni...
java
public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding, boolean requireCanonicalSValue) throws SignatureDecodeException, VerificationException { // Bitcoin encoding is DER signature + sighash byte. if (requireCanonicalEncoding && !isEncodingCanoni...
[ "public", "static", "TransactionSignature", "decodeFromBitcoin", "(", "byte", "[", "]", "bytes", ",", "boolean", "requireCanonicalEncoding", ",", "boolean", "requireCanonicalSValue", ")", "throws", "SignatureDecodeException", ",", "VerificationException", "{", "// Bitcoin e...
Returns a decoded signature. @param requireCanonicalEncoding if the encoding of the signature must be canonical. @param requireCanonicalSValue if the S-value must be canonical (below half the order of the curve). @throws SignatureDecodeException if the signature is unparseable in some way. @throws VerificationExceptio...
[ "Returns", "a", "decoded", "signature", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java#L175-L187
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/SslUtils.java
SslUtils.trustAllHostnameVerifier
@Beta public static HostnameVerifier trustAllHostnameVerifier() { return new HostnameVerifier() { public boolean verify(String arg0, SSLSession arg1) { return true; } }; }
java
@Beta public static HostnameVerifier trustAllHostnameVerifier() { return new HostnameVerifier() { public boolean verify(String arg0, SSLSession arg1) { return true; } }; }
[ "@", "Beta", "public", "static", "HostnameVerifier", "trustAllHostnameVerifier", "(", ")", "{", "return", "new", "HostnameVerifier", "(", ")", "{", "public", "boolean", "verify", "(", "String", "arg0", ",", "SSLSession", "arg1", ")", "{", "return", "true", ";"...
{@link Beta} <br> Returns a verifier that trusts all host names. <p>Be careful! Disabling host name verification is dangerous and should only be done in testing environments.
[ "{", "@link", "Beta", "}", "<br", ">", "Returns", "a", "verifier", "that", "trusts", "all", "host", "names", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java#L148-L156
canoo/open-dolphin
subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java
DolphinServlet.createServerDolphin
protected DefaultServerDolphin createServerDolphin() { ServerModelStore modelStore = createServerModelStore(); ServerConnector connector = createServerConnector(modelStore, createCodec()); return new DefaultServerDolphin(modelStore, connector); }
java
protected DefaultServerDolphin createServerDolphin() { ServerModelStore modelStore = createServerModelStore(); ServerConnector connector = createServerConnector(modelStore, createCodec()); return new DefaultServerDolphin(modelStore, connector); }
[ "protected", "DefaultServerDolphin", "createServerDolphin", "(", ")", "{", "ServerModelStore", "modelStore", "=", "createServerModelStore", "(", ")", ";", "ServerConnector", "connector", "=", "createServerConnector", "(", "modelStore", ",", "createCodec", "(", ")", ")",...
Creates a new instance of {@code DefaultServerDolphin}. Subclasses may override this method to customize how this instance should be created. @return a newly created {@code DefaultServerDolphin}.
[ "Creates", "a", "new", "instance", "of", "{", "@code", "DefaultServerDolphin", "}", ".", "Subclasses", "may", "override", "this", "method", "to", "customize", "how", "this", "instance", "should", "be", "created", "." ]
train
https://github.com/canoo/open-dolphin/blob/50166defc3ef2de473d7a7246c32dc04304d80ef/subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java#L140-L144
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.addStandardHeaders
protected <T extends AbstractResource> void addStandardHeaders(URLConnection con, T resource) { con.setRequestProperty("User-Agent", userAgent); con.setRequestProperty("Accept", resource.getAcceptedTypes()); }
java
protected <T extends AbstractResource> void addStandardHeaders(URLConnection con, T resource) { con.setRequestProperty("User-Agent", userAgent); con.setRequestProperty("Accept", resource.getAcceptedTypes()); }
[ "protected", "<", "T", "extends", "AbstractResource", ">", "void", "addStandardHeaders", "(", "URLConnection", "con", ",", "T", "resource", ")", "{", "con", ".", "setRequestProperty", "(", "\"User-Agent\"", ",", "userAgent", ")", ";", "con", ".", "setRequestProp...
Add all standard headers (User-Agent, Accept) to the URLConnection.
[ "Add", "all", "standard", "headers", "(", "User", "-", "Agent", "Accept", ")", "to", "the", "URLConnection", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L412-L415
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java
HashtableOnDisk.put
public synchronized boolean put(Object key, byte[] value, int len, long expirationTime) throws IOException, EOFException, FileManagerException, ClassNotFoundException, HashtableOnDiskException { if (key == null) ...
java
public synchronized boolean put(Object key, byte[] value, int len, long expirationTime) throws IOException, EOFException, FileManagerException, ClassNotFoundException, HashtableOnDiskException { if (key == null) ...
[ "public", "synchronized", "boolean", "put", "(", "Object", "key", ",", "byte", "[", "]", "value", ",", "int", "len", ",", "long", "expirationTime", ")", "throws", "IOException", ",", "EOFException", ",", "FileManagerException", ",", "ClassNotFoundException", ","...
************************************************************************ Associates the object with the key and stores it. If an object already exists for this key it is replaced and the previous object discard. The object is assumed to have been "manually" serialized by the caller and will be written up to length "len...
[ "************************************************************************", "Associates", "the", "object", "with", "the", "key", "and", "stores", "it", ".", "If", "an", "object", "already", "exists", "for", "this", "key", "it", "is", "replaced", "and", "the", "previou...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java#L841-L854
SteelBridgeLabs/neo4j-gremlin-bolt
src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JGraph.java
Neo4JGraph.createIndex
public void createIndex(String label, String propertyName) { Objects.requireNonNull(label, "label cannot be null"); Objects.requireNonNull(propertyName, "propertyName cannot be null"); // get current session Neo4JSession session = currentSession(); // transaction should be ready ...
java
public void createIndex(String label, String propertyName) { Objects.requireNonNull(label, "label cannot be null"); Objects.requireNonNull(propertyName, "propertyName cannot be null"); // get current session Neo4JSession session = currentSession(); // transaction should be ready ...
[ "public", "void", "createIndex", "(", "String", "label", ",", "String", "propertyName", ")", "{", "Objects", ".", "requireNonNull", "(", "label", ",", "\"label cannot be null\"", ")", ";", "Objects", ".", "requireNonNull", "(", "propertyName", ",", "\"propertyName...
Creates an index in the neo4j database. @param label The label associated with the Index. @param propertyName The property name associated with the Index.
[ "Creates", "an", "index", "in", "the", "neo4j", "database", "." ]
train
https://github.com/SteelBridgeLabs/neo4j-gremlin-bolt/blob/df3ab429e0c83affae6cd43d41edd90de80c032e/src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JGraph.java#L358-L367
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteUtil.java
AutocompleteUtil.getCombinedForAddSection
public static String getCombinedForAddSection(final String sectionName, final Autocompleteable component) { if (Util.empty(sectionName)) { throw new IllegalArgumentException("Auto-fill section names must not be empty."); } if (component == null) { return getNamedSection(sectionName); } if (component.isA...
java
public static String getCombinedForAddSection(final String sectionName, final Autocompleteable component) { if (Util.empty(sectionName)) { throw new IllegalArgumentException("Auto-fill section names must not be empty."); } if (component == null) { return getNamedSection(sectionName); } if (component.isA...
[ "public", "static", "String", "getCombinedForAddSection", "(", "final", "String", "sectionName", ",", "final", "Autocompleteable", "component", ")", "{", "if", "(", "Util", ".", "empty", "(", "sectionName", ")", ")", "{", "throw", "new", "IllegalArgumentException"...
Helper to reduce typing in implementations of {@link Autocompleteable}. @param sectionName the name of the auto-fill section to add to the component's {@code autocomplete} attribute @param component the component being modified @return a value for the {@code autocomplete} attribute which is pre-pended by the formatted ...
[ "Helper", "to", "reduce", "typing", "in", "implementations", "of", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteUtil.java#L171-L184
Chorus-bdd/Chorus
interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/TagExpressionEvaluator.java
TagExpressionEvaluator.checkSimpleExpression
private boolean checkSimpleExpression(String tagExpression, List<String> scenarioTags) { Set<String> expressionTags = extractTagsFromSimpleExpression(tagExpression); for (String expressionTag : expressionTags) { if (expressionTag.startsWith("@")) { if (!scenarioTags.contains...
java
private boolean checkSimpleExpression(String tagExpression, List<String> scenarioTags) { Set<String> expressionTags = extractTagsFromSimpleExpression(tagExpression); for (String expressionTag : expressionTags) { if (expressionTag.startsWith("@")) { if (!scenarioTags.contains...
[ "private", "boolean", "checkSimpleExpression", "(", "String", "tagExpression", ",", "List", "<", "String", ">", "scenarioTags", ")", "{", "Set", "<", "String", ">", "expressionTags", "=", "extractTagsFromSimpleExpression", "(", "tagExpression", ")", ";", "for", "(...
Checks a simple expression (i.e. one that does not contain the or '|' operator) @param tagExpression a simple tag expression @param scenarioTags tags present on a scenario @return true iff the scenarion should be executed
[ "Checks", "a", "simple", "expression", "(", "i", ".", "e", ".", "one", "that", "does", "not", "contain", "the", "or", "|", "operator", ")" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/TagExpressionEvaluator.java#L72-L94
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetGroupsInner.java
JobTargetGroupsInner.createOrUpdateAsync
public Observable<JobTargetGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, List<JobTarget> members) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, members).map(new Func1<Servi...
java
public Observable<JobTargetGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, List<JobTarget> members) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, members).map(new Func1<Servi...
[ "public", "Observable", "<", "JobTargetGroupInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "targetGroupName", ",", "List", "<", "JobTarget", ">", "members", ")", "{",...
Creates or updates a target group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param targetGroupName The name of...
[ "Creates", "or", "updates", "a", "target", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetGroupsInner.java#L362-L369
abel533/EasyXls
src/main/java/com/github/abel533/easyxls/EasyXls.java
EasyXls.list2Xls
public static boolean list2Xls(List<?> list, String xmlPath, String filePath, String fileName) throws Exception { return XlsUtil.list2Xls(list, xmlPath, filePath, fileName); }
java
public static boolean list2Xls(List<?> list, String xmlPath, String filePath, String fileName) throws Exception { return XlsUtil.list2Xls(list, xmlPath, filePath, fileName); }
[ "public", "static", "boolean", "list2Xls", "(", "List", "<", "?", ">", "list", ",", "String", "xmlPath", ",", "String", "filePath", ",", "String", "fileName", ")", "throws", "Exception", "{", "return", "XlsUtil", ".", "list2Xls", "(", "list", ",", "xmlPath...
导出list对象到excel @param list 导出的list @param xmlPath xml完整路径 @param filePath 保存xls路径 @param fileName 保存xls文件名 @return 处理结果,true成功,false失败 @throws Exception
[ "导出list对象到excel" ]
train
https://github.com/abel533/EasyXls/blob/f73be23745c2180d7c0b8f0a510e72e61cc37d5d/src/main/java/com/github/abel533/easyxls/EasyXls.java#L82-L84
huangp/entityunit
src/main/java/com/github/huangp/entityunit/maker/PreferredValueMakersRegistry.java
PreferredValueMakersRegistry.addFieldOrPropertyMaker
public PreferredValueMakersRegistry addFieldOrPropertyMaker(Class ownerType, String propertyName, Maker<?> maker) { Preconditions.checkNotNull(ownerType); Preconditions.checkNotNull(propertyName); makers.put(Matchers.equalTo(String.format(Settable.FULL_NAME_FORMAT, ownerType.getName(), propertyN...
java
public PreferredValueMakersRegistry addFieldOrPropertyMaker(Class ownerType, String propertyName, Maker<?> maker) { Preconditions.checkNotNull(ownerType); Preconditions.checkNotNull(propertyName); makers.put(Matchers.equalTo(String.format(Settable.FULL_NAME_FORMAT, ownerType.getName(), propertyN...
[ "public", "PreferredValueMakersRegistry", "addFieldOrPropertyMaker", "(", "Class", "ownerType", ",", "String", "propertyName", ",", "Maker", "<", "?", ">", "maker", ")", "{", "Preconditions", ".", "checkNotNull", "(", "ownerType", ")", ";", "Preconditions", ".", "...
Add a field/property maker to a class type. i.e. with: <pre> {@code Class Person { String name } } </pre> You could define a custom maker for name field as (Person.class, "name", myNameMaker) @param ownerType the class that owns the field. @param propertyName field or property name @param maker custom maker @return t...
[ "Add", "a", "field", "/", "property", "maker", "to", "a", "class", "type", ".", "i", ".", "e", ".", "with", ":", "<pre", ">", "{", "@code" ]
train
https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/maker/PreferredValueMakersRegistry.java#L74-L79
FDMediagroep/hamcrest-jsoup
src/main/java/nl/fd/hamcrest/jsoup/ElementWithAttribute.java
ElementWithAttribute.hasAttribute
@Factory public static Matcher<Element> hasAttribute(final String attributeName, final Matcher<? super String> attributeValueMatcher) { return new ElementWithAttribute(attributeName, attributeValueMatcher); }
java
@Factory public static Matcher<Element> hasAttribute(final String attributeName, final Matcher<? super String> attributeValueMatcher) { return new ElementWithAttribute(attributeName, attributeValueMatcher); }
[ "@", "Factory", "public", "static", "Matcher", "<", "Element", ">", "hasAttribute", "(", "final", "String", "attributeName", ",", "final", "Matcher", "<", "?", "super", "String", ">", "attributeValueMatcher", ")", "{", "return", "new", "ElementWithAttribute", "(...
Creates a {@link org.hamcrest.Matcher} for a JSoup {@link org.jsoup.nodes.Element} with the given {@code expectedValue} for the given {@code attributeName}. @param attributeName The attribute name whose value to check @param attributeValueMatcher A matcher for the attribute value @return a {@link org.hamcrest....
[ "Creates", "a", "{", "@link", "org", ".", "hamcrest", ".", "Matcher", "}", "for", "a", "JSoup", "{", "@link", "org", ".", "jsoup", ".", "nodes", ".", "Element", "}", "with", "the", "given", "{", "@code", "expectedValue", "}", "for", "the", "given", "...
train
https://github.com/FDMediagroep/hamcrest-jsoup/blob/b7152dac6f834e40117fb7cfdd3149a268d95f7b/src/main/java/nl/fd/hamcrest/jsoup/ElementWithAttribute.java#L70-L73
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipAssert.java
SipAssert.responseReceived
public static boolean responseReceived(int statusCode, MessageListener messageListener) { ArrayList<SipResponse> responses = messageListener.getAllReceivedResponses(); for (SipResponse r : responses) { if (statusCode == r.getStatusCode()) { return true; } } return false; ...
java
public static boolean responseReceived(int statusCode, MessageListener messageListener) { ArrayList<SipResponse> responses = messageListener.getAllReceivedResponses(); for (SipResponse r : responses) { if (statusCode == r.getStatusCode()) { return true; } } return false; ...
[ "public", "static", "boolean", "responseReceived", "(", "int", "statusCode", ",", "MessageListener", "messageListener", ")", "{", "ArrayList", "<", "SipResponse", ">", "responses", "=", "messageListener", ".", "getAllReceivedResponses", "(", ")", ";", "for", "(", ...
Check the given message listener object received a response with the indicated status code. @param statusCode the code we want to find @param messageListener the {@link MessageListener} we want to check @return true if a received response matches the given statusCode
[ "Check", "the", "given", "message", "listener", "object", "received", "a", "response", "with", "the", "indicated", "status", "code", "." ]
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipAssert.java#L303-L313
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.configToProperties
public static Properties configToProperties(Config config, Optional<String> prefix) { Properties properties = new Properties(); if (config != null) { Config resolvedConfig = config.resolve(); for (Map.Entry<String, ConfigValue> entry : resolvedConfig.entrySet()) { if (!prefix.isPresent() || ...
java
public static Properties configToProperties(Config config, Optional<String> prefix) { Properties properties = new Properties(); if (config != null) { Config resolvedConfig = config.resolve(); for (Map.Entry<String, ConfigValue> entry : resolvedConfig.entrySet()) { if (!prefix.isPresent() || ...
[ "public", "static", "Properties", "configToProperties", "(", "Config", "config", ",", "Optional", "<", "String", ">", "prefix", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "if", "(", "config", "!=", "null", ")", "{", "Con...
Convert a given {@link Config} instance to a {@link Properties} instance. @param config the given {@link Config} instance @param prefix an optional prefix; if present, only properties whose name starts with the prefix will be returned. @return a {@link Properties} instance
[ "Convert", "a", "given", "{", "@link", "Config", "}", "instance", "to", "a", "{", "@link", "Properties", "}", "instance", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L99-L112
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionsInner.java
WorkflowRunActionsInner.getAsync
public Observable<WorkflowRunActionInner> getAsync(String resourceGroupName, String workflowName, String runName, String actionName) { return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<WorkflowRunActionInner>, WorkflowRunActionInner>() { ...
java
public Observable<WorkflowRunActionInner> getAsync(String resourceGroupName, String workflowName, String runName, String actionName) { return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<WorkflowRunActionInner>, WorkflowRunActionInner>() { ...
[ "public", "Observable", "<", "WorkflowRunActionInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "String", "runName", ",", "String", "actionName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName",...
Gets a workflow run action. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @param actionName The workflow action name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the WorkflowRunActio...
[ "Gets", "a", "workflow", "run", "action", "." ]
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/WorkflowRunActionsInner.java#L387-L394
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WConfirmationButtonExample.java
WConfirmationButtonExample.addAjaxExample
private void addAjaxExample() { add(new WHeading(HeadingLevel.H2, "Confirm as ajax trigger")); final String before = "Before"; final String after = "After"; final WText ajaxContent = new WText("Before"); final WPanel target = new WPanel(WPanel.Type.BOX); add(target); target.add(ajaxContent); WButton c...
java
private void addAjaxExample() { add(new WHeading(HeadingLevel.H2, "Confirm as ajax trigger")); final String before = "Before"; final String after = "After"; final WText ajaxContent = new WText("Before"); final WPanel target = new WPanel(WPanel.Type.BOX); add(target); target.add(ajaxContent); WButton c...
[ "private", "void", "addAjaxExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H2", ",", "\"Confirm as ajax trigger\"", ")", ")", ";", "final", "String", "before", "=", "\"Before\"", ";", "final", "String", "after", "=", "\"Aft...
This is used to reproduce a WComponents bug condition to make sure we do not re-create it once it is fixed. See https://github.com/BorderTech/wcomponents/issues/1266.
[ "This", "is", "used", "to", "reproduce", "a", "WComponents", "bug", "condition", "to", "make", "sure", "we", "do", "not", "re", "-", "create", "it", "once", "it", "is", "fixed", ".", "See", "https", ":", "//", "github", ".", "com", "/", "BorderTech", ...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WConfirmationButtonExample.java#L87-L107
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createRelationMemberTable
public static PreparedStatement createRelationMemberTable(Connection connection, String relationMemberTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(relationMemberTable); sb.a...
java
public static PreparedStatement createRelationMemberTable(Connection connection, String relationMemberTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(relationMemberTable); sb.a...
[ "public", "static", "PreparedStatement", "createRelationMemberTable", "(", "Connection", "connection", ",", "String", "relationMemberTable", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", ...
Store all relation members @param connection @param relationMemberTable @return @throws SQLException
[ "Store", "all", "relation", "members" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L308-L316
looly/hutool
hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.get
public <T> Entity get(String field, T value) throws SQLException { return this.get(Entity.create(tableName).set(field, value)); }
java
public <T> Entity get(String field, T value) throws SQLException { return this.get(Entity.create(tableName).set(field, value)); }
[ "public", "<", "T", ">", "Entity", "get", "(", "String", "field", ",", "T", "value", ")", "throws", "SQLException", "{", "return", "this", ".", "get", "(", "Entity", ".", "create", "(", "tableName", ")", ".", "set", "(", "field", ",", "value", ")", ...
根据某个字段(最好是唯一字段)查询单个记录<br> 当有多条返回时,只显示查询到的第一条 @param <T> 字段值类型 @param field 字段名 @param value 字段值 @return 记录 @throws SQLException SQL执行异常
[ "根据某个字段(最好是唯一字段)查询单个记录<br", ">", "当有多条返回时,只显示查询到的第一条" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L232-L234
tvesalainen/util
util/src/main/java/org/vesalainen/util/concurrent/CachedScheduledThreadPool.java
CachedScheduledThreadPool.iterateAtFixedRate
public ScheduledFuture<?> iterateAtFixedRate(long initialDelay, long period, TimeUnit unit, Collection<Runnable> commands) { return iterateAtFixedRate(initialDelay, period, unit, commands.iterator()); }
java
public ScheduledFuture<?> iterateAtFixedRate(long initialDelay, long period, TimeUnit unit, Collection<Runnable> commands) { return iterateAtFixedRate(initialDelay, period, unit, commands.iterator()); }
[ "public", "ScheduledFuture", "<", "?", ">", "iterateAtFixedRate", "(", "long", "initialDelay", ",", "long", "period", ",", "TimeUnit", "unit", ",", "Collection", "<", "Runnable", ">", "commands", ")", "{", "return", "iterateAtFixedRate", "(", "initialDelay", ","...
After initialDelay executes commands using collections iterator until either iterator has no more commands or command throws exception. @param initialDelay @param period @param unit @param commands @return @see java.util.concurrent.ScheduledThreadPoolExecutor#scheduleAtFixedDelay(java.lang.Runnable, long, long, java.ut...
[ "After", "initialDelay", "executes", "commands", "using", "collections", "iterator", "until", "either", "iterator", "has", "no", "more", "commands", "or", "command", "throws", "exception", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/CachedScheduledThreadPool.java#L206-L209
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java
Operations.createWriteAttributeOperation
public static ModelNode createWriteAttributeOperation(PathAddress address, String name, ModelNode value) { ModelNode operation = createAttributeOperation(ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION, address, name); operation.get(ModelDescriptionConstants.VALUE).set(value); return operati...
java
public static ModelNode createWriteAttributeOperation(PathAddress address, String name, ModelNode value) { ModelNode operation = createAttributeOperation(ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION, address, name); operation.get(ModelDescriptionConstants.VALUE).set(value); return operati...
[ "public", "static", "ModelNode", "createWriteAttributeOperation", "(", "PathAddress", "address", ",", "String", "name", ",", "ModelNode", "value", ")", "{", "ModelNode", "operation", "=", "createAttributeOperation", "(", "ModelDescriptionConstants", ".", "WRITE_ATTRIBUTE_...
Creates a write-attribute operation using the specified address, namem and value. @param address a resource path @param name an attribute name @param value an attribute value @return a write-attribute operation
[ "Creates", "a", "write", "-", "attribute", "operation", "using", "the", "specified", "address", "namem", "and", "value", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java#L117-L121
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/NodeSet.java
NodeSet.matchRegexOrEquals
public static boolean matchRegexOrEquals(final String inputSelector, final String item) { //see if inputSelector is wrapped in '/' chars String testregex = inputSelector; if (testregex.length()>=2 && testregex.indexOf('/') == 0 && testregex.lastIndexOf('/') == testregex.length() - 1) { ...
java
public static boolean matchRegexOrEquals(final String inputSelector, final String item) { //see if inputSelector is wrapped in '/' chars String testregex = inputSelector; if (testregex.length()>=2 && testregex.indexOf('/') == 0 && testregex.lastIndexOf('/') == testregex.length() - 1) { ...
[ "public", "static", "boolean", "matchRegexOrEquals", "(", "final", "String", "inputSelector", ",", "final", "String", "item", ")", "{", "//see if inputSelector is wrapped in '/' chars", "String", "testregex", "=", "inputSelector", ";", "if", "(", "testregex", ".", "le...
Tests whether the selector string matches the item, in three possible ways: first, if the selector looks like: "/.../" then it the outer '/' chars are removed and it is treated as a regular expression *only* and PatternSyntaxExceptions are not caught. Otherwise, it is treated as a regular expression and any PatternSyn...
[ "Tests", "whether", "the", "selector", "string", "matches", "the", "item", "in", "three", "possible", "ways", ":", "first", "if", "the", "selector", "looks", "like", ":", "/", "...", "/", "then", "it", "the", "outer", "/", "chars", "are", "removed", "and...
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/NodeSet.java#L359-L373
OpenHFT/Chronicle-Map
src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java
ThreadLocalState.lockContextLocally
public boolean lockContextLocally(ChronicleHash<?, ?, ?, ?> hash) { // hash().isOpen() check guarantees no starvation of a thread calling chMap.close() and // trying to close this context by closeContext() method below, while the thread owning this // context frequently locks and unlocks it (e. ...
java
public boolean lockContextLocally(ChronicleHash<?, ?, ?, ?> hash) { // hash().isOpen() check guarantees no starvation of a thread calling chMap.close() and // trying to close this context by closeContext() method below, while the thread owning this // context frequently locks and unlocks it (e. ...
[ "public", "boolean", "lockContextLocally", "(", "ChronicleHash", "<", "?", ",", "?", ",", "?", ",", "?", ">", "hash", ")", "{", "// hash().isOpen() check guarantees no starvation of a thread calling chMap.close() and", "// trying to close this context by closeContext() method bel...
Returns {@code true} if this is the outer context lock in this thread, {@code false} if this is a nested context.
[ "Returns", "{" ]
train
https://github.com/OpenHFT/Chronicle-Map/blob/0b09733cc96302f96be4394a261699eeb021fe37/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java#L55-L72
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.isPointNearMarker
public static boolean isPointNearMarker(LatLng point, MarkerOptions shapeMarker, double tolerance) { return isPointNearPoint(point, shapeMarker.getPosition(), tolerance); }
java
public static boolean isPointNearMarker(LatLng point, MarkerOptions shapeMarker, double tolerance) { return isPointNearPoint(point, shapeMarker.getPosition(), tolerance); }
[ "public", "static", "boolean", "isPointNearMarker", "(", "LatLng", "point", ",", "MarkerOptions", "shapeMarker", ",", "double", "tolerance", ")", "{", "return", "isPointNearPoint", "(", "point", ",", "shapeMarker", ".", "getPosition", "(", ")", ",", "tolerance", ...
Is the point near the shape marker @param point point @param shapeMarker shape marker @param tolerance distance tolerance @return true if near
[ "Is", "the", "point", "near", "the", "shape", "marker" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L281-L283
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassTitlePane.java
SeaGlassTitlePane.getTitle
private String getTitle(String text, FontMetrics fm, int availTextWidth) { return SwingUtilities2.clipStringIfNecessary(rootPane, fm, text, availTextWidth); }
java
private String getTitle(String text, FontMetrics fm, int availTextWidth) { return SwingUtilities2.clipStringIfNecessary(rootPane, fm, text, availTextWidth); }
[ "private", "String", "getTitle", "(", "String", "text", ",", "FontMetrics", "fm", ",", "int", "availTextWidth", ")", "{", "return", "SwingUtilities2", ".", "clipStringIfNecessary", "(", "rootPane", ",", "fm", ",", "text", ",", "availTextWidth", ")", ";", "}" ]
Get the title text, clipped if necessary. @param text the title text. @param fm the font metrics to compute size with. @param availTextWidth the available space to display the title in. @return the text, clipped to fit the available space.
[ "Get", "the", "title", "text", "clipped", "if", "necessary", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassTitlePane.java#L762-L764
EdwardRaff/JSAT
JSAT/src/jsat/linear/solvers/ConjugateGradient.java
ConjugateGradient.solveCGNR
public static Vec solveCGNR(double eps, Matrix A, Vec x, Vec b) { if(A.rows() != b.length()) throw new ArithmeticException("Dimensions do not agree for Matrix A and Vector b"); else if(A.cols() != x.length()) throw new ArithmeticException("Dimensions do not agree for Matrix A...
java
public static Vec solveCGNR(double eps, Matrix A, Vec x, Vec b) { if(A.rows() != b.length()) throw new ArithmeticException("Dimensions do not agree for Matrix A and Vector b"); else if(A.cols() != x.length()) throw new ArithmeticException("Dimensions do not agree for Matrix A...
[ "public", "static", "Vec", "solveCGNR", "(", "double", "eps", ",", "Matrix", "A", ",", "Vec", "x", ",", "Vec", "b", ")", "{", "if", "(", "A", ".", "rows", "(", ")", "!=", "b", ".", "length", "(", ")", ")", "throw", "new", "ArithmeticException", "...
Uses the Conjugate Gradient method to compute the least squares solution to a system of linear equations.<br> Computes the least squares solution to A x = b. Where A is an m x n matrix and b is a vector of length m and x is a vector of length n <br><br> NOTE: Unlike {@link #solve(double, jsat.linear.Matrix, jsat.linea...
[ "Uses", "the", "Conjugate", "Gradient", "method", "to", "compute", "the", "least", "squares", "solution", "to", "a", "system", "of", "linear", "equations", ".", "<br", ">", "Computes", "the", "least", "squares", "solution", "to", "A", "x", "=", "b", ".", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/solvers/ConjugateGradient.java#L167-L180
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java
VariantMetadataManager.addFile
public void addFile(String filename, VCFHeader vcfHeader, String studyId) { // sanity check if (StringUtils.isEmpty(filename)) { logger.error("VCF filename is empty or null: '{}'", filename); return; } if (vcfHeader == null) { logger.error("VCF header ...
java
public void addFile(String filename, VCFHeader vcfHeader, String studyId) { // sanity check if (StringUtils.isEmpty(filename)) { logger.error("VCF filename is empty or null: '{}'", filename); return; } if (vcfHeader == null) { logger.error("VCF header ...
[ "public", "void", "addFile", "(", "String", "filename", ",", "VCFHeader", "vcfHeader", ",", "String", "studyId", ")", "{", "// sanity check", "if", "(", "StringUtils", ".", "isEmpty", "(", "filename", ")", ")", "{", "logger", ".", "error", "(", "\"VCF filena...
Add a variant file metadata (from VCF file and header) to a given variant study metadata (from study ID). @param filename VCF filename (as an ID) @param vcfHeader VCF header @param studyId Study ID
[ "Add", "a", "variant", "file", "metadata", "(", "from", "VCF", "file", "and", "header", ")", "to", "a", "given", "variant", "study", "metadata", "(", "from", "study", "ID", ")", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L258-L275
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/activities/TypedVector.java
TypedVector.insertElementAt
@Override public void insertElementAt(E obj, int index) { int idx = getRealIndex(index); super.insertElementAt(obj, idx); }
java
@Override public void insertElementAt(E obj, int index) { int idx = getRealIndex(index); super.insertElementAt(obj, idx); }
[ "@", "Override", "public", "void", "insertElementAt", "(", "E", "obj", ",", "int", "index", ")", "{", "int", "idx", "=", "getRealIndex", "(", "index", ")", ";", "super", ".", "insertElementAt", "(", "obj", ",", "idx", ")", ";", "}" ]
Inserts the specified object as a component in this vector at the specified index. @param obj the element to insert. @param index the index at which the element should be inserted; it can be a positive number, or a negative number that is smaller than the size of the vector; see {@link #getRealIndex(int)}. @see java.u...
[ "Inserts", "the", "specified", "object", "as", "a", "component", "in", "this", "vector", "at", "the", "specified", "index", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/activities/TypedVector.java#L167-L171
bazaarvoice/curator-extensions
recipes/src/main/java/com/bazaarvoice/curator/recipes/leader/LeaderService.java
LeaderService.listenTo
private Service listenTo(Service delegate) { delegate.addListener(new Listener() { @Override public void starting() { // Do nothing } @Override public void running() { // Do nothing } @Override ...
java
private Service listenTo(Service delegate) { delegate.addListener(new Listener() { @Override public void starting() { // Do nothing } @Override public void running() { // Do nothing } @Override ...
[ "private", "Service", "listenTo", "(", "Service", "delegate", ")", "{", "delegate", ".", "addListener", "(", "new", "Listener", "(", ")", "{", "@", "Override", "public", "void", "starting", "(", ")", "{", "// Do nothing", "}", "@", "Override", "public", "v...
Release leadership when the service terminates (normally or abnormally).
[ "Release", "leadership", "when", "the", "service", "terminates", "(", "normally", "or", "abnormally", ")", "." ]
train
https://github.com/bazaarvoice/curator-extensions/blob/eb1e1b478f1ae6aed602bb5d5cb481277203004e/recipes/src/main/java/com/bazaarvoice/curator/recipes/leader/LeaderService.java#L294-L322
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.getURL
public String getURL(Class<? extends WebPage> clazz, Object param) throws IOException, SQLException { WebPage page=WebPage.getWebPage(sourcePage.getServletContext(), clazz, param); return getURL(page, param); }
java
public String getURL(Class<? extends WebPage> clazz, Object param) throws IOException, SQLException { WebPage page=WebPage.getWebPage(sourcePage.getServletContext(), clazz, param); return getURL(page, param); }
[ "public", "String", "getURL", "(", "Class", "<", "?", "extends", "WebPage", ">", "clazz", ",", "Object", "param", ")", "throws", "IOException", ",", "SQLException", "{", "WebPage", "page", "=", "WebPage", ".", "getWebPage", "(", "sourcePage", ".", "getServle...
Gets the context-relative URL to a web page. Parameters should already be URL encoded but not yet XML encoded.
[ "Gets", "the", "context", "-", "relative", "URL", "to", "a", "web", "page", ".", "Parameters", "should", "already", "be", "URL", "encoded", "but", "not", "yet", "XML", "encoded", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L448-L451
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/codec/JBIG2Image.java
JBIG2Image.getJbig2Image
public static Image getJbig2Image(RandomAccessFileOrArray ra, int page) { if (page < 1) throw new IllegalArgumentException("The page number must be >= 1."); try { JBIG2SegmentReader sr = new JBIG2SegmentReader(ra); sr.read(); JBIG2SegmentReader.JBIG2Page p = sr.getPage(page); Imag...
java
public static Image getJbig2Image(RandomAccessFileOrArray ra, int page) { if (page < 1) throw new IllegalArgumentException("The page number must be >= 1."); try { JBIG2SegmentReader sr = new JBIG2SegmentReader(ra); sr.read(); JBIG2SegmentReader.JBIG2Page p = sr.getPage(page); Imag...
[ "public", "static", "Image", "getJbig2Image", "(", "RandomAccessFileOrArray", "ra", ",", "int", "page", ")", "{", "if", "(", "page", "<", "1", ")", "throw", "new", "IllegalArgumentException", "(", "\"The page number must be >= 1.\"", ")", ";", "try", "{", "JBIG2...
returns an Image representing the given page. @param ra the file or array containing the image @param page the page number of the image @return an Image object
[ "returns", "an", "Image", "representing", "the", "given", "page", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/codec/JBIG2Image.java#L87-L100
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_mailingList_name_moderator_email_GET
public OvhModerator domain_mailingList_name_moderator_email_GET(String domain, String name, String email) throws IOException { String qPath = "/email/domain/{domain}/mailingList/{name}/moderator/{email}"; StringBuilder sb = path(qPath, domain, name, email); String resp = exec(qPath, "GET", sb.toString(), null); ...
java
public OvhModerator domain_mailingList_name_moderator_email_GET(String domain, String name, String email) throws IOException { String qPath = "/email/domain/{domain}/mailingList/{name}/moderator/{email}"; StringBuilder sb = path(qPath, domain, name, email); String resp = exec(qPath, "GET", sb.toString(), null); ...
[ "public", "OvhModerator", "domain_mailingList_name_moderator_email_GET", "(", "String", "domain", ",", "String", "name", ",", "String", "email", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/mailingList/{name}/moderator/{email}\"", ";", ...
Get this object properties REST: GET /email/domain/{domain}/mailingList/{name}/moderator/{email} @param domain [required] Name of your domain name @param name [required] Name of mailing list @param email [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1447-L1452
undertow-io/undertow
core/src/main/java/io/undertow/util/DateUtils.java
DateUtils.handleIfModifiedSince
public static boolean handleIfModifiedSince(final HttpServerExchange exchange, final Date lastModified) { return handleIfModifiedSince(exchange.getRequestHeaders().getFirst(Headers.IF_MODIFIED_SINCE), lastModified); }
java
public static boolean handleIfModifiedSince(final HttpServerExchange exchange, final Date lastModified) { return handleIfModifiedSince(exchange.getRequestHeaders().getFirst(Headers.IF_MODIFIED_SINCE), lastModified); }
[ "public", "static", "boolean", "handleIfModifiedSince", "(", "final", "HttpServerExchange", "exchange", ",", "final", "Date", "lastModified", ")", "{", "return", "handleIfModifiedSince", "(", "exchange", ".", "getRequestHeaders", "(", ")", ".", "getFirst", "(", "Hea...
Handles the if-modified-since header. returns true if the request should proceed, false otherwise @param exchange the exchange @param lastModified The last modified date @return
[ "Handles", "the", "if", "-", "modified", "-", "since", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/DateUtils.java#L180-L182
joniles/mpxj
src/main/java/net/sf/mpxj/Resource.java
Resource.setText
public void setText(int index, String value) { set(selectField(ResourceFieldLists.CUSTOM_TEXT, index), value); }
java
public void setText(int index, String value) { set(selectField(ResourceFieldLists.CUSTOM_TEXT, index), value); }
[ "public", "void", "setText", "(", "int", "index", ",", "String", "value", ")", "{", "set", "(", "selectField", "(", "ResourceFieldLists", ".", "CUSTOM_TEXT", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set a text value. @param index text index (1-30) @param value text value
[ "Set", "a", "text", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L1470-L1473
akquinet/androlog
androlog/src/main/java/de/akquinet/android/androlog/Log.java
Log.wtf
public static int wtf(String tag, String msg) { collectLogEntry(Constants.ASSERT, tag, msg, null); if (isLoggable(tag, Constants.ASSERT)) { if (useWTF) { try { return (Integer) wtfTagMessageMethod.invoke(null, new Object[] { tag...
java
public static int wtf(String tag, String msg) { collectLogEntry(Constants.ASSERT, tag, msg, null); if (isLoggable(tag, Constants.ASSERT)) { if (useWTF) { try { return (Integer) wtfTagMessageMethod.invoke(null, new Object[] { tag...
[ "public", "static", "int", "wtf", "(", "String", "tag", ",", "String", "msg", ")", "{", "collectLogEntry", "(", "Constants", ".", "ASSERT", ",", "tag", ",", "msg", ",", "null", ")", ";", "if", "(", "isLoggable", "(", "tag", ",", "Constants", ".", "AS...
What a Terrible Failure: Report a condition that should never happen. The error will always be logged at level Constants.ASSERT despite the logging is disabled. Depending on system configuration, and on Android 2.2+, a report may be added to the DropBoxManager and/or the process may be terminated immediately with an er...
[ "What", "a", "Terrible", "Failure", ":", "Report", "a", "condition", "that", "should", "never", "happen", ".", "The", "error", "will", "always", "be", "logged", "at", "level", "Constants", ".", "ASSERT", "despite", "the", "logging", "is", "disabled", ".", ...
train
https://github.com/akquinet/androlog/blob/82fa81354c01c9b1d1928062b634ba21f14be560/androlog/src/main/java/de/akquinet/android/androlog/Log.java#L976-L991
xerial/snappy-java
src/main/java/org/xerial/snappy/SnappyInputStream.java
SnappyInputStream.rawRead
public int rawRead(Object array, int byteOffset, int byteLength) throws IOException { int writtenBytes = 0; for (; writtenBytes < byteLength; ) { if (uncompressedCursor >= uncompressedLimit) { if (hasNextChunk()) { continue; ...
java
public int rawRead(Object array, int byteOffset, int byteLength) throws IOException { int writtenBytes = 0; for (; writtenBytes < byteLength; ) { if (uncompressedCursor >= uncompressedLimit) { if (hasNextChunk()) { continue; ...
[ "public", "int", "rawRead", "(", "Object", "array", ",", "int", "byteOffset", ",", "int", "byteLength", ")", "throws", "IOException", "{", "int", "writtenBytes", "=", "0", ";", "for", "(", ";", "writtenBytes", "<", "byteLength", ";", ")", "{", "if", "(",...
Read uncompressed data into the specified array @param array @param byteOffset @param byteLength @return written bytes @throws IOException
[ "Read", "uncompressed", "data", "into", "the", "specified", "array" ]
train
https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/SnappyInputStream.java#L192-L213
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java
PrivateKeyReader.readPrivateKey
public static PrivateKey readPrivateKey(final File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPrivateKey(file, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); }
java
public static PrivateKey readPrivateKey(final File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPrivateKey(file, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); }
[ "public", "static", "PrivateKey", "readPrivateKey", "(", "final", "File", "file", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "return", "readPrivateKey", "(", "file", ",", "KeyPairGe...
Reads the given {@link File}( in *.der format) with the default RSA algorithm and returns the {@link PrivateKey} object. @param file the file( in *.der format) that contains the private key @return the {@link PrivateKey} object @throws IOException Signals that an I/O exception has occurred. @throws NoSuchAlgorithmExc...
[ "Reads", "the", "given", "{", "@link", "File", "}", "(", "in", "*", ".", "der", "format", ")", "with", "the", "default", "RSA", "algorithm", "and", "returns", "the", "{", "@link", "PrivateKey", "}", "object", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java#L154-L158
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/bundle/AbstractResourceBundleHandler.java
AbstractResourceBundleHandler.getStoredBundlePath
private String getStoredBundlePath(String bundleName, boolean asGzippedBundle) { String tempFileName; if (asGzippedBundle) tempFileName = gzipDirPath; else tempFileName = textDirPath; return getStoredBundlePath(tempFileName, bundleName); }
java
private String getStoredBundlePath(String bundleName, boolean asGzippedBundle) { String tempFileName; if (asGzippedBundle) tempFileName = gzipDirPath; else tempFileName = textDirPath; return getStoredBundlePath(tempFileName, bundleName); }
[ "private", "String", "getStoredBundlePath", "(", "String", "bundleName", ",", "boolean", "asGzippedBundle", ")", "{", "String", "tempFileName", ";", "if", "(", "asGzippedBundle", ")", "tempFileName", "=", "gzipDirPath", ";", "else", "tempFileName", "=", "textDirPath...
Resolves the file name with which a bundle is stored. @param bundleName the bundle name @param asGzippedBundle the flag indicating if it's a gzipped bundle or not @return the file name.
[ "Resolves", "the", "file", "name", "with", "which", "a", "bundle", "is", "stored", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/bundle/AbstractResourceBundleHandler.java#L429-L438
stripe/stripe-android
stripe/src/main/java/com/stripe/android/Stripe.java
Stripe.createBankAccountTokenSynchronous
public Token createBankAccountTokenSynchronous(final BankAccount bankAccount) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createBankAccountTokenSynchronous(bankAccount, mDefaultP...
java
public Token createBankAccountTokenSynchronous(final BankAccount bankAccount) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createBankAccountTokenSynchronous(bankAccount, mDefaultP...
[ "public", "Token", "createBankAccountTokenSynchronous", "(", "final", "BankAccount", "bankAccount", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", ",", "APIConnectionException", ",", "CardException", ",", "APIException", "{", "return", "createBankAc...
Blocking method to create a {@link Token} for a {@link BankAccount}. Do not call this on the UI thread or your app will crash. This method uses the default publishable key for this {@link Stripe} instance. @param bankAccount the {@link Card} to use for this token @return a {@link Token} that can be used for this {@li...
[ "Blocking", "method", "to", "create", "a", "{", "@link", "Token", "}", "for", "a", "{", "@link", "BankAccount", "}", ".", "Do", "not", "call", "this", "on", "the", "UI", "thread", "or", "your", "app", "will", "crash", "." ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/Stripe.java#L202-L209
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/Launcher.java
Launcher.handleActions
protected ReturnCode handleActions(BootstrapConfig bootProps, LaunchArguments launchArgs) { ReturnCode rc = launchArgs.getRc(); switch (rc) { case OK: rc = new KernelBootstrap(bootProps).go(); break; case CREATE_ACTION: // Use ini...
java
protected ReturnCode handleActions(BootstrapConfig bootProps, LaunchArguments launchArgs) { ReturnCode rc = launchArgs.getRc(); switch (rc) { case OK: rc = new KernelBootstrap(bootProps).go(); break; case CREATE_ACTION: // Use ini...
[ "protected", "ReturnCode", "handleActions", "(", "BootstrapConfig", "bootProps", ",", "LaunchArguments", "launchArgs", ")", "{", "ReturnCode", "rc", "=", "launchArgs", ".", "getRc", "(", ")", ";", "switch", "(", "rc", ")", "{", "case", "OK", ":", "rc", "=", ...
Handle the process action. @param bootProps An instance of BootstrapConfig @param launchArgs An instance of LaunchArguments
[ "Handle", "the", "process", "action", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/Launcher.java#L236-L299
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLRPCClient.java
XMLRPCClient.callAsync
public long callAsync(XMLRPCCallback listener, String methodName, Object... params) { long id = System.currentTimeMillis(); new Caller(listener, id, methodName, params).start(); return id; }
java
public long callAsync(XMLRPCCallback listener, String methodName, Object... params) { long id = System.currentTimeMillis(); new Caller(listener, id, methodName, params).start(); return id; }
[ "public", "long", "callAsync", "(", "XMLRPCCallback", "listener", ",", "String", "methodName", ",", "Object", "...", "params", ")", "{", "long", "id", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "new", "Caller", "(", "listener", ",", "id", ",",...
Asynchronously call a remote procedure on the server. The method must be described by a method name. If the method requires parameters, this must be set. When the server returns a response the onResponse method is called on the listener. If the server returns an error the onServerError method is called on the listener...
[ "Asynchronously", "call", "a", "remote", "procedure", "on", "the", "server", ".", "The", "method", "must", "be", "described", "by", "a", "method", "name", ".", "If", "the", "method", "requires", "parameters", "this", "must", "be", "set", ".", "When", "the"...
train
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java#L485-L489