repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel1D_F64.java
Kernel1D_F64.wrap
public static Kernel1D_F64 wrap(double data[], int width, int offset ) { """ Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Location of the orig...
java
public static Kernel1D_F64 wrap(double data[], int width, int offset ) { Kernel1D_F64 ret = new Kernel1D_F64(); ret.data = data; ret.width = width; ret.offset = offset; return ret; }
[ "public", "static", "Kernel1D_F64", "wrap", "(", "double", "data", "[", "]", ",", "int", "width", ",", "int", "offset", ")", "{", "Kernel1D_F64", "ret", "=", "new", "Kernel1D_F64", "(", ")", ";", "ret", ".", "data", "=", "data", ";", "ret", ".", "wid...
Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Location of the origin in the array @return A new kernel.
[ "Creates", "a", "kernel", "whose", "elements", "are", "the", "specified", "data", "array", "and", "has", "the", "specified", "width", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel1D_F64.java#L103-L110
fuinorg/utils4j
src/main/java/org/fuin/utils4j/PropertiesFilePreferencesFactory.java
PropertiesFilePreferencesFactory.getValidDir
private File getValidDir(final String varName, final String dirName) { """ Checks if the system variable is set and is a valid directory. If this is not the case a {@link RuntimeException} will be thrown. @param varName Name of the system variable. @param dirName Name of the directory (from the system variab...
java
private File getValidDir(final String varName, final String dirName) { if (dirName == null) { throw new RuntimeException("The system variable '" + varName + "' is not set!"); } final File dir = new File(dirName); if (!dir.exists()) { throw new IllegalArgumen...
[ "private", "File", "getValidDir", "(", "final", "String", "varName", ",", "final", "String", "dirName", ")", "{", "if", "(", "dirName", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"The system variable '\"", "+", "varName", "+", "\"' is n...
Checks if the system variable is set and is a valid directory. If this is not the case a {@link RuntimeException} will be thrown. @param varName Name of the system variable. @param dirName Name of the directory (from the system variable). @return Directory reference.
[ "Checks", "if", "the", "system", "variable", "is", "set", "and", "is", "a", "valid", "directory", ".", "If", "this", "is", "not", "the", "case", "a", "{", "@link", "RuntimeException", "}", "will", "be", "thrown", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/PropertiesFilePreferencesFactory.java#L119-L131
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/BooleanArrayList.java
BooleanArrayList.partFromTo
public AbstractBooleanList partFromTo(int from, int to) { """ Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive. @param from the index of the first element (inclusive). @param to the index of the last element (inclusive). @return a new list @exc...
java
public AbstractBooleanList partFromTo(int from, int to) { if (size==0) return new BooleanArrayList(0); checkRangeFromTo(from, to, size); boolean[] part = new boolean[to-from+1]; System.arraycopy(elements, from, part, 0, to-from+1); return new BooleanArrayList(part); }
[ "public", "AbstractBooleanList", "partFromTo", "(", "int", "from", ",", "int", "to", ")", "{", "if", "(", "size", "==", "0", ")", "return", "new", "BooleanArrayList", "(", "0", ")", ";", "checkRangeFromTo", "(", "from", ",", "to", ",", "size", ")", ";"...
Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive. @param from the index of the first element (inclusive). @param to the index of the last element (inclusive). @return a new list @exception IndexOutOfBoundsException index is out of range (<tt>size()&gt;0...
[ "Returns", "a", "new", "list", "of", "the", "part", "of", "the", "receiver", "between", "<code", ">", "from<", "/", "code", ">", "inclusive", "and", "<code", ">", "to<", "/", "code", ">", "inclusive", "." ]
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/BooleanArrayList.java#L284-L292
app55/app55-java
src/support/java/com/googlecode/openbeans/Beans.java
Beans.isInstanceOf
public static boolean isInstanceOf(Object bean, Class<?> targetType) { """ Determine if the the specified bean object can be viewed as the specified type. @param bean the specified bean object. @param targetType the specifed view type. @return true if the specified bean object can be viewed as the specified...
java
public static boolean isInstanceOf(Object bean, Class<?> targetType) { if (bean == null) { throw new NullPointerException(Messages.getString("beans.1D")); //$NON-NLS-1$ } return targetType == null ? false : targetType.isInstance(bean); }
[ "public", "static", "boolean", "isInstanceOf", "(", "Object", "bean", ",", "Class", "<", "?", ">", "targetType", ")", "{", "if", "(", "bean", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "Messages", ".", "getString", "(", "\"beans.1...
Determine if the the specified bean object can be viewed as the specified type. @param bean the specified bean object. @param targetType the specifed view type. @return true if the specified bean object can be viewed as the specified type; otherwise, return false;
[ "Determine", "if", "the", "the", "specified", "bean", "object", "can", "be", "viewed", "as", "the", "specified", "type", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/Beans.java#L241-L249
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java
BetterRecyclerAdapter.onItemClick
protected void onItemClick(View view, int position) { """ Call this to trigger the user set item click listener @param view the view that was clicked @param position the position that was clicked """ if(itemClickListener != null) itemClickListener.onItemClick(view, getItem(position), ...
java
protected void onItemClick(View view, int position){ if(itemClickListener != null) itemClickListener.onItemClick(view, getItem(position), position); }
[ "protected", "void", "onItemClick", "(", "View", "view", ",", "int", "position", ")", "{", "if", "(", "itemClickListener", "!=", "null", ")", "itemClickListener", ".", "onItemClick", "(", "view", ",", "getItem", "(", "position", ")", ",", "position", ")", ...
Call this to trigger the user set item click listener @param view the view that was clicked @param position the position that was clicked
[ "Call", "this", "to", "trigger", "the", "user", "set", "item", "click", "listener" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java#L75-L77
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnintranetapplication.java
vpnintranetapplication.get
public static vpnintranetapplication get(nitro_service service, String intranetapplication) throws Exception { """ Use this API to fetch vpnintranetapplication resource of given name . """ vpnintranetapplication obj = new vpnintranetapplication(); obj.set_intranetapplication(intranetapplication); vpnintr...
java
public static vpnintranetapplication get(nitro_service service, String intranetapplication) throws Exception{ vpnintranetapplication obj = new vpnintranetapplication(); obj.set_intranetapplication(intranetapplication); vpnintranetapplication response = (vpnintranetapplication) obj.get_resource(service); return ...
[ "public", "static", "vpnintranetapplication", "get", "(", "nitro_service", "service", ",", "String", "intranetapplication", ")", "throws", "Exception", "{", "vpnintranetapplication", "obj", "=", "new", "vpnintranetapplication", "(", ")", ";", "obj", ".", "set_intranet...
Use this API to fetch vpnintranetapplication resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnintranetapplication", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnintranetapplication.java#L437-L442
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/DirectCompilerVisitor.java
DirectCompilerVisitor.visitExpressionList
@Override public DirectCompilerResult visitExpressionList(FEEL_1_1Parser.ExpressionListContext ctx) { """ NOTE: technically this rule of the grammar does not have an equivalent Java expression (or a valid FEEL expression) per-se. Using here as assuming if this grammar rule trigger, it is intended as a List, e...
java
@Override public DirectCompilerResult visitExpressionList(FEEL_1_1Parser.ExpressionListContext ctx) { List<DirectCompilerResult> exprs = new ArrayList<>(); for (int i = 0; i < ctx.getChildCount(); i++) { if (ctx.getChild(i) instanceof FEEL_1_1Parser.ExpressionContext) { F...
[ "@", "Override", "public", "DirectCompilerResult", "visitExpressionList", "(", "FEEL_1_1Parser", ".", "ExpressionListContext", "ctx", ")", "{", "List", "<", "DirectCompilerResult", ">", "exprs", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "int", "i...
NOTE: technically this rule of the grammar does not have an equivalent Java expression (or a valid FEEL expression) per-se. Using here as assuming if this grammar rule trigger, it is intended as a List, either to be returned, or re-used internally in this visitor.
[ "NOTE", ":", "technically", "this", "rule", "of", "the", "grammar", "does", "not", "have", "an", "equivalent", "Java", "expression", "(", "or", "a", "valid", "FEEL", "expression", ")", "per", "-", "se", ".", "Using", "here", "as", "assuming", "if", "this...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/DirectCompilerVisitor.java#L478-L491
KyoriPowered/text
api/src/main/java/net/kyori/text/event/HoverEvent.java
HoverEvent.showItem
public static @NonNull HoverEvent showItem(final @NonNull Component item) { """ Creates a hover event that shows an item on hover. @param item the item to show on hover @return a hover event """ return new HoverEvent(Action.SHOW_ITEM, item); }
java
public static @NonNull HoverEvent showItem(final @NonNull Component item) { return new HoverEvent(Action.SHOW_ITEM, item); }
[ "public", "static", "@", "NonNull", "HoverEvent", "showItem", "(", "final", "@", "NonNull", "Component", "item", ")", "{", "return", "new", "HoverEvent", "(", "Action", ".", "SHOW_ITEM", ",", "item", ")", ";", "}" ]
Creates a hover event that shows an item on hover. @param item the item to show on hover @return a hover event
[ "Creates", "a", "hover", "event", "that", "shows", "an", "item", "on", "hover", "." ]
train
https://github.com/KyoriPowered/text/blob/4496c593bf89e8fb036dd6efe26f8ac60f7655c9/api/src/main/java/net/kyori/text/event/HoverEvent.java#L66-L68
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java
ZipFileSliceReader.getString
String getString(final long off, final int lenBytes) throws IOException, InterruptedException { """ Get a string from the zipfile slice. @param off the offset to start reading from @param lenBytes the length of the string in bytes @return the string @throws IOException if an I/O exception occurs. @throws...
java
String getString(final long off, final int lenBytes) throws IOException, InterruptedException { if (off < 0 || off > zipFileSlice.len - lenBytes) { throw new IndexOutOfBoundsException(); } final byte[] scratchToUse = lenBytes <= scratch.length ? scratch : new byte[lenBytes]; ...
[ "String", "getString", "(", "final", "long", "off", ",", "final", "int", "lenBytes", ")", "throws", "IOException", ",", "InterruptedException", "{", "if", "(", "off", "<", "0", "||", "off", ">", "zipFileSlice", ".", "len", "-", "lenBytes", ")", "{", "thr...
Get a string from the zipfile slice. @param off the offset to start reading from @param lenBytes the length of the string in bytes @return the string @throws IOException if an I/O exception occurs. @throws InterruptedException if the thread was interrupted.
[ "Get", "a", "string", "from", "the", "zipfile", "slice", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L317-L328
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java
Journaler.copyPropertiesOverParameters
private void copyPropertiesOverParameters(Map<String, String> parameters) { """ Augment, and perhaps override, the server parameters, using any System Property whose name begins with "fedora.journal.". So, for example, a System Property of "fedora.journal.mode" will override a server parameter of "mode". ""...
java
private void copyPropertiesOverParameters(Map<String, String> parameters) { Properties properties = System.getProperties(); for (Object object : properties.keySet()) { String key = (String) object; if (key.startsWith(SYSTEM_PROPERTY_PREFIX)) { parameters.put(key.s...
[ "private", "void", "copyPropertiesOverParameters", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "Properties", "properties", "=", "System", ".", "getProperties", "(", ")", ";", "for", "(", "Object", "object", ":", "properties", ".", ...
Augment, and perhaps override, the server parameters, using any System Property whose name begins with "fedora.journal.". So, for example, a System Property of "fedora.journal.mode" will override a server parameter of "mode".
[ "Augment", "and", "perhaps", "override", "the", "server", "parameters", "using", "any", "System", "Property", "whose", "name", "begins", "with", "fedora", ".", "journal", ".", ".", "So", "for", "example", "a", "System", "Property", "of", "fedora", ".", "jour...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java#L105-L114
jbake-org/jbake
jbake-core/src/main/java/org/jbake/util/HtmlUtil.java
HtmlUtil.fixImageSourceUrls
public static void fixImageSourceUrls(Map<String, Object> fileContents, JBakeConfiguration configuration) { """ Image paths are specified as w.r.t. assets folder. This function prefix site host to all img src except the ones that starts with http://, https://. <p> If image path starts with "./", i.e. relative t...
java
public static void fixImageSourceUrls(Map<String, Object> fileContents, JBakeConfiguration configuration) { String htmlContent = fileContents.get(Attributes.BODY).toString(); boolean prependSiteHost = configuration.getImgPathPrependHost(); String siteHost = configuration.getSiteHost(); S...
[ "public", "static", "void", "fixImageSourceUrls", "(", "Map", "<", "String", ",", "Object", ">", "fileContents", ",", "JBakeConfiguration", "configuration", ")", "{", "String", "htmlContent", "=", "fileContents", ".", "get", "(", "Attributes", ".", "BODY", ")", ...
Image paths are specified as w.r.t. assets folder. This function prefix site host to all img src except the ones that starts with http://, https://. <p> If image path starts with "./", i.e. relative to the source file, then it first replace that with output file directory and the add site host. @param fileContents Ma...
[ "Image", "paths", "are", "specified", "as", "w", ".", "r", ".", "t", ".", "assets", "folder", ".", "This", "function", "prefix", "site", "host", "to", "all", "img", "src", "except", "the", "ones", "that", "starts", "with", "http", ":", "//", "https", ...
train
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/util/HtmlUtil.java#L29-L44
h2oai/h2o-3
h2o-core/src/main/java/water/util/IcedBitSet.java
IcedBitSet.byteToBinaryString
static String byteToBinaryString(byte b, int limit) { """ Converts a byte into its binary representation (with at most 8 digits). @param b the byte to be converted @param limit the maximal length of returned string - it will never exceed 8 anyway @return binary representation, lowest bit (weight 1) goes first...
java
static String byteToBinaryString(byte b, int limit) { final StringBuilder sb = new StringBuilder(); if (limit > 8) { limit = 8; } for (int i = 0; i < limit; i++) { sb.append((char)('0' + (b&1))); b>>=1; } return sb.toString(); }
[ "static", "String", "byteToBinaryString", "(", "byte", "b", ",", "int", "limit", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "limit", ">", "8", ")", "{", "limit", "=", "8", ";", "}", "for", "(", ...
Converts a byte into its binary representation (with at most 8 digits). @param b the byte to be converted @param limit the maximal length of returned string - it will never exceed 8 anyway @return binary representation, lowest bit (weight 1) goes first
[ "Converts", "a", "byte", "into", "its", "binary", "representation", "(", "with", "at", "most", "8", "digits", ")", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/IcedBitSet.java#L150-L160
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/GridScreen.java
GridScreen.init
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties) { """ Open the files and setup the screen. @param record The main record for this screen. @param itsLocation The location of this component within t...
java
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties) { m_iNavCount = 0; // Nav buttons super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDe...
[ "public", "void", "init", "(", "Record", "record", ",", "ScreenLocation", "itsLocation", ",", "BasePanel", "parentScreen", ",", "Converter", "fieldConverter", ",", "int", "iDisplayFieldDesc", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{",...
Open the files and setup the screen. @param record The main record for this screen. @param itsLocation The location of this component within the parent. @param parentScreen The parent screen. @param fieldConverter The field this screen field is linked to. @param iDisplayFieldDesc Do I display the field desc?
[ "Open", "the", "files", "and", "setup", "the", "screen", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/GridScreen.java#L66-L86
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java
DialogFragmentUtils.supportDismissOnLoaderCallback
public static void supportDismissOnLoaderCallback(final android.support.v4.app.FragmentManager manager, final String tag) { """ Dismiss {@link android.support.v4.app.DialogFragment} for the tag on the loader callbacks. @param manager the manager. @param tag the tag string that is related to the {@link android.su...
java
public static void supportDismissOnLoaderCallback(final android.support.v4.app.FragmentManager manager, final String tag) { supportDismissOnLoaderCallback(HandlerUtils.getMainHandler(), manager, tag); }
[ "public", "static", "void", "supportDismissOnLoaderCallback", "(", "final", "android", ".", "support", ".", "v4", ".", "app", ".", "FragmentManager", "manager", ",", "final", "String", "tag", ")", "{", "supportDismissOnLoaderCallback", "(", "HandlerUtils", ".", "g...
Dismiss {@link android.support.v4.app.DialogFragment} for the tag on the loader callbacks. @param manager the manager. @param tag the tag string that is related to the {@link android.support.v4.app.DialogFragment}.
[ "Dismiss", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java#L93-L95
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java
AbstractService.runTask
private <T> ServiceTask<T> runTask(final Wave sourceWave, final Method method, final Object[] parameterValues) { """ Run the wave type method. @param sourceWave the source wave @param parameterValues values to pass to the method @param method method to call @param <T> the type of the returned type @retu...
java
private <T> ServiceTask<T> runTask(final Wave sourceWave, final Method method, final Object[] parameterValues) { // Allow to remove the pending task when the service is finished sourceWave.addWaveListener(new ServiceTaskWaveListener()); // Create a new ServiceTask to handle this request and fo...
[ "private", "<", "T", ">", "ServiceTask", "<", "T", ">", "runTask", "(", "final", "Wave", "sourceWave", ",", "final", "Method", "method", ",", "final", "Object", "[", "]", "parameterValues", ")", "{", "// Allow to remove the pending task when the service is finished"...
Run the wave type method. @param sourceWave the source wave @param parameterValues values to pass to the method @param method method to call @param <T> the type of the returned type @return the service task created
[ "Run", "the", "wave", "type", "method", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java#L140-L178
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.executeAddKeySpace
private void executeAddKeySpace(Tree statement) { """ Add a keyspace @param statement - a token tree representing current statement """ if (!CliMain.isConnected()) return; // first value is the keyspace name, after that it is all key=value String keyspaceName = CliUtils.u...
java
private void executeAddKeySpace(Tree statement) { if (!CliMain.isConnected()) return; // first value is the keyspace name, after that it is all key=value String keyspaceName = CliUtils.unescapeSQLString(statement.getChild(0).getText()); KsDef ksDef = new KsDef(keyspaceN...
[ "private", "void", "executeAddKeySpace", "(", "Tree", "statement", ")", "{", "if", "(", "!", "CliMain", ".", "isConnected", "(", ")", ")", "return", ";", "// first value is the keyspace name, after that it is all key=value", "String", "keyspaceName", "=", "CliUtils", ...
Add a keyspace @param statement - a token tree representing current statement
[ "Add", "a", "keyspace" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L1073-L1098
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PaymentSummaryBuilder.java
PaymentSummaryBuilder.addPriceLabel
public PaymentSummaryBuilder addPriceLabel(String label, String amount) { """ Adds a {@link PriceLabel} to the {@link PaymentSummary}. @param label the {@link PriceLabel#label}. @param amount the {@link PriceLabel#amount}. @return this builder. """ PriceLabel priceLabel = new PriceLabel(label, amount)...
java
public PaymentSummaryBuilder addPriceLabel(String label, String amount) { PriceLabel priceLabel = new PriceLabel(label, amount); return addPriceLabel(priceLabel); }
[ "public", "PaymentSummaryBuilder", "addPriceLabel", "(", "String", "label", ",", "String", "amount", ")", "{", "PriceLabel", "priceLabel", "=", "new", "PriceLabel", "(", "label", ",", "amount", ")", ";", "return", "addPriceLabel", "(", "priceLabel", ")", ";", ...
Adds a {@link PriceLabel} to the {@link PaymentSummary}. @param label the {@link PriceLabel#label}. @param amount the {@link PriceLabel#amount}. @return this builder.
[ "Adds", "a", "{", "@link", "PriceLabel", "}", "to", "the", "{", "@link", "PaymentSummary", "}", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PaymentSummaryBuilder.java#L93-L96
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.listPresets
public ListPresetsResponse listPresets(ListPresetsRequest request) { """ List all system and user's preset. @param request The request object containing all options for listing presets. @return The list of all available preset. """ checkNotNull(request, "The parameter request should NOT be null."...
java
public ListPresetsResponse listPresets(ListPresetsRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, PRESET); return invokeHttpClient(internalRequest, ListPresetsResponse.class); ...
[ "public", "ListPresetsResponse", "listPresets", "(", "ListPresetsRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "HttpMethodName", ...
List all system and user's preset. @param request The request object containing all options for listing presets. @return The list of all available preset.
[ "List", "all", "system", "and", "user", "s", "preset", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L932-L936
lukin0110/poeditor-java
src/main/java/be/lukin/poeditor/POEditorClient.java
POEditorClient.syncTerms
public TermsDetails syncTerms(String projectId, List<Term> terms) { """ syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). @param projectId id of the project @param terms list of terms @return TermsDetails """ ...
java
public TermsDetails syncTerms(String projectId, List<Term> terms){ String jsonTerms = new Gson().toJson(terms); EditTermsResponse response = service.syncTerms(Action.SYNC_TERMS, apiKey, projectId, jsonTerms); ApiUtils.checkResponse(response.response); return response.details; }
[ "public", "TermsDetails", "syncTerms", "(", "String", "projectId", ",", "List", "<", "Term", ">", "terms", ")", "{", "String", "jsonTerms", "=", "new", "Gson", "(", ")", ".", "toJson", "(", "terms", ")", ";", "EditTermsResponse", "response", "=", "service"...
syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). @param projectId id of the project @param terms list of terms @return TermsDetails
[ "syncs", "your", "project", "with", "the", "array", "you", "send", "(", "terms", "that", "are", "not", "found", "in", "the", "JSON", "object", "will", "be", "deleted", "from", "project", "and", "the", "new", "ones", "added", ")", "." ]
train
https://github.com/lukin0110/poeditor-java/blob/42a2cd3136da1276b29a57a483c94050cc7d1d01/src/main/java/be/lukin/poeditor/POEditorClient.java#L343-L348
SonarSource/sonarqube
server/sonar-process/src/main/java/org/sonar/process/sharedmemoryfile/DefaultProcessCommands.java
DefaultProcessCommands.reset
public static void reset(File directory, int processNumber) { """ Clears the shared memory space of the specified process number. """ try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) { // nothing else to do than open file and reset the space of...
java
public static void reset(File directory, int processNumber) { try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) { // nothing else to do than open file and reset the space of specified process } }
[ "public", "static", "void", "reset", "(", "File", "directory", ",", "int", "processNumber", ")", "{", "try", "(", "DefaultProcessCommands", "processCommands", "=", "new", "DefaultProcessCommands", "(", "directory", ",", "processNumber", ",", "true", ")", ")", "{...
Clears the shared memory space of the specified process number.
[ "Clears", "the", "shared", "memory", "space", "of", "the", "specified", "process", "number", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-process/src/main/java/org/sonar/process/sharedmemoryfile/DefaultProcessCommands.java#L58-L62
grails/grails-core
grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java
StreamCharBuffer.methodMissing
public Object methodMissing(String name, Object args) { """ Delegates methodMissing to String object @param name The name of the method @param args The arguments @return The return value """ String str = this.toString(); return InvokerHelper.invokeMethod(str, name, args); }
java
public Object methodMissing(String name, Object args) { String str = this.toString(); return InvokerHelper.invokeMethod(str, name, args); }
[ "public", "Object", "methodMissing", "(", "String", "name", ",", "Object", "args", ")", "{", "String", "str", "=", "this", ".", "toString", "(", ")", ";", "return", "InvokerHelper", ".", "invokeMethod", "(", "str", ",", "name", ",", "args", ")", ";", "...
Delegates methodMissing to String object @param name The name of the method @param args The arguments @return The return value
[ "Delegates", "methodMissing", "to", "String", "object" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java#L2910-L2913
HanSolo/tilesfx
src/main/java/eu/hansolo/tilesfx/Tile.java
Tile.getTime
public ZonedDateTime getTime() { """ Returns the current time of the clock. @return the current time of the clock """ if (null == time) { ZonedDateTime now = ZonedDateTime.now(); time = new ObjectPropertyBase<ZonedDateTime>(now) { @Override protected void invali...
java
public ZonedDateTime getTime() { if (null == time) { ZonedDateTime now = ZonedDateTime.now(); time = new ObjectPropertyBase<ZonedDateTime>(now) { @Override protected void invalidated() { zoneId = get().getZone(); fireTileEvent(RECAL...
[ "public", "ZonedDateTime", "getTime", "(", ")", "{", "if", "(", "null", "==", "time", ")", "{", "ZonedDateTime", "now", "=", "ZonedDateTime", ".", "now", "(", ")", ";", "time", "=", "new", "ObjectPropertyBase", "<", "ZonedDateTime", ">", "(", "now", ")",...
Returns the current time of the clock. @return the current time of the clock
[ "Returns", "the", "current", "time", "of", "the", "clock", "." ]
train
https://github.com/HanSolo/tilesfx/blob/36eb07b1119017beb851dad95256439224d1fcf4/src/main/java/eu/hansolo/tilesfx/Tile.java#L3628-L3653
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java
RedundentExprEliminator.createPseudoVarDecl
protected ElemVariable createPseudoVarDecl( ElemTemplateElement psuedoVarRecipient, LocPathIterator lpi, boolean isGlobal) throws org.w3c.dom.DOMException { """ Create a psuedo variable reference that will represent the shared redundent XPath, and add it to the stylesheet. @param psuedoVarRec...
java
protected ElemVariable createPseudoVarDecl( ElemTemplateElement psuedoVarRecipient, LocPathIterator lpi, boolean isGlobal) throws org.w3c.dom.DOMException { QName uniquePseudoVarName = new QName (PSUEDOVARNAMESPACE, "#"+getPseudoVarID()); if(isGlobal) { return createGlobalPseudoV...
[ "protected", "ElemVariable", "createPseudoVarDecl", "(", "ElemTemplateElement", "psuedoVarRecipient", ",", "LocPathIterator", "lpi", ",", "boolean", "isGlobal", ")", "throws", "org", ".", "w3c", ".", "dom", ".", "DOMException", "{", "QName", "uniquePseudoVarName", "="...
Create a psuedo variable reference that will represent the shared redundent XPath, and add it to the stylesheet. @param psuedoVarRecipient The broadest scope of where the variable should be inserted, usually an xsl:template or xsl:for-each. @param lpi The LocationPathIterator that the variable should represent. @param...
[ "Create", "a", "psuedo", "variable", "reference", "that", "will", "represent", "the", "shared", "redundent", "XPath", "and", "add", "it", "to", "the", "stylesheet", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java#L816-L830
geomajas/geomajas-project-client-gwt2
common-gwt/command/src/main/java/org/geomajas/gwt/client/util/StyleUtil.java
StyleUtil.createPolygonSymbolizer
public static PolygonSymbolizerInfo createPolygonSymbolizer(FillInfo fillInfo, StrokeInfo strokeInfo) { """ Creates a polygon symbolizer with the specified fill and stroke. @param fillInfo the fill @param strokeInfo the stroke @return the symbolizer """ PolygonSymbolizerInfo symbolizerInfo = new Polygon...
java
public static PolygonSymbolizerInfo createPolygonSymbolizer(FillInfo fillInfo, StrokeInfo strokeInfo) { PolygonSymbolizerInfo symbolizerInfo = new PolygonSymbolizerInfo(); symbolizerInfo.setFill(fillInfo); symbolizerInfo.setStroke(strokeInfo); return symbolizerInfo; }
[ "public", "static", "PolygonSymbolizerInfo", "createPolygonSymbolizer", "(", "FillInfo", "fillInfo", ",", "StrokeInfo", "strokeInfo", ")", "{", "PolygonSymbolizerInfo", "symbolizerInfo", "=", "new", "PolygonSymbolizerInfo", "(", ")", ";", "symbolizerInfo", ".", "setFill",...
Creates a polygon symbolizer with the specified fill and stroke. @param fillInfo the fill @param strokeInfo the stroke @return the symbolizer
[ "Creates", "a", "polygon", "symbolizer", "with", "the", "specified", "fill", "and", "stroke", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/command/src/main/java/org/geomajas/gwt/client/util/StyleUtil.java#L173-L178
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/Level.java
Level.isInRange
public boolean isInRange(final Level minLevel, final Level maxLevel) { """ Compares this level against the levels passed as arguments and returns true if this level is in between the given levels. @param minLevel The minimum level to test. @param maxLevel The maximum level to test. @return True true if this ...
java
public boolean isInRange(final Level minLevel, final Level maxLevel) { return this.intLevel >= minLevel.intLevel && this.intLevel <= maxLevel.intLevel; }
[ "public", "boolean", "isInRange", "(", "final", "Level", "minLevel", ",", "final", "Level", "maxLevel", ")", "{", "return", "this", ".", "intLevel", ">=", "minLevel", ".", "intLevel", "&&", "this", ".", "intLevel", "<=", "maxLevel", ".", "intLevel", ";", "...
Compares this level against the levels passed as arguments and returns true if this level is in between the given levels. @param minLevel The minimum level to test. @param maxLevel The maximum level to test. @return True true if this level is in between the given levels @since 2.4
[ "Compares", "this", "level", "against", "the", "levels", "passed", "as", "arguments", "and", "returns", "true", "if", "this", "level", "is", "in", "between", "the", "given", "levels", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/Level.java#L154-L156
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/api/SwaggerAnnotationsReader.java
SwaggerAnnotationsReader.read
public static void read(Swagger swagger, Set<Class<?>> classes) { """ Scans a set of classes for Swagger annotations. @param swagger is the Swagger instance @param classes are a set of classes to scan """ final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger); for (Cl...
java
public static void read(Swagger swagger, Set<Class<?>> classes) { final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger); for (Class<?> cls : classes) { final ReaderContext context = new ReaderContext(swagger, cls, "", null, false, new ArrayList<>(), ...
[ "public", "static", "void", "read", "(", "Swagger", "swagger", ",", "Set", "<", "Class", "<", "?", ">", ">", "classes", ")", "{", "final", "SwaggerAnnotationsReader", "reader", "=", "new", "SwaggerAnnotationsReader", "(", "swagger", ")", ";", "for", "(", "...
Scans a set of classes for Swagger annotations. @param swagger is the Swagger instance @param classes are a set of classes to scan
[ "Scans", "a", "set", "of", "classes", "for", "Swagger", "annotations", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/api/SwaggerAnnotationsReader.java#L65-L72
j256/ormlite-android
src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java
OrmLiteConfigUtil.writeConfigFile
public static void writeConfigFile(OutputStream outputStream, Class<?>[] classes) throws SQLException, IOException { """ Write a configuration file to an output stream with the configuration for classes. """ writeConfigFile(outputStream, classes, false); }
java
public static void writeConfigFile(OutputStream outputStream, Class<?>[] classes) throws SQLException, IOException { writeConfigFile(outputStream, classes, false); }
[ "public", "static", "void", "writeConfigFile", "(", "OutputStream", "outputStream", ",", "Class", "<", "?", ">", "[", "]", "classes", ")", "throws", "SQLException", ",", "IOException", "{", "writeConfigFile", "(", "outputStream", ",", "classes", ",", "false", ...
Write a configuration file to an output stream with the configuration for classes.
[ "Write", "a", "configuration", "file", "to", "an", "output", "stream", "with", "the", "configuration", "for", "classes", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L225-L227
tango-controls/JTango
client/src/main/java/org/tango/client/database/cache/NoCacheDatabase.java
NoCacheDatabase.setClassProperties
@Override public void setClassProperties(final String name, final Map<String, String[]> properties) throws DevFailed { """ Set a tango class properties. (execute DbPutClassProperty on DB device) @param name The class name @param properties The properties names and values. @throws DevFailed """ ...
java
@Override public void setClassProperties(final String name, final Map<String, String[]> properties) throws DevFailed { final List<String> args = getArray(properties, name); final DeviceData argin = new DeviceData(); argin.insert(args.toArray(new String[args.size()])); database.comman...
[ "@", "Override", "public", "void", "setClassProperties", "(", "final", "String", "name", ",", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "properties", ")", "throws", "DevFailed", "{", "final", "List", "<", "String", ">", "args", "=", "g...
Set a tango class properties. (execute DbPutClassProperty on DB device) @param name The class name @param properties The properties names and values. @throws DevFailed
[ "Set", "a", "tango", "class", "properties", ".", "(", "execute", "DbPutClassProperty", "on", "DB", "device", ")" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/org/tango/client/database/cache/NoCacheDatabase.java#L192-L198
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/spi/DefinitionsDocumentExtension.java
DefinitionsDocumentExtension.levelOffset
protected int levelOffset(Context context) throws RuntimeException { """ Returns title level offset from 1 to apply to content @param context context @return title level offset """ //TODO: Unused method, make sure this is never used and then remove it. int levelOffset; switch (conte...
java
protected int levelOffset(Context context) throws RuntimeException { //TODO: Unused method, make sure this is never used and then remove it. int levelOffset; switch (context.position) { case DOCUMENT_BEFORE: case DOCUMENT_AFTER: levelOffset = 0; ...
[ "protected", "int", "levelOffset", "(", "Context", "context", ")", "throws", "RuntimeException", "{", "//TODO: Unused method, make sure this is never used and then remove it.", "int", "levelOffset", ";", "switch", "(", "context", ".", "position", ")", "{", "case", "DOCUME...
Returns title level offset from 1 to apply to content @param context context @return title level offset
[ "Returns", "title", "level", "offset", "from", "1", "to", "apply", "to", "content" ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/spi/DefinitionsDocumentExtension.java#L39-L62
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java
EmulatedFields.put
public void put(String name, Object value) throws IllegalArgumentException { """ Find and set the Object value of a given field named {@code name} in the receiver. @param name the name of the field to set. @param value new value for the field. @throws IllegalArgumentException if the corresponding field ...
java
public void put(String name, Object value) throws IllegalArgumentException { Class<?> valueClass = null; if (value != null) { valueClass = value.getClass(); } ObjectSlot slot = findMandatorySlot(name, valueClass); slot.fieldValue = value; slot.defaulted = fals...
[ "public", "void", "put", "(", "String", "name", ",", "Object", "value", ")", "throws", "IllegalArgumentException", "{", "Class", "<", "?", ">", "valueClass", "=", "null", ";", "if", "(", "value", "!=", "null", ")", "{", "valueClass", "=", "value", ".", ...
Find and set the Object value of a given field named {@code name} in the receiver. @param name the name of the field to set. @param value new value for the field. @throws IllegalArgumentException if the corresponding field can not be found.
[ "Find", "and", "set", "the", "Object", "value", "of", "a", "given", "field", "named", "{", "@code", "name", "}", "in", "the", "receiver", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java#L493-L501
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/Util.java
Util.binaryStream
public static Stream<byte[]> binaryStream(final String path, @javax.annotation.Nonnull final String name, final int skip, final int recordSize) throws IOException { """ Binary stream stream. @param path the path @param name the name @param skip the skip @param recordSize the record size @r...
java
public static Stream<byte[]> binaryStream(final String path, @javax.annotation.Nonnull final String name, final int skip, final int recordSize) throws IOException { @javax.annotation.Nonnull final File file = new File(path, name); final byte[] fileData = IOUtils.toByteArray(new BufferedInputStream(new GZIPInput...
[ "public", "static", "Stream", "<", "byte", "[", "]", ">", "binaryStream", "(", "final", "String", "path", ",", "@", "javax", ".", "annotation", ".", "Nonnull", "final", "String", "name", ",", "final", "int", "skip", ",", "final", "int", "recordSize", ")"...
Binary stream stream. @param path the path @param name the name @param skip the skip @param recordSize the record size @return the stream @throws IOException the io exception
[ "Binary", "stream", "stream", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/Util.java#L97-L103
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.getStackTrace
private static StackTraceElement getStackTrace() { """ Get the current stack trace element, skipping anything from known logging classes. @return The current stack trace for this thread """ StackTraceElement[] stack = Thread.currentThread().getStackTrace(); int i = 2; // we can skip the first two ...
java
private static StackTraceElement getStackTrace() { StackTraceElement[] stack = Thread.currentThread().getStackTrace(); int i = 2; // we can skip the first two (first is getStackTrace(), second is this method) while (i < stack.length) { boolean isLoggingClass = false; for (String loggingCl...
[ "private", "static", "StackTraceElement", "getStackTrace", "(", ")", "{", "StackTraceElement", "[", "]", "stack", "=", "Thread", ".", "currentThread", "(", ")", ".", "getStackTrace", "(", ")", ";", "int", "i", "=", "2", ";", "// we can skip the first two (first ...
Get the current stack trace element, skipping anything from known logging classes. @return The current stack trace for this thread
[ "Get", "the", "current", "stack", "trace", "element", "skipping", "anything", "from", "known", "logging", "classes", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L800-L825
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/code/Types.java
Types.isEqualityComparable
public boolean isEqualityComparable(Type s, Type t, Warner warn) { """ Can t and s be compared for equality? Any primitive == primitive or primitive == object comparisons here are an error. Unboxing and correct primitive == primitive comparisons are already dealt with in Attr.visitBinary. """ if (t...
java
public boolean isEqualityComparable(Type s, Type t, Warner warn) { if (t.isNumeric() && s.isNumeric()) return true; boolean tPrimitive = t.isPrimitive(); boolean sPrimitive = s.isPrimitive(); if (!tPrimitive && !sPrimitive) { return isCastable(s, t, warn) || isCa...
[ "public", "boolean", "isEqualityComparable", "(", "Type", "s", ",", "Type", "t", ",", "Warner", "warn", ")", "{", "if", "(", "t", ".", "isNumeric", "(", ")", "&&", "s", ".", "isNumeric", "(", ")", ")", "return", "true", ";", "boolean", "tPrimitive", ...
Can t and s be compared for equality? Any primitive == primitive or primitive == object comparisons here are an error. Unboxing and correct primitive == primitive comparisons are already dealt with in Attr.visitBinary.
[ "Can", "t", "and", "s", "be", "compared", "for", "equality?", "Any", "primitive", "==", "primitive", "or", "primitive", "==", "object", "comparisons", "here", "are", "an", "error", ".", "Unboxing", "and", "correct", "primitive", "==", "primitive", "comparisons...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Types.java#L1456-L1467
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.regressionPlan
public RegressionPlan regressionPlan(String name, Project project, Map<String, Object> attributes) { """ Creates a new Regression Plan with title and project. @param name Title of the plan. @param project Project to assign. @param attributes Additional attributes for initialization Regression Plan. ...
java
public RegressionPlan regressionPlan(String name, Project project, Map<String, Object> attributes) { RegressionPlan regressionPlan = new RegressionPlan(instance); regressionPlan.setName(name); regressionPlan.setProject(project); addAttributes(regressionPlan, attributes); regress...
[ "public", "RegressionPlan", "regressionPlan", "(", "String", "name", ",", "Project", "project", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "RegressionPlan", "regressionPlan", "=", "new", "RegressionPlan", "(", "instance", ")", ";", ...
Creates a new Regression Plan with title and project. @param name Title of the plan. @param project Project to assign. @param attributes Additional attributes for initialization Regression Plan. @return A newly minted Regression Plan that exists in the VersionOne system.
[ "Creates", "a", "new", "Regression", "Plan", "with", "title", "and", "project", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L1154-L1163
JetBrains/xodus
openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java
EnvironmentConfig.setTreeMaxPageSize
public EnvironmentConfig setTreeMaxPageSize(final int pageSize) throws InvalidSettingException { """ Sets the maximum size of page of B+Tree. Default value is {@code 128}. Only sizes in the range [16..1024] are accepted. <p>Mutable at runtime: yes @param pageSize maximum size of page of B+Tree @return this {...
java
public EnvironmentConfig setTreeMaxPageSize(final int pageSize) throws InvalidSettingException { if (pageSize < 16 || pageSize > 1024) { throw new InvalidSettingException("Invalid tree page size: " + pageSize); } return setSetting(TREE_MAX_PAGE_SIZE, pageSize); }
[ "public", "EnvironmentConfig", "setTreeMaxPageSize", "(", "final", "int", "pageSize", ")", "throws", "InvalidSettingException", "{", "if", "(", "pageSize", "<", "16", "||", "pageSize", ">", "1024", ")", "{", "throw", "new", "InvalidSettingException", "(", "\"Inval...
Sets the maximum size of page of B+Tree. Default value is {@code 128}. Only sizes in the range [16..1024] are accepted. <p>Mutable at runtime: yes @param pageSize maximum size of page of B+Tree @return this {@code EnvironmentConfig} instance @throws InvalidSettingException page size is not in the range [16..1024]
[ "Sets", "the", "maximum", "size", "of", "page", "of", "B", "+", "Tree", ".", "Default", "value", "is", "{", "@code", "128", "}", ".", "Only", "sizes", "in", "the", "range", "[", "16", "..", "1024", "]", "are", "accepted", ".", "<p", ">", "Mutable",...
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java#L1722-L1727
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.updateInstances
public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { """ Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of ...
java
public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "updateInstances", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "updateInstancesWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. @throws IllegalArgumentException thrown if parameters fail t...
[ "Upgrades", "one", "or", "more", "virtual", "machines", "to", "the", "latest", "SKU", "set", "in", "the", "VM", "scale", "set", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L2714-L2716
venmo/cursor-utils
cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java
IterableCursorWrapper.getString
public String getString(String columnName, String defaultValue) { """ Convenience alias to {@code getString\(getColumnIndex(columnName))}. If the column does not exist for the cursor, return {@code defaultValue}. """ int index = getColumnIndex(columnName); if (isValidIndex(index)) { ...
java
public String getString(String columnName, String defaultValue) { int index = getColumnIndex(columnName); if (isValidIndex(index)) { return getString(index); } else { return defaultValue; } }
[ "public", "String", "getString", "(", "String", "columnName", ",", "String", "defaultValue", ")", "{", "int", "index", "=", "getColumnIndex", "(", "columnName", ")", ";", "if", "(", "isValidIndex", "(", "index", ")", ")", "{", "return", "getString", "(", "...
Convenience alias to {@code getString\(getColumnIndex(columnName))}. If the column does not exist for the cursor, return {@code defaultValue}.
[ "Convenience", "alias", "to", "{" ]
train
https://github.com/venmo/cursor-utils/blob/52cf91c4253346632fe70b8d7b7eab8bbcc9b248/cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java#L70-L77
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java
LoadJobConfiguration.of
public static LoadJobConfiguration of( TableId destinationTable, String sourceUri, FormatOptions format) { """ Returns a BigQuery Load Job Configuration for the given destination table, format and source URI. """ return of(destinationTable, ImmutableList.of(sourceUri), format); }
java
public static LoadJobConfiguration of( TableId destinationTable, String sourceUri, FormatOptions format) { return of(destinationTable, ImmutableList.of(sourceUri), format); }
[ "public", "static", "LoadJobConfiguration", "of", "(", "TableId", "destinationTable", ",", "String", "sourceUri", ",", "FormatOptions", "format", ")", "{", "return", "of", "(", "destinationTable", ",", "ImmutableList", ".", "of", "(", "sourceUri", ")", ",", "for...
Returns a BigQuery Load Job Configuration for the given destination table, format and source URI.
[ "Returns", "a", "BigQuery", "Load", "Job", "Configuration", "for", "the", "given", "destination", "table", "format", "and", "source", "URI", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java#L554-L557
line/armeria
core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java
ServerSentEvents.fromEvent
public static HttpResponse fromEvent(HttpHeaders headers, ServerSentEvent sse) { """ Creates a new Server-Sent Events stream of the specified {@code content}. @param headers the HTTP headers supposed to send @param sse the {@link ServerSentEvent} object supposed to send as contents """ return fromE...
java
public static HttpResponse fromEvent(HttpHeaders headers, ServerSentEvent sse) { return fromEvent(headers, sse, HttpHeaders.EMPTY_HEADERS); }
[ "public", "static", "HttpResponse", "fromEvent", "(", "HttpHeaders", "headers", ",", "ServerSentEvent", "sse", ")", "{", "return", "fromEvent", "(", "headers", ",", "sse", ",", "HttpHeaders", ".", "EMPTY_HEADERS", ")", ";", "}" ]
Creates a new Server-Sent Events stream of the specified {@code content}. @param headers the HTTP headers supposed to send @param sse the {@link ServerSentEvent} object supposed to send as contents
[ "Creates", "a", "new", "Server", "-", "Sent", "Events", "stream", "of", "the", "specified", "{", "@code", "content", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java#L267-L269
landawn/AbacusUtil
src/com/landawn/abacus/util/ByteList.java
ByteList.allMatch
public <E extends Exception> boolean allMatch(Try.BytePredicate<E> filter) throws E { """ Returns whether all elements of this List match the provided predicate. @param filter @return """ return allMatch(0, size(), filter); }
java
public <E extends Exception> boolean allMatch(Try.BytePredicate<E> filter) throws E { return allMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "allMatch", "(", "Try", ".", "BytePredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "allMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether all elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "all", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/ByteList.java#L923-L925
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/ml/BIOTrainer.java
BIOTrainer.getDataset
protected Dataset<Sequence> getDataset(SequenceFeaturizer<Annotation> featurizer) { """ Gets dataset. @param featurizer the featurizer @return the dataset """ Corpus c = Corpus .builder() .corpusType(corpusType) .source(corpus) ...
java
protected Dataset<Sequence> getDataset(SequenceFeaturizer<Annotation> featurizer) { Corpus c = Corpus .builder() .corpusType(corpusType) .source(corpus) .format(corpusFormat) .build(); AnnotatableType[] requi...
[ "protected", "Dataset", "<", "Sequence", ">", "getDataset", "(", "SequenceFeaturizer", "<", "Annotation", ">", "featurizer", ")", "{", "Corpus", "c", "=", "Corpus", ".", "builder", "(", ")", ".", "corpusType", "(", "corpusType", ")", ".", "source", "(", "c...
Gets dataset. @param featurizer the featurizer @return the dataset
[ "Gets", "dataset", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/ml/BIOTrainer.java#L107-L119
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/rest/TypeRepresentation.java
TypeRepresentation.ofConcrete
public static TypeRepresentation ofConcrete(final TypeIdentifier identifier, final Map<String, TypeIdentifier> properties) { """ Creates a type representation of a concrete type (i.e. a Java type, not a programmatically created type) plus the actual properties. @param identifier The type identifier @param prop...
java
public static TypeRepresentation ofConcrete(final TypeIdentifier identifier, final Map<String, TypeIdentifier> properties) { return new ConcreteTypeRepresentation(identifier, properties); }
[ "public", "static", "TypeRepresentation", "ofConcrete", "(", "final", "TypeIdentifier", "identifier", ",", "final", "Map", "<", "String", ",", "TypeIdentifier", ">", "properties", ")", "{", "return", "new", "ConcreteTypeRepresentation", "(", "identifier", ",", "prop...
Creates a type representation of a concrete type (i.e. a Java type, not a programmatically created type) plus the actual properties. @param identifier The type identifier @param properties The type (POJO) description @return The type representation
[ "Creates", "a", "type", "representation", "of", "a", "concrete", "type", "(", "i", ".", "e", ".", "a", "Java", "type", "not", "a", "programmatically", "created", "type", ")", "plus", "the", "actual", "properties", "." ]
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/rest/TypeRepresentation.java#L82-L84
twilio/twilio-java
src/main/java/com/twilio/rest/studio/v1/flow/EngagementReader.java
EngagementReader.firstPage
@Override @SuppressWarnings("checkstyle:linelength") public Page<Engagement> firstPage(final TwilioRestClient client) { """ Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return Engagement ResourceSet """ Request reques...
java
@Override @SuppressWarnings("checkstyle:linelength") public Page<Engagement> firstPage(final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, Domains.STUDIO.toString(), "/v1/Flows/" + this.pathFlowSid + "/Engagements", client.getRe...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"checkstyle:linelength\"", ")", "public", "Page", "<", "Engagement", ">", "firstPage", "(", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GE...
Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return Engagement ResourceSet
[ "Make", "the", "request", "to", "the", "Twilio", "API", "to", "perform", "the", "read", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/studio/v1/flow/EngagementReader.java#L51-L63
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/utils/BtcFormat.java
BtcFormat.getInstance
public static BtcFormat getInstance(int scale, Locale locale, int minDecimals, List<Integer> groups) { """ Return a new fixed-denomination formatter for the given locale, with the specified fractional decimal placing. The first argument specifies the denomination as the size of the shift from coin-denomination ...
java
public static BtcFormat getInstance(int scale, Locale locale, int minDecimals, List<Integer> groups) { return new BtcFixedFormat(locale, scale, minDecimals, groups); }
[ "public", "static", "BtcFormat", "getInstance", "(", "int", "scale", ",", "Locale", "locale", ",", "int", "minDecimals", ",", "List", "<", "Integer", ">", "groups", ")", "{", "return", "new", "BtcFixedFormat", "(", "locale", ",", "scale", ",", "minDecimals",...
Return a new fixed-denomination formatter for the given locale, with the specified fractional decimal placing. The first argument specifies the denomination as the size of the shift from coin-denomination in increasingly-precise decimal places. The third parameter is the minimum number of fractional decimal places to...
[ "Return", "a", "new", "fixed", "-", "denomination", "formatter", "for", "the", "given", "locale", "with", "the", "specified", "fractional", "decimal", "placing", ".", "The", "first", "argument", "specifies", "the", "denomination", "as", "the", "size", "of", "t...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/utils/BtcFormat.java#L1112-L1114
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.addGroup
public int addGroup(double x, double y) { """ Add the specified point into a newgroup. @param x x coordinate @param y y coordinate @return the index of the new point in this element. """ int pointIndex; if (this.pointCoordinates == null) { this.pointCoordinates = new double[] {x, y}; this.partIn...
java
public int addGroup(double x, double y) { int pointIndex; if (this.pointCoordinates == null) { this.pointCoordinates = new double[] {x, y}; this.partIndexes = null; pointIndex = 0; } else { double[] pts = new double[this.pointCoordinates.length + 2]; System.arraycopy(this.pointCoordinates, 0, pts, ...
[ "public", "int", "addGroup", "(", "double", "x", ",", "double", "y", ")", "{", "int", "pointIndex", ";", "if", "(", "this", ".", "pointCoordinates", "==", "null", ")", "{", "this", ".", "pointCoordinates", "=", "new", "double", "[", "]", "{", "x", ",...
Add the specified point into a newgroup. @param x x coordinate @param y y coordinate @return the index of the new point in this element.
[ "Add", "the", "specified", "point", "into", "a", "newgroup", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L663-L696
jmeter-maven-plugin/jmeter-maven-plugin
src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java
ConfigureJMeterMojo.copyTransitiveRuntimeDependenciesToLibDirectory
private void copyTransitiveRuntimeDependenciesToLibDirectory(Artifact artifact, boolean getDependenciesOfDependency) throws MojoExecutionException { """ Collate a list of transitive runtime dependencies that need to be copied to the /lib directory and then copy them there. @param artifact The...
java
private void copyTransitiveRuntimeDependenciesToLibDirectory(Artifact artifact, boolean getDependenciesOfDependency) throws MojoExecutionException { copyTransitiveRuntimeDependenciesToLibDirectory(new Dependency(artifact, DEPENDENCIES_DEFAULT_SEARCH_SCOPE), getDependenciesOfDependency); }
[ "private", "void", "copyTransitiveRuntimeDependenciesToLibDirectory", "(", "Artifact", "artifact", ",", "boolean", "getDependenciesOfDependency", ")", "throws", "MojoExecutionException", "{", "copyTransitiveRuntimeDependenciesToLibDirectory", "(", "new", "Dependency", "(", "artif...
Collate a list of transitive runtime dependencies that need to be copied to the /lib directory and then copy them there. @param artifact The artifact that is a transitive dependency @param getDependenciesOfDependency get dependencies of dependency @throws MojoExecutionException MojoExecutionExceptio...
[ "Collate", "a", "list", "of", "transitive", "runtime", "dependencies", "that", "need", "to", "be", "copied", "to", "the", "/", "lib", "directory", "and", "then", "copy", "them", "there", "." ]
train
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/63dc8b49cc6b9542deb681e25a2ada6025ddbf6b/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java#L536-L538
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.acceptChat
public ApiSuccessResponse acceptChat(String id, AcceptData acceptData) throws ApiException { """ Accept a chat Accept the specified chat interaction. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to...
java
public ApiSuccessResponse acceptChat(String id, AcceptData acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = acceptChatWithHttpInfo(id, acceptData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "acceptChat", "(", "String", "id", ",", "AcceptData", "acceptData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "acceptChatWithHttpInfo", "(", "id", ",", "acceptData", ")", ";", "r...
Accept a chat Accept the specified chat interaction. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Accept", "a", "chat", "Accept", "the", "specified", "chat", "interaction", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L149-L152
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
BeanUtil.beanToMap
public static Map<String, Object> beanToMap(Object bean, boolean isToUnderlineCase, boolean ignoreNullValue) { """ 对象转Map @param bean bean对象 @param isToUnderlineCase 是否转换为下划线模式 @param ignoreNullValue 是否忽略值为空的字段 @return Map """ return beanToMap(bean, new LinkedHashMap<String, Object>(), isToUnderlineCa...
java
public static Map<String, Object> beanToMap(Object bean, boolean isToUnderlineCase, boolean ignoreNullValue) { return beanToMap(bean, new LinkedHashMap<String, Object>(), isToUnderlineCase, ignoreNullValue); }
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "beanToMap", "(", "Object", "bean", ",", "boolean", "isToUnderlineCase", ",", "boolean", "ignoreNullValue", ")", "{", "return", "beanToMap", "(", "bean", ",", "new", "LinkedHashMap", "<", "String", ...
对象转Map @param bean bean对象 @param isToUnderlineCase 是否转换为下划线模式 @param ignoreNullValue 是否忽略值为空的字段 @return Map
[ "对象转Map" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L497-L499
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereBetween
@Override public void _whereBetween(String fieldName, Object start, Object end, boolean exact) { """ Matches fields where the value is between the specified start and end, inclusive @param fieldName Field name to use @param start Range start @param end Range end @param exact Use exact matcher """ ...
java
@Override public void _whereBetween(String fieldName, Object start, Object end, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, fieldName); WherePa...
[ "@", "Override", "public", "void", "_whereBetween", "(", "String", "fieldName", ",", "Object", "start", ",", "Object", "end", ",", "boolean", "exact", ")", "{", "fieldName", "=", "ensureValidFieldName", "(", "fieldName", ",", "false", ")", ";", "List", "<", ...
Matches fields where the value is between the specified start and end, inclusive @param fieldName Field name to use @param start Range start @param end Range end @param exact Use exact matcher
[ "Matches", "fields", "where", "the", "value", "is", "between", "the", "specified", "start", "and", "end", "inclusive" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L661-L682
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/clientserver/DomainModelServer.java
DomainModelServer.onClientConnectionError
@Override public void onClientConnectionError(final Object client, final SynchronizeFXException e) { """ Logs the unexpected disconnection of an client. Connection errors to single clients are usually non fatal. The server can still work correctly for the other clients. Because of that this type of error i...
java
@Override public void onClientConnectionError(final Object client, final SynchronizeFXException e) { serverCallback.onClientConnectionError(client, e); }
[ "@", "Override", "public", "void", "onClientConnectionError", "(", "final", "Object", "client", ",", "final", "SynchronizeFXException", "e", ")", "{", "serverCallback", ".", "onClientConnectionError", "(", "client", ",", "e", ")", ";", "}" ]
Logs the unexpected disconnection of an client. Connection errors to single clients are usually non fatal. The server can still work correctly for the other clients. Because of that this type of error is just logged here and not passed to the user. @param client An object that represent the client where the error occ...
[ "Logs", "the", "unexpected", "disconnection", "of", "an", "client", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/clientserver/DomainModelServer.java#L191-L194
m-m-m/util
io/src/main/java/net/sf/mmm/util/file/base/FileAccessPermissions.java
FileAccessPermissions.setBits
private void setBits(int bitMask, boolean set) { """ This method sets or unsets the flags given by {@code bitMask} in this {@link #getMaskBits() mask} according to the given {@code flag}. @param bitMask is the bit-mask of the flag(s) to set or unset. @param set - if {@code true} the flag(s) will be set, if {@...
java
private void setBits(int bitMask, boolean set) { if (set) { this.maskBits = this.maskBits | bitMask; } else { this.maskBits = this.maskBits & ~bitMask; } }
[ "private", "void", "setBits", "(", "int", "bitMask", ",", "boolean", "set", ")", "{", "if", "(", "set", ")", "{", "this", ".", "maskBits", "=", "this", ".", "maskBits", "|", "bitMask", ";", "}", "else", "{", "this", ".", "maskBits", "=", "this", "....
This method sets or unsets the flags given by {@code bitMask} in this {@link #getMaskBits() mask} according to the given {@code flag}. @param bitMask is the bit-mask of the flag(s) to set or unset. @param set - if {@code true} the flag(s) will be set, if {@code false} they will be unset.
[ "This", "method", "sets", "or", "unsets", "the", "flags", "given", "by", "{", "@code", "bitMask", "}", "in", "this", "{", "@link", "#getMaskBits", "()", "mask", "}", "according", "to", "the", "given", "{", "@code", "flag", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/file/base/FileAccessPermissions.java#L374-L381
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.setFocusTimeMedia
public ApiSuccessResponse setFocusTimeMedia(String mediatype, String id, SetFocusTimeData1 setFocusTimeData) throws ApiException { """ Set the focus time of interaction Set the focus time to the specified interaction. @param mediatype media-type of interaction (required) @param id id of interaction (required) ...
java
public ApiSuccessResponse setFocusTimeMedia(String mediatype, String id, SetFocusTimeData1 setFocusTimeData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = setFocusTimeMediaWithHttpInfo(mediatype, id, setFocusTimeData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "setFocusTimeMedia", "(", "String", "mediatype", ",", "String", "id", ",", "SetFocusTimeData1", "setFocusTimeData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "setFocusTimeMediaWithHttpIn...
Set the focus time of interaction Set the focus time to the specified interaction. @param mediatype media-type of interaction (required) @param id id of interaction (required) @param setFocusTimeData Request parameters. (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server erro...
[ "Set", "the", "focus", "time", "of", "interaction", "Set", "the", "focus", "time", "to", "the", "specified", "interaction", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L4199-L4202
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_record_id_PUT
public void zone_zoneName_record_id_PUT(String zoneName, Long id, OvhRecord body) throws IOException { """ Alter this object properties REST: PUT /domain/zone/{zoneName}/record/{id} @param body [required] New object properties @param zoneName [required] The internal name of your zone @param id [required] Id ...
java
public void zone_zoneName_record_id_PUT(String zoneName, Long id, OvhRecord body) throws IOException { String qPath = "/domain/zone/{zoneName}/record/{id}"; StringBuilder sb = path(qPath, zoneName, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "zone_zoneName_record_id_PUT", "(", "String", "zoneName", ",", "Long", "id", ",", "OvhRecord", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/record/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(...
Alter this object properties REST: PUT /domain/zone/{zoneName}/record/{id} @param body [required] New object properties @param zoneName [required] The internal name of your zone @param id [required] Id of the object
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L903-L907
prestodb/presto
presto-main/src/main/java/com/facebook/presto/connector/system/SystemConnectorSessionUtil.java
SystemConnectorSessionUtil.toSession
public static Session toSession(ConnectorTransactionHandle transactionHandle, ConnectorSession session) { """ this does not preserve any connector properties (for the system connector) """ TransactionId transactionId = ((GlobalSystemTransactionHandle) transactionHandle).getTransactionId(); Conn...
java
public static Session toSession(ConnectorTransactionHandle transactionHandle, ConnectorSession session) { TransactionId transactionId = ((GlobalSystemTransactionHandle) transactionHandle).getTransactionId(); ConnectorIdentity connectorIdentity = session.getIdentity(); Identity identity = new...
[ "public", "static", "Session", "toSession", "(", "ConnectorTransactionHandle", "transactionHandle", ",", "ConnectorSession", "session", ")", "{", "TransactionId", "transactionId", "=", "(", "(", "GlobalSystemTransactionHandle", ")", "transactionHandle", ")", ".", "getTran...
this does not preserve any connector properties (for the system connector)
[ "this", "does", "not", "preserve", "any", "connector", "properties", "(", "for", "the", "system", "connector", ")" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/connector/system/SystemConnectorSessionUtil.java#L36-L52
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.getAsync
public Observable<JobTargetGroupInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { """ Gets 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 o...
java
public Observable<JobTargetGroupInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { return getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName).map(new Func1<ServiceResponse<JobTargetGroupInner>, JobTargetGroupInner>() ...
[ "public", "Observable", "<", "JobTargetGroupInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "targetGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupN...
Gets 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 the target gr...
[ "Gets", "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#L259-L266
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.deleteTag
public void deleteTag(UUID projectId, UUID tagId) { """ Delete a tag from the project. @param projectId The project id @param tagId Id of the tag to be deleted @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws...
java
public void deleteTag(UUID projectId, UUID tagId) { deleteTagWithServiceResponseAsync(projectId, tagId).toBlocking().single().body(); }
[ "public", "void", "deleteTag", "(", "UUID", "projectId", ",", "UUID", "tagId", ")", "{", "deleteTagWithServiceResponseAsync", "(", "projectId", ",", "tagId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ")", ";", "}" ]
Delete a tag from the project. @param projectId The project id @param tagId Id of the tag to be deleted @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exceptions if the reque...
[ "Delete", "a", "tag", "from", "the", "project", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L692-L694
rackerlabs/clouddocs-maven-plugin
src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java
PDFBuilder.createStyleSheetResolver
private URIResolver createStyleSheetResolver(CatalogResolver catalogResolver) throws MojoExecutionException { """ Creates an URI resolver to handle <code>urn:docbkx:stylesheet(/)</code> as a special URI. This URI points to the default docbook stylesheet location @param catalogResolver The initial resolver to u...
java
private URIResolver createStyleSheetResolver(CatalogResolver catalogResolver) throws MojoExecutionException { URIResolver uriResolver; try { URL url = getNonDefaultStylesheetURL() == null ? getDefaultStylesheetURL() : getNonDefaultStylesheetURL(); if (getLog().isDebugEnabled()) { getLog().debug("Usi...
[ "private", "URIResolver", "createStyleSheetResolver", "(", "CatalogResolver", "catalogResolver", ")", "throws", "MojoExecutionException", "{", "URIResolver", "uriResolver", ";", "try", "{", "URL", "url", "=", "getNonDefaultStylesheetURL", "(", ")", "==", "null", "?", ...
Creates an URI resolver to handle <code>urn:docbkx:stylesheet(/)</code> as a special URI. This URI points to the default docbook stylesheet location @param catalogResolver The initial resolver to use @return The Stylesheet resolver. @throws MojoExecutionException If an error occurs while reading the stylesheet
[ "Creates", "an", "URI", "resolver", "to", "handle", "<code", ">", "urn", ":", "docbkx", ":", "stylesheet", "(", "/", ")", "<", "/", "code", ">", "as", "a", "special", "URI", ".", "This", "URI", "points", "to", "the", "default", "docbook", "stylesheet",...
train
https://github.com/rackerlabs/clouddocs-maven-plugin/blob/ba8554dc340db674307efdaac647c6fd2b58a34b/src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java#L941-L954
rhuss/jolokia
agent/core/src/main/java/org/jolokia/handler/ExecHandler.java
ExecHandler.extractOperationTypes
private OperationAndParamType extractOperationTypes(MBeanServerConnection pServer, JmxExecRequest pRequest) throws ReflectionException, InstanceNotFoundException, IOException { """ Extract the operation and type list from a given request @param pServer server from which obtain the MBean type info @...
java
private OperationAndParamType extractOperationTypes(MBeanServerConnection pServer, JmxExecRequest pRequest) throws ReflectionException, InstanceNotFoundException, IOException { if (pRequest.getOperation() == null) { throw new IllegalArgumentException("No operation given for exec Request ...
[ "private", "OperationAndParamType", "extractOperationTypes", "(", "MBeanServerConnection", "pServer", ",", "JmxExecRequest", "pRequest", ")", "throws", "ReflectionException", ",", "InstanceNotFoundException", ",", "IOException", "{", "if", "(", "pRequest", ".", "getOperatio...
Extract the operation and type list from a given request @param pServer server from which obtain the MBean type info @param pRequest the exec request @return combined object containing the operation name and parameter classes
[ "Extract", "the", "operation", "and", "type", "list", "from", "a", "given", "request" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ExecHandler.java#L117-L151
petrbouda/joyrest
joyrest-core/src/main/java/org/joyrest/exception/configuration/AbstractExceptionConfiguration.java
AbstractExceptionConfiguration.putHandler
public <T extends Exception, RESP> InternalExceptionHandler putHandler(Class<T> clazz, ExceptionHandlerAction<RESP, T> action, Type<RESP> ex) { """ Method registers ...
java
public <T extends Exception, RESP> InternalExceptionHandler putHandler(Class<T> clazz, ExceptionHandlerAction<RESP, T> action, Type<RESP> ex) { final InternalExce...
[ "public", "<", "T", "extends", "Exception", ",", "RESP", ">", "InternalExceptionHandler", "putHandler", "(", "Class", "<", "T", ">", "clazz", ",", "ExceptionHandlerAction", "<", "RESP", ",", "T", ">", "action", ",", "Type", "<", "RESP", ">", "ex", ")", "...
Method registers a new handler to some type of exception. @param clazz type of the exception to which is handler registered @param action action that is performed when the proper exception is thrown @param ex thrown exception @param <T> type of the thrown exception @param <RESP> type of the returned object @return reg...
[ "Method", "registers", "a", "new", "handler", "to", "some", "type", "of", "exception", "." ]
train
https://github.com/petrbouda/joyrest/blob/58903f06fb7f0b8fdf1ef91318fb48a88bf970e0/joyrest-core/src/main/java/org/joyrest/exception/configuration/AbstractExceptionConfiguration.java#L69-L75
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.insertOnMongoTable
@Given("^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$") public void insertOnMongoTable(String dataBase, String tabName, DataTable table) { """ Insert data in a MongoDB table. @param dataBase Mongo database @param tabName Mongo table @param table Datatable used for insert el...
java
@Given("^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$") public void insertOnMongoTable(String dataBase, String tabName, DataTable table) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); commonspec.getMongoDBClient().insertIntoMongoDBCollection(tabName, ...
[ "@", "Given", "(", "\"^I insert into a MongoDB database '(.+?)' and table '(.+?)' this values:$\"", ")", "public", "void", "insertOnMongoTable", "(", "String", "dataBase", ",", "String", "tabName", ",", "DataTable", "table", ")", "{", "commonspec", ".", "getMongoDBClient", ...
Insert data in a MongoDB table. @param dataBase Mongo database @param tabName Mongo table @param table Datatable used for insert elements
[ "Insert", "data", "in", "a", "MongoDB", "table", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L313-L317
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDiagnosticCategoryAsync
public Observable<DiagnosticCategoryInner> getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory) { """ Get Diagnostics Category. Get Diagnostics Category. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name...
java
public Observable<DiagnosticCategoryInner> getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory) { return getSiteDiagnosticCategoryWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory).map(new Func1<ServiceResponse<DiagnosticCategoryInner>, Diag...
[ "public", "Observable", "<", "DiagnosticCategoryInner", ">", "getSiteDiagnosticCategoryAsync", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "diagnosticCategory", ")", "{", "return", "getSiteDiagnosticCategoryWithServiceResponseAsync", "(", "re...
Get Diagnostics Category. Get Diagnostics Category. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param diagnosticCategory Diagnostic Category @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Diagnost...
[ "Get", "Diagnostics", "Category", ".", "Get", "Diagnostics", "Category", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L329-L336
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.addExtension
public static File addExtension(final File f, final String extension) { """ Derives one {@link File} from another by adding the provided extension. The extension will be separated from the base file name by a ".". """ checkNotNull(f); checkNotNull(extension); Preconditions.checkArgument(!extension...
java
public static File addExtension(final File f, final String extension) { checkNotNull(f); checkNotNull(extension); Preconditions.checkArgument(!extension.isEmpty()); Preconditions.checkArgument(!f.isDirectory()); final String absolutePath = f.getAbsolutePath(); return new File(absolutePath + "."...
[ "public", "static", "File", "addExtension", "(", "final", "File", "f", ",", "final", "String", "extension", ")", "{", "checkNotNull", "(", "f", ")", ";", "checkNotNull", "(", "extension", ")", ";", "Preconditions", ".", "checkArgument", "(", "!", "extension"...
Derives one {@link File} from another by adding the provided extension. The extension will be separated from the base file name by a ".".
[ "Derives", "one", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L212-L220
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/MethodOverrideMatcher.java
MethodOverrideMatcher.matches
private boolean matches(MethodDescription target, TypeDefinition typeDefinition) { """ Checks if a type declares a method with the same signature as {@code target}. @param target The method to be checked. @param typeDefinition The type to check for declaring a method with the same signature as {@code t...
java
private boolean matches(MethodDescription target, TypeDefinition typeDefinition) { for (MethodDescription methodDescription : typeDefinition.getDeclaredMethods().filter(isVirtual())) { if (methodDescription.asSignatureToken().equals(target.asSignatureToken())) { if (matcher.matches(t...
[ "private", "boolean", "matches", "(", "MethodDescription", "target", ",", "TypeDefinition", "typeDefinition", ")", "{", "for", "(", "MethodDescription", "methodDescription", ":", "typeDefinition", ".", "getDeclaredMethods", "(", ")", ".", "filter", "(", "isVirtual", ...
Checks if a type declares a method with the same signature as {@code target}. @param target The method to be checked. @param typeDefinition The type to check for declaring a method with the same signature as {@code target}. @return {@code true} if the supplied type declares a compatible method.
[ "Checks", "if", "a", "type", "declares", "a", "method", "with", "the", "same", "signature", "as", "{", "@code", "target", "}", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/MethodOverrideMatcher.java#L88-L99
networknt/light-4j
handler/src/main/java/com/networknt/handler/Handler.java
Handler.initMapDefinedHandler
private static void initMapDefinedHandler(Map<String, Object> handler) { """ Helper method for generating the instance of a handler from its map definition in config. Ie. No mapped values for setters, or list of constructor fields. @param handler """ // If the handler is a map, the keys are the class na...
java
private static void initMapDefinedHandler(Map<String, Object> handler) { // If the handler is a map, the keys are the class name, values are the // parameters. for (Map.Entry<String, Object> entry : handler.entrySet()) { Tuple<String, Class> namedClass = splitClassAndName(entry.getKey()); // If the values ...
[ "private", "static", "void", "initMapDefinedHandler", "(", "Map", "<", "String", ",", "Object", ">", "handler", ")", "{", "// If the handler is a map, the keys are the class name, values are the", "// parameters.", "for", "(", "Map", ".", "Entry", "<", "String", ",", ...
Helper method for generating the instance of a handler from its map definition in config. Ie. No mapped values for setters, or list of constructor fields. @param handler
[ "Helper", "method", "for", "generating", "the", "instance", "of", "a", "handler", "from", "its", "map", "definition", "in", "config", ".", "Ie", ".", "No", "mapped", "values", "for", "setters", "or", "list", "of", "constructor", "fields", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L444-L481
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.isTargetOp
protected static boolean isTargetOp( TokenList.Token token , Symbol[] ops ) { """ Checks to see if the token is in the list of allowed character operations. Used to apply order of operations @param token Token being checked @param ops List of allowed character operations @return true for it being in the list a...
java
protected static boolean isTargetOp( TokenList.Token token , Symbol[] ops ) { Symbol c = token.symbol; for (int i = 0; i < ops.length; i++) { if( c == ops[i]) return true; } return false; }
[ "protected", "static", "boolean", "isTargetOp", "(", "TokenList", ".", "Token", "token", ",", "Symbol", "[", "]", "ops", ")", "{", "Symbol", "c", "=", "token", ".", "symbol", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ops", ".", "length...
Checks to see if the token is in the list of allowed character operations. Used to apply order of operations @param token Token being checked @param ops List of allowed character operations @return true for it being in the list and false for it not being in the list
[ "Checks", "to", "see", "if", "the", "token", "is", "in", "the", "list", "of", "allowed", "character", "operations", ".", "Used", "to", "apply", "order", "of", "operations" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1596-L1603
FasterXML/jackson-jr
jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/JSONReader.java
JSONReader._with
protected JSONReader _with(int features, ValueReaderLocator td, TreeCodec tc, CollectionBuilder lb, MapBuilder mb) { """ Overridable method that all mutant factories call if a new instance is to be constructed """ if (getClass() != JSONReader.class) { // sanity check throw new ...
java
protected JSONReader _with(int features, ValueReaderLocator td, TreeCodec tc, CollectionBuilder lb, MapBuilder mb) { if (getClass() != JSONReader.class) { // sanity check throw new IllegalStateException("Sub-classes MUST override _with(...)"); } return new JSONReader(...
[ "protected", "JSONReader", "_with", "(", "int", "features", ",", "ValueReaderLocator", "td", ",", "TreeCodec", "tc", ",", "CollectionBuilder", "lb", ",", "MapBuilder", "mb", ")", "{", "if", "(", "getClass", "(", ")", "!=", "JSONReader", ".", "class", ")", ...
Overridable method that all mutant factories call if a new instance is to be constructed
[ "Overridable", "method", "that", "all", "mutant", "factories", "call", "if", "a", "new", "instance", "is", "to", "be", "constructed" ]
train
https://github.com/FasterXML/jackson-jr/blob/62ca7a82bd90a9be77028e0b62364307d7532837/jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/JSONReader.java#L121-L128
Axway/Grapes
server/src/main/java/org/axway/grapes/server/webapp/resources/ArtifactResource.java
ArtifactResource.getGroupIds
@GET @Produces( { """ Return a list of groupIds, stored in Grapes. This method is call via GET <grapes_url>/artifact/groupids @return Response A list (in HTML or JSON) of gavc """MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_GROUPIDS) public Response getGroupIds(@Context...
java
@GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_GROUPIDS) public Response getGroupIds(@Context final UriInfo uriInfo){ LOG.info("Got a get groupIds request [" + uriInfo.getPath() + "]"); final ListView view = new ListView("GroupIds view", "groupId"); ...
[ "@", "GET", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_HTML", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Path", "(", "ServerAPI", ".", "GET_GROUPIDS", ")", "public", "Response", "getGroupIds", "(", "@", "Context", "final", "UriInfo", ...
Return a list of groupIds, stored in Grapes. This method is call via GET <grapes_url>/artifact/groupids @return Response A list (in HTML or JSON) of gavc
[ "Return", "a", "list", "of", "groupIds", "stored", "in", "Grapes", ".", "This", "method", "is", "call", "via", "GET", "<grapes_url", ">", "/", "artifact", "/", "groupids" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/ArtifactResource.java#L144-L158
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.setOrthoLH
public Matrix4x3f setOrthoLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) { """ Set this matrix to be an orthographic projection transformation for a left-handed coordinate system using the given NDC z range. <p> In order to apply the orthographic projection to ...
java
public Matrix4x3f setOrthoLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) { MemUtil.INSTANCE.identity(this); m00 = 2.0f / (right - left); m11 = 2.0f / (top - bottom); m22 = (zZeroToOne ? 1.0f : 2.0f) / (zFar - zNear); m30 = (right...
[ "public", "Matrix4x3f", "setOrthoLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "float", "zNear", ",", "float", "zFar", ",", "boolean", "zZeroToOne", ")", "{", "MemUtil", ".", "INSTANCE", ".", "identity"...
Set this matrix to be an orthographic projection transformation for a left-handed coordinate system using the given NDC z range. <p> In order to apply the orthographic projection to an already existing transformation, use {@link #orthoLH(float, float, float, float, float, float, boolean) orthoLH()}. <p> Reference: <a h...
[ "Set", "this", "matrix", "to", "be", "an", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "the", "given", "NDC", "z", "range", ".", "<p", ">", "In", "order", "to", "apply", "the", "orthog...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5155-L5165
rampatra/jbot
jbot/src/main/java/me/ramswaroop/jbot/core/common/BaseBot.java
BaseBot.formConversationQueue
private Queue<MethodWrapper> formConversationQueue(Queue<MethodWrapper> queue, String methodName) { """ Form a Queue with all the methods responsible for a particular conversation. @param queue @param methodName @return """ MethodWrapper methodWrapper = methodNameMap.get(methodName); queue...
java
private Queue<MethodWrapper> formConversationQueue(Queue<MethodWrapper> queue, String methodName) { MethodWrapper methodWrapper = methodNameMap.get(methodName); queue.add(methodWrapper); if (StringUtils.isEmpty(methodName)) { return queue; } else { return formConv...
[ "private", "Queue", "<", "MethodWrapper", ">", "formConversationQueue", "(", "Queue", "<", "MethodWrapper", ">", "queue", ",", "String", "methodName", ")", "{", "MethodWrapper", "methodWrapper", "=", "methodNameMap", ".", "get", "(", "methodName", ")", ";", "que...
Form a Queue with all the methods responsible for a particular conversation. @param queue @param methodName @return
[ "Form", "a", "Queue", "with", "all", "the", "methods", "responsible", "for", "a", "particular", "conversation", "." ]
train
https://github.com/rampatra/jbot/blob/0f42e1a6ec4dcbc5d1257e1307704903e771f7b5/jbot/src/main/java/me/ramswaroop/jbot/core/common/BaseBot.java#L145-L153
WolfgangFahl/Mediawiki-Japi
src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java
Mediawiki.getSectionText
public String getSectionText(String pageTitle, int sectionNumber) throws Exception { """ get the text for the given section @param pageTitle @param sectionNumber @return @throws Exception """ String result = this.getPageContent(pageTitle, "&rvsection=" + sectionNumber, false); retur...
java
public String getSectionText(String pageTitle, int sectionNumber) throws Exception { String result = this.getPageContent(pageTitle, "&rvsection=" + sectionNumber, false); return result; }
[ "public", "String", "getSectionText", "(", "String", "pageTitle", ",", "int", "sectionNumber", ")", "throws", "Exception", "{", "String", "result", "=", "this", ".", "getPageContent", "(", "pageTitle", ",", "\"&rvsection=\"", "+", "sectionNumber", ",", "false", ...
get the text for the given section @param pageTitle @param sectionNumber @return @throws Exception
[ "get", "the", "text", "for", "the", "given", "section" ]
train
https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java#L799-L804
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.data_extension_GET
public ArrayList<String> data_extension_GET(OvhCountryEnum country) throws IOException { """ List all the extensions for a specific country REST: GET /domain/data/extension @param country [required] Country targeted """ String qPath = "/domain/data/extension"; StringBuilder sb = path(qPath); query(sb...
java
public ArrayList<String> data_extension_GET(OvhCountryEnum country) throws IOException { String qPath = "/domain/data/extension"; StringBuilder sb = path(qPath); query(sb, "country", country); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
[ "public", "ArrayList", "<", "String", ">", "data_extension_GET", "(", "OvhCountryEnum", "country", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/data/extension\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", ...
List all the extensions for a specific country REST: GET /domain/data/extension @param country [required] Country targeted
[ "List", "all", "the", "extensions", "for", "a", "specific", "country" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L230-L236
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/GinjectorBindings.java
GinjectorBindings.registerLocalChildBinding
private void registerLocalChildBinding(Key<?> key, GinjectorBindings binding) { """ Register the key in the "boundLocallyInChildren" set for this injector, and recursively register it with all of the ancestors. The caller is responsible for ensuring that the binding being registered is actually local (i.e., no...
java
private void registerLocalChildBinding(Key<?> key, GinjectorBindings binding) { boundLocallyInChildren.put(key, binding); if (parent != null) { parent.registerLocalChildBinding(key, binding); } }
[ "private", "void", "registerLocalChildBinding", "(", "Key", "<", "?", ">", "key", ",", "GinjectorBindings", "binding", ")", "{", "boundLocallyInChildren", ".", "put", "(", "key", ",", "binding", ")", ";", "if", "(", "parent", "!=", "null", ")", "{", "paren...
Register the key in the "boundLocallyInChildren" set for this injector, and recursively register it with all of the ancestors. The caller is responsible for ensuring that the binding being registered is actually local (i.e., not a ParentBinding).
[ "Register", "the", "key", "in", "the", "boundLocallyInChildren", "set", "for", "this", "injector", "and", "recursively", "register", "it", "with", "all", "of", "the", "ancestors", ".", "The", "caller", "is", "responsible", "for", "ensuring", "that", "the", "bi...
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/GinjectorBindings.java#L471-L476
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/LocationHelper.java
LocationHelper.scanLocations
private static Location scanLocations(List<Location> locations, LocationPredicate predicate) { """ Used for scanning through a list of locations; assumes the locations given will have at least one value otherwise we will get a null pointer """ Location location = null; for (Location l : locations) { i...
java
private static Location scanLocations(List<Location> locations, LocationPredicate predicate) { Location location = null; for (Location l : locations) { if (location == null) { location = l; } else { if (predicate.accept(location, l)) { location = l; } } } return location; }
[ "private", "static", "Location", "scanLocations", "(", "List", "<", "Location", ">", "locations", ",", "LocationPredicate", "predicate", ")", "{", "Location", "location", "=", "null", ";", "for", "(", "Location", "l", ":", "locations", ")", "{", "if", "(", ...
Used for scanning through a list of locations; assumes the locations given will have at least one value otherwise we will get a null pointer
[ "Used", "for", "scanning", "through", "a", "list", "of", "locations", ";", "assumes", "the", "locations", "given", "will", "have", "at", "least", "one", "value", "otherwise", "we", "will", "get", "a", "null", "pointer" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/LocationHelper.java#L203-L216
redlink-gmbh/redlink-java-sdk
src/main/java/io/redlink/sdk/impl/analysis/model/Entity.java
Entity.getValue
public String getValue(String property, String language) { """ Get a literal value for a property and language passed by parameters @param property Property URI @param language Language code @return """ Multimap<Optional<String>, String> values = properties.get(property); if (values == nu...
java
public String getValue(String property, String language) { Multimap<Optional<String>, String> values = properties.get(property); if (values == null) { return null; } Iterator<String> it = values.get(Optional.of(language)).iterator(); return it.hasNext() ? it.next() ...
[ "public", "String", "getValue", "(", "String", "property", ",", "String", "language", ")", "{", "Multimap", "<", "Optional", "<", "String", ">", ",", "String", ">", "values", "=", "properties", ".", "get", "(", "property", ")", ";", "if", "(", "values", ...
Get a literal value for a property and language passed by parameters @param property Property URI @param language Language code @return
[ "Get", "a", "literal", "value", "for", "a", "property", "and", "language", "passed", "by", "parameters" ]
train
https://github.com/redlink-gmbh/redlink-java-sdk/blob/c412ff11bd80da52ade09f2483ab29cdbff5a28a/src/main/java/io/redlink/sdk/impl/analysis/model/Entity.java#L153-L162
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/states/Http2StateUtil.java
Http2StateUtil.createStream
private static synchronized void createStream(Http2Connection conn, int streamId) throws Http2Exception { """ Creates a stream with given stream id. @param conn the HTTP2 connection @param streamId the id of the stream @throws Http2Exception if a protocol-related error occurred """ conn.local(...
java
private static synchronized void createStream(Http2Connection conn, int streamId) throws Http2Exception { conn.local().createStream(streamId, false); if (LOG.isDebugEnabled()) { LOG.debug("Stream created streamId: {}", streamId); } }
[ "private", "static", "synchronized", "void", "createStream", "(", "Http2Connection", "conn", ",", "int", "streamId", ")", "throws", "Http2Exception", "{", "conn", ".", "local", "(", ")", ".", "createStream", "(", "streamId", ",", "false", ")", ";", "if", "("...
Creates a stream with given stream id. @param conn the HTTP2 connection @param streamId the id of the stream @throws Http2Exception if a protocol-related error occurred
[ "Creates", "a", "stream", "with", "given", "stream", "id", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/states/Http2StateUtil.java#L327-L332
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java
FuncSystemProperty.loadPropertyFile
public void loadPropertyFile(String file, Properties target) { """ Retrieve a propery bundle from a specified file @param file The string name of the property file. The name should already be fully qualified as path/filename @param target The target property bag the file will be placed into. """ try ...
java
public void loadPropertyFile(String file, Properties target) { try { // Use SecuritySupport class to provide priveleged access to property file SecuritySupport ss = SecuritySupport.getInstance(); InputStream is = ss.getResourceAsStream(ObjectFactory.findClassLoader(), ...
[ "public", "void", "loadPropertyFile", "(", "String", "file", ",", "Properties", "target", ")", "{", "try", "{", "// Use SecuritySupport class to provide priveleged access to property file", "SecuritySupport", "ss", "=", "SecuritySupport", ".", "getInstance", "(", ")", ";"...
Retrieve a propery bundle from a specified file @param file The string name of the property file. The name should already be fully qualified as path/filename @param target The target property bag the file will be placed into.
[ "Retrieve", "a", "propery", "bundle", "from", "a", "specified", "file" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java#L176-L197
apereo/cas
support/cas-server-support-couchdb-service-registry/src/main/java/org/apereo/cas/couchdb/services/RegisteredServiceCouchDbRepository.java
RegisteredServiceCouchDbRepository.findByServiceId
@View(name = "by_serviceId", map = "function(doc) { """ Implements search by serviceId. @param serviceId The serviceId of the service to find. @return The service found or +null+. """ if (doc.service) { emit(doc.service.serviceId, doc._id) }}") public RegisteredServiceDocument findByServiceId(final Str...
java
@View(name = "by_serviceId", map = "function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}") public RegisteredServiceDocument findByServiceId(final String serviceId) { return queryView("by_serviceId", serviceId).stream().findFirst().orElse(null); }
[ "@", "View", "(", "name", "=", "\"by_serviceId\"", ",", "map", "=", "\"function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}\"", ")", "public", "RegisteredServiceDocument", "findByServiceId", "(", "final", "String", "serviceId", ")", "{", "return", "que...
Implements search by serviceId. @param serviceId The serviceId of the service to find. @return The service found or +null+.
[ "Implements", "search", "by", "serviceId", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-couchdb-service-registry/src/main/java/org/apereo/cas/couchdb/services/RegisteredServiceCouchDbRepository.java#L36-L39
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java
TSVRead.readTSV
public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException { """ Copy data from TSV File into a new table in specified connection. @param connection @param fileName @param tableReference @throws SQLException @throws FileNot...
java
public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException { File file = URIUtilities.fileFromString(fileName); if (FileUtil.isFileImportable(file, "tsv")) { TSVDriverFunction tsvDriver = new TSVDriverFunc...
[ "public", "static", "void", "readTSV", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ")", "throws", "SQLException", ",", "FileNotFoundException", ",", "IOException", "{", "File", "file", "=", "URIUtilities", ".", "fil...
Copy data from TSV File into a new table in specified connection. @param connection @param fileName @param tableReference @throws SQLException @throws FileNotFoundException @throws IOException
[ "Copy", "data", "from", "TSV", "File", "into", "a", "new", "table", "in", "specified", "connection", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java#L60-L66
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/ChangeObjects.java
ChangeObjects.generateIDMonomerNotation
private final static String generateIDMonomerNotation(String id, String count, String annotation) { """ method to generate the MonomerNotation in String format @param id id of the MonomerNotation @param count Count of the MonomerNotation @param annotation Annotation of the MonomerNotation @return MonomerN...
java
private final static String generateIDMonomerNotation(String id, String count, String annotation) { if (id.length() > 1) { id = "[" + id + "]"; } String result = id; try { if (!(Integer.parseInt(count) == 1)) { result += "'" + count + "'"; } } catch (NumberFormatException e) { result...
[ "private", "final", "static", "String", "generateIDMonomerNotation", "(", "String", "id", ",", "String", "count", ",", "String", "annotation", ")", "{", "if", "(", "id", ".", "length", "(", ")", ">", "1", ")", "{", "id", "=", "\"[\"", "+", "id", "+", ...
method to generate the MonomerNotation in String format @param id id of the MonomerNotation @param count Count of the MonomerNotation @param annotation Annotation of the MonomerNotation @return MonomerNotation in String format
[ "method", "to", "generate", "the", "MonomerNotation", "in", "String", "format" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/ChangeObjects.java#L663-L679
JavaMoney/jsr354-api
src/main/java/javax/money/convert/ProviderContext.java
ProviderContext.of
public static ProviderContext of(String provider, RateType rateType, RateType... rateTypes) { """ Creates a new ProviderContext based on the provider id and rate type(s). @param provider the provider id, not null. @param rateType the required {@link RateType}, not null. @param rateTypes the required {@link ...
java
public static ProviderContext of(String provider, RateType rateType, RateType... rateTypes) { return ProviderContextBuilder.of(provider, rateType, rateTypes).build(); }
[ "public", "static", "ProviderContext", "of", "(", "String", "provider", ",", "RateType", "rateType", ",", "RateType", "...", "rateTypes", ")", "{", "return", "ProviderContextBuilder", ".", "of", "(", "provider", ",", "rateType", ",", "rateTypes", ")", ".", "bu...
Creates a new ProviderContext based on the provider id and rate type(s). @param provider the provider id, not null. @param rateType the required {@link RateType}, not null. @param rateTypes the required {@link RateType}s, not null @return a new {@link ProviderContext} instance.
[ "Creates", "a", "new", "ProviderContext", "based", "on", "the", "provider", "id", "and", "rate", "type", "(", "s", ")", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/convert/ProviderContext.java#L92-L94
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethodsSupport.java
DefaultGroovyMethodsSupport.tryClose
static Throwable tryClose(AutoCloseable closeable, boolean logWarning) { """ Attempts to close the closeable returning rather than throwing any Exception that may occur. @param closeable the thing to close @param logWarning if true will log a warning if an exception occurs @return throwable Exception from th...
java
static Throwable tryClose(AutoCloseable closeable, boolean logWarning) { Throwable thrown = null; if (closeable != null) { try { closeable.close(); } catch (Exception e) { thrown = e; if (logWarning) { LOG.warnin...
[ "static", "Throwable", "tryClose", "(", "AutoCloseable", "closeable", ",", "boolean", "logWarning", ")", "{", "Throwable", "thrown", "=", "null", ";", "if", "(", "closeable", "!=", "null", ")", "{", "try", "{", "closeable", ".", "close", "(", ")", ";", "...
Attempts to close the closeable returning rather than throwing any Exception that may occur. @param closeable the thing to close @param logWarning if true will log a warning if an exception occurs @return throwable Exception from the close method, else null
[ "Attempts", "to", "close", "the", "closeable", "returning", "rather", "than", "throwing", "any", "Exception", "that", "may", "occur", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethodsSupport.java#L132-L145
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.registerCommandHandler
public void registerCommandHandler (MessageBundle msg, String command, CommandHandler handler) { """ Registers a chat command handler. @param msg the message bundle via which the slash command will be translated (as <code>c.</code><i>command</i>). If no translation exists the command will be <code>/</code><i>...
java
public void registerCommandHandler (MessageBundle msg, String command, CommandHandler handler) { // the usage key is derived from the untranslated command handler._usageKey = "m.usage_" + command; String key = "c." + command; handler._aliases = msg.exists(key) ? msg.get(key).split("...
[ "public", "void", "registerCommandHandler", "(", "MessageBundle", "msg", ",", "String", "command", ",", "CommandHandler", "handler", ")", "{", "// the usage key is derived from the untranslated command", "handler", ".", "_usageKey", "=", "\"m.usage_\"", "+", "command", ";...
Registers a chat command handler. @param msg the message bundle via which the slash command will be translated (as <code>c.</code><i>command</i>). If no translation exists the command will be <code>/</code><i>command</i>. @param command the name of the command that will be used to invoke this handler (e.g. <code>tell<...
[ "Registers", "a", "chat", "command", "handler", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L265-L275
voldemort/voldemort
src/java/voldemort/utils/JmxUtils.java
JmxUtils.unregisterMbean
public static void unregisterMbean(MBeanServer server, ObjectName name) { """ Unregister the mbean with the given name @param server The server to unregister from @param name The name of the mbean to unregister """ try { server.unregisterMBean(name); } catch(Exception e) { ...
java
public static void unregisterMbean(MBeanServer server, ObjectName name) { try { server.unregisterMBean(name); } catch(Exception e) { logger.error("Error unregistering mbean", e); } }
[ "public", "static", "void", "unregisterMbean", "(", "MBeanServer", "server", ",", "ObjectName", "name", ")", "{", "try", "{", "server", ".", "unregisterMBean", "(", "name", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "logger", ".", "error", ...
Unregister the mbean with the given name @param server The server to unregister from @param name The name of the mbean to unregister
[ "Unregister", "the", "mbean", "with", "the", "given", "name" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/JmxUtils.java#L333-L339
belaban/JGroups
src/org/jgroups/util/RingBuffer.java
RingBuffer.waitForMessages
public int waitForMessages(int num_spins, final BiConsumer<Integer,Integer> wait_strategy) throws InterruptedException { """ Blocks until messages are available @param num_spins the number of times we should spin before acquiring a lock @param wait_strategy the strategy used to spin. The first parameter is the i...
java
public int waitForMessages(int num_spins, final BiConsumer<Integer,Integer> wait_strategy) throws InterruptedException { // try spinning first (experimental) for(int i=0; i < num_spins && count == 0; i++) { if(wait_strategy != null) wait_strategy.accept(i, num_spins); ...
[ "public", "int", "waitForMessages", "(", "int", "num_spins", ",", "final", "BiConsumer", "<", "Integer", ",", "Integer", ">", "wait_strategy", ")", "throws", "InterruptedException", "{", "// try spinning first (experimental)", "for", "(", "int", "i", "=", "0", ";"...
Blocks until messages are available @param num_spins the number of times we should spin before acquiring a lock @param wait_strategy the strategy used to spin. The first parameter is the iteration count and the second parameter is the max number of spins
[ "Blocks", "until", "messages", "are", "available" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/RingBuffer.java#L274-L285
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.translationRotateScaleInvert
public Matrix4d translationRotateScaleInvert(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double sz) { """ Set <code>this</code> matrix to <code>(T * R * S)<sup>...
java
public Matrix4d translationRotateScaleInvert(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double sz) { boolean one = Math.abs(sx) == 1.0 && Math.abs(sy) == 1....
[ "public", "Matrix4d", "translationRotateScaleInvert", "(", "double", "tx", ",", "double", "ty", ",", "double", "tz", ",", "double", "qx", ",", "double", "qy", ",", "double", "qz", ",", "double", "qw", ",", "double", "sx", ",", "double", "sy", ",", "doubl...
Set <code>this</code> matrix to <code>(T * R * S)<sup>-1</sup></code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code>, <code>R</code> is a rotation transformation specified by the quaternion <code>(qx, qy, qz, qw)</code>, and <code>S</code> is a scaling transformation which scales the thre...
[ "Set", "<code", ">", "this<", "/", "code", ">", "matrix", "to", "<code", ">", "(", "T", "*", "R", "*", "S", ")", "<sup", ">", "-", "1<", "/", "sup", ">", "<", "/", "code", ">", "where", "<code", ">", "T<", "/", "code", ">", "is", "a", "tran...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L7197-L7235
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/struct/flow/ImageFlow.java
ImageFlow.reshape
public void reshape( int width , int height ) { """ Changes the shape to match the specified dimension. Memory will only be created/destroyed if the requested size is larger than any previously requested size @param width New image width @param height new image height """ int N = width*height; if( data...
java
public void reshape( int width , int height ) { int N = width*height; if( data.length < N ) { D tmp[] = new D[N]; System.arraycopy(data,0,tmp,0,data.length); for( int i = data.length; i < N; i++ ) tmp[i] = new D(); data = tmp; } this.width = width; this.height = height; }
[ "public", "void", "reshape", "(", "int", "width", ",", "int", "height", ")", "{", "int", "N", "=", "width", "*", "height", ";", "if", "(", "data", ".", "length", "<", "N", ")", "{", "D", "tmp", "[", "]", "=", "new", "D", "[", "N", "]", ";", ...
Changes the shape to match the specified dimension. Memory will only be created/destroyed if the requested size is larger than any previously requested size @param width New image width @param height new image height
[ "Changes", "the", "shape", "to", "match", "the", "specified", "dimension", ".", "Memory", "will", "only", "be", "created", "/", "destroyed", "if", "the", "requested", "size", "is", "larger", "than", "any", "previously", "requested", "size" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/struct/flow/ImageFlow.java#L44-L56
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.incrBy
@Override public Long incrBy(final byte[] key, final long increment) { """ INCRBY work just like {@link #incr(byte[]) INCR} but instead to increment by 1 the increment is integer. <p> INCR commands are limited to 64 bit signed integers. <p> Note: this is actually a string operation, that is, in Redis there ...
java
@Override public Long incrBy(final byte[] key, final long increment) { checkIsInMultiOrPipeline(); client.incrBy(key, increment); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "incrBy", "(", "final", "byte", "[", "]", "key", ",", "final", "long", "increment", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "incrBy", "(", "key", ",", "increment", ")", ";", "return", "client...
INCRBY work just like {@link #incr(byte[]) INCR} but instead to increment by 1 the increment is integer. <p> INCR commands are limited to 64 bit signed integers. <p> Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 ...
[ "INCRBY", "work", "just", "like", "{" ]
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L781-L786
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.deleteDirectories
public static void deleteDirectories(FileSystem fs, List<String> directoriesToDelete, boolean recursive, boolean moveToTrash) throws IOException { """ Calls deletePath() on each directory in the given list of directories to delete. If moveToTrash is set, it will be moved to trash according to the file system tras...
java
public static void deleteDirectories(FileSystem fs, List<String> directoriesToDelete, boolean recursive, boolean moveToTrash) throws IOException { for (String directory : directoriesToDelete) { if (moveToTrash) { moveToTrash(fs, new Path(directory)); } else { deletePath(fs, new Path(dire...
[ "public", "static", "void", "deleteDirectories", "(", "FileSystem", "fs", ",", "List", "<", "String", ">", "directoriesToDelete", ",", "boolean", "recursive", ",", "boolean", "moveToTrash", ")", "throws", "IOException", "{", "for", "(", "String", "directory", ":...
Calls deletePath() on each directory in the given list of directories to delete. If moveToTrash is set, it will be moved to trash according to the file system trash policy.
[ "Calls", "deletePath", "()", "on", "each", "directory", "in", "the", "given", "list", "of", "directories", "to", "delete", ".", "If", "moveToTrash", "is", "set", "it", "will", "be", "moved", "to", "trash", "according", "to", "the", "file", "system", "trash...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L157-L165
upwork/java-upwork
src/com/Upwork/api/Routers/Snapshot.java
Snapshot.getByContract
public JSONObject getByContract(String contractId, String ts) throws JSONException { """ Get snapshot info by specific contract @param contractId Contract ID @param ts Timestamp @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.get("/team/v3/snapshots/co...
java
public JSONObject getByContract(String contractId, String ts) throws JSONException { return oClient.get("/team/v3/snapshots/contracts/" + contractId + "/" + ts); }
[ "public", "JSONObject", "getByContract", "(", "String", "contractId", ",", "String", "ts", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/team/v3/snapshots/contracts/\"", "+", "contractId", "+", "\"/\"", "+", "ts", ")", ";", "}" ]
Get snapshot info by specific contract @param contractId Contract ID @param ts Timestamp @throws JSONException If error occurred @return {@link JSONObject}
[ "Get", "snapshot", "info", "by", "specific", "contract" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Snapshot.java#L54-L56
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/LocalWeightedHistogramRotRect.java
LocalWeightedHistogramRotRect.computeHistogram
public void computeHistogram( T image , RectangleRotate_F32 region ) { """ Computes the histogram inside the specified region. Results are returned by calling {@link #getHistogram()}. @param image Input image @param region Region which is to be sampled """ interpolate.setImage(image); c = (float)Mat...
java
public void computeHistogram( T image , RectangleRotate_F32 region ) { interpolate.setImage(image); c = (float)Math.cos( region.theta ); s = (float)Math.sin( region.theta ); for( int i = 0; i < histogram.length; i++ ) { histogram[i] = 0; } // if it is entirely inside the image, interpolate using a fa...
[ "public", "void", "computeHistogram", "(", "T", "image", ",", "RectangleRotate_F32", "region", ")", "{", "interpolate", ".", "setImage", "(", "image", ")", ";", "c", "=", "(", "float", ")", "Math", ".", "cos", "(", "region", ".", "theta", ")", ";", "s"...
Computes the histogram inside the specified region. Results are returned by calling {@link #getHistogram()}. @param image Input image @param region Region which is to be sampled
[ "Computes", "the", "histogram", "inside", "the", "specified", "region", ".", "Results", "are", "returned", "by", "calling", "{", "@link", "#getHistogram", "()", "}", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/LocalWeightedHistogramRotRect.java#L134-L153
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java
DefaultExternalContentManager.getFileDatastreamHeaders
private static Property[] getFileDatastreamHeaders(String canonicalPath, long lastModified) { """ Content-Length is determined elsewhere Content-Type is determined elsewhere Last-Modified ETag @param String canonicalPath: the canonical path to a file system resource @param lastModified lastModified: the date ...
java
private static Property[] getFileDatastreamHeaders(String canonicalPath, long lastModified) { Property[] result = new Property[3]; String eTag = MD5Utility.getBase16Hash(canonicalPath.concat(Long.toString(lastModified))); result[0] = new Property(HttpHeaders.ACCEPT_RANGES,"bytes"); ...
[ "private", "static", "Property", "[", "]", "getFileDatastreamHeaders", "(", "String", "canonicalPath", ",", "long", "lastModified", ")", "{", "Property", "[", "]", "result", "=", "new", "Property", "[", "3", "]", ";", "String", "eTag", "=", "MD5Utility", "."...
Content-Length is determined elsewhere Content-Type is determined elsewhere Last-Modified ETag @param String canonicalPath: the canonical path to a file system resource @param lastModified lastModified: the date of last modification @return
[ "Content", "-", "Length", "is", "determined", "elsewhere", "Content", "-", "Type", "is", "determined", "elsewhere", "Last", "-", "Modified", "ETag" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java#L437-L446
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/Content.java
Content.getString
String getString(Object scope, String propertyPath) throws TemplateException { """ Convenient method to call {@link #getString(Object, String, Format)} with null formatter. @param scope object scope, @param propertyPath object property path. @return content value as string, possible null. @throws TemplateExc...
java
String getString(Object scope, String propertyPath) throws TemplateException { return getString(scope, propertyPath, null); }
[ "String", "getString", "(", "Object", "scope", ",", "String", "propertyPath", ")", "throws", "TemplateException", "{", "return", "getString", "(", "scope", ",", "propertyPath", ",", "null", ")", ";", "}" ]
Convenient method to call {@link #getString(Object, String, Format)} with null formatter. @param scope object scope, @param propertyPath object property path. @return content value as string, possible null. @throws TemplateException if requested value is undefined.
[ "Convenient", "method", "to", "call", "{", "@link", "#getString", "(", "Object", "String", "Format", ")", "}", "with", "null", "formatter", "." ]
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/Content.java#L228-L231
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/Validate.java
Validate.isTrue
public static void isTrue(final boolean expression, final String message, final double value) { """ <p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as valid...
java
public static void isTrue(final boolean expression, final String message, final double value) { INSTANCE.isTrue(expression, message, value); }
[ "public", "static", "void", "isTrue", "(", "final", "boolean", "expression", ",", "final", "String", "message", ",", "final", "double", "value", ")", "{", "INSTANCE", ".", "isTrue", "(", "expression", ",", "message", ",", "value", ")", ";", "}" ]
<p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.</p> <pre> Validate.isTrue(d &gt; ...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "true", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/Validate.java#L695-L697
liyiorg/weixin-popular
src/main/java/weixin/popular/api/SemanticAPI.java
SemanticAPI.semproxySearch
public static SemproxySearchResult semproxySearch(String accessToken, SemproxySearch semproxySearch) { """ 语义理解 @param accessToken access_token @param semproxySearch semproxySearch @return SemproxySearchResult @since 2.8.22 """ return semproxySearch(accessToken, JsonUtil.toJSONString(semproxy...
java
public static SemproxySearchResult semproxySearch(String accessToken, SemproxySearch semproxySearch) { return semproxySearch(accessToken, JsonUtil.toJSONString(semproxySearch)); }
[ "public", "static", "SemproxySearchResult", "semproxySearch", "(", "String", "accessToken", ",", "SemproxySearch", "semproxySearch", ")", "{", "return", "semproxySearch", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "semproxySearch", ")", ")", ";", ...
语义理解 @param accessToken access_token @param semproxySearch semproxySearch @return SemproxySearchResult @since 2.8.22
[ "语义理解" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SemanticAPI.java#L50-L52
operasoftware/operaprestodriver
src/com/opera/core/systems/internal/WatirUtils.java
WatirUtils.copyDirAndFiles
public static boolean copyDirAndFiles(File source, File destination) { """ Copies the whole disk directory/file structure starting from the source path to the destination path. @param source the source path, may designate either a file or a directory @param destination the destination path """ lo...
java
public static boolean copyDirAndFiles(File source, File destination) { logger.finest(String.format("WatirUtils::copyDirAndFiles(%s, %s)", source.getAbsolutePath(), destination.getAbsolutePath())); if (source.isDirectory()) { String[] items; items = source.list(); ...
[ "public", "static", "boolean", "copyDirAndFiles", "(", "File", "source", ",", "File", "destination", ")", "{", "logger", ".", "finest", "(", "String", ".", "format", "(", "\"WatirUtils::copyDirAndFiles(%s, %s)\"", ",", "source", ".", "getAbsolutePath", "(", ")", ...
Copies the whole disk directory/file structure starting from the source path to the destination path. @param source the source path, may designate either a file or a directory @param destination the destination path
[ "Copies", "the", "whole", "disk", "directory", "/", "file", "structure", "starting", "from", "the", "source", "path", "to", "the", "destination", "path", "." ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/internal/WatirUtils.java#L91-L121
zafarkhaja/jsemver
src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java
ExpressionParser.parseVersion
private Version parseVersion() { """ Parses the {@literal <version>} non-terminal. <pre> {@literal <version> ::= <major> | <major> "." <minor> | <major> "." <minor> "." <patch> } </pre> @return the parsed version """ int major = intOf(consumeNextToken(NUMERIC).lexeme); int minor = 0...
java
private Version parseVersion() { int major = intOf(consumeNextToken(NUMERIC).lexeme); int minor = 0; if (tokens.positiveLookahead(DOT)) { tokens.consume(); minor = intOf(consumeNextToken(NUMERIC).lexeme); } int patch = 0; if (tokens.positiveLookahe...
[ "private", "Version", "parseVersion", "(", ")", "{", "int", "major", "=", "intOf", "(", "consumeNextToken", "(", "NUMERIC", ")", ".", "lexeme", ")", ";", "int", "minor", "=", "0", ";", "if", "(", "tokens", ".", "positiveLookahead", "(", "DOT", ")", ")"...
Parses the {@literal <version>} non-terminal. <pre> {@literal <version> ::= <major> | <major> "." <minor> | <major> "." <minor> "." <patch> } </pre> @return the parsed version
[ "Parses", "the", "{", "@literal", "<version", ">", "}", "non", "-", "terminal", "." ]
train
https://github.com/zafarkhaja/jsemver/blob/1f4996ea3dab06193c378fd66fd4f8fdc8334cc6/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java#L412-L425
dmart28/reveno
reveno-core/src/main/java/org/reveno/atp/core/repository/ImmutableModelRepository.java
ImmutableModelRepository.isDeleted
protected boolean isDeleted(Class<?> type, long key) { """ /* size checking mainly for performance issues on cases where there is no need to check map """ return removed.size() > 0 && removed.containsKey(type) && removed.get(type).size() > 0 && removed.get(type).contains(key); }
java
protected boolean isDeleted(Class<?> type, long key) { return removed.size() > 0 && removed.containsKey(type) && removed.get(type).size() > 0 && removed.get(type).contains(key); }
[ "protected", "boolean", "isDeleted", "(", "Class", "<", "?", ">", "type", ",", "long", "key", ")", "{", "return", "removed", ".", "size", "(", ")", ">", "0", "&&", "removed", ".", "containsKey", "(", "type", ")", "&&", "removed", ".", "get", "(", "...
/* size checking mainly for performance issues on cases where there is no need to check map
[ "/", "*", "size", "checking", "mainly", "for", "performance", "issues", "on", "cases", "where", "there", "is", "no", "need", "to", "check", "map" ]
train
https://github.com/dmart28/reveno/blob/33617651fab8f0c0af70e7d3af7273cdbfe164d2/reveno-core/src/main/java/org/reveno/atp/core/repository/ImmutableModelRepository.java#L164-L166
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/util/WhitelistObjectInputStream.java
WhitelistObjectInputStream.loadWhitelist
private static void loadWhitelist(InputStream input) { """ Load the whitelist from an {@link InputStream}. The content of the {@code InputStream} is in format: {@code # Java java.util.ArrayList java.util.HashMap # A regular expression whitelisting the whole "java.lang" package and its sub-packages >java.lan...
java
private static void loadWhitelist(InputStream input) { String content; try { content = IoUtils.toString(input); } catch (IOException e) { throw new RuntimeException("Error loading the whitelist input", e); } whiteClassNames = new HashSet<>(); whit...
[ "private", "static", "void", "loadWhitelist", "(", "InputStream", "input", ")", "{", "String", "content", ";", "try", "{", "content", "=", "IoUtils", ".", "toString", "(", "input", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new"...
Load the whitelist from an {@link InputStream}. The content of the {@code InputStream} is in format: {@code # Java java.util.ArrayList java.util.HashMap # A regular expression whitelisting the whole "java.lang" package and its sub-packages >java.lang.* # Pippo ro.pippo.session.DefaultSessionData ro.pippo.core.Flash } ...
[ "Load", "the", "whitelist", "from", "an", "{", "@link", "InputStream", "}", ".", "The", "content", "of", "the", "{", "@code", "InputStream", "}", "is", "in", "format", ":", "{", "@code", "#", "Java", "java", ".", "util", ".", "ArrayList", "java", ".", ...
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/util/WhitelistObjectInputStream.java#L92-L119
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
ThrowableProxy.getExtendedStackTraceAsString
public String getExtendedStackTraceAsString(final List<String> ignorePackages, final TextRenderer textRenderer, final String suffix) { """ Format the stack trace including packaging information. @param ignorePackages List of packages to be ignored in the trace. @param textRenderer The message renderer @para...
java
public String getExtendedStackTraceAsString(final List<String> ignorePackages, final TextRenderer textRenderer, final String suffix) { final StringBuilder sb = new StringBuilder(1024); textRenderer.render(name, sb, "Name"); textRenderer.render(": ", sb, "NameMessageSeparator"); textRende...
[ "public", "String", "getExtendedStackTraceAsString", "(", "final", "List", "<", "String", ">", "ignorePackages", ",", "final", "TextRenderer", "textRenderer", ",", "final", "String", "suffix", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", ...
Format the stack trace including packaging information. @param ignorePackages List of packages to be ignored in the trace. @param textRenderer The message renderer @param suffix @return The formatted stack trace including packaging information.
[ "Format", "the", "stack", "trace", "including", "packaging", "information", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java#L485-L497
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java
OmemoService.publishDeviceList
static void publishDeviceList(XMPPConnection connection, OmemoDeviceListElement deviceList) throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException { """ Publish the given device list to the server. @param conn...
java
static void publishDeviceList(XMPPConnection connection, OmemoDeviceListElement deviceList) throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException { PubSubManager.getInstanceFor(connection, connection.getUs...
[ "static", "void", "publishDeviceList", "(", "XMPPConnection", "connection", ",", "OmemoDeviceListElement", "deviceList", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "SmackE...
Publish the given device list to the server. @param connection authenticated XMPP connection. @param deviceList users deviceList. @throws InterruptedException @throws XMPPException.XMPPErrorException @throws SmackException.NotConnectedException @throws SmackException.NoResponseException @throws PubSubException.NotALeaf...
[ "Publish", "the", "given", "device", "list", "to", "the", "server", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java#L635-L641