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
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java
DoubleUtils.isCloseToIntegral
public static boolean isCloseToIntegral(final double value, final double tolerance) { """ Is {@code value} within {@code tolerance} of being an integer? """ return Math.abs(value - Math.round(value)) <= tolerance; }
java
public static boolean isCloseToIntegral(final double value, final double tolerance) { return Math.abs(value - Math.round(value)) <= tolerance; }
[ "public", "static", "boolean", "isCloseToIntegral", "(", "final", "double", "value", ",", "final", "double", "tolerance", ")", "{", "return", "Math", ".", "abs", "(", "value", "-", "Math", ".", "round", "(", "value", ")", ")", "<=", "tolerance", ";", "}"...
Is {@code value} within {@code tolerance} of being an integer?
[ "Is", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java#L193-L195
fcrepo4-labs/fcrepo4-client
fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/RDFSinkFilter.java
RDFSinkFilter.filterTriples
public static Graph filterTriples ( final Iterator<Triple> triples, final Node... properties) { """ Filter the triples @param triples Iterator of triples @param properties Properties to include @return Graph containing the fitlered triples """ final Graph filteredGraph = new ...
java
public static Graph filterTriples ( final Iterator<Triple> triples, final Node... properties) { final Graph filteredGraph = new RandomOrderGraph(RandomOrderGraph.createDefaultGraph()); final Sink<Triple> graphOutput = new SinkTriplesToGraph(true, filteredGraph); final RDF...
[ "public", "static", "Graph", "filterTriples", "(", "final", "Iterator", "<", "Triple", ">", "triples", ",", "final", "Node", "...", "properties", ")", "{", "final", "Graph", "filteredGraph", "=", "new", "RandomOrderGraph", "(", "RandomOrderGraph", ".", "createDe...
Filter the triples @param triples Iterator of triples @param properties Properties to include @return Graph containing the fitlered triples
[ "Filter", "the", "triples" ]
train
https://github.com/fcrepo4-labs/fcrepo4-client/blob/21eaf27200c5b2542095f6ebb9dd8ec865b95bbd/fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/RDFSinkFilter.java#L68-L81
zerodhatech/javakiteconnect
kiteconnect/src/com/zerodhatech/kiteconnect/kitehttp/KiteRequestHandler.java
KiteRequestHandler.getCSVRequest
public String getCSVRequest(String url, String apiKey, String accessToken) throws IOException, KiteException, JSONException { """ Makes GET request to fetch CSV dump. @return String which is received from server. @param url is the endpoint to which request has to be done. @param apiKey is the api key of the Kit...
java
public String getCSVRequest(String url, String apiKey, String accessToken) throws IOException, KiteException, JSONException { Request request = new Request.Builder().url(url).header("User-Agent", USER_AGENT).header("X-Kite-Version", "3").header("Authorization", "token "+apiKey+":"+accessToken).build(); ...
[ "public", "String", "getCSVRequest", "(", "String", "url", ",", "String", "apiKey", ",", "String", "accessToken", ")", "throws", "IOException", ",", "KiteException", ",", "JSONException", "{", "Request", "request", "=", "new", "Request", ".", "Builder", "(", "...
Makes GET request to fetch CSV dump. @return String which is received from server. @param url is the endpoint to which request has to be done. @param apiKey is the api key of the Kite Connect app. @param accessToken is the access token obtained after successful login process. @throws IOException is thrown when there is...
[ "Makes", "GET", "request", "to", "fetch", "CSV", "dump", "." ]
train
https://github.com/zerodhatech/javakiteconnect/blob/4a3f15ff2c8a1b3b6ec61799f8bb047e4dfeb92d/kiteconnect/src/com/zerodhatech/kiteconnect/kitehttp/KiteRequestHandler.java#L146-L151
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MenuLoader.java
MenuLoader.requestSearchResultsFrom
public List<Message> requestSearchResultsFrom(final int player, final CdjStatus.TrackSourceSlot slot, final int sortOrder, final String text, final AtomicInteger count) throws Exception { """ Ask the spe...
java
public List<Message> requestSearchResultsFrom(final int player, final CdjStatus.TrackSourceSlot slot, final int sortOrder, final String text, final AtomicInteger count) throws Exception { ConnectionMa...
[ "public", "List", "<", "Message", ">", "requestSearchResultsFrom", "(", "final", "int", "player", ",", "final", "CdjStatus", ".", "TrackSourceSlot", "slot", ",", "final", "int", "sortOrder", ",", "final", "String", "text", ",", "final", "AtomicInteger", "count",...
Ask the specified player for database records whose names contain {@code text}. If {@code count} is not {@code null}, no more than that many results will be returned, and the value will be set to the total number of results that were available. Otherwise all results will be returned. @param player the player number wh...
[ "Ask", "the", "specified", "player", "for", "database", "records", "whose", "names", "contain", "{", "@code", "text", "}", ".", "If", "{", "@code", "count", "}", "is", "not", "{", "@code", "null", "}", "no", "more", "than", "that", "many", "results", "...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MenuLoader.java#L1672-L1684
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/SqlClosureElf.java
SqlClosureElf.getObjectById
public static <T> T getObjectById(Class<T> type, Object... ids) { """ Gets an object by ID from the database. @param type The type of the desired object. @param ids The ID or IDs of the object. @param <T> The type of the object. @return The object or {@code null} """ return SqlClosure.sqlExecute(c ...
java
public static <T> T getObjectById(Class<T> type, Object... ids) { return SqlClosure.sqlExecute(c -> OrmElf.objectById(c, type, ids)); }
[ "public", "static", "<", "T", ">", "T", "getObjectById", "(", "Class", "<", "T", ">", "type", ",", "Object", "...", "ids", ")", "{", "return", "SqlClosure", ".", "sqlExecute", "(", "c", "->", "OrmElf", ".", "objectById", "(", "c", ",", "type", ",", ...
Gets an object by ID from the database. @param type The type of the desired object. @param ids The ID or IDs of the object. @param <T> The type of the object. @return The object or {@code null}
[ "Gets", "an", "object", "by", "ID", "from", "the", "database", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/SqlClosureElf.java#L43-L46
google/truth
extensions/proto/src/main/java/com/google/common/truth/extensions/proto/MultimapWithProtoValuesSubject.java
MultimapWithProtoValuesSubject.ignoringFieldDescriptorsForValues
public MultimapWithProtoValuesFluentAssertion<M> ignoringFieldDescriptorsForValues( FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) { """ Excludes all message fields matching the given {@link FieldDescriptor}s from the comparison. <p>This method adds on any previous {@link FieldScope} relat...
java
public MultimapWithProtoValuesFluentAssertion<M> ignoringFieldDescriptorsForValues( FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) { return ignoringFieldDescriptorsForValues(asList(firstFieldDescriptor, rest)); }
[ "public", "MultimapWithProtoValuesFluentAssertion", "<", "M", ">", "ignoringFieldDescriptorsForValues", "(", "FieldDescriptor", "firstFieldDescriptor", ",", "FieldDescriptor", "...", "rest", ")", "{", "return", "ignoringFieldDescriptorsForValues", "(", "asList", "(", "firstFi...
Excludes all message fields matching the given {@link FieldDescriptor}s from the comparison. <p>This method adds on any previous {@link FieldScope} related settings, overriding previous changes to ensure the specified fields are ignored recursively. All sub-fields of these field descriptors are ignored, no matter wher...
[ "Excludes", "all", "message", "fields", "matching", "the", "given", "{", "@link", "FieldDescriptor", "}", "s", "from", "the", "comparison", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/MultimapWithProtoValuesSubject.java#L736-L739
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AligNPE.java
AligNPE.align_NPE
public static Alignable align_NPE(Matrix sim,StrucAligParameters params) { """ Align without penalizing end-gaps. Return alignment and score @param sim the similarity matrix @param params the structure alignment parameters to be used @return an Alignable """ //System.out.println("align_NPE"); float g...
java
public static Alignable align_NPE(Matrix sim,StrucAligParameters params){ //System.out.println("align_NPE"); float gapOpen = params.getGapOpen(); float gapExtension = params.getGapExtension(); int rows = sim.getRowDimension(); int cols = sim.getColumnDimension(); Alignable al = new StrCompAlignment(rows,...
[ "public", "static", "Alignable", "align_NPE", "(", "Matrix", "sim", ",", "StrucAligParameters", "params", ")", "{", "//System.out.println(\"align_NPE\");", "float", "gapOpen", "=", "params", ".", "getGapOpen", "(", ")", ";", "float", "gapExtension", "=", "params", ...
Align without penalizing end-gaps. Return alignment and score @param sim the similarity matrix @param params the structure alignment parameters to be used @return an Alignable
[ "Align", "without", "penalizing", "end", "-", "gaps", ".", "Return", "alignment", "and", "score" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AligNPE.java#L43-L84
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.entryToWidgetRequest
private WidgetRequest entryToWidgetRequest(Dashboard dashboard, DashboardRemoteRequest.Entry entry, Collector collector) throws HygieiaException { """ Creates a widget from entry @param dashboard @param entry @return WidgetRequest """ WidgetRequest request = new WidgetRequest(); CollectorIte...
java
private WidgetRequest entryToWidgetRequest(Dashboard dashboard, DashboardRemoteRequest.Entry entry, Collector collector) throws HygieiaException { WidgetRequest request = new WidgetRequest(); CollectorItem item = entryToCollectorItem(entry, collector); if (item != null) { request.set...
[ "private", "WidgetRequest", "entryToWidgetRequest", "(", "Dashboard", "dashboard", ",", "DashboardRemoteRequest", ".", "Entry", "entry", ",", "Collector", "collector", ")", "throws", "HygieiaException", "{", "WidgetRequest", "request", "=", "new", "WidgetRequest", "(", ...
Creates a widget from entry @param dashboard @param entry @return WidgetRequest
[ "Creates", "a", "widget", "from", "entry" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L235-L247
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java
JsApiMessageImpl.putSystemContextItem
@Override public void putSystemContextItem(String name, Serializable item) throws IllegalArgumentException, IOException { """ /* Add an item to the SystemContext under the given name. Javadoc description supplied by JsApiMessage interface. """ if (TraceComponent.isAnyTracingEnabled() && tc.isEn...
java
@Override public void putSystemContextItem(String name, Serializable item) throws IllegalArgumentException, IOException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putSystemContextItem", new Object[] { name, item }); /* If we have a non-null...
[ "@", "Override", "public", "void", "putSystemContextItem", "(", "String", "name", ",", "Serializable", "item", ")", "throws", "IllegalArgumentException", ",", "IOException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", ...
/* Add an item to the SystemContext under the given name. Javadoc description supplied by JsApiMessage interface.
[ "/", "*", "Add", "an", "item", "to", "the", "SystemContext", "under", "the", "given", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java#L432-L468
mangstadt/biweekly
src/main/java/biweekly/io/xml/XCalElement.java
XCalElement.append
public Element append(String name, String value) { """ Adds a child element. @param name the name of the child element @param value the value of the child element. @return the created element """ Element child = document.createElementNS(XCAL_NS, name); child.setTextContent(value); element.appendChild(...
java
public Element append(String name, String value) { Element child = document.createElementNS(XCAL_NS, name); child.setTextContent(value); element.appendChild(child); return child; }
[ "public", "Element", "append", "(", "String", "name", ",", "String", "value", ")", "{", "Element", "child", "=", "document", ".", "createElementNS", "(", "XCAL_NS", ",", "name", ")", ";", "child", ".", "setTextContent", "(", "value", ")", ";", "element", ...
Adds a child element. @param name the name of the child element @param value the value of the child element. @return the created element
[ "Adds", "a", "child", "element", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/xml/XCalElement.java#L126-L131
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/Compare.java
Compare.movies
public static boolean movies(final MovieInfo moviedb, final String title, final String year, int maxDistance) { """ Compare the MovieDB object with a title and year, case sensitive @param moviedb movieinfo @param title title @param year year @param maxDistance maximum distance @return true if matched ""...
java
public static boolean movies(final MovieInfo moviedb, final String title, final String year, int maxDistance) { return Compare.movies(moviedb, title, year, maxDistance, true); }
[ "public", "static", "boolean", "movies", "(", "final", "MovieInfo", "moviedb", ",", "final", "String", "title", ",", "final", "String", "year", ",", "int", "maxDistance", ")", "{", "return", "Compare", ".", "movies", "(", "moviedb", ",", "title", ",", "yea...
Compare the MovieDB object with a title and year, case sensitive @param moviedb movieinfo @param title title @param year year @param maxDistance maximum distance @return true if matched
[ "Compare", "the", "MovieDB", "object", "with", "a", "title", "and", "year", "case", "sensitive" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/Compare.java#L118-L120
duracloud/duracloud
syncoptimize/src/main/java/org/duracloud/syncoptimize/SyncOptimizeDriver.java
SyncOptimizeDriver.getOptimalThreads
public int getOptimalThreads(SyncOptimizeConfig syncOptConfig) throws IOException { """ Determines the optimal SyncTool thread count value. This value is discovered by running a series of timed tests and returning the fastest performer. The results of these tests depend highly on the machine they are ru...
java
public int getOptimalThreads(SyncOptimizeConfig syncOptConfig) throws IOException { File tempDir = FileUtils.getTempDirectory(); this.dataDir = new File(tempDir, DATA_DIR_NAME); this.workDir = new File(tempDir, WORK_DIR_NAME); String prefix = "sync-optimize/" + ...
[ "public", "int", "getOptimalThreads", "(", "SyncOptimizeConfig", "syncOptConfig", ")", "throws", "IOException", "{", "File", "tempDir", "=", "FileUtils", ".", "getTempDirectory", "(", ")", ";", "this", ".", "dataDir", "=", "new", "File", "(", "tempDir", ",", "...
Determines the optimal SyncTool thread count value. This value is discovered by running a series of timed tests and returning the fastest performer. The results of these tests depend highly on the machine they are run on, and the capacity of the network available to that machine. @param syncOptConfig tool configuratio...
[ "Determines", "the", "optimal", "SyncTool", "thread", "count", "value", ".", "This", "value", "is", "discovered", "by", "running", "a", "series", "of", "timed", "tests", "and", "returning", "the", "fastest", "performer", ".", "The", "results", "of", "these", ...
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/syncoptimize/src/main/java/org/duracloud/syncoptimize/SyncOptimizeDriver.java#L74-L97
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java
XlsLoader.load
public <P> P load(final InputStream xlsIn, final Class<P> clazz) throws XlsMapperException, IOException { """ Excelファイルの1シートを読み込み、任意のクラスにマッピングする。 @param <P> シートをマッピングするクラスタイプ @param xlsIn 読み込みもとのExcelファイルのストリーム。 @param clazz マッピング先のクラスタイプ。 @return シートをマッピングしたオブジェクト。 {@link Configuration#isIgnoreSheetNotFou...
java
public <P> P load(final InputStream xlsIn, final Class<P> clazz) throws XlsMapperException, IOException { ArgUtils.notNull(xlsIn, "xlsIn"); ArgUtils.notNull(clazz, "clazz"); return loadDetail(xlsIn, clazz).getTarget(); }
[ "public", "<", "P", ">", "P", "load", "(", "final", "InputStream", "xlsIn", ",", "final", "Class", "<", "P", ">", "clazz", ")", "throws", "XlsMapperException", ",", "IOException", "{", "ArgUtils", ".", "notNull", "(", "xlsIn", ",", "\"xlsIn\"", ")", ";",...
Excelファイルの1シートを読み込み、任意のクラスにマッピングする。 @param <P> シートをマッピングするクラスタイプ @param xlsIn 読み込みもとのExcelファイルのストリーム。 @param clazz マッピング先のクラスタイプ。 @return シートをマッピングしたオブジェクト。 {@link Configuration#isIgnoreSheetNotFound()}の値がtrueで、シートが見つからない場合、nullを返します。 @throws IllegalArgumentException {@literal xlsIn == null or clazz == null} @throws X...
[ "Excelファイルの1シートを読み込み、任意のクラスにマッピングする。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java#L81-L87
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/internal/stream/FutureStreamUtils.java
FutureStreamUtils.forEachXWithError
public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachXWithError( final Stream<T> stream, final long x, final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError) { """ Perform a forEach operation ove...
java
public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachXWithError( final Stream<T> stream, final long x, final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError) { return forEachXEvents(stream, x,...
[ "public", "static", "<", "T", ",", "X", "extends", "Throwable", ">", "Tuple3", "<", "CompletableFuture", "<", "Subscription", ">", ",", "Runnable", ",", "CompletableFuture", "<", "Boolean", ">", ">", "forEachXWithError", "(", "final", "Stream", "<", "T", ">"...
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming the specified number of elements from the Stream, at this time. More elements can be consumed later, by called request on the returned Subscription <pre> {@code Subscription ...
[ "Perform", "a", "forEach", "operation", "over", "the", "Stream", "without", "closing", "it", "capturing", "any", "elements", "and", "errors", "in", "the", "supplied", "consumers", "but", "only", "consuming", "the", "specified", "number", "of", "elements", "from"...
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/internal/stream/FutureStreamUtils.java#L85-L89
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteHierarchicalEntityRole
public OperationStatus deleteHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, UUID roleId) { """ Delete an entity role. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param roleId The entity role Id. @throws Illeg...
java
public OperationStatus deleteHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, UUID roleId) { return deleteHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, roleId).toBlocking().single().body(); }
[ "public", "OperationStatus", "deleteHierarchicalEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "UUID", "roleId", ")", "{", "return", "deleteHierarchicalEntityRoleWithServiceResponseAsync", "(", "appId", ",", "versionId", ",...
Delete an entity role. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param roleId The entity role Id. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by...
[ "Delete", "an", "entity", "role", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13465-L13467
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getIterationPerformanceAsync
public Observable<IterationPerformance> getIterationPerformanceAsync(UUID projectId, UUID iterationId, GetIterationPerformanceOptionalParameter getIterationPerformanceOptionalParameter) { """ Get detailed performance information about an iteration. @param projectId The id of the project the iteration belongs to...
java
public Observable<IterationPerformance> getIterationPerformanceAsync(UUID projectId, UUID iterationId, GetIterationPerformanceOptionalParameter getIterationPerformanceOptionalParameter) { return getIterationPerformanceWithServiceResponseAsync(projectId, iterationId, getIterationPerformanceOptionalParameter).map...
[ "public", "Observable", "<", "IterationPerformance", ">", "getIterationPerformanceAsync", "(", "UUID", "projectId", ",", "UUID", "iterationId", ",", "GetIterationPerformanceOptionalParameter", "getIterationPerformanceOptionalParameter", ")", "{", "return", "getIterationPerformanc...
Get detailed performance information about an iteration. @param projectId The id of the project the iteration belongs to @param iterationId The id of the iteration to get @param getIterationPerformanceOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArg...
[ "Get", "detailed", "performance", "information", "about", "an", "iteration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L1643-L1650
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/utilities/SpaceCharacters.java
SpaceCharacters.indent
public static void indent(int num, PrintWriter out) { """ Write a number of whitespaces to a writer @param num @param out """ if (num <= SIXTY_FOUR) { out.write(SIXTY_FOUR_SPACES, 0, num); return; } else if (num <= 128){ out.write(SIXTY_FOUR_SPACES, 0, SIXT...
java
public static void indent(int num, PrintWriter out) { if (num <= SIXTY_FOUR) { out.write(SIXTY_FOUR_SPACES, 0, num); return; } else if (num <= 128){ out.write(SIXTY_FOUR_SPACES, 0, SIXTY_FOUR); out.write(SIXTY_FOUR_SPACES, 0, num - SIXTY_FOUR); } e...
[ "public", "static", "void", "indent", "(", "int", "num", ",", "PrintWriter", "out", ")", "{", "if", "(", "num", "<=", "SIXTY_FOUR", ")", "{", "out", ".", "write", "(", "SIXTY_FOUR_SPACES", ",", "0", ",", "num", ")", ";", "return", ";", "}", "else", ...
Write a number of whitespaces to a writer @param num @param out
[ "Write", "a", "number", "of", "whitespaces", "to", "a", "writer" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/SpaceCharacters.java#L28-L44
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Reductions.java
Reductions.minimum
public static <E, C extends Comparator<E>> E minimum(Iterator<E> iterator, C comparator, E init) { """ Returns the min element contained in the iterator @param <E> the iterator element type parameter @param <C> the comparator type parameter @param iterator the iterator to be consumed @param comparator the co...
java
public static <E, C extends Comparator<E>> E minimum(Iterator<E> iterator, C comparator, E init) { return Reductions.reduce(iterator, BinaryOperator.minBy(comparator), init); }
[ "public", "static", "<", "E", ",", "C", "extends", "Comparator", "<", "E", ">", ">", "E", "minimum", "(", "Iterator", "<", "E", ">", "iterator", ",", "C", "comparator", ",", "E", "init", ")", "{", "return", "Reductions", ".", "reduce", "(", "iterator...
Returns the min element contained in the iterator @param <E> the iterator element type parameter @param <C> the comparator type parameter @param iterator the iterator to be consumed @param comparator the comparator to be used to evaluate the min element @param init the initial value to be used @return the min element ...
[ "Returns", "the", "min", "element", "contained", "in", "the", "iterator" ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Reductions.java#L239-L241
structr/structr
structr-ui/src/main/java/org/structr/websocket/command/AbstractCommand.java
AbstractCommand.moveChildNodes
protected void moveChildNodes(final DOMNode sourceNode, final DOMNode targetNode) { """ Make child nodes of the source nodes child nodes of the target node. @param sourceNode @param targetNode """ DOMNode child = (DOMNode) sourceNode.getFirstChild(); while (child != null) { DOMNode next = (DOMNod...
java
protected void moveChildNodes(final DOMNode sourceNode, final DOMNode targetNode) { DOMNode child = (DOMNode) sourceNode.getFirstChild(); while (child != null) { DOMNode next = (DOMNode) child.getNextSibling(); targetNode.appendChild(child); child = next; } }
[ "protected", "void", "moveChildNodes", "(", "final", "DOMNode", "sourceNode", ",", "final", "DOMNode", "targetNode", ")", "{", "DOMNode", "child", "=", "(", "DOMNode", ")", "sourceNode", ".", "getFirstChild", "(", ")", ";", "while", "(", "child", "!=", "null...
Make child nodes of the source nodes child nodes of the target node. @param sourceNode @param targetNode
[ "Make", "child", "nodes", "of", "the", "source", "nodes", "child", "nodes", "of", "the", "target", "node", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/websocket/command/AbstractCommand.java#L275-L289
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java
Context.unregisterConnection
boolean unregisterConnection(ConnectionManager cm, ConnectionListener cl, Object c) { """ Unregister a connection @param cm The connection manager @param cl The connection listener @param c The connection @return True if the connection was unregistered, otherwise false """ if (clToC != null && clToC....
java
boolean unregisterConnection(ConnectionManager cm, ConnectionListener cl, Object c) { if (clToC != null && clToC.get(cl) != null) { List<Object> l = clToC.get(cl); return l.remove(c); } return false; }
[ "boolean", "unregisterConnection", "(", "ConnectionManager", "cm", ",", "ConnectionListener", "cl", ",", "Object", "c", ")", "{", "if", "(", "clToC", "!=", "null", "&&", "clToC", ".", "get", "(", "cl", ")", "!=", "null", ")", "{", "List", "<", "Object", ...
Unregister a connection @param cm The connection manager @param cl The connection listener @param c The connection @return True if the connection was unregistered, otherwise false
[ "Unregister", "a", "connection" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java#L100-L109
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisRepository.java
CmsCmisRepository.getResourceTypeFromProperties
protected String getResourceTypeFromProperties(Map<String, PropertyData<?>> properties, String defaultValue) { """ Extracts the resource type from a set of CMIS properties.<p> @param properties the CMIS properties @param defaultValue the default value @return the resource type property, or the default value...
java
protected String getResourceTypeFromProperties(Map<String, PropertyData<?>> properties, String defaultValue) { PropertyData<?> typeProp = properties.get(CmsCmisTypeManager.PROPERTY_RESOURCE_TYPE); String resTypeName = defaultValue; if (typeProp != null) { resTypeName = (String)...
[ "protected", "String", "getResourceTypeFromProperties", "(", "Map", "<", "String", ",", "PropertyData", "<", "?", ">", ">", "properties", ",", "String", "defaultValue", ")", "{", "PropertyData", "<", "?", ">", "typeProp", "=", "properties", ".", "get", "(", ...
Extracts the resource type from a set of CMIS properties.<p> @param properties the CMIS properties @param defaultValue the default value @return the resource type property, or the default value if the property was not found
[ "Extracts", "the", "resource", "type", "from", "a", "set", "of", "CMIS", "properties", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisRepository.java#L1519-L1527
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java
GeodesicPosition.toDecimalDegreeString
@Pure public static String toDecimalDegreeString(double lambda, double phi, boolean useSymbolicDirection) { """ Replies the string representation of the longitude/latitude coordinates in the Decimal Degree format: coordinate containing only degrees (integer, or real number). <p>Example: <code>40.446195N 79.94...
java
@Pure public static String toDecimalDegreeString(double lambda, double phi, boolean useSymbolicDirection) { final StringBuilder b = new StringBuilder(); final SexagesimalLatitudeAxis latitudeAxis = (phi < 0.) ? SexagesimalLatitudeAxis.SOUTH : SexagesimalLatitudeAxis.NORTH; final SexagesimalLongitudeAxis longitud...
[ "@", "Pure", "public", "static", "String", "toDecimalDegreeString", "(", "double", "lambda", ",", "double", "phi", ",", "boolean", "useSymbolicDirection", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "final", "SexagesimalL...
Replies the string representation of the longitude/latitude coordinates in the Decimal Degree format: coordinate containing only degrees (integer, or real number). <p>Example: <code>40.446195N 79.948862W</code> @param lambda is the longitude in degrees. @param phi is the latitude in degrees. @param useSymbolicDirecti...
[ "Replies", "the", "string", "representation", "of", "the", "longitude", "/", "latitude", "coordinates", "in", "the", "Decimal", "Degree", "format", ":", "coordinate", "containing", "only", "degrees", "(", "integer", "or", "real", "number", ")", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L352-L370
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/impl/SlaveLogs.java
SlaveLogs.addSlaveJulLogRecords
private void addSlaveJulLogRecords(Container result, List<java.util.concurrent.Callable<List<FileContent>>> tasks, final Node node, final SmartLogFetcher logFetcher) { """ Captures a "recent" (but still fairly large number of) j.u.l entries written on this agent. @see JenkinsLogs#addMasterJulLogRecords(Containe...
java
private void addSlaveJulLogRecords(Container result, List<java.util.concurrent.Callable<List<FileContent>>> tasks, final Node node, final SmartLogFetcher logFetcher) { final FilePath rootPath = node.getRootPath(); if (rootPath != null) { // rotated log files stored on the disk ta...
[ "private", "void", "addSlaveJulLogRecords", "(", "Container", "result", ",", "List", "<", "java", ".", "util", ".", "concurrent", ".", "Callable", "<", "List", "<", "FileContent", ">", ">", ">", "tasks", ",", "final", "Node", "node", ",", "final", "SmartLo...
Captures a "recent" (but still fairly large number of) j.u.l entries written on this agent. @see JenkinsLogs#addMasterJulLogRecords(Container)
[ "Captures", "a", "recent", "(", "but", "still", "fairly", "large", "number", "of", ")", "j", ".", "u", ".", "l", "entries", "written", "on", "this", "agent", "." ]
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/impl/SlaveLogs.java#L169-L206
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java
XsdAsmUtils.getClassSignature
static String getClassSignature(String[] interfaces, String className, String apiName) { """ Obtains the signature for a class given the interface names. @param interfaces The implemented interfaces. @param className The class name. @param apiName The name of the generated fluent interface. @return The signatu...
java
static String getClassSignature(String[] interfaces, String className, String apiName) { StringBuilder signature; signature = new StringBuilder("<Z::" + XsdSupportingStructure.elementTypeDesc + ">" + JAVA_OBJECT_DESC); if (interfaces != null){ for (String anInterface : interfaces) ...
[ "static", "String", "getClassSignature", "(", "String", "[", "]", "interfaces", ",", "String", "className", ",", "String", "apiName", ")", "{", "StringBuilder", "signature", ";", "signature", "=", "new", "StringBuilder", "(", "\"<Z::\"", "+", "XsdSupportingStructu...
Obtains the signature for a class given the interface names. @param interfaces The implemented interfaces. @param className The class name. @param apiName The name of the generated fluent interface. @return The signature of the class.
[ "Obtains", "the", "signature", "for", "a", "class", "given", "the", "interface", "names", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java#L468-L484
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractJdbcHelper.java
AbstractJdbcHelper.calcFetchSizeForStream
protected int calcFetchSizeForStream(int hintFetchSize, Connection conn) throws SQLException { """ Calculate fetch size used for streaming. @param hintFetchSize @param conn @return @throws SQLException """ DatabaseVendor dbVendor = DbcHelper.detectDbVendor(conn); switch (dbVendor) { ...
java
protected int calcFetchSizeForStream(int hintFetchSize, Connection conn) throws SQLException { DatabaseVendor dbVendor = DbcHelper.detectDbVendor(conn); switch (dbVendor) { case MYSQL: return Integer.MIN_VALUE; default: return hintFetchSize < 0 ? 1 : hintFetchSize...
[ "protected", "int", "calcFetchSizeForStream", "(", "int", "hintFetchSize", ",", "Connection", "conn", ")", "throws", "SQLException", "{", "DatabaseVendor", "dbVendor", "=", "DbcHelper", ".", "detectDbVendor", "(", "conn", ")", ";", "switch", "(", "dbVendor", ")", ...
Calculate fetch size used for streaming. @param hintFetchSize @param conn @return @throws SQLException
[ "Calculate", "fetch", "size", "used", "for", "streaming", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractJdbcHelper.java#L549-L557
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/parsing/InterfacesXml.java
InterfacesXml.writeInterfaces
void writeInterfaces(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException { """ Write the interfaces including the criteria elements. @param writer the xml stream writer @param modelNode the model @throws XMLStreamException """ writer.writeStartElement(Elem...
java
void writeInterfaces(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException { writer.writeStartElement(Element.INTERFACES.getLocalName()); final Set<String> interfaces = modelNode.keys(); for (String ifaceName : interfaces) { final ModelNode iface ...
[ "void", "writeInterfaces", "(", "final", "XMLExtendedStreamWriter", "writer", ",", "final", "ModelNode", "modelNode", ")", "throws", "XMLStreamException", "{", "writer", ".", "writeStartElement", "(", "Element", ".", "INTERFACES", ".", "getLocalName", "(", ")", ")",...
Write the interfaces including the criteria elements. @param writer the xml stream writer @param modelNode the model @throws XMLStreamException
[ "Write", "the", "interfaces", "including", "the", "criteria", "elements", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/parsing/InterfacesXml.java#L253-L270
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.logNormalizeInPlace
public static <E> void logNormalizeInPlace(Counter<E> c) { """ Transform log space values into a probability distribution in place. On the assumption that the values in the Counter are in log space, this method calculates their sum, and then subtracts the log of their sum from each element. That is, if a counte...
java
public static <E> void logNormalizeInPlace(Counter<E> c) { double logsum = logSum(c); // for (E key : c.keySet()) { // c.incrementCount(key, -logsum); // } // This should be faster for (Map.Entry<E, Double> e : c.entrySet()) { e.setValue(e.getValue().doubleValue() - logsum); } ...
[ "public", "static", "<", "E", ">", "void", "logNormalizeInPlace", "(", "Counter", "<", "E", ">", "c", ")", "{", "double", "logsum", "=", "logSum", "(", "c", ")", ";", "// for (E key : c.keySet()) {\r", "// c.incrementCount(key, -logsum);\r", "// }\r", "// This sho...
Transform log space values into a probability distribution in place. On the assumption that the values in the Counter are in log space, this method calculates their sum, and then subtracts the log of their sum from each element. That is, if a counter has keys c1, c2, c3 with values v1, v2, v3, the value of c1 becomes v...
[ "Transform", "log", "space", "values", "into", "a", "probability", "distribution", "in", "place", ".", "On", "the", "assumption", "that", "the", "values", "in", "the", "Counter", "are", "in", "log", "space", "this", "method", "calculates", "their", "sum", "a...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L125-L134
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/impl/matcher/Optimizer.java
Optimizer.combineCharSeqAfterIndexOf
static Matcher combineCharSeqAfterIndexOf(Matcher matcher) { """ If a char sequence is adjacent to an index of matcher, then append the sequence to the pattern of the index of matcher. """ if (matcher instanceof IndexOfMatcher) { IndexOfMatcher m = matcher.as(); Matcher next = PatternUtils.hea...
java
static Matcher combineCharSeqAfterIndexOf(Matcher matcher) { if (matcher instanceof IndexOfMatcher) { IndexOfMatcher m = matcher.as(); Matcher next = PatternUtils.head(m.next()); if (next instanceof CharSeqMatcher) { String pattern = m.pattern() + next.<CharSeqMatcher>as().pattern(); ...
[ "static", "Matcher", "combineCharSeqAfterIndexOf", "(", "Matcher", "matcher", ")", "{", "if", "(", "matcher", "instanceof", "IndexOfMatcher", ")", "{", "IndexOfMatcher", "m", "=", "matcher", ".", "as", "(", ")", ";", "Matcher", "next", "=", "PatternUtils", "."...
If a char sequence is adjacent to an index of matcher, then append the sequence to the pattern of the index of matcher.
[ "If", "a", "char", "sequence", "is", "adjacent", "to", "an", "index", "of", "matcher", "then", "append", "the", "sequence", "to", "the", "pattern", "of", "the", "index", "of", "matcher", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/Optimizer.java#L440-L450
lightblue-platform/lightblue-client
core/src/main/java/com/redhat/lightblue/client/Query.java
Query.withStringsIgnoreCase
public static Query withStringsIgnoreCase(String field, String[] values) { """ <pre> { "$or": [{ field: <field>, regex: <^string$>, caseInsensitive: true, ... }, ... ]} </pre> """ return Query.withStrings(field, values, true); }
java
public static Query withStringsIgnoreCase(String field, String[] values) { return Query.withStrings(field, values, true); }
[ "public", "static", "Query", "withStringsIgnoreCase", "(", "String", "field", ",", "String", "[", "]", "values", ")", "{", "return", "Query", ".", "withStrings", "(", "field", ",", "values", ",", "true", ")", ";", "}" ]
<pre> { "$or": [{ field: <field>, regex: <^string$>, caseInsensitive: true, ... }, ... ]} </pre>
[ "<pre", ">", "{", "$or", ":", "[", "{", "field", ":", "<field", ">", "regex", ":", "<^string$", ">", "caseInsensitive", ":", "true", "...", "}", "...", "]", "}", "<", "/", "pre", ">" ]
train
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/core/src/main/java/com/redhat/lightblue/client/Query.java#L237-L239
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.listAsync
public Observable<Page<LabAccountInner>> listAsync(final String expand, final String filter, final Integer top, final String orderby) { """ List lab accounts in a subscription. @param expand Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' @param filter The filter to apply to the ope...
java
public Observable<Page<LabAccountInner>> listAsync(final String expand, final String filter, final Integer top, final String orderby) { return listWithServiceResponseAsync(expand, filter, top, orderby) .map(new Func1<ServiceResponse<Page<LabAccountInner>>, Page<LabAccountInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "LabAccountInner", ">", ">", "listAsync", "(", "final", "String", "expand", ",", "final", "String", "filter", ",", "final", "Integer", "top", ",", "final", "String", "orderby", ")", "{", "return", "listWithServiceRespo...
List lab accounts in a subscription. @param expand Specify the $expand query. Example: 'properties($expand=sizeConfiguration)' @param filter The filter to apply to the operation. @param top The maximum number of resources to return from the operation. @param orderby The ordering expression for the results, using OData...
[ "List", "lab", "accounts", "in", "a", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L276-L284
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/FleetsApi.java
FleetsApi.postFleetsFleetIdMembers
public void postFleetsFleetIdMembers(Long fleetId, String datasource, String token, FleetInvitation fleetInvitation) throws ApiException { """ Create fleet invitation Invite a character into the fleet. If a character has a CSPA charge set it is not possible to invite them to the fleet using ESI --- S...
java
public void postFleetsFleetIdMembers(Long fleetId, String datasource, String token, FleetInvitation fleetInvitation) throws ApiException { postFleetsFleetIdMembersWithHttpInfo(fleetId, datasource, token, fleetInvitation); }
[ "public", "void", "postFleetsFleetIdMembers", "(", "Long", "fleetId", ",", "String", "datasource", ",", "String", "token", ",", "FleetInvitation", "fleetInvitation", ")", "throws", "ApiException", "{", "postFleetsFleetIdMembersWithHttpInfo", "(", "fleetId", ",", "dataso...
Create fleet invitation Invite a character into the fleet. If a character has a CSPA charge set it is not possible to invite them to the fleet using ESI --- SSO Scope: esi-fleets.write_fleet.v1 @param fleetId ID for a fleet (required) @param datasource The server name you would like data from (optional, default to tra...
[ "Create", "fleet", "invitation", "Invite", "a", "character", "into", "the", "fleet", ".", "If", "a", "character", "has", "a", "CSPA", "charge", "set", "it", "is", "not", "possible", "to", "invite", "them", "to", "the", "fleet", "using", "ESI", "---", "SS...
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/FleetsApi.java#L1334-L1337
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingcustomimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customimagesearch/implementation/BingCustomInstancesImpl.java
BingCustomInstancesImpl.imageSearchWithServiceResponseAsync
public Observable<ServiceResponse<Images>> imageSearchWithServiceResponseAsync(long customConfig, String query, ImageSearchOptionalParameter imageSearchOptionalParameter) { """ The Custom Image Search API lets you send an image search query to Bing and get image results found in your custom view of the web. @pa...
java
public Observable<ServiceResponse<Images>> imageSearchWithServiceResponseAsync(long customConfig, String query, ImageSearchOptionalParameter imageSearchOptionalParameter) { if (query == null) { throw new IllegalArgumentException("Parameter query is required and cannot be null."); } f...
[ "public", "Observable", "<", "ServiceResponse", "<", "Images", ">", ">", "imageSearchWithServiceResponseAsync", "(", "long", "customConfig", ",", "String", "query", ",", "ImageSearchOptionalParameter", "imageSearchOptionalParameter", ")", "{", "if", "(", "query", "==", ...
The Custom Image Search API lets you send an image search query to Bing and get image results found in your custom view of the web. @param customConfig The identifier for the custom search configuration @param query The user's search query term. The term cannot be empty. The term may contain [Bing Advanced Operators](...
[ "The", "Custom", "Image", "Search", "API", "lets", "you", "send", "an", "image", "search", "query", "to", "Bing", "and", "get", "image", "results", "found", "in", "your", "custom", "view", "of", "the", "web", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingcustomimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customimagesearch/implementation/BingCustomInstancesImpl.java#L127-L160
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.permutationInverse
public static void permutationInverse( int []original , int []inverse , int length ) { """ Computes the inverse permutation vector @param original Original permutation vector @param inverse It's inverse """ for (int i = 0; i < length; i++) { inverse[original[i]] = i; } }
java
public static void permutationInverse( int []original , int []inverse , int length ) { for (int i = 0; i < length; i++) { inverse[original[i]] = i; } }
[ "public", "static", "void", "permutationInverse", "(", "int", "[", "]", "original", ",", "int", "[", "]", "inverse", ",", "int", "length", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "inverse", "...
Computes the inverse permutation vector @param original Original permutation vector @param inverse It's inverse
[ "Computes", "the", "inverse", "permutation", "vector" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L867-L871
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.isInstanceOf
public static void isInstanceOf(Object obj, Class<?> type, Supplier<String> message) { """ Asserts that the given {@link Object} is an instance of the specified {@link Class type}. The assertion holds if and only if the {@link Object} is not {@literal null} and is an instance of the specified {@link Class type...
java
public static void isInstanceOf(Object obj, Class<?> type, Supplier<String> message) { if (isNotInstanceOf(obj, type)) { throw new IllegalTypeException(message.get()); } }
[ "public", "static", "void", "isInstanceOf", "(", "Object", "obj", ",", "Class", "<", "?", ">", "type", ",", "Supplier", "<", "String", ">", "message", ")", "{", "if", "(", "isNotInstanceOf", "(", "obj", ",", "type", ")", ")", "{", "throw", "new", "Il...
Asserts that the given {@link Object} is an instance of the specified {@link Class type}. The assertion holds if and only if the {@link Object} is not {@literal null} and is an instance of the specified {@link Class type}. This assertion functions exactly the same as the Java {@literal instanceof} operator. @param o...
[ "Asserts", "that", "the", "given", "{", "@link", "Object", "}", "is", "an", "instance", "of", "the", "specified", "{", "@link", "Class", "type", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L738-L742
alkacon/opencms-core
src/org/opencms/jsp/decorator/CmsHtmlDecorator.java
CmsHtmlDecorator.doDecoration
public String doDecoration(String html, String encoding) throws Exception { """ Processes a HTML string and adds text decorations according to the decoration configuration.<p> @param html a string holding the HTML code that should be added with text decorations @param encoding the encoding to be used @return ...
java
public String doDecoration(String html, String encoding) throws Exception { return process(html, encoding); }
[ "public", "String", "doDecoration", "(", "String", "html", ",", "String", "encoding", ")", "throws", "Exception", "{", "return", "process", "(", "html", ",", "encoding", ")", ";", "}" ]
Processes a HTML string and adds text decorations according to the decoration configuration.<p> @param html a string holding the HTML code that should be added with text decorations @param encoding the encoding to be used @return a HTML string with the decorations added. @throws Exception if something goes wrong
[ "Processes", "a", "HTML", "string", "and", "adds", "text", "decorations", "according", "to", "the", "decoration", "configuration", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/decorator/CmsHtmlDecorator.java#L236-L239
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/targetencoding/TargetEncoder.java
TargetEncoder.applyTargetEncoding
public Frame applyTargetEncoding(Frame data, String targetColumnName, Map<String, Frame> targetEncodingMap, byte dataLeakageHandlingStrategy, String foldColumn, ...
java
public Frame applyTargetEncoding(Frame data, String targetColumnName, Map<String, Frame> targetEncodingMap, byte dataLeakageHandlingStrategy, String foldColumn, ...
[ "public", "Frame", "applyTargetEncoding", "(", "Frame", "data", ",", "String", "targetColumnName", ",", "Map", "<", "String", ",", "Frame", ">", "targetEncodingMap", ",", "byte", "dataLeakageHandlingStrategy", ",", "String", "foldColumn", ",", "boolean", "withBlende...
Overloaded for the case when user had not specified the noise parameter
[ "Overloaded", "for", "the", "case", "when", "user", "had", "not", "specified", "the", "noise", "parameter" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/targetencoding/TargetEncoder.java#L706-L719
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodRequest.java
PutMethodRequest.withRequestModels
public PutMethodRequest withRequestModels(java.util.Map<String, String> requestModels) { """ <p> Specifies the <a>Model</a> resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a <a>Model</a> name as the value. </p> @param reques...
java
public PutMethodRequest withRequestModels(java.util.Map<String, String> requestModels) { setRequestModels(requestModels); return this; }
[ "public", "PutMethodRequest", "withRequestModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestModels", ")", "{", "setRequestModels", "(", "requestModels", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the <a>Model</a> resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a <a>Model</a> name as the value. </p> @param requestModels Specifies the <a>Model</a> resources used for the request's content type. Request models are re...
[ "<p", ">", "Specifies", "the", "<a", ">", "Model<", "/", "a", ">", "resources", "used", "for", "the", "request", "s", "content", "type", ".", "Request", "models", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content", "typ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodRequest.java#L573-L576
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/ImagesInner.java
ImagesInner.getByResourceGroupAsync
public Observable<ImageInner> getByResourceGroupAsync(String resourceGroupName, String imageName, String expand) { """ Gets an image. @param resourceGroupName The name of the resource group. @param imageName The name of the image. @param expand The expand expression to apply on the operation. @throws Illegal...
java
public Observable<ImageInner> getByResourceGroupAsync(String resourceGroupName, String imageName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, imageName, expand).map(new Func1<ServiceResponse<ImageInner>, ImageInner>() { @Override public ImageInne...
[ "public", "Observable", "<", "ImageInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "imageName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "imageName"...
Gets an image. @param resourceGroupName The name of the resource group. @param imageName The name of the image. @param expand The expand expression to apply on the operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ImageInner object
[ "Gets", "an", "image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/ImagesInner.java#L552-L559
protostuff/protostuff
protostuff-compiler/src/main/java/io/protostuff/compiler/CompilerMain.java
CompilerMain.newOptions
public static Properties newOptions(Properties props, String key) { """ Returns an option ({@link Properties}) that contains the csv entries. """ Properties options = new Properties(); String csv = props.getProperty(key); if (csv != null) addOptionsTo(options, COMMA.sp...
java
public static Properties newOptions(Properties props, String key) { Properties options = new Properties(); String csv = props.getProperty(key); if (csv != null) addOptionsTo(options, COMMA.split(csv), props); return options; }
[ "public", "static", "Properties", "newOptions", "(", "Properties", "props", ",", "String", "key", ")", "{", "Properties", "options", "=", "new", "Properties", "(", ")", ";", "String", "csv", "=", "props", ".", "getProperty", "(", "key", ")", ";", "if", "...
Returns an option ({@link Properties}) that contains the csv entries.
[ "Returns", "an", "option", "(", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-compiler/src/main/java/io/protostuff/compiler/CompilerMain.java#L627-L636
virgo47/javasimon
spring/src/main/java/org/javasimon/spring/MonitoringInterceptor.java
MonitoringInterceptor.processInvoke
protected Object processInvoke(MethodInvocation invocation, Split split) throws Throwable { """ Method stops the split @param invocation method invocation @param split running split for this monitored action @return return object from the method """ try { return invocation.proceed(); } catch (Throw...
java
protected Object processInvoke(MethodInvocation invocation, Split split) throws Throwable { try { return invocation.proceed(); } catch (Throwable t) { split.stop(tagByExceptionType ? t.getClass().getSimpleName() : EXCEPTION_TAG); throw t; } }
[ "protected", "Object", "processInvoke", "(", "MethodInvocation", "invocation", ",", "Split", "split", ")", "throws", "Throwable", "{", "try", "{", "return", "invocation", ".", "proceed", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "split", ...
Method stops the split @param invocation method invocation @param split running split for this monitored action @return return object from the method
[ "Method", "stops", "the", "split" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/spring/src/main/java/org/javasimon/spring/MonitoringInterceptor.java#L59-L66
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSNode.java
GBSNode.findIndex
private void findIndex( int lower, int upper, Object new1, NodeInsertPoint point) { """ Find the insert point for a new key. <p>Find the insert point for a new key. This method finds the point AFTER which the new key should be inserted. The key does not n...
java
private void findIndex( int lower, int upper, Object new1, NodeInsertPoint point) { int nkeys = numKeys(lower, upper); if (nkeys < 4) sequentialFindIndex(lower, upper, new1, point); else binaryFindIndex(lower, upper, new1, point); }
[ "private", "void", "findIndex", "(", "int", "lower", ",", "int", "upper", ",", "Object", "new1", ",", "NodeInsertPoint", "point", ")", "{", "int", "nkeys", "=", "numKeys", "(", "lower", ",", "upper", ")", ";", "if", "(", "nkeys", "<", "4", ")", "sequ...
Find the insert point for a new key. <p>Find the insert point for a new key. This method finds the point AFTER which the new key should be inserted. The key does not need to be bounded by the node value and duplicates are allowed. If the new key is less than the lowest value already in the node, -1 is returned as th...
[ "Find", "the", "insert", "point", "for", "a", "new", "key", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSNode.java#L681-L692
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSType.java
JSType.getTypesUnderShallowInequality
public TypePair getTypesUnderShallowInequality(JSType that) { """ Computes the subset of {@code this} and {@code that} types under shallow inequality. @return A pair containing the restricted type of {@code this} as the first component and the restricted type of {@code that} as the second element. The return...
java
public TypePair getTypesUnderShallowInequality(JSType that) { // union types if (that.isUnionType()) { TypePair p = that.toMaybeUnionType().getTypesUnderShallowInequality(this); return new TypePair(p.typeB, p.typeA); } // Other types. // There are only two types whose shallow inequality...
[ "public", "TypePair", "getTypesUnderShallowInequality", "(", "JSType", "that", ")", "{", "// union types", "if", "(", "that", ".", "isUnionType", "(", ")", ")", "{", "TypePair", "p", "=", "that", ".", "toMaybeUnionType", "(", ")", ".", "getTypesUnderShallowInequ...
Computes the subset of {@code this} and {@code that} types under shallow inequality. @return A pair containing the restricted type of {@code this} as the first component and the restricted type of {@code that} as the second element. The returned pair is never {@code null} even though its components may be {@code null}
[ "Computes", "the", "subset", "of", "{", "@code", "this", "}", "and", "{", "@code", "that", "}", "types", "under", "shallow", "inequality", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSType.java#L1433-L1448
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginGetTroubleshootingResult
public TroubleshootingResultInner beginGetTroubleshootingResult(String resourceGroupName, String networkWatcherName, String targetResourceId) { """ Get the last completed troubleshooting result on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name ...
java
public TroubleshootingResultInner beginGetTroubleshootingResult(String resourceGroupName, String networkWatcherName, String targetResourceId) { return beginGetTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().single().body(); }
[ "public", "TroubleshootingResultInner", "beginGetTroubleshootingResult", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "targetResourceId", ")", "{", "return", "beginGetTroubleshootingResultWithServiceResponseAsync", "(", "resourceGroupName"...
Get the last completed troubleshooting result on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher resource. @param targetResourceId The target resource ID to query the troubleshooting result. @throws IllegalArgumentException thrown...
[ "Get", "the", "last", "completed", "troubleshooting", "result", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1708-L1710
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/TargetsApi.java
TargetsApi.savePersonalFavorite
public void savePersonalFavorite(Target target, String category) throws WorkspaceApiException { """ Save a target to the agent's personal favorites in the specified category. @param target The target to save. @param category The agent's personal favorites category. """ TargetspersonalfavoritessaveDa...
java
public void savePersonalFavorite(Target target, String category) throws WorkspaceApiException { TargetspersonalfavoritessaveData data = new TargetspersonalfavoritessaveData(); data.setCategory(category); data.setTarget(toInformation(target)); PersonalFavoriteData favData = new Person...
[ "public", "void", "savePersonalFavorite", "(", "Target", "target", ",", "String", "category", ")", "throws", "WorkspaceApiException", "{", "TargetspersonalfavoritessaveData", "data", "=", "new", "TargetspersonalfavoritessaveData", "(", ")", ";", "data", ".", "setCategor...
Save a target to the agent's personal favorites in the specified category. @param target The target to save. @param category The agent's personal favorites category.
[ "Save", "a", "target", "to", "the", "agent", "s", "personal", "favorites", "in", "the", "specified", "category", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/TargetsApi.java#L266-L280
tvesalainen/util
util/src/main/java/org/vesalainen/math/Vectors.java
Vectors.isCounterClockwise
public static final boolean isCounterClockwise(double ox, double oy, double x1, double y1, double x2, double y2) { """ Returns true if vector (x2, y2) is clockwise of (x1, y1) in (ox, oy) centered coordinate. @param ox @param oy @param x1 @param y1 @param x2 @param y2 @return """ return isCoun...
java
public static final boolean isCounterClockwise(double ox, double oy, double x1, double y1, double x2, double y2) { return isCounterClockwise(x1-ox, y1-oy, x2-ox, y2-oy); }
[ "public", "static", "final", "boolean", "isCounterClockwise", "(", "double", "ox", ",", "double", "oy", ",", "double", "x1", ",", "double", "y1", ",", "double", "x2", ",", "double", "y2", ")", "{", "return", "isCounterClockwise", "(", "x1", "-", "ox", ",...
Returns true if vector (x2, y2) is clockwise of (x1, y1) in (ox, oy) centered coordinate. @param ox @param oy @param x1 @param y1 @param x2 @param y2 @return
[ "Returns", "true", "if", "vector", "(", "x2", "y2", ")", "is", "clockwise", "of", "(", "x1", "y1", ")", "in", "(", "ox", "oy", ")", "centered", "coordinate", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/Vectors.java#L76-L79
kaazing/java.client
ws/ws/src/main/java/org/kaazing/gateway/client/util/WrappedByteBuffer.java
WrappedByteBuffer.putShortAt
public WrappedByteBuffer putShortAt(int index, short v) { """ Puts a two-byte short into the buffer at the specified index. @param index the index @param v the two-byte short @return the buffer """ _checkForWriteAt(index, 2); _buf.putShort(index, v); return this; }
java
public WrappedByteBuffer putShortAt(int index, short v) { _checkForWriteAt(index, 2); _buf.putShort(index, v); return this; }
[ "public", "WrappedByteBuffer", "putShortAt", "(", "int", "index", ",", "short", "v", ")", "{", "_checkForWriteAt", "(", "index", ",", "2", ")", ";", "_buf", ".", "putShort", "(", "index", ",", "v", ")", ";", "return", "this", ";", "}" ]
Puts a two-byte short into the buffer at the specified index. @param index the index @param v the two-byte short @return the buffer
[ "Puts", "a", "two", "-", "byte", "short", "into", "the", "buffer", "at", "the", "specified", "index", "." ]
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/util/WrappedByteBuffer.java#L440-L444
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java
MediaRow.setData
public void setData(BufferedImage image, String imageFormat, Float quality) throws IOException { """ Set the data from an image with optional quality @param image image @param imageFormat image format @param quality null or quality between 0.0 and 1.0 @throws IOException upon failure @since 3.2.0 ...
java
public void setData(BufferedImage image, String imageFormat, Float quality) throws IOException { setData(ImageUtils.writeImageToBytes(image, imageFormat, quality)); }
[ "public", "void", "setData", "(", "BufferedImage", "image", ",", "String", "imageFormat", ",", "Float", "quality", ")", "throws", "IOException", "{", "setData", "(", "ImageUtils", ".", "writeImageToBytes", "(", "image", ",", "imageFormat", ",", "quality", ")", ...
Set the data from an image with optional quality @param image image @param imageFormat image format @param quality null or quality between 0.0 and 1.0 @throws IOException upon failure @since 3.2.0
[ "Set", "the", "data", "from", "an", "image", "with", "optional", "quality" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java#L162-L165
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetRouteResult.java
GetRouteResult.withRequestModels
public GetRouteResult withRequestModels(java.util.Map<String, String> requestModels) { """ <p> The request models for the route. </p> @param requestModels The request models for the route. @return Returns a reference to this object so that method calls can be chained together. """ setRequestMode...
java
public GetRouteResult withRequestModels(java.util.Map<String, String> requestModels) { setRequestModels(requestModels); return this; }
[ "public", "GetRouteResult", "withRequestModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestModels", ")", "{", "setRequestModels", "(", "requestModels", ")", ";", "return", "this", ";", "}" ]
<p> The request models for the route. </p> @param requestModels The request models for the route. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "request", "models", "for", "the", "route", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetRouteResult.java#L486-L489
mojohaus/flatten-maven-plugin
src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java
FlattenMojo.extractHeaderComment
protected String extractHeaderComment( File xmlFile ) throws MojoExecutionException { """ This method extracts the XML header comment if available. @param xmlFile is the XML {@link File} to parse. @return the XML comment between the XML header declaration and the root tag or <code>null</code> if NOT a...
java
protected String extractHeaderComment( File xmlFile ) throws MojoExecutionException { try { SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); SaxHeaderCommentHandler handler = new SaxHeaderCommentHandler(); parser.setProperty( "http://xml....
[ "protected", "String", "extractHeaderComment", "(", "File", "xmlFile", ")", "throws", "MojoExecutionException", "{", "try", "{", "SAXParser", "parser", "=", "SAXParserFactory", ".", "newInstance", "(", ")", ".", "newSAXParser", "(", ")", ";", "SaxHeaderCommentHandle...
This method extracts the XML header comment if available. @param xmlFile is the XML {@link File} to parse. @return the XML comment between the XML header declaration and the root tag or <code>null</code> if NOT available. @throws MojoExecutionException if anything goes wrong.
[ "This", "method", "extracts", "the", "XML", "header", "comment", "if", "available", "." ]
train
https://github.com/mojohaus/flatten-maven-plugin/blob/df25d03a4d6c06c4de5cfd9f52dfbe72e823e403/src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java#L356-L372
ben-manes/caffeine
caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/ConcurrentHashMapV7.java
ConcurrentHashMapV7.replace
@Override public boolean replace(K key, V oldValue, V newValue) { """ {@inheritDoc} @throws NullPointerException if any of the arguments are null """ int hash = hash(key); if (oldValue == null || newValue == null) { throw new NullPointerException(); } Segment<K,...
java
@Override public boolean replace(K key, V oldValue, V newValue) { int hash = hash(key); if (oldValue == null || newValue == null) { throw new NullPointerException(); } Segment<K,V> s = segmentForHash(hash); return s != null && s.replace(key, hash, oldValue, newValue...
[ "@", "Override", "public", "boolean", "replace", "(", "K", "key", ",", "V", "oldValue", ",", "V", "newValue", ")", "{", "int", "hash", "=", "hash", "(", "key", ")", ";", "if", "(", "oldValue", "==", "null", "||", "newValue", "==", "null", ")", "{",...
{@inheritDoc} @throws NullPointerException if any of the arguments are null
[ "{", "@inheritDoc", "}" ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/ConcurrentHashMapV7.java#L1269-L1277
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/WikipediaXMLWriter.java
WikipediaXMLWriter.writeDiff
public void writeDiff(final Task<Diff> diff, final int start) throws IOException { """ Writes a part of the diff task, starting with the given element, to the output using wikipedia xml notation. @param diff Reference to a diff task @param start Position of the start element @throws IOException if an er...
java
public void writeDiff(final Task<Diff> diff, final int start) throws IOException { int size = diff.size(); Diff d; String previousRevision = null, currentRevision = null; this.writer .write(WikipediaXMLKeys.KEY_START_PAGE.getKeyword() + "\r\n"); ArticleInformation header = diff.getHeader(); this....
[ "public", "void", "writeDiff", "(", "final", "Task", "<", "Diff", ">", "diff", ",", "final", "int", "start", ")", "throws", "IOException", "{", "int", "size", "=", "diff", ".", "size", "(", ")", ";", "Diff", "d", ";", "String", "previousRevision", "=",...
Writes a part of the diff task, starting with the given element, to the output using wikipedia xml notation. @param diff Reference to a diff task @param start Position of the start element @throws IOException if an error occurs while writing the output
[ "Writes", "a", "part", "of", "the", "diff", "task", "starting", "with", "the", "given", "element", "to", "the", "output", "using", "wikipedia", "xml", "notation", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/WikipediaXMLWriter.java#L89-L155
beders/Resty
src/main/java/us/monoid/json/JSONObject.java
JSONObject.putOpt
public JSONObject putOpt(Enum<?> key, Object value) throws JSONException { """ Put a key/value pair in the JSONObject, but only if the key and the value are both non-null. @param key A key string. @param value An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONA...
java
public JSONObject putOpt(Enum<?> key, Object value) throws JSONException { return putOpt(key.name(), value); }
[ "public", "JSONObject", "putOpt", "(", "Enum", "<", "?", ">", "key", ",", "Object", "value", ")", "throws", "JSONException", "{", "return", "putOpt", "(", "key", ".", "name", "(", ")", ",", "value", ")", ";", "}" ]
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null. @param key A key string. @param value An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or the JSONObject.NULL object. @return this. @throws JSONEx...
[ "Put", "a", "key", "/", "value", "pair", "in", "the", "JSONObject", "but", "only", "if", "the", "key", "and", "the", "value", "are", "both", "non", "-", "null", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/json/JSONObject.java#L1571-L1573
Mthwate/DatLib
src/main/java/com/mthwate/datlib/PropertyUtils.java
PropertyUtils.getProperty
public static String getProperty(File file, String key, String defaultValue) { """ Retrieves a value from a properties file. @since 1.2 @param file the properties file @param key the property key @param defaultValue the fallback value to use @return the value retrieved with the supplied key """ String...
java
public static String getProperty(File file, String key, String defaultValue) { String property = null; try { property = PropertiesFactory.load(file).getProperty(key); } catch (IOException e) {} return property == null ? defaultValue : property; }
[ "public", "static", "String", "getProperty", "(", "File", "file", ",", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "property", "=", "null", ";", "try", "{", "property", "=", "PropertiesFactory", ".", "load", "(", "file", ")", ".", ...
Retrieves a value from a properties file. @since 1.2 @param file the properties file @param key the property key @param defaultValue the fallback value to use @return the value retrieved with the supplied key
[ "Retrieves", "a", "value", "from", "a", "properties", "file", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/PropertyUtils.java#L63-L69
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/service/DenyPostServiceImpl.java
DenyPostServiceImpl.process
@Override public void process(SlingHttpServletRequest request, List<Modification> changes) throws ResourceNotFoundException { """ We check whether the resource path matches a configurable set of paths (configured via regex). If it matches, this request is forbidden, and we throw an exception. """ ...
java
@Override public void process(SlingHttpServletRequest request, List<Modification> changes) throws ResourceNotFoundException { if (!deniedPathList.isEmpty()) { Resource resource = request.getResource(); String path = resource != null ? resource.getPath() : null; if (path !...
[ "@", "Override", "public", "void", "process", "(", "SlingHttpServletRequest", "request", ",", "List", "<", "Modification", ">", "changes", ")", "throws", "ResourceNotFoundException", "{", "if", "(", "!", "deniedPathList", ".", "isEmpty", "(", ")", ")", "{", "R...
We check whether the resource path matches a configurable set of paths (configured via regex). If it matches, this request is forbidden, and we throw an exception.
[ "We", "check", "whether", "the", "resource", "path", "matches", "a", "configurable", "set", "of", "paths", "(", "configured", "via", "regex", ")", ".", "If", "it", "matches", "this", "request", "is", "forbidden", "and", "we", "throw", "an", "exception", "....
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/service/DenyPostServiceImpl.java#L54-L68
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java
JournalRecoveryLog.writeMapValues
private <T> String writeMapValues(String mapName, MultiValueMap<T> map) { """ Helper for the {@link #log(ConsumerJournalEntry)} method. Writes the values of a context multi-map. """ StringBuffer buffer = new StringBuffer(); buffer.append(" " + mapName + "\n"); for (Iterator<T> n...
java
private <T> String writeMapValues(String mapName, MultiValueMap<T> map) { StringBuffer buffer = new StringBuffer(); buffer.append(" " + mapName + "\n"); for (Iterator<T> names = map.names(); names.hasNext();) { T name = names.next(); buffer.append(" ").a...
[ "private", "<", "T", ">", "String", "writeMapValues", "(", "String", "mapName", ",", "MultiValueMap", "<", "T", ">", "map", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\" \"", "+", ...
Helper for the {@link #log(ConsumerJournalEntry)} method. Writes the values of a context multi-map.
[ "Helper", "for", "the", "{" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L207-L219
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/messageml/markdown/MarkdownRenderer.java
MarkdownRenderer.visitChildren
private void visitChildren(Node parent, Collection<Class<? extends Node>> includeNodes) { """ Recursively visit the children of the node, processing only those specified by the parameter "includeNodes". """ Node child = parent.getFirstChild(); while (child != null) { // A subclass of this visitor...
java
private void visitChildren(Node parent, Collection<Class<? extends Node>> includeNodes) { Node child = parent.getFirstChild(); while (child != null) { // A subclass of this visitor might modify the node, resulting in getNext returning a different node or no // node after visiting it. So get the next...
[ "private", "void", "visitChildren", "(", "Node", "parent", ",", "Collection", "<", "Class", "<", "?", "extends", "Node", ">", ">", "includeNodes", ")", "{", "Node", "child", "=", "parent", ".", "getFirstChild", "(", ")", ";", "while", "(", "child", "!=",...
Recursively visit the children of the node, processing only those specified by the parameter "includeNodes".
[ "Recursively", "visit", "the", "children", "of", "the", "node", "processing", "only", "those", "specified", "by", "the", "parameter", "includeNodes", "." ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/markdown/MarkdownRenderer.java#L341-L354
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeUploadPhotoRequestAsync
@Deprecated public static RequestAsyncTask executeUploadPhotoRequestAsync(Session session, File file, Callback callback) throws FileNotFoundException { """ Starts a new Request configured to upload a photo to the user's default photo album. The photo will be read from the specified stream. <p/> ...
java
@Deprecated public static RequestAsyncTask executeUploadPhotoRequestAsync(Session session, File file, Callback callback) throws FileNotFoundException { return newUploadPhotoRequest(session, file, callback).executeAsync(); }
[ "@", "Deprecated", "public", "static", "RequestAsyncTask", "executeUploadPhotoRequestAsync", "(", "Session", "session", ",", "File", "file", ",", "Callback", "callback", ")", "throws", "FileNotFoundException", "{", "return", "newUploadPhotoRequest", "(", "session", ",",...
Starts a new Request configured to upload a photo to the user's default photo album. The photo will be read from the specified stream. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Request.newUploadPhotoRequest(...).executeAsync(); @param session the Session to use, or...
[ "Starts", "a", "new", "Request", "configured", "to", "upload", "a", "photo", "to", "the", "user", "s", "default", "photo", "album", ".", "The", "photo", "will", "be", "read", "from", "the", "specified", "stream", ".", "<p", "/", ">", "This", "should", ...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1171-L1175
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/boosting/Bagging.java
Bagging.getSampledDataSet
public static RegressionDataSet getSampledDataSet(RegressionDataSet dataSet, int[] sampledCounts) { """ Creates a new data set from the given sample counts. Points sampled multiple times will have multiple entries in the data set. @param dataSet the data set that was sampled from @param sampledCounts the sampli...
java
public static RegressionDataSet getSampledDataSet(RegressionDataSet dataSet, int[] sampledCounts) { RegressionDataSet destination = new RegressionDataSet(dataSet.getNumNumericalVars(), dataSet.getCategories()); for (int i = 0; i < sampledCounts.length; i++) for (int j = 0; j < sampledCou...
[ "public", "static", "RegressionDataSet", "getSampledDataSet", "(", "RegressionDataSet", "dataSet", ",", "int", "[", "]", "sampledCounts", ")", "{", "RegressionDataSet", "destination", "=", "new", "RegressionDataSet", "(", "dataSet", ".", "getNumNumericalVars", "(", ")...
Creates a new data set from the given sample counts. Points sampled multiple times will have multiple entries in the data set. @param dataSet the data set that was sampled from @param sampledCounts the sampling values obtained from {@link #sampleWithReplacement(int[], int, java.util.Random) } @return a new sampled clas...
[ "Creates", "a", "new", "data", "set", "from", "the", "given", "sample", "counts", ".", "Points", "sampled", "multiple", "times", "will", "have", "multiple", "entries", "in", "the", "data", "set", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/boosting/Bagging.java#L324-L334
nextreports/nextreports-engine
src/ro/nextreports/engine/util/DateUtil.java
DateUtil.addDays
public static Date addDays(Date d, int days) { """ Add days to a date @param d date @param days days @return new date """ Calendar cal = Calendar.getInstance(); cal.setTime(d); cal.add(Calendar.DAY_OF_YEAR, days); return cal.getTime(); }
java
public static Date addDays(Date d, int days) { Calendar cal = Calendar.getInstance(); cal.setTime(d); cal.add(Calendar.DAY_OF_YEAR, days); return cal.getTime(); }
[ "public", "static", "Date", "addDays", "(", "Date", "d", ",", "int", "days", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "d", ")", ";", "cal", ".", "add", "(", "Calendar", ".", "DAY_O...
Add days to a date @param d date @param days days @return new date
[ "Add", "days", "to", "a", "date" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/DateUtil.java#L483-L488
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.readRules
protected RuleSet readRules(MavenProject rootModule) throws MojoExecutionException { """ Reads the available rules from the rules directory and deployed catalogs. @return A rule set. . @throws MojoExecutionException If the rules cannot be read. """ List<RuleSource> sources = new ArrayList<>(); ...
java
protected RuleSet readRules(MavenProject rootModule) throws MojoExecutionException { List<RuleSource> sources = new ArrayList<>(); PluginRepository pluginRepository = pluginRepositoryProvider.getPluginRepository(); if (rulesUrl != null) { getLog().debug("Retrieving rules from URL " +...
[ "protected", "RuleSet", "readRules", "(", "MavenProject", "rootModule", ")", "throws", "MojoExecutionException", "{", "List", "<", "RuleSource", ">", "sources", "=", "new", "ArrayList", "<>", "(", ")", ";", "PluginRepository", "pluginRepository", "=", "pluginReposit...
Reads the available rules from the rules directory and deployed catalogs. @return A rule set. . @throws MojoExecutionException If the rules cannot be read.
[ "Reads", "the", "available", "rules", "from", "the", "rules", "directory", "and", "deployed", "catalogs", "." ]
train
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L268-L296
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.createOrUpdate
public LabAccountInner createOrUpdate(String resourceGroupName, String labAccountName, LabAccountInner labAccount) { """ Create or replace an existing Lab Account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab acc...
java
public LabAccountInner createOrUpdate(String resourceGroupName, String labAccountName, LabAccountInner labAccount) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, labAccount).toBlocking().single().body(); }
[ "public", "LabAccountInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "LabAccountInner", "labAccount", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "lab...
Create or replace an existing Lab Account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab account. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is re...
[ "Create", "or", "replace", "an", "existing", "Lab", "Account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L776-L778
di2e/Argo
PluginFramework/src/main/java/ws/argo/probe/Probe.java
Probe.getCombinedIdentifierList
public LinkedList<ProbeIdEntry> getCombinedIdentifierList() { """ Create and return a LinkedList of a combination of both scids and siids. This is a method that is used primarily in the creation of split packets. @return combined LikedList """ LinkedList<ProbeIdEntry> combinedList = new LinkedList<Prob...
java
public LinkedList<ProbeIdEntry> getCombinedIdentifierList() { LinkedList<ProbeIdEntry> combinedList = new LinkedList<ProbeIdEntry>(); for (String id : this.getProbeWrapper().getServiceContractIDs()) { combinedList.add(new ProbeIdEntry("scid", id)); } for (String id : this.getProbeWrapper().getSer...
[ "public", "LinkedList", "<", "ProbeIdEntry", ">", "getCombinedIdentifierList", "(", ")", "{", "LinkedList", "<", "ProbeIdEntry", ">", "combinedList", "=", "new", "LinkedList", "<", "ProbeIdEntry", ">", "(", ")", ";", "for", "(", "String", "id", ":", "this", ...
Create and return a LinkedList of a combination of both scids and siids. This is a method that is used primarily in the creation of split packets. @return combined LikedList
[ "Create", "and", "return", "a", "LinkedList", "of", "a", "combination", "of", "both", "scids", "and", "siids", ".", "This", "is", "a", "method", "that", "is", "used", "primarily", "in", "the", "creation", "of", "split", "packets", "." ]
train
https://github.com/di2e/Argo/blob/f537a03d2d25fdfecda7999ec10e1da67dc3b8f3/PluginFramework/src/main/java/ws/argo/probe/Probe.java#L283-L293
JodaOrg/joda-beans
src/main/java/org/joda/beans/impl/flexi/FlexiBean.java
FlexiBean.putAll
public void putAll(Map<String, ? extends Object> map) { """ Puts the properties in the specified map into this bean. <p> This creates properties if they do not exist. @param map the map of properties to add, not null """ if (map.size() > 0) { for (String key : map.keySet()) { ...
java
public void putAll(Map<String, ? extends Object> map) { if (map.size() > 0) { for (String key : map.keySet()) { if (VALID_KEY.matcher(key).matches() == false) { throw new IllegalArgumentException("Invalid key for FlexiBean: " + key); } ...
[ "public", "void", "putAll", "(", "Map", "<", "String", ",", "?", "extends", "Object", ">", "map", ")", "{", "if", "(", "map", ".", "size", "(", ")", ">", "0", ")", "{", "for", "(", "String", "key", ":", "map", ".", "keySet", "(", ")", ")", "{...
Puts the properties in the specified map into this bean. <p> This creates properties if they do not exist. @param map the map of properties to add, not null
[ "Puts", "the", "properties", "in", "the", "specified", "map", "into", "this", "bean", ".", "<p", ">", "This", "creates", "properties", "if", "they", "do", "not", "exist", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/impl/flexi/FlexiBean.java#L302-L315
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/core/Prefer.java
Prefer.ofInclude
public static Prefer ofInclude(final String... includes) { """ Build a Prefer object with a set of included IRIs. @param includes the IRIs to include @return the Prefer object """ final List<String> iris = asList(includes); if (iris.isEmpty()) { return valueOf(join("=", PREFER_R...
java
public static Prefer ofInclude(final String... includes) { final List<String> iris = asList(includes); if (iris.isEmpty()) { return valueOf(join("=", PREFER_RETURN, PREFER_REPRESENTATION)); } return valueOf(join("=", PREFER_RETURN, PREFER_REPRESENTATION) + "; " + PREFER_INCLU...
[ "public", "static", "Prefer", "ofInclude", "(", "final", "String", "...", "includes", ")", "{", "final", "List", "<", "String", ">", "iris", "=", "asList", "(", "includes", ")", ";", "if", "(", "iris", ".", "isEmpty", "(", ")", ")", "{", "return", "v...
Build a Prefer object with a set of included IRIs. @param includes the IRIs to include @return the Prefer object
[ "Build", "a", "Prefer", "object", "with", "a", "set", "of", "included", "IRIs", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/core/Prefer.java#L161-L168
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java
CassQuery.recursivelyPopulateEntities
@SuppressWarnings("unchecked") @Override protected List<Object> recursivelyPopulateEntities(EntityMetadata m, Client client) { """ (non-Javadoc). @param m the m @param client the client @return the list @see com.impetus.kundera.query.QueryImpl#recursivelyPopulateEntities(com.impetus .kundera.metad...
java
@SuppressWarnings("unchecked") @Override protected List<Object> recursivelyPopulateEntities(EntityMetadata m, Client client) { List<EnhanceEntity> ls = null; ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata(); externalProperties = ((CassandraClientBase) client).ge...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "protected", "List", "<", "Object", ">", "recursivelyPopulateEntities", "(", "EntityMetadata", "m", ",", "Client", "client", ")", "{", "List", "<", "EnhanceEntity", ">", "ls", "=", "null", ";...
(non-Javadoc). @param m the m @param client the client @return the list @see com.impetus.kundera.query.QueryImpl#recursivelyPopulateEntities(com.impetus .kundera.metadata.model.EntityMetadata, com.impetus.kundera.client.Client)
[ "(", "non", "-", "Javadoc", ")", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java#L214-L255
OpenTSDB/opentsdb
src/tsd/HttpSerializer.java
HttpSerializer.formatPutV1
public ChannelBuffer formatPutV1(final Map<String, Object> results) { """ Formats the results of an HTTP data point storage request @param results A map of results. The map will consist of: <ul><li>success - (long) the number of successfully parsed datapoints</li> <li>failed - (long) the number of datapoint par...
java
public ChannelBuffer formatPutV1(final Map<String, Object> results) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatPutV1"); }
[ "public", "ChannelBuffer", "formatPutV1", "(", "final", "Map", "<", "String", ",", "Object", ">", "results", ")", "{", "throw", "new", "BadRequestException", "(", "HttpResponseStatus", ".", "NOT_IMPLEMENTED", ",", "\"The requested API endpoint has not been implemented\"",...
Formats the results of an HTTP data point storage request @param results A map of results. The map will consist of: <ul><li>success - (long) the number of successfully parsed datapoints</li> <li>failed - (long) the number of datapoint parsing failures</li> <li>errors - (ArrayList&lt;HashMap&lt;String, Object&gt;&gt;) a...
[ "Formats", "the", "results", "of", "an", "HTTP", "data", "point", "storage", "request" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpSerializer.java#L392-L397
azkaban/azkaban
az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopProxy.java
HadoopProxy.setupPropsForProxy
public void setupPropsForProxy(Props props, Props jobProps, final Logger logger) throws Exception { """ Setup Job Properties when the proxy is enabled @param props all properties @param jobProps job properties @param logger logger handler """ if (isProxyEnabled()) { userToProxy = jobProps....
java
public void setupPropsForProxy(Props props, Props jobProps, final Logger logger) throws Exception { if (isProxyEnabled()) { userToProxy = jobProps.getString(HadoopSecurityManager.USER_TO_PROXY); logger.info("Need to proxy. Getting tokens."); // get tokens in to a file, and put the location i...
[ "public", "void", "setupPropsForProxy", "(", "Props", "props", ",", "Props", "jobProps", ",", "final", "Logger", "logger", ")", "throws", "Exception", "{", "if", "(", "isProxyEnabled", "(", ")", ")", "{", "userToProxy", "=", "jobProps", ".", "getString", "("...
Setup Job Properties when the proxy is enabled @param props all properties @param jobProps job properties @param logger logger handler
[ "Setup", "Job", "Properties", "when", "the", "proxy", "is", "enabled" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopProxy.java#L76-L85
codeprimate-software/cp-elements
src/main/java/org/cp/elements/process/ProcessContext.java
ProcessContext.ranWith
@NullSafe public ProcessContext ranWith(String... commandLine) { """ Sets the command-line used to execute the {@link Process}. @param commandLine array of elements constituting the command used to executed the {@link Process}. @return this {@link ProcessContext}. @see #ranWith(List) @see #getCommandLine()...
java
@NullSafe public ProcessContext ranWith(String... commandLine) { return ranWith(asList(nullSafeArray(commandLine, String.class))); }
[ "@", "NullSafe", "public", "ProcessContext", "ranWith", "(", "String", "...", "commandLine", ")", "{", "return", "ranWith", "(", "asList", "(", "nullSafeArray", "(", "commandLine", ",", "String", ".", "class", ")", ")", ")", ";", "}" ]
Sets the command-line used to execute the {@link Process}. @param commandLine array of elements constituting the command used to executed the {@link Process}. @return this {@link ProcessContext}. @see #ranWith(List) @see #getCommandLine()
[ "Sets", "the", "command", "-", "line", "used", "to", "execute", "the", "{", "@link", "Process", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/process/ProcessContext.java#L283-L286
simonpercic/CollectionHelper
collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java
CollectionHelper.single
public static <T> T single(Collection<T> items, Predicate<T> predicate) { """ Returns the only element from a collection that matches the given predicate. Throws a {@link InvalidOperationException} if the number of found elements is not exactly 1. @param items source items @param predicate predicate function...
java
public static <T> T single(Collection<T> items, Predicate<T> predicate) { T singleOrNull = singleOrNull(items, predicate); if (singleOrNull == null) { throw new InvalidOperationException("No items match!"); } else { return singleOrNull; } }
[ "public", "static", "<", "T", ">", "T", "single", "(", "Collection", "<", "T", ">", "items", ",", "Predicate", "<", "T", ">", "predicate", ")", "{", "T", "singleOrNull", "=", "singleOrNull", "(", "items", ",", "predicate", ")", ";", "if", "(", "singl...
Returns the only element from a collection that matches the given predicate. Throws a {@link InvalidOperationException} if the number of found elements is not exactly 1. @param items source items @param predicate predicate function @param <T> type of elements in the source collection @return the only element that matc...
[ "Returns", "the", "only", "element", "from", "a", "collection", "that", "matches", "the", "given", "predicate", ".", "Throws", "a", "{", "@link", "InvalidOperationException", "}", "if", "the", "number", "of", "found", "elements", "is", "not", "exactly", "1", ...
train
https://github.com/simonpercic/CollectionHelper/blob/2425390ac14f3b6c0a7b04464cf5670060f2dc54/collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java#L182-L190
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java
BasePanel.setProperties
public void setProperties(Map<String, Object> properties) { """ Set the properties. @param strProperties The properties to set. """ if (this.getTask() != null) this.getTask().setProperties(properties); }
java
public void setProperties(Map<String, Object> properties) { if (this.getTask() != null) this.getTask().setProperties(properties); }
[ "public", "void", "setProperties", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "if", "(", "this", ".", "getTask", "(", ")", "!=", "null", ")", "this", ".", "getTask", "(", ")", ".", "setProperties", "(", "properties", ")", ...
Set the properties. @param strProperties The properties to set.
[ "Set", "the", "properties", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java#L1333-L1337
janus-project/guava.janusproject.io
guava/src/com/google/common/collect/Iterators.java
Iterators.retainAll
public static boolean retainAll( Iterator<?> removeFrom, Collection<?> elementsToRetain) { """ Traverses an iterator and removes every element that does not belong to the provided collection. The iterator will be left exhausted: its {@code hasNext()} method will return {@code false}. @param removeFrom t...
java
public static boolean retainAll( Iterator<?> removeFrom, Collection<?> elementsToRetain) { return removeIf(removeFrom, not(in(elementsToRetain))); }
[ "public", "static", "boolean", "retainAll", "(", "Iterator", "<", "?", ">", "removeFrom", ",", "Collection", "<", "?", ">", "elementsToRetain", ")", "{", "return", "removeIf", "(", "removeFrom", ",", "not", "(", "in", "(", "elementsToRetain", ")", ")", ")"...
Traverses an iterator and removes every element that does not belong to the provided collection. The iterator will be left exhausted: its {@code hasNext()} method will return {@code false}. @param removeFrom the iterator to (potentially) remove elements from @param elementsToRetain the elements to retain @return {@cod...
[ "Traverses", "an", "iterator", "and", "removes", "every", "element", "that", "does", "not", "belong", "to", "the", "provided", "collection", ".", "The", "iterator", "will", "be", "left", "exhausted", ":", "its", "{", "@code", "hasNext", "()", "}", "method", ...
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/collect/Iterators.java#L252-L255
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/script/Script.java
Script.executeCheckLockTimeVerify
private static void executeCheckLockTimeVerify(Transaction txContainingThis, int index, LinkedList<byte[]> stack, Set<VerifyFlag> verifyFlags) throws ScriptException { """ This is more or less a direct translation of the code in Bitcoin Core """ if (stack.size() < 1) throw new ScriptExcepti...
java
private static void executeCheckLockTimeVerify(Transaction txContainingThis, int index, LinkedList<byte[]> stack, Set<VerifyFlag> verifyFlags) throws ScriptException { if (stack.size() < 1) throw new ScriptException(ScriptError.SCRIPT_ERR_INVALID_STACK_OPERATION, "Attempted OP_CHECKLOCKTIMEVERIFY on...
[ "private", "static", "void", "executeCheckLockTimeVerify", "(", "Transaction", "txContainingThis", ",", "int", "index", ",", "LinkedList", "<", "byte", "[", "]", ">", "stack", ",", "Set", "<", "VerifyFlag", ">", "verifyFlags", ")", "throws", "ScriptException", "...
This is more or less a direct translation of the code in Bitcoin Core
[ "This", "is", "more", "or", "less", "a", "direct", "translation", "of", "the", "code", "in", "Bitcoin", "Core" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L1305-L1340
MGunlogson/CuckooFilter4J
src/main/java/com/github/mgunlogson/cuckoofilter4j/SegmentedBucketLocker.java
SegmentedBucketLocker.lockBucketsWrite
void lockBucketsWrite(long i1, long i2) { """ Locks segments corresponding to bucket indexes in specific order to prevent deadlocks """ int bucket1LockIdx = getBucketLock(i1); int bucket2LockIdx = getBucketLock(i2); // always lock segments in same order to avoid deadlocks if (bucket1LockIdx < bucke...
java
void lockBucketsWrite(long i1, long i2) { int bucket1LockIdx = getBucketLock(i1); int bucket2LockIdx = getBucketLock(i2); // always lock segments in same order to avoid deadlocks if (bucket1LockIdx < bucket2LockIdx) { lockAry[bucket1LockIdx].writeLock(); lockAry[bucket2LockIdx].writeLock(); } els...
[ "void", "lockBucketsWrite", "(", "long", "i1", ",", "long", "i2", ")", "{", "int", "bucket1LockIdx", "=", "getBucketLock", "(", "i1", ")", ";", "int", "bucket2LockIdx", "=", "getBucketLock", "(", "i2", ")", ";", "// always lock segments in same order to avoid dead...
Locks segments corresponding to bucket indexes in specific order to prevent deadlocks
[ "Locks", "segments", "corresponding", "to", "bucket", "indexes", "in", "specific", "order", "to", "prevent", "deadlocks" ]
train
https://github.com/MGunlogson/CuckooFilter4J/blob/e8472aa150b201f05046d1c81cac5a5ca4348db8/src/main/java/com/github/mgunlogson/cuckoofilter4j/SegmentedBucketLocker.java#L64-L79
rapid7/conqueso-client-java
src/main/java/com/rapid7/conqueso/client/ConquesoClient.java
ConquesoClient.getRoleInstancesWithMetadata
public ImmutableList<InstanceInfo> getRoleInstancesWithMetadata(String roleName, Map<String, String> metadataQuery) { """ Retrieve information about all online instances of a particular role matching the given metadata query from the Conqueso Server. The metadata query is expressed as key/value pair...
java
public ImmutableList<InstanceInfo> getRoleInstancesWithMetadata(String roleName, Map<String, String> metadataQuery) { checkArgument(!checkNotNull(metadataQuery, "metadataQuery").isEmpty(), "No metadata query arguments specified"); return getRoleInstancesWithMetadataImpl(roleName, metadataQu...
[ "public", "ImmutableList", "<", "InstanceInfo", ">", "getRoleInstancesWithMetadata", "(", "String", "roleName", ",", "Map", "<", "String", ",", "String", ">", "metadataQuery", ")", "{", "checkArgument", "(", "!", "checkNotNull", "(", "metadataQuery", ",", "\"metad...
Retrieve information about all online instances of a particular role matching the given metadata query from the Conqueso Server. The metadata query is expressed as key/value pairs in the provided map. For example, calling this method like this: <p> <code> conquesoClient.getRoleInstancesWithMetadata("reporting-service",...
[ "Retrieve", "information", "about", "all", "online", "instances", "of", "a", "particular", "role", "matching", "the", "given", "metadata", "query", "from", "the", "Conqueso", "Server", ".", "The", "metadata", "query", "is", "expressed", "as", "key", "/", "valu...
train
https://github.com/rapid7/conqueso-client-java/blob/fa4a7a6dbf67e5afe6b4f68cbc97b1929af864e2/src/main/java/com/rapid7/conqueso/client/ConquesoClient.java#L560-L564
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultQueryLogEntryCreator.java
DefaultQueryLogEntryCreator.writeTimeEntry
protected void writeTimeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { """ Write elapsed time. <p>default: Time: 123, The unit of time is determined by underlying {@link net.ttddyy.dsproxy.proxy.Stopwatch} implementation. (milli vs nano seconds) @param sb Stri...
java
protected void writeTimeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("Time:"); sb.append(execInfo.getElapsedTime()); sb.append(", "); }
[ "protected", "void", "writeTimeEntry", "(", "StringBuilder", "sb", ",", "ExecutionInfo", "execInfo", ",", "List", "<", "QueryInfo", ">", "queryInfoList", ")", "{", "sb", ".", "append", "(", "\"Time:\"", ")", ";", "sb", ".", "append", "(", "execInfo", ".", ...
Write elapsed time. <p>default: Time: 123, The unit of time is determined by underlying {@link net.ttddyy.dsproxy.proxy.Stopwatch} implementation. (milli vs nano seconds) @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list @since 1.3.3
[ "Write", "elapsed", "time", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultQueryLogEntryCreator.java#L126-L130
square/jna-gmp
jnagmp/src/main/java/com/squareup/jnagmp/LibGmp.java
LibGmp.__gmpz_import
public static void __gmpz_import(mpz_t rop, int count, int order, int size, int endian, int nails, Pointer buffer) { """ Set rop from an array of word data at op. The parameters specify the format of the data. count many words are read, each size bytes. order can be 1 for most significant word first or -...
java
public static void __gmpz_import(mpz_t rop, int count, int order, int size, int endian, int nails, Pointer buffer) { if (SIZE_T_CLASS == SizeT4.class) { SizeT4.__gmpz_import(rop, count, order, size, endian, nails, buffer); } else { SizeT8.__gmpz_import(rop, count, order, size, endian, nails, b...
[ "public", "static", "void", "__gmpz_import", "(", "mpz_t", "rop", ",", "int", "count", ",", "int", "order", ",", "int", "size", ",", "int", "endian", ",", "int", "nails", ",", "Pointer", "buffer", ")", "{", "if", "(", "SIZE_T_CLASS", "==", "SizeT4", "....
Set rop from an array of word data at op. The parameters specify the format of the data. count many words are read, each size bytes. order can be 1 for most significant word first or -1 for least significant first. Within each word endian can be 1 for most significant byte first, -1 for least significant first, or 0 f...
[ "Set", "rop", "from", "an", "array", "of", "word", "data", "at", "op", "." ]
train
https://github.com/square/jna-gmp/blob/192d26d97d6773bc3c68ccfa97450f4257d54838/jnagmp/src/main/java/com/squareup/jnagmp/LibGmp.java#L200-L207
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuStreamWriteValue32
public static int cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, int value, int flags) { """ Write a value to memory.<br> <br> Write a value to memory. Unless the CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER flag is passed, the write is preceded by a system-wide memory fence, equivalent to a __threadfence...
java
public static int cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, int value, int flags) { return checkResult(cuStreamWriteValue32Native(stream, addr, value, flags)); }
[ "public", "static", "int", "cuStreamWriteValue32", "(", "CUstream", "stream", ",", "CUdeviceptr", "addr", ",", "int", "value", ",", "int", "flags", ")", "{", "return", "checkResult", "(", "cuStreamWriteValue32Native", "(", "stream", ",", "addr", ",", "value", ...
Write a value to memory.<br> <br> Write a value to memory. Unless the CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER flag is passed, the write is preceded by a system-wide memory fence, equivalent to a __threadfence_system() but scoped to the stream rather than a CUDA thread.<br> <br> If the memory was registered via cuMemHos...
[ "Write", "a", "value", "to", "memory", ".", "<br", ">", "<br", ">", "Write", "a", "value", "to", "memory", ".", "Unless", "the", "CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER", "flag", "is", "passed", "the", "write", "is", "preceded", "by", "a", "system", "-", ...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L13724-L13727
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/Counters.java
Counters.findCounter
@Deprecated public synchronized Counter findCounter(String group, int id, String name) { """ Find a counter by using strings @param group the name of the group @param id the id of the counter within the group (0 to N-1) @param name the internal name of the counter @return the counter for that name @deprecat...
java
@Deprecated public synchronized Counter findCounter(String group, int id, String name) { return getGroup(group).getCounterForName(name); }
[ "@", "Deprecated", "public", "synchronized", "Counter", "findCounter", "(", "String", "group", ",", "int", "id", ",", "String", "name", ")", "{", "return", "getGroup", "(", "group", ")", ".", "getCounterForName", "(", "name", ")", ";", "}" ]
Find a counter by using strings @param group the name of the group @param id the id of the counter within the group (0 to N-1) @param name the internal name of the counter @return the counter for that name @deprecated
[ "Find", "a", "counter", "by", "using", "strings" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/Counters.java#L402-L405
zk1931/jzab
src/main/java/com/github/zk1931/jzab/Participant.java
Participant.getAllTxns
List<Transaction> getAllTxns() throws IOException { """ Returns all the transactions appear in log(It's for testing purpose only). @return a list of transactions. """ Log log = this.persistence.getLog(); List<Transaction> txns = new ArrayList<Transaction>(); try(Log.LogIterator iter = log.getIte...
java
List<Transaction> getAllTxns() throws IOException { Log log = this.persistence.getLog(); List<Transaction> txns = new ArrayList<Transaction>(); try(Log.LogIterator iter = log.getIterator(new Zxid(0, 0))) { while(iter.hasNext()) { txns.add(iter.next()); } return txns; } }
[ "List", "<", "Transaction", ">", "getAllTxns", "(", ")", "throws", "IOException", "{", "Log", "log", "=", "this", ".", "persistence", ".", "getLog", "(", ")", ";", "List", "<", "Transaction", ">", "txns", "=", "new", "ArrayList", "<", "Transaction", ">",...
Returns all the transactions appear in log(It's for testing purpose only). @return a list of transactions.
[ "Returns", "all", "the", "transactions", "appear", "in", "log", "(", "It", "s", "for", "testing", "purpose", "only", ")", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/Participant.java#L458-L467
kiegroup/jbpm
jbpm-flow/src/main/java/org/jbpm/process/core/timer/TimerServiceRegistry.java
TimerServiceRegistry.registerTimerService
public void registerTimerService(String id, TimerService timerService) { """ Registers timerServie under given id. In case timer service is already registered with this id it will be overridden. @param id key used to get hold of the timer service instance @param timerService fully initialized TimerService insta...
java
public void registerTimerService(String id, TimerService timerService) { if (timerService instanceof GlobalTimerService) { ((GlobalTimerService) timerService).setTimerServiceId(id); } this.registeredServices.put(id, timerService); }
[ "public", "void", "registerTimerService", "(", "String", "id", ",", "TimerService", "timerService", ")", "{", "if", "(", "timerService", "instanceof", "GlobalTimerService", ")", "{", "(", "(", "GlobalTimerService", ")", "timerService", ")", ".", "setTimerServiceId",...
Registers timerServie under given id. In case timer service is already registered with this id it will be overridden. @param id key used to get hold of the timer service instance @param timerService fully initialized TimerService instance
[ "Registers", "timerServie", "under", "given", "id", ".", "In", "case", "timer", "service", "is", "already", "registered", "with", "this", "id", "it", "will", "be", "overridden", "." ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-flow/src/main/java/org/jbpm/process/core/timer/TimerServiceRegistry.java#L48-L53
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java
NestedMappingHandler.loadNestedMappingInformation
public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class<?> targetClass,String nestedMappingPath, Class<?> sourceClass, Class<?> destinationClass, Field configuredField) { """ This method returns a bean with nested mapping information. @param xml xml configuration @param targetClass class to c...
java
public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class<?> targetClass,String nestedMappingPath, Class<?> sourceClass, Class<?> destinationClass, Field configuredField){ boolean isSourceClass = targetClass == sourceClass; NestedMappingInfo info = new NestedMappingInfo(isSourceClass); ...
[ "public", "static", "NestedMappingInfo", "loadNestedMappingInformation", "(", "XML", "xml", ",", "Class", "<", "?", ">", "targetClass", ",", "String", "nestedMappingPath", ",", "Class", "<", "?", ">", "sourceClass", ",", "Class", "<", "?", ">", "destinationClass...
This method returns a bean with nested mapping information. @param xml xml configuration @param targetClass class to check @param nestedMappingPath path that define nested mapping @param sourceClass sourceClass used to indentify nested mapping @param destinationClass destinationClass used to indentify nested mapping @p...
[ "This", "method", "returns", "a", "bean", "with", "nested", "mapping", "information", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java#L128-L183
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/cache/ElementCollectionCacheManager.java
ElementCollectionCacheManager.getElementCollectionObjectName
public String getElementCollectionObjectName(Object rowKey, Object elementCollectionObject) { """ Gets the element collection object name. @param rowKey the row key @param elementCollectionObject the element collection object @return the element collection object name """ if (getElementCollecti...
java
public String getElementCollectionObjectName(Object rowKey, Object elementCollectionObject) { if (getElementCollectionCache().isEmpty() || getElementCollectionCache().get(rowKey) == null) { log.debug("No element collection object map found in cache for Row key " + rowKey); ...
[ "public", "String", "getElementCollectionObjectName", "(", "Object", "rowKey", ",", "Object", "elementCollectionObject", ")", "{", "if", "(", "getElementCollectionCache", "(", ")", ".", "isEmpty", "(", ")", "||", "getElementCollectionCache", "(", ")", ".", "get", ...
Gets the element collection object name. @param rowKey the row key @param elementCollectionObject the element collection object @return the element collection object name
[ "Gets", "the", "element", "collection", "object", "name", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/cache/ElementCollectionCacheManager.java#L132-L165
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.multRows
public static void multRows(double[] diag, int offset, DMatrixSparseCSC A) { """ Multiply all elements of row 'i' by value[i]. A[i,:] *= values[i] @param diag (Input) multiplication factors @param offset (Input) First index in values @param A (Input/Output) Matrix. Modified. """ if( diag.length < ...
java
public static void multRows(double[] diag, int offset, DMatrixSparseCSC A) { if( diag.length < A.numRows ) throw new IllegalArgumentException("Array is too small. "+diag.length+" < "+A.numCols); for (int i = 0; i < A.nz_length; i++) { A.nz_values[i] *= diag[A.nz_rows[i+offset]];...
[ "public", "static", "void", "multRows", "(", "double", "[", "]", "diag", ",", "int", "offset", ",", "DMatrixSparseCSC", "A", ")", "{", "if", "(", "diag", ".", "length", "<", "A", ".", "numRows", ")", "throw", "new", "IllegalArgumentException", "(", "\"Ar...
Multiply all elements of row 'i' by value[i]. A[i,:] *= values[i] @param diag (Input) multiplication factors @param offset (Input) First index in values @param A (Input/Output) Matrix. Modified.
[ "Multiply", "all", "elements", "of", "row", "i", "by", "value", "[", "i", "]", ".", "A", "[", "i", ":", "]", "*", "=", "values", "[", "i", "]" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1783-L1790
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
BeanUtil.fillBeanWithMap
public static <T> T fillBeanWithMap(Map<?, ?> map, T bean, boolean isToCamelCase, boolean isIgnoreError) { """ 使用Map填充Bean对象,可配置将下划线转换为驼峰 @param <T> Bean类型 @param map Map @param bean Bean @param isToCamelCase 是否将下划线模式转换为驼峰模式 @param isIgnoreError 是否忽略注入错误 @return Bean """ return fillBeanWithMap(map, ...
java
public static <T> T fillBeanWithMap(Map<?, ?> map, T bean, boolean isToCamelCase, boolean isIgnoreError) { return fillBeanWithMap(map, bean, isToCamelCase, CopyOptions.create().setIgnoreError(isIgnoreError)); }
[ "public", "static", "<", "T", ">", "T", "fillBeanWithMap", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "T", "bean", ",", "boolean", "isToCamelCase", ",", "boolean", "isIgnoreError", ")", "{", "return", "fillBeanWithMap", "(", "map", ",", "bean", "...
使用Map填充Bean对象,可配置将下划线转换为驼峰 @param <T> Bean类型 @param map Map @param bean Bean @param isToCamelCase 是否将下划线模式转换为驼峰模式 @param isIgnoreError 是否忽略注入错误 @return Bean
[ "使用Map填充Bean对象,可配置将下划线转换为驼峰" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L382-L384
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/QueryParserBase.java
QueryParserBase.createQueryStringFromNode
@Deprecated public String createQueryStringFromNode(Node node, int position) { """ Create the plain query string representation of the given node. @param node @return @deprecated since 4.0. Use {@link #createQueryStringFromNode(Node, int, Class)} instead. """ return createQueryStringFromNode(node, posi...
java
@Deprecated public String createQueryStringFromNode(Node node, int position) { return createQueryStringFromNode(node, position, null); }
[ "@", "Deprecated", "public", "String", "createQueryStringFromNode", "(", "Node", "node", ",", "int", "position", ")", "{", "return", "createQueryStringFromNode", "(", "node", ",", "position", ",", "null", ")", ";", "}" ]
Create the plain query string representation of the given node. @param node @return @deprecated since 4.0. Use {@link #createQueryStringFromNode(Node, int, Class)} instead.
[ "Create", "the", "plain", "query", "string", "representation", "of", "the", "given", "node", "." ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/QueryParserBase.java#L174-L177
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.saveAliases
public void saveAliases(CmsDbContext dbc, CmsProject project, CmsUUID structureId, List<CmsAlias> aliases) throws CmsException { """ Saves a list of aliases for the same structure id, replacing any aliases for the same structure id.<p> @param dbc the current database context @param project the current proj...
java
public void saveAliases(CmsDbContext dbc, CmsProject project, CmsUUID structureId, List<CmsAlias> aliases) throws CmsException { for (CmsAlias alias : aliases) { if (!structureId.equals(alias.getStructureId())) { throw new IllegalArgumentException("Aliases to replace must have t...
[ "public", "void", "saveAliases", "(", "CmsDbContext", "dbc", ",", "CmsProject", "project", ",", "CmsUUID", "structureId", ",", "List", "<", "CmsAlias", ">", "aliases", ")", "throws", "CmsException", "{", "for", "(", "CmsAlias", "alias", ":", "aliases", ")", ...
Saves a list of aliases for the same structure id, replacing any aliases for the same structure id.<p> @param dbc the current database context @param project the current project @param structureId the structure id for which the aliases should be saved @param aliases the list of aliases to save @throws CmsException if...
[ "Saves", "a", "list", "of", "aliases", "for", "the", "same", "structure", "id", "replacing", "any", "aliases", "for", "the", "same", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L8765-L8783
alkacon/opencms-core
src-setup/org/opencms/setup/db/update6to7/CmsUpdateDBUpdateOU.java
CmsUpdateDBUpdateOU.updateOUs
protected int updateOUs(CmsSetupDb dbCon, String table, String ouColumn) { """ Updates the database tables with the new OUs if necessary for the given table.<p> @param dbCon the db connection interface @param table the table to update @param ouColumn the column to insert @return true if everything worked f...
java
protected int updateOUs(CmsSetupDb dbCon, String table, String ouColumn) { System.out.println(new Exception().getStackTrace()[0].toString()); int result = 1; try { if (!findOUColumn(dbCon, table, ouColumn)) { // Alter the table and add the OUs Map<St...
[ "protected", "int", "updateOUs", "(", "CmsSetupDb", "dbCon", ",", "String", "table", ",", "String", "ouColumn", ")", "{", "System", ".", "out", ".", "println", "(", "new", "Exception", "(", ")", ".", "getStackTrace", "(", ")", "[", "0", "]", ".", "toSt...
Updates the database tables with the new OUs if necessary for the given table.<p> @param dbCon the db connection interface @param table the table to update @param ouColumn the column to insert @return true if everything worked fine, false if not
[ "Updates", "the", "database", "tables", "with", "the", "new", "OUs", "if", "necessary", "for", "the", "given", "table", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/db/update6to7/CmsUpdateDBUpdateOU.java#L138-L169
javagl/CommonUI
src/main/java/de/javagl/common/ui/JTrees.java
JTrees.countNodes
private static int countNodes(TreeModel treeModel, Object node) { """ Recursively count the number of nodes in the given tree model, starting with the given node @param treeModel The tree model @param node The node @return The number of nodes """ int sum = 1; int n = treeModel.getChildC...
java
private static int countNodes(TreeModel treeModel, Object node) { int sum = 1; int n = treeModel.getChildCount(node); for (int i=0; i<n; i++) { sum += countNodes(treeModel, treeModel.getChild(node, i)); } return sum; }
[ "private", "static", "int", "countNodes", "(", "TreeModel", "treeModel", ",", "Object", "node", ")", "{", "int", "sum", "=", "1", ";", "int", "n", "=", "treeModel", ".", "getChildCount", "(", "node", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Recursively count the number of nodes in the given tree model, starting with the given node @param treeModel The tree model @param node The node @return The number of nodes
[ "Recursively", "count", "the", "number", "of", "nodes", "in", "the", "given", "tree", "model", "starting", "with", "the", "given", "node" ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/JTrees.java#L192-L201
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstrafficdomain.java
nstrafficdomain.get
public static nstrafficdomain get(nitro_service service, Long td) throws Exception { """ Use this API to fetch nstrafficdomain resource of given name . """ nstrafficdomain obj = new nstrafficdomain(); obj.set_td(td); nstrafficdomain response = (nstrafficdomain) obj.get_resource(service); return respons...
java
public static nstrafficdomain get(nitro_service service, Long td) throws Exception{ nstrafficdomain obj = new nstrafficdomain(); obj.set_td(td); nstrafficdomain response = (nstrafficdomain) obj.get_resource(service); return response; }
[ "public", "static", "nstrafficdomain", "get", "(", "nitro_service", "service", ",", "Long", "td", ")", "throws", "Exception", "{", "nstrafficdomain", "obj", "=", "new", "nstrafficdomain", "(", ")", ";", "obj", ".", "set_td", "(", "td", ")", ";", "nstrafficdo...
Use this API to fetch nstrafficdomain resource of given name .
[ "Use", "this", "API", "to", "fetch", "nstrafficdomain", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstrafficdomain.java#L365-L370
OpenLiberty/open-liberty
dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java
ThreadPoolController.getLargestValidPoolSize
private Integer getLargestValidPoolSize(Integer poolSize, Double forecast) { """ Returns the largest valid poolSize in the current historical dataset. @param poolSize - current poolSize @param forecast - expected throughput at current poolSize @return - largest valid poolSize found """ Integer lar...
java
private Integer getLargestValidPoolSize(Integer poolSize, Double forecast) { Integer largestPoolSize = -1; // find largest poolSize with valid data boolean validLargeData = false; while (!validLargeData) { largestPoolSize = threadStats.lastKey(); ThroughputDistrib...
[ "private", "Integer", "getLargestValidPoolSize", "(", "Integer", "poolSize", ",", "Double", "forecast", ")", "{", "Integer", "largestPoolSize", "=", "-", "1", ";", "// find largest poolSize with valid data", "boolean", "validLargeData", "=", "false", ";", "while", "("...
Returns the largest valid poolSize in the current historical dataset. @param poolSize - current poolSize @param forecast - expected throughput at current poolSize @return - largest valid poolSize found
[ "Returns", "the", "largest", "valid", "poolSize", "in", "the", "current", "historical", "dataset", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java#L1638-L1653
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/portmap/Portmapper.java
Portmapper.queryPortFromPortMap
public static int queryPortFromPortMap(int program, int version, String serverIP) throws IOException { """ Given program and version of a service, query its tcp port number @param program The program number, used to identify it for RPC calls. @param version The program version number, used to identify it for...
java
public static int queryPortFromPortMap(int program, int version, String serverIP) throws IOException { GetPortResponse response = null; GetPortRequest request = new GetPortRequest(program, version); for (int i = 0; i < _maxRetry; ++i) { try { Xdr portmapXdr = new Xdr(...
[ "public", "static", "int", "queryPortFromPortMap", "(", "int", "program", ",", "int", "version", ",", "String", "serverIP", ")", "throws", "IOException", "{", "GetPortResponse", "response", "=", "null", ";", "GetPortRequest", "request", "=", "new", "GetPortRequest...
Given program and version of a service, query its tcp port number @param program The program number, used to identify it for RPC calls. @param version The program version number, used to identify it for RPC calls. @param serverIP The server IP address. @return The port number for the program.
[ "Given", "program", "and", "version", "of", "a", "service", "query", "its", "tcp", "port", "number" ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/portmap/Portmapper.java#L76-L102
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10Attribute
public static void escapeXml10Attribute(final String text, final Writer writer) throws IOException { """ <p> Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing results to a <t...
java
public static void escapeXml10Attribute(final String text, final Writer writer) throws IOException { escapeXml(text, writer, XmlEscapeSymbols.XML10_ATTRIBUTE_SYMBOLS, XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA, XmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_...
[ "public", "static", "void", "escapeXml10Attribute", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeXml", "(", "text", ",", "writer", ",", "XmlEscapeSymbols", ".", "XML10_ATTRIBUTE_SYMBOLS", ",", "XmlEsca...
<p> Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The five markup-significant characters...
[ "<p", ">", "Perform", "an", "XML", "1", ".", "0", "level", "2", "(", "markup", "-", "significant", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L968-L973
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/classloader/AccessClassLoader.java
AccessClassLoader.registerClass
public void registerClass(String name, byte[] bytes) { """ Registers a class by its name @param name The name of the class to be registered @param bytes An array of bytes containing the class """ if (registeredClasses.containsKey(name)) { throw new IllegalStateException("Attempted to register a cl...
java
public void registerClass(String name, byte[] bytes) { if (registeredClasses.containsKey(name)) { throw new IllegalStateException("Attempted to register a class that has been registered already: " + name); } registeredClasses.put(name, bytes); }
[ "public", "void", "registerClass", "(", "String", "name", ",", "byte", "[", "]", "bytes", ")", "{", "if", "(", "registeredClasses", ".", "containsKey", "(", "name", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Attempted to register a class tha...
Registers a class by its name @param name The name of the class to be registered @param bytes An array of bytes containing the class
[ "Registers", "a", "class", "by", "its", "name" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/classloader/AccessClassLoader.java#L101-L107
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java
StringConverter.byteArrayToSQLBitString
public static String byteArrayToSQLBitString(byte[] bytes, int bitCount) { """ Converts a byte array into an SQL binary string @param bytes byte array @param bitCount number of bits @return hex string """ char[] s = new char[bitCount + 3]; s[0] = 'B'; s[1] = '\''; int ...
java
public static String byteArrayToSQLBitString(byte[] bytes, int bitCount) { char[] s = new char[bitCount + 3]; s[0] = 'B'; s[1] = '\''; int pos = 2; for (int j = 0; j < bitCount; j++) { byte b = bytes[j / 8]; s[pos++] = BitMap.isSet(b, j % 8) ? '1' ...
[ "public", "static", "String", "byteArrayToSQLBitString", "(", "byte", "[", "]", "bytes", ",", "int", "bitCount", ")", "{", "char", "[", "]", "s", "=", "new", "char", "[", "bitCount", "+", "3", "]", ";", "s", "[", "0", "]", "=", "'", "'", ";", "s"...
Converts a byte array into an SQL binary string @param bytes byte array @param bitCount number of bits @return hex string
[ "Converts", "a", "byte", "array", "into", "an", "SQL", "binary", "string" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L292-L311
OpenLiberty/open-liberty
dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java
CommonMpJwtFat.goodAppExpectations
public Expectations goodAppExpectations(String theUrl, String appClass) throws Exception { """ Set good app check expectations - sets checks for good status code and for a message indicating what if any app class was invoked successfully @param theUrl - the url that the test invoked @param appClass - the app c...
java
public Expectations goodAppExpectations(String theUrl, String appClass) throws Exception { Expectations expectations = new Expectations(); expectations.addExpectations(CommonExpectations.successfullyReachedUrl(theUrl)); expectations.addExpectation(new ResponseFullExpectation(MpJwtFatConstants.S...
[ "public", "Expectations", "goodAppExpectations", "(", "String", "theUrl", ",", "String", "appClass", ")", "throws", "Exception", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ".", "addExpectations", "(", "CommonExpec...
Set good app check expectations - sets checks for good status code and for a message indicating what if any app class was invoked successfully @param theUrl - the url that the test invoked @param appClass - the app class that should have been invoked @return - newly created Expectations @throws Exception
[ "Set", "good", "app", "check", "expectations", "-", "sets", "checks", "for", "good", "status", "code", "and", "for", "a", "message", "indicating", "what", "if", "any", "app", "class", "was", "invoked", "successfully" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java#L95-L102
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java
CommerceDiscountRulePersistenceImpl.findAll
@Override public List<CommerceDiscountRule> findAll(int start, int end) { """ Returns a range of all the commerce discount rules. <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 r...
java
@Override public List<CommerceDiscountRule> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscountRule", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce discount rules. <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 result in the set. Setting both <co...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "discount", "rules", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java#L1158-L1161
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java
DescribeDenseHogAlg.addToHistogram
void addToHistogram(int cellX, int cellY, int orientationIndex, double magnitude) { """ Adds the magnitude to the histogram at the specified cell and orientation @param cellX cell coordinate @param cellY cell coordinate @param orientationIndex orientation coordinate @param magnitude edge magnitude """ //...
java
void addToHistogram(int cellX, int cellY, int orientationIndex, double magnitude) { // see if it's being applied to a valid cell in the histogram if( cellX < 0 || cellX >= cellsPerBlockX) return; if( cellY < 0 || cellY >= cellsPerBlockY) return; int index = (cellY*cellsPerBlockX + cellX)*orientationBins ...
[ "void", "addToHistogram", "(", "int", "cellX", ",", "int", "cellY", ",", "int", "orientationIndex", ",", "double", "magnitude", ")", "{", "// see if it's being applied to a valid cell in the histogram", "if", "(", "cellX", "<", "0", "||", "cellX", ">=", "cellsPerBlo...
Adds the magnitude to the histogram at the specified cell and orientation @param cellX cell coordinate @param cellY cell coordinate @param orientationIndex orientation coordinate @param magnitude edge magnitude
[ "Adds", "the", "magnitude", "to", "the", "histogram", "at", "the", "specified", "cell", "and", "orientation" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java#L330-L339
aws/aws-sdk-java
aws-java-sdk-signer/src/main/java/com/amazonaws/services/signer/model/PutSigningProfileRequest.java
PutSigningProfileRequest.withSigningParameters
public PutSigningProfileRequest withSigningParameters(java.util.Map<String, String> signingParameters) { """ <p> Map of key-value pairs for signing. These can include any information that you want to use during signing. </p> @param signingParameters Map of key-value pairs for signing. These can include any i...
java
public PutSigningProfileRequest withSigningParameters(java.util.Map<String, String> signingParameters) { setSigningParameters(signingParameters); return this; }
[ "public", "PutSigningProfileRequest", "withSigningParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "signingParameters", ")", "{", "setSigningParameters", "(", "signingParameters", ")", ";", "return", "this", ";", "}" ]
<p> Map of key-value pairs for signing. These can include any information that you want to use during signing. </p> @param signingParameters Map of key-value pairs for signing. These can include any information that you want to use during signing. @return Returns a reference to this object so that method calls can be ...
[ "<p", ">", "Map", "of", "key", "-", "value", "pairs", "for", "signing", ".", "These", "can", "include", "any", "information", "that", "you", "want", "to", "use", "during", "signing", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-signer/src/main/java/com/amazonaws/services/signer/model/PutSigningProfileRequest.java#L265-L268
bazaarvoice/emodb
sor/src/main/java/com/bazaarvoice/emodb/sor/db/astyanax/AstyanaxDataReaderDAO.java
AstyanaxDataReaderDAO.rowScan
private Iterator<Row<ByteBuffer, UUID>> rowScan(final DeltaPlacement placement, final ByteBufferRange rowRange, final ByteBufferRange columnRange, final LimitCounte...
java
private Iterator<Row<ByteBuffer, UUID>> rowScan(final DeltaPlacement placement, final ByteBufferRange rowRange, final ByteBufferRange columnRange, final LimitCounte...
[ "private", "Iterator", "<", "Row", "<", "ByteBuffer", ",", "UUID", ">", ">", "rowScan", "(", "final", "DeltaPlacement", "placement", ",", "final", "ByteBufferRange", "rowRange", ",", "final", "ByteBufferRange", "columnRange", ",", "final", "LimitCounter", "limit",...
Scans for rows within the specified range, exclusive on start and inclusive on end.
[ "Scans", "for", "rows", "within", "the", "specified", "range", "exclusive", "on", "start", "and", "inclusive", "on", "end", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/sor/src/main/java/com/bazaarvoice/emodb/sor/db/astyanax/AstyanaxDataReaderDAO.java#L798-L804
cdk/cdk
storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java
InChIToStructure.findOtherSinglyBonded
private static IAtom findOtherSinglyBonded(IAtomContainer container, IAtom atom, IAtom exclude) { """ Finds a neighbor attached to 'atom' that is singley bonded and isn't 'exclude'. If no such atom exists, the 'atom' is returned. @param container a molecule container @param atom the atom to find the neig...
java
private static IAtom findOtherSinglyBonded(IAtomContainer container, IAtom atom, IAtom exclude) { for (final IBond bond : container.getConnectedBondsList(atom)) { if (!IBond.Order.SINGLE.equals(bond.getOrder()) || bond.contains(exclude)) continue; return bond.getOther(atom); } ...
[ "private", "static", "IAtom", "findOtherSinglyBonded", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ",", "IAtom", "exclude", ")", "{", "for", "(", "final", "IBond", "bond", ":", "container", ".", "getConnectedBondsList", "(", "atom", ")", ")", "{"...
Finds a neighbor attached to 'atom' that is singley bonded and isn't 'exclude'. If no such atom exists, the 'atom' is returned. @param container a molecule container @param atom the atom to find the neighbor or @param exclude don't find this atom @return the other atom (or 'atom')
[ "Finds", "a", "neighbor", "attached", "to", "atom", "that", "is", "singley", "bonded", "and", "isn", "t", "exclude", ".", "If", "no", "such", "atom", "exists", "the", "atom", "is", "returned", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java#L394-L400