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
lievendoclo/Valkyrie-RCP
valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingUtils.java
VLDockingUtils.fixVLDockingBug
public static DockableState fixVLDockingBug(DockingDesktop dockingDesktop, Dockable dockable) { """ Fixes an VLDocking bug consisting on dockables that belong to a docking desktop have no state on it. @param dockable the dockable candidate. @return its dockable state. If none then registers the dockable again...
java
public static DockableState fixVLDockingBug(DockingDesktop dockingDesktop, Dockable dockable) { Assert.notNull(dockingDesktop, "dockingDesktop"); Assert.notNull(dockable, "dockable"); final DockingContext dockingContext = dockingDesktop.getContext(); final DockKey dockKey = dockable.ge...
[ "public", "static", "DockableState", "fixVLDockingBug", "(", "DockingDesktop", "dockingDesktop", ",", "Dockable", "dockable", ")", "{", "Assert", ".", "notNull", "(", "dockingDesktop", ",", "\"dockingDesktop\"", ")", ";", "Assert", ".", "notNull", "(", "dockable", ...
Fixes an VLDocking bug consisting on dockables that belong to a docking desktop have no state on it. @param dockable the dockable candidate. @return its dockable state. If none then registers the dockable again and ensures dockable state is not null.
[ "Fixes", "an", "VLDocking", "bug", "consisting", "on", "dockables", "that", "belong", "to", "a", "docking", "desktop", "have", "no", "state", "on", "it", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingUtils.java#L62-L82
loadimpact/loadimpact-sdk-java
src/main/java/com/loadimpact/util/ObjectUtils.java
ObjectUtils.newInstance
public static <T> T newInstance(Constructor<T> constructor, Object... args) { """ Invokes a constructor and hides all checked exceptions. @param constructor the constructor @param args zero, one or more arguments @param <T> target type @return a new object """ try { ...
java
public static <T> T newInstance(Constructor<T> constructor, Object... args) { try { return constructor.newInstance(args); } catch (Exception e) { throw new ClientException(e); } }
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "Constructor", "<", "T", ">", "constructor", ",", "Object", "...", "args", ")", "{", "try", "{", "return", "constructor", ".", "newInstance", "(", "args", ")", ";", "}", "catch", "(", "Excepti...
Invokes a constructor and hides all checked exceptions. @param constructor the constructor @param args zero, one or more arguments @param <T> target type @return a new object
[ "Invokes", "a", "constructor", "and", "hides", "all", "checked", "exceptions", "." ]
train
https://github.com/loadimpact/loadimpact-sdk-java/blob/49af80b768c5453266414108b0d30a0fc01b8cef/src/main/java/com/loadimpact/util/ObjectUtils.java#L67-L73
qiniu/java-sdk
src/main/java/com/qiniu/util/Auth.java
Auth.uploadToken
public String uploadToken(String bucket, String key, long expires, StringMap policy, boolean strict) { """ 生成上传token @param bucket 空间名 @param key key,可为 null @param expires 有效时长,单位秒。默认3600s @param policy 上传策略的其它参数,如 new StringMap().put("endUser", "uid").putNotEmpty("returnBody", "")。 scope通过 bucket、ke...
java
public String uploadToken(String bucket, String key, long expires, StringMap policy, boolean strict) { long deadline = System.currentTimeMillis() / 1000 + expires; return uploadTokenWithDeadline(bucket, key, deadline, policy, strict); }
[ "public", "String", "uploadToken", "(", "String", "bucket", ",", "String", "key", ",", "long", "expires", ",", "StringMap", "policy", ",", "boolean", "strict", ")", "{", "long", "deadline", "=", "System", ".", "currentTimeMillis", "(", ")", "/", "1000", "+...
生成上传token @param bucket 空间名 @param key key,可为 null @param expires 有效时长,单位秒。默认3600s @param policy 上传策略的其它参数,如 new StringMap().put("endUser", "uid").putNotEmpty("returnBody", "")。 scope通过 bucket、key间接设置,deadline 通过 expires 间接设置 @param strict 是否去除非限定的策略字段,默认true @return 生成的上传token
[ "生成上传token" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/util/Auth.java#L247-L250
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/transport/remote/AbstractRemoteTransport.java
AbstractRemoteTransport.localDoWork
public void localDoWork(Address address, DistributableWork work) throws WorkException { """ localDoWork @param address the logical address @param work the work @throws WorkException in case of error """ if (trace) log.tracef("LOCAL_DO_WORK(%s, %s)", address, work); DistributedWorkMan...
java
public void localDoWork(Address address, DistributableWork work) throws WorkException { if (trace) log.tracef("LOCAL_DO_WORK(%s, %s)", address, work); DistributedWorkManager dwm = workManagerCoordinator.resolveDistributedWorkManager(address); dwm.localDoWork(work); }
[ "public", "void", "localDoWork", "(", "Address", "address", ",", "DistributableWork", "work", ")", "throws", "WorkException", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\"LOCAL_DO_WORK(%s, %s)\"", ",", "address", ",", "work", ")", ";", "Distribu...
localDoWork @param address the logical address @param work the work @throws WorkException in case of error
[ "localDoWork" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/transport/remote/AbstractRemoteTransport.java#L816-L824
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/binary/BitOutputStream.java
BitOutputStream.writeVarShort
public void writeVarShort(final short value, int optimal) throws IOException { """ Write var short. @param value the value @param optimal the optimal @throws IOException the io exception """ if (value < 0) throw new IllegalArgumentException(); int[] varShortDepths = {optimal, 16}; final int ...
java
public void writeVarShort(final short value, int optimal) throws IOException { if (value < 0) throw new IllegalArgumentException(); int[] varShortDepths = {optimal, 16}; final int bitLength = new Bits(value).bitLength; int type = Arrays.binarySearch(varShortDepths, bitLength); if (type < 0) { ...
[ "public", "void", "writeVarShort", "(", "final", "short", "value", ",", "int", "optimal", ")", "throws", "IOException", "{", "if", "(", "value", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "int", "[", "]", "varShortDepths", "=...
Write var short. @param value the value @param optimal the optimal @throws IOException the io exception
[ "Write", "var", "short", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/binary/BitOutputStream.java#L227-L237
alkacon/opencms-core
src/org/opencms/jsp/CmsJspNavBuilder.java
CmsJspNavBuilder.getNavigationForFolder
public List<CmsJspNavElement> getNavigationForFolder(String folder) { """ Collect all navigation visible elements from the files in the given folder.<p> @param folder the selected folder @return A sorted (ascending to navigation position) list of navigation elements """ return getNavigationForFo...
java
public List<CmsJspNavElement> getNavigationForFolder(String folder) { return getNavigationForFolder(folder, Visibility.navigation, CmsResourceFilter.DEFAULT); }
[ "public", "List", "<", "CmsJspNavElement", ">", "getNavigationForFolder", "(", "String", "folder", ")", "{", "return", "getNavigationForFolder", "(", "folder", ",", "Visibility", ".", "navigation", ",", "CmsResourceFilter", ".", "DEFAULT", ")", ";", "}" ]
Collect all navigation visible elements from the files in the given folder.<p> @param folder the selected folder @return A sorted (ascending to navigation position) list of navigation elements
[ "Collect", "all", "navigation", "visible", "elements", "from", "the", "files", "in", "the", "given", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspNavBuilder.java#L494-L497
LearnLib/learnlib
algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/util/ADTUtil.java
ADTUtil.mergeADS
public static <S, I, O> boolean mergeADS(final ADTNode<S, I, O> parent, final ADTNode<S, I, O> child) { """ Tries to merge the given (single trace) ADSs (which only contains one leaf) into the given parent ADSs. If possible, the parent ADS is altered as a side-effect @param parent the parent ADS in which the ...
java
public static <S, I, O> boolean mergeADS(final ADTNode<S, I, O> parent, final ADTNode<S, I, O> child) { ADTNode<S, I, O> parentIter = parent, childIter = child; while (!(ADTUtil.isLeafNode(parentIter) || ADTUtil.isResetNode(parentIter)) && !ADTUtil.isLeafNode(childIter)) { if (!parentIter...
[ "public", "static", "<", "S", ",", "I", ",", "O", ">", "boolean", "mergeADS", "(", "final", "ADTNode", "<", "S", ",", "I", ",", "O", ">", "parent", ",", "final", "ADTNode", "<", "S", ",", "I", ",", "O", ">", "child", ")", "{", "ADTNode", "<", ...
Tries to merge the given (single trace) ADSs (which only contains one leaf) into the given parent ADSs. If possible, the parent ADS is altered as a side-effect @param parent the parent ADS in which the given child ADS should be merged into @param child the (single trace) ADS which should be incorporated into the paren...
[ "Tries", "to", "merge", "the", "given", "(", "single", "trace", ")", "ADSs", "(", "which", "only", "contains", "one", "leaf", ")", "into", "the", "given", "parent", "ADSs", ".", "If", "possible", "the", "parent", "ADS", "is", "altered", "as", "a", "sid...
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/util/ADTUtil.java#L322-L355
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/NodeDefinitionId.java
NodeDefinitionId.fromString
public static NodeDefinitionId fromString( String definition, NameFactory factory ) { """ Parse the supplied string for of an identifer, and return the object form for that identifier. @param definition the {@link #getString() string form of the identifier}; may no...
java
public static NodeDefinitionId fromString( String definition, NameFactory factory ) { String[] parts = definition.split("/"); String nodeTypeNameString = parts[0]; String childDefinitionNameString = parts[1]; Name[] requiredPrimaryTypes = ne...
[ "public", "static", "NodeDefinitionId", "fromString", "(", "String", "definition", ",", "NameFactory", "factory", ")", "{", "String", "[", "]", "parts", "=", "definition", ".", "split", "(", "\"/\"", ")", ";", "String", "nodeTypeNameString", "=", "parts", "[",...
Parse the supplied string for of an identifer, and return the object form for that identifier. @param definition the {@link #getString() string form of the identifier}; may not be null @param factory the factory that should be used to create Name objects; may not be null @return the object form of the identifier; neve...
[ "Parse", "the", "supplied", "string", "for", "of", "an", "identifer", "and", "return", "the", "object", "form", "for", "that", "identifier", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/NodeDefinitionId.java#L147-L159
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.createProjectWithServiceResponseAsync
public Observable<ServiceResponse<Project>> createProjectWithServiceResponseAsync(String name, CreateProjectOptionalParameter createProjectOptionalParameter) { """ Create a project. @param name Name of the project @param createProjectOptionalParameter the object representing the optional parameters to be set b...
java
public Observable<ServiceResponse<Project>> createProjectWithServiceResponseAsync(String name, CreateProjectOptionalParameter createProjectOptionalParameter) { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client....
[ "public", "Observable", "<", "ServiceResponse", "<", "Project", ">", ">", "createProjectWithServiceResponseAsync", "(", "String", "name", ",", "CreateProjectOptionalParameter", "createProjectOptionalParameter", ")", "{", "if", "(", "name", "==", "null", ")", "{", "thr...
Create a project. @param name Name of the project @param createProjectOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Project object
[ "Create", "a", "project", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L2401-L2413
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainTopicsInner.java
DomainTopicsInner.listByDomain
public List<DomainTopicInner> listByDomain(String resourceGroupName, String domainName) { """ List domain topics. List all the topics in a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Domain name. @throws IllegalArgumentException thrown if ...
java
public List<DomainTopicInner> listByDomain(String resourceGroupName, String domainName) { return listByDomainWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); }
[ "public", "List", "<", "DomainTopicInner", ">", "listByDomain", "(", "String", "resourceGroupName", ",", "String", "domainName", ")", "{", "return", "listByDomainWithServiceResponseAsync", "(", "resourceGroupName", ",", "domainName", ")", ".", "toBlocking", "(", ")", ...
List domain topics. List all the topics in a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Domain name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throw...
[ "List", "domain", "topics", ".", "List", "all", "the", "topics", "in", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainTopicsInner.java#L173-L175
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/basic/TextParams.java
TextParams.setFromJSON
public void setFromJSON(Context context, JSONObject properties) { """ Set text parameters from properties @param context Valid Android {@link Context} @param properties JSON text properties """ String backgroundResStr = optString(properties, Properties.background); if (backgroundResStr != nul...
java
public void setFromJSON(Context context, JSONObject properties) { String backgroundResStr = optString(properties, Properties.background); if (backgroundResStr != null && !backgroundResStr.isEmpty()) { final int backgroundResId = getId(context, backgroundResStr, "drawable"); setBa...
[ "public", "void", "setFromJSON", "(", "Context", "context", ",", "JSONObject", "properties", ")", "{", "String", "backgroundResStr", "=", "optString", "(", "properties", ",", "Properties", ".", "background", ")", ";", "if", "(", "backgroundResStr", "!=", "null",...
Set text parameters from properties @param context Valid Android {@link Context} @param properties JSON text properties
[ "Set", "text", "parameters", "from", "properties" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/basic/TextParams.java#L57-L81
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/random/RandomICAutomatonGenerator.java
RandomICAutomatonGenerator.generateICDeterministicAutomaton
public <I, A extends MutableDeterministic<?, I, ?, ? super SP, ? super TP>> A generateICDeterministicAutomaton(int numStates, Alphabet<I> alphabet, ...
java
public <I, A extends MutableDeterministic<?, I, ?, ? super SP, ? super TP>> A generateICDeterministicAutomaton(int numStates, Alphabet<I> alphabet, ...
[ "public", "<", "I", ",", "A", "extends", "MutableDeterministic", "<", "?", ",", "I", ",", "?", ",", "?", "super", "SP", ",", "?", "super", "TP", ">", ">", "A", "generateICDeterministicAutomaton", "(", "int", "numStates", ",", "Alphabet", "<", "I", ">",...
Generates an initially-connected (IC) deterministic automaton with the given parameters. The resulting automaton is instantiated using the given {@code creator}. Note that the resulting automaton will <b>not</b> be minimized. @param numStates the number of states of the resulting automaton @param alphabet the input al...
[ "Generates", "an", "initially", "-", "connected", "(", "IC", ")", "deterministic", "automaton", "with", "the", "given", "parameters", ".", "The", "resulting", "automaton", "is", "instantiated", "using", "the", "given", "{", "@code", "creator", "}", ".", "Note"...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/random/RandomICAutomatonGenerator.java#L235-L241
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONCompare.java
JSONCompare.compareJSON
public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode) throws JSONException { """ Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison. @param expected Expected JSONObject @param actual JSONObject to ...
java
public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
[ "public", "static", "JSONCompareResult", "compareJSON", "(", "JSONObject", "expected", ",", "JSONObject", "actual", ",", "JSONCompareMode", "mode", ")", "throws", "JSONException", "{", "return", "compareJSON", "(", "expected", ",", "actual", ",", "getComparatorForMode...
Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison. @param expected Expected JSONObject @param actual JSONObject to compare @param mode Defines comparison behavior @return result of the comparison @throws JSONException JSON parsing error
[ "Compares", "JSONObject", "provided", "to", "the", "expected", "JSONObject", "and", "returns", "the", "results", "of", "the", "comparison", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONCompare.java#L137-L140
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java
NumberStyleHelper.appendGroupingAttribute
private void appendGroupingAttribute(final XMLUtil util, final Appendable appendable) throws IOException { """ Append the 19.348 number:grouping attribute. Default = false. @param util a util for XML writing @param appendable where to write @throws IOException If an I/O error occurs """ if (...
java
private void appendGroupingAttribute(final XMLUtil util, final Appendable appendable) throws IOException { if (this.grouping) util.appendAttribute(appendable, "number:grouping", "true"); }
[ "private", "void", "appendGroupingAttribute", "(", "final", "XMLUtil", "util", ",", "final", "Appendable", "appendable", ")", "throws", "IOException", "{", "if", "(", "this", ".", "grouping", ")", "util", ".", "appendAttribute", "(", "appendable", ",", "\"number...
Append the 19.348 number:grouping attribute. Default = false. @param util a util for XML writing @param appendable where to write @throws IOException If an I/O error occurs
[ "Append", "the", "19", ".", "348", "number", ":", "grouping", "attribute", ".", "Default", "=", "false", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L104-L106
actframework/actframework
src/main/java/act/ws/WebSocketContext.java
WebSocketContext.sendToPeers
public WebSocketContext sendToPeers(String message, boolean excludeSelf) { """ Send message to all connections connected to the same URL of this context @param message the message to be sent @param excludeSelf whether the connection of this context should be sent to @return this context """ return...
java
public WebSocketContext sendToPeers(String message, boolean excludeSelf) { return sendToConnections(message, url, manager.urlRegistry(), excludeSelf); }
[ "public", "WebSocketContext", "sendToPeers", "(", "String", "message", ",", "boolean", "excludeSelf", ")", "{", "return", "sendToConnections", "(", "message", ",", "url", ",", "manager", ".", "urlRegistry", "(", ")", ",", "excludeSelf", ")", ";", "}" ]
Send message to all connections connected to the same URL of this context @param message the message to be sent @param excludeSelf whether the connection of this context should be sent to @return this context
[ "Send", "message", "to", "all", "connections", "connected", "to", "the", "same", "URL", "of", "this", "context" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/ws/WebSocketContext.java#L185-L187
Microsoft/azure-maven-plugins
azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/Utils.java
Utils.getServer
public static Server getServer(final Settings settings, final String serverId) { """ Get server credential from Maven settings by server Id. @param settings Maven settings object. @param serverId Server Id. @return Server object if it exists in settings. Otherwise return null. """ if (settings ==...
java
public static Server getServer(final Settings settings, final String serverId) { if (settings == null || StringUtils.isEmpty(serverId)) { return null; } return settings.getServer(serverId); }
[ "public", "static", "Server", "getServer", "(", "final", "Settings", "settings", ",", "final", "String", "serverId", ")", "{", "if", "(", "settings", "==", "null", "||", "StringUtils", ".", "isEmpty", "(", "serverId", ")", ")", "{", "return", "null", ";", ...
Get server credential from Maven settings by server Id. @param settings Maven settings object. @param serverId Server Id. @return Server object if it exists in settings. Otherwise return null.
[ "Get", "server", "credential", "from", "Maven", "settings", "by", "server", "Id", "." ]
train
https://github.com/Microsoft/azure-maven-plugins/blob/a254902e820185df1823b1d692c7c1d119490b1e/azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/Utils.java#L39-L44
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.copyFromRemoteFile
@Given("^I inbound copy '(.+?)' through a ssh connection to '(.+?)'$") public void copyFromRemoteFile(String remotePath, String localPath) throws Exception { """ /* Copies file/s from remote system into local system @param remotePath path where file is going to be copy @param localPath path where file is ...
java
@Given("^I inbound copy '(.+?)' through a ssh connection to '(.+?)'$") public void copyFromRemoteFile(String remotePath, String localPath) throws Exception { commonspec.getRemoteSSHConnection().copyFrom(remotePath, localPath); }
[ "@", "Given", "(", "\"^I inbound copy '(.+?)' through a ssh connection to '(.+?)'$\"", ")", "public", "void", "copyFromRemoteFile", "(", "String", "remotePath", ",", "String", "localPath", ")", "throws", "Exception", "{", "commonspec", ".", "getRemoteSSHConnection", "(", ...
/* Copies file/s from remote system into local system @param remotePath path where file is going to be copy @param localPath path where file is located @throws Exception exception
[ "/", "*", "Copies", "file", "/", "s", "from", "remote", "system", "into", "local", "system" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L78-L81
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java
HiveRegistrationUnitComparator.checkExistingIsSuperstate
protected void checkExistingIsSuperstate(State existingState, State newState) { """ Compare an existing state and a new {@link State} to ensure that the existing {@link State} contains all entries in the new {@link State}, and update {@link #result} accordingly. """ checkExistingIsSuperset(existingState.g...
java
protected void checkExistingIsSuperstate(State existingState, State newState) { checkExistingIsSuperset(existingState.getProperties().entrySet(), newState.getProperties().entrySet()); }
[ "protected", "void", "checkExistingIsSuperstate", "(", "State", "existingState", ",", "State", "newState", ")", "{", "checkExistingIsSuperset", "(", "existingState", ".", "getProperties", "(", ")", ".", "entrySet", "(", ")", ",", "newState", ".", "getProperties", ...
Compare an existing state and a new {@link State} to ensure that the existing {@link State} contains all entries in the new {@link State}, and update {@link #result} accordingly.
[ "Compare", "an", "existing", "state", "and", "a", "new", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java#L189-L191
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java
CalligraphyLayoutInflater.onActivityCreateView
@Override @TargetApi(Build.VERSION_CODES.HONEYCOMB) public View onActivityCreateView(View parent, View view, String name, Context context, AttributeSet attrs) { """ The Activity onCreateView (PrivateFactory) is the third port of call for LayoutInflation. We opted to manual injection over aggressive reflec...
java
@Override @TargetApi(Build.VERSION_CODES.HONEYCOMB) public View onActivityCreateView(View parent, View view, String name, Context context, AttributeSet attrs) { return mCalligraphyFactory.onViewCreated(createCustomViewInternal(parent, view, name, context, attrs), context, attrs); }
[ "@", "Override", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB", ")", "public", "View", "onActivityCreateView", "(", "View", "parent", ",", "View", "view", ",", "String", "name", ",", "Context", "context", ",", "AttributeSet", "attrs", ...
The Activity onCreateView (PrivateFactory) is the third port of call for LayoutInflation. We opted to manual injection over aggressive reflection, this should be less fragile.
[ "The", "Activity", "onCreateView", "(", "PrivateFactory", ")", "is", "the", "third", "port", "of", "call", "for", "LayoutInflation", ".", "We", "opted", "to", "manual", "injection", "over", "aggressive", "reflection", "this", "should", "be", "less", "fragile", ...
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java#L135-L139
pierre/serialization
common/src/main/java/com/ning/metrics/serialization/schema/Schema.java
Schema.getSchema
public ArrayList<SchemaField> getSchema() { """ Get the schema as a collection of fields. We guarantee the ordering by field id. @return the sorted collection of fields """ final ArrayList<SchemaField> items = new ArrayList<SchemaField>(schemaFields.values()); Collections.sort(items, new C...
java
public ArrayList<SchemaField> getSchema() { final ArrayList<SchemaField> items = new ArrayList<SchemaField>(schemaFields.values()); Collections.sort(items, new Comparator<SchemaField>() { @Override public int compare(final SchemaField left, final SchemaField right) ...
[ "public", "ArrayList", "<", "SchemaField", ">", "getSchema", "(", ")", "{", "final", "ArrayList", "<", "SchemaField", ">", "items", "=", "new", "ArrayList", "<", "SchemaField", ">", "(", "schemaFields", ".", "values", "(", ")", ")", ";", "Collections", "."...
Get the schema as a collection of fields. We guarantee the ordering by field id. @return the sorted collection of fields
[ "Get", "the", "schema", "as", "a", "collection", "of", "fields", ".", "We", "guarantee", "the", "ordering", "by", "field", "id", "." ]
train
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/common/src/main/java/com/ning/metrics/serialization/schema/Schema.java#L73-L87
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/AESUtil.java
AESUtil.decypt
public static String decypt(byte[] b, byte[] key) { """ 将一个字符串按指定key进行AES解密并返回 @param b 需要解密的字符串 @param key 指定key @return 返回解密后的字符串,失败返回null """ String _str = null; try { SecretKey secretKey = new SecretKeySpec(key, "AES"); Cipher cipher = Cipher.getInstance("AES"...
java
public static String decypt(byte[] b, byte[] key) { String _str = null; try { SecretKey secretKey = new SecretKeySpec(key, "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, secretKey); _str = new String(cipher.doFinal(b));...
[ "public", "static", "String", "decypt", "(", "byte", "[", "]", "b", ",", "byte", "[", "]", "key", ")", "{", "String", "_str", "=", "null", ";", "try", "{", "SecretKey", "secretKey", "=", "new", "SecretKeySpec", "(", "key", ",", "\"AES\"", ")", ";", ...
将一个字符串按指定key进行AES解密并返回 @param b 需要解密的字符串 @param key 指定key @return 返回解密后的字符串,失败返回null
[ "将一个字符串按指定key进行AES解密并返回" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/AESUtil.java#L67-L78
larsga/Duke
duke-core/src/main/java/no/priv/garshol/duke/ConfigLoader.java
ConfigLoader.loadFromString
public static Configuration loadFromString(String config) throws IOException, SAXException { """ Loads the configuration XML from the given string. @since 1.3 """ ConfigurationImpl cfg = new ConfigurationImpl(); XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(n...
java
public static Configuration loadFromString(String config) throws IOException, SAXException { ConfigurationImpl cfg = new ConfigurationImpl(); XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(new ConfigHandler(cfg, null)); Reader reader = new StringReader(config); ...
[ "public", "static", "Configuration", "loadFromString", "(", "String", "config", ")", "throws", "IOException", ",", "SAXException", "{", "ConfigurationImpl", "cfg", "=", "new", "ConfigurationImpl", "(", ")", ";", "XMLReader", "parser", "=", "XMLReaderFactory", ".", ...
Loads the configuration XML from the given string. @since 1.3
[ "Loads", "the", "configuration", "XML", "from", "the", "given", "string", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/ConfigLoader.java#L58-L67
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.createCliWithWait
private DockerCLI createCliWithWait(URL url, int port) throws InterruptedException, IOException { """ Create DockerCLI connection against specified jnlpSlaveAgent port """ DockerCLI tempCli = null; boolean connected = false; int i = 0; while (i <= 10 && !connected) { ...
java
private DockerCLI createCliWithWait(URL url, int port) throws InterruptedException, IOException { DockerCLI tempCli = null; boolean connected = false; int i = 0; while (i <= 10 && !connected) { i++; try { final CLIConnectionFactory factory = new CL...
[ "private", "DockerCLI", "createCliWithWait", "(", "URL", "url", ",", "int", "port", ")", "throws", "InterruptedException", ",", "IOException", "{", "DockerCLI", "tempCli", "=", "null", ";", "boolean", "connected", "=", "false", ";", "int", "i", "=", "0", ";"...
Create DockerCLI connection against specified jnlpSlaveAgent port
[ "Create", "DockerCLI", "connection", "against", "specified", "jnlpSlaveAgent", "port" ]
train
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L568-L601
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.initialiseSocketClient
public SocketController initialiseSocketClient(@NonNull SessionController sessionController, ListenerListAdapter listener, APIConfig.BaseURIs baseURIs) { """ Initialise client for managing socket connections. @param sessionController Controller for creating and managing session. @param listener Listen...
java
public SocketController initialiseSocketClient(@NonNull SessionController sessionController, ListenerListAdapter listener, APIConfig.BaseURIs baseURIs) { SocketController socketController = new SocketController(dataMgr, listener, log, baseURIs.getSocket(), baseURIs.getProxy()); sessionController.setSock...
[ "public", "SocketController", "initialiseSocketClient", "(", "@", "NonNull", "SessionController", "sessionController", ",", "ListenerListAdapter", "listener", ",", "APIConfig", ".", "BaseURIs", "baseURIs", ")", "{", "SocketController", "socketController", "=", "new", "Soc...
Initialise client for managing socket connections. @param sessionController Controller for creating and managing session. @param listener Listener for socket events. @param baseURIs APIs baseURIs. @return Client for managing socket connections.
[ "Initialise", "client", "for", "managing", "socket", "connections", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L169-L176
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.defineCommonTableScanShared
protected StmtCommonTableScanShared defineCommonTableScanShared(String tableName, int stmtId) { """ Lookup or define the shared part of a common table by name. This happens when the common table name is first encountered. For example, in the SQL: "with name as ( select * from ttt ) select name as a, name as b"...
java
protected StmtCommonTableScanShared defineCommonTableScanShared(String tableName, int stmtId) { assert (m_commonTableSharedMap.get(tableName) == null); StmtCommonTableScanShared answer = new StmtCommonTableScanShared(tableName, stmtId); m_commonTableSharedMap.put(tableName, answer); retu...
[ "protected", "StmtCommonTableScanShared", "defineCommonTableScanShared", "(", "String", "tableName", ",", "int", "stmtId", ")", "{", "assert", "(", "m_commonTableSharedMap", ".", "get", "(", "tableName", ")", "==", "null", ")", ";", "StmtCommonTableScanShared", "answe...
Lookup or define the shared part of a common table by name. This happens when the common table name is first encountered. For example, in the SQL: "with name as ( select * from ttt ) select name as a, name as b" the name "name" is a common table name. It's not an alias. This is comparable to defining a table name i...
[ "Lookup", "or", "define", "the", "shared", "part", "of", "a", "common", "table", "by", "name", ".", "This", "happens", "when", "the", "common", "table", "name", "is", "first", "encountered", ".", "For", "example", "in", "the", "SQL", ":", "with", "name",...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1511-L1516
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
ExecutionConfig.addDefaultKryoSerializer
public void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { """ Adds a new Kryo default serializer to the Runtime. @param type The class of the types serialized with the given serializer. @param serializerClass The class of the serializer to use. """ if (type == ...
java
public void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { if (type == null || serializerClass == null) { throw new NullPointerException("Cannot register null class or serializer."); } defaultKryoSerializerClasses.put(type, serializerClass); }
[ "public", "void", "addDefaultKryoSerializer", "(", "Class", "<", "?", ">", "type", ",", "Class", "<", "?", "extends", "Serializer", "<", "?", ">", ">", "serializerClass", ")", "{", "if", "(", "type", "==", "null", "||", "serializerClass", "==", "null", "...
Adds a new Kryo default serializer to the Runtime. @param type The class of the types serialized with the given serializer. @param serializerClass The class of the serializer to use.
[ "Adds", "a", "new", "Kryo", "default", "serializer", "to", "the", "Runtime", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java#L782-L787
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/base/AbstractApplicationFrame.java
AbstractApplicationFrame.newConfigurationDirectory
protected File newConfigurationDirectory(final @NonNull String parent, final @NonNull String child) { """ Factory method for create a new configuration directory {@link File} object if it is not exists. This method is invoked in the constructor and can be overridden from the derived classes so users can provid...
java
protected File newConfigurationDirectory(final @NonNull String parent, final @NonNull String child) { File configurationDir = new File(parent, child); if (!configurationDir.exists()) { configurationDir.mkdir(); } return configurationDir; }
[ "protected", "File", "newConfigurationDirectory", "(", "final", "@", "NonNull", "String", "parent", ",", "final", "@", "NonNull", "String", "child", ")", "{", "File", "configurationDir", "=", "new", "File", "(", "parent", ",", "child", ")", ";", "if", "(", ...
Factory method for create a new configuration directory {@link File} object if it is not exists. This method is invoked in the constructor and can be overridden from the derived classes so users can provide their own version of a new configuration {@link File} object @param parent the parent @param child the child @re...
[ "Factory", "method", "for", "create", "a", "new", "configuration", "directory", "{", "@link", "File", "}", "object", "if", "it", "is", "not", "exists", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "and", "can", "be", "overridden", "f...
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/base/AbstractApplicationFrame.java#L142-L151
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/tx/narayana/XATerminatorImpl.java
XATerminatorImpl.startWork
public void startWork(Work work, Xid xid) throws WorkCompletedException { """ Invoked for transaction inflow of work @param work The work starting @param xid The xid of the work @throws WorkCompletedException With error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context...
java
public void startWork(Work work, Xid xid) throws WorkCompletedException { delegator.startWork(work, xid); }
[ "public", "void", "startWork", "(", "Work", "work", ",", "Xid", "xid", ")", "throws", "WorkCompletedException", "{", "delegator", ".", "startWork", "(", "work", ",", "xid", ")", ";", "}" ]
Invoked for transaction inflow of work @param work The work starting @param xid The xid of the work @throws WorkCompletedException With error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context
[ "Invoked", "for", "transaction", "inflow", "of", "work" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/tx/narayana/XATerminatorImpl.java#L113-L116
derari/cthul
matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedResultMatcher.java
NestedResultMatcher.nestedDescribe
protected void nestedDescribe(SelfDescribing s, Description d, String message) { """ Appends description of {@code s} to {@code d}, enclosed in parantheses if necessary. @param d @param s @param message """ Nested.describeTo(this, s, d, message); }
java
protected void nestedDescribe(SelfDescribing s, Description d, String message) { Nested.describeTo(this, s, d, message); }
[ "protected", "void", "nestedDescribe", "(", "SelfDescribing", "s", ",", "Description", "d", ",", "String", "message", ")", "{", "Nested", ".", "describeTo", "(", "this", ",", "s", ",", "d", ",", "message", ")", ";", "}" ]
Appends description of {@code s} to {@code d}, enclosed in parantheses if necessary. @param d @param s @param message
[ "Appends", "description", "of", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedResultMatcher.java#L35-L37
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.asChar
public static char asChar(Object value, char nullValue) { """ Return the value converted to a char or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value to be...
java
public static char asChar(Object value, char nullValue) { value=convert(Character.class,value); return (value!=null) ? ((Character)value).charValue() : nullValue; }
[ "public", "static", "char", "asChar", "(", "Object", "value", ",", "char", "nullValue", ")", "{", "value", "=", "convert", "(", "Character", ".", "class", ",", "value", ")", ";", "return", "(", "value", "!=", "null", ")", "?", "(", "(", "Character", ...
Return the value converted to a char or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value to be converted @param nullValue The value to be returned if {@link value} is ...
[ "Return", "the", "value", "converted", "to", "a", "char", "or", "the", "specified", "alternate", "value", "if", "the", "original", "value", "is", "null", ".", "Note", "this", "method", "still", "throws", "{", "@link", "IllegalArgumentException", "}", "if", "...
train
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L668-L673
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java
EJSHome.createBeanO
public BeanO createBeanO() throws RemoteException { """ Creates a bean instance for this home. <p> This method is intended to be called by the create methods of entity and SFSB home classes generated by EJBDeploy and JITDeploy. The methods will have been called through home wrappers, so preInvoke will have be...
java
public BeanO createBeanO() throws RemoteException { EJSDeployedSupport s = EJSContainer.getMethodContext(); return createBeanO(s.ivThreadData, s.currentTx, false, null); // d630940 }
[ "public", "BeanO", "createBeanO", "(", ")", "throws", "RemoteException", "{", "EJSDeployedSupport", "s", "=", "EJSContainer", ".", "getMethodContext", "(", ")", ";", "return", "createBeanO", "(", "s", ".", "ivThreadData", ",", "s", ".", "currentTx", ",", "fals...
Creates a bean instance for this home. <p> This method is intended to be called by the create methods of entity and SFSB home classes generated by EJBDeploy and JITDeploy. The methods will have been called through home wrappers, so preInvoke will have been called immediately prior to this method being invoked. <p> Ne...
[ "Creates", "a", "bean", "instance", "for", "this", "home", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java#L1102-L1106
alkacon/opencms-core
src/org/opencms/ui/A_CmsUI.java
A_CmsUI.openPageOrWarn
public void openPageOrWarn(String link, String target, final String warning) { """ Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).<p> @param link the URL to open in the new window @param target the target window name @param warning the w...
java
public void openPageOrWarn(String link, String target, final String warning) { m_windowExtension.open(link, target, new Runnable() { public void run() { Notification.show(warning, Type.ERROR_MESSAGE); } }); }
[ "public", "void", "openPageOrWarn", "(", "String", "link", ",", "String", "target", ",", "final", "String", "warning", ")", "{", "m_windowExtension", ".", "open", "(", "link", ",", "target", ",", "new", "Runnable", "(", ")", "{", "public", "void", "run", ...
Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).<p> @param link the URL to open in the new window @param target the target window name @param warning the warning to show if opening the window fails
[ "Tries", "to", "open", "a", "new", "browser", "window", "and", "shows", "a", "warning", "if", "opening", "the", "window", "fails", "(", "usually", "because", "of", "popup", "blockers", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/A_CmsUI.java#L242-L251
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.updateCategoryUrl
public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) { """ Get Resource Url for UpdateCategory @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. The default value is false. @param cat...
java
public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}"); formatter.formatUrl("cascadeVisi...
[ "public", "static", "MozuUrl", "updateCategoryUrl", "(", "Boolean", "cascadeVisibility", ",", "Integer", "categoryId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/{categor...
Get Resource Url for UpdateCategory @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. The default value is false. @param categoryId Unique identifier of the category to modify. @param responseFields Filtering syntax appended to an API call to incr...
[ "Get", "Resource", "Url", "for", "UpdateCategory" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L135-L142
tomgibara/bits
src/main/java/com/tomgibara/bits/Bits.java
Bits.readerFrom
public static BitReader readerFrom(byte[] bytes, long size) { """ A {@link BitReader} that sources its bits from an array of bytes. Bits are read from the byte array starting at index zero. Within each byte, the most significant bits are read first. @param bytes the source bytes @param size the number of b...
java
public static BitReader readerFrom(byte[] bytes, long size) { if (bytes == null) throw new IllegalArgumentException("null bytes"); checkSize(size, ((long) bytes.length) << 3); return new ByteArrayBitReader(bytes, size); }
[ "public", "static", "BitReader", "readerFrom", "(", "byte", "[", "]", "bytes", ",", "long", "size", ")", "{", "if", "(", "bytes", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"null bytes\"", ")", ";", "checkSize", "(", "size", ",",...
A {@link BitReader} that sources its bits from an array of bytes. Bits are read from the byte array starting at index zero. Within each byte, the most significant bits are read first. @param bytes the source bytes @param size the number of bits that may be read, not negative and no greater than the number of bits supp...
[ "A", "{", "@link", "BitReader", "}", "that", "sources", "its", "bits", "from", "an", "array", "of", "bytes", ".", "Bits", "are", "read", "from", "the", "byte", "array", "starting", "at", "index", "zero", ".", "Within", "each", "byte", "the", "most", "s...
train
https://github.com/tomgibara/bits/blob/56c32c0a30efd3d7c4e7c6600a0ca39e51eecc97/src/main/java/com/tomgibara/bits/Bits.java#L725-L729
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/ExceptionFactory.java
ExceptionFactory.clientVersionNotFoundException
public static final ClientVersionNotFoundException clientVersionNotFoundException(String clientId, String version) { """ Creates an exception from an client id and version. @param clientId the client id @param version the client version @return the exception """ return new ClientVersionNotFoundExcep...
java
public static final ClientVersionNotFoundException clientVersionNotFoundException(String clientId, String version) { return new ClientVersionNotFoundException(Messages.i18n.format("clientVersionDoesNotExist", clientId, version)); //$NON-NLS-1$ }
[ "public", "static", "final", "ClientVersionNotFoundException", "clientVersionNotFoundException", "(", "String", "clientId", ",", "String", "version", ")", "{", "return", "new", "ClientVersionNotFoundException", "(", "Messages", ".", "i18n", ".", "format", "(", "\"client...
Creates an exception from an client id and version. @param clientId the client id @param version the client version @return the exception
[ "Creates", "an", "exception", "from", "an", "client", "id", "and", "version", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/ExceptionFactory.java#L183-L185
ggrandes/kvstore
src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java
BplusTree.floorEntry
public synchronized TreeEntry<K, V> floorEntry(final K key) { """ Returns the greatest key less than or equal to the given key, or null if there is no such key. @param key the key @return the Entry with greatest key less than or equal to key, or null if there is no such key """ // Retorna la clave mas ce...
java
public synchronized TreeEntry<K, V> floorEntry(final K key) { // Retorna la clave mas cercana menor o igual a la clave indicada return getRoundEntry(key, false, true); }
[ "public", "synchronized", "TreeEntry", "<", "K", ",", "V", ">", "floorEntry", "(", "final", "K", "key", ")", "{", "// Retorna la clave mas cercana menor o igual a la clave indicada", "return", "getRoundEntry", "(", "key", ",", "false", ",", "true", ")", ";", "}" ]
Returns the greatest key less than or equal to the given key, or null if there is no such key. @param key the key @return the Entry with greatest key less than or equal to key, or null if there is no such key
[ "Returns", "the", "greatest", "key", "less", "than", "or", "equal", "to", "the", "given", "key", "or", "null", "if", "there", "is", "no", "such", "key", "." ]
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java#L660-L663
marklogic/marklogic-contentpump
mlcp/src/main/java/com/marklogic/contentpump/utilities/EncodingUtil.java
EncodingUtil.handleBOMUTF8
public static void handleBOMUTF8(String[] vales, int i) { """ Oracle jdk bug 4508058: UTF-8 encoding does not recognize initial BOM, and it will not be fixed. Work Around : Application code must recognize and skip the BOM itself. """ byte[] buf = vales[i].getBytes(); if (LOG.isDebugEnabled()...
java
public static void handleBOMUTF8(String[] vales, int i) { byte[] buf = vales[i].getBytes(); if (LOG.isDebugEnabled()) { StringBuilder sb = new StringBuilder(); for (byte b : buf) { sb.append(Byte.toString(b)); sb.append(" "); } ...
[ "public", "static", "void", "handleBOMUTF8", "(", "String", "[", "]", "vales", ",", "int", "i", ")", "{", "byte", "[", "]", "buf", "=", "vales", "[", "i", "]", ".", "getBytes", "(", ")", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")"...
Oracle jdk bug 4508058: UTF-8 encoding does not recognize initial BOM, and it will not be fixed. Work Around : Application code must recognize and skip the BOM itself.
[ "Oracle", "jdk", "bug", "4508058", ":", "UTF", "-", "8", "encoding", "does", "not", "recognize", "initial", "BOM", "and", "it", "will", "not", "be", "fixed", ".", "Work", "Around", ":", "Application", "code", "must", "recognize", "and", "skip", "the", "B...
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mlcp/src/main/java/com/marklogic/contentpump/utilities/EncodingUtil.java#L29-L44
phoenixnap/springmvc-raml-plugin
src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/NamingHelper.java
NamingHelper.convertActionTypeToIntent
private static String convertActionTypeToIntent(RamlActionType actionType, boolean isIdInPath) { """ Attempts to convert the Http Verb into a textual representation of Intent based on REST conventions @param actionType The ActionType/Http verb of the action @param isIdInPath True if the path contains an Id ...
java
private static String convertActionTypeToIntent(RamlActionType actionType, boolean isIdInPath) { switch (actionType) { case DELETE: return "delete"; case GET: return "get"; case POST: if (!isIdInPath) { return "create"; } case PUT: return "update"; case PATCH: return "modif...
[ "private", "static", "String", "convertActionTypeToIntent", "(", "RamlActionType", "actionType", ",", "boolean", "isIdInPath", ")", "{", "switch", "(", "actionType", ")", "{", "case", "DELETE", ":", "return", "\"delete\"", ";", "case", "GET", ":", "return", "\"g...
Attempts to convert the Http Verb into a textual representation of Intent based on REST conventions @param actionType The ActionType/Http verb of the action @param isIdInPath True if the path contains an Id meaning that it must be an idempotent operation, i.e. PUT @return method name prefix
[ "Attempts", "to", "convert", "the", "Http", "Verb", "into", "a", "textual", "representation", "of", "Intent", "based", "on", "REST", "conventions" ]
train
https://github.com/phoenixnap/springmvc-raml-plugin/blob/6387072317cd771eb7d6f30943f556ac20dd3c84/src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/NamingHelper.java#L632-L649
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java
OntologyBuilderImpl.addSubClassOfAxiom
@Override public void addSubClassOfAxiom(ClassExpression ce1, ClassExpression ce2) throws InconsistentOntologyException { """ Normalizes and adds subclass axiom <p> SubClassOf := 'SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')' <p> Implements rule [C1]:<br> - ignore the axiom ...
java
@Override public void addSubClassOfAxiom(ClassExpression ce1, ClassExpression ce2) throws InconsistentOntologyException { checkSignature(ce1); checkSignature(ce2); if (ce1.isTop()) ce1 = ClassImpl.owlThing; // rules [D5] and [O5] classAxioms.addInclusion(ce1, ce2); }
[ "@", "Override", "public", "void", "addSubClassOfAxiom", "(", "ClassExpression", "ce1", ",", "ClassExpression", "ce2", ")", "throws", "InconsistentOntologyException", "{", "checkSignature", "(", "ce1", ")", ";", "checkSignature", "(", "ce2", ")", ";", "if", "(", ...
Normalizes and adds subclass axiom <p> SubClassOf := 'SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')' <p> Implements rule [C1]:<br> - ignore the axiom if the first argument is owl:Nothing or the second argument is owl:Thing<br> - replace by a disjointness axiom if the second argument is owl...
[ "Normalizes", "and", "adds", "subclass", "axiom", "<p", ">", "SubClassOf", ":", "=", "SubClassOf", "(", "axiomAnnotations", "subClassExpression", "superClassExpression", ")", "<p", ">", "Implements", "rule", "[", "C1", "]", ":", "<br", ">", "-", "ignore", "the...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java#L212-L219
gallandarakhneorg/afc
advanced/bootique/bootique-synopsishelp/src/main/java/org/arakhne/afc/bootique/synopsishelp/help/SynopsisHelpGenerator.java
SynopsisHelpGenerator.printDetailedDescription
@SuppressWarnings("static-method") protected void printDetailedDescription(SynopsisHelpAppender out, String detailedDescription) { """ Print the detailed description of the command. @param out the output receiver. @param detailedDescription the detailed description of the application. """ if (!Strings.i...
java
@SuppressWarnings("static-method") protected void printDetailedDescription(SynopsisHelpAppender out, String detailedDescription) { if (!Strings.isNullOrEmpty(detailedDescription)) { out.printSectionName(DETAILED_DESCRIPTION); out.printLongDescription(detailedDescription.split("[\r\n\f]+")); //$NON-NLS-1$ } ...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "void", "printDetailedDescription", "(", "SynopsisHelpAppender", "out", ",", "String", "detailedDescription", ")", "{", "if", "(", "!", "Strings", ".", "isNullOrEmpty", "(", "detailedDescription", ")...
Print the detailed description of the command. @param out the output receiver. @param detailedDescription the detailed description of the application.
[ "Print", "the", "detailed", "description", "of", "the", "command", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-synopsishelp/src/main/java/org/arakhne/afc/bootique/synopsishelp/help/SynopsisHelpGenerator.java#L125-L131
google/allocation-instrumenter
src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java
AllocationMethodAdapter.visitMultiANewArrayInsn
@Override public void visitMultiANewArrayInsn(String typeName, int dimCount) { """ multianewarray gets its very own visit method in the ASM framework, so we hook it here. This bytecode is different from most in that it consumes a variable number of stack elements during execution. The number of stack elements ...
java
@Override public void visitMultiANewArrayInsn(String typeName, int dimCount) { // stack: ... dim1 dim2 dim3 ... dimN super.visitMultiANewArrayInsn(typeName, dimCount); // -> stack: ... aref calculateArrayLengthAndDispatch(typeName, dimCount); }
[ "@", "Override", "public", "void", "visitMultiANewArrayInsn", "(", "String", "typeName", ",", "int", "dimCount", ")", "{", "// stack: ... dim1 dim2 dim3 ... dimN", "super", ".", "visitMultiANewArrayInsn", "(", "typeName", ",", "dimCount", ")", ";", "// -> stack: ... are...
multianewarray gets its very own visit method in the ASM framework, so we hook it here. This bytecode is different from most in that it consumes a variable number of stack elements during execution. The number of stack elements consumed is specified by the dimCount operand.
[ "multianewarray", "gets", "its", "very", "own", "visit", "method", "in", "the", "ASM", "framework", "so", "we", "hook", "it", "here", ".", "This", "bytecode", "is", "different", "from", "most", "in", "that", "it", "consumes", "a", "variable", "number", "of...
train
https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java#L523-L529
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java
FactoryThresholdBinary.blockMean
public static <T extends ImageGray<T>> InputToBinary<T> blockMean(ConfigLength regionWidth, double scale , boolean down, boolean thresholdFromLocalBlocks, Class<T> inputType) { """ Applies a non-overlapping block mean threshold @see ThresholdBlockMean @param scale Scale factor adjust for threshold...
java
public static <T extends ImageGray<T>> InputToBinary<T> blockMean(ConfigLength regionWidth, double scale , boolean down, boolean thresholdFromLocalBlocks, Class<T> inputType) { if( BOverrideFactoryThresholdBinary.blockMean != null ) return BOverrideFactoryThresholdBinary.blockMean.handle(regionWidth, sc...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InputToBinary", "<", "T", ">", "blockMean", "(", "ConfigLength", "regionWidth", ",", "double", "scale", ",", "boolean", "down", ",", "boolean", "thresholdFromLocalBlocks", ",", "Class",...
Applies a non-overlapping block mean threshold @see ThresholdBlockMean @param scale Scale factor adjust for threshold. 1.0 means no change. @param down Should it threshold up or down. @param regionWidth Approximate size of block region @param inputType Type of input image @return Filter to binary
[ "Applies", "a", "non", "-", "overlapping", "block", "mean", "threshold" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L186-L204
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java
AbstractAsymmetricCrypto.encryptHex
public String encryptHex(String data, KeyType keyType) { """ 编码为Hex字符串 @param data 被加密的字符串 @param keyType 私钥或公钥 {@link KeyType} @return Hex字符串 @since 4.0.1 """ return HexUtil.encodeHexStr(encrypt(data, keyType)); }
java
public String encryptHex(String data, KeyType keyType) { return HexUtil.encodeHexStr(encrypt(data, keyType)); }
[ "public", "String", "encryptHex", "(", "String", "data", ",", "KeyType", "keyType", ")", "{", "return", "HexUtil", ".", "encodeHexStr", "(", "encrypt", "(", "data", ",", "keyType", ")", ")", ";", "}" ]
编码为Hex字符串 @param data 被加密的字符串 @param keyType 私钥或公钥 {@link KeyType} @return Hex字符串 @since 4.0.1
[ "编码为Hex字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L112-L114
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/transducers/MealyFilter.java
MealyFilter.retainTransitionsWithOutput
@SafeVarargs public static <I, O> CompactMealy<I, O> retainTransitionsWithOutput(MealyMachine<?, I, ?, O> in, Alphabet<I> inputs, O... outputs) { """ Returns a Mealy m...
java
@SafeVarargs public static <I, O> CompactMealy<I, O> retainTransitionsWithOutput(MealyMachine<?, I, ?, O> in, Alphabet<I> inputs, O... outputs) { return retainTrans...
[ "@", "SafeVarargs", "public", "static", "<", "I", ",", "O", ">", "CompactMealy", "<", "I", ",", "O", ">", "retainTransitionsWithOutput", "(", "MealyMachine", "<", "?", ",", "I", ",", "?", ",", "O", ">", "in", ",", "Alphabet", "<", "I", ">", "inputs",...
Returns a Mealy machine with all transitions removed that have an output not among the specified values. The resulting Mealy machine will not contain any unreachable states. <p> This is a convenience varargs overload of {@link #retainTransitionsWithOutput(MealyMachine, Alphabet, Collection)}. @param in the input Mealy...
[ "Returns", "a", "Mealy", "machine", "with", "all", "transitions", "removed", "that", "have", "an", "output", "not", "among", "the", "specified", "values", ".", "The", "resulting", "Mealy", "machine", "will", "not", "contain", "any", "unreachable", "states", "....
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/transducers/MealyFilter.java#L118-L123
tdomzal/junit-docker-rule
src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java
DockerRuleBuilder.waitForMessage
public DockerRuleBuilder waitForMessage(String waitForMessage, int waitSeconds) { """ Like {@link #waitForMessage(String)} with specified max wait time. @param waitForMessage Message to wait for. @param waitSeconds Number of seconds to wait. @deprecated Use two separate calls instead: (1) {@link #waitFor(St...
java
public DockerRuleBuilder waitForMessage(String waitForMessage, int waitSeconds) { this.waitConditions.add(WaitFor.logMessage(waitForMessage)); this.waitForSeconds = waitSeconds; return this; }
[ "public", "DockerRuleBuilder", "waitForMessage", "(", "String", "waitForMessage", ",", "int", "waitSeconds", ")", "{", "this", ".", "waitConditions", ".", "add", "(", "WaitFor", ".", "logMessage", "(", "waitForMessage", ")", ")", ";", "this", ".", "waitForSecond...
Like {@link #waitForMessage(String)} with specified max wait time. @param waitForMessage Message to wait for. @param waitSeconds Number of seconds to wait. @deprecated Use two separate calls instead: (1) {@link #waitFor(StartCondition)} with {@link WaitFor#logMessage(String)} as argument, (2) {@link #waitForTimeout(i...
[ "Like", "{", "@link", "#waitForMessage", "(", "String", ")", "}", "with", "specified", "max", "wait", "time", "." ]
train
https://github.com/tdomzal/junit-docker-rule/blob/5a0ba2fd095d201530d3f9e614bc5e88d0afaeb2/src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java#L131-L135
belaban/JGroups
src/org/jgroups/stack/Configurator.java
Configurator.setupProtocolStack
public static Protocol setupProtocolStack(List<ProtocolConfiguration> protocol_configs, ProtocolStack st) throws Exception { """ The configuration string has a number of entries, separated by a ':' (colon). Each entry consists of the name of the protocol, followed by an optional configuration of that protocol. T...
java
public static Protocol setupProtocolStack(List<ProtocolConfiguration> protocol_configs, ProtocolStack st) throws Exception { List<Protocol> protocols=createProtocols(protocol_configs, st); if(protocols == null) return null; // check InetAddress related features of stack ...
[ "public", "static", "Protocol", "setupProtocolStack", "(", "List", "<", "ProtocolConfiguration", ">", "protocol_configs", ",", "ProtocolStack", "st", ")", "throws", "Exception", "{", "List", "<", "Protocol", ">", "protocols", "=", "createProtocols", "(", "protocol_c...
The configuration string has a number of entries, separated by a ':' (colon). Each entry consists of the name of the protocol, followed by an optional configuration of that protocol. The configuration is enclosed in parentheses, and contains entries which are name/value pairs connected with an assignment sign (=) and s...
[ "The", "configuration", "string", "has", "a", "number", "of", "entries", "separated", "by", "a", ":", "(", "colon", ")", ".", "Each", "entry", "consists", "of", "the", "name", "of", "the", "protocol", "followed", "by", "an", "optional", "configuration", "o...
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/stack/Configurator.java#L82-L114
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.getFragment
@GwtIncompatible("incompatible method") private static long getFragment(final Calendar calendar, final int fragment, final TimeUnit unit) { """ Gets a Calendar fragment for any unit. @param calendar the calendar to work with, not null @param fragment the Calendar field part of calendar to calculate @param...
java
@GwtIncompatible("incompatible method") private static long getFragment(final Calendar calendar, final int fragment, final TimeUnit unit) { if(calendar == null) { throw new IllegalArgumentException("The date must not be null"); } long result = 0; final int offset = (un...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "private", "static", "long", "getFragment", "(", "final", "Calendar", "calendar", ",", "final", "int", "fragment", ",", "final", "TimeUnit", "unit", ")", "{", "if", "(", "calendar", "==", "null", ")"...
Gets a Calendar fragment for any unit. @param calendar the calendar to work with, not null @param fragment the Calendar field part of calendar to calculate @param unit the time unit @return number of units within the fragment of the calendar @throws IllegalArgumentException if the date is <code>null</code> or fragment...
[ "Gets", "a", "Calendar", "fragment", "for", "any", "unit", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L1683-L1728
vkostyukov/la4j
src/main/java/org/la4j/Vectors.java
Vectors.mkMaxAccumulator
public static VectorAccumulator mkMaxAccumulator() { """ Makes a maximum vector accumulator that accumulates the maximum across vector elements. @return a maximum vector accumulator """ return new VectorAccumulator() { private double result = Double.NEGATIVE_INFINITY; @Overr...
java
public static VectorAccumulator mkMaxAccumulator() { return new VectorAccumulator() { private double result = Double.NEGATIVE_INFINITY; @Override public void update(int i, double value) { result = Math.max(result, value); } @Override ...
[ "public", "static", "VectorAccumulator", "mkMaxAccumulator", "(", ")", "{", "return", "new", "VectorAccumulator", "(", ")", "{", "private", "double", "result", "=", "Double", ".", "NEGATIVE_INFINITY", ";", "@", "Override", "public", "void", "update", "(", "int",...
Makes a maximum vector accumulator that accumulates the maximum across vector elements. @return a maximum vector accumulator
[ "Makes", "a", "maximum", "vector", "accumulator", "that", "accumulates", "the", "maximum", "across", "vector", "elements", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Vectors.java#L305-L321
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java
AbstractJsonProvider.removeProperty
@SuppressWarnings("unchecked") public void removeProperty(Object obj, Object key) { """ Removes a value in an object or array @param obj an array or an object @param key a String key or a numerical index to remove """ if (isMap(obj)) ((Map) obj).remove(key.toString()); e...
java
@SuppressWarnings("unchecked") public void removeProperty(Object obj, Object key) { if (isMap(obj)) ((Map) obj).remove(key.toString()); else { List list = (List) obj; int index = key instanceof Integer ? (Integer) key : Integer.parseInt(key.toString()); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "removeProperty", "(", "Object", "obj", ",", "Object", "key", ")", "{", "if", "(", "isMap", "(", "obj", ")", ")", "(", "(", "Map", ")", "obj", ")", ".", "remove", "(", "key", ".", ...
Removes a value in an object or array @param obj an array or an object @param key a String key or a numerical index to remove
[ "Removes", "a", "value", "in", "an", "object", "or", "array" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java#L105-L114
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VFS.java
VFS.mountZip
public static Closeable mountZip(File zipFile, VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException { """ Create and mount a zip file into the filesystem, returning a single handle which will unmount and close the file system when closed. @param zipFile the zip file to mount ...
java
public static Closeable mountZip(File zipFile, VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException { boolean ok = false; final TempDir tempDir = tempFileProvider.createTempDir(zipFile.getName()); try { final MountHandle handle = doMount(new JavaZipFileSystem...
[ "public", "static", "Closeable", "mountZip", "(", "File", "zipFile", ",", "VirtualFile", "mountPoint", ",", "TempFileProvider", "tempFileProvider", ")", "throws", "IOException", "{", "boolean", "ok", "=", "false", ";", "final", "TempDir", "tempDir", "=", "tempFile...
Create and mount a zip file into the filesystem, returning a single handle which will unmount and close the file system when closed. @param zipFile the zip file to mount @param mountPoint the point at which the filesystem should be mounted @param tempFileProvider the temporary file provider @return a ha...
[ "Create", "and", "mount", "a", "zip", "file", "into", "the", "filesystem", "returning", "a", "single", "handle", "which", "will", "unmount", "and", "close", "the", "file", "system", "when", "closed", "." ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VFS.java#L314-L326
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/bibtex/DateParser.java
DateParser.toDateRange
public static CSLDate toDateRange(String year, String month) { """ Parses the given year and month to a {@link CSLDate} object. Handles date ranges such as <code>xx-xx</code>. @param year the year to parse. Should be a four-digit number or a String whose last four characters are digits. @param month the month ...
java
public static CSLDate toDateRange(String year, String month) { //check if there's a date range, parse elements //individually and merge them afterwards String[] ms = null; if (month != null) { ms = month.split("-+|\u2013+"); } String[] ys = null; if (year != null) { ys = year.split("-+|\u2013+"); ...
[ "public", "static", "CSLDate", "toDateRange", "(", "String", "year", ",", "String", "month", ")", "{", "//check if there's a date range, parse elements", "//individually and merge them afterwards", "String", "[", "]", "ms", "=", "null", ";", "if", "(", "month", "!=", ...
Parses the given year and month to a {@link CSLDate} object. Handles date ranges such as <code>xx-xx</code>. @param year the year to parse. Should be a four-digit number or a String whose last four characters are digits. @param month the month to parse. May be a number (<code>1-12</code>), a short month name (<code>Jan...
[ "Parses", "the", "given", "year", "and", "month", "to", "a", "{" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/bibtex/DateParser.java#L115-L139
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.deleteKeyAsync
public Observable<DeletedKeyBundle> deleteKeyAsync(String vaultBaseUrl, String keyName) { """ Deletes a key of any type from storage in Azure Key Vault. The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which ...
java
public Observable<DeletedKeyBundle> deleteKeyAsync(String vaultBaseUrl, String keyName) { return deleteKeyWithServiceResponseAsync(vaultBaseUrl, keyName).map(new Func1<ServiceResponse<DeletedKeyBundle>, DeletedKeyBundle>() { @Override public DeletedKeyBundle call(ServiceResponse<DeletedK...
[ "public", "Observable", "<", "DeletedKeyBundle", ">", "deleteKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ")", "{", "return", "deleteKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ")", ".", "map", "(", "new", "Func1", "<"...
Deletes a key of any type from storage in Azure Key Vault. The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations. This operati...
[ "Deletes", "a", "key", "of", "any", "type", "from", "storage", "in", "Azure", "Key", "Vault", ".", "The", "delete", "key", "operation", "cannot", "be", "used", "to", "remove", "individual", "versions", "of", "a", "key", ".", "This", "operation", "removes",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1114-L1121
mapbox/mapbox-java
services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java
TurfMeasurement.length
public static double length(@NonNull Polygon polygon, @NonNull @TurfConstants.TurfUnitCriteria String units) { """ Takes a {@link Polygon} and measures its perimeter in the specified units. if the polygon contains holes, the perimeter will also be included. @param polygon geometry...
java
public static double length(@NonNull Polygon polygon, @NonNull @TurfConstants.TurfUnitCriteria String units) { double len = 0; for (List<Point> points : polygon.coordinates()) { len += length(points, units); } return len; }
[ "public", "static", "double", "length", "(", "@", "NonNull", "Polygon", "polygon", ",", "@", "NonNull", "@", "TurfConstants", ".", "TurfUnitCriteria", "String", "units", ")", "{", "double", "len", "=", "0", ";", "for", "(", "List", "<", "Point", ">", "po...
Takes a {@link Polygon} and measures its perimeter in the specified units. if the polygon contains holes, the perimeter will also be included. @param polygon geometry to measure @param units one of the units found inside {@link TurfConstants.TurfUnitCriteria} @return total perimeter of the input polygon in the units...
[ "Takes", "a", "{", "@link", "Polygon", "}", "and", "measures", "its", "perimeter", "in", "the", "specified", "units", ".", "if", "the", "polygon", "contains", "holes", "the", "perimeter", "will", "also", "be", "included", "." ]
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java#L174-L181
infinispan/infinispan
core/src/main/java/org/infinispan/distribution/ch/impl/AbstractConsistentHash.java
AbstractConsistentHash.mergeLists
protected static void mergeLists(List<Address> dest, List<Address> src) { """ Adds all elements from <code>src</code> list that do not already exist in <code>dest</code> list to the latter. @param dest List where elements are added @param src List of elements to add - this is never modified """ for (...
java
protected static void mergeLists(List<Address> dest, List<Address> src) { for (Address node : src) { if (!dest.contains(node)) { dest.add(node); } } }
[ "protected", "static", "void", "mergeLists", "(", "List", "<", "Address", ">", "dest", ",", "List", "<", "Address", ">", "src", ")", "{", "for", "(", "Address", "node", ":", "src", ")", "{", "if", "(", "!", "dest", ".", "contains", "(", "node", ")"...
Adds all elements from <code>src</code> list that do not already exist in <code>dest</code> list to the latter. @param dest List where elements are added @param src List of elements to add - this is never modified
[ "Adds", "all", "elements", "from", "<code", ">", "src<", "/", "code", ">", "list", "that", "do", "not", "already", "exist", "in", "<code", ">", "dest<", "/", "code", ">", "list", "to", "the", "latter", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/ch/impl/AbstractConsistentHash.java#L139-L145
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/URIDestinationCreator.java
URIDestinationCreator.createDestinationFromURI
public Destination createDestinationFromURI(String uri, int qmProcessing) throws JMSException { """ Create a Destination object from a full URI format String. @param uri The URI format string describing the destination. If null, method returns null. If not null, must begin with either queue:// or topic://, other...
java
public Destination createDestinationFromURI(String uri, int qmProcessing) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createDestinationFromURI", new Object[]{uri, qmProcessing}); Destination result = null; if (uri != null) { result = pr...
[ "public", "Destination", "createDestinationFromURI", "(", "String", "uri", ",", "int", "qmProcessing", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr...
Create a Destination object from a full URI format String. @param uri The URI format string describing the destination. If null, method returns null. If not null, must begin with either queue:// or topic://, otherwise an ?? exception is thrown. @param qmProcessing flag to indicate how to deal with QMs in MA88 queue URI...
[ "Create", "a", "Destination", "object", "from", "a", "full", "URI", "format", "String", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/URIDestinationCreator.java#L993-L1001
guardtime/ksi-java-sdk
ksi-api/src/main/java/com/guardtime/ksi/PublicationsHandlerBuilder.java
PublicationsHandlerBuilder.setPublicationsFilePkiTrustStore
public PublicationsHandlerBuilder setPublicationsFilePkiTrustStore(File file, String password) throws KSIException { """ Loads the {@link KeyStore} from the file system and sets the {@link KeyStore} to be used as truststore to verify the certificate that was used to sign the publications file. @param file key...
java
public PublicationsHandlerBuilder setPublicationsFilePkiTrustStore(File file, String password) throws KSIException { this.trustStore = Util.loadKeyStore(file, password); return this; }
[ "public", "PublicationsHandlerBuilder", "setPublicationsFilePkiTrustStore", "(", "File", "file", ",", "String", "password", ")", "throws", "KSIException", "{", "this", ".", "trustStore", "=", "Util", ".", "loadKeyStore", "(", "file", ",", "password", ")", ";", "re...
Loads the {@link KeyStore} from the file system and sets the {@link KeyStore} to be used as truststore to verify the certificate that was used to sign the publications file. @param file keystore file on disk, not null. @param password password of the keystore, null if keystore isn't protected by password. @return Inst...
[ "Loads", "the", "{", "@link", "KeyStore", "}", "from", "the", "file", "system", "and", "sets", "the", "{", "@link", "KeyStore", "}", "to", "be", "used", "as", "truststore", "to", "verify", "the", "certificate", "that", "was", "used", "to", "sign", "the",...
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-api/src/main/java/com/guardtime/ksi/PublicationsHandlerBuilder.java#L93-L96
BioPAX/Paxtools
paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java
QueryExecuter.runCommonStreamWithPOI
public static Set<BioPAXElement> runCommonStreamWithPOI( Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit, Filter... filters) { """ First finds the common stream, then completes it with the paths between seed and common stream. @param sourceSet Seed to the query @param model B...
java
public static Set<BioPAXElement> runCommonStreamWithPOI( Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit, Filter... filters) { Graph graph; if (model.getLevel() == BioPAXLevel.L3) { graph = new GraphL3(model, filters); } else return Collections.emptySet(); Collectio...
[ "public", "static", "Set", "<", "BioPAXElement", ">", "runCommonStreamWithPOI", "(", "Set", "<", "BioPAXElement", ">", "sourceSet", ",", "Model", "model", ",", "Direction", "direction", ",", "int", "limit", ",", "Filter", "...", "filters", ")", "{", "Graph", ...
First finds the common stream, then completes it with the paths between seed and common stream. @param sourceSet Seed to the query @param model BioPAX model @param direction UPSTREAM or DOWNSTREAM @param limit Length limit for the search @param filters for filtering graph elements @return BioPAX elements in the result
[ "First", "finds", "the", "common", "stream", "then", "completes", "it", "with", "the", "paths", "between", "seed", "and", "common", "stream", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L331-L351
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.createSeries
public Result<Series> createSeries(Series series) { """ Creates a Series @param series The Series to create @return The created Series @since 1.0.0 @throws NullPointerException If the input Series is null. """ checkNotNull(series); URI uri = null; try { URIBuilder builder = new URIBuil...
java
public Result<Series> createSeries(Series series) { checkNotNull(series); URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/", API_VERSION)); uri = builder.build(); } catch (URISyntaxException e) { String message = "Could not build URI"; throw n...
[ "public", "Result", "<", "Series", ">", "createSeries", "(", "Series", "series", ")", "{", "checkNotNull", "(", "series", ")", ";", "URI", "uri", "=", "null", ";", "try", "{", "URIBuilder", "builder", "=", "new", "URIBuilder", "(", "String", ".", "format...
Creates a Series @param series The Series to create @return The created Series @since 1.0.0 @throws NullPointerException If the input Series is null.
[ "Creates", "a", "Series", "@param", "series", "The", "Series", "to", "create", "@return", "The", "created", "Series" ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L159-L184
census-instrumentation/opencensus-java
contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java
DropWizardMetrics.collectHistogram
private Metric collectHistogram(String dropwizardName, Histogram histogram) { """ Returns a {@code Metric} collected from {@link Histogram}. @param dropwizardName the metric name. @param histogram the histogram object to collect @return a {@code Metric}. """ String metricName = DropWizardUtils.generat...
java
private Metric collectHistogram(String dropwizardName, Histogram histogram) { String metricName = DropWizardUtils.generateFullMetricName(dropwizardName, "histogram"); String metricDescription = DropWizardUtils.generateFullMetricDescription(dropwizardName, histogram); return collectSnapshotAndCount( ...
[ "private", "Metric", "collectHistogram", "(", "String", "dropwizardName", ",", "Histogram", "histogram", ")", "{", "String", "metricName", "=", "DropWizardUtils", ".", "generateFullMetricName", "(", "dropwizardName", ",", "\"histogram\"", ")", ";", "String", "metricDe...
Returns a {@code Metric} collected from {@link Histogram}. @param dropwizardName the metric name. @param histogram the histogram object to collect @return a {@code Metric}.
[ "Returns", "a", "{", "@code", "Metric", "}", "collected", "from", "{", "@link", "Histogram", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java#L195-L201
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/cli/CommandLineParser.java
CommandLineParser.addOption
@Override public CommandLineParser addOption(String name, String description) { """ Adds a declared option. @param name The name of the option @param description The description """ int length = name.length(); if (length > longestOptionNameLength) { longestOptionNameL...
java
@Override public CommandLineParser addOption(String name, String description) { int length = name.length(); if (length > longestOptionNameLength) { longestOptionNameLength = length; } declaredOptions.put(name, new Option(name, description)); return this; }
[ "@", "Override", "public", "CommandLineParser", "addOption", "(", "String", "name", ",", "String", "description", ")", "{", "int", "length", "=", "name", ".", "length", "(", ")", ";", "if", "(", "length", ">", "longestOptionNameLength", ")", "{", "longestOpt...
Adds a declared option. @param name The name of the option @param description The description
[ "Adds", "a", "declared", "option", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/cli/CommandLineParser.java#L52-L60
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMultiFileWidget.java
WMultiFileWidget.doHandleFileAjaxActionRequest
protected void doHandleFileAjaxActionRequest(final Request request) { """ Handle a file action AJAX request. @param request the request being processed """ // Protect against client-side tampering of disabled components if (isDisabled()) { throw new SystemException("File widget is disabled."); } ...
java
protected void doHandleFileAjaxActionRequest(final Request request) { // Protect against client-side tampering of disabled components if (isDisabled()) { throw new SystemException("File widget is disabled."); } // Check for file id String fileId = request.getParameter(FILE_UPLOAD_ID_KEY); if (fileId == ...
[ "protected", "void", "doHandleFileAjaxActionRequest", "(", "final", "Request", "request", ")", "{", "// Protect against client-side tampering of disabled components", "if", "(", "isDisabled", "(", ")", ")", "{", "throw", "new", "SystemException", "(", "\"File widget is disa...
Handle a file action AJAX request. @param request the request being processed
[ "Handle", "a", "file", "action", "AJAX", "request", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMultiFileWidget.java#L647-L681
carewebframework/carewebframework-core
org.carewebframework.messaging-parent/org.carewebframework.messaging.jms-parent/org.carewebframework.messaging.jms.core/src/main/java/org/carewebframework/messaging/jms/JMSUtil.java
JMSUtil.getMessageSelector
public static String getMessageSelector(String eventName, IPublisherInfo publisherInfo) { """ Creates a message selector which considers JMSType and recipients properties. @param eventName The event name (i.e. DESKTOP.LOCK). @param publisherInfo Info on the publisher. If null, then no recipients properties are...
java
public static String getMessageSelector(String eventName, IPublisherInfo publisherInfo) { StringBuilder sb = new StringBuilder( "(JMSType='" + eventName + "' OR JMSType LIKE '" + eventName + ".%') AND (Recipients IS NULL"); if (publisherInfo != null) { for (String se...
[ "public", "static", "String", "getMessageSelector", "(", "String", "eventName", ",", "IPublisherInfo", "publisherInfo", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"(JMSType='\"", "+", "eventName", "+", "\"' OR JMSType LIKE '\"", "+", "eventNa...
Creates a message selector which considers JMSType and recipients properties. @param eventName The event name (i.e. DESKTOP.LOCK). @param publisherInfo Info on the publisher. If null, then no recipients properties are added. @return The message selector.
[ "Creates", "a", "message", "selector", "which", "considers", "JMSType", "and", "recipients", "properties", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.messaging-parent/org.carewebframework.messaging.jms-parent/org.carewebframework.messaging.jms.core/src/main/java/org/carewebframework/messaging/jms/JMSUtil.java#L97-L109
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.getByGuids
@GET @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids) throws AtlasBaseException { """ Bulk API to retrieve list of entities identified by its GUIDs. """ AtlasPerfTrac...
java
@GET @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfTraceEnable...
[ "@", "GET", "@", "Path", "(", "\"/bulk\"", ")", "@", "Consumes", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasEntitiesWithExtInfo", "getByGuids", "(", "@", "QueryParam", "(", "\"gu...
Bulk API to retrieve list of entities identified by its GUIDs.
[ "Bulk", "API", "to", "retrieve", "list", "of", "entities", "identified", "by", "its", "GUIDs", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L413-L433
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newAssertionException
public static AssertionException newAssertionException(String message, Object... args) { """ Constructs and initializes a new {@link AssertionException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link AssertionExcept...
java
public static AssertionException newAssertionException(String message, Object... args) { return newAssertionException(null, message, args); }
[ "public", "static", "AssertionException", "newAssertionException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newAssertionException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link AssertionException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link AssertionException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@l...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "AssertionException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L243-L245
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/S3V4AuthErrorRetryStrategy.java
S3V4AuthErrorRetryStrategy.redirectToS3External
private AuthRetryParameters redirectToS3External() { """ If the response doesn't have the x-amz-region header we have to resort to sending a request to s3-external-1 @return """ AWSS3V4Signer v4Signer = buildSigV4Signer(Regions.US_EAST_1.getName()); try { URI bucketEndpoint = ne...
java
private AuthRetryParameters redirectToS3External() { AWSS3V4Signer v4Signer = buildSigV4Signer(Regions.US_EAST_1.getName()); try { URI bucketEndpoint = new URI( String.format("https://%s.s3-external-1.amazonaws.com", endpointResolver.getBucketName())); return ...
[ "private", "AuthRetryParameters", "redirectToS3External", "(", ")", "{", "AWSS3V4Signer", "v4Signer", "=", "buildSigV4Signer", "(", "Regions", ".", "US_EAST_1", ".", "getName", "(", ")", ")", ";", "try", "{", "URI", "bucketEndpoint", "=", "new", "URI", "(", "S...
If the response doesn't have the x-amz-region header we have to resort to sending a request to s3-external-1 @return
[ "If", "the", "response", "doesn", "t", "have", "the", "x", "-", "amz", "-", "region", "header", "we", "have", "to", "resort", "to", "sending", "a", "request", "to", "s3", "-", "external", "-", "1" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/S3V4AuthErrorRetryStrategy.java#L97-L107
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/TopicsMessagesBroadcaster.java
TopicsMessagesBroadcaster.checkMessageTopic
void checkMessageTopic(UserContext ctx, String topic, Object payload, JsTopicMessageController msgControl) throws NotRecipientException { """ Check if message is granted by messageControl @param ctx @param mtc @param msgControl @return @throws NotRecipientException """ if (null != msgControl) { m...
java
void checkMessageTopic(UserContext ctx, String topic, Object payload, JsTopicMessageController msgControl) throws NotRecipientException { if (null != msgControl) { msgControl.checkRight(ctx, topic, payload); } }
[ "void", "checkMessageTopic", "(", "UserContext", "ctx", ",", "String", "topic", ",", "Object", "payload", ",", "JsTopicMessageController", "msgControl", ")", "throws", "NotRecipientException", "{", "if", "(", "null", "!=", "msgControl", ")", "{", "msgControl", "."...
Check if message is granted by messageControl @param ctx @param mtc @param msgControl @return @throws NotRecipientException
[ "Check", "if", "message", "is", "granted", "by", "messageControl" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/TopicsMessagesBroadcaster.java#L143-L147
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_mailingList_name_changeOptions_POST
public OvhTaskMl domain_mailingList_name_changeOptions_POST(String domain, String name, OvhDomainMlOptionsStruct options) throws IOException { """ Change mailing list options REST: POST /email/domain/{domain}/mailingList/{name}/changeOptions @param options [required] Options of mailing list @param domain [req...
java
public OvhTaskMl domain_mailingList_name_changeOptions_POST(String domain, String name, OvhDomainMlOptionsStruct options) throws IOException { String qPath = "/email/domain/{domain}/mailingList/{name}/changeOptions"; StringBuilder sb = path(qPath, domain, name); HashMap<String, Object>o = new HashMap<String, Obje...
[ "public", "OvhTaskMl", "domain_mailingList_name_changeOptions_POST", "(", "String", "domain", ",", "String", "name", ",", "OvhDomainMlOptionsStruct", "options", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/mailingList/{name}/changeOptions...
Change mailing list options REST: POST /email/domain/{domain}/mailingList/{name}/changeOptions @param options [required] Options of mailing list @param domain [required] Name of your domain name @param name [required] Name of mailing list
[ "Change", "mailing", "list", "options" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1430-L1437
Putnami/putnami-web-toolkit
core/src/main/java/com/google/gwt/event/shared/HandlerManager.java
HandlerManager.removeHandler
public <H extends EventHandler> void removeHandler(GwtEvent.Type<H> type, final H handler) { """ Removes the given handler from the specified event type. @param <H> handler type @param type the event type @param handler the handler """ this.eventBus.superDoRemove(type, null, handler); }
java
public <H extends EventHandler> void removeHandler(GwtEvent.Type<H> type, final H handler) { this.eventBus.superDoRemove(type, null, handler); }
[ "public", "<", "H", "extends", "EventHandler", ">", "void", "removeHandler", "(", "GwtEvent", ".", "Type", "<", "H", ">", "type", ",", "final", "H", "handler", ")", "{", "this", ".", "eventBus", ".", "superDoRemove", "(", "type", ",", "null", ",", "han...
Removes the given handler from the specified event type. @param <H> handler type @param type the event type @param handler the handler
[ "Removes", "the", "given", "handler", "from", "the", "specified", "event", "type", "." ]
train
https://github.com/Putnami/putnami-web-toolkit/blob/129aa781d1bda508e579d194693ca3034b4d470b/core/src/main/java/com/google/gwt/event/shared/HandlerManager.java#L185-L187
JavaMoney/jsr354-ri
moneta-core/src/main/java/org/javamoney/moneta/RoundedMoney.java
RoundedMoney.ofMinor
public static RoundedMoney ofMinor(CurrencyUnit currency, long amountMinor) { """ Obtains an instance of {@code RoundedMoney} from an amount in minor units. For example, {@code ofMinor(USD, 1234)} creates the instance {@code USD 12.34}. @param currency the currency, not null @param amountMinor the amount of m...
java
public static RoundedMoney ofMinor(CurrencyUnit currency, long amountMinor) { return ofMinor(currency, amountMinor, currency.getDefaultFractionDigits()); }
[ "public", "static", "RoundedMoney", "ofMinor", "(", "CurrencyUnit", "currency", ",", "long", "amountMinor", ")", "{", "return", "ofMinor", "(", "currency", ",", "amountMinor", ",", "currency", ".", "getDefaultFractionDigits", "(", ")", ")", ";", "}" ]
Obtains an instance of {@code RoundedMoney} from an amount in minor units. For example, {@code ofMinor(USD, 1234)} creates the instance {@code USD 12.34}. @param currency the currency, not null @param amountMinor the amount of money in the minor division of the currency @return the Money from minor units @see Currenc...
[ "Obtains", "an", "instance", "of", "{" ]
train
https://github.com/JavaMoney/jsr354-ri/blob/cf8ff2bbaf9b115acc05eb9b0c76c8397c308284/moneta-core/src/main/java/org/javamoney/moneta/RoundedMoney.java#L286-L288
facebookarchive/nifty
nifty-core/src/main/java/com/facebook/nifty/processor/NiftyProcessorAdapters.java
NiftyProcessorAdapters.processorToTProcessor
public static TProcessor processorToTProcessor(final NiftyProcessor niftyProcessor) { """ Adapt a {@link NiftyProcessor} to a standard Thrift {@link TProcessor}. The {@link com.facebook.nifty.core.NiftyRequestContext} will always be {@code null} """ return new TProcessor() { @Overr...
java
public static TProcessor processorToTProcessor(final NiftyProcessor niftyProcessor) { return new TProcessor() { @Override public boolean process(TProtocol in, TProtocol out) throws TException { try { return niftyProcessor.proces...
[ "public", "static", "TProcessor", "processorToTProcessor", "(", "final", "NiftyProcessor", "niftyProcessor", ")", "{", "return", "new", "TProcessor", "(", ")", "{", "@", "Override", "public", "boolean", "process", "(", "TProtocol", "in", ",", "TProtocol", "out", ...
Adapt a {@link NiftyProcessor} to a standard Thrift {@link TProcessor}. The {@link com.facebook.nifty.core.NiftyRequestContext} will always be {@code null}
[ "Adapt", "a", "{" ]
train
https://github.com/facebookarchive/nifty/blob/ccacff7f0a723abe0b9ed399bcc3bc85784e7396/nifty-core/src/main/java/com/facebook/nifty/processor/NiftyProcessorAdapters.java#L91-L108
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingRulesInner.java
DataMaskingRulesInner.createOrUpdateAsync
public Observable<DataMaskingRuleInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { """ Creates or updates a database data masking rule. @param resourceGroupName The name of the resource group that contains ...
java
public Observable<DataMaskingRuleInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingRuleName, parameters)...
[ "public", "Observable", "<", "DataMaskingRuleInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "dataMaskingRuleName", ",", "DataMaskingRuleInner", "parameters", ")", "{", "r...
Creates or updates a database data masking rule. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param dataMaskingRul...
[ "Creates", "or", "updates", "a", "database", "data", "masking", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingRulesInner.java#L112-L119
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java
RecommendationsInner.getRuleDetailsByWebAppAsync
public Observable<RecommendationRuleInner> getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name) { """ Get a recommendation rule for an app. Get a recommendation rule for an app. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Na...
java
public Observable<RecommendationRuleInner> getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name) { return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name).map(new Func1<ServiceResponse<RecommendationRuleInner>, RecommendationRuleInner>() { ...
[ "public", "Observable", "<", "RecommendationRuleInner", ">", "getRuleDetailsByWebAppAsync", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "name", ")", "{", "return", "getRuleDetailsByWebAppWithServiceResponseAsync", "(", "resourceGroupName", ...
Get a recommendation rule for an app. Get a recommendation rule for an app. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Name of the app. @param name Name of the recommendation. @throws IllegalArgumentException thrown if parameters fail the validation @return the o...
[ "Get", "a", "recommendation", "rule", "for", "an", "app", ".", "Get", "a", "recommendation", "rule", "for", "an", "app", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java#L1239-L1246
iipc/webarchive-commons
src/main/java/org/archive/util/zip/GzipHeader.java
GzipHeader.readInt
private int readInt(InputStream in, CRC32 crc) throws IOException { """ Read an int. We do not expect to get a -1 reading. If we do, we throw exception. Update the crc as we go. @param in InputStream to read. @param crc CRC to update. @return int read. @throws IOException """ int s = readS...
java
private int readInt(InputStream in, CRC32 crc) throws IOException { int s = readShort(in, crc); return ((readShort(in, crc) << 16) & 0xffff0000) | s; }
[ "private", "int", "readInt", "(", "InputStream", "in", ",", "CRC32", "crc", ")", "throws", "IOException", "{", "int", "s", "=", "readShort", "(", "in", ",", "crc", ")", ";", "return", "(", "(", "readShort", "(", "in", ",", "crc", ")", "<<", "16", "...
Read an int. We do not expect to get a -1 reading. If we do, we throw exception. Update the crc as we go. @param in InputStream to read. @param crc CRC to update. @return int read. @throws IOException
[ "Read", "an", "int", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/zip/GzipHeader.java#L213-L216
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzleStatement.java
DrizzleStatement.getMoreResults
public boolean getMoreResults() throws SQLException { """ Moves to this <code>Statement</code> object's next result, returns <code>true</code> if it is a <code>ResultSet</code> object, and implicitly closes any current <code>ResultSet</code> object(s) obtained with the method <code>getResultSet</code>. <p/> <P...
java
public boolean getMoreResults() throws SQLException { startTimer(); try { if (queryResult != null) { queryResult.close(); } queryResult = protocol.getMoreResults(); if(queryResult == null) { this.resultSet=null; ...
[ "public", "boolean", "getMoreResults", "(", ")", "throws", "SQLException", "{", "startTimer", "(", ")", ";", "try", "{", "if", "(", "queryResult", "!=", "null", ")", "{", "queryResult", ".", "close", "(", ")", ";", "}", "queryResult", "=", "protocol", "....
Moves to this <code>Statement</code> object's next result, returns <code>true</code> if it is a <code>ResultSet</code> object, and implicitly closes any current <code>ResultSet</code> object(s) obtained with the method <code>getResultSet</code>. <p/> <P>There are no more results when the following is true: <PRE> // stm...
[ "Moves", "to", "this", "<code", ">", "Statement<", "/", "code", ">", "object", "s", "next", "result", "returns", "<code", ">", "true<", "/", "code", ">", "if", "it", "is", "a", "<code", ">", "ResultSet<", "/", "code", ">", "object", "and", "implicitly"...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleStatement.java#L760-L785
datacleaner/DataCleaner
engine/core/src/main/java/org/datacleaner/data/TransformedInputRow.java
TransformedInputRow.of
public static TransformedInputRow of(final InputRow row) { """ Constructs a {@link TransformedInputRow} based on another row, or returns the row if it is already a {@link TransformedInputRow}. @param row @return """ if (row instanceof TransformedInputRow) { // re-use existing transform...
java
public static TransformedInputRow of(final InputRow row) { if (row instanceof TransformedInputRow) { // re-use existing transformed input row. return (TransformedInputRow) row; } else { return new TransformedInputRow(row, row.getId()); } }
[ "public", "static", "TransformedInputRow", "of", "(", "final", "InputRow", "row", ")", "{", "if", "(", "row", "instanceof", "TransformedInputRow", ")", "{", "// re-use existing transformed input row.", "return", "(", "TransformedInputRow", ")", "row", ";", "}", "els...
Constructs a {@link TransformedInputRow} based on another row, or returns the row if it is already a {@link TransformedInputRow}. @param row @return
[ "Constructs", "a", "{", "@link", "TransformedInputRow", "}", "based", "on", "another", "row", "or", "returns", "the", "row", "if", "it", "is", "already", "a", "{", "@link", "TransformedInputRow", "}", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/core/src/main/java/org/datacleaner/data/TransformedInputRow.java#L86-L93
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/cssbox/CssBoxPngRenderer.java
CssBoxPngRenderer.renderURL
private boolean renderURL(URL urlstring, URL baseUrl, OutputStream out) throws IOException, SAXException { """ Renders the URL and prints the result to the specified output stream in the specified format. @param urlstring the source URL @param out output stream @param type output type @return true in ...
java
private boolean renderURL(URL urlstring, URL baseUrl, OutputStream out) throws IOException, SAXException { // Open the network connection DocumentSource docSource = new DefaultDocumentSource(urlstring); // Parse the input document DOMSource parser = new DefaultDOMSource(docSource); Document doc = parser....
[ "private", "boolean", "renderURL", "(", "URL", "urlstring", ",", "URL", "baseUrl", ",", "OutputStream", "out", ")", "throws", "IOException", ",", "SAXException", "{", "// Open the network connection", "DocumentSource", "docSource", "=", "new", "DefaultDocumentSource", ...
Renders the URL and prints the result to the specified output stream in the specified format. @param urlstring the source URL @param out output stream @param type output type @return true in case of success, false otherwise @throws SAXException
[ "Renders", "the", "URL", "and", "prints", "the", "result", "to", "the", "specified", "output", "stream", "in", "the", "specified", "format", "." ]
train
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/cssbox/CssBoxPngRenderer.java#L106-L157
micwin/ticino
context/src/main/java/net/micwin/ticino/context/GenericContext.java
GenericContext.lookup
@Override public GenericContext<ElementType> lookup(final Predicate<ElementType> pPredicate) { """ Looks up elements that match given predicate and returns them in a newly created DefaultContext. @param pPredicate The criteria the elements must match to be found. """ return lookup(pPredicate, Integ...
java
@Override public GenericContext<ElementType> lookup(final Predicate<ElementType> pPredicate) { return lookup(pPredicate, Integer.MAX_VALUE, new GenericContext<ElementType>()); }
[ "@", "Override", "public", "GenericContext", "<", "ElementType", ">", "lookup", "(", "final", "Predicate", "<", "ElementType", ">", "pPredicate", ")", "{", "return", "lookup", "(", "pPredicate", ",", "Integer", ".", "MAX_VALUE", ",", "new", "GenericContext", "...
Looks up elements that match given predicate and returns them in a newly created DefaultContext. @param pPredicate The criteria the elements must match to be found.
[ "Looks", "up", "elements", "that", "match", "given", "predicate", "and", "returns", "them", "in", "a", "newly", "created", "DefaultContext", "." ]
train
https://github.com/micwin/ticino/blob/4d143093500cd2fb9767ebe8cd05ddda23e35613/context/src/main/java/net/micwin/ticino/context/GenericContext.java#L64-L68
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java
WordReplacer.replaceWordIgnoreCase
public static String replaceWordIgnoreCase(String input, String word, String replace) { """ Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is separated from others words, that is, it's not part of a word. The implementation is that the previous and nex...
java
public static String replaceWordIgnoreCase(String input, String word, String replace) { StringBuilder sb = new StringBuilder(input); replaceWordIgnoreCase(sb, word, replace); return sb.toString(); }
[ "public", "static", "String", "replaceWordIgnoreCase", "(", "String", "input", ",", "String", "word", ",", "String", "replace", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "input", ")", ";", "replaceWordIgnoreCase", "(", "sb", ",", "word...
Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is separated from others words, that is, it's not part of a word. The implementation is that the previous and next characters of the word must be a {@link Character#isLetterOrDigit(char)} char. @param input text...
[ "Replace", "all", "occurrences", "of", "word", "by", "replace", "in", "the", "input", ".", "The", "replacement", "happens", "only", "if", "the", "word", "to", "replace", "is", "separated", "from", "others", "words", "that", "is", "it", "s", "not", "part", ...
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java#L93-L97
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.resizeVolume
public void resizeVolume(String volumeId, int newCdsSizeInGB) { """ Resizing the specified volume with newly size. You can resize the specified volume only when the volume is Available, otherwise,it's will get <code>409</code> errorCode. The prepaid volume can not be downgrade. <p> This is an asynchronous...
java
public void resizeVolume(String volumeId, int newCdsSizeInGB) { this.resizeVolume(new ResizeVolumeRequest() .withVolumeId(volumeId).withNewCdsSizeInGB(newCdsSizeInGB)); }
[ "public", "void", "resizeVolume", "(", "String", "volumeId", ",", "int", "newCdsSizeInGB", ")", "{", "this", ".", "resizeVolume", "(", "new", "ResizeVolumeRequest", "(", ")", ".", "withVolumeId", "(", "volumeId", ")", ".", "withNewCdsSizeInGB", "(", "newCdsSizeI...
Resizing the specified volume with newly size. You can resize the specified volume only when the volume is Available, otherwise,it's will get <code>409</code> errorCode. The prepaid volume can not be downgrade. <p> This is an asynchronous interface, you can get the latest status by invoke {@link #getVolume(String)} ...
[ "Resizing", "the", "specified", "volume", "with", "newly", "size", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1066-L1069
JoeKerouac/utils
src/main/java/com/joe/utils/secure/KeyTools.java
KeyTools.getPublicKeyFromX509
public static PublicKey getPublicKeyFromX509(String algorithm, InputStream ins) { """ 从X509格式的文件中获取public key @param algorithm 加密算法名称 @param ins X509格式的public key文件的输入流 @return 公钥 """ if (ins == null || StringUtils.isEmpty(algorithm)) { return null; } try { ...
java
public static PublicKey getPublicKeyFromX509(String algorithm, InputStream ins) { if (ins == null || StringUtils.isEmpty(algorithm)) { return null; } try { KeyFactory keyFactory = KeyFactory.getInstance(algorithm); byte[] encodedKey = IOUtils.read(ins); ...
[ "public", "static", "PublicKey", "getPublicKeyFromX509", "(", "String", "algorithm", ",", "InputStream", "ins", ")", "{", "if", "(", "ins", "==", "null", "||", "StringUtils", ".", "isEmpty", "(", "algorithm", ")", ")", "{", "return", "null", ";", "}", "try...
从X509格式的文件中获取public key @param algorithm 加密算法名称 @param ins X509格式的public key文件的输入流 @return 公钥
[ "从X509格式的文件中获取public", "key" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/secure/KeyTools.java#L81-L94
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java
DiscussionCommentResourcesImpl.updateComment
public Comment updateComment(long sheetId, Comment comment) throws SmartsheetException { """ Update the specified comment It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/comments/{commentId} @param sheetId the sheet id @param comment the new comment object @return the updated ...
java
public Comment updateComment(long sheetId, Comment comment) throws SmartsheetException { return this.updateResource("sheets/" + sheetId + "/comments/" + comment.getId(), Comment.class, comment); }
[ "public", "Comment", "updateComment", "(", "long", "sheetId", ",", "Comment", "comment", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "updateResource", "(", "\"sheets/\"", "+", "sheetId", "+", "\"/comments/\"", "+", "comment", ".", "getId", ...
Update the specified comment It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/comments/{commentId} @param sheetId the sheet id @param comment the new comment object @return the updated comment @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestE...
[ "Update", "the", "specified", "comment" ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java#L112-L114
SonarSource/sonarqube
server/sonar-process/src/main/java/org/sonar/process/logging/LogbackHelper.java
LogbackHelper.apply
public LoggerContext apply(LogLevelConfig logLevelConfig, Props props) { """ Applies the specified {@link LogLevelConfig} reading the specified {@link Props}. @throws IllegalArgumentException if the any level specified in a property is not one of {@link #ALLOWED_ROOT_LOG_LEVELS} """ if (!ROOT_LOGGER_NAM...
java
public LoggerContext apply(LogLevelConfig logLevelConfig, Props props) { if (!ROOT_LOGGER_NAME.equals(logLevelConfig.getRootLoggerName())) { throw new IllegalArgumentException("Value of LogLevelConfig#rootLoggerName must be \"" + ROOT_LOGGER_NAME + "\""); } LoggerContext rootContext = getRootContext(...
[ "public", "LoggerContext", "apply", "(", "LogLevelConfig", "logLevelConfig", ",", "Props", "props", ")", "{", "if", "(", "!", "ROOT_LOGGER_NAME", ".", "equals", "(", "logLevelConfig", ".", "getRootLoggerName", "(", ")", ")", ")", "{", "throw", "new", "IllegalA...
Applies the specified {@link LogLevelConfig} reading the specified {@link Props}. @throws IllegalArgumentException if the any level specified in a property is not one of {@link #ALLOWED_ROOT_LOG_LEVELS}
[ "Applies", "the", "specified", "{", "@link", "LogLevelConfig", "}", "reading", "the", "specified", "{", "@link", "Props", "}", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-process/src/main/java/org/sonar/process/logging/LogbackHelper.java#L111-L123
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_lines_number_dslamPort_GET
public OvhDslamPort serviceName_lines_number_dslamPort_GET(String serviceName, String number) throws IOException { """ Get this object properties REST: GET /xdsl/{serviceName}/lines/{number}/dslamPort @param serviceName [required] The internal name of your XDSL offer @param number [required] The number of the...
java
public OvhDslamPort serviceName_lines_number_dslamPort_GET(String serviceName, String number) throws IOException { String qPath = "/xdsl/{serviceName}/lines/{number}/dslamPort"; StringBuilder sb = path(qPath, serviceName, number); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, Ovh...
[ "public", "OvhDslamPort", "serviceName_lines_number_dslamPort_GET", "(", "String", "serviceName", ",", "String", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/lines/{number}/dslamPort\"", ";", "StringBuilder", "sb", "=", "path",...
Get this object properties REST: GET /xdsl/{serviceName}/lines/{number}/dslamPort @param serviceName [required] The internal name of your XDSL offer @param number [required] The number of the line
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L493-L498
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java
FileSystem.normalizeWindowsNativeFilename
@Pure public static File normalizeWindowsNativeFilename(String filename) { """ Normalize the given string contains a Windows&reg; native long filename and replies a Java-standard version. <p>Long filenames (LFN), spelled "long file names" by Microsoft Corporation, are Microsoft's way of implementing filename...
java
@Pure public static File normalizeWindowsNativeFilename(String filename) { final String fn = extractLocalPath(filename); if (fn != null && fn.length() > 0) { final Pattern pattern = Pattern.compile(WINDOW_NATIVE_FILENAME_PATTERN); final Matcher matcher = pattern.matcher(fn); if (matcher.find()) { retu...
[ "@", "Pure", "public", "static", "File", "normalizeWindowsNativeFilename", "(", "String", "filename", ")", "{", "final", "String", "fn", "=", "extractLocalPath", "(", "filename", ")", ";", "if", "(", "fn", "!=", "null", "&&", "fn", ".", "length", "(", ")",...
Normalize the given string contains a Windows&reg; native long filename and replies a Java-standard version. <p>Long filenames (LFN), spelled "long file names" by Microsoft Corporation, are Microsoft's way of implementing filenames longer than the 8.3, or short-filename, naming scheme used in Microsoft DOS in their mo...
[ "Normalize", "the", "given", "string", "contains", "a", "Windows&reg", ";", "native", "long", "filename", "and", "replies", "a", "Java", "-", "standard", "version", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L2620-L2631
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java
FireAfterTransactionAspect.fireEventAsync
@Async public void fireEventAsync(Object publisher, FireAfterTransactionAsynchronous events) throws Exception { """ Only {@link ApplicationEvent}s are created and published over Springs {@link ApplicationContext}. @param publisher The instance that is publishing the event @param events Stores a list of ev...
java
@Async public void fireEventAsync(Object publisher, FireAfterTransactionAsynchronous events) throws Exception { for (int i = 0; i < events.events().length; i++) { Class<? extends EventObject> event = events.events()[i]; if (RootApplicationEvent.class.isAssignableFrom(event)) { ...
[ "@", "Async", "public", "void", "fireEventAsync", "(", "Object", "publisher", ",", "FireAfterTransactionAsynchronous", "events", ")", "throws", "Exception", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "events", ".", "events", "(", ")", ".", "leng...
Only {@link ApplicationEvent}s are created and published over Springs {@link ApplicationContext}. @param publisher The instance that is publishing the event @param events Stores a list of event classes to fire @throws Exception Any exception is re-thrown
[ "Only", "{", "@link", "ApplicationEvent", "}", "s", "are", "created", "and", "published", "over", "Springs", "{", "@link", "ApplicationContext", "}", "." ]
train
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java#L94-L103
tango-controls/JTango
server/src/main/java/org/tango/server/build/ClassPropertyBuilder.java
ClassPropertyBuilder.build
public void build(final Class<?> clazz, final Field field, final DeviceImpl device, final Object businessObject) throws DevFailed { """ Create class properties {@link ClassProperty} @param clazz @param field @param device @param businessObject @throws DevFailed """ xlogger.entry(); // create clas...
java
public void build(final Class<?> clazz, final Field field, final DeviceImpl device, final Object businessObject) throws DevFailed { xlogger.entry(); // create class property final ClassProperty annot = field.getAnnotation(ClassProperty.class); String propName; final String fieldName = field.getName(); if (an...
[ "public", "void", "build", "(", "final", "Class", "<", "?", ">", "clazz", ",", "final", "Field", "field", ",", "final", "DeviceImpl", "device", ",", "final", "Object", "businessObject", ")", "throws", "DevFailed", "{", "xlogger", ".", "entry", "(", ")", ...
Create class properties {@link ClassProperty} @param clazz @param field @param device @param businessObject @throws DevFailed
[ "Create", "class", "properties", "{", "@link", "ClassProperty", "}" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/build/ClassPropertyBuilder.java#L62-L88
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withShortArray
public Postcard withShortArray(@Nullable String key, @Nullable short[] value) { """ Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a short array object, or null @return ...
java
public Postcard withShortArray(@Nullable String key, @Nullable short[] value) { mBundle.putShortArray(key, value); return this; }
[ "public", "Postcard", "withShortArray", "(", "@", "Nullable", "String", "key", ",", "@", "Nullable", "short", "[", "]", "value", ")", "{", "mBundle", ".", "putShortArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a short array object, or null @return current
[ "Inserts", "a", "short", "array", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L494-L497
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java
FileListUtils.listMostNestedPathRecursively
public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path, PathFilter fileFilter) throws IOException { """ Method to list out all files, or directory if no file exists, under a specified path. The specified {@link PathFilter} is treated as a file filter, that is it is only applie...
java
public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path, PathFilter fileFilter) throws IOException { return listMostNestedPathRecursivelyHelper(fs, Lists.<FileStatus>newArrayList(), fs.getFileStatus(path), fileFilter); }
[ "public", "static", "List", "<", "FileStatus", ">", "listMostNestedPathRecursively", "(", "FileSystem", "fs", ",", "Path", "path", ",", "PathFilter", "fileFilter", ")", "throws", "IOException", "{", "return", "listMostNestedPathRecursivelyHelper", "(", "fs", ",", "L...
Method to list out all files, or directory if no file exists, under a specified path. The specified {@link PathFilter} is treated as a file filter, that is it is only applied to file {@link Path}s.
[ "Method", "to", "list", "out", "all", "files", "or", "directory", "if", "no", "file", "exists", "under", "a", "specified", "path", ".", "The", "specified", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L184-L188
mabe02/lanterna
src/main/java/com/googlecode/lanterna/gui2/AbstractListBox.java
AbstractListBox.setListItemRenderer
public synchronized T setListItemRenderer(ListItemRenderer<V,T> listItemRenderer) { """ This method overrides the {@code ListItemRenderer} that is used to draw each element in the list box. Note that this is not the renderer used for the entire list box but for each item, called one by one. @param listItemRender...
java
public synchronized T setListItemRenderer(ListItemRenderer<V,T> listItemRenderer) { if(listItemRenderer == null) { listItemRenderer = createDefaultListItemRenderer(); if(listItemRenderer == null) { throw new IllegalStateException("createDefaultListItemRenderer returned nu...
[ "public", "synchronized", "T", "setListItemRenderer", "(", "ListItemRenderer", "<", "V", ",", "T", ">", "listItemRenderer", ")", "{", "if", "(", "listItemRenderer", "==", "null", ")", "{", "listItemRenderer", "=", "createDefaultListItemRenderer", "(", ")", ";", ...
This method overrides the {@code ListItemRenderer} that is used to draw each element in the list box. Note that this is not the renderer used for the entire list box but for each item, called one by one. @param listItemRenderer New renderer to use when drawing the items in the list box @return Itself
[ "This", "method", "overrides", "the", "{" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/gui2/AbstractListBox.java#L90-L99
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplInteger_CustomFieldSerializer.java
OWLLiteralImplInteger_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplInteger instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplInteger instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLLiteralImplInteger", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplInteger_CustomFieldSerializer.java#L84-L87
sdl/Testy
src/main/java/com/sdl/selenium/extjs3/grid/EditorGridPanel.java
EditorGridPanel.getActiveEditor
public TextField getActiveEditor() { """ Use only after click/doubleClicked in that row or the editor is already opened @return active editor """ TextField editor; WebLocator container = new WebLocator("x-editor", this); WebLocator editableEl = new WebLocator(container).setElPath(...
java
public TextField getActiveEditor() { TextField editor; WebLocator container = new WebLocator("x-editor", this); WebLocator editableEl = new WebLocator(container).setElPath("//*[contains(@class, '-focus')]"); String stringClass = editableEl.getAttributeClass(); LOGGER.debug("...
[ "public", "TextField", "getActiveEditor", "(", ")", "{", "TextField", "editor", ";", "WebLocator", "container", "=", "new", "WebLocator", "(", "\"x-editor\"", ",", "this", ")", ";", "WebLocator", "editableEl", "=", "new", "WebLocator", "(", "container", ")", "...
Use only after click/doubleClicked in that row or the editor is already opened @return active editor
[ "Use", "only", "after", "click", "/", "doubleClicked", "in", "that", "row", "or", "the", "editor", "is", "already", "opened" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/extjs3/grid/EditorGridPanel.java#L65-L89
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java
FeatureInfoBuilder.buildResultsInfoMessageAndClose
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, double tolerance, LatLng clickLocation) { """ Build a feature results information message and close the results @param results feature index results @param tolerance distance tolerance @param clickLocation map click location ...
java
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, double tolerance, LatLng clickLocation) { return buildResultsInfoMessageAndClose(results, tolerance, clickLocation, null); }
[ "public", "String", "buildResultsInfoMessageAndClose", "(", "FeatureIndexResults", "results", ",", "double", "tolerance", ",", "LatLng", "clickLocation", ")", "{", "return", "buildResultsInfoMessageAndClose", "(", "results", ",", "tolerance", ",", "clickLocation", ",", ...
Build a feature results information message and close the results @param results feature index results @param tolerance distance tolerance @param clickLocation map click location @return results message or null if no results
[ "Build", "a", "feature", "results", "information", "message", "and", "close", "the", "results" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java#L263-L265
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java
EpanetWrapper.ENsettimeparam
public void ENsettimeparam( TimeParameterCodes code, Long timevalue ) throws EpanetException { """ Sets the value of a time parameter. @param paramcode the {@link TimeParameterCodes}. @param timevalue value of time parameter in seconds. @throws EpanetException """ int errcode = epanet.ENsettimepar...
java
public void ENsettimeparam( TimeParameterCodes code, Long timevalue ) throws EpanetException { int errcode = epanet.ENsettimeparam(code.getCode(), timevalue); checkError(errcode); }
[ "public", "void", "ENsettimeparam", "(", "TimeParameterCodes", "code", ",", "Long", "timevalue", ")", "throws", "EpanetException", "{", "int", "errcode", "=", "epanet", ".", "ENsettimeparam", "(", "code", ".", "getCode", "(", ")", ",", "timevalue", ")", ";", ...
Sets the value of a time parameter. @param paramcode the {@link TimeParameterCodes}. @param timevalue value of time parameter in seconds. @throws EpanetException
[ "Sets", "the", "value", "of", "a", "time", "parameter", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java#L657-L660
google/truth
core/src/main/java/com/google/common/truth/FailureMetadata.java
FailureMetadata.updateForSubject
FailureMetadata updateForSubject(Subject<?, ?> subject) { """ Returns a new instance that includes the given subject in its chain of values. Truth users do not need to call this method directly; Truth automatically accumulates context, starting from the initial that(...) call and continuing into any chained call...
java
FailureMetadata updateForSubject(Subject<?, ?> subject) { ImmutableList<Step> steps = append(this.steps, Step.subjectCreation(subject)); return derive(messages, steps); }
[ "FailureMetadata", "updateForSubject", "(", "Subject", "<", "?", ",", "?", ">", "subject", ")", "{", "ImmutableList", "<", "Step", ">", "steps", "=", "append", "(", "this", ".", "steps", ",", "Step", ".", "subjectCreation", "(", "subject", ")", ")", ";",...
Returns a new instance that includes the given subject in its chain of values. Truth users do not need to call this method directly; Truth automatically accumulates context, starting from the initial that(...) call and continuing into any chained calls, like {@link ThrowableSubject#hasMessageThat}.
[ "Returns", "a", "new", "instance", "that", "includes", "the", "given", "subject", "in", "its", "chain", "of", "values", ".", "Truth", "users", "do", "not", "need", "to", "call", "this", "method", "directly", ";", "Truth", "automatically", "accumulates", "con...
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/FailureMetadata.java#L128-L131
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java
GitFlowGraphMonitor.removeFlowEdge
private void removeFlowEdge(DiffEntry change) { """ Remove a {@link FlowEdge} from the {@link FlowGraph}. The method uses {@link FlowEdgeFactory} to construct the edgeId of the {@link FlowEdge} from the config file and uses it to delete the associated {@link FlowEdge}. @param change """ if (checkFilePat...
java
private void removeFlowEdge(DiffEntry change) { if (checkFilePath(change.getOldPath(), EDGE_FILE_DEPTH)) { Path edgeFilePath = new Path(this.repositoryDir, change.getOldPath()); try { Config config = getEdgeConfigWithOverrides(ConfigFactory.empty(), edgeFilePath); String edgeId = config....
[ "private", "void", "removeFlowEdge", "(", "DiffEntry", "change", ")", "{", "if", "(", "checkFilePath", "(", "change", ".", "getOldPath", "(", ")", ",", "EDGE_FILE_DEPTH", ")", ")", "{", "Path", "edgeFilePath", "=", "new", "Path", "(", "this", ".", "reposit...
Remove a {@link FlowEdge} from the {@link FlowGraph}. The method uses {@link FlowEdgeFactory} to construct the edgeId of the {@link FlowEdge} from the config file and uses it to delete the associated {@link FlowEdge}. @param change
[ "Remove", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java#L249-L264
LAW-Unimi/BUbiNG
src/it/unimi/di/law/bubing/util/URLRespectsRobots.java
URLRespectsRobots.parseRobotsResponse
public static char[][] parseRobotsResponse(final URIResponse robotsResponse, final String userAgent) throws IOException { """ Parses a <code>robots.txt</code> file contained in a {@link FetchData} and returns the corresponding filter as an array of sorted prefixes. HTTP statuses different from 2xx are {@linkplai...
java
public static char[][] parseRobotsResponse(final URIResponse robotsResponse, final String userAgent) throws IOException { final int status = robotsResponse.response().getStatusLine().getStatusCode(); if (status / 100 != 2) LOGGER.info("Got status " + status + " while fetching robots: URL was " + robotsResponse.uri(...
[ "public", "static", "char", "[", "]", "[", "]", "parseRobotsResponse", "(", "final", "URIResponse", "robotsResponse", ",", "final", "String", "userAgent", ")", "throws", "IOException", "{", "final", "int", "status", "=", "robotsResponse", ".", "response", "(", ...
Parses a <code>robots.txt</code> file contained in a {@link FetchData} and returns the corresponding filter as an array of sorted prefixes. HTTP statuses different from 2xx are {@linkplain Logger#warn(String) logged}. HTTP statuses of class 4xx generate an empty filter. HTTP statuses 2xx/3xx cause the tentative parsing...
[ "Parses", "a", "<code", ">", "robots", ".", "txt<", "/", "code", ">", "file", "contained", "in", "a", "{", "@link", "FetchData", "}", "and", "returns", "the", "corresponding", "filter", "as", "an", "array", "of", "sorted", "prefixes", ".", "HTTP", "statu...
train
https://github.com/LAW-Unimi/BUbiNG/blob/e148acc90031a4f3967422705a9fb07ddaf155e4/src/it/unimi/di/law/bubing/util/URLRespectsRobots.java#L177-L191
structurizr/java
structurizr-core/src/com/structurizr/configuration/WorkspaceConfiguration.java
WorkspaceConfiguration.addUser
public void addUser(String username, Role role) { """ Adds a user, with the specified username and role. @param username the username (e.g. an e-mail address) @param role the user's role """ if (StringUtils.isNullOrEmpty(username)) { throw new IllegalArgumentException("A u...
java
public void addUser(String username, Role role) { if (StringUtils.isNullOrEmpty(username)) { throw new IllegalArgumentException("A username must be specified."); } if (role == null) { throw new IllegalArgumentException("A role must be specified."); } use...
[ "public", "void", "addUser", "(", "String", "username", ",", "Role", "role", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "username", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A username must be specified.\"", ")", ";",...
Adds a user, with the specified username and role. @param username the username (e.g. an e-mail address) @param role the user's role
[ "Adds", "a", "user", "with", "the", "specified", "username", "and", "role", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/configuration/WorkspaceConfiguration.java#L39-L49
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.unsupportedIfNot
public static void unsupportedIfNot(boolean tester, String msg, Object ... args) { """ Throws out an {@link UnsupportedException} with error message specified if `tester` is `false`. @param tester when `false` then throw out the exception. @param msg the error message format pattern. @param args the error...
java
public static void unsupportedIfNot(boolean tester, String msg, Object ... args) { if (!tester) { throw unsupport(msg, args); } }
[ "public", "static", "void", "unsupportedIfNot", "(", "boolean", "tester", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "tester", ")", "{", "throw", "unsupport", "(", "msg", ",", "args", ")", ";", "}", "}" ]
Throws out an {@link UnsupportedException} with error message specified if `tester` is `false`. @param tester when `false` then throw out the exception. @param msg the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "an", "{", "@link", "UnsupportedException", "}", "with", "error", "message", "specified", "if", "tester", "is", "false", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L628-L632
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/QuatSymmetryDetector.java
QuatSymmetryDetector.calcLocalSymmetries
public static List<QuatSymmetryResults> calcLocalSymmetries(Stoichiometry globalComposition, QuatSymmetryParameters symmParams) { """ Returns a List of LOCAL symmetry results. This means that a subset of the {@link SubunitCluster} is left out of the symmetry calculation. Each element of the List is one possible ...
java
public static List<QuatSymmetryResults> calcLocalSymmetries(Stoichiometry globalComposition, QuatSymmetryParameters symmParams) { Set<Set<Integer>> knownCombinations = new HashSet<>(); List<SubunitCluster> clusters = globalComposition.getClusters(); //more than one subunit per cluster required for symmetry Lis...
[ "public", "static", "List", "<", "QuatSymmetryResults", ">", "calcLocalSymmetries", "(", "Stoichiometry", "globalComposition", ",", "QuatSymmetryParameters", "symmParams", ")", "{", "Set", "<", "Set", "<", "Integer", ">>", "knownCombinations", "=", "new", "HashSet", ...
Returns a List of LOCAL symmetry results. This means that a subset of the {@link SubunitCluster} is left out of the symmetry calculation. Each element of the List is one possible LOCAL symmetry result. <p> Determine local symmetry if global structure is: (1) asymmetric, C1; (2) heteromeric (belongs to more than 1 subun...
[ "Returns", "a", "List", "of", "LOCAL", "symmetry", "results", ".", "This", "means", "that", "a", "subset", "of", "the", "{", "@link", "SubunitCluster", "}", "is", "left", "out", "of", "the", "symmetry", "calculation", ".", "Each", "element", "of", "the", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/QuatSymmetryDetector.java#L200-L264
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.getDouble
public static double getDouble(MemorySegment[] segments, int offset) { """ get double from segments. @param segments target segments. @param offset value offset. """ if (inFirstSegment(segments, offset, 8)) { return segments[0].getDouble(offset); } else { return getDoubleMultiSegments(segments, o...
java
public static double getDouble(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 8)) { return segments[0].getDouble(offset); } else { return getDoubleMultiSegments(segments, offset); } }
[ "public", "static", "double", "getDouble", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "8", ")", ")", "{", "return", "segments", "[", "0", "]", ".", "getD...
get double from segments. @param segments target segments. @param offset value offset.
[ "get", "double", "from", "segments", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L904-L910