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
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java
SparkUtils.writeSchema
public static void writeSchema(String outputPath, Schema schema, JavaSparkContext sc) throws IOException { """ Write a schema to a HDFS (or, local) file in a human-readable format @param outputPath Output path to write to @param schema Schema to write @param sc Spark context """ ...
java
public static void writeSchema(String outputPath, Schema schema, JavaSparkContext sc) throws IOException { writeStringToFile(outputPath, schema.toString(), sc); }
[ "public", "static", "void", "writeSchema", "(", "String", "outputPath", ",", "Schema", "schema", ",", "JavaSparkContext", "sc", ")", "throws", "IOException", "{", "writeStringToFile", "(", "outputPath", ",", "schema", ".", "toString", "(", ")", ",", "sc", ")",...
Write a schema to a HDFS (or, local) file in a human-readable format @param outputPath Output path to write to @param schema Schema to write @param sc Spark context
[ "Write", "a", "schema", "to", "a", "HDFS", "(", "or", "local", ")", "file", "in", "a", "human", "-", "readable", "format" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java#L227-L229
google/closure-compiler
src/com/google/javascript/jscomp/JSError.java
JSError.make
public static JSError make(Node n, DiagnosticType type, String... arguments) { """ Creates a JSError from a file and Node position. @param n Determines the line and char position and source file name @param type The DiagnosticType @param arguments Arguments to be incorporated into the message """ retu...
java
public static JSError make(Node n, DiagnosticType type, String... arguments) { return new JSError(n.getSourceFileName(), n, type, arguments); }
[ "public", "static", "JSError", "make", "(", "Node", "n", ",", "DiagnosticType", "type", ",", "String", "...", "arguments", ")", "{", "return", "new", "JSError", "(", "n", ".", "getSourceFileName", "(", ")", ",", "n", ",", "type", ",", "arguments", ")", ...
Creates a JSError from a file and Node position. @param n Determines the line and char position and source file name @param type The DiagnosticType @param arguments Arguments to be incorporated into the message
[ "Creates", "a", "JSError", "from", "a", "file", "and", "Node", "position", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JSError.java#L119-L121
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/SmartCache.java
SmartCache.put
@Override public synchronized Object put(Object key, Object value) { """ Add a new value to the cache. The value will expire in accordance with the cache's expiration timeout value which was set when the cache was created. @param key the key, typically a String @param value the value @return the previous...
java
@Override public synchronized Object put(Object key, Object value) { ValueWrapper valueWrapper = new ValueWrapper(value); return super.put(key, valueWrapper); }
[ "@", "Override", "public", "synchronized", "Object", "put", "(", "Object", "key", ",", "Object", "value", ")", "{", "ValueWrapper", "valueWrapper", "=", "new", "ValueWrapper", "(", "value", ")", ";", "return", "super", ".", "put", "(", "key", ",", "valueWr...
Add a new value to the cache. The value will expire in accordance with the cache's expiration timeout value which was set when the cache was created. @param key the key, typically a String @param value the value @return the previous value of the specified key in this hashtable, or null if it did not have one.
[ "Add", "a", "new", "value", "to", "the", "cache", ".", "The", "value", "will", "expire", "in", "accordance", "with", "the", "cache", "s", "expiration", "timeout", "value", "which", "was", "set", "when", "the", "cache", "was", "created", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/SmartCache.java#L80-L84
Netflix/spectator
spectator-ext-sandbox/src/main/java/com/netflix/spectator/sandbox/HttpRequestBuilder.java
HttpRequestBuilder.addHeader
public HttpRequestBuilder addHeader(String name, String value) { """ Add a header to the request. Note the content type will be set automatically when providing the content payload and should not be set here. """ reqHeaders.put(name, value); entry.withRequestHeader(name, value); return this; }
java
public HttpRequestBuilder addHeader(String name, String value) { reqHeaders.put(name, value); entry.withRequestHeader(name, value); return this; }
[ "public", "HttpRequestBuilder", "addHeader", "(", "String", "name", ",", "String", "value", ")", "{", "reqHeaders", ".", "put", "(", "name", ",", "value", ")", ";", "entry", ".", "withRequestHeader", "(", "name", ",", "value", ")", ";", "return", "this", ...
Add a header to the request. Note the content type will be set automatically when providing the content payload and should not be set here.
[ "Add", "a", "header", "to", "the", "request", ".", "Note", "the", "content", "type", "will", "be", "set", "automatically", "when", "providing", "the", "content", "payload", "and", "should", "not", "be", "set", "here", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-ext-sandbox/src/main/java/com/netflix/spectator/sandbox/HttpRequestBuilder.java#L81-L85
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.isGreaterThanOrEqual
public static IsGreaterThanOrEqual isGreaterThanOrEqual(ComparableExpression<Number> left, ComparableExpression<Number> right) { """ Creates an IsGreaterThanOrEqual expression from the given expressions. @param left The left expression. @param right The right expression. @return A new IsGreaterThanOrEqual bi...
java
public static IsGreaterThanOrEqual isGreaterThanOrEqual(ComparableExpression<Number> left, ComparableExpression<Number> right) { return new IsGreaterThanOrEqual(left, right); }
[ "public", "static", "IsGreaterThanOrEqual", "isGreaterThanOrEqual", "(", "ComparableExpression", "<", "Number", ">", "left", ",", "ComparableExpression", "<", "Number", ">", "right", ")", "{", "return", "new", "IsGreaterThanOrEqual", "(", "left", ",", "right", ")", ...
Creates an IsGreaterThanOrEqual expression from the given expressions. @param left The left expression. @param right The right expression. @return A new IsGreaterThanOrEqual binary expression.
[ "Creates", "an", "IsGreaterThanOrEqual", "expression", "from", "the", "given", "expressions", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L274-L276
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/wsspi/pmi/factory/StatsFactory.java
StatsFactory.createStatsInstance
@Deprecated public static StatsInstance createStatsInstance(String instanceName, String statsTemplate, ObjectName mBean, StatisticActionListener listener) throws StatsFactoryException { """ Create a StatsInstance using the Stats template and add to the PMI tree at the root level. This meth...
java
@Deprecated public static StatsInstance createStatsInstance(String instanceName, String statsTemplate, ObjectName mBean, StatisticActionListener listener) throws StatsFactoryException { if (tc.isEntryEnabled()) Tr.entry(tc, new StringBuffer("createStatsInstance:name=").append...
[ "@", "Deprecated", "public", "static", "StatsInstance", "createStatsInstance", "(", "String", "instanceName", ",", "String", "statsTemplate", ",", "ObjectName", "mBean", ",", "StatisticActionListener", "listener", ")", "throws", "StatsFactoryException", "{", "if", "(", ...
Create a StatsInstance using the Stats template and add to the PMI tree at the root level. This method will associate the MBean provided by the caller to the Stats instance. @param instanceName name of the instance @param statsTemplate location of the Stats template XML file @param mBean MBean that needs to be associa...
[ "Create", "a", "StatsInstance", "using", "the", "Stats", "template", "and", "add", "to", "the", "PMI", "tree", "at", "the", "root", "level", ".", "This", "method", "will", "associate", "the", "MBean", "provided", "by", "the", "caller", "to", "the", "Stats"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/wsspi/pmi/factory/StatsFactory.java#L226-L243
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiBookmark.java
BoxApiBookmark.getMoveRequest
public BoxRequestsBookmark.UpdateBookmark getMoveRequest(String id, String parentId) { """ Gets a request that moves a bookmark to another folder @param id id of bookmark to move @param parentId id of parent folder to move bookmark into @return request to move a bookmark """ BoxReques...
java
public BoxRequestsBookmark.UpdateBookmark getMoveRequest(String id, String parentId) { BoxRequestsBookmark.UpdateBookmark request = new BoxRequestsBookmark.UpdateBookmark(id, getBookmarkInfoUrl(id), mSession); request.setParentId(parentId); return request; }
[ "public", "BoxRequestsBookmark", ".", "UpdateBookmark", "getMoveRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsBookmark", ".", "UpdateBookmark", "request", "=", "new", "BoxRequestsBookmark", ".", "UpdateBookmark", "(", "id", ",", "ge...
Gets a request that moves a bookmark to another folder @param id id of bookmark to move @param parentId id of parent folder to move bookmark into @return request to move a bookmark
[ "Gets", "a", "request", "that", "moves", "a", "bookmark", "to", "another", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiBookmark.java#L133-L137
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.adaptForInsert
private void adaptForInsert(final ITreeData paramNewNode, final boolean addAsFirstChild) throws TTException { """ Adapting everything for insert operations. @param paramNewNode pointer of the new node to be inserted @param addAsFirstChild determines the position where to insert @throws TTIOException if any...
java
private void adaptForInsert(final ITreeData paramNewNode, final boolean addAsFirstChild) throws TTException { assert paramNewNode != null; if (paramNewNode instanceof ITreeStructData) { final ITreeStructData strucNode = (ITreeStructData)paramNewNode; final ITreeStructData parent...
[ "private", "void", "adaptForInsert", "(", "final", "ITreeData", "paramNewNode", ",", "final", "boolean", "addAsFirstChild", ")", "throws", "TTException", "{", "assert", "paramNewNode", "!=", "null", ";", "if", "(", "paramNewNode", "instanceof", "ITreeStructData", ")...
Adapting everything for insert operations. @param paramNewNode pointer of the new node to be inserted @param addAsFirstChild determines the position where to insert @throws TTIOException if anything weird happens
[ "Adapting", "everything", "for", "insert", "operations", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L514-L540
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java
HttpMessage.addIntField
public void addIntField(String name, int value) { """ Adds the value of an integer field. Header or Trailer fields are set depending on message state. @param name the field name @param value the field integer value """ if (_state!=__MSG_EDITABLE) return; _header.add(name, TypeUti...
java
public void addIntField(String name, int value) { if (_state!=__MSG_EDITABLE) return; _header.add(name, TypeUtil.toString(value)); }
[ "public", "void", "addIntField", "(", "String", "name", ",", "int", "value", ")", "{", "if", "(", "_state", "!=", "__MSG_EDITABLE", ")", "return", ";", "_header", ".", "add", "(", "name", ",", "TypeUtil", ".", "toString", "(", "value", ")", ")", ";", ...
Adds the value of an integer field. Header or Trailer fields are set depending on message state. @param name the field name @param value the field integer value
[ "Adds", "the", "value", "of", "an", "integer", "field", ".", "Header", "or", "Trailer", "fields", "are", "set", "depending", "on", "message", "state", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L346-L351
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java
InstantSearch.registerSearchView
public void registerSearchView(@NonNull Activity activity, SearchBoxViewModel searchBoxViewModel) { """ Registers a SearchViewModel to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param sear...
java
public void registerSearchView(@NonNull Activity activity, SearchBoxViewModel searchBoxViewModel) { this.searchBoxViewModel = searchBoxViewModel; final SearchViewFacade searchView = searchBoxViewModel.getSearchView(); final SearchManager searchManager = (SearchManager) searchView.getContext().ge...
[ "public", "void", "registerSearchView", "(", "@", "NonNull", "Activity", "activity", ",", "SearchBoxViewModel", "searchBoxViewModel", ")", "{", "this", ".", "searchBoxViewModel", "=", "searchBoxViewModel", ";", "final", "SearchViewFacade", "searchView", "=", "searchBoxV...
Registers a SearchViewModel to trigger search requests on text change, replacing the current one if any. @param activity The searchable activity, see {@link android.app.SearchableInfo}. @param searchBoxViewModel a SearchBoxViewModel which SearchView's query text will be used.
[ "Registers", "a", "SearchViewModel", "to", "trigger", "search", "requests", "on", "text", "change", "replacing", "the", "current", "one", "if", "any", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L241-L249
johnkil/Android-AppMsg
library/src/com/devspark/appmsg/AppMsg.java
AppMsg.setAnimation
public AppMsg setAnimation(int inAnimation, int outAnimation) { """ Sets the Animations to be used when displaying/removing the Crouton. @param inAnimation the Animation resource ID to be used when displaying. @param outAnimation the Animation resource ID to be used when removing. """ return setAnima...
java
public AppMsg setAnimation(int inAnimation, int outAnimation) { return setAnimation(AnimationUtils.loadAnimation(mActivity, inAnimation), AnimationUtils.loadAnimation(mActivity, outAnimation)); }
[ "public", "AppMsg", "setAnimation", "(", "int", "inAnimation", ",", "int", "outAnimation", ")", "{", "return", "setAnimation", "(", "AnimationUtils", ".", "loadAnimation", "(", "mActivity", ",", "inAnimation", ")", ",", "AnimationUtils", ".", "loadAnimation", "(",...
Sets the Animations to be used when displaying/removing the Crouton. @param inAnimation the Animation resource ID to be used when displaying. @param outAnimation the Animation resource ID to be used when removing.
[ "Sets", "the", "Animations", "to", "be", "used", "when", "displaying", "/", "removing", "the", "Crouton", "." ]
train
https://github.com/johnkil/Android-AppMsg/blob/e7fdd7870530a24e6d825278ee0863be0521e8b8/library/src/com/devspark/appmsg/AppMsg.java#L602-L605
mabe02/lanterna
src/main/java/com/googlecode/lanterna/gui2/Panel.java
Panel.addComponent
public Panel addComponent(int index, Component component) { """ Adds a new child component to the panel. Where within the panel the child will be displayed is up to the layout manager assigned to this panel. If the component has already been added to another panel, it will first be removed from that panel before...
java
public Panel addComponent(int index, Component component) { if(component == null) { throw new IllegalArgumentException("Cannot add null component"); } synchronized(components) { if(components.contains(component)) { return this; } if...
[ "public", "Panel", "addComponent", "(", "int", "index", ",", "Component", "component", ")", "{", "if", "(", "component", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Cannot add null component\"", ")", ";", "}", "synchronized", "(",...
Adds a new child component to the panel. Where within the panel the child will be displayed is up to the layout manager assigned to this panel. If the component has already been added to another panel, it will first be removed from that panel before added to this one. @param component Child component to add to this pan...
[ "Adds", "a", "new", "child", "component", "to", "the", "panel", ".", "Where", "within", "the", "panel", "the", "child", "will", "be", "displayed", "is", "up", "to", "the", "layout", "manager", "assigned", "to", "this", "panel", ".", "If", "the", "compone...
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/gui2/Panel.java#L80-L102
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Image.java
Image.drawFlash
public void drawFlash(float x,float y,float width,float height, Color col) { """ Draw this image at a specified location and size as a silohette @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to ...
java
public void drawFlash(float x,float y,float width,float height, Color col) { init(); col.bind(); texture.bind(); if (GL.canSecondaryColor()) { GL.glEnable(SGL.GL_COLOR_SUM_EXT); GL.glSecondaryColor3ubEXT((byte)(col.r * 255), (byte)(col.g * 255), (byte)(col.b * 2...
[ "public", "void", "drawFlash", "(", "float", "x", ",", "float", "y", ",", "float", "width", ",", "float", "height", ",", "Color", "col", ")", "{", "init", "(", ")", ";", "col", ".", "bind", "(", ")", ";", "texture", ".", "bind", "(", ")", ";", ...
Draw this image at a specified location and size as a silohette @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to render the image at @param col The color for the sillohette
[ "Draw", "this", "image", "at", "a", "specified", "location", "and", "size", "as", "a", "silohette" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Image.java#L851-L887
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.getRegionalAvailabilityAsync
public Observable<GetRegionalAvailabilityResponseInner> getRegionalAvailabilityAsync(String resourceGroupName, String labAccountName) { """ Get regional availability information for each size category configured under a lab account. @param resourceGroupName The name of the resource group. @param labAccountName...
java
public Observable<GetRegionalAvailabilityResponseInner> getRegionalAvailabilityAsync(String resourceGroupName, String labAccountName) { return getRegionalAvailabilityWithServiceResponseAsync(resourceGroupName, labAccountName).map(new Func1<ServiceResponse<GetRegionalAvailabilityResponseInner>, GetRegionalAvaila...
[ "public", "Observable", "<", "GetRegionalAvailabilityResponseInner", ">", "getRegionalAvailabilityAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ")", "{", "return", "getRegionalAvailabilityWithServiceResponseAsync", "(", "resourceGroupName", ",", "...
Get regional availability information for each size category configured under a lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the GetRegionalAva...
[ "Get", "regional", "availability", "information", "for", "each", "size", "category", "configured", "under", "a", "lab", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L1236-L1243
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/parser/JSONParser.java
JSONParser.parse
public <T> T parse(InputStream in, Class<T> mapTo) throws ParseException, UnsupportedEncodingException { """ use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory """ return getPBinStream().parse(in, JSONValue.defaultReader.getMapper(mapTo)); }
java
public <T> T parse(InputStream in, Class<T> mapTo) throws ParseException, UnsupportedEncodingException { return getPBinStream().parse(in, JSONValue.defaultReader.getMapper(mapTo)); }
[ "public", "<", "T", ">", "T", "parse", "(", "InputStream", "in", ",", "Class", "<", "T", ">", "mapTo", ")", "throws", "ParseException", ",", "UnsupportedEncodingException", "{", "return", "getPBinStream", "(", ")", ".", "parse", "(", "in", ",", "JSONValue"...
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
[ "use", "to", "return", "Primitive", "Type", "or", "String", "Or", "JsonObject", "or", "JsonArray", "generated", "by", "a", "ContainerFactory" ]
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/parser/JSONParser.java#L230-L232
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/DataTableBeanExample.java
DataTableBeanExample.createTable
private WDataTable createTable() { """ Creates and configures the table to be used by the example. @return a new configured table. """ WDataTable tbl = new WDataTable(); tbl.addColumn(new WTableColumn("First name", new WTextField())); tbl.addColumn(new WTableColumn("Last name", new WTextField())); t...
java
private WDataTable createTable() { WDataTable tbl = new WDataTable(); tbl.addColumn(new WTableColumn("First name", new WTextField())); tbl.addColumn(new WTableColumn("Last name", new WTextField())); tbl.addColumn(new WTableColumn("DOB", new WDateField())); return tbl; }
[ "private", "WDataTable", "createTable", "(", ")", "{", "WDataTable", "tbl", "=", "new", "WDataTable", "(", ")", ";", "tbl", ".", "addColumn", "(", "new", "WTableColumn", "(", "\"First name\"", ",", "new", "WTextField", "(", ")", ")", ")", ";", "tbl", "."...
Creates and configures the table to be used by the example. @return a new configured table.
[ "Creates", "and", "configures", "the", "table", "to", "be", "used", "by", "the", "example", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/DataTableBeanExample.java#L104-L110
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/Main.java
Main.setDefaultValue
private static void setDefaultValue(Definition def, String className, String stringValue) { """ check defalut value and set it @param def definition @param className the class name @param stringValue post-fix string """ if (className.endsWith(stringValue)) def.setDefaultValue(clas...
java
private static void setDefaultValue(Definition def, String className, String stringValue) { if (className.endsWith(stringValue)) def.setDefaultValue(className.substring(0, className.length() - stringValue.length())); }
[ "private", "static", "void", "setDefaultValue", "(", "Definition", "def", ",", "String", "className", ",", "String", "stringValue", ")", "{", "if", "(", "className", ".", "endsWith", "(", "stringValue", ")", ")", "def", ".", "setDefaultValue", "(", "className"...
check defalut value and set it @param def definition @param className the class name @param stringValue post-fix string
[ "check", "defalut", "value", "and", "set", "it" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/Main.java#L788-L792
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java
ForwardCurveInterpolation.getForward
@Override public RandomVariable getForward(AnalyticModel model, double fixingTime, double paymentOffset) { """ Returns the forward for the corresponding fixing time. <b>Note:</b> This implementation currently ignores the provided <code>paymentOffset</code>. Instead it uses the payment offset calculate from th...
java
@Override public RandomVariable getForward(AnalyticModel model, double fixingTime, double paymentOffset) { // @TODO: A warning should be issued that this implementation does not use // if(paymentOffset != this.getPaymentOffset(fixingTime)) { // Logger.getLogger("net.finmath").warning("Requesting forward with...
[ "@", "Override", "public", "RandomVariable", "getForward", "(", "AnalyticModel", "model", ",", "double", "fixingTime", ",", "double", "paymentOffset", ")", "{", "// @TODO: A warning should be issued that this implementation does not use", "//\t\tif(paymentOffset != this.getPaymentO...
Returns the forward for the corresponding fixing time. <b>Note:</b> This implementation currently ignores the provided <code>paymentOffset</code>. Instead it uses the payment offset calculate from the curve specification. @param model An analytic model providing a context. Some curves do not need this (can be null). ...
[ "Returns", "the", "forward", "for", "the", "corresponding", "fixing", "time", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java#L398-L406
ehcache/ehcache3
clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ServerSideConfigurationBuilder.java
ServerSideConfigurationBuilder.resourcePool
public ServerSideConfigurationBuilder resourcePool(String name, long size, MemoryUnit unit, String serverResource) { """ Adds a resource pool with the given name and size and consuming the given server resource. @param name pool name @param size pool size @param unit pool size unit @param serverResource serv...
java
public ServerSideConfigurationBuilder resourcePool(String name, long size, MemoryUnit unit, String serverResource) { return resourcePool(name, new Pool(unit.toBytes(size), serverResource)); }
[ "public", "ServerSideConfigurationBuilder", "resourcePool", "(", "String", "name", ",", "long", "size", ",", "MemoryUnit", "unit", ",", "String", "serverResource", ")", "{", "return", "resourcePool", "(", "name", ",", "new", "Pool", "(", "unit", ".", "toBytes", ...
Adds a resource pool with the given name and size and consuming the given server resource. @param name pool name @param size pool size @param unit pool size unit @param serverResource server resource to consume @return a clustering service configuration builder
[ "Adds", "a", "resource", "pool", "with", "the", "given", "name", "and", "size", "and", "consuming", "the", "given", "server", "resource", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ServerSideConfigurationBuilder.java#L88-L90
paoding-code/paoding-rose
paoding-rose-jade/src/main/java/net/paoding/rose/jade/statement/expression/impl/ExqlCompiler.java
ExqlCompiler.findLeftBrace
private int findLeftBrace(char chLeft, int fromIndex) { """ 查找匹配的左括号, 忽略之前的空白字符。 如果未找到匹配的左括号,函数返回 -1. @param chLeft - 匹配的左括号 @param fromIndex - 查找的起始位置 @return 左括号的位置, 如果未找到匹配的左括号,函数返回 -1. """ // 查找出现的左括号。 for (int index = fromIndex; index < length; index++) { char ch = ...
java
private int findLeftBrace(char chLeft, int fromIndex) { // 查找出现的左括号。 for (int index = fromIndex; index < length; index++) { char ch = pattern.charAt(index); // 如果出现左括号,返回。 if (ch == chLeft) { return index; } // 如果出现非空白字符,返回 -...
[ "private", "int", "findLeftBrace", "(", "char", "chLeft", ",", "int", "fromIndex", ")", "{", "// 查找出现的左括号。", "for", "(", "int", "index", "=", "fromIndex", ";", "index", "<", "length", ";", "index", "++", ")", "{", "char", "ch", "=", "pattern", ".", "ch...
查找匹配的左括号, 忽略之前的空白字符。 如果未找到匹配的左括号,函数返回 -1. @param chLeft - 匹配的左括号 @param fromIndex - 查找的起始位置 @return 左括号的位置, 如果未找到匹配的左括号,函数返回 -1.
[ "查找匹配的左括号", "忽略之前的空白字符。" ]
train
https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-jade/src/main/java/net/paoding/rose/jade/statement/expression/impl/ExqlCompiler.java#L286-L305
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpChain.java
HttpChain.postEvent
private void postEvent(String t, ActiveConfiguration c, Exception e) { """ Publish an event relating to a chain starting/stopping with the given properties set about the chain. """ Map<String, Object> eventProps = new HashMap<String, Object>(4); eventProps.put(HttpServiceConstants.ENDPOINT_NA...
java
private void postEvent(String t, ActiveConfiguration c, Exception e) { Map<String, Object> eventProps = new HashMap<String, Object>(4); eventProps.put(HttpServiceConstants.ENDPOINT_NAME, endpointName); eventProps.put(HttpServiceConstants.ENDPOINT_ACTIVE_PORT, c.activePort); eventProps.p...
[ "private", "void", "postEvent", "(", "String", "t", ",", "ActiveConfiguration", "c", ",", "Exception", "e", ")", "{", "Map", "<", "String", ",", "Object", ">", "eventProps", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", "4", ")", ";", ...
Publish an event relating to a chain starting/stopping with the given properties set about the chain.
[ "Publish", "an", "event", "relating", "to", "a", "chain", "starting", "/", "stopping", "with", "the", "given", "properties", "set", "about", "the", "chain", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpChain.java#L631-L649
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeShapes.java
VisualizeShapes.drawPolygon
public static void drawPolygon( Polygon2D_F64 polygon, boolean loop, Graphics2D g2 ) { """ Draws a polygon @param polygon The polygon @param loop true if the end points are connected, forming a loop @param g2 Graphics object it's drawn to """ for( int i = 0; i < polygon.size()-1; i++ ) { Point2D_F64 ...
java
public static void drawPolygon( Polygon2D_F64 polygon, boolean loop, Graphics2D g2 ) { for( int i = 0; i < polygon.size()-1; i++ ) { Point2D_F64 p0 = polygon.get(i); Point2D_F64 p1 = polygon.get(i+1); g2.drawLine((int)(p0.x+0.5),(int)(p0.y+0.5),(int)(p1.x+0.5),(int)(p1.y+0.5)); } if( loop && polygon.size...
[ "public", "static", "void", "drawPolygon", "(", "Polygon2D_F64", "polygon", ",", "boolean", "loop", ",", "Graphics2D", "g2", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "polygon", ".", "size", "(", ")", "-", "1", ";", "i", "++", ")",...
Draws a polygon @param polygon The polygon @param loop true if the end points are connected, forming a loop @param g2 Graphics object it's drawn to
[ "Draws", "a", "polygon" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeShapes.java#L204-L215
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.setScale
public static BigDecimal setScale(final BigDecimal bd, final Integer scale, final int rounding) { """ returns a new BigDecimal with correct Scales.PERCENT_SCALE. This is used by the table renderer. @param bd @return new bd or null """ if (bd != null && scale != null) { return bd.setS...
java
public static BigDecimal setScale(final BigDecimal bd, final Integer scale, final int rounding) { if (bd != null && scale != null) { return bd.setScale(scale, rounding); } return null; }
[ "public", "static", "BigDecimal", "setScale", "(", "final", "BigDecimal", "bd", ",", "final", "Integer", "scale", ",", "final", "int", "rounding", ")", "{", "if", "(", "bd", "!=", "null", "&&", "scale", "!=", "null", ")", "{", "return", "bd", ".", "set...
returns a new BigDecimal with correct Scales.PERCENT_SCALE. This is used by the table renderer. @param bd @return new bd or null
[ "returns", "a", "new", "BigDecimal", "with", "correct", "Scales", ".", "PERCENT_SCALE", ".", "This", "is", "used", "by", "the", "table", "renderer", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L428-L433
cdk/cdk
base/core/src/main/java/org/openscience/cdk/io/random/RandomAccessReader.java
RandomAccessReader.getIndexFile
public static File getIndexFile(String filename) { """ Opens the file index file <code>_cdk.index</code> in a temporary folder, as specified by "java.io.tmpdir" property. @param filename the name of the file for which the index was generated @return a file object representing the index file """ Str...
java
public static File getIndexFile(String filename) { String tmpDir = System.getProperty("java.io.tmpdir"); File f = new File(filename); File indexFile = new File(tmpDir, f.getName() + "_cdk.index"); f = null; return indexFile; }
[ "public", "static", "File", "getIndexFile", "(", "String", "filename", ")", "{", "String", "tmpDir", "=", "System", ".", "getProperty", "(", "\"java.io.tmpdir\"", ")", ";", "File", "f", "=", "new", "File", "(", "filename", ")", ";", "File", "indexFile", "=...
Opens the file index file <code>_cdk.index</code> in a temporary folder, as specified by "java.io.tmpdir" property. @param filename the name of the file for which the index was generated @return a file object representing the index file
[ "Opens", "the", "file", "index", "file", "<code", ">", "_cdk", ".", "index<", "/", "code", ">", "in", "a", "temporary", "folder", "as", "specified", "by", "java", ".", "io", ".", "tmpdir", "property", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/io/random/RandomAccessReader.java#L347-L353
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java
BaseSession.doRemoteCommand
public Object doRemoteCommand(String strCommand, Map<String, Object> properties) throws RemoteException, DBException { """ Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children d...
java
public Object doRemoteCommand(String strCommand, Map<String, Object> properties) throws RemoteException, DBException { if (DBParams.GET_FIELD_DATA.equalsIgnoreCase(strCommand)) { return this.getFieldData(properties); } return Boolean.FALSE; // Override this to handle th...
[ "public", "Object", "doRemoteCommand", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", ",", "DBException", "{", "if", "(", "DBParams", ".", "GET_FIELD_DATA", ".", "equalsIgnoreCase", "("...
Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to parent (with me as the source). Note: Never pass to a parent or child that matches the source (to avoid an e...
[ "Process", "the", "command", ".", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", "all", "children", "(", "with", "me", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L382-L389
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/geometry/GeometryUtilities.java
GeometryUtilities.distance3d
public static double distance3d( Coordinate c1, Coordinate c2, GeodeticCalculator geodeticCalculator ) { """ Calculates the 3d distance between two coordinates that have an elevation information. <p>Note that the {@link Coordinate#distance(Coordinate)} method does only 2d. @param c1 coordinate 1. @param c2 ...
java
public static double distance3d( Coordinate c1, Coordinate c2, GeodeticCalculator geodeticCalculator ) { if (Double.isNaN(c1.z) || Double.isNaN(c2.z)) { throw new IllegalArgumentException("Missing elevation information in the supplied coordinates."); } double deltaElev = Math.abs(c1....
[ "public", "static", "double", "distance3d", "(", "Coordinate", "c1", ",", "Coordinate", "c2", ",", "GeodeticCalculator", "geodeticCalculator", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "c1", ".", "z", ")", "||", "Double", ".", "isNaN", "(", "c2", ...
Calculates the 3d distance between two coordinates that have an elevation information. <p>Note that the {@link Coordinate#distance(Coordinate)} method does only 2d. @param c1 coordinate 1. @param c2 coordinate 2. @param geodeticCalculator If supplied it will be used for planar distance calculation. @return the distan...
[ "Calculates", "the", "3d", "distance", "between", "two", "coordinates", "that", "have", "an", "elevation", "information", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/geometry/GeometryUtilities.java#L308-L324
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java
ContentSpecProcessor.mergeRelationships
protected void mergeRelationships(final Map<SpecNode, CSNodeWrapper> nodeMapping, final DataProviderFactory providerFactory) { """ Merges the relationships for all Spec Topics into their counterpart Entity nodes. @param nodeMapping The mapping of Spec Nodes to Entity nodes. @param providerFactory """ ...
java
protected void mergeRelationships(final Map<SpecNode, CSNodeWrapper> nodeMapping, final DataProviderFactory providerFactory) { final CSNodeProvider nodeProvider = providerFactory.getProvider(CSNodeProvider.class); for (final Map.Entry<SpecNode, CSNodeWrapper> nodes : nodeMapping.entrySet()) { ...
[ "protected", "void", "mergeRelationships", "(", "final", "Map", "<", "SpecNode", ",", "CSNodeWrapper", ">", "nodeMapping", ",", "final", "DataProviderFactory", "providerFactory", ")", "{", "final", "CSNodeProvider", "nodeProvider", "=", "providerFactory", ".", "getPro...
Merges the relationships for all Spec Topics into their counterpart Entity nodes. @param nodeMapping The mapping of Spec Nodes to Entity nodes. @param providerFactory
[ "Merges", "the", "relationships", "for", "all", "Spec", "Topics", "into", "their", "counterpart", "Entity", "nodes", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java#L1838-L1855
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/provisioning/ProvisioningApi.java
ProvisioningApi.initializeWithCode
public void initializeWithCode(String authCode, String redirectUri) throws ProvisioningApiException { """ Initialize the API with an code from the auth service. @param authCode the code. @param redirectUri the redirect uri used in the original code request. @throws ProvisioningApiException if the call is unsucc...
java
public void initializeWithCode(String authCode, String redirectUri) throws ProvisioningApiException { initialize(null, authCode, redirectUri); }
[ "public", "void", "initializeWithCode", "(", "String", "authCode", ",", "String", "redirectUri", ")", "throws", "ProvisioningApiException", "{", "initialize", "(", "null", ",", "authCode", ",", "redirectUri", ")", ";", "}" ]
Initialize the API with an code from the auth service. @param authCode the code. @param redirectUri the redirect uri used in the original code request. @throws ProvisioningApiException if the call is unsuccessful.
[ "Initialize", "the", "API", "with", "an", "code", "from", "the", "auth", "service", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/ProvisioningApi.java#L106-L108
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/ConfigHelper.java
ConfigHelper.setInputColumnFamily
public static void setInputColumnFamily(Configuration conf, String keyspace, String columnFamily) { """ Set the keyspace and column family for the input of this job. @param conf Job configuration you are about to run @param keyspace @param columnFamily """ setInputColumnFamily(conf, keyspa...
java
public static void setInputColumnFamily(Configuration conf, String keyspace, String columnFamily) { setInputColumnFamily(conf, keyspace, columnFamily, false); }
[ "public", "static", "void", "setInputColumnFamily", "(", "Configuration", "conf", ",", "String", "keyspace", ",", "String", "columnFamily", ")", "{", "setInputColumnFamily", "(", "conf", ",", "keyspace", ",", "columnFamily", ",", "false", ")", ";", "}" ]
Set the keyspace and column family for the input of this job. @param conf Job configuration you are about to run @param keyspace @param columnFamily
[ "Set", "the", "keyspace", "and", "column", "family", "for", "the", "input", "of", "this", "job", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/ConfigHelper.java#L103-L106
eldur/jwbf
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/RecentchangeTitles.java
RecentchangeTitles.generateRequest
private HttpAction generateRequest(int[] namespace, String rcstart) { """ generates the next MediaWiki-request (GetMethod) and adds it to msgs. @param namespace the namespace(s) that will be searched for links, as a string of numbers separated by '|'; if null, this parameter is omitted @param rcstart timestam...
java
private HttpAction generateRequest(int[] namespace, String rcstart) { RequestBuilder requestBuilder = new ApiRequestBuilder() // .action("query") // .formatXml() // .param("list", "recentchanges") // .param("rclimit", LIMIT) // ; if (namespace != ...
[ "private", "HttpAction", "generateRequest", "(", "int", "[", "]", "namespace", ",", "String", "rcstart", ")", "{", "RequestBuilder", "requestBuilder", "=", "new", "ApiRequestBuilder", "(", ")", "//", ".", "action", "(", "\"query\"", ")", "//", ".", "formatXml"...
generates the next MediaWiki-request (GetMethod) and adds it to msgs. @param namespace the namespace(s) that will be searched for links, as a string of numbers separated by '|'; if null, this parameter is omitted @param rcstart timestamp
[ "generates", "the", "next", "MediaWiki", "-", "request", "(", "GetMethod", ")", "and", "adds", "it", "to", "msgs", "." ]
train
https://github.com/eldur/jwbf/blob/ee17ea2fa5a26f17c8332a094b2db86dd596d1ff/src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/RecentchangeTitles.java#L66-L83
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java
FeatureInfoBuilder.buildResultsInfoMessage
public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance) { """ Build a feature results information message @param results feature index results @param tolerance distance tolerance @return results message or null if no results """ return buildResultsInfoMessage(results...
java
public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance) { return buildResultsInfoMessage(results, tolerance, null, null); }
[ "public", "String", "buildResultsInfoMessage", "(", "FeatureIndexResults", "results", ",", "double", "tolerance", ")", "{", "return", "buildResultsInfoMessage", "(", "results", ",", "tolerance", ",", "null", ",", "null", ")", ";", "}" ]
Build a feature results information message @param results feature index results @param tolerance distance tolerance @return results message or null if no results
[ "Build", "a", "feature", "results", "information", "message" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java#L295-L297
javabits/yar
yar-api/src/main/java/org/javabits/yar/InterruptedException.java
InterruptedException.newInterruptedException
public static InterruptedException newInterruptedException(String message, java.lang.InterruptedException cause) { """ Re-interrupt the current thread and constructs an <code>InterruptedException</code> with the specified detail message. @param message the detail message. @param cause original {@code Interr...
java
public static InterruptedException newInterruptedException(String message, java.lang.InterruptedException cause) { Thread.currentThread().interrupt(); return new InterruptedException(message, cause); }
[ "public", "static", "InterruptedException", "newInterruptedException", "(", "String", "message", ",", "java", ".", "lang", ".", "InterruptedException", "cause", ")", "{", "Thread", ".", "currentThread", "(", ")", ".", "interrupt", "(", ")", ";", "return", "new",...
Re-interrupt the current thread and constructs an <code>InterruptedException</code> with the specified detail message. @param message the detail message. @param cause original {@code InterruptedException}
[ "Re", "-", "interrupt", "the", "current", "thread", "and", "constructs", "an", "<code", ">", "InterruptedException<", "/", "code", ">", "with", "the", "specified", "detail", "message", "." ]
train
https://github.com/javabits/yar/blob/e146a86611ca4831e8334c9a98fd7086cee9c03e/yar-api/src/main/java/org/javabits/yar/InterruptedException.java#L52-L55
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.removePattern
public static String removePattern(final String source, final String regex) { """ <p>Removes each substring of the source String that matches the given regular expression using the DOTALL option. </p> This call is a {@code null} safe equivalent to: <ul> <li>{@code source.replaceAll(&quot;(?s)&quot; + regex, ...
java
public static String removePattern(final String source, final String regex) { return replacePattern(source, regex, StringUtils.EMPTY); }
[ "public", "static", "String", "removePattern", "(", "final", "String", "source", ",", "final", "String", "regex", ")", "{", "return", "replacePattern", "(", "source", ",", "regex", ",", "StringUtils", ".", "EMPTY", ")", ";", "}" ]
<p>Removes each substring of the source String that matches the given regular expression using the DOTALL option. </p> This call is a {@code null} safe equivalent to: <ul> <li>{@code source.replaceAll(&quot;(?s)&quot; + regex, StringUtils.EMPTY)}</li> <li>{@code Pattern.compile(regex, Pattern.DOTALL).matcher(source).r...
[ "<p", ">", "Removes", "each", "substring", "of", "the", "source", "String", "that", "matches", "the", "given", "regular", "expression", "using", "the", "DOTALL", "option", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L5278-L5280
lamydev/Android-Notification
core/src/zemin/notification/NotificationEntry.java
NotificationEntry.setProgress
public void setProgress(int max, int progress, boolean indeterminate) { """ Set the progress this notification represents. @see android.app.Notification#setProgress(int, int, boolean) @param max @param progress @param indeterminate """ this.progressMax = max; this.progress = progress; ...
java
public void setProgress(int max, int progress, boolean indeterminate) { this.progressMax = max; this.progress = progress; this.progressIndeterminate = indeterminate; }
[ "public", "void", "setProgress", "(", "int", "max", ",", "int", "progress", ",", "boolean", "indeterminate", ")", "{", "this", ".", "progressMax", "=", "max", ";", "this", ".", "progress", "=", "progress", ";", "this", ".", "progressIndeterminate", "=", "i...
Set the progress this notification represents. @see android.app.Notification#setProgress(int, int, boolean) @param max @param progress @param indeterminate
[ "Set", "the", "progress", "this", "notification", "represents", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L387-L391
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.loadClass
Symbol loadClass(Env<AttrContext> env, Name name, RecoveryLoadClass recoveryLoadClass) { """ Load toplevel or member class with given fully qualified name and verify that it is accessible. @param env The current environment. @param name The fully qualified name of the class to be loaded. """ ...
java
Symbol loadClass(Env<AttrContext> env, Name name, RecoveryLoadClass recoveryLoadClass) { try { ClassSymbol c = finder.loadClass(env.toplevel.modle, name); return isAccessible(env, c) ? c : new AccessError(env, null, c); } catch (ClassFinder.BadClassFile err) { throw e...
[ "Symbol", "loadClass", "(", "Env", "<", "AttrContext", ">", "env", ",", "Name", "name", ",", "RecoveryLoadClass", "recoveryLoadClass", ")", "{", "try", "{", "ClassSymbol", "c", "=", "finder", ".", "loadClass", "(", "env", ".", "toplevel", ".", "modle", ","...
Load toplevel or member class with given fully qualified name and verify that it is accessible. @param env The current environment. @param name The fully qualified name of the class to be loaded.
[ "Load", "toplevel", "or", "member", "class", "with", "given", "fully", "qualified", "name", "and", "verify", "that", "it", "is", "accessible", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L1986-L2001
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLight.java
GVRLight.setVec3
public void setVec3(String key, float x, float y, float z) { """ Set the value for a floating point vector of length 3. @param key name of uniform to set. @param x new X value @param y new Y value @param z new Z value @see #getVec3 @see #getFloatVec(String) """ checkKeyIsUniform(key); Nat...
java
public void setVec3(String key, float x, float y, float z) { checkKeyIsUniform(key); NativeLight.setVec3(getNative(), key, x, y, z); }
[ "public", "void", "setVec3", "(", "String", "key", ",", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "checkKeyIsUniform", "(", "key", ")", ";", "NativeLight", ".", "setVec3", "(", "getNative", "(", ")", ",", "key", ",", "x", ",", "...
Set the value for a floating point vector of length 3. @param key name of uniform to set. @param x new X value @param y new Y value @param z new Z value @see #getVec3 @see #getFloatVec(String)
[ "Set", "the", "value", "for", "a", "floating", "point", "vector", "of", "length", "3", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLight.java#L426-L430
captain-miao/OptionRoundCardview
optroundcardview/src/main/java/com/github/captain_miao/optroundcardview/RoundRectDrawable.java
RoundRectDrawable.createTintFilter
private PorterDuffColorFilter createTintFilter(ColorStateList tint, PorterDuff.Mode tintMode) { """ Ensures the tint filter is consistent with the current tint color and mode. """ if (tint == null || tintMode == null) { return null; } final int color = tint.getColorForState...
java
private PorterDuffColorFilter createTintFilter(ColorStateList tint, PorterDuff.Mode tintMode) { if (tint == null || tintMode == null) { return null; } final int color = tint.getColorForState(getState(), Color.TRANSPARENT); return new PorterDuffColorFilter(color, tintMode); ...
[ "private", "PorterDuffColorFilter", "createTintFilter", "(", "ColorStateList", "tint", ",", "PorterDuff", ".", "Mode", "tintMode", ")", "{", "if", "(", "tint", "==", "null", "||", "tintMode", "==", "null", ")", "{", "return", "null", ";", "}", "final", "int"...
Ensures the tint filter is consistent with the current tint color and mode.
[ "Ensures", "the", "tint", "filter", "is", "consistent", "with", "the", "current", "tint", "color", "and", "mode", "." ]
train
https://github.com/captain-miao/OptionRoundCardview/blob/aefad1e42351958724b916b8003a24f10634b3d8/optroundcardview/src/main/java/com/github/captain_miao/optroundcardview/RoundRectDrawable.java#L190-L196
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.queryForFieldValues
public TResult queryForFieldValues(Map<String, Object> fieldValues) { """ Query for the row where all fields match their values @param fieldValues field values @return result """ String where = buildWhere(fieldValues.entrySet()); String[] whereArgs = buildWhereArgs(fieldValues.values()); TResult res...
java
public TResult queryForFieldValues(Map<String, Object> fieldValues) { String where = buildWhere(fieldValues.entrySet()); String[] whereArgs = buildWhereArgs(fieldValues.values()); TResult result = userDb.query(getTableName(), table.getColumnNames(), where, whereArgs, null, null, null); prepareResult(result)...
[ "public", "TResult", "queryForFieldValues", "(", "Map", "<", "String", ",", "Object", ">", "fieldValues", ")", "{", "String", "where", "=", "buildWhere", "(", "fieldValues", ".", "entrySet", "(", ")", ")", ";", "String", "[", "]", "whereArgs", "=", "buildW...
Query for the row where all fields match their values @param fieldValues field values @return result
[ "Query", "for", "the", "row", "where", "all", "fields", "match", "their", "values" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L354-L361
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java
InetAddressPredicates.ofCidr
public static Predicate<InetAddress> ofCidr(InetAddress baseAddress, String subnetMask) { """ Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} is in the range of a <a href="https://tools.ietf.org/html/rfc4632">Classless Inter-domain Routing (CIDR)</a> block. @param baseAd...
java
public static Predicate<InetAddress> ofCidr(InetAddress baseAddress, String subnetMask) { requireNonNull(baseAddress, "baseAddress"); requireNonNull(subnetMask, "subnetMask"); checkArgument(NetUtil.isValidIpV4Address(subnetMask), "subnetMask: %s (expected: an IPv4 address s...
[ "public", "static", "Predicate", "<", "InetAddress", ">", "ofCidr", "(", "InetAddress", "baseAddress", ",", "String", "subnetMask", ")", "{", "requireNonNull", "(", "baseAddress", ",", "\"baseAddress\"", ")", ";", "requireNonNull", "(", "subnetMask", ",", "\"subne...
Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} is in the range of a <a href="https://tools.ietf.org/html/rfc4632">Classless Inter-domain Routing (CIDR)</a> block. @param baseAddress the base {@link InetAddress} of a CIDR notation @param subnetMask the subnet mask, e.g. {@code 2...
[ "Returns", "a", "{", "@link", "Predicate", "}", "which", "returns", "{", "@code", "true", "}", "if", "the", "given", "{", "@link", "InetAddress", "}", "is", "in", "the", "range", "of", "a", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf",...
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java#L114-L121
EdwardRaff/JSAT
JSAT/src/jsat/SimpleDataSet.java
SimpleDataSet.asClassificationDataSet
public ClassificationDataSet asClassificationDataSet(int index) { """ Converts this dataset into one meant for classification problems. The given categorical feature index is removed from the data and made the target variable for the classification problem. @param index the classification variable index, shou...
java
public ClassificationDataSet asClassificationDataSet(int index) { if(index < 0) throw new IllegalArgumentException("Index must be a non-negative value"); else if(getNumCategoricalVars() == 0) throw new IllegalArgumentException("Dataset has no categorical variables, can n...
[ "public", "ClassificationDataSet", "asClassificationDataSet", "(", "int", "index", ")", "{", "if", "(", "index", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"Index must be a non-negative value\"", ")", ";", "else", "if", "(", "getNumCategoricalVa...
Converts this dataset into one meant for classification problems. The given categorical feature index is removed from the data and made the target variable for the classification problem. @param index the classification variable index, should be in the range [0, {@link #getNumCategoricalVars() }) @return a new dataset...
[ "Converts", "this", "dataset", "into", "one", "meant", "for", "classification", "problems", ".", "The", "given", "categorical", "feature", "index", "is", "removed", "from", "the", "data", "and", "made", "the", "target", "variable", "for", "the", "classification"...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/SimpleDataSet.java#L88-L97
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasTableController.java
CmsAliasTableController.editResourcePath
public void editResourcePath(CmsAliasTableRow row, String path) { """ This method is called when the user has edited the resource path of an alias.<p> @param row the alias the table row @param path the new path """ row.setEdited(true); row.editResourcePath(path); validate(); ...
java
public void editResourcePath(CmsAliasTableRow row, String path) { row.setEdited(true); row.editResourcePath(path); validate(); }
[ "public", "void", "editResourcePath", "(", "CmsAliasTableRow", "row", ",", "String", "path", ")", "{", "row", ".", "setEdited", "(", "true", ")", ";", "row", ".", "editResourcePath", "(", "path", ")", ";", "validate", "(", ")", ";", "}" ]
This method is called when the user has edited the resource path of an alias.<p> @param row the alias the table row @param path the new path
[ "This", "method", "is", "called", "when", "the", "user", "has", "edited", "the", "resource", "path", "of", "an", "alias", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasTableController.java#L217-L222
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlrtrim
public static void sqlrtrim(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ rtrim translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ singleArgumentFunctionCall(buf, "trim(trailing from "...
java
public static void sqlrtrim(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "trim(trailing from ", "rtrim", parsedArgs); }
[ "public", "static", "void", "sqlrtrim", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "singleArgumentFunctionCall", "(", "buf", ",", "\"trim(trailing from \"", ",", "\"rtrim\"", ...
rtrim translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "rtrim", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L282-L284
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.ortho2DLH
public Matrix4x3d ortho2DLH(double left, double right, double bottom, double top) { """ Apply an orthographic projection transformation for a left-handed coordinate system to this matrix. <p> This method is equivalent to calling {@link #orthoLH(double, double, double, double, double, double) orthoLH()} with <co...
java
public Matrix4x3d ortho2DLH(double left, double right, double bottom, double top) { return ortho2DLH(left, right, bottom, top, this); }
[ "public", "Matrix4x3d", "ortho2DLH", "(", "double", "left", ",", "double", "right", ",", "double", "bottom", ",", "double", "top", ")", "{", "return", "ortho2DLH", "(", "left", ",", "right", ",", "bottom", ",", "top", ",", "this", ")", ";", "}" ]
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix. <p> This method is equivalent to calling {@link #orthoLH(double, double, double, double, double, double) orthoLH()} with <code>zNear=-1</code> and <code>zFar=+1</code>. <p> If <code>M</code> is <code>this</code> matrix a...
[ "Apply", "an", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "to", "this", "matrix", ".", "<p", ">", "This", "method", "is", "equivalent", "to", "calling", "{", "@link", "#orthoLH", "(", "double", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L7684-L7686
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletRequest.java
MockHttpServletRequest.setParameter
@Nonnull public MockHttpServletRequest setParameter (@Nonnull final String sName, @Nullable final String [] aValues) { """ Set an array of values for the specified HTTP parameter. <p> If there are already one or more values registered for the given parameter name, they will be replaced. @param sName Param...
java
@Nonnull public MockHttpServletRequest setParameter (@Nonnull final String sName, @Nullable final String [] aValues) { m_aParameters.remove (sName); m_aParameters.addAll (sName, aValues); return this; }
[ "@", "Nonnull", "public", "MockHttpServletRequest", "setParameter", "(", "@", "Nonnull", "final", "String", "sName", ",", "@", "Nullable", "final", "String", "[", "]", "aValues", ")", "{", "m_aParameters", ".", "remove", "(", "sName", ")", ";", "m_aParameters"...
Set an array of values for the specified HTTP parameter. <p> If there are already one or more values registered for the given parameter name, they will be replaced. @param sName Parameter name @param aValues Parameter values @return this
[ "Set", "an", "array", "of", "values", "for", "the", "specified", "HTTP", "parameter", ".", "<p", ">", "If", "there", "are", "already", "one", "or", "more", "values", "registered", "for", "the", "given", "parameter", "name", "they", "will", "be", "replaced"...
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletRequest.java#L418-L424
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateIntentAsync
public Observable<OperationStatus> updateIntentAsync(UUID appId, String versionId, UUID intentId, UpdateIntentOptionalParameter updateIntentOptionalParameter) { """ Updates the name of an intent classifier. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier...
java
public Observable<OperationStatus> updateIntentAsync(UUID appId, String versionId, UUID intentId, UpdateIntentOptionalParameter updateIntentOptionalParameter) { return updateIntentWithServiceResponseAsync(appId, versionId, intentId, updateIntentOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, ...
[ "public", "Observable", "<", "OperationStatus", ">", "updateIntentAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "intentId", ",", "UpdateIntentOptionalParameter", "updateIntentOptionalParameter", ")", "{", "return", "updateIntentWithServiceResponseAs...
Updates the name of an intent classifier. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier ID. @param updateIntentOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if paramet...
[ "Updates", "the", "name", "of", "an", "intent", "classifier", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2940-L2947
sagiegurari/fax4j
src/main/java/org/fax4j/common/JDKLogger.java
JDKLogger.initializeLogger
protected static final Logger initializeLogger() { """ This function initializes and returns the logger. @return The logger """ //get logger Logger logger=Logger.getLogger(FaxClient.class.getName()); //enable all log events (fax4j logger filters out uneeded log events) ...
java
protected static final Logger initializeLogger() { //get logger Logger logger=Logger.getLogger(FaxClient.class.getName()); //enable all log events (fax4j logger filters out uneeded log events) logger.setLevel(Level.ALL); logger.setFilter(null); //ena...
[ "protected", "static", "final", "Logger", "initializeLogger", "(", ")", "{", "//get logger", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "FaxClient", ".", "class", ".", "getName", "(", ")", ")", ";", "//enable all log events (fax4j logger filters out u...
This function initializes and returns the logger. @return The logger
[ "This", "function", "initializes", "and", "returns", "the", "logger", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/JDKLogger.java#L40-L64
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/NodeSchema.java
NodeSchema.sortByTveIndex
void sortByTveIndex(int fromIndex, int toIndex) { """ Sort a sub-range of the schema columns by TVE index. All elements must be TupleValueExpressions. Modification is made in-place. @param fromIndex lower bound of range to be sorted, inclusive @param toIndex upper bound of range to be sorted, exclusive ...
java
void sortByTveIndex(int fromIndex, int toIndex) { Collections.sort(m_columns.subList(fromIndex, toIndex), TVE_IDX_COMPARE); }
[ "void", "sortByTveIndex", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "Collections", ".", "sort", "(", "m_columns", ".", "subList", "(", "fromIndex", ",", "toIndex", ")", ",", "TVE_IDX_COMPARE", ")", ";", "}" ]
Sort a sub-range of the schema columns by TVE index. All elements must be TupleValueExpressions. Modification is made in-place. @param fromIndex lower bound of range to be sorted, inclusive @param toIndex upper bound of range to be sorted, exclusive
[ "Sort", "a", "sub", "-", "range", "of", "the", "schema", "columns", "by", "TVE", "index", ".", "All", "elements", "must", "be", "TupleValueExpressions", ".", "Modification", "is", "made", "in", "-", "place", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/NodeSchema.java#L266-L268
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/PluginLoader.java
PluginLoader.resourceFromFindbugsJar
@CheckForNull private static URL resourceFromFindbugsJar(String slashedResourceName) { """ Try to load resource from JAR file of Findbugs core plugin. @param slashedResourceName Name of resource to load @return URL which points resource in jar file, or null if JAR file not found """ try { ...
java
@CheckForNull private static URL resourceFromFindbugsJar(String slashedResourceName) { try { @Nullable URL findbugsJar = getFindbugsJar(); if (findbugsJar == null) { return null; } assert findbugsJar.getProtocol().equals("file"); ...
[ "@", "CheckForNull", "private", "static", "URL", "resourceFromFindbugsJar", "(", "String", "slashedResourceName", ")", "{", "try", "{", "@", "Nullable", "URL", "findbugsJar", "=", "getFindbugsJar", "(", ")", ";", "if", "(", "findbugsJar", "==", "null", ")", "{...
Try to load resource from JAR file of Findbugs core plugin. @param slashedResourceName Name of resource to load @return URL which points resource in jar file, or null if JAR file not found
[ "Try", "to", "load", "resource", "from", "JAR", "file", "of", "Findbugs", "core", "plugin", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/PluginLoader.java#L596-L620
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isNull
public static void isNull (final Object aValue, @Nonnull final Supplier <? extends String> aName) { """ Check that the passed value is <code>null</code>. @param aValue The value to check. @param aName The name of the value (e.g. the parameter name) @throws IllegalArgumentException if the passed value is no...
java
public static void isNull (final Object aValue, @Nonnull final Supplier <? extends String> aName) { if (isEnabled ()) if (aValue != null) throw new IllegalArgumentException ("The value of '" + aName.get () + "' must be null but is " + aValue); }
[ "public", "static", "void", "isNull", "(", "final", "Object", "aValue", ",", "@", "Nonnull", "final", "Supplier", "<", "?", "extends", "String", ">", "aName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "if", "(", "aValue", "!=", "null", ")", "t...
Check that the passed value is <code>null</code>. @param aValue The value to check. @param aName The name of the value (e.g. the parameter name) @throws IllegalArgumentException if the passed value is not <code>null</code>.
[ "Check", "that", "the", "passed", "value", "is", "<code", ">", "null<", "/", "code", ">", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L328-L333
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterImpl.java
PNCounterImpl.getAndUpdate
private CRDTTimestampedLong getAndUpdate(long delta, VectorClock observedTimestamps, boolean isAddition) { """ Updates the PN counter state for this replica and returns the value before the update. The {@code delta} parameter must be greater than or equal to 0. The {@code isAddition} parameter determines if thi...
java
private CRDTTimestampedLong getAndUpdate(long delta, VectorClock observedTimestamps, boolean isAddition) { if (delta < 0) { throw new IllegalArgumentException("Delta must be greater than or equal to 0"); } final long nextTimestamp = stateVectorClock.getTimestampForReplica(localReplic...
[ "private", "CRDTTimestampedLong", "getAndUpdate", "(", "long", "delta", ",", "VectorClock", "observedTimestamps", ",", "boolean", "isAddition", ")", "{", "if", "(", "delta", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Delta must be greate...
Updates the PN counter state for this replica and returns the value before the update. The {@code delta} parameter must be greater than or equal to 0. The {@code isAddition} parameter determines if this is an addition or a subtraction. @param delta the delta to be applied to the current value, must be gre...
[ "Updates", "the", "PN", "counter", "state", "for", "this", "replica", "and", "returns", "the", "value", "before", "the", "update", ".", "The", "{", "@code", "delta", "}", "parameter", "must", "be", "greater", "than", "or", "equal", "to", "0", ".", "The",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterImpl.java#L267-L279
JodaOrg/joda-time
src/main/java/org/joda/time/TimeOfDay.java
TimeOfDay.withMinuteOfHour
public TimeOfDay withMinuteOfHour(int minute) { """ Returns a copy of this time with the minute of hour field updated. <p> TimeOfDay is immutable, so there are no set methods. Instead, this method returns a new instance with the value of minute of hour changed. @param minute the minute of hour to set @ret...
java
public TimeOfDay withMinuteOfHour(int minute) { int[] newValues = getValues(); newValues = getChronology().minuteOfHour().set(this, MINUTE_OF_HOUR, newValues, minute); return new TimeOfDay(this, newValues); }
[ "public", "TimeOfDay", "withMinuteOfHour", "(", "int", "minute", ")", "{", "int", "[", "]", "newValues", "=", "getValues", "(", ")", ";", "newValues", "=", "getChronology", "(", ")", ".", "minuteOfHour", "(", ")", ".", "set", "(", "this", ",", "MINUTE_OF...
Returns a copy of this time with the minute of hour field updated. <p> TimeOfDay is immutable, so there are no set methods. Instead, this method returns a new instance with the value of minute of hour changed. @param minute the minute of hour to set @return a copy of this object with the field set @throws IllegalArgu...
[ "Returns", "a", "copy", "of", "this", "time", "with", "the", "minute", "of", "hour", "field", "updated", ".", "<p", ">", "TimeOfDay", "is", "immutable", "so", "there", "are", "no", "set", "methods", ".", "Instead", "this", "method", "returns", "a", "new"...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/TimeOfDay.java#L918-L922
lucee/Lucee
core/src/main/java/lucee/runtime/op/Duplicator.java
Duplicator.duplicateMap
public static Map duplicateMap(Map map, boolean doKeysLower, boolean deepCopy) throws PageException { """ duplicate a map @param map @param doKeysLower @return duplicated Map @throws PageException """ if (doKeysLower) { Map newMap; try { newMap = (Map) ClassUtil.loadInstance(map.getClass());...
java
public static Map duplicateMap(Map map, boolean doKeysLower, boolean deepCopy) throws PageException { if (doKeysLower) { Map newMap; try { newMap = (Map) ClassUtil.loadInstance(map.getClass()); } catch (ClassException e) { newMap = new HashMap(); } boolean inside = ThreadLocalDuplicat...
[ "public", "static", "Map", "duplicateMap", "(", "Map", "map", ",", "boolean", "doKeysLower", ",", "boolean", "deepCopy", ")", "throws", "PageException", "{", "if", "(", "doKeysLower", ")", "{", "Map", "newMap", ";", "try", "{", "newMap", "=", "(", "Map", ...
duplicate a map @param map @param doKeysLower @return duplicated Map @throws PageException
[ "duplicate", "a", "map" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Duplicator.java#L182-L207
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java
DecimalStyle.withNegativeSign
public DecimalStyle withNegativeSign(char negativeSign) { """ Returns a copy of the info with a new character that represents the negative sign. <p> The character used to represent a negative number may vary by culture. This method specifies the character to use. @param negativeSign the character for the ne...
java
public DecimalStyle withNegativeSign(char negativeSign) { if (negativeSign == this.negativeSign) { return this; } return new DecimalStyle(zeroDigit, positiveSign, negativeSign, decimalSeparator); }
[ "public", "DecimalStyle", "withNegativeSign", "(", "char", "negativeSign", ")", "{", "if", "(", "negativeSign", "==", "this", ".", "negativeSign", ")", "{", "return", "this", ";", "}", "return", "new", "DecimalStyle", "(", "zeroDigit", ",", "positiveSign", ","...
Returns a copy of the info with a new character that represents the negative sign. <p> The character used to represent a negative number may vary by culture. This method specifies the character to use. @param negativeSign the character for the negative sign @return a copy with a new character that represents the neg...
[ "Returns", "a", "copy", "of", "the", "info", "with", "a", "new", "character", "that", "represents", "the", "negative", "sign", ".", "<p", ">", "The", "character", "used", "to", "represent", "a", "negative", "number", "may", "vary", "by", "culture", ".", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java#L274-L279
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextsClient.java
ContextsClient.createContext
public final Context createContext(SessionName parent, Context context) { """ Creates a context. <p>If the specified context already exists, overrides the context. <p>Sample code: <pre><code> try (ContextsClient contextsClient = ContextsClient.create()) { SessionName parent = SessionName.of("[PROJECT]",...
java
public final Context createContext(SessionName parent, Context context) { CreateContextRequest request = CreateContextRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setContext(context) .build(); return createContext(request); }
[ "public", "final", "Context", "createContext", "(", "SessionName", "parent", ",", "Context", "context", ")", "{", "CreateContextRequest", "request", "=", "CreateContextRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "null", "?", "nu...
Creates a context. <p>If the specified context already exists, overrides the context. <p>Sample code: <pre><code> try (ContextsClient contextsClient = ContextsClient.create()) { SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); Context context = Context.newBuilder().build(); Context response = contextsC...
[ "Creates", "a", "context", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextsClient.java#L431-L439
lessthanoptimal/ddogleg
src/org/ddogleg/sorting/ApproximateSort_F32.java
ApproximateSort_F32.sortIndex
public void sortIndex( float input[] , int start , int length , int indexes[] ) { """ Sort routine which does not modify the input array and instead maintains a list of indexes. @param input (Input) Data which is to be sorted. Not modified. @param start First element in input list @param length Length of the ...
java
public void sortIndex( float input[] , int start , int length , int indexes[] ) { for( int i = 0; i < length; i++ ) indexes[i] = i; for( int i = 0; i < histIndexes.size; i++ ) { histIndexes.get(i).reset(); } for( int i = 0; i < length; i++ ) { int indexInput = i+start; int discretized = (int)((inp...
[ "public", "void", "sortIndex", "(", "float", "input", "[", "]", ",", "int", "start", ",", "int", "length", ",", "int", "indexes", "[", "]", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "indexes", "["...
Sort routine which does not modify the input array and instead maintains a list of indexes. @param input (Input) Data which is to be sorted. Not modified. @param start First element in input list @param length Length of the input list @param indexes Number of elements
[ "Sort", "routine", "which", "does", "not", "modify", "the", "input", "array", "and", "instead", "maintains", "a", "list", "of", "indexes", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/sorting/ApproximateSort_F32.java#L124-L146
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/Graphics.java
Graphics.createImageBuffer
public static ImageBuffer createImageBuffer(int width, int height, ColorRgba transparency) { """ Create an image buffer. @param width The image width (must be strictly positive). @param height The image height (must be strictly positive). @param transparency The color transparency (must not be <code>null</cod...
java
public static ImageBuffer createImageBuffer(int width, int height, ColorRgba transparency) { return factoryGraphic.createImageBuffer(width, height, transparency); }
[ "public", "static", "ImageBuffer", "createImageBuffer", "(", "int", "width", ",", "int", "height", ",", "ColorRgba", "transparency", ")", "{", "return", "factoryGraphic", ".", "createImageBuffer", "(", "width", ",", "height", ",", "transparency", ")", ";", "}" ]
Create an image buffer. @param width The image width (must be strictly positive). @param height The image height (must be strictly positive). @param transparency The color transparency (must not be <code>null</code>). @return The image buffer. @throws LionEngineException If invalid arguments.
[ "Create", "an", "image", "buffer", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/Graphics.java#L126-L129
OpenLiberty/open-liberty
dev/com.ibm.ws.transaction.cdi/src/com/ibm/tx/jta/cdi/interceptors/Mandatory.java
Mandatory.mandatory
@AroundInvoke public Object mandatory(final InvocationContext context) throws Exception { """ <p>If called outside a transaction context, a TransactionalException with a nested TransactionRequiredException must be thrown.</p> <p>If called inside a transaction context, managed bean method execution will then...
java
@AroundInvoke public Object mandatory(final InvocationContext context) throws Exception { if (getUOWM().getUOWType() != UOWSynchronizationRegistry.UOW_TYPE_GLOBAL_TRANSACTION) { throw new TransactionalException("global tx required", new TransactionRequiredException()); } return...
[ "@", "AroundInvoke", "public", "Object", "mandatory", "(", "final", "InvocationContext", "context", ")", "throws", "Exception", "{", "if", "(", "getUOWM", "(", ")", ".", "getUOWType", "(", ")", "!=", "UOWSynchronizationRegistry", ".", "UOW_TYPE_GLOBAL_TRANSACTION", ...
<p>If called outside a transaction context, a TransactionalException with a nested TransactionRequiredException must be thrown.</p> <p>If called inside a transaction context, managed bean method execution will then continue under that context.</p>
[ "<p", ">", "If", "called", "outside", "a", "transaction", "context", "a", "TransactionalException", "with", "a", "nested", "TransactionRequiredException", "must", "be", "thrown", ".", "<", "/", "p", ">", "<p", ">", "If", "called", "inside", "a", "transaction",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transaction.cdi/src/com/ibm/tx/jta/cdi/interceptors/Mandatory.java#L38-L46
bwkimmel/jdcp
jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ThreadServiceWorker.java
ThreadServiceWorker.setMaxWorkers
public void setMaxWorkers(int maxWorkers) { """ Sets the maximum number of concurrent workers. @param maxWorkers The maximum number of concurrent workers. """ synchronized (workerQueue) { idleLock.lock(); try { int oldMaxWorkers = this.maxWorkers; this.maxWorkers = maxWorkers; ...
java
public void setMaxWorkers(int maxWorkers) { synchronized (workerQueue) { idleLock.lock(); try { int oldMaxWorkers = this.maxWorkers; this.maxWorkers = maxWorkers; // If the number of workers is being reduced, then signal any // waiting workers so that they can terminate ...
[ "public", "void", "setMaxWorkers", "(", "int", "maxWorkers", ")", "{", "synchronized", "(", "workerQueue", ")", "{", "idleLock", ".", "lock", "(", ")", ";", "try", "{", "int", "oldMaxWorkers", "=", "this", ".", "maxWorkers", ";", "this", ".", "maxWorkers",...
Sets the maximum number of concurrent workers. @param maxWorkers The maximum number of concurrent workers.
[ "Sets", "the", "maximum", "number", "of", "concurrent", "workers", "." ]
train
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ThreadServiceWorker.java#L216-L240
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.setParentGroup
public void setParentGroup(CmsRequestContext context, String groupName, String parentGroupName) throws CmsException, CmsRoleViolationException { """ Sets a new parent-group for an already existing group.<p> @param context the current request context @param groupName the name of the group that should be wri...
java
public void setParentGroup(CmsRequestContext context, String groupName, String parentGroupName) throws CmsException, CmsRoleViolationException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkRole(dbc, CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalU...
[ "public", "void", "setParentGroup", "(", "CmsRequestContext", "context", ",", "String", "groupName", ",", "String", "parentGroupName", ")", "throws", "CmsException", ",", "CmsRoleViolationException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbCont...
Sets a new parent-group for an already existing group.<p> @param context the current request context @param groupName the name of the group that should be written @param parentGroupName the name of the parent group to set, or <code>null</code> if the parent group should be deleted. @throws CmsException if operation w...
[ "Sets", "a", "new", "parent", "-", "group", "for", "an", "already", "existing", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6052-L6068
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.setPath
private final void setPath(String path) throws LockFile.FileCanonicalizationException, LockFile.FileSecurityException { """ Initializes this object with a <tt>File</tt> object whose path has the canonical form of the given <tt>path</tt> argument. <p> <b>PRE</b>:<p> <ol> <li>This method is ca...
java
private final void setPath(String path) throws LockFile.FileCanonicalizationException, LockFile.FileSecurityException { // Should at least be absolutized for reporting purposes, just in case // a security or canonicalization exception gets thrown. path = FileUtil.getDefaultInstan...
[ "private", "final", "void", "setPath", "(", "String", "path", ")", "throws", "LockFile", ".", "FileCanonicalizationException", ",", "LockFile", ".", "FileSecurityException", "{", "// Should at least be absolutized for reporting purposes, just in case", "// a security or canonical...
Initializes this object with a <tt>File</tt> object whose path has the canonical form of the given <tt>path</tt> argument. <p> <b>PRE</b>:<p> <ol> <li>This method is called once and <em>only</em> once per <tt>Lockfile</tt> instance. <li>It is <em>always</em> the first method called after <tt>LockFile</tt> constructi...
[ "Initializes", "this", "object", "with", "a", "<tt", ">", "File<", "/", "tt", ">", "object", "whose", "path", "has", "the", "canonical", "form", "of", "the", "given", "<tt", ">", "path<", "/", "tt", ">", "argument", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1010-L1034
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/BaseFont.java
BaseFont.getBaseName
protected static String getBaseName(String name) { """ Gets the name without the modifiers Bold, Italic or BoldItalic. @param name the full name of the font @return the name without the modifiers Bold, Italic or BoldItalic """ if (name.endsWith(",Bold")) return name.substring(0, name.leng...
java
protected static String getBaseName(String name) { if (name.endsWith(",Bold")) return name.substring(0, name.length() - 5); else if (name.endsWith(",Italic")) return name.substring(0, name.length() - 7); else if (name.endsWith(",BoldItalic")) return name.subst...
[ "protected", "static", "String", "getBaseName", "(", "String", "name", ")", "{", "if", "(", "name", ".", "endsWith", "(", "\",Bold\"", ")", ")", "return", "name", ".", "substring", "(", "0", ",", "name", ".", "length", "(", ")", "-", "5", ")", ";", ...
Gets the name without the modifiers Bold, Italic or BoldItalic. @param name the full name of the font @return the name without the modifiers Bold, Italic or BoldItalic
[ "Gets", "the", "name", "without", "the", "modifiers", "Bold", "Italic", "or", "BoldItalic", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/BaseFont.java#L723-L732
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CustomApi.java
CustomApi.postConfigAemPasswordResetAsync
public com.squareup.okhttp.Call postConfigAemPasswordResetAsync(String runmode, List<String> pwdresetAuthorizables, String pwdresetAuthorizablesTypeHint, final ApiCallback<Void> callback) throws ApiException { """ (asynchronously) @param runmode (required) @param pwdresetAuthorizables (optional) @param pwdr...
java
public com.squareup.okhttp.Call postConfigAemPasswordResetAsync(String runmode, List<String> pwdresetAuthorizables, String pwdresetAuthorizablesTypeHint, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRe...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postConfigAemPasswordResetAsync", "(", "String", "runmode", ",", "List", "<", "String", ">", "pwdresetAuthorizables", ",", "String", "pwdresetAuthorizablesTypeHint", ",", "final", "ApiCallback", "<", "Vo...
(asynchronously) @param runmode (required) @param pwdresetAuthorizables (optional) @param pwdresetAuthorizablesTypeHint (optional) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException If fail to process the API call, e.g. serializing the request body o...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CustomApi.java#L430-L454
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.getTypeByFunction
public static AbstractType<?> getTypeByFunction(String functionName) { """ Get AbstractType by function name @param functionName - name of the function e.g. utf8, integer, long etc. @return AbstractType type corresponding to the function name """ Function function; try { ...
java
public static AbstractType<?> getTypeByFunction(String functionName) { Function function; try { function = Function.valueOf(functionName.toUpperCase()); } catch (IllegalArgumentException e) { String message = String.format("Function '%s' not f...
[ "public", "static", "AbstractType", "<", "?", ">", "getTypeByFunction", "(", "String", "functionName", ")", "{", "Function", "function", ";", "try", "{", "function", "=", "Function", ".", "valueOf", "(", "functionName", ".", "toUpperCase", "(", ")", ")", ";"...
Get AbstractType by function name @param functionName - name of the function e.g. utf8, integer, long etc. @return AbstractType type corresponding to the function name
[ "Get", "AbstractType", "by", "function", "name" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2827-L2842
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxMenuItemPainter.java
CheckBoxMenuItemPainter.paintCheckIconDisabledAndSelected
private void paintCheckIconDisabledAndSelected(Graphics2D g, int width, int height) { """ Paint the check mark in disabled state. @param g the Graphics2D context to paint with. @param width the width. @param height the height. """ Shape s = shapeGenerator.createCheckMark(0, 0, width, height)...
java
private void paintCheckIconDisabledAndSelected(Graphics2D g, int width, int height) { Shape s = shapeGenerator.createCheckMark(0, 0, width, height); g.setPaint(iconDisabledSelected); g.fill(s); }
[ "private", "void", "paintCheckIconDisabledAndSelected", "(", "Graphics2D", "g", ",", "int", "width", ",", "int", "height", ")", "{", "Shape", "s", "=", "shapeGenerator", ".", "createCheckMark", "(", "0", ",", "0", ",", "width", ",", "height", ")", ";", "g"...
Paint the check mark in disabled state. @param g the Graphics2D context to paint with. @param width the width. @param height the height.
[ "Paint", "the", "check", "mark", "in", "disabled", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxMenuItemPainter.java#L132-L138
GoogleCloudPlatform/bigdata-interop
gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java
GoogleHadoopFileSystemBase.create
@Override public FSDataOutputStream create( Path hadoopPath, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { """ Opens the given file for writing. <p>Note: This function o...
java
@Override public FSDataOutputStream create( Path hadoopPath, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { long startTime = System.nanoTime(); Preconditions.checkArgume...
[ "@", "Override", "public", "FSDataOutputStream", "create", "(", "Path", "hadoopPath", ",", "FsPermission", "permission", ",", "boolean", "overwrite", ",", "int", "bufferSize", ",", "short", "replication", ",", "long", "blockSize", ",", "Progressable", "progress", ...
Opens the given file for writing. <p>Note: This function overrides the given bufferSize value with a higher number unless further overridden using configuration parameter {@code fs.gs.outputstream.buffer.size}. @param hadoopPath The file to open. @param permission Permissions to set on the new file. Ignored. @param o...
[ "Opens", "the", "given", "file", "for", "writing", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java#L733-L783
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/RelationshipResolverBase.java
RelationshipResolverBase.getFedoraResourceURI
protected String getFedoraResourceURI(String res) { """ given either a ns:pid/ds identifier or an info:fedora/ URI form of the same return the URI form, validating the PID part. Returns null if the argument was invalid/could not be validated/converted @param res identifier for fedora resource @return URI fo...
java
protected String getFedoraResourceURI(String res) { // strip off info URI part if present String strippedRes; if (res.startsWith(Constants.FEDORA.uri)) { strippedRes = res.substring(Constants.FEDORA.uri.length()); } else { strippedRes = res; } // s...
[ "protected", "String", "getFedoraResourceURI", "(", "String", "res", ")", "{", "// strip off info URI part if present", "String", "strippedRes", ";", "if", "(", "res", ".", "startsWith", "(", "Constants", ".", "FEDORA", ".", "uri", ")", ")", "{", "strippedRes", ...
given either a ns:pid/ds identifier or an info:fedora/ URI form of the same return the URI form, validating the PID part. Returns null if the argument was invalid/could not be validated/converted @param res identifier for fedora resource @return URI form
[ "given", "either", "a", "ns", ":", "pid", "/", "ds", "identifier", "or", "an", "info", ":", "fedora", "/", "URI", "form", "of", "the", "same", "return", "the", "URI", "form", "validating", "the", "PID", "part", ".", "Returns", "null", "if", "the", "a...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/RelationshipResolverBase.java#L79-L107
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/WeakObjectRegistry.java
WeakObjectRegistry.registerObject
public void registerObject(final Object object, final UUID id) { """ Registers an object in this model identified by a pre existing id. @param object The object to register. @param id The id by which this object is identified. """ objectToId.put(object, id); idToObject.put(id, object); ...
java
public void registerObject(final Object object, final UUID id) { objectToId.put(object, id); idToObject.put(id, object); }
[ "public", "void", "registerObject", "(", "final", "Object", "object", ",", "final", "UUID", "id", ")", "{", "objectToId", ".", "put", "(", "object", ",", "id", ")", ";", "idToObject", ".", "put", "(", "id", ",", "object", ")", ";", "}" ]
Registers an object in this model identified by a pre existing id. @param object The object to register. @param id The id by which this object is identified.
[ "Registers", "an", "object", "in", "this", "model", "identified", "by", "a", "pre", "existing", "id", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/WeakObjectRegistry.java#L135-L138
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/IntHashTable.java
IntHashTable.putAtIndex
public int putAtIndex(Object key, int value, int index) { """ Associates the specified key with the specified value in this map. @param key key with which the specified value is to be associated. @param value value to be associated with the specified key. @param index the index at which to place this binding,...
java
public int putAtIndex(Object key, int value, int index) { Object old = objs[index]; if (old == null || old == DELETED) { objs[index] = key; ints[index] = value; if (old != DELETED) num_bindings++; if (3 * num_bindings >= 2 * objs.length) ...
[ "public", "int", "putAtIndex", "(", "Object", "key", ",", "int", "value", ",", "int", "index", ")", "{", "Object", "old", "=", "objs", "[", "index", "]", ";", "if", "(", "old", "==", "null", "||", "old", "==", "DELETED", ")", "{", "objs", "[", "i...
Associates the specified key with the specified value in this map. @param key key with which the specified value is to be associated. @param value value to be associated with the specified key. @param index the index at which to place this binding, as returned from {@link #lookup}. @return previous value associated wi...
[ "Associates", "the", "specified", "key", "with", "the", "specified", "value", "in", "this", "map", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/IntHashTable.java#L138-L153
westnordost/osmapi
src/main/java/de/westnordost/osmapi/notes/NotesDao.java
NotesDao.find
public void find(Handler<Note> handler, QueryNotesFilters filters) { """ Get a number of notes that match the given filters. @param handler The handler which is fed the incoming notes @param filters what to search for. I.e. new QueryNotesFilters().byUser(123).limit(1000) @throws OsmAuthorizationException i...
java
public void find(Handler<Note> handler, QueryNotesFilters filters) { String query = filters != null ? "?" + filters.toParamString() : ""; osm.makeAuthenticatedRequest(NOTES+"/search"+query, null, new NotesParser(handler)); }
[ "public", "void", "find", "(", "Handler", "<", "Note", ">", "handler", ",", "QueryNotesFilters", "filters", ")", "{", "String", "query", "=", "filters", "!=", "null", "?", "\"?\"", "+", "filters", ".", "toParamString", "(", ")", ":", "\"\"", ";", "osm", ...
Get a number of notes that match the given filters. @param handler The handler which is fed the incoming notes @param filters what to search for. I.e. new QueryNotesFilters().byUser(123).limit(1000) @throws OsmAuthorizationException if not logged in
[ "Get", "a", "number", "of", "notes", "that", "match", "the", "given", "filters", "." ]
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/notes/NotesDao.java#L234-L238
otto-de/edison-hal
src/main/java/de/otto/edison/hal/Link.java
Link.copyOf
public static Builder copyOf(final Link prototype) { """ Create a Builder instance and initialize it from a prototype Link. @param prototype the prototype link @return a Builder for a Link. @since 0.1.0 """ return new Builder(prototype.rel, prototype.href) .withType(prototype.typ...
java
public static Builder copyOf(final Link prototype) { return new Builder(prototype.rel, prototype.href) .withType(prototype.type) .withProfile(prototype.profile) .withTitle(prototype.title) .withName(prototype.name) .withDeprecation(...
[ "public", "static", "Builder", "copyOf", "(", "final", "Link", "prototype", ")", "{", "return", "new", "Builder", "(", "prototype", ".", "rel", ",", "prototype", ".", "href", ")", ".", "withType", "(", "prototype", ".", "type", ")", ".", "withProfile", "...
Create a Builder instance and initialize it from a prototype Link. @param prototype the prototype link @return a Builder for a Link. @since 0.1.0
[ "Create", "a", "Builder", "instance", "and", "initialize", "it", "from", "a", "prototype", "Link", "." ]
train
https://github.com/otto-de/edison-hal/blob/1582d2b49d1f0d9103e03bf742f18afa9d166992/src/main/java/de/otto/edison/hal/Link.java#L232-L240
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java
ScriptContext.setNow
@Cmd public void setNow(final String key, final String value) { """ Sets a property to a given value. Both key and value can contain properties. The following rules apply: <ul> <li>the key will be evaluated on execution of the closure</li> <li>the value will be evaluated on execution of the closure</li> <li>...
java
@Cmd public void setNow(final String key, final String value) { String resolvedValue = resolveProperty(value); doSet(key, resolvedValue); }
[ "@", "Cmd", "public", "void", "setNow", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "String", "resolvedValue", "=", "resolveProperty", "(", "value", ")", ";", "doSet", "(", "key", ",", "resolvedValue", ")", ";", "}" ]
Sets a property to a given value. Both key and value can contain properties. The following rules apply: <ul> <li>the key will be evaluated on execution of the closure</li> <li>the value will be evaluated on execution of the closure</li> <li>if the value should be evaluated on querying the property you need to use {@lin...
[ "Sets", "a", "property", "to", "a", "given", "value", ".", "Both", "key", "and", "value", "can", "contain", "properties", ".", "The", "following", "rules", "apply", ":", "<ul", ">", "<li", ">", "the", "key", "will", "be", "evaluated", "on", "execution", ...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java#L793-L797
windup/windup
bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/AbstractListCommandWithoutFurnace.java
AbstractListCommandWithoutFurnace.printValuesSorted
protected static void printValuesSorted(String message, Set<String> values) { """ Print the given values after displaying the provided message. """ System.out.println(); System.out.println(message + ":"); List<String> sorted = new ArrayList<>(values); Collections.sort(sorted); ...
java
protected static void printValuesSorted(String message, Set<String> values) { System.out.println(); System.out.println(message + ":"); List<String> sorted = new ArrayList<>(values); Collections.sort(sorted); for (String value : sorted) { System.out.println...
[ "protected", "static", "void", "printValuesSorted", "(", "String", "message", ",", "Set", "<", "String", ">", "values", ")", "{", "System", ".", "out", ".", "println", "(", ")", ";", "System", ".", "out", ".", "println", "(", "message", "+", "\":\"", "...
Print the given values after displaying the provided message.
[ "Print", "the", "given", "values", "after", "displaying", "the", "provided", "message", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/AbstractListCommandWithoutFurnace.java#L16-L26
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java
CPDefinitionLinkPersistenceImpl.findByCPD_T
@Override public List<CPDefinitionLink> findByCPD_T(long CPDefinitionId, String type, int start, int end) { """ Returns a range of all the cp definition links where CPDefinitionId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>sta...
java
@Override public List<CPDefinitionLink> findByCPD_T(long CPDefinitionId, String type, int start, int end) { return findByCPD_T(CPDefinitionId, type, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionLink", ">", "findByCPD_T", "(", "long", "CPDefinitionId", ",", "String", "type", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCPD_T", "(", "CPDefinitionId", ",", "type", ",", "start",...
Returns a range of all the cp definition links where CPDefinitionId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definition", "links", "where", "CPDefinitionId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java#L2562-L2566
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.putVarInt
public static void putVarInt(int v, ByteBuffer sink) { """ Encodes an integer in a variable-length encoding, 7 bits per byte, to a ByteBuffer sink. @param v the value to encode @param sink the ByteBuffer to add the encoded value """ while (true) { int bits = v & 0x7f; v >>>= 7; if (v ...
java
public static void putVarInt(int v, ByteBuffer sink) { while (true) { int bits = v & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
[ "public", "static", "void", "putVarInt", "(", "int", "v", ",", "ByteBuffer", "sink", ")", "{", "while", "(", "true", ")", "{", "int", "bits", "=", "v", "&", "0x7f", ";", "v", ">>>=", "7", ";", "if", "(", "v", "==", "0", ")", "{", "sink", ".", ...
Encodes an integer in a variable-length encoding, 7 bits per byte, to a ByteBuffer sink. @param v the value to encode @param sink the ByteBuffer to add the encoded value
[ "Encodes", "an", "integer", "in", "a", "variable", "-", "length", "encoding", "7", "bits", "per", "byte", "to", "a", "ByteBuffer", "sink", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L145-L155
RuntimeTools/javametrics
javaagent/src/main/java/com/ibm/javametrics/instrument/ClassTransformer.java
ClassTransformer.transform
@Override public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { """ /* Called during class loading. Use ASM to modify class bytecode if necessary using the Class...
java
@Override public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { ClassReader cr = new ClassReader(classfileBuffer); ClassWriter cw = new ClassWriter(cr, C...
[ "@", "Override", "public", "byte", "[", "]", "transform", "(", "ClassLoader", "loader", ",", "String", "className", ",", "Class", "<", "?", ">", "classBeingRedefined", ",", "ProtectionDomain", "protectionDomain", ",", "byte", "[", "]", "classfileBuffer", ")", ...
/* Called during class loading. Use ASM to modify class bytecode if necessary using the ClassAdaptor
[ "/", "*", "Called", "during", "class", "loading", "." ]
train
https://github.com/RuntimeTools/javametrics/blob/e167a565d0878b535585329c42a29a86516dd741/javaagent/src/main/java/com/ibm/javametrics/instrument/ClassTransformer.java#L37-L46
graphql-java/graphql-java
src/main/java/graphql/execution/nextgen/DefaultExecutionStrategy.java
DefaultExecutionStrategy.execute
@Override public CompletableFuture<RootExecutionResultNode> execute(ExecutionContext context, FieldSubSelection fieldSubSelection) { """ /* the fundamental algorithm is: - fetch sub selection and analyze it - convert the fetched value analysis into result node - get all unresolved result nodes and resolve ...
java
@Override public CompletableFuture<RootExecutionResultNode> execute(ExecutionContext context, FieldSubSelection fieldSubSelection) { return resolveSubSelection(context, fieldSubSelection) .thenApply(RootExecutionResultNode::new); }
[ "@", "Override", "public", "CompletableFuture", "<", "RootExecutionResultNode", ">", "execute", "(", "ExecutionContext", "context", ",", "FieldSubSelection", "fieldSubSelection", ")", "{", "return", "resolveSubSelection", "(", "context", ",", "fieldSubSelection", ")", "...
/* the fundamental algorithm is: - fetch sub selection and analyze it - convert the fetched value analysis into result node - get all unresolved result nodes and resolve the sub selection (start again recursively)
[ "/", "*", "the", "fundamental", "algorithm", "is", ":", "-", "fetch", "sub", "selection", "and", "analyze", "it", "-", "convert", "the", "fetched", "value", "analysis", "into", "result", "node", "-", "get", "all", "unresolved", "result", "nodes", "and", "r...
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/nextgen/DefaultExecutionStrategy.java#L31-L35
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/model/Query.java
Query.adding
public Query adding( Ordering... orderings ) { """ Create a copy of this query, but that returns results that are ordered by the {@link #orderings() orderings} of this column as well as those supplied. @param orderings the additional orderings of the result rows; may no be null @return the copy of the query r...
java
public Query adding( Ordering... orderings ) { List<Ordering> newOrderings = null; if (this.orderings() != null) { newOrderings = new ArrayList<Ordering>(orderings()); for (Ordering ordering : orderings) { newOrderings.add(ordering); } } else {...
[ "public", "Query", "adding", "(", "Ordering", "...", "orderings", ")", "{", "List", "<", "Ordering", ">", "newOrderings", "=", "null", ";", "if", "(", "this", ".", "orderings", "(", ")", "!=", "null", ")", "{", "newOrderings", "=", "new", "ArrayList", ...
Create a copy of this query, but that returns results that are ordered by the {@link #orderings() orderings} of this column as well as those supplied. @param orderings the additional orderings of the result rows; may no be null @return the copy of the query returning the supplied result columns; never null
[ "Create", "a", "copy", "of", "this", "query", "but", "that", "returns", "results", "that", "are", "ordered", "by", "the", "{", "@link", "#orderings", "()", "orderings", "}", "of", "this", "column", "as", "well", "as", "those", "supplied", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/model/Query.java#L220-L231
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.listAsync
public Observable<Page<NetworkInterfaceTapConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) { """ Get all Tap configurations in a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network inter...
java
public Observable<Page<NetworkInterfaceTapConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) { return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName) .map(new Func1<ServiceResponse<Page<NetworkInterfaceTapConfigurationInner>>, Page...
[ "public", "Observable", "<", "Page", "<", "NetworkInterfaceTapConfigurationInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "networkInterfaceName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupNa...
Get all Tap configurations in a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;NetworkInterfaceTapConfiguratio...
[ "Get", "all", "Tap", "configurations", "in", "a", "network", "interface", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java#L581-L589
google/closure-compiler
src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java
JsDocInfoParser.extractMultilineTextualBlock
private ExtractionInfo extractMultilineTextualBlock( JsDocToken token, WhitespaceOption option, boolean includeAnnotations) { """ Extracts the text found on the current line and all subsequent until either an annotation, end of comment or end of file is reached. Note that if this method detects an end of li...
java
private ExtractionInfo extractMultilineTextualBlock( JsDocToken token, WhitespaceOption option, boolean includeAnnotations) { if (token == JsDocToken.EOC || token == JsDocToken.EOL || token == JsDocToken.EOF) { return new ExtractionInfo("", token); } return extractMultilineComment(token, option,...
[ "private", "ExtractionInfo", "extractMultilineTextualBlock", "(", "JsDocToken", "token", ",", "WhitespaceOption", "option", ",", "boolean", "includeAnnotations", ")", "{", "if", "(", "token", "==", "JsDocToken", ".", "EOC", "||", "token", "==", "JsDocToken", ".", ...
Extracts the text found on the current line and all subsequent until either an annotation, end of comment or end of file is reached. Note that if this method detects an end of line as the first token, it will quit immediately (indicating that there is no text where it was expected). Note that token = info.token; should...
[ "Extracts", "the", "text", "found", "on", "the", "current", "line", "and", "all", "subsequent", "until", "either", "an", "annotation", "end", "of", "comment", "or", "end", "of", "file", "is", "reached", ".", "Note", "that", "if", "this", "method", "detects...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java#L1715-L1721
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.getStats
@Override public Map<SocketAddress, Map<String, String>> getStats(final String arg) { """ Get a set of stats from all connections. @param arg which stats to get @return a Map of the server SocketAddress to a map of String stat keys to String stat values. @throws IllegalStateException in the rare circumstan...
java
@Override public Map<SocketAddress, Map<String, String>> getStats(final String arg) { final Map<SocketAddress, Map<String, String>> rv = new HashMap<SocketAddress, Map<String, String>>(); CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() { @Override public Operation newOp(final...
[ "@", "Override", "public", "Map", "<", "SocketAddress", ",", "Map", "<", "String", ",", "String", ">", ">", "getStats", "(", "final", "String", "arg", ")", "{", "final", "Map", "<", "SocketAddress", ",", "Map", "<", "String", ",", "String", ">", ">", ...
Get a set of stats from all connections. @param arg which stats to get @return a Map of the server SocketAddress to a map of String stat keys to String stat values. @throws IllegalStateException in the rare circumstance where queue is too full to accept any more requests
[ "Get", "a", "set", "of", "stats", "from", "all", "connections", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L1710-L1748
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java
OgmTableGenerator.determineValueColumnName
protected String determineValueColumnName(Properties params, Dialect dialect) { """ Determine the name of the column in which we will store the generator persistent value. <p> Called during {@link #configure configuration}. @param params The params supplied in the generator config (plus some standard useful e...
java
protected String determineValueColumnName(Properties params, Dialect dialect) { ObjectNameNormalizer normalizer = (ObjectNameNormalizer) params.get( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER ); String name = ConfigurationHelper.getString( VALUE_COLUMN_PARAM, params, DEF_VALUE_COLUMN ); return normalizer...
[ "protected", "String", "determineValueColumnName", "(", "Properties", "params", ",", "Dialect", "dialect", ")", "{", "ObjectNameNormalizer", "normalizer", "=", "(", "ObjectNameNormalizer", ")", "params", ".", "get", "(", "PersistentIdentifierGenerator", ".", "IDENTIFIER...
Determine the name of the column in which we will store the generator persistent value. <p> Called during {@link #configure configuration}. @param params The params supplied in the generator config (plus some standard useful extras). @param dialect The dialect in effect @return The name of the value column
[ "Determine", "the", "name", "of", "the", "column", "in", "which", "we", "will", "store", "the", "generator", "persistent", "value", ".", "<p", ">", "Called", "during", "{", "@link", "#configure", "configuration", "}", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java#L235-L239
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPSpecificationOptionPersistenceImpl.java
CPSpecificationOptionPersistenceImpl.findAll
@Override public List<CPSpecificationOption> findAll() { """ Returns all the cp specification options. @return the cp specification options """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPSpecificationOption> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPSpecificationOption", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp specification options. @return the cp specification options
[ "Returns", "all", "the", "cp", "specification", "options", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPSpecificationOptionPersistenceImpl.java#L3479-L3482
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelBase.java
ExcelBase.getOrCreateCellStyle
public CellStyle getOrCreateCellStyle(int x, int y) { """ 为指定单元格获取或者创建样式,返回样式后可以设置样式内容 @param x X坐标,从0计数,既列号 @param y Y坐标,从0计数,既行号 @return {@link CellStyle} @since 4.1.4 """ final Cell cell = getOrCreateCell(x, y); CellStyle cellStyle = cell.getCellStyle(); if (null == cellStyle) { cellStyle...
java
public CellStyle getOrCreateCellStyle(int x, int y) { final Cell cell = getOrCreateCell(x, y); CellStyle cellStyle = cell.getCellStyle(); if (null == cellStyle) { cellStyle = this.workbook.createCellStyle(); cell.setCellStyle(cellStyle); } return cellStyle; }
[ "public", "CellStyle", "getOrCreateCellStyle", "(", "int", "x", ",", "int", "y", ")", "{", "final", "Cell", "cell", "=", "getOrCreateCell", "(", "x", ",", "y", ")", ";", "CellStyle", "cellStyle", "=", "cell", ".", "getCellStyle", "(", ")", ";", "if", "...
为指定单元格获取或者创建样式,返回样式后可以设置样式内容 @param x X坐标,从0计数,既列号 @param y Y坐标,从0计数,既行号 @return {@link CellStyle} @since 4.1.4
[ "为指定单元格获取或者创建样式,返回样式后可以设置样式内容" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelBase.java#L199-L207
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java
ProcessGroovyMethods.consumeProcessOutputStream
public static Thread consumeProcessOutputStream(Process self, Appendable output) { """ Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied Appendable. A new Thread is started, so this method will ...
java
public static Thread consumeProcessOutputStream(Process self, Appendable output) { Thread thread = new Thread(new TextDumper(self.getInputStream(), output)); thread.start(); return thread; }
[ "public", "static", "Thread", "consumeProcessOutputStream", "(", "Process", "self", ",", "Appendable", "output", ")", "{", "Thread", "thread", "=", "new", "Thread", "(", "new", "TextDumper", "(", "self", ".", "getInputStream", "(", ")", ",", "output", ")", "...
Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied Appendable. A new Thread is started, so this method will return immediately. @param self a Process @param output an Appendable to capture the process s...
[ "Gets", "the", "output", "stream", "from", "a", "process", "and", "reads", "it", "to", "keep", "the", "process", "from", "blocking", "due", "to", "a", "full", "output", "buffer", ".", "The", "processed", "stream", "data", "is", "appended", "to", "the", "...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java#L317-L321
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.wasNoScope
protected static boolean wasNoScope(ActivityImpl activity, PvmExecutionImpl scopeExecutionCandidate) { """ Determines whether the given scope was a scope in previous versions """ return wasNoScope72(activity) || wasNoScope73(activity, scopeExecutionCandidate); }
java
protected static boolean wasNoScope(ActivityImpl activity, PvmExecutionImpl scopeExecutionCandidate) { return wasNoScope72(activity) || wasNoScope73(activity, scopeExecutionCandidate); }
[ "protected", "static", "boolean", "wasNoScope", "(", "ActivityImpl", "activity", ",", "PvmExecutionImpl", "scopeExecutionCandidate", ")", "{", "return", "wasNoScope72", "(", "activity", ")", "||", "wasNoScope73", "(", "activity", ",", "scopeExecutionCandidate", ")", "...
Determines whether the given scope was a scope in previous versions
[ "Determines", "whether", "the", "given", "scope", "was", "a", "scope", "in", "previous", "versions" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L320-L322
alkacon/opencms-core
src-setup/org/opencms/setup/xml/CmsSetupXmlHelper.java
CmsSetupXmlHelper.getDocument
public Document getDocument(String xmlFilename) throws CmsXmlException { """ Returns the document for the given filename.<p> It can be new read or come from the document cache.<p> @param xmlFilename the filename to read @return the document for the given filename @throws CmsXmlException if something goes...
java
public Document getDocument(String xmlFilename) throws CmsXmlException { // try to get it from the cache Document document = m_cache.get(xmlFilename); if (document == null) { try { document = CmsXmlUtils.unmarshalHelper( new InputSource(new FileR...
[ "public", "Document", "getDocument", "(", "String", "xmlFilename", ")", "throws", "CmsXmlException", "{", "// try to get it from the cache", "Document", "document", "=", "m_cache", ".", "get", "(", "xmlFilename", ")", ";", "if", "(", "document", "==", "null", ")",...
Returns the document for the given filename.<p> It can be new read or come from the document cache.<p> @param xmlFilename the filename to read @return the document for the given filename @throws CmsXmlException if something goes wrong while reading
[ "Returns", "the", "document", "for", "the", "given", "filename", ".", "<p", ">", "It", "can", "be", "new", "read", "or", "come", "from", "the", "document", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/xml/CmsSetupXmlHelper.java#L389-L413
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/hll/HllSketch.java
HllSketch.writableWrap
public static final HllSketch writableWrap(final WritableMemory wmem) { """ Wraps the given WritableMemory, which must be a image of a valid updatable sketch, and may have data. What remains on the java heap is a thin wrapper object that reads and writes to the given WritableMemory, which, depending on how the ...
java
public static final HllSketch writableWrap(final WritableMemory wmem) { final boolean compact = extractCompactFlag(wmem); if (compact) { throw new SketchesArgumentException( "Cannot perform a writableWrap of a writable sketch image that is in compact form."); } final int lgConfigK = extr...
[ "public", "static", "final", "HllSketch", "writableWrap", "(", "final", "WritableMemory", "wmem", ")", "{", "final", "boolean", "compact", "=", "extractCompactFlag", "(", "wmem", ")", ";", "if", "(", "compact", ")", "{", "throw", "new", "SketchesArgumentExceptio...
Wraps the given WritableMemory, which must be a image of a valid updatable sketch, and may have data. What remains on the java heap is a thin wrapper object that reads and writes to the given WritableMemory, which, depending on how the user configures the WritableMemory, may actually reside on the Java heap or off-heap...
[ "Wraps", "the", "given", "WritableMemory", "which", "must", "be", "a", "image", "of", "a", "valid", "updatable", "sketch", "and", "may", "have", "data", ".", "What", "remains", "on", "the", "java", "heap", "is", "a", "thin", "wrapper", "object", "that", ...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hll/HllSketch.java#L167-L197
google/closure-compiler
src/com/google/javascript/jscomp/modules/Binding.java
Binding.from
static Binding from(Export boundExport, Node sourceNode) { """ Binding for an exported value that is not a module namespace object. """ return new AutoValue_Binding( boundExport.moduleMetadata(), sourceNode, boundExport, /* isModuleNamespace= */ false, /* closureName...
java
static Binding from(Export boundExport, Node sourceNode) { return new AutoValue_Binding( boundExport.moduleMetadata(), sourceNode, boundExport, /* isModuleNamespace= */ false, /* closureNamespace= */ null, CreatedBy.EXPORT); }
[ "static", "Binding", "from", "(", "Export", "boundExport", ",", "Node", "sourceNode", ")", "{", "return", "new", "AutoValue_Binding", "(", "boundExport", ".", "moduleMetadata", "(", ")", ",", "sourceNode", ",", "boundExport", ",", "/* isModuleNamespace= */", "fals...
Binding for an exported value that is not a module namespace object.
[ "Binding", "for", "an", "exported", "value", "that", "is", "not", "a", "module", "namespace", "object", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/modules/Binding.java#L93-L101
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.isLessThan
public static IsLessThan isLessThan(ComparableExpression<Number> left, Object constant) { """ Creates an IsLessThan expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a Number). @throws IllegalArgumentException If the consta...
java
public static IsLessThan isLessThan(ComparableExpression<Number> left, Object constant) { if (!(constant instanceof Number)) throw new IllegalArgumentException("constant is not a Number"); return new IsLessThan(left, constant((Number)constant)); }
[ "public", "static", "IsLessThan", "isLessThan", "(", "ComparableExpression", "<", "Number", ">", "left", ",", "Object", "constant", ")", "{", "if", "(", "!", "(", "constant", "instanceof", "Number", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\...
Creates an IsLessThan expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a Number). @throws IllegalArgumentException If the constant is not a Number @return A new is less than binary expression.
[ "Creates", "an", "IsLessThan", "expression", "from", "the", "given", "expression", "and", "constant", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L335-L341
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_snmp_config.java
ns_snmp_config.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ ns_snmp_config_responses result = (ns_snmp_config_responses) service.ge...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_snmp_config_responses result = (ns_snmp_config_responses) service.get_payload_formatter().string_to_resource(ns_snmp_config_responses.class, response); if(result.errorcode != 0) { if (result.er...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ns_snmp_config_responses", "result", "=", "(", "ns_snmp_config_responses", ")", "service", ".", "get_payload_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_snmp_config.java#L331-L348
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.appendSeparator
public StrBuilder appendSeparator(final String separator, final int loopIndex) { """ Appends a separator to the builder if the loop index is greater than zero. Appending a null separator will have no effect. The separator is appended using {@link #append(String)}. <p> This method is useful for adding a separat...
java
public StrBuilder appendSeparator(final String separator, final int loopIndex) { if (separator != null && loopIndex > 0) { append(separator); } return this; }
[ "public", "StrBuilder", "appendSeparator", "(", "final", "String", "separator", ",", "final", "int", "loopIndex", ")", "{", "if", "(", "separator", "!=", "null", "&&", "loopIndex", ">", "0", ")", "{", "append", "(", "separator", ")", ";", "}", "return", ...
Appends a separator to the builder if the loop index is greater than zero. Appending a null separator will have no effect. The separator is appended using {@link #append(String)}. <p> This method is useful for adding a separator each time around the loop except the first. </p> <pre> for (int i = 0; i &lt; list.size(); ...
[ "Appends", "a", "separator", "to", "the", "builder", "if", "the", "loop", "index", "is", "greater", "than", "zero", ".", "Appending", "a", "null", "separator", "will", "have", "no", "effect", ".", "The", "separator", "is", "appended", "using", "{", "@link"...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1437-L1442
lastaflute/lasta-di
src/main/java/org/lastaflute/di/util/LdiSrl.java
LdiSrl.indexOfLast
public static IndexOfInfo indexOfLast(final String str, final String... delimiters) { """ Get the index of the last-found delimiter. <pre> indexOfLast("foo.bar/baz.qux", ".", "/") returns the index of ".qux" </pre> @param str The target string. (NotNull) @param delimiters The array of delimiters. (NotNull) ...
java
public static IndexOfInfo indexOfLast(final String str, final String... delimiters) { return doIndexOfLast(false, str, delimiters); }
[ "public", "static", "IndexOfInfo", "indexOfLast", "(", "final", "String", "str", ",", "final", "String", "...", "delimiters", ")", "{", "return", "doIndexOfLast", "(", "false", ",", "str", ",", "delimiters", ")", ";", "}" ]
Get the index of the last-found delimiter. <pre> indexOfLast("foo.bar/baz.qux", ".", "/") returns the index of ".qux" </pre> @param str The target string. (NotNull) @param delimiters The array of delimiters. (NotNull) @return The information of index. (NullAllowed: if delimiter not found)
[ "Get", "the", "index", "of", "the", "last", "-", "found", "delimiter", ".", "<pre", ">", "indexOfLast", "(", "foo", ".", "bar", "/", "baz", ".", "qux", ".", "/", ")", "returns", "the", "index", "of", ".", "qux", "<", "/", "pre", ">" ]
train
https://github.com/lastaflute/lasta-di/blob/c4e123610c53a04cc836c5e456660e32d613447b/src/main/java/org/lastaflute/di/util/LdiSrl.java#L411-L413
geomajas/geomajas-project-client-gwt
plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/GeomajasServiceImpl.java
GeomajasServiceImpl.getMap
@Export public Map getMap(String applicationId, String mapId) { """ Return the {@link Map} that is registered with the given application and map ID. @param applicationId the application id. @param mapId the map id. @return the map. """ HashMap<String, Map> application = maps.get(applicationId); if ...
java
@Export public Map getMap(String applicationId, String mapId) { HashMap<String, Map> application = maps.get(applicationId); if (null == application) { return null; } return application.get(mapId); }
[ "@", "Export", "public", "Map", "getMap", "(", "String", "applicationId", ",", "String", "mapId", ")", "{", "HashMap", "<", "String", ",", "Map", ">", "application", "=", "maps", ".", "get", "(", "applicationId", ")", ";", "if", "(", "null", "==", "app...
Return the {@link Map} that is registered with the given application and map ID. @param applicationId the application id. @param mapId the map id. @return the map.
[ "Return", "the", "{", "@link", "Map", "}", "that", "is", "registered", "with", "the", "given", "application", "and", "map", "ID", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/GeomajasServiceImpl.java#L144-L151
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java
FloatingPointLoops.sawOpcode
@Override public void sawOpcode(int seen) { """ implements the visitor to find for loops using floating point indexes @param seen the opcode of the currently parsed instruction """ if (!forLoops.isEmpty()) { Iterator<FloatForLoop> ffl = forLoops.iterator(); while (ffl.ha...
java
@Override public void sawOpcode(int seen) { if (!forLoops.isEmpty()) { Iterator<FloatForLoop> ffl = forLoops.iterator(); while (ffl.hasNext()) { if (!ffl.next().sawOpcode(seen)) { ffl.remove(); } } } if ...
[ "@", "Override", "public", "void", "sawOpcode", "(", "int", "seen", ")", "{", "if", "(", "!", "forLoops", ".", "isEmpty", "(", ")", ")", "{", "Iterator", "<", "FloatForLoop", ">", "ffl", "=", "forLoops", ".", "iterator", "(", ")", ";", "while", "(", ...
implements the visitor to find for loops using floating point indexes @param seen the opcode of the currently parsed instruction
[ "implements", "the", "visitor", "to", "find", "for", "loops", "using", "floating", "point", "indexes" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java#L78-L92
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_lan_lanName_dhcp_dhcpName_GET
public OvhDHCP serviceName_modem_lan_lanName_dhcp_dhcpName_GET(String serviceName, String lanName, String dhcpName) throws IOException { """ Get this object properties REST: GET /xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName} @param serviceName [required] The internal name of your XDSL offer @param la...
java
public OvhDHCP serviceName_modem_lan_lanName_dhcp_dhcpName_GET(String serviceName, String lanName, String dhcpName) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}"; StringBuilder sb = path(qPath, serviceName, lanName, dhcpName); String resp = exec(qPath, "GET", sb.toS...
[ "public", "OvhDHCP", "serviceName_modem_lan_lanName_dhcp_dhcpName_GET", "(", "String", "serviceName", ",", "String", "lanName", ",", "String", "dhcpName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}\"", ...
Get this object properties REST: GET /xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName} @param serviceName [required] The internal name of your XDSL offer @param lanName [required] Name of the LAN @param dhcpName [required] Name of the DHCP
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1022-L1027
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FreightStreamer.java
FreightStreamer.cat
void cat(String src, boolean verifyChecksum) throws IOException { """ Fetch all files that match the file pattern <i>srcf</i> and display their content on stdout. @param srcf: a file pattern specifying source files @exception: IOException @see org.apache.hadoop.fs.FileSystem.globStatus """ //cat behavi...
java
void cat(String src, boolean verifyChecksum) throws IOException { //cat behavior in Linux // [~/1207]$ ls ?.txt // x.txt z.txt // [~/1207]$ cat x.txt y.txt z.txt // xxx // cat: y.txt: No such file or directory // zzz Path srcPattern = new Path(src); new DelayedExceptionThrowi...
[ "void", "cat", "(", "String", "src", ",", "boolean", "verifyChecksum", ")", "throws", "IOException", "{", "//cat behavior in Linux", "// [~/1207]$ ls ?.txt", "// x.txt z.txt", "// [~/1207]$ cat x.txt y.txt z.txt", "// xxx", "// cat: y.txt: No such file or directory", "// z...
Fetch all files that match the file pattern <i>srcf</i> and display their content on stdout. @param srcf: a file pattern specifying source files @exception: IOException @see org.apache.hadoop.fs.FileSystem.globStatus
[ "Fetch", "all", "files", "that", "match", "the", "file", "pattern", "<i", ">", "srcf<", "/", "i", ">", "and", "display", "their", "content", "on", "stdout", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FreightStreamer.java#L253-L272
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/FileListener.java
FileListener.writeField
public void writeField(ObjectOutputStream daOut, Converter converter) throws IOException { """ Encode and write this field's data to the stream. @param daOut The output stream to marshal the data to. @param converter The field to serialize. """ String strFieldName = DBConstants.BLANK; if (con...
java
public void writeField(ObjectOutputStream daOut, Converter converter) throws IOException { String strFieldName = DBConstants.BLANK; if (converter != null) if (converter.getField() != null) strFieldName = converter.getField().getClass().getName(); Object data = null; if (c...
[ "public", "void", "writeField", "(", "ObjectOutputStream", "daOut", ",", "Converter", "converter", ")", "throws", "IOException", "{", "String", "strFieldName", "=", "DBConstants", ".", "BLANK", ";", "if", "(", "converter", "!=", "null", ")", "if", "(", "conver...
Encode and write this field's data to the stream. @param daOut The output stream to marshal the data to. @param converter The field to serialize.
[ "Encode", "and", "write", "this", "field", "s", "data", "to", "the", "stream", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/FileListener.java#L405-L415
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java
AttributeRenderer.addAttribute
private void addAttribute(int list, TreeHtmlAttributeInfo attr, RemoveInfo removes) { """ This method will add an attribute to the list of inheritted attributes. @param list @param attr @param removes """ ArrayList al = _lists[list]; // if the array list is the empty list then we need to all...
java
private void addAttribute(int list, TreeHtmlAttributeInfo attr, RemoveInfo removes) { ArrayList al = _lists[list]; // if the array list is the empty list then we need to allocate a new array list if (al == empty) { al = new ArrayList(); _lists[list] = al; } ...
[ "private", "void", "addAttribute", "(", "int", "list", ",", "TreeHtmlAttributeInfo", "attr", ",", "RemoveInfo", "removes", ")", "{", "ArrayList", "al", "=", "_lists", "[", "list", "]", ";", "// if the array list is the empty list then we need to allocate a new array list"...
This method will add an attribute to the list of inheritted attributes. @param list @param attr @param removes
[ "This", "method", "will", "add", "an", "attribute", "to", "the", "list", "of", "inheritted", "attributes", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java#L263-L289
landawn/AbacusUtil
src/com/landawn/abacus/util/Iterables.java
Iterables.isPermutations
private static boolean isPermutations(Collection<?> a, Collection<?> b) { """ Returns {@code true} if the second list is a permutation of the first. """ if (a.size() != b.size()) { return false; } return N.difference(a, b).size() == 0; }
java
private static boolean isPermutations(Collection<?> a, Collection<?> b) { if (a.size() != b.size()) { return false; } return N.difference(a, b).size() == 0; }
[ "private", "static", "boolean", "isPermutations", "(", "Collection", "<", "?", ">", "a", ",", "Collection", "<", "?", ">", "b", ")", "{", "if", "(", "a", ".", "size", "(", ")", "!=", "b", ".", "size", "(", ")", ")", "{", "return", "false", ";", ...
Returns {@code true} if the second list is a permutation of the first.
[ "Returns", "{" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Iterables.java#L856-L862
arquillian/arquillian-cube
openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/CEEnvironmentProcessor.java
CEEnvironmentProcessor.createEnvironment
public void createEnvironment(@Observes(precedence = 10) BeforeClass event, OpenShiftAdapter client, CubeOpenShiftConfiguration cubeOpenShiftConfiguration) { """ Create the environment as specified by @Template or arq.extension.ce-cube.openshift.template.* properties. <p> In the future, this might be ha...
java
public void createEnvironment(@Observes(precedence = 10) BeforeClass event, OpenShiftAdapter client, CubeOpenShiftConfiguration cubeOpenShiftConfiguration) { final TestClass testClass = event.getTestClass(); log.info(String.format("Creating environment for %s", testClass.getName())); Ope...
[ "public", "void", "createEnvironment", "(", "@", "Observes", "(", "precedence", "=", "10", ")", "BeforeClass", "event", ",", "OpenShiftAdapter", "client", ",", "CubeOpenShiftConfiguration", "cubeOpenShiftConfiguration", ")", "{", "final", "TestClass", "testClass", "="...
Create the environment as specified by @Template or arq.extension.ce-cube.openshift.template.* properties. <p> In the future, this might be handled by starting application Cube objects, e.g. CreateCube(application), StartCube(application) <p> Needs to fire before the containers are started.
[ "Create", "the", "environment", "as", "specified", "by" ]
train
https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/CEEnvironmentProcessor.java#L87-L96