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
geomajas/geomajas-project-client-gwt
plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/JsSnapService.java
JsSnapService.addNearestVertexSnappingRule
public void addNearestVertexSnappingRule(String snapLayer, double distance) { """ Add a new snapping rules to the list. Each new rule provides information on how snapping should occur. The added rule will use algorithm {@link NearestVertexSnapAlgorithm}. @param snapLayer The layer id that will provide the tar...
java
public void addNearestVertexSnappingRule(String snapLayer, double distance) { SnapSourceProvider snapSourceProvider = new VectorLayerSourceProvider(editor.getMapWidget().getMapModel() .getVectorLayer(snapLayer)); delegate.addSnappingRule(new SnappingRule(new NearestVertexSnapAlgorithm(), snapSourceProvider, dis...
[ "public", "void", "addNearestVertexSnappingRule", "(", "String", "snapLayer", ",", "double", "distance", ")", "{", "SnapSourceProvider", "snapSourceProvider", "=", "new", "VectorLayerSourceProvider", "(", "editor", ".", "getMapWidget", "(", ")", ".", "getMapModel", "(...
Add a new snapping rules to the list. Each new rule provides information on how snapping should occur. The added rule will use algorithm {@link NearestVertexSnapAlgorithm}. @param snapLayer The layer id that will provide the target geometries where to snap. @param distance The maximum distance to bridge during snappin...
[ "Add", "a", "new", "snapping", "rules", "to", "the", "list", ".", "Each", "new", "rule", "provides", "information", "on", "how", "snapping", "should", "occur", ".", "The", "added", "rule", "will", "use", "algorithm", "{", "@link", "NearestVertexSnapAlgorithm",...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/JsSnapService.java#L66-L70
DDTH/ddth-redis
src/main/java/com/github/ddth/redis/RedisClientFactory.java
RedisClientFactory.getRedisClient
public IRedisClient getRedisClient(String host, int port, String username, String password) { """ Gets or Creates a {@link IRedisClient} object. @param host @param port @param username @param password @return """ return getRedisClient(host, port, username, password, null); }
java
public IRedisClient getRedisClient(String host, int port, String username, String password) { return getRedisClient(host, port, username, password, null); }
[ "public", "IRedisClient", "getRedisClient", "(", "String", "host", ",", "int", "port", ",", "String", "username", ",", "String", "password", ")", "{", "return", "getRedisClient", "(", "host", ",", "port", ",", "username", ",", "password", ",", "null", ")", ...
Gets or Creates a {@link IRedisClient} object. @param host @param port @param username @param password @return
[ "Gets", "or", "Creates", "a", "{", "@link", "IRedisClient", "}", "object", "." ]
train
https://github.com/DDTH/ddth-redis/blob/7e6abc3e43c9efe7e9c293d421c94227253ded87/src/main/java/com/github/ddth/redis/RedisClientFactory.java#L175-L177
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/StatusApi.java
StatusApi.getStatus
public StatusResponse getStatus(String datasource, String ifNoneMatch) throws ApiException { """ Retrieve the uptime and player counts EVE Server status --- This route is cached for up to 30 seconds @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMa...
java
public StatusResponse getStatus(String datasource, String ifNoneMatch) throws ApiException { ApiResponse<StatusResponse> resp = getStatusWithHttpInfo(datasource, ifNoneMatch); return resp.getData(); }
[ "public", "StatusResponse", "getStatus", "(", "String", "datasource", ",", "String", "ifNoneMatch", ")", "throws", "ApiException", "{", "ApiResponse", "<", "StatusResponse", ">", "resp", "=", "getStatusWithHttpInfo", "(", "datasource", ",", "ifNoneMatch", ")", ";", ...
Retrieve the uptime and player counts EVE Server status --- This route is cached for up to 30 seconds @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional) @return...
[ "Retrieve", "the", "uptime", "and", "player", "counts", "EVE", "Server", "status", "---", "This", "route", "is", "cached", "for", "up", "to", "30", "seconds" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/StatusApi.java#L129-L132
assertthat/selenium-shutterbug
src/main/java/com/assertthat/selenium_shutterbug/core/PageSnapshot.java
PageSnapshot.highlightWithText
public PageSnapshot highlightWithText(WebElement element, String text) { """ Highlight WebElement within the page (same as in {@link #highlight(WebElement)}} and adding provided text above highlighted element. @param element WebElement to be highlighted with Color.red and line width 3 @param text test to be ...
java
public PageSnapshot highlightWithText(WebElement element, String text) { try { highlightWithText(element, Color.red, 3, text, Color.red, new Font("Serif", Font.BOLD, 20)); } catch (RasterFormatException rfe) { throw new ElementOutsideViewportException(ELEMENT_OUT_OF_VIEWPORT_EX_M...
[ "public", "PageSnapshot", "highlightWithText", "(", "WebElement", "element", ",", "String", "text", ")", "{", "try", "{", "highlightWithText", "(", "element", ",", "Color", ".", "red", ",", "3", ",", "text", ",", "Color", ".", "red", ",", "new", "Font", ...
Highlight WebElement within the page (same as in {@link #highlight(WebElement)}} and adding provided text above highlighted element. @param element WebElement to be highlighted with Color.red and line width 3 @param text test to be places above highlighted element with Color.red, font "Serif", BOLD, size 20 @return in...
[ "Highlight", "WebElement", "within", "the", "page", "(", "same", "as", "in", "{", "@link", "#highlight", "(", "WebElement", ")", "}}", "and", "adding", "provided", "text", "above", "highlighted", "element", "." ]
train
https://github.com/assertthat/selenium-shutterbug/blob/770d9b92423200d262c9ab70e40405921d81e262/src/main/java/com/assertthat/selenium_shutterbug/core/PageSnapshot.java#L71-L78
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java
SftpUtil.initEndpointDirectories
public static void initEndpointDirectories(MuleContext muleContext, String[] serviceNames, String[] endpointNames) throws Exception { """ Initiates a list of sftp-endpoint-directories. Ensures that affected services are stopped during the initiation. @param serviceNames @param endpointNames @param muleContex...
java
public static void initEndpointDirectories(MuleContext muleContext, String[] serviceNames, String[] endpointNames) throws Exception { // Stop all named services (either Flows or services List<Lifecycle> services = new ArrayList<Lifecycle>(); for (String serviceName : serviceNames) { try { Lifecycle servic...
[ "public", "static", "void", "initEndpointDirectories", "(", "MuleContext", "muleContext", ",", "String", "[", "]", "serviceNames", ",", "String", "[", "]", "endpointNames", ")", "throws", "Exception", "{", "// Stop all named services (either Flows or services", "List", ...
Initiates a list of sftp-endpoint-directories. Ensures that affected services are stopped during the initiation. @param serviceNames @param endpointNames @param muleContext @throws Exception
[ "Initiates", "a", "list", "of", "sftp", "-", "endpoint", "-", "directories", ".", "Ensures", "that", "affected", "services", "are", "stopped", "during", "the", "initiation", "." ]
train
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java#L69-L99
lucee/Lucee
core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java
VariableInterpreter.setVariable
public static Object setVariable(PageContext pc, String var, Object value) throws PageException { """ sets a variable to page Context @param pc pagecontext of the new variable @param var String of variable definition @param value value to set to variable @return value setted @throws PageException """ S...
java
public static Object setVariable(PageContext pc, String var, Object value) throws PageException { StringList list = parse(pc, new ParserString(var), false); if (list == null) throw new InterpreterException("invalid variable name declaration [" + var + "]"); if (list.size() == 1) { return pc.undefinedScope().se...
[ "public", "static", "Object", "setVariable", "(", "PageContext", "pc", ",", "String", "var", ",", "Object", "value", ")", "throws", "PageException", "{", "StringList", "list", "=", "parse", "(", "pc", ",", "new", "ParserString", "(", "var", ")", ",", "fals...
sets a variable to page Context @param pc pagecontext of the new variable @param var String of variable definition @param value value to set to variable @return value setted @throws PageException
[ "sets", "a", "variable", "to", "page", "Context" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/VariableInterpreter.java#L361-L384
dita-ot/dita-ot
src/main/java/org/dita/dost/reader/SubjectSchemeReader.java
SubjectSchemeReader.writeMapToXML
public static void writeMapToXML(final Map<URI, Set<URI>> m, final File outputFile) throws IOException { """ Write map of sets to a file. <p>The serialization format is XML properties format where values are comma separated lists.</p> @param m map to serialize @param outputFile output filename, relative to...
java
public static void writeMapToXML(final Map<URI, Set<URI>> m, final File outputFile) throws IOException { if (m == null) { return; } final Properties prop = new Properties(); for (final Map.Entry<URI, Set<URI>> entry: m.entrySet()) { final URI key = entry.getKey();...
[ "public", "static", "void", "writeMapToXML", "(", "final", "Map", "<", "URI", ",", "Set", "<", "URI", ">", ">", "m", ",", "final", "File", "outputFile", ")", "throws", "IOException", "{", "if", "(", "m", "==", "null", ")", "{", "return", ";", "}", ...
Write map of sets to a file. <p>The serialization format is XML properties format where values are comma separated lists.</p> @param m map to serialize @param outputFile output filename, relative to temporary directory
[ "Write", "map", "of", "sets", "to", "a", "file", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/SubjectSchemeReader.java#L142-L157
ThreeTen/threetenbp
src/main/java/org/threeten/bp/Instant.java
Instant.ofEpochSecond
public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { """ Obtains an instance of {@code Instant} using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second. <p> This method allows an arbitrary number of nanoseconds to be passed in. The factory will alter the v...
java
public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { long secs = Jdk8Methods.safeAdd(epochSecond, Jdk8Methods.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); int nos = Jdk8Methods.floorMod(nanoAdjustment, NANOS_PER_SECOND); return create(secs, nos); }
[ "public", "static", "Instant", "ofEpochSecond", "(", "long", "epochSecond", ",", "long", "nanoAdjustment", ")", "{", "long", "secs", "=", "Jdk8Methods", ".", "safeAdd", "(", "epochSecond", ",", "Jdk8Methods", ".", "floorDiv", "(", "nanoAdjustment", ",", "NANOS_P...
Obtains an instance of {@code Instant} using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second. <p> This method allows an arbitrary number of nanoseconds to be passed in. The factory will alter the values of the second and nanosecond in order to ensure that the stored nanosecond is in the...
[ "Obtains", "an", "instance", "of", "{", "@code", "Instant", "}", "using", "seconds", "from", "the", "epoch", "of", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", "and", "nanosecond", "fraction", "of", "second", ".", "<p", ">", "This", "method"...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/Instant.java#L299-L303
alkacon/opencms-core
src/org/opencms/ui/dataview/CmsDataViewPanel.java
CmsDataViewPanel.fillItem
public void fillItem(I_CmsDataViewItem item, Item target) { """ Fills the given item.<p> @param item the data view item @param target the table item """ for (CmsDataViewColumn column : m_dataView.getColumns()) { String name = column.getId(); Object value = CmsColumnValueCon...
java
public void fillItem(I_CmsDataViewItem item, Item target) { for (CmsDataViewColumn column : m_dataView.getColumns()) { String name = column.getId(); Object value = CmsColumnValueConverter.getColumnValue(item.getColumnData(name), column.getType()); target.getItemProperty(name...
[ "public", "void", "fillItem", "(", "I_CmsDataViewItem", "item", ",", "Item", "target", ")", "{", "for", "(", "CmsDataViewColumn", "column", ":", "m_dataView", ".", "getColumns", "(", ")", ")", "{", "String", "name", "=", "column", ".", "getId", "(", ")", ...
Fills the given item.<p> @param item the data view item @param target the table item
[ "Fills", "the", "given", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dataview/CmsDataViewPanel.java#L344-L352
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java
SheetResourcesImpl.importCsvInFolder
public Sheet importCsvInFolder(long folderId, String file, String sheetName, Integer headerRowIndex, Integer primaryRowIndex) throws SmartsheetException { """ Imports a sheet in given folder. It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import @param folderId the fo...
java
public Sheet importCsvInFolder(long folderId, String file, String sheetName, Integer headerRowIndex, Integer primaryRowIndex) throws SmartsheetException { return importFile("folders/" + folderId + "/sheets/import", file,"text/csv", sheetName, headerRowIndex, primaryRowIndex); }
[ "public", "Sheet", "importCsvInFolder", "(", "long", "folderId", ",", "String", "file", ",", "String", "sheetName", ",", "Integer", "headerRowIndex", ",", "Integer", "primaryRowIndex", ")", "throws", "SmartsheetException", "{", "return", "importFile", "(", "\"folder...
Imports a sheet in given folder. It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import @param folderId the folder id @param file path to the CSV file @param sheetName destination sheet name @param headerRowIndex index (0 based) of row to be used for column names @param primary...
[ "Imports", "a", "sheet", "in", "given", "folder", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L533-L536
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java
QualityOfServiceBlockingQueue.waitForAdd
private boolean waitForAdd(long waitStart, long maxWait) throws InterruptedException { """ This MUST be called while {@link #writeLock} is locked by the current thread """ while (this.size == 0) { if (!waitOnCondition(this.notEmpty, maxWait, waitStart)) { return false; ...
java
private boolean waitForAdd(long waitStart, long maxWait) throws InterruptedException { while (this.size == 0) { if (!waitOnCondition(this.notEmpty, maxWait, waitStart)) { return false; } } return true; }
[ "private", "boolean", "waitForAdd", "(", "long", "waitStart", ",", "long", "maxWait", ")", "throws", "InterruptedException", "{", "while", "(", "this", ".", "size", "==", "0", ")", "{", "if", "(", "!", "waitOnCondition", "(", "this", ".", "notEmpty", ",", ...
This MUST be called while {@link #writeLock} is locked by the current thread
[ "This", "MUST", "be", "called", "while", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java#L688-L696
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteBuffer.java
ByteBuffer.modularExponentation
private int modularExponentation(int a, int b, int n) throws IllegalArgumentException { """ Gets the modular exponentiation, i.e. result of a^b mod n. Use to calculate hashcode. @param a A number. @param b An exponent. @param n A modulus. @return Result of modular exponentiation, i.e. result of a^b mod n. ...
java
private int modularExponentation(int a, int b, int n) throws IllegalArgumentException { int result = 1; int counter; int maxBinarySize = 32; boolean[] b2Binary = new boolean[maxBinarySize]; for (counter = 0; b > 0; counter++) { if (counter >= maxBinarySize){ ...
[ "private", "int", "modularExponentation", "(", "int", "a", ",", "int", "b", ",", "int", "n", ")", "throws", "IllegalArgumentException", "{", "int", "result", "=", "1", ";", "int", "counter", ";", "int", "maxBinarySize", "=", "32", ";", "boolean", "[", "]...
Gets the modular exponentiation, i.e. result of a^b mod n. Use to calculate hashcode. @param a A number. @param b An exponent. @param n A modulus. @return Result of modular exponentiation, i.e. result of a^b mod n.
[ "Gets", "the", "modular", "exponentiation", "i", ".", "e", ".", "result", "of", "a^b", "mod", "n", ".", "Use", "to", "calculate", "hashcode", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteBuffer.java#L270-L289
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java
ViewFetcher.getRecyclerView
public View getRecyclerView(boolean shouldSleep, int recyclerViewIndex) { """ Returns a RecyclerView or null if none is found @param viewList the list to check in @return a RecyclerView """ Set<View> uniqueViews = new HashSet<View>(); if(shouldSleep){ sleeper.sleep(); } @SuppressWarnings("unc...
java
public View getRecyclerView(boolean shouldSleep, int recyclerViewIndex){ Set<View> uniqueViews = new HashSet<View>(); if(shouldSleep){ sleeper.sleep(); } @SuppressWarnings("unchecked") ArrayList<View> views = RobotiumUtils.filterViewsToSet(new Class[] {ViewGroup.class}, getAllViews(false)); views = Robo...
[ "public", "View", "getRecyclerView", "(", "boolean", "shouldSleep", ",", "int", "recyclerViewIndex", ")", "{", "Set", "<", "View", ">", "uniqueViews", "=", "new", "HashSet", "<", "View", ">", "(", ")", ";", "if", "(", "shouldSleep", ")", "{", "sleeper", ...
Returns a RecyclerView or null if none is found @param viewList the list to check in @return a RecyclerView
[ "Returns", "a", "RecyclerView", "or", "null", "if", "none", "is", "found" ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java#L438-L459
vorburger/ch.vorburger.exec
src/main/java/ch/vorburger/exec/ManagedProcessBuilder.java
ManagedProcessBuilder.addArgument
protected ManagedProcessBuilder addArgument(String argPart1, String separator, String argPart2) { """ Adds a single argument to the command, composed of two parts and a given separator. The two parts are independently escaped (see above), and then concatenated using the separator. """ // @see MariaDB4...
java
protected ManagedProcessBuilder addArgument(String argPart1, String separator, String argPart2) { // @see MariaDB4j Issue #30 why 'quoting' (https://github.com/vorburger/MariaDB4j/issues/30) StringBuilder sb = new StringBuilder(); sb.append(StringUtils.quoteArgument(argPart1)); sb.append...
[ "protected", "ManagedProcessBuilder", "addArgument", "(", "String", "argPart1", ",", "String", "separator", ",", "String", "argPart2", ")", "{", "// @see MariaDB4j Issue #30 why 'quoting' (https://github.com/vorburger/MariaDB4j/issues/30)", "StringBuilder", "sb", "=", "new", "S...
Adds a single argument to the command, composed of two parts and a given separator. The two parts are independently escaped (see above), and then concatenated using the separator.
[ "Adds", "a", "single", "argument", "to", "the", "command", "composed", "of", "two", "parts", "and", "a", "given", "separator", ".", "The", "two", "parts", "are", "independently", "escaped", "(", "see", "above", ")", "and", "then", "concatenated", "using", ...
train
https://github.com/vorburger/ch.vorburger.exec/blob/98853c55c8dfb3a6185019b8928df2a091baa471/src/main/java/ch/vorburger/exec/ManagedProcessBuilder.java#L137-L147
qiujuer/Genius-Android
caprice/ui/src/main/java/net/qiujuer/genius/ui/compat/UiCompat.java
UiCompat.setOutlineProvider
public static void setOutlineProvider(View view, final BalloonMarkerDrawable balloonMarkerDrawable) { """ Sets the custom Outline provider on API>=21. Does nothing on API<21 @param view View @param balloonMarkerDrawable OutlineProvider Drawable """ if (Build.VERSION.SDK_INT >= Bui...
java
public static void setOutlineProvider(View view, final BalloonMarkerDrawable balloonMarkerDrawable) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { UiCompatNotCrash.setOutlineProvider(view, balloonMarkerDrawable); } }
[ "public", "static", "void", "setOutlineProvider", "(", "View", "view", ",", "final", "BalloonMarkerDrawable", "balloonMarkerDrawable", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "{", ...
Sets the custom Outline provider on API>=21. Does nothing on API<21 @param view View @param balloonMarkerDrawable OutlineProvider Drawable
[ "Sets", "the", "custom", "Outline", "provider", "on", "API", ">", "=", "21", ".", "Does", "nothing", "on", "API<21" ]
train
https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/ui/src/main/java/net/qiujuer/genius/ui/compat/UiCompat.java#L44-L48
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryResultItem.java
InventoryResultItem.withContent
public InventoryResultItem withContent(java.util.Collection<java.util.Map<String, String>> content) { """ <p> Contains all the inventory data of the item type. Results include attribute names and values. </p> @param content Contains all the inventory data of the item type. Results include attribute names and...
java
public InventoryResultItem withContent(java.util.Collection<java.util.Map<String, String>> content) { setContent(content); return this; }
[ "public", "InventoryResultItem", "withContent", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", ">", "content", ")", "{", "setContent", "(", "content", ")", ";", "return", "this", ";",...
<p> Contains all the inventory data of the item type. Results include attribute names and values. </p> @param content Contains all the inventory data of the item type. Results include attribute names and values. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Contains", "all", "the", "inventory", "data", "of", "the", "item", "type", ".", "Results", "include", "attribute", "names", "and", "values", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryResultItem.java#L304-L307
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/dialog/DialogButton.java
DialogButton.setIcons
public DialogButton setIcons(UiIcon primary, UiIcon secondary) { """ * Icons to display, with or without text (see text option). The primary icon is displayed on the left of the label text, the secondary on the right. Value for the primary and secondary properties must be a classname (String), eg. "ui-icon-gear"...
java
public DialogButton setIcons(UiIcon primary, UiIcon secondary) { options.put("icons", new ButtonIcon(primary, secondary)); return this; }
[ "public", "DialogButton", "setIcons", "(", "UiIcon", "primary", ",", "UiIcon", "secondary", ")", "{", "options", ".", "put", "(", "\"icons\"", ",", "new", "ButtonIcon", "(", "primary", ",", "secondary", ")", ")", ";", "return", "this", ";", "}" ]
* Icons to display, with or without text (see text option). The primary icon is displayed on the left of the label text, the secondary on the right. Value for the primary and secondary properties must be a classname (String), eg. "ui-icon-gear". For using only a primary icon: icons: {primary:'ui-icon-locked'}. For usin...
[ "*", "Icons", "to", "display", "with", "or", "without", "text", "(", "see", "text", "option", ")", ".", "The", "primary", "icon", "is", "displayed", "on", "the", "left", "of", "the", "label", "text", "the", "secondary", "on", "the", "right", ".", "Valu...
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/dialog/DialogButton.java#L186-L190
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLNegativeObjectPropertyAssertionAxiomImpl_CustomFieldSerializer.java
OWLNegativeObjectPropertyAssertionAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLNegativeObjectPropertyAssertionAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLNegativeObjectPropertyAssertionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLNegativeObjectPropertyAssertionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";...
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLNegativeObjectPropertyAssertionAxiomImpl_CustomFieldSerializer.java#L77-L80
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/impl/RasterLayerComponentImpl.java
RasterLayerComponentImpl.addLoadError
protected void addLoadError(PdfContext context, ImageException e) { """ Add image with a exception message in the PDF document. @param context PDF context @param e exception to put in image """ Bbox imageBounds = e.getRasterImage().getBounds(); float scaleFactor = (float) (72 / getMap().getRasterReso...
java
protected void addLoadError(PdfContext context, ImageException e) { Bbox imageBounds = e.getRasterImage().getBounds(); float scaleFactor = (float) (72 / getMap().getRasterResolution()); float width = (float) imageBounds.getWidth() * scaleFactor; float height = (float) imageBounds.getHeight() * scaleFactor; //...
[ "protected", "void", "addLoadError", "(", "PdfContext", "context", ",", "ImageException", "e", ")", "{", "Bbox", "imageBounds", "=", "e", ".", "getRasterImage", "(", ")", ".", "getBounds", "(", ")", ";", "float", "scaleFactor", "=", "(", "float", ")", "(",...
Add image with a exception message in the PDF document. @param context PDF context @param e exception to put in image
[ "Add", "image", "with", "a", "exception", "message", "in", "the", "PDF", "document", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/impl/RasterLayerComponentImpl.java#L414-L436
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/DependenciesMojo.java
DependenciesMojo.getFilesToProcess
@Override protected List<ChecksumFile> getFilesToProcess() { """ Build the list of files from which digests should be generated. <p>The list is composed of the project dependencies.</p> @return the list of files that should be processed. """ List<ChecksumFile> files = new LinkedList<ChecksumF...
java
@Override protected List<ChecksumFile> getFilesToProcess() { List<ChecksumFile> files = new LinkedList<ChecksumFile>(); @SuppressWarnings("unchecked") Set<Artifact> artifacts = transitive ? project.getArtifacts() : project.getDependencyArtifacts(); for ( Artifact artifact : art...
[ "@", "Override", "protected", "List", "<", "ChecksumFile", ">", "getFilesToProcess", "(", ")", "{", "List", "<", "ChecksumFile", ">", "files", "=", "new", "LinkedList", "<", "ChecksumFile", ">", "(", ")", ";", "@", "SuppressWarnings", "(", "\"unchecked\"", "...
Build the list of files from which digests should be generated. <p>The list is composed of the project dependencies.</p> @return the list of files that should be processed.
[ "Build", "the", "list", "of", "files", "from", "which", "digests", "should", "be", "generated", "." ]
train
https://github.com/nicoulaj/checksum-maven-plugin/blob/8d8feab8a0a34e24ae41621e7372be6387e1fe55/src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/DependenciesMojo.java#L171-L188
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java
EmbeddedNeo4jEntityQueries.removeEntity
public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) { """ Remove the nodes representing the entity and the embedded elements attached to it. @param executionEngine the {@link GraphDatabaseService} used to run the query @param columnValues the values of the key identifying the ...
java
public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) { Map<String, Object> params = params( columnValues ); executionEngine.execute( getRemoveEntityQuery(), params ); }
[ "public", "void", "removeEntity", "(", "GraphDatabaseService", "executionEngine", ",", "Object", "[", "]", "columnValues", ")", "{", "Map", "<", "String", ",", "Object", ">", "params", "=", "params", "(", "columnValues", ")", ";", "executionEngine", ".", "exec...
Remove the nodes representing the entity and the embedded elements attached to it. @param executionEngine the {@link GraphDatabaseService} used to run the query @param columnValues the values of the key identifying the entity to remove
[ "Remove", "the", "nodes", "representing", "the", "entity", "and", "the", "embedded", "elements", "attached", "to", "it", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L154-L157
calimero-project/calimero-core
src/tuwien/auto/calimero/DataUnitBuilder.java
DataUnitBuilder.toHex
public static String toHex(final byte[] data, final String sep) { """ Returns the content of <code>data</code> as unsigned bytes in hexadecimal string representation. <p> This method does not add hexadecimal prefixes (like 0x). @param data data array to format @param sep separator to insert between 2 format...
java
public static String toHex(final byte[] data, final String sep) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < data.length; ++i) { final int no = data[i] & 0xff; if (no < 0x10) sb.append('0'); sb.append(Integer.toHexString(no)); if (sep != null && i < data.length - 1) sb.ap...
[ "public", "static", "String", "toHex", "(", "final", "byte", "[", "]", "data", ",", "final", "String", "sep", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "da...
Returns the content of <code>data</code> as unsigned bytes in hexadecimal string representation. <p> This method does not add hexadecimal prefixes (like 0x). @param data data array to format @param sep separator to insert between 2 formatted data bytes, <code>null</code> or "" for no gap between byte tokens @return an...
[ "Returns", "the", "content", "of", "<code", ">", "data<", "/", "code", ">", "as", "unsigned", "bytes", "in", "hexadecimal", "string", "representation", ".", "<p", ">", "This", "method", "does", "not", "add", "hexadecimal", "prefixes", "(", "like", "0x", ")...
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/DataUnitBuilder.java#L455-L467
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
ConfigurationAbstractImpl.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { """ Returns the boolean value for the specified key. If no value for this key is found in the configuration or the value is not an legal boolean <code>defaultValue</code> is returned. @see #trueValues @see #falseValues @param key the key @para...
java
public boolean getBoolean(String key, boolean defaultValue) { String tmp = properties.getProperty(key); if (tmp == null) { logger.debug("No value for key \"" + key + "\", using default " + defaultValue + "."); properties.put(key, String.va...
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "tmp", "=", "properties", ".", "getProperty", "(", "key", ")", ";", "if", "(", "tmp", "==", "null", ")", "{", "logger", ".", "debug", "(", "\"N...
Returns the boolean value for the specified key. If no value for this key is found in the configuration or the value is not an legal boolean <code>defaultValue</code> is returned. @see #trueValues @see #falseValues @param key the key @param defaultValue the default Value @return the value for the key, or <code>defaul...
[ "Returns", "the", "boolean", "value", "for", "the", "specified", "key", ".", "If", "no", "value", "for", "this", "key", "is", "found", "in", "the", "configuration", "or", "the", "value", "is", "not", "an", "legal", "boolean", "<code", ">", "defaultValue<",...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java#L251-L288
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/TimeUtil.java
TimeUtil.fillDateTimePool
public static final int fillDateTimePool(IWord[] wPool, IWord word) { """ fill the date-time pool specified part through the specified time entity string. @param wPool @param word @return int """ int pIdx = getDateTimeIndex(word.getEntity(0)); if ( pIdx == DATETIME_NONE ) { ...
java
public static final int fillDateTimePool(IWord[] wPool, IWord word) { int pIdx = getDateTimeIndex(word.getEntity(0)); if ( pIdx == DATETIME_NONE ) { return DATETIME_NONE; } if ( wPool[pIdx] == null ) { wPool[pIdx] = word; return pIdx; ...
[ "public", "static", "final", "int", "fillDateTimePool", "(", "IWord", "[", "]", "wPool", ",", "IWord", "word", ")", "{", "int", "pIdx", "=", "getDateTimeIndex", "(", "word", ".", "getEntity", "(", "0", ")", ")", ";", "if", "(", "pIdx", "==", "DATETIME_...
fill the date-time pool specified part through the specified time entity string. @param wPool @param word @return int
[ "fill", "the", "date", "-", "time", "pool", "specified", "part", "through", "the", "specified", "time", "entity", "string", "." ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/TimeUtil.java#L100-L113
mattprecious/telescope
telescope/src/main/java/com/mattprecious/telescope/FileProvider.java
FileProvider.getPathStrategy
private static PathStrategy getPathStrategy(Context context, String authority) { """ Return {@link PathStrategy} for given authority, either by parsing or returning from cache. """ PathStrategy strat; synchronized (sCache) { strat = sCache.get(authority); if (strat == null) { try {...
java
private static PathStrategy getPathStrategy(Context context, String authority) { PathStrategy strat; synchronized (sCache) { strat = sCache.get(authority); if (strat == null) { try { strat = parsePathStrategy(context, authority); } catch (IOException e) { throw ne...
[ "private", "static", "PathStrategy", "getPathStrategy", "(", "Context", "context", ",", "String", "authority", ")", "{", "PathStrategy", "strat", ";", "synchronized", "(", "sCache", ")", "{", "strat", "=", "sCache", ".", "get", "(", "authority", ")", ";", "i...
Return {@link PathStrategy} for given authority, either by parsing or returning from cache.
[ "Return", "{" ]
train
https://github.com/mattprecious/telescope/blob/ce5e2710fb16ee214026fc25b091eb946fdbbb3c/telescope/src/main/java/com/mattprecious/telescope/FileProvider.java#L529-L547
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newSystemException
public static SystemException newSystemException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link SystemException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} ...
java
public static SystemException newSystemException(Throwable cause, String message, Object... args) { return new SystemException(format(message, args), cause); }
[ "public", "static", "SystemException", "newSystemException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "SystemException", "(", "format", "(", "message", ",", "args", ")", ",", "cause", ")", ...
Constructs and initializes a new {@link SystemException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link SystemException} was thrown. @param message {@link String} describing the {...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "SystemException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object",...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L915-L917
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.withObjectInputStream
public static <T> T withObjectInputStream(File file, @ClosureParams(value = SimpleType.class, options = "java.io.ObjectInputStream") Closure<T> closure) throws IOException { """ Create a new ObjectInputStream for this file and pass it to the closure. This method ensures the stream is closed after the closure retu...
java
public static <T> T withObjectInputStream(File file, @ClosureParams(value = SimpleType.class, options = "java.io.ObjectInputStream") Closure<T> closure) throws IOException { return IOGroovyMethods.withStream(newObjectInputStream(file), closure); }
[ "public", "static", "<", "T", ">", "T", "withObjectInputStream", "(", "File", "file", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.ObjectInputStream\"", ")", "Closure", "<", "T", ">", "closure", ")...
Create a new ObjectInputStream for this file and pass it to the closure. This method ensures the stream is closed after the closure returns. @param file a File @param closure a closure @return the value returned by the closure @throws IOException if an IOException occurs. @see IOGroovyMethods#withStream(java.io.Inp...
[ "Create", "a", "new", "ObjectInputStream", "for", "this", "file", "and", "pass", "it", "to", "the", "closure", ".", "This", "method", "ensures", "the", "stream", "is", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L203-L205
jenkinsci/jenkins
core/src/main/java/hudson/model/LoadBalancer.java
LoadBalancer.sanitize
protected LoadBalancer sanitize() { """ Wraps this {@link LoadBalancer} into a decorator that tests the basic sanity of the implementation. Only override this if you find some of the checks excessive, but beware that it's like driving without a seat belt. """ final LoadBalancer base = this; re...
java
protected LoadBalancer sanitize() { final LoadBalancer base = this; return new LoadBalancer() { @Override public Mapping map(Task task, MappingWorksheet worksheet) { if (Queue.isBlockedByShutdown(task)) { // if we are quieting down, don't start...
[ "protected", "LoadBalancer", "sanitize", "(", ")", "{", "final", "LoadBalancer", "base", "=", "this", ";", "return", "new", "LoadBalancer", "(", ")", "{", "@", "Override", "public", "Mapping", "map", "(", "Task", "task", ",", "MappingWorksheet", "worksheet", ...
Wraps this {@link LoadBalancer} into a decorator that tests the basic sanity of the implementation. Only override this if you find some of the checks excessive, but beware that it's like driving without a seat belt.
[ "Wraps", "this", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/LoadBalancer.java#L147-L168
mojohaus/webstart
webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/generator/AbstractGenerator.java
AbstractGenerator.indentText
protected String indentText( int level, String text ) { """ Add {@code level} space caracteres at the begin of each lines of the given {@code text}. @param level the number of space caracteres to add @param text the text to prefix @return the indented text """ StringBuilder buffer = new StringBu...
java
protected String indentText( int level, String text ) { StringBuilder buffer = new StringBuilder(); String[] lines = text.split( "\n" ); String prefix = StringUtils.leftPad( "", level ); for ( String line : lines ) { buffer.append( prefix ).append( line ).append( ...
[ "protected", "String", "indentText", "(", "int", "level", ",", "String", "text", ")", "{", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "String", "[", "]", "lines", "=", "text", ".", "split", "(", "\"\\n\"", ")", ";", "String", ...
Add {@code level} space caracteres at the begin of each lines of the given {@code text}. @param level the number of space caracteres to add @param text the text to prefix @return the indented text
[ "Add", "{", "@code", "level", "}", "space", "caracteres", "at", "the", "begin", "of", "each", "lines", "of", "the", "given", "{", "@code", "text", "}", "." ]
train
https://github.com/mojohaus/webstart/blob/38fdd1d21f063f21716cfcd61ebeabd963487576/webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/generator/AbstractGenerator.java#L291-L301
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/algorithm/fmes/Matching.java
Matching.containedChildren
public long containedChildren(final ITreeData paramNodeX, final ITreeData paramNodeY) throws TTIOException { """ Counts the number of child nodes in the subtrees of x and y that are also in the matching. @param paramNodeX first subtree root node @param paramNodeY second subtree root node @return number of ...
java
public long containedChildren(final ITreeData paramNodeX, final ITreeData paramNodeY) throws TTIOException { assert paramNodeX != null; assert paramNodeY != null; long retVal = 0; mRtxOld.moveTo(paramNodeX.getDataKey()); for (final AbsAxis axis = new DescendantAxis(mRtxOld, true...
[ "public", "long", "containedChildren", "(", "final", "ITreeData", "paramNodeX", ",", "final", "ITreeData", "paramNodeY", ")", "throws", "TTIOException", "{", "assert", "paramNodeX", "!=", "null", ";", "assert", "paramNodeY", "!=", "null", ";", "long", "retVal", ...
Counts the number of child nodes in the subtrees of x and y that are also in the matching. @param paramNodeX first subtree root node @param paramNodeY second subtree root node @return number of children which have been matched @throws TTIOException
[ "Counts", "the", "number", "of", "child", "nodes", "in", "the", "subtrees", "of", "x", "and", "y", "that", "are", "also", "in", "the", "matching", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/algorithm/fmes/Matching.java#L160-L171
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java
OWLObjectAllValuesFromImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectAllValuesFromImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google....
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectAllValuesFromImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectAllValuesFromImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java#L73-L76
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java
MappeableRunContainer.mergeValuesLength
private void mergeValuesLength(int begin, int end) { """ To merge values length from begin(inclusive) to end(inclusive) """ if (begin < end) { int bValue = toIntUnsigned(getValue(begin)); int eValue = toIntUnsigned(getValue(end)); int eLength = toIntUnsigned(getLength(end)); int new...
java
private void mergeValuesLength(int begin, int end) { if (begin < end) { int bValue = toIntUnsigned(getValue(begin)); int eValue = toIntUnsigned(getValue(end)); int eLength = toIntUnsigned(getLength(end)); int newLength = eValue - bValue + eLength; setLength(begin, (short) newLength); ...
[ "private", "void", "mergeValuesLength", "(", "int", "begin", ",", "int", "end", ")", "{", "if", "(", "begin", "<", "end", ")", "{", "int", "bValue", "=", "toIntUnsigned", "(", "getValue", "(", "begin", ")", ")", ";", "int", "eValue", "=", "toIntUnsigne...
To merge values length from begin(inclusive) to end(inclusive)
[ "To", "merge", "values", "length", "from", "begin", "(", "inclusive", ")", "to", "end", "(", "inclusive", ")" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java#L1804-L1813
tvesalainen/util
util/src/main/java/org/vesalainen/util/InterfaceTracer.java
InterfaceTracer.getTracer
protected static <T> T getTracer(Class<T> intf, InterfaceTracer tracer, T ob) { """ Creates a tracer for intf. This is meant to be used by subclass. @param <T> @param intf Implemented interface @param ob Class instance for given interface or null @return """ tracer.setAppendable(System.err); ...
java
protected static <T> T getTracer(Class<T> intf, InterfaceTracer tracer, T ob) { tracer.setAppendable(System.err); tracer.setObj(ob); return (T) Proxy.newProxyInstance( intf.getClassLoader(), new Class<?>[] {intf}, tracer); }
[ "protected", "static", "<", "T", ">", "T", "getTracer", "(", "Class", "<", "T", ">", "intf", ",", "InterfaceTracer", "tracer", ",", "T", "ob", ")", "{", "tracer", ".", "setAppendable", "(", "System", ".", "err", ")", ";", "tracer", ".", "setObj", "("...
Creates a tracer for intf. This is meant to be used by subclass. @param <T> @param intf Implemented interface @param ob Class instance for given interface or null @return
[ "Creates", "a", "tracer", "for", "intf", ".", "This", "is", "meant", "to", "be", "used", "by", "subclass", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/InterfaceTracer.java#L73-L81
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/Slice.java
Slice.setLong
public void setLong(int index, long value) { """ Sets the specified 64-bit long integer at the specified absolute {@code index} in this buffer. @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is greater than {@code this.capacity} """ che...
java
public void setLong(int index, long value) { checkPositionIndexes(index, index + SIZE_OF_LONG, this.length); index += offset; data[index] = (byte) (value); data[index + 1] = (byte) (value >>> 8); data[index + 2] = (byte) (value >>> 16); data[index + 3] = (byte) (value...
[ "public", "void", "setLong", "(", "int", "index", ",", "long", "value", ")", "{", "checkPositionIndexes", "(", "index", ",", "index", "+", "SIZE_OF_LONG", ",", "this", ".", "length", ")", ";", "index", "+=", "offset", ";", "data", "[", "index", "]", "=...
Sets the specified 64-bit long integer at the specified absolute {@code index} in this buffer. @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is greater than {@code this.capacity}
[ "Sets", "the", "specified", "64", "-", "bit", "long", "integer", "at", "the", "specified", "absolute", "{", "@code", "index", "}", "in", "this", "buffer", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/Slice.java#L326-L338
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseIntObj
@Nullable public static Integer parseIntObj (@Nullable final String sStr, @Nullable final Integer aDefault) { """ Parse the given {@link String} as {@link Integer} with radix {@link #DEFAULT_RADIX}. @param sStr The string to parse. May be <code>null</code>. @param aDefault The default value to be returned...
java
@Nullable public static Integer parseIntObj (@Nullable final String sStr, @Nullable final Integer aDefault) { return parseIntObj (sStr, DEFAULT_RADIX, aDefault); }
[ "@", "Nullable", "public", "static", "Integer", "parseIntObj", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "Integer", "aDefault", ")", "{", "return", "parseIntObj", "(", "sStr", ",", "DEFAULT_RADIX", ",", "aDefault", ")", ...
Parse the given {@link String} as {@link Integer} with radix {@link #DEFAULT_RADIX}. @param sStr The string to parse. May be <code>null</code>. @param aDefault The default value to be returned if the passed string could not be converted to a valid value. May be <code>null</code>. @return <code>aDefault</code> if the s...
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "{", "@link", "Integer", "}", "with", "radix", "{", "@link", "#DEFAULT_RADIX", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L864-L868
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.fileDump
public static final void fileDump(String fileName, byte[] data) { """ Writes a large byte array to a file. @param fileName output file name @param data target data """ System.out.println("FILE DUMP"); try { FileOutputStream os = new FileOutputStream(fileName); os.write(d...
java
public static final void fileDump(String fileName, byte[] data) { System.out.println("FILE DUMP"); try { FileOutputStream os = new FileOutputStream(fileName); os.write(data); os.close(); } catch (IOException ex) { ex.printStackTrace(); } ...
[ "public", "static", "final", "void", "fileDump", "(", "String", "fileName", ",", "byte", "[", "]", "data", ")", "{", "System", ".", "out", ".", "println", "(", "\"FILE DUMP\"", ")", ";", "try", "{", "FileOutputStream", "os", "=", "new", "FileOutputStream",...
Writes a large byte array to a file. @param fileName output file name @param data target data
[ "Writes", "a", "large", "byte", "array", "to", "a", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L1000-L1014
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowcollector.java
appflowcollector.get
public static appflowcollector get(nitro_service service, String name) throws Exception { """ Use this API to fetch appflowcollector resource of given name . """ appflowcollector obj = new appflowcollector(); obj.set_name(name); appflowcollector response = (appflowcollector) obj.get_resource(service); ...
java
public static appflowcollector get(nitro_service service, String name) throws Exception{ appflowcollector obj = new appflowcollector(); obj.set_name(name); appflowcollector response = (appflowcollector) obj.get_resource(service); return response; }
[ "public", "static", "appflowcollector", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appflowcollector", "obj", "=", "new", "appflowcollector", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch appflowcollector resource of given name .
[ "Use", "this", "API", "to", "fetch", "appflowcollector", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowcollector.java#L311-L316
gallandarakhneorg/afc
core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticGenerator.java
StochasticGenerator.noiseValue
@Pure public static double noiseValue(double value, MathFunction noiseLaw) throws MathException { """ Add a noise to the specified value. <p>The returned value is given by: {@code (value-noise) &lt; value &lt; (value+noise)} where {@code 0 &lt;= noise &lt;= max(abs(value), noiseLaw(value))}. The {@code n...
java
@Pure public static double noiseValue(double value, MathFunction noiseLaw) throws MathException { try { double noise = Math.abs(noiseLaw.f(value)); initRandomNumberList(); noise *= uniformRandomVariableList.nextFloat(); if (uniformRandomVariableList.nextBoolea...
[ "@", "Pure", "public", "static", "double", "noiseValue", "(", "double", "value", ",", "MathFunction", "noiseLaw", ")", "throws", "MathException", "{", "try", "{", "double", "noise", "=", "Math", ".", "abs", "(", "noiseLaw", ".", "f", "(", "value", ")", "...
Add a noise to the specified value. <p>The returned value is given by: {@code (value-noise) &lt; value &lt; (value+noise)} where {@code 0 &lt;= noise &lt;= max(abs(value), noiseLaw(value))}. The {@code noise} is randomly selected according to the given random number list. <p>This method uses a {@link UniformStochasti...
[ "Add", "a", "noise", "to", "the", "specified", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathstochastic/src/main/java/org/arakhne/afc/math/stochastic/StochasticGenerator.java#L86-L99
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java
BoundingBox.fromString
public static BoundingBox fromString(String boundingBoxString) { """ Creates a new BoundingBox from a comma-separated string of coordinates in the order minLat, minLon, maxLat, maxLon. All coordinate values must be in degrees. @param boundingBoxString the string that describes the BoundingBox. @return a new B...
java
public static BoundingBox fromString(String boundingBoxString) { double[] coordinates = LatLongUtils.parseCoordinateString(boundingBoxString, 4); return new BoundingBox(coordinates[0], coordinates[1], coordinates[2], coordinates[3]); }
[ "public", "static", "BoundingBox", "fromString", "(", "String", "boundingBoxString", ")", "{", "double", "[", "]", "coordinates", "=", "LatLongUtils", ".", "parseCoordinateString", "(", "boundingBoxString", ",", "4", ")", ";", "return", "new", "BoundingBox", "(", ...
Creates a new BoundingBox from a comma-separated string of coordinates in the order minLat, minLon, maxLat, maxLon. All coordinate values must be in degrees. @param boundingBoxString the string that describes the BoundingBox. @return a new BoundingBox with the given coordinates. @throws IllegalArgumentException if the...
[ "Creates", "a", "new", "BoundingBox", "from", "a", "comma", "-", "separated", "string", "of", "coordinates", "in", "the", "order", "minLat", "minLon", "maxLat", "maxLon", ".", "All", "coordinate", "values", "must", "be", "in", "degrees", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java#L39-L42
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java
UTF16.indexOf
public static int indexOf(String source, String str) { """ Returns the index within the argument UTF16 format Unicode string of the first occurrence of the argument string str. This method is implemented based on codepoints, hence a "lead surrogate character + trail surrogate character" is treated as one entity....
java
public static int indexOf(String source, String str) { int strLength = str.length(); // non-surrogate ends if (!isTrailSurrogate(str.charAt(0)) && !isLeadSurrogate(str.charAt(strLength - 1))) { return source.indexOf(str); } int result = source.indexOf(str); i...
[ "public", "static", "int", "indexOf", "(", "String", "source", ",", "String", "str", ")", "{", "int", "strLength", "=", "str", ".", "length", "(", ")", ";", "// non-surrogate ends", "if", "(", "!", "isTrailSurrogate", "(", "str", ".", "charAt", "(", "0",...
Returns the index within the argument UTF16 format Unicode string of the first occurrence of the argument string str. This method is implemented based on codepoints, hence a "lead surrogate character + trail surrogate character" is treated as one entity.e Hence if the str starts with trail surrogate character at index ...
[ "Returns", "the", "index", "within", "the", "argument", "UTF16", "format", "Unicode", "string", "of", "the", "first", "occurrence", "of", "the", "argument", "string", "str", ".", "This", "method", "is", "implemented", "based", "on", "codepoints", "hence", "a",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java#L1529-L1551
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/BaseRecordReader.java
BaseRecordReader.setNextKeyValue
public boolean setNextKeyValue(Text key, Row value) throws IOException { """ Read the next row from the split, storing the coordinate in "key" and the content in "value". If there are no more rows then false is returned and "key" and "value" are not modified. @return true if a row was read, false if...
java
public boolean setNextKeyValue(Text key, Row value) throws IOException { if (!_rows.hasNext()) { Closeables.close(this, true); return false; } try { Map<String, Object> content = _rows.next(); key.set(Coordinate.fromJson(content).toStr...
[ "public", "boolean", "setNextKeyValue", "(", "Text", "key", ",", "Row", "value", ")", "throws", "IOException", "{", "if", "(", "!", "_rows", ".", "hasNext", "(", ")", ")", "{", "Closeables", ".", "close", "(", "this", ",", "true", ")", ";", "return", ...
Read the next row from the split, storing the coordinate in "key" and the content in "value". If there are no more rows then false is returned and "key" and "value" are not modified. @return true if a row was read, false if there were no more rows
[ "Read", "the", "next", "row", "from", "the", "split", "storing", "the", "coordinate", "in", "key", "and", "the", "content", "in", "value", ".", "If", "there", "are", "no", "more", "rows", "then", "false", "is", "returned", "and", "key", "and", "value", ...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/BaseRecordReader.java#L52-L71
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java
CommerceWishListItemPersistenceImpl.findByCommerceWishListId
@Override public List<CommerceWishListItem> findByCommerceWishListId( long commerceWishListId, int start, int end) { """ Returns a range of all the commerce wish list items where commerceWishListId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>st...
java
@Override public List<CommerceWishListItem> findByCommerceWishListId( long commerceWishListId, int start, int end) { return findByCommerceWishListId(commerceWishListId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWishListItem", ">", "findByCommerceWishListId", "(", "long", "commerceWishListId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCommerceWishListId", "(", "commerceWishListId", ",", "start", ",", ...
Returns a range of all the commerce wish list items where commerceWishListId = &#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 first r...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "wish", "list", "items", "where", "commerceWishListId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java#L144-L148
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownPtoN_F64.java
AddBrownPtoN_F64.setDistortion
public AddBrownPtoN_F64 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { """ Specify intrinsic camera parameters @param radial Radial distortion parameters """ params = new RadialTangential_F64(radial, t1, t2); return this; }
java
public AddBrownPtoN_F64 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { params = new RadialTangential_F64(radial, t1, t2); return this; }
[ "public", "AddBrownPtoN_F64", "setDistortion", "(", "/**/", "double", "[", "]", "radial", ",", "/**/", "double", "t1", ",", "/**/", "double", "t2", ")", "{", "params", "=", "new", "RadialTangential_F64", "(", "radial", ",", "t1", ",", "t2", ")", ";", "re...
Specify intrinsic camera parameters @param radial Radial distortion parameters
[ "Specify", "intrinsic", "camera", "parameters" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownPtoN_F64.java#L67-L70
schallee/alib4j
jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java
JVMLauncher.getProcessBuilder
public static ProcessBuilder getProcessBuilder(Class<?> mainClass, List<String> args) throws LauncherException { """ Get a process loader for a JVM. The class path for the JVM is computed based on the class loaders for the main class. @param mainClass Main class to run @param args Additional command line parame...
java
public static ProcessBuilder getProcessBuilder(Class<?> mainClass, List<String> args) throws LauncherException { return getProcessBuilder(mainClass.getName(), getClassPathURLsFor(mainClass), args); }
[ "public", "static", "ProcessBuilder", "getProcessBuilder", "(", "Class", "<", "?", ">", "mainClass", ",", "List", "<", "String", ">", "args", ")", "throws", "LauncherException", "{", "return", "getProcessBuilder", "(", "mainClass", ".", "getName", "(", ")", ",...
Get a process loader for a JVM. The class path for the JVM is computed based on the class loaders for the main class. @param mainClass Main class to run @param args Additional command line parameters @return ProcessBuilder that has not been started.
[ "Get", "a", "process", "loader", "for", "a", "JVM", ".", "The", "class", "path", "for", "the", "JVM", "is", "computed", "based", "on", "the", "class", "loaders", "for", "the", "main", "class", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java#L194-L197
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.updateStreamPresets
public void updateStreamPresets(String domain, String app, String stream, Map<String, String> presets) { """ Update stream's presets @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The requested stream which ...
java
public void updateStreamPresets(String domain, String app, String stream, Map<String, String> presets) { UpdateStreamPresetsRequest request = new UpdateStreamPresetsRequest() .withDomain(domain) .withApp(app) .withStream(stream) .withPresets(preset...
[ "public", "void", "updateStreamPresets", "(", "String", "domain", ",", "String", "app", ",", "String", "stream", ",", "Map", "<", "String", ",", "String", ">", "presets", ")", "{", "UpdateStreamPresetsRequest", "request", "=", "new", "UpdateStreamPresetsRequest", ...
Update stream's presets @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The requested stream which need to update the presets @param presets The new presets is setting to the specific stream; it's a map, and key is l...
[ "Update", "stream", "s", "presets" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1624-L1631
SUSE/salt-netapi-client
src/main/java/com/suse/salt/netapi/event/WebSocketEventStream.java
WebSocketEventStream.initializeStream
private void initializeStream(URI uri, Token token, long sessionIdleTimeout, long idleTimeout) throws SaltException { """ Connect the WebSocket to the server pointing to /ws/{token} to receive events. @throws SaltException in case of an error during stream initialization """ try { ...
java
private void initializeStream(URI uri, Token token, long sessionIdleTimeout, long idleTimeout) throws SaltException { try { URI adjustedURI = new URI(uri.getScheme() == "https" ? "wss" : "ws", uri.getSchemeSpecificPart(), uri.getFragment()) .resolv...
[ "private", "void", "initializeStream", "(", "URI", "uri", ",", "Token", "token", ",", "long", "sessionIdleTimeout", ",", "long", "idleTimeout", ")", "throws", "SaltException", "{", "try", "{", "URI", "adjustedURI", "=", "new", "URI", "(", "uri", ".", "getSch...
Connect the WebSocket to the server pointing to /ws/{token} to receive events. @throws SaltException in case of an error during stream initialization
[ "Connect", "the", "WebSocket", "to", "the", "server", "pointing", "to", "/", "ws", "/", "{", "token", "}", "to", "receive", "events", "." ]
train
https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/event/WebSocketEventStream.java#L88-L104
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/CFFFontSubset.java
CFFFontSubset.CalcSubrOffsetSize
int CalcSubrOffsetSize(int Offset,int Size) { """ Calculates how many byte it took to write the offset for the subrs in a specific private dict. @param Offset The Offset for the private dict @param Size The size of the private dict @return The size of the offset of the subrs in the private dict """ // Se...
java
int CalcSubrOffsetSize(int Offset,int Size) { // Set the size to 0 int OffsetSize = 0; // Go to the beginning of the private dict seek(Offset); // Go until the end of the private dict while (getPosition() < Offset+Size) { int p1 = getPosition(); getDictItem(); int p2 = g...
[ "int", "CalcSubrOffsetSize", "(", "int", "Offset", ",", "int", "Size", ")", "{", "// Set the size to 0", "int", "OffsetSize", "=", "0", ";", "// Go to the beginning of the private dict", "seek", "(", "Offset", ")", ";", "// Go until the end of the private dict ", "while...
Calculates how many byte it took to write the offset for the subrs in a specific private dict. @param Offset The Offset for the private dict @param Size The size of the private dict @return The size of the offset of the subrs in the private dict
[ "Calculates", "how", "many", "byte", "it", "took", "to", "write", "the", "offset", "for", "the", "subrs", "in", "a", "specific", "private", "dict", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java#L1555-L1576
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java
FeatureInfoBuilder.buildResultsInfoMessageAndClose
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, Projection projection) { """ Build a feature results information message and close the results @param results feature index results @param projection desired geometry projection @return results message or null if no results """ ...
java
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, Projection projection) { return buildResultsInfoMessageAndClose(results, 0, null, projection); }
[ "public", "String", "buildResultsInfoMessageAndClose", "(", "FeatureIndexResults", "results", ",", "Projection", "projection", ")", "{", "return", "buildResultsInfoMessageAndClose", "(", "results", ",", "0", ",", "null", ",", "projection", ")", ";", "}" ]
Build a feature results information message and close the results @param results feature index results @param projection desired geometry projection @return results message or null if no results
[ "Build", "a", "feature", "results", "information", "message", "and", "close", "the", "results" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java#L251-L253
rjeschke/txtmark
src/main/java/com/github/rjeschke/txtmark/Emitter.java
Emitter.findToken
private int findToken(final String in, final int start, final MarkToken token) { """ Finds the position of the given Token in the given String. @param in The String to search on. @param start The starting character position. @param token The token to find. @return The position of the token or -1 if none c...
java
private int findToken(final String in, final int start, final MarkToken token) { int pos = start; while (pos < in.length()) { if (this.getToken(in, pos) == token) { return pos; } pos++; } return -1; }
[ "private", "int", "findToken", "(", "final", "String", "in", ",", "final", "int", "start", ",", "final", "MarkToken", "token", ")", "{", "int", "pos", "=", "start", ";", "while", "(", "pos", "<", "in", ".", "length", "(", ")", ")", "{", "if", "(", ...
Finds the position of the given Token in the given String. @param in The String to search on. @param start The starting character position. @param token The token to find. @return The position of the token or -1 if none could be found.
[ "Finds", "the", "position", "of", "the", "given", "Token", "in", "the", "given", "String", "." ]
train
https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Emitter.java#L202-L214
jwtk/jjwt
impl/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java
MacProvider.generateKey
@Deprecated public static SecretKey generateKey(SignatureAlgorithm alg, SecureRandom random) { """ Generates a new secure-random secret key of a length suitable for creating and verifying HMAC signatures according to the specified {@code SignatureAlgorithm} using the specified SecureRandom number generator. ...
java
@Deprecated public static SecretKey generateKey(SignatureAlgorithm alg, SecureRandom random) { Assert.isTrue(alg.isHmac(), "SignatureAlgorithm argument must represent an HMAC algorithm."); KeyGenerator gen; try { gen = KeyGenerator.getInstance(alg.getJcaName()); } catc...
[ "@", "Deprecated", "public", "static", "SecretKey", "generateKey", "(", "SignatureAlgorithm", "alg", ",", "SecureRandom", "random", ")", "{", "Assert", ".", "isTrue", "(", "alg", ".", "isHmac", "(", ")", ",", "\"SignatureAlgorithm argument must represent an HMAC algor...
Generates a new secure-random secret key of a length suitable for creating and verifying HMAC signatures according to the specified {@code SignatureAlgorithm} using the specified SecureRandom number generator. This implementation returns secure-random key sizes as follows: <table> <caption>Key Sizes</caption> <thead>...
[ "Generates", "a", "new", "secure", "-", "random", "secret", "key", "of", "a", "length", "suitable", "for", "creating", "and", "verifying", "HMAC", "signatures", "according", "to", "the", "specified", "{", "@code", "SignatureAlgorithm", "}", "using", "the", "sp...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/impl/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java#L84-L99
motown-io/motown
samples/authentication/src/main/java/io/motown/sample/authentication/rest/TokenUtils.java
TokenUtils.validateToken
public static boolean validateToken(String authToken, UserDetails userDetails) { """ Validates the token signature against the user details and the current system time. @param authToken authorization token. @param userDetails user details. @return true if token is not expired and is equal to computed signat...
java
public static boolean validateToken(String authToken, UserDetails userDetails) { String[] parts = authToken.split(TOKEN_SEPARATOR); long expires = Long.parseLong(parts[1]); String signature = parts[2]; return expires >= System.currentTimeMillis() && signature.equals(TokenUtils.computeSi...
[ "public", "static", "boolean", "validateToken", "(", "String", "authToken", ",", "UserDetails", "userDetails", ")", "{", "String", "[", "]", "parts", "=", "authToken", ".", "split", "(", "TOKEN_SEPARATOR", ")", ";", "long", "expires", "=", "Long", ".", "pars...
Validates the token signature against the user details and the current system time. @param authToken authorization token. @param userDetails user details. @return true if token is not expired and is equal to computed signature on base of user details.
[ "Validates", "the", "token", "signature", "against", "the", "user", "details", "and", "the", "current", "system", "time", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/samples/authentication/src/main/java/io/motown/sample/authentication/rest/TokenUtils.java#L101-L107
classgraph/classgraph
src/main/java/io/github/classgraph/Scanner.java
Scanner.maskClassfiles
private void maskClassfiles(final List<ClasspathElement> classpathElementOrder, final LogNode maskLog) { """ Perform classpath masking of classfiles. If the same relative classfile path occurs multiple times in the classpath, causes the second and subsequent occurrences to be ignored (removed). @param classpat...
java
private void maskClassfiles(final List<ClasspathElement> classpathElementOrder, final LogNode maskLog) { final Set<String> whitelistedClasspathRelativePathsFound = new HashSet<>(); for (int classpathIdx = 0; classpathIdx < classpathElementOrder.size(); classpathIdx++) { final ClasspathElemen...
[ "private", "void", "maskClassfiles", "(", "final", "List", "<", "ClasspathElement", ">", "classpathElementOrder", ",", "final", "LogNode", "maskLog", ")", "{", "final", "Set", "<", "String", ">", "whitelistedClasspathRelativePathsFound", "=", "new", "HashSet", "<>",...
Perform classpath masking of classfiles. If the same relative classfile path occurs multiple times in the classpath, causes the second and subsequent occurrences to be ignored (removed). @param classpathElementOrder the classpath element order @param maskLog the mask log
[ "Perform", "classpath", "masking", "of", "classfiles", ".", "If", "the", "same", "relative", "classfile", "path", "occurs", "multiple", "times", "in", "the", "classpath", "causes", "the", "second", "and", "subsequent", "occurrences", "to", "be", "ignored", "(", ...
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L759-L768
bazaarvoice/emodb
common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java
StashReader.getSplits
public List<StashSplit> getSplits(String table) throws StashNotAvailableException, TableNotStashedException { """ Get the splits for a record stored in stash. Each split corresponds to a file in the Stash table's directory. """ ImmutableList.Builder<StashSplit> splitsBuilder = ImmutableLis...
java
public List<StashSplit> getSplits(String table) throws StashNotAvailableException, TableNotStashedException { ImmutableList.Builder<StashSplit> splitsBuilder = ImmutableList.builder(); Iterator<S3ObjectSummary> objectSummaries = getS3ObjectSummariesForTable(table); while (objectSumm...
[ "public", "List", "<", "StashSplit", ">", "getSplits", "(", "String", "table", ")", "throws", "StashNotAvailableException", ",", "TableNotStashedException", "{", "ImmutableList", ".", "Builder", "<", "StashSplit", ">", "splitsBuilder", "=", "ImmutableList", ".", "bu...
Get the splits for a record stored in stash. Each split corresponds to a file in the Stash table's directory.
[ "Get", "the", "splits", "for", "a", "record", "stored", "in", "stash", ".", "Each", "split", "corresponds", "to", "a", "file", "in", "the", "Stash", "table", "s", "directory", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java#L306-L319
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/util/Path.java
Path.getAbsoluteParent
public static String getAbsoluteParent(@NotNull String path, int parentLevel, @NotNull ResourceResolver resourceResolver) { """ Get absolute parent of given path. If the path is a version history or launch path the path level is adjusted accordingly. This is a replacement for {@link com.day.text.Text#getAbsolute...
java
public static String getAbsoluteParent(@NotNull String path, int parentLevel, @NotNull ResourceResolver resourceResolver) { if (parentLevel < 0) { return ""; } int level = parentLevel + getAbsoluteLevelOffset(path, resourceResolver); return Text.getAbsoluteParent(path, level); }
[ "public", "static", "String", "getAbsoluteParent", "(", "@", "NotNull", "String", "path", ",", "int", "parentLevel", ",", "@", "NotNull", "ResourceResolver", "resourceResolver", ")", "{", "if", "(", "parentLevel", "<", "0", ")", "{", "return", "\"\"", ";", "...
Get absolute parent of given path. If the path is a version history or launch path the path level is adjusted accordingly. This is a replacement for {@link com.day.text.Text#getAbsoluteParent(String, int)}. @param path Path @param parentLevel Parent level @param resourceResolver Resource resolver @return Absolute paren...
[ "Get", "absolute", "parent", "of", "given", "path", ".", "If", "the", "path", "is", "a", "version", "history", "or", "launch", "path", "the", "path", "level", "is", "adjusted", "accordingly", ".", "This", "is", "a", "replacement", "for", "{" ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/util/Path.java#L78-L84
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/BackendTransaction.java
BackendTransaction.acquireIndexLock
public void acquireIndexLock(StaticBuffer key, StaticBuffer column) throws BackendException { """ Acquires a lock for the key-column pair on the property index which ensures that nobody else can take a lock on that respective entry for the duration of this lock (but somebody could potentially still overwrite the...
java
public void acquireIndexLock(StaticBuffer key, StaticBuffer column) throws BackendException { acquiredLock = true; indexStore.acquireLock(key, column, null, storeTx); }
[ "public", "void", "acquireIndexLock", "(", "StaticBuffer", "key", ",", "StaticBuffer", "column", ")", "throws", "BackendException", "{", "acquiredLock", "=", "true", ";", "indexStore", ".", "acquireLock", "(", "key", ",", "column", ",", "null", ",", "storeTx", ...
Acquires a lock for the key-column pair on the property index which ensures that nobody else can take a lock on that respective entry for the duration of this lock (but somebody could potentially still overwrite the key-value entry without taking a lock). The expectedValue defines the value expected to match the value ...
[ "Acquires", "a", "lock", "for", "the", "key", "-", "column", "pair", "on", "the", "property", "index", "which", "ensures", "that", "nobody", "else", "can", "take", "a", "lock", "on", "that", "respective", "entry", "for", "the", "duration", "of", "this", ...
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/BackendTransaction.java#L238-L241
facebookarchive/hadoop-20
src/core/org/apache/hadoop/raid/GaloisField.java
GaloisField.solveVandermondeSystem
public void solveVandermondeSystem(int[] x, int[] y, int len) { """ Given a Vandermonde matrix V[i][j]=x[j]^i and vector y, solve for z such that Vz=y. The output z will be placed in y. @param x the vector which describe the Vandermonde matrix @param y right-hand side of the Vandermonde system equation. will b...
java
public void solveVandermondeSystem(int[] x, int[] y, int len) { assert(x.length <= len && y.length <= len); for (int i = 0; i < len - 1; i++) { for (int j = len - 1; j > i; j--) { y[j] = y[j] ^ mulTable[x[i]][y[j - 1]]; } } for (int i = len - 1; i >= 0; i--) { for (int j = i + ...
[ "public", "void", "solveVandermondeSystem", "(", "int", "[", "]", "x", ",", "int", "[", "]", "y", ",", "int", "len", ")", "{", "assert", "(", "x", ".", "length", "<=", "len", "&&", "y", ".", "length", "<=", "len", ")", ";", "for", "(", "int", "...
Given a Vandermonde matrix V[i][j]=x[j]^i and vector y, solve for z such that Vz=y. The output z will be placed in y. @param x the vector which describe the Vandermonde matrix @param y right-hand side of the Vandermonde system equation. will be replaced the output in this vector @param len consider x and y only from 0....
[ "Given", "a", "Vandermonde", "matrix", "V", "[", "i", "]", "[", "j", "]", "=", "x", "[", "j", "]", "^i", "and", "vector", "y", "solve", "for", "z", "such", "that", "Vz", "=", "y", ".", "The", "output", "z", "will", "be", "placed", "in", "y", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/raid/GaloisField.java#L207-L222
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp instances where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPInstance cpInstance : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, Quer...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPInstance cpInstance : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPInstance", "cpInstance", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", "....
Removes all the cp instances where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "instances", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L1397-L1403
esigate/esigate
esigate-core/src/main/java/org/esigate/DriverFactory.java
DriverFactory.configure
public static void configure(String name, Properties props) { """ Registers new {@linkplain Driver} under provided name with specified properties. @param name the name of the instance @param props the {@link Properties} for the instance """ put(name, createDriver(name, props)); }
java
public static void configure(String name, Properties props) { put(name, createDriver(name, props)); }
[ "public", "static", "void", "configure", "(", "String", "name", ",", "Properties", "props", ")", "{", "put", "(", "name", ",", "createDriver", "(", "name", ",", "props", ")", ")", ";", "}" ]
Registers new {@linkplain Driver} under provided name with specified properties. @param name the name of the instance @param props the {@link Properties} for the instance
[ "Registers", "new", "{", "@linkplain", "Driver", "}", "under", "provided", "name", "with", "specified", "properties", "." ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/DriverFactory.java#L205-L207
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/combobox/MaterialComboBox.java
MaterialComboBox.addItem
public Option addItem(String text, T value) { """ Add Value directly to combobox component @param text - The text you want to labeled on the option item @param value - The value you want to pass through in this option """ if (!values.contains(value)) { Option option = buildOption(text,...
java
public Option addItem(String text, T value) { if (!values.contains(value)) { Option option = buildOption(text, value); values.add(value); listbox.add(option); return option; } return null; }
[ "public", "Option", "addItem", "(", "String", "text", ",", "T", "value", ")", "{", "if", "(", "!", "values", ".", "contains", "(", "value", ")", ")", "{", "Option", "option", "=", "buildOption", "(", "text", ",", "value", ")", ";", "values", ".", "...
Add Value directly to combobox component @param text - The text you want to labeled on the option item @param value - The value you want to pass through in this option
[ "Add", "Value", "directly", "to", "combobox", "component" ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/combobox/MaterialComboBox.java#L250-L258
apiman/apiman
manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroServiceCdiFactory.java
ManagerApiMicroServiceCdiFactory.initES
private static EsStorage initES(ManagerApiMicroServiceConfig config, EsStorage esStorage) { """ Initializes the ES storage (if required). @param config @param esStorage """ if (sESStorage == null) { sESStorage = esStorage; sESStorage.setIndexName(config.getStorageESIndexName()...
java
private static EsStorage initES(ManagerApiMicroServiceConfig config, EsStorage esStorage) { if (sESStorage == null) { sESStorage = esStorage; sESStorage.setIndexName(config.getStorageESIndexName()); if (config.isInitializeStorageES()) { sESStorage.initialize()...
[ "private", "static", "EsStorage", "initES", "(", "ManagerApiMicroServiceConfig", "config", ",", "EsStorage", "esStorage", ")", "{", "if", "(", "sESStorage", "==", "null", ")", "{", "sESStorage", "=", "esStorage", ";", "sESStorage", ".", "setIndexName", "(", "con...
Initializes the ES storage (if required). @param config @param esStorage
[ "Initializes", "the", "ES", "storage", "(", "if", "required", ")", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroServiceCdiFactory.java#L270-L279
RestComm/sip-servlets
containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java
SIPWebContext.getSipContextAnchorDu
public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) { """ returns the anchor deployment unit that will have attached a SIPWebContext """ // attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.) DeploymentUnit parentDu = ...
java
public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) { // attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.) DeploymentUnit parentDu = du.getParent(); if (parentDu == null) { // this is a war only deployment...
[ "public", "static", "DeploymentUnit", "getSipContextAnchorDu", "(", "final", "DeploymentUnit", "du", ")", "{", "// attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.)", "DeploymentUnit", "parentDu", "=", "du", ".", "getParent", "...
returns the anchor deployment unit that will have attached a SIPWebContext
[ "returns", "the", "anchor", "deployment", "unit", "that", "will", "have", "attached", "a", "SIPWebContext" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java#L592-L604
YahooArchive/samoa
samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java
SamzaConfigFactory.getMapForEntrancePI
public Map<String,String> getMapForEntrancePI(SamzaEntranceProcessingItem epi, String filename, String filesystem) { """ /* Generate a map of all config properties for the input SamzaProcessingItem """ Map<String,String> map = getBasicSystemConfig(); // Set job name, task class (from SamzaEntranceProcess...
java
public Map<String,String> getMapForEntrancePI(SamzaEntranceProcessingItem epi, String filename, String filesystem) { Map<String,String> map = getBasicSystemConfig(); // Set job name, task class (from SamzaEntranceProcessingItem) setJobName(map, epi.getName()); setTaskClass(map, SamzaEntranceProcessingItem.clas...
[ "public", "Map", "<", "String", ",", "String", ">", "getMapForEntrancePI", "(", "SamzaEntranceProcessingItem", "epi", ",", "String", "filename", ",", "String", "filesystem", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "getBasicSystemConfig", ...
/* Generate a map of all config properties for the input SamzaProcessingItem
[ "/", "*", "Generate", "a", "map", "of", "all", "config", "properties", "for", "the", "input", "SamzaProcessingItem" ]
train
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java#L252-L282
netty/netty
common/src/main/java/io/netty/util/internal/SystemPropertyUtil.java
SystemPropertyUtil.getInt
public static int getInt(String key, int def) { """ Returns the value of the Java system property with the specified {@code key}, while falling back to the specified default value if the property access fails. @return the property value. {@code def} if there's no such property or if an access to the specifi...
java
public static int getInt(String key, int def) { String value = get(key); if (value == null) { return def; } value = value.trim(); try { return Integer.parseInt(value); } catch (Exception e) { // Ignore } logger.warn( ...
[ "public", "static", "int", "getInt", "(", "String", "key", ",", "int", "def", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "def", ";", "}", "value", "=", "value", ".", "trim"...
Returns the value of the Java system property with the specified {@code key}, while falling back to the specified default value if the property access fails. @return the property value. {@code def} if there's no such property or if an access to the specified property is not allowed.
[ "Returns", "the", "value", "of", "the", "Java", "system", "property", "with", "the", "specified", "{", "@code", "key", "}", "while", "falling", "back", "to", "the", "specified", "default", "value", "if", "the", "property", "access", "fails", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/SystemPropertyUtil.java#L134-L153
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isEqual
public static void isEqual (final int nValue, final int nExpectedValue, final String sName) { """ Check that the passed value is the same as the provided expected value using <code>==</code> to check comparison. @param nValue The First value. @param nExpectedValue The expected value. @param sName The name...
java
public static void isEqual (final int nValue, final int nExpectedValue, final String sName) { if (isEnabled ()) isEqual (nValue, nExpectedValue, () -> sName); }
[ "public", "static", "void", "isEqual", "(", "final", "int", "nValue", ",", "final", "int", "nExpectedValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "isEqual", "(", "nValue", ",", "nExpectedValue", ",", "(", ")",...
Check that the passed value is the same as the provided expected value using <code>==</code> to check comparison. @param nValue The First value. @param nExpectedValue The expected value. @param sName The name of the value (e.g. the parameter name) @throws IllegalArgumentException if the passed value is not <code>null<...
[ "Check", "that", "the", "passed", "value", "is", "the", "same", "as", "the", "provided", "expected", "value", "using", "<code", ">", "==", "<", "/", "code", ">", "to", "check", "comparison", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L1534-L1538
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/data/model/ModelUtil.java
ModelUtil.getPrototypeOrCentroid
public static <V extends NumberVector> V getPrototypeOrCentroid(Model model, Relation<? extends V> relation, DBIDs ids, NumberVector.Factory<V> factory) { """ Get the representative vector for a cluster model, or compute the centroid. @param model Model @param relation Data relation (for representatives specif...
java
public static <V extends NumberVector> V getPrototypeOrCentroid(Model model, Relation<? extends V> relation, DBIDs ids, NumberVector.Factory<V> factory) { assert (ids.size() > 0); V v = getPrototype(model, relation, factory); return v != null ? v : factory.newNumberVector(Centroid.make(relation, ids)); }
[ "public", "static", "<", "V", "extends", "NumberVector", ">", "V", "getPrototypeOrCentroid", "(", "Model", "model", ",", "Relation", "<", "?", "extends", "V", ">", "relation", ",", "DBIDs", "ids", ",", "NumberVector", ".", "Factory", "<", "V", ">", "factor...
Get the representative vector for a cluster model, or compute the centroid. @param model Model @param relation Data relation (for representatives specified per DBID) @param ids Cluster ids (must not be empty. @return Vector of type V, {@code null} if not supported. @param <V> desired vector type
[ "Get", "the", "representative", "vector", "for", "a", "cluster", "model", "or", "compute", "the", "centroid", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/data/model/ModelUtil.java#L127-L131
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/s3/S3Client.java
S3Client.createPutRequest
public S3ClientRequest createPutRequest(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) { """ Creates an S3 PUT request. <p> <code>create PUT -&gt; requestObject</code> </p> @param aBucket An S3 bucket @param aKey An S3 key @param aHandler A response handler...
java
public S3ClientRequest createPutRequest(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) { final HttpClientRequest httpRequest = myHTTPClient.put(PATH_SEP + aBucket + PATH_SEP + aKey, aHandler); return new S3ClientRequest("PUT", aBucket, aKey, httpRequest,...
[ "public", "S3ClientRequest", "createPutRequest", "(", "final", "String", "aBucket", ",", "final", "String", "aKey", ",", "final", "Handler", "<", "HttpClientResponse", ">", "aHandler", ")", "{", "final", "HttpClientRequest", "httpRequest", "=", "myHTTPClient", ".", ...
Creates an S3 PUT request. <p> <code>create PUT -&gt; requestObject</code> </p> @param aBucket An S3 bucket @param aKey An S3 key @param aHandler A response handler @return An S3 PUT request
[ "Creates", "an", "S3", "PUT", "request", ".", "<p", ">", "<code", ">", "create", "PUT", "-", "&gt", ";", "requestObject<", "/", "code", ">", "<", "/", "p", ">" ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/s3/S3Client.java#L251-L255
liyiorg/weixin-popular
src/main/java/weixin/popular/util/SignatureUtil.java
SignatureUtil.generateEventMessageSignature
public static String generateEventMessageSignature(String token, String timestamp,String nonce) { """ 生成事件消息接收签名 @param token token @param timestamp timestamp @param nonce nonce @return str """ String[] array = new String[]{token,timestamp,nonce}; Arrays.sort(array); String s = StringUtils.arrayTo...
java
public static String generateEventMessageSignature(String token, String timestamp,String nonce) { String[] array = new String[]{token,timestamp,nonce}; Arrays.sort(array); String s = StringUtils.arrayToDelimitedString(array, ""); return DigestUtils.shaHex(s); }
[ "public", "static", "String", "generateEventMessageSignature", "(", "String", "token", ",", "String", "timestamp", ",", "String", "nonce", ")", "{", "String", "[", "]", "array", "=", "new", "String", "[", "]", "{", "token", ",", "timestamp", ",", "nonce", ...
生成事件消息接收签名 @param token token @param timestamp timestamp @param nonce nonce @return str
[ "生成事件消息接收签名" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/util/SignatureUtil.java#L66-L71
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendSQLClause
protected void appendSQLClause(SelectionCriteria c, StringBuffer buf) { """ Answer the SQL-Clause for a SelectionCriteria If the Criteria references a class with extents an OR-Clause is added for each extent @param c SelectionCriteria """ // BRJ : handle SqlCriteria if (c instanceof SqlCri...
java
protected void appendSQLClause(SelectionCriteria c, StringBuffer buf) { // BRJ : handle SqlCriteria if (c instanceof SqlCriteria) { buf.append(c.getAttribute()); return; } // BRJ : criteria attribute is a query if (c.getAttri...
[ "protected", "void", "appendSQLClause", "(", "SelectionCriteria", "c", ",", "StringBuffer", "buf", ")", "{", "// BRJ : handle SqlCriteria\r", "if", "(", "c", "instanceof", "SqlCriteria", ")", "{", "buf", ".", "append", "(", "c", ".", "getAttribute", "(", ")", ...
Answer the SQL-Clause for a SelectionCriteria If the Criteria references a class with extents an OR-Clause is added for each extent @param c SelectionCriteria
[ "Answer", "the", "SQL", "-", "Clause", "for", "a", "SelectionCriteria", "If", "the", "Criteria", "references", "a", "class", "with", "extents", "an", "OR", "-", "Clause", "is", "added", "for", "each", "extent" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L892-L948
threerings/playn
html/src/playn/html/HtmlInput.java
HtmlInput.capturePageEvent
static void capturePageEvent(String eventName, final EventHandler handler) { """ Capture events that occur anywhere on the page. <p> Note that event values will be relative to the page (not the rootElement) {@see #getRelativeX(NativeEvent, Element)} and {@see #getRelativeY(NativeEvent, Element)}. """ H...
java
static void capturePageEvent(String eventName, final EventHandler handler) { HtmlPlatform.captureEvent(eventName, new EventHandler() { @Override public void handleEvent(NativeEvent evt) { handler.handleEvent(evt); } }); }
[ "static", "void", "capturePageEvent", "(", "String", "eventName", ",", "final", "EventHandler", "handler", ")", "{", "HtmlPlatform", ".", "captureEvent", "(", "eventName", ",", "new", "EventHandler", "(", ")", "{", "@", "Override", "public", "void", "handleEvent...
Capture events that occur anywhere on the page. <p> Note that event values will be relative to the page (not the rootElement) {@see #getRelativeX(NativeEvent, Element)} and {@see #getRelativeY(NativeEvent, Element)}.
[ "Capture", "events", "that", "occur", "anywhere", "on", "the", "page", ".", "<p", ">", "Note", "that", "event", "values", "will", "be", "relative", "to", "the", "page", "(", "not", "the", "rootElement", ")", "{" ]
train
https://github.com/threerings/playn/blob/c266eeb39188dcada4b00992a0d1199759e03d42/html/src/playn/html/HtmlInput.java#L35-L42
google/closure-templates
java/src/com/google/template/soy/jbcsrc/api/SoySauceBuilder.java
SoySauceBuilder.withPluginInstances
public SoySauceBuilder withPluginInstances(Map<String, Supplier<Object>> pluginInstances) { """ Sets the plugin instance factories, to be used when constructing the SoySauce. <p>These are used to supply the runtime instances needed by SoyJavaSourceFunction implementations which use the {@code callInstanceMetho...
java
public SoySauceBuilder withPluginInstances(Map<String, Supplier<Object>> pluginInstances) { this.userPluginInstances = ImmutableMap.copyOf(pluginInstances); return this; }
[ "public", "SoySauceBuilder", "withPluginInstances", "(", "Map", "<", "String", ",", "Supplier", "<", "Object", ">", ">", "pluginInstances", ")", "{", "this", ".", "userPluginInstances", "=", "ImmutableMap", ".", "copyOf", "(", "pluginInstances", ")", ";", "retur...
Sets the plugin instance factories, to be used when constructing the SoySauce. <p>These are used to supply the runtime instances needed by SoyJavaSourceFunction implementations which use the {@code callInstanceMethod} API.
[ "Sets", "the", "plugin", "instance", "factories", "to", "be", "used", "when", "constructing", "the", "SoySauce", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/api/SoySauceBuilder.java#L55-L58
kobakei/Android-RateThisApp
ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java
RateThisApp.printStatus
private static void printStatus(final Context context) { """ Print values in SharedPreferences (used for debug) @param context """ SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); log("*** RateThisApp Status ***"); log("Install Date: " + new Date(...
java
private static void printStatus(final Context context) { SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); log("*** RateThisApp Status ***"); log("Install Date: " + new Date(pref.getLong(KEY_INSTALL_DATE, 0))); log("Launch Times: " + pref.getInt(KEY_...
[ "private", "static", "void", "printStatus", "(", "final", "Context", "context", ")", "{", "SharedPreferences", "pref", "=", "context", ".", "getSharedPreferences", "(", "PREF_NAME", ",", "Context", ".", "MODE_PRIVATE", ")", ";", "log", "(", "\"*** RateThisApp Stat...
Print values in SharedPreferences (used for debug) @param context
[ "Print", "values", "in", "SharedPreferences", "(", "used", "for", "debug", ")" ]
train
https://github.com/kobakei/Android-RateThisApp/blob/c3d007c8c02beb6ff196745c2310c259737f5c81/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java#L368-L374
h2oai/h2o-3
h2o-core/src/main/java/hex/schemas/HyperSpaceSearchCriteriaV99.java
HyperSpaceSearchCriteriaV99.fillWithDefaults
public S fillWithDefaults() { """ Fill with the default values from the corresponding Iced object. """ HyperSpaceSearchCriteria defaults = null; if (HyperSpaceSearchCriteria.Strategy.Cartesian == strategy) { defaults = new HyperSpaceSearchCriteria.CartesianSearchCriteria(); } else if (HyperS...
java
public S fillWithDefaults() { HyperSpaceSearchCriteria defaults = null; if (HyperSpaceSearchCriteria.Strategy.Cartesian == strategy) { defaults = new HyperSpaceSearchCriteria.CartesianSearchCriteria(); } else if (HyperSpaceSearchCriteria.Strategy.RandomDiscrete == strategy) { defaults = new Hyp...
[ "public", "S", "fillWithDefaults", "(", ")", "{", "HyperSpaceSearchCriteria", "defaults", "=", "null", ";", "if", "(", "HyperSpaceSearchCriteria", ".", "Strategy", ".", "Cartesian", "==", "strategy", ")", "{", "defaults", "=", "new", "HyperSpaceSearchCriteria", "....
Fill with the default values from the corresponding Iced object.
[ "Fill", "with", "the", "default", "values", "from", "the", "corresponding", "Iced", "object", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/schemas/HyperSpaceSearchCriteriaV99.java#L76-L90
google/closure-compiler
src/com/google/javascript/jscomp/graph/Graph.java
Graph.pushAnnotations
private static void pushAnnotations( Deque<GraphAnnotationState> stack, Collection<? extends Annotatable> haveAnnotations) { """ Pushes a new list on stack and stores nodes annotations in the new list. Clears objects' annotations as well. """ stack.push(new GraphAnnotationState(haveAnnotations...
java
private static void pushAnnotations( Deque<GraphAnnotationState> stack, Collection<? extends Annotatable> haveAnnotations) { stack.push(new GraphAnnotationState(haveAnnotations.size())); for (Annotatable h : haveAnnotations) { stack.peek().add(new AnnotationState(h, h.getAnnotation())); ...
[ "private", "static", "void", "pushAnnotations", "(", "Deque", "<", "GraphAnnotationState", ">", "stack", ",", "Collection", "<", "?", "extends", "Annotatable", ">", "haveAnnotations", ")", "{", "stack", ".", "push", "(", "new", "GraphAnnotationState", "(", "have...
Pushes a new list on stack and stores nodes annotations in the new list. Clears objects' annotations as well.
[ "Pushes", "a", "new", "list", "on", "stack", "and", "stores", "nodes", "annotations", "in", "the", "new", "list", ".", "Clears", "objects", "annotations", "as", "well", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/graph/Graph.java#L333-L341
netty/netty
common/src/main/java/io/netty/util/NetUtil.java
NetUtil.getByName
public static Inet6Address getByName(CharSequence ip, boolean ipv4Mapped) { """ Returns the {@link Inet6Address} representation of a {@link CharSequence} IP address. <p> The {@code ipv4Mapped} parameter specifies how IPv4 addresses should be treated. "IPv4 mapped" format as defined in <a href="http://tools.iet...
java
public static Inet6Address getByName(CharSequence ip, boolean ipv4Mapped) { byte[] bytes = getIPv6ByName(ip, ipv4Mapped); if (bytes == null) { return null; } try { return Inet6Address.getByAddress(null, bytes, -1); } catch (UnknownHostException e) { ...
[ "public", "static", "Inet6Address", "getByName", "(", "CharSequence", "ip", ",", "boolean", "ipv4Mapped", ")", "{", "byte", "[", "]", "bytes", "=", "getIPv6ByName", "(", "ip", ",", "ipv4Mapped", ")", ";", "if", "(", "bytes", "==", "null", ")", "{", "retu...
Returns the {@link Inet6Address} representation of a {@link CharSequence} IP address. <p> The {@code ipv4Mapped} parameter specifies how IPv4 addresses should be treated. "IPv4 mapped" format as defined in <a href="http://tools.ietf.org/html/rfc4291#section-2.5.5">rfc 4291 section 2</a> is supported. @param ip {@link C...
[ "Returns", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/NetUtil.java#L715-L725
icode/ameba
src/main/java/ameba/container/internal/ConfigHelper.java
ConfigHelper.getContainerLifecycleListener
public static LifecycleListener getContainerLifecycleListener(final ApplicationHandler applicationHandler) { """ Provides a single ContainerLifecycleListener instance based on the {@link ApplicationHandler application} configuration. This method looks for providers implementing {@link org.glassfish.jersey.server....
java
public static LifecycleListener getContainerLifecycleListener(final ApplicationHandler applicationHandler) { final Iterable<ContainerLifecycleListener> listeners = Iterables.concat( Providers.getAllProviders(applicationHandler.getInjectionManager(), ContainerLifecycleListener.class), ...
[ "public", "static", "LifecycleListener", "getContainerLifecycleListener", "(", "final", "ApplicationHandler", "applicationHandler", ")", "{", "final", "Iterable", "<", "ContainerLifecycleListener", ">", "listeners", "=", "Iterables", ".", "concat", "(", "Providers", ".", ...
Provides a single ContainerLifecycleListener instance based on the {@link ApplicationHandler application} configuration. This method looks for providers implementing {@link org.glassfish.jersey.server.spi.ContainerLifecycleListener} interface and aggregates them into a single umbrella listener instance that is returned...
[ "Provides", "a", "single", "ContainerLifecycleListener", "instance", "based", "on", "the", "{", "@link", "ApplicationHandler", "application", "}", "configuration", ".", "This", "method", "looks", "for", "providers", "implementing", "{", "@link", "org", ".", "glassfi...
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/container/internal/ConfigHelper.java#L37-L79
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java
RTMPHandshake.getBlowfishSignature
public final static void getBlowfishSignature(byte[] array, int offset, int keyid) { """ RTMPE type 9 uses Blowfish on the regular signature http://en.wikipedia.org/wiki/Blowfish_(cipher) @param array array to get signature @param offset offset to start from @param keyid ID of XTEA key """ Blowfi...
java
public final static void getBlowfishSignature(byte[] array, int offset, int keyid) { BlowfishEngine bf = new BlowfishEngine(); // need to use little endian bf.init(true, new KeyParameter(BLOWFISH_KEYS[keyid])); byte[] output = new byte[8]; bf.processBlock(array, offset, outp...
[ "public", "final", "static", "void", "getBlowfishSignature", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "int", "keyid", ")", "{", "BlowfishEngine", "bf", "=", "new", "BlowfishEngine", "(", ")", ";", "// need to use little endian\r", "bf", ".", ...
RTMPE type 9 uses Blowfish on the regular signature http://en.wikipedia.org/wiki/Blowfish_(cipher) @param array array to get signature @param offset offset to start from @param keyid ID of XTEA key
[ "RTMPE", "type", "9", "uses", "Blowfish", "on", "the", "regular", "signature", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Blowfish_", "(", "cipher", ")" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java#L582-L589
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java
DefaultSwidProcessor.setProductTitle
public DefaultSwidProcessor setProductTitle(final String productTitle) { """ <p> Accurately identifies the product (tag: product_title). </p> @param productTitle product title @return a reference to this object. """ swidTag.setProductTitle( new Token(productTitle, idGenerator.nex...
java
public DefaultSwidProcessor setProductTitle(final String productTitle) { swidTag.setProductTitle( new Token(productTitle, idGenerator.nextId())); return this; }
[ "public", "DefaultSwidProcessor", "setProductTitle", "(", "final", "String", "productTitle", ")", "{", "swidTag", ".", "setProductTitle", "(", "new", "Token", "(", "productTitle", ",", "idGenerator", ".", "nextId", "(", ")", ")", ")", ";", "return", "this", ";...
<p> Accurately identifies the product (tag: product_title). </p> @param productTitle product title @return a reference to this object.
[ "<p", ">", "Accurately", "identifies", "the", "product", "(", "tag", ":", "product_title", ")", ".", "<", "/", "p", ">" ]
train
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java#L90-L94
rhuss/jolokia
agent/core/src/main/java/org/jolokia/util/DateUtil.java
DateUtil.toISO8601
public static String toISO8601(Date pDate,TimeZone pTimeZone) { """ Convert a given date to an ISO-8601 compliant string representation for a given timezone @param pDate date to convert @param pTimeZone timezone to use @return the ISO-8601 representation of the date """ SimpleDateFormat dateForma...
java
public static String toISO8601(Date pDate,TimeZone pTimeZone) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); dateFormat.setTimeZone(pTimeZone); String ret = dateFormat.format(pDate); ret = ret.replaceAll("\\+0000$", "Z"); return ret.replaceAll("(\...
[ "public", "static", "String", "toISO8601", "(", "Date", "pDate", ",", "TimeZone", "pTimeZone", ")", "{", "SimpleDateFormat", "dateFormat", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ssZ\"", ")", ";", "dateFormat", ".", "setTimeZone", "(", "pTimeZone"...
Convert a given date to an ISO-8601 compliant string representation for a given timezone @param pDate date to convert @param pTimeZone timezone to use @return the ISO-8601 representation of the date
[ "Convert", "a", "given", "date", "to", "an", "ISO", "-", "8601", "compliant", "string", "representation", "for", "a", "given", "timezone" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/util/DateUtil.java#L90-L96
indeedeng/util
io/src/main/java/com/indeed/util/io/Files.java
Files.writeObjectToFileOrDie
public static void writeObjectToFileOrDie(@Nonnull final Object obj, @Nonnull final String file, @Nonnull final Logger log) throws IOException { """ Serializes an object to a file, throws an exception if it fails @param obj object to write to a file @param file path to save the object to @param log logger to ...
java
public static void writeObjectToFileOrDie(@Nonnull final Object obj, @Nonnull final String file, @Nonnull final Logger log) throws IOException { Preconditions.checkNotNull(file, "file argument is required!"); Preconditions.checkArgument(!file.isEmpty(), "file argument is required!"); // tod...
[ "public", "static", "void", "writeObjectToFileOrDie", "(", "@", "Nonnull", "final", "Object", "obj", ",", "@", "Nonnull", "final", "String", "file", ",", "@", "Nonnull", "final", "Logger", "log", ")", "throws", "IOException", "{", "Preconditions", ".", "checkN...
Serializes an object to a file, throws an exception if it fails @param obj object to write to a file @param file path to save the object to @param log logger to use @throws java.io.IOException if the existing file could not be erased, or the file could not be written, flushed, synced, or closed
[ "Serializes", "an", "object", "to", "a", "file", "throws", "an", "exception", "if", "it", "fails" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L65-L90
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.getNotificationInfo
@SuppressWarnings( { """ Checks whether this notification is from CleverTap. @param extras The payload from the GCM intent @return See {@link NotificationInfo} """"unused", "WeakerAccess"}) public static NotificationInfo getNotificationInfo(final Bundle extras) { if (extras == null) return new ...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public static NotificationInfo getNotificationInfo(final Bundle extras) { if (extras == null) return new NotificationInfo(false, false); boolean fromCleverTap = extras.containsKey(Constants.NOTIFICATION_TAG); boolean shouldRender = fromCleverTap...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "static", "NotificationInfo", "getNotificationInfo", "(", "final", "Bundle", "extras", ")", "{", "if", "(", "extras", "==", "null", ")", "return", "new", "NotificationI...
Checks whether this notification is from CleverTap. @param extras The payload from the GCM intent @return See {@link NotificationInfo}
[ "Checks", "whether", "this", "notification", "is", "from", "CleverTap", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L5092-L5099
atomix/atomix
protocols/log/src/main/java/io/atomix/protocols/log/DistributedLogProtocolBuilder.java
DistributedLogProtocolBuilder.withRetryDelay
public DistributedLogProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) { """ Sets the operation retry delay. @param retryDelay the delay between operation retries @param timeUnit the delay time unit @return the proxy builder @throws NullPointerException if the time unit is null """ ...
java
public DistributedLogProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) { return withRetryDelay(Duration.ofMillis(timeUnit.toMillis(retryDelay))); }
[ "public", "DistributedLogProtocolBuilder", "withRetryDelay", "(", "long", "retryDelay", ",", "TimeUnit", "timeUnit", ")", "{", "return", "withRetryDelay", "(", "Duration", ".", "ofMillis", "(", "timeUnit", ".", "toMillis", "(", "retryDelay", ")", ")", ")", ";", ...
Sets the operation retry delay. @param retryDelay the delay between operation retries @param timeUnit the delay time unit @return the proxy builder @throws NullPointerException if the time unit is null
[ "Sets", "the", "operation", "retry", "delay", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/log/src/main/java/io/atomix/protocols/log/DistributedLogProtocolBuilder.java#L109-L111
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.addDeployKey
public DeployKey addDeployKey(Object projectIdOrPath, String title, String key, Boolean canPush) throws GitLabApiException { """ Creates a new deploy key for a project. <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), St...
java
public DeployKey addDeployKey(Object projectIdOrPath, String title, String key, Boolean canPush) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("key", key, true) .withParam("can_push", canPush...
[ "public", "DeployKey", "addDeployKey", "(", "Object", "projectIdOrPath", ",", "String", "title", ",", "String", "key", ",", "Boolean", "canPush", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "...
Creates a new deploy key for a project. <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param title the new deploy key's title, required @param key the new deploy key, required @param canPush c...
[ "Creates", "a", "new", "deploy", "key", "for", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L184-L193
betfair/cougar
cougar-framework/cougar-util/src/main/java/com/betfair/cougar/util/configuration/Sets.java
Sets.fromMap
public static final Set fromMap(Map map, Object... keys) { """ Given a map and a set of keys, return a set containing the values referred-to by the keys. If the map is null or the keys are null, the EMPTY_SET is returned. If a passed key does not exist in the map, nothing is added to the set. However, if the ke...
java
public static final Set fromMap(Map map, Object... keys) { if (keys != null && map != null) { Set answer = new HashSet(); for (Object key : keys) { if (map.containsKey(key)) { answer.add(map.get(key)); } } return...
[ "public", "static", "final", "Set", "fromMap", "(", "Map", "map", ",", "Object", "...", "keys", ")", "{", "if", "(", "keys", "!=", "null", "&&", "map", "!=", "null", ")", "{", "Set", "answer", "=", "new", "HashSet", "(", ")", ";", "for", "(", "Ob...
Given a map and a set of keys, return a set containing the values referred-to by the keys. If the map is null or the keys are null, the EMPTY_SET is returned. If a passed key does not exist in the map, nothing is added to the set. However, if the key is present and maps to null, null is added to the set.
[ "Given", "a", "map", "and", "a", "set", "of", "keys", "return", "a", "set", "containing", "the", "values", "referred", "-", "to", "by", "the", "keys", ".", "If", "the", "map", "is", "null", "or", "the", "keys", "are", "null", "the", "EMPTY_SET", "is"...
train
https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-framework/cougar-util/src/main/java/com/betfair/cougar/util/configuration/Sets.java#L29-L40
spring-cloud/spring-cloud-config
spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/support/AwsCodeCommitCredentialProvider.java
AwsCodeCommitCredentialProvider.retrieveAwsCredentials
private AWSCredentials retrieveAwsCredentials() { """ Get the AWSCredentials. If an AWSCredentialProvider was specified, use that, otherwise, create a new AWSCredentialsProvider. If the username and password are provided, then use those directly as AWSCredentials. Otherwise us the {@link DefaultAWSCredentialsPr...
java
private AWSCredentials retrieveAwsCredentials() { if (this.awsCredentialProvider == null) { if (this.username != null && this.password != null) { this.logger.debug("Creating a static AWSCredentialsProvider"); this.awsCredentialProvider = new AWSStaticCredentialsProvider( new BasicAWSCredentials(this....
[ "private", "AWSCredentials", "retrieveAwsCredentials", "(", ")", "{", "if", "(", "this", ".", "awsCredentialProvider", "==", "null", ")", "{", "if", "(", "this", ".", "username", "!=", "null", "&&", "this", ".", "password", "!=", "null", ")", "{", "this", ...
Get the AWSCredentials. If an AWSCredentialProvider was specified, use that, otherwise, create a new AWSCredentialsProvider. If the username and password are provided, then use those directly as AWSCredentials. Otherwise us the {@link DefaultAWSCredentialsProviderChain} as is standard with AWS applications. @return the...
[ "Get", "the", "AWSCredentials", ".", "If", "an", "AWSCredentialProvider", "was", "specified", "use", "that", "otherwise", "create", "a", "new", "AWSCredentialsProvider", ".", "If", "the", "username", "and", "password", "are", "provided", "then", "use", "those", ...
train
https://github.com/spring-cloud/spring-cloud-config/blob/6b99631f78bac4e1b521d2cc126c8b2da45d1f1f/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/support/AwsCodeCommitCredentialProvider.java#L264-L277
biojava/biojava
biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java
FeatureList.selectOverlapping
public FeatureList selectOverlapping(String seqname, Location location, boolean useBothStrands) throws Exception { """ Create a list of all features that overlap the specified location on the specified sequence. @param seqname The sequence name. Only features with this sequence name will be checked for over...
java
public FeatureList selectOverlapping(String seqname, Location location, boolean useBothStrands) throws Exception { FeatureList list = new FeatureList(); for (FeatureI feature : this) { boolean overlaps = false; if (feature.seqname().equals(seqname)) { if (location.isSameStrand(feature.location())) { ...
[ "public", "FeatureList", "selectOverlapping", "(", "String", "seqname", ",", "Location", "location", ",", "boolean", "useBothStrands", ")", "throws", "Exception", "{", "FeatureList", "list", "=", "new", "FeatureList", "(", ")", ";", "for", "(", "FeatureI", "feat...
Create a list of all features that overlap the specified location on the specified sequence. @param seqname The sequence name. Only features with this sequence name will be checked for overlap. @param location The location to check. @param useBothStrands If true, locations are mapped to their positive strand image bef...
[ "Create", "a", "list", "of", "all", "features", "that", "overlap", "the", "specified", "location", "on", "the", "specified", "sequence", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java#L356-L374
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/jdbc/MultiRowJdbcPersonAttributeDao.java
MultiRowJdbcPersonAttributeDao.setNameValueColumnMappings
public void setNameValueColumnMappings(final Map<String, ?> nameValueColumnMap) { """ The {@link Map} of columns from a name column to value columns. Keys are Strings, Values are Strings or {@link java.util.List} of Strings. @param nameValueColumnMap The Map of name column to value column(s). """ i...
java
public void setNameValueColumnMappings(final Map<String, ?> nameValueColumnMap) { if (nameValueColumnMap == null) { this.nameValueColumnMappings = null; } else { final Map<String, Set<String>> mappings = MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(nameValueCo...
[ "public", "void", "setNameValueColumnMappings", "(", "final", "Map", "<", "String", ",", "?", ">", "nameValueColumnMap", ")", "{", "if", "(", "nameValueColumnMap", "==", "null", ")", "{", "this", ".", "nameValueColumnMappings", "=", "null", ";", "}", "else", ...
The {@link Map} of columns from a name column to value columns. Keys are Strings, Values are Strings or {@link java.util.List} of Strings. @param nameValueColumnMap The Map of name column to value column(s).
[ "The", "{", "@link", "Map", "}", "of", "columns", "from", "a", "name", "column", "to", "value", "columns", ".", "Keys", "are", "Strings", "Values", "are", "Strings", "or", "{", "@link", "java", ".", "util", ".", "List", "}", "of", "Strings", "." ]
train
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/jdbc/MultiRowJdbcPersonAttributeDao.java#L140-L152
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/decorator/PolicyIndexInvocationHandler.java
PolicyIndexInvocationHandler.deletePolicy
private void deletePolicy(String pid) throws GeneralException { """ Remove the specified policy from the cache @param pid @throws PolicyIndexException """ LOG.debug("Deleting policy " + pid); try { // in case the policy doesn't exist (corrupt policy index, failed to add because i...
java
private void deletePolicy(String pid) throws GeneralException { LOG.debug("Deleting policy " + pid); try { // in case the policy doesn't exist (corrupt policy index, failed to add because invalid, etc) m_policyIndex.deletePolicy(pid); } catch (PolicyIndexException e) { ...
[ "private", "void", "deletePolicy", "(", "String", "pid", ")", "throws", "GeneralException", "{", "LOG", ".", "debug", "(", "\"Deleting policy \"", "+", "pid", ")", ";", "try", "{", "// in case the policy doesn't exist (corrupt policy index, failed to add because invalid, et...
Remove the specified policy from the cache @param pid @throws PolicyIndexException
[ "Remove", "the", "specified", "policy", "from", "the", "cache" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/decorator/PolicyIndexInvocationHandler.java#L366-L375
httl/httl
httl/src/main/java/httl/util/ConfigUtils.java
ConfigUtils.loadProperties
public static Properties loadProperties(String path, boolean required) { """ Load properties file @param path - File path @return Properties map """ Properties properties = new Properties(); return loadProperties(properties, path, required); }
java
public static Properties loadProperties(String path, boolean required) { Properties properties = new Properties(); return loadProperties(properties, path, required); }
[ "public", "static", "Properties", "loadProperties", "(", "String", "path", ",", "boolean", "required", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "return", "loadProperties", "(", "properties", ",", "path", ",", "required", "...
Load properties file @param path - File path @return Properties map
[ "Load", "properties", "file" ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/util/ConfigUtils.java#L61-L64
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.toLightweightTypeReference
public static LightweightTypeReference toLightweightTypeReference( JvmTypeReference typeRef, CommonTypeComputationServices services) { """ Convert a type reference to a lightweight type reference. @param typeRef - reference to convert. @param services - services used for the conversion @return the lightwei...
java
public static LightweightTypeReference toLightweightTypeReference( JvmTypeReference typeRef, CommonTypeComputationServices services) { return toLightweightTypeReference(typeRef, services, false); }
[ "public", "static", "LightweightTypeReference", "toLightweightTypeReference", "(", "JvmTypeReference", "typeRef", ",", "CommonTypeComputationServices", "services", ")", "{", "return", "toLightweightTypeReference", "(", "typeRef", ",", "services", ",", "false", ")", ";", "...
Convert a type reference to a lightweight type reference. @param typeRef - reference to convert. @param services - services used for the conversion @return the lightweight type reference.
[ "Convert", "a", "type", "reference", "to", "a", "lightweight", "type", "reference", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L595-L598
Alluxio/alluxio
minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java
MultiProcessCluster.createMaster
private synchronized Master createMaster(int i) throws IOException { """ Creates the specified master without starting it. @param i the index of the master to create """ Preconditions.checkState(mState == State.STARTED, "Must be in a started state to create masters"); MasterNetAddress addres...
java
private synchronized Master createMaster(int i) throws IOException { Preconditions.checkState(mState == State.STARTED, "Must be in a started state to create masters"); MasterNetAddress address = mMasterAddresses.get(i); File confDir = new File(mWorkDir, "conf-master" + i); File metastoreDir = ne...
[ "private", "synchronized", "Master", "createMaster", "(", "int", "i", ")", "throws", "IOException", "{", "Preconditions", ".", "checkState", "(", "mState", "==", "State", ".", "STARTED", ",", "\"Must be in a started state to create masters\"", ")", ";", "MasterNetAddr...
Creates the specified master without starting it. @param i the index of the master to create
[ "Creates", "the", "specified", "master", "without", "starting", "it", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java#L545-L571
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/Predicates.java
Predicates.lessEqual
public static Predicate lessEqual(String attribute, Comparable value) { """ Creates a <b>less than or equal to</b> predicate that will pass items if the value stored under the given item {@code attribute} is less than or equal to the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attribute Path...
java
public static Predicate lessEqual(String attribute, Comparable value) { return new GreaterLessPredicate(attribute, value, true, true); }
[ "public", "static", "Predicate", "lessEqual", "(", "String", "attribute", ",", "Comparable", "value", ")", "{", "return", "new", "GreaterLessPredicate", "(", "attribute", ",", "value", ",", "true", ",", "true", ")", ";", "}" ]
Creates a <b>less than or equal to</b> predicate that will pass items if the value stored under the given item {@code attribute} is less than or equal to the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attribute Paths</i>, <i>Handling of {@code null}</i> and <i>Implicit Type Conversion</i> sections ...
[ "Creates", "a", "<b", ">", "less", "than", "or", "equal", "to<", "/", "b", ">", "predicate", "that", "will", "pass", "items", "if", "the", "value", "stored", "under", "the", "given", "item", "{", "@code", "attribute", "}", "is", "less", "than", "or", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/Predicates.java#L392-L394
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/Options.java
Options.union
@SuppressWarnings("unchecked") private Object union(Linker linker, Object a, Object b) { """ Combine values for the same key, resolving conflicts based on their type. """ if (a instanceof List) { return union((List<?>) a, (List<?>) b); } else if (a instanceof Map) { return union(linker, (...
java
@SuppressWarnings("unchecked") private Object union(Linker linker, Object a, Object b) { if (a instanceof List) { return union((List<?>) a, (List<?>) b); } else if (a instanceof Map) { return union(linker, (Map<ProtoMember, Object>) a, (Map<ProtoMember, Object>) b); } else { linker.addEr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "Object", "union", "(", "Linker", "linker", ",", "Object", "a", ",", "Object", "b", ")", "{", "if", "(", "a", "instanceof", "List", ")", "{", "return", "union", "(", "(", "List", "<", "?", ...
Combine values for the same key, resolving conflicts based on their type.
[ "Combine", "values", "for", "the", "same", "key", "resolving", "conflicts", "based", "on", "their", "type", "." ]
train
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/Options.java#L238-L248
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java
DepthSparse3D.process
public boolean process( int x , int y ) { """ Given a pixel coordinate in the visual camera, compute the 3D coordinate of that point. @param x x-coordinate of point in visual camera @param y y-coordinate of point in visual camera @return true if a 3D point could be computed and false if not """ visualTo...
java
public boolean process( int x , int y ) { visualToDepth.compute(x, y,distorted); int depthX = (int)distorted.x; int depthY = (int)distorted.y; if( depthImage.isInBounds(depthX,depthY) ) { // get the depth at the specified location double value = lookupDepth(depthX, depthY); // see if its an invalid ...
[ "public", "boolean", "process", "(", "int", "x", ",", "int", "y", ")", "{", "visualToDepth", ".", "compute", "(", "x", ",", "y", ",", "distorted", ")", ";", "int", "depthX", "=", "(", "int", ")", "distorted", ".", "x", ";", "int", "depthY", "=", ...
Given a pixel coordinate in the visual camera, compute the 3D coordinate of that point. @param x x-coordinate of point in visual camera @param y y-coordinate of point in visual camera @return true if a 3D point could be computed and false if not
[ "Given", "a", "pixel", "coordinate", "in", "the", "visual", "camera", "compute", "the", "3D", "coordinate", "of", "that", "point", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java#L101-L127
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.createOrUpdateElement
public Element createOrUpdateElement(Object parent, String name, String type, Style style) { """ Create or update an element in the DOM. The id will be generated. @param parent the parent group @param name the local group name of the element (should be unique within the group) @param type the type of the e...
java
public Element createOrUpdateElement(Object parent, String name, String type, Style style) { return createOrUpdateElement(parent, name, type, style, true); }
[ "public", "Element", "createOrUpdateElement", "(", "Object", "parent", ",", "String", "name", ",", "String", "type", ",", "Style", "style", ")", "{", "return", "createOrUpdateElement", "(", "parent", ",", "name", ",", "type", ",", "style", ",", "true", ")", ...
Create or update an element in the DOM. The id will be generated. @param parent the parent group @param name the local group name of the element (should be unique within the group) @param type the type of the element (tag name, e.g. 'image') @param style The style to apply on the element. @return the created or update...
[ "Create", "or", "update", "an", "element", "in", "the", "DOM", ".", "The", "id", "will", "be", "generated", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L142-L144
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java
WCheckBoxSelectExample.addFlatSelectExample
private void addFlatSelectExample() { """ WCheckBoxSelect layout options These examples show the various ways to lay out the options in a WCheckBoxSelect NOTE: the default (if no buttonLayout is set) is LAYOUT_STACKED. adds a WCheckBoxSelect with LAYOUT_FLAT """ add(new WHeading(HeadingLevel.H3, "WCheckBoxS...
java
private void addFlatSelectExample() { add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect with flat layout")); add(new ExplanatoryText("Setting the layout to FLAT will make thecheck boxes be rendered in a horizontal line. They will wrap when they reach" + " the edge of the parent container.")); final WCheckBox...
[ "private", "void", "addFlatSelectExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H3", ",", "\"WCheckBoxSelect with flat layout\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"Setting the layout to FLAT will make thec...
WCheckBoxSelect layout options These examples show the various ways to lay out the options in a WCheckBoxSelect NOTE: the default (if no buttonLayout is set) is LAYOUT_STACKED. adds a WCheckBoxSelect with LAYOUT_FLAT
[ "WCheckBoxSelect", "layout", "options", "These", "examples", "show", "the", "various", "ways", "to", "lay", "out", "the", "options", "in", "a", "WCheckBoxSelect", "NOTE", ":", "the", "default", "(", "if", "no", "buttonLayout", "is", "set", ")", "is", "LAYOUT...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java#L210-L218
alkacon/opencms-core
src/org/opencms/main/CmsShellCommands.java
CmsShellCommands.importResourcesWithTempProject
public void importResourcesWithTempProject(String importFile) throws Exception { """ Imports a folder or a ZIP file to the root folder of the current site, creating a temporary project for this.<p> @param importFile the absolute path of the import resource @throws Exception if something goes wrong """ ...
java
public void importResourcesWithTempProject(String importFile) throws Exception { CmsProject project = m_cms.createProject( "SystemUpdate", getMessages().key(Messages.GUI_SHELL_IMPORT_TEMP_PROJECT_NAME_0), OpenCms.getDefaultUsers().getGroupAdministrators(), OpenCm...
[ "public", "void", "importResourcesWithTempProject", "(", "String", "importFile", ")", "throws", "Exception", "{", "CmsProject", "project", "=", "m_cms", ".", "createProject", "(", "\"SystemUpdate\"", ",", "getMessages", "(", ")", ".", "key", "(", "Messages", ".", ...
Imports a folder or a ZIP file to the root folder of the current site, creating a temporary project for this.<p> @param importFile the absolute path of the import resource @throws Exception if something goes wrong
[ "Imports", "a", "folder", "or", "a", "ZIP", "file", "to", "the", "root", "folder", "of", "the", "current", "site", "creating", "a", "temporary", "project", "for", "this", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShellCommands.java#L954-L976
banq/jdonframework
src/main/java/com/jdon/util/MultiHashMap.java
MultiHashMap.put
public Object put(Object key,Object subKey,Object value) { """ Associates the specified value with the specified key and subKey in this map. If the map previously contained a mapping for this key and subKey , the old value is replaced. @param key Is a Primary key. @param subKey with which the specified value i...
java
public Object put(Object key,Object subKey,Object value){ HashMap a = (HashMap)super.get(key); if(a==null){ a = new HashMap(); super.put(key,a); } return a.put(subKey,value); }
[ "public", "Object", "put", "(", "Object", "key", ",", "Object", "subKey", ",", "Object", "value", ")", "{", "HashMap", "a", "=", "(", "HashMap", ")", "super", ".", "get", "(", "key", ")", ";", "if", "(", "a", "==", "null", ")", "{", "a", "=", "...
Associates the specified value with the specified key and subKey in this map. If the map previously contained a mapping for this key and subKey , the old value is replaced. @param key Is a Primary key. @param subKey with which the specified value is to be associated. @param value to be associated with the specified ke...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "key", "and", "subKey", "in", "this", "map", ".", "If", "the", "map", "previously", "contained", "a", "mapping", "for", "this", "key", "and", "subKey", "the", "old", "value", "is", "rep...
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/MultiHashMap.java#L33-L40
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/bci/ProbeAtCatchMethodAdapter.java
ProbeAtCatchMethodAdapter.visitTryCatchBlock
@Override public void visitTryCatchBlock(Label start, Label end, Label handler, String exceptionType) { """ Callback used to determine the {@code Label}s that correspond to exception handlers. """ if (enabled && exceptionType != null) { handlers.put(handler, Type.getObjectType(exceptio...
java
@Override public void visitTryCatchBlock(Label start, Label end, Label handler, String exceptionType) { if (enabled && exceptionType != null) { handlers.put(handler, Type.getObjectType(exceptionType)); } super.visitTryCatchBlock(start, end, handler, exceptionType); }
[ "@", "Override", "public", "void", "visitTryCatchBlock", "(", "Label", "start", ",", "Label", "end", ",", "Label", "handler", ",", "String", "exceptionType", ")", "{", "if", "(", "enabled", "&&", "exceptionType", "!=", "null", ")", "{", "handlers", ".", "p...
Callback used to determine the {@code Label}s that correspond to exception handlers.
[ "Callback", "used", "to", "determine", "the", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/bci/ProbeAtCatchMethodAdapter.java#L99-L105
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/PathService.java
PathService.createPath
public JimfsPath createPath(@Nullable Name root, Iterable<Name> names) { """ Returns a path with the given root (or no root, if null) and the given names. """ ImmutableList<Name> nameList = ImmutableList.copyOf(Iterables.filter(names, NOT_EMPTY)); if (root == null && nameList.isEmpty()) { // ensu...
java
public JimfsPath createPath(@Nullable Name root, Iterable<Name> names) { ImmutableList<Name> nameList = ImmutableList.copyOf(Iterables.filter(names, NOT_EMPTY)); if (root == null && nameList.isEmpty()) { // ensure the canonical empty path (one empty string name) is used rather than a path with // no...
[ "public", "JimfsPath", "createPath", "(", "@", "Nullable", "Name", "root", ",", "Iterable", "<", "Name", ">", "names", ")", "{", "ImmutableList", "<", "Name", ">", "nameList", "=", "ImmutableList", ".", "copyOf", "(", "Iterables", ".", "filter", "(", "name...
Returns a path with the given root (or no root, if null) and the given names.
[ "Returns", "a", "path", "with", "the", "given", "root", "(", "or", "no", "root", "if", "null", ")", "and", "the", "given", "names", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/PathService.java#L165-L173
thrau/jarchivelib
src/main/java/org/rauschig/jarchivelib/IOUtils.java
IOUtils.relativePath
public static String relativePath(File root, File node) throws IOException { """ Computes the path name of a file node relative to a given root node. <br> If the root is {@code /home/cdlflex/custom-ahy} and the given node is {@code /home/cdlflex/custom-ahy/assembly/pom.xml}, the returned path name will be {@cod...
java
public static String relativePath(File root, File node) throws IOException { String rootPath = root.getCanonicalPath(); String nodePath = node.getCanonicalPath(); return nodePath.substring(rootPath.length() + 1); }
[ "public", "static", "String", "relativePath", "(", "File", "root", ",", "File", "node", ")", "throws", "IOException", "{", "String", "rootPath", "=", "root", ".", "getCanonicalPath", "(", ")", ";", "String", "nodePath", "=", "node", ".", "getCanonicalPath", ...
Computes the path name of a file node relative to a given root node. <br> If the root is {@code /home/cdlflex/custom-ahy} and the given node is {@code /home/cdlflex/custom-ahy/assembly/pom.xml}, the returned path name will be {@code assembly/pom.xml}. @param root the parent node @param node the file node to compute th...
[ "Computes", "the", "path", "name", "of", "a", "file", "node", "relative", "to", "a", "given", "root", "node", ".", "<br", ">", "If", "the", "root", "is", "{", "@code", "/", "home", "/", "cdlflex", "/", "custom", "-", "ahy", "}", "and", "the", "give...
train
https://github.com/thrau/jarchivelib/blob/8afee5124c588f589306796985b722d63572bbfa/src/main/java/org/rauschig/jarchivelib/IOUtils.java#L100-L105