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
looly/hutool
hutool-db/src/main/java/cn/hutool/db/sql/SqlUtil.java
SqlUtil.buildLikeValue
public static String buildLikeValue(String value, LikeType likeType, boolean withLikeKeyword) { """ 创建LIKE语句中的值,创建的结果为: <pre> 1、LikeType.StartWith: %value 2、LikeType.EndWith: value% 3、LikeType.Contains: %value% </pre> 如果withLikeKeyword为true,则结果为: <pre> 1、LikeType.StartWith: LIKE %value 2、LikeType.En...
java
public static String buildLikeValue(String value, LikeType likeType, boolean withLikeKeyword) { if (null == value) { return value; } StringBuilder likeValue = StrUtil.builder(withLikeKeyword ? "LIKE " : ""); switch (likeType) { case StartWith: likeValue.append('%').append(value); break; ...
[ "public", "static", "String", "buildLikeValue", "(", "String", "value", ",", "LikeType", "likeType", ",", "boolean", "withLikeKeyword", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "value", ";", "}", "StringBuilder", "likeValue", "=", "Str...
创建LIKE语句中的值,创建的结果为: <pre> 1、LikeType.StartWith: %value 2、LikeType.EndWith: value% 3、LikeType.Contains: %value% </pre> 如果withLikeKeyword为true,则结果为: <pre> 1、LikeType.StartWith: LIKE %value 2、LikeType.EndWith: LIKE value% 3、LikeType.Contains: LIKE %value% </pre> @param value 被查找值 @param likeType LIKE值类型 {@link LikeTyp...
[ "创建LIKE语句中的值,创建的结果为:" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlUtil.java#L103-L124
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EthiopicCalendar.java
EthiopicCalendar.handleGetLimit
@Deprecated protected int handleGetLimit(int field, int limitType) { """ {@inheritDoc} @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android """ if (isAmeteAlemEra() && field == ERA) { return 0; // Only one era in this mode, era is alway...
java
@Deprecated protected int handleGetLimit(int field, int limitType) { if (isAmeteAlemEra() && field == ERA) { return 0; // Only one era in this mode, era is always 0 } return super.handleGetLimit(field, limitType); }
[ "@", "Deprecated", "protected", "int", "handleGetLimit", "(", "int", "field", ",", "int", "limitType", ")", "{", "if", "(", "isAmeteAlemEra", "(", ")", "&&", "field", "==", "ERA", ")", "{", "return", "0", ";", "// Only one era in this mode, era is always 0", "...
{@inheritDoc} @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android
[ "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EthiopicCalendar.java#L337-L343
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPostMultipart
public void doPostMultipart(String path, FormDataMultiPart formDataMultiPart) throws ClientException { """ Submits a multi-part form. Adds appropriate Accepts and Content Type headers. @param path the API to call. @param formDataMultiPart the multi-part form content. @throws ClientException if a status cod...
java
public void doPostMultipart(String path, FormDataMultiPart formDataMultiPart) throws ClientException { this.readLock.lock(); try { ClientResponse response = getResourceWrapper() .rewritten(path, HttpMethod.POST) .type(Boundary.addBoundary(MediaType.MUL...
[ "public", "void", "doPostMultipart", "(", "String", "path", ",", "FormDataMultiPart", "formDataMultiPart", ")", "throws", "ClientException", "{", "this", ".", "readLock", ".", "lock", "(", ")", ";", "try", "{", "ClientResponse", "response", "=", "getResourceWrappe...
Submits a multi-part form. Adds appropriate Accepts and Content Type headers. @param path the API to call. @param formDataMultiPart the multi-part form content. @throws ClientException if a status code other than 200 (OK) and 204 (No Content) is returned.
[ "Submits", "a", "multi", "-", "part", "form", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L639-L653
Ordinastie/MalisisCore
src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java
MalisisInventoryContainer.handleShiftClick
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot) { """ Handles shift clicking a slot. @param inventoryId the inventory id @param slot the slot @return the item stack """ ItemStack itemStack = transferSlotOutOfInventory(inventory, slot); //replace what's left of the ite...
java
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot) { ItemStack itemStack = transferSlotOutOfInventory(inventory, slot); //replace what's left of the item back into the slot slot.setItemStack(itemStack); slot.onSlotChanged(); return itemStack; }
[ "private", "ItemStack", "handleShiftClick", "(", "MalisisInventory", "inventory", ",", "MalisisSlot", "slot", ")", "{", "ItemStack", "itemStack", "=", "transferSlotOutOfInventory", "(", "inventory", ",", "slot", ")", ";", "//replace what's left of the item back into the slo...
Handles shift clicking a slot. @param inventoryId the inventory id @param slot the slot @return the item stack
[ "Handles", "shift", "clicking", "a", "slot", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java#L484-L492
azkaban/azkaban
azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java
HadoopSecurityManager_H_2_0.prefetchToken
@Override public void prefetchToken(final File tokenFile, final Props props, final Logger logger) throws HadoopSecurityManagerException { """ /* Gets hadoop tokens for a user to run mapred/hive jobs on a secured cluster """ final String userToProxy = props.getString(JobProperties.USER_TO_PROXY); ...
java
@Override public void prefetchToken(final File tokenFile, final Props props, final Logger logger) throws HadoopSecurityManagerException { final String userToProxy = props.getString(JobProperties.USER_TO_PROXY); logger.info("Getting hadoop tokens based on props for " + userToProxy); doPrefetch(token...
[ "@", "Override", "public", "void", "prefetchToken", "(", "final", "File", "tokenFile", ",", "final", "Props", "props", ",", "final", "Logger", "logger", ")", "throws", "HadoopSecurityManagerException", "{", "final", "String", "userToProxy", "=", "props", ".", "g...
/* Gets hadoop tokens for a user to run mapred/hive jobs on a secured cluster
[ "/", "*", "Gets", "hadoop", "tokens", "for", "a", "user", "to", "run", "mapred", "/", "hive", "jobs", "on", "a", "secured", "cluster" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java#L468-L475
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java
TrifocalLinearPoint7.createLinearSystem
protected void createLinearSystem( List<AssociatedTriple> observations ) { """ Constructs the linear matrix that describes from the 3-point constraint with linear dependent rows removed """ int N = observations.size(); A.reshape(4*N,27); A.zero(); for( int i = 0; i < N; i++ ) { AssociatedTriple t...
java
protected void createLinearSystem( List<AssociatedTriple> observations ) { int N = observations.size(); A.reshape(4*N,27); A.zero(); for( int i = 0; i < N; i++ ) { AssociatedTriple t = observations.get(i); N1.apply(t.p1,p1_norm); N2.apply(t.p2,p2_norm); N3.apply(t.p3,p3_norm); insert(i,0 , p1...
[ "protected", "void", "createLinearSystem", "(", "List", "<", "AssociatedTriple", ">", "observations", ")", "{", "int", "N", "=", "observations", ".", "size", "(", ")", ";", "A", ".", "reshape", "(", "4", "*", "N", ",", "27", ")", ";", "A", ".", "zero...
Constructs the linear matrix that describes from the 3-point constraint with linear dependent rows removed
[ "Constructs", "the", "linear", "matrix", "that", "describes", "from", "the", "3", "-", "point", "constraint", "with", "linear", "dependent", "rows", "removed" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L128-L145
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/service/RaftServiceContext.java
RaftServiceContext.keepAlive
public boolean keepAlive(long index, long timestamp, RaftSession session, long commandSequence, long eventIndex) { """ Keeps the given session alive. @param index The index of the keep-alive. @param timestamp The timestamp of the keep-alive. @param session The session to keep-alive. @...
java
public boolean keepAlive(long index, long timestamp, RaftSession session, long commandSequence, long eventIndex) { // If the service has been deleted, just return false to ignore the keep-alive. if (deleted) { return false; } // Update the state machine index/timestamp. tick(index, timestamp)...
[ "public", "boolean", "keepAlive", "(", "long", "index", ",", "long", "timestamp", ",", "RaftSession", "session", ",", "long", "commandSequence", ",", "long", "eventIndex", ")", "{", "// If the service has been deleted, just return false to ignore the keep-alive.", "if", "...
Keeps the given session alive. @param index The index of the keep-alive. @param timestamp The timestamp of the keep-alive. @param session The session to keep-alive. @param commandSequence The session command sequence number. @param eventIndex The session event index.
[ "Keeps", "the", "given", "session", "alive", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/service/RaftServiceContext.java#L358-L398
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/Hermes.java
Hermes.initializeApplication
public static String[] initializeApplication(String[] args) { """ Initializes an application using Hermes with the given command line arguments. Determines the program name from the calling class and also any config package associated with the calling class. Note: that the hermes package is always loaded. @pa...
java
public static String[] initializeApplication(String[] args) { StackTraceElement[] elements = Thread.currentThread().getStackTrace(); String programName = ""; String packageName = null; for (int i = 0; i < elements.length && StringUtils.isNullOrBlank(programName); i++) { String className...
[ "public", "static", "String", "[", "]", "initializeApplication", "(", "String", "[", "]", "args", ")", "{", "StackTraceElement", "[", "]", "elements", "=", "Thread", ".", "currentThread", "(", ")", ".", "getStackTrace", "(", ")", ";", "String", "programName"...
Initializes an application using Hermes with the given command line arguments. Determines the program name from the calling class and also any config package associated with the calling class. Note: that the hermes package is always loaded. @param args the command line arguments @return the non-named command line argu...
[ "Initializes", "an", "application", "using", "Hermes", "with", "the", "given", "command", "line", "arguments", ".", "Determines", "the", "program", "name", "from", "the", "calling", "class", "and", "also", "any", "config", "package", "associated", "with", "the",...
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/Hermes.java#L144-L157
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/util/ShadowPopupFactory.java
ShadowPopupFactory.getPopup
@Override public Popup getPopup(Component owner, Component contents, int x, int y) { """ Creates a <code>Popup</code> for the Component <code>owner</code> containing the Component <code>contents</code>. In addition to the superclass behavior, we try to return a Popup that has a drop shadow, if popup drop shad...
java
@Override public Popup getPopup(Component owner, Component contents, int x, int y) { final Popup popup = super.getPopup(owner, contents, x, y); return ShadowPopup.getInstance(owner, contents, x, y, popup); }
[ "@", "Override", "public", "Popup", "getPopup", "(", "Component", "owner", ",", "Component", "contents", ",", "int", "x", ",", "int", "y", ")", "{", "final", "Popup", "popup", "=", "super", ".", "getPopup", "(", "owner", ",", "contents", ",", "x", ",",...
Creates a <code>Popup</code> for the Component <code>owner</code> containing the Component <code>contents</code>. In addition to the superclass behavior, we try to return a Popup that has a drop shadow, if popup drop shadows are active - as returned by <code>Options#isPopupDropShadowActive</code>.<p> <code>owner</code...
[ "Creates", "a", "<code", ">", "Popup<", "/", "code", ">", "for", "the", "Component", "<code", ">", "owner<", "/", "code", ">", "containing", "the", "Component", "<code", ">", "contents<", "/", "code", ">", ".", "In", "addition", "to", "the", "superclass"...
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/util/ShadowPopupFactory.java#L154-L158
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointClassesAxiomImpl_CustomFieldSerializer.java
OWLDisjointClassesAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointClassesAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.go...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointClassesAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDisjointClassesAxiomImpl", "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...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointClassesAxiomImpl_CustomFieldSerializer.java#L95-L98
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxrs.3.2/src/org/apache/cxf/jaxrs/impl/ConfigurableImpl.java
ConfigurableImpl.collectInterfaces
private static void collectInterfaces(Set<Class<?>> interfaces, Class<?> anInterface) { """ internal helper function to recursively collect Interfaces. This is needed since {@link Class#getInterfaces()} does only return directly implemented Interfaces, But not the ones derived from those classes. """ ...
java
private static void collectInterfaces(Set<Class<?>> interfaces, Class<?> anInterface) { interfaces.add(anInterface); for (Class<?> superInterface : anInterface.getInterfaces()) { collectInterfaces(interfaces, superInterface); } }
[ "private", "static", "void", "collectInterfaces", "(", "Set", "<", "Class", "<", "?", ">", ">", "interfaces", ",", "Class", "<", "?", ">", "anInterface", ")", "{", "interfaces", ".", "add", "(", "anInterface", ")", ";", "for", "(", "Class", "<", "?", ...
internal helper function to recursively collect Interfaces. This is needed since {@link Class#getInterfaces()} does only return directly implemented Interfaces, But not the ones derived from those classes.
[ "internal", "helper", "function", "to", "recursively", "collect", "Interfaces", ".", "This", "is", "needed", "since", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxrs.3.2/src/org/apache/cxf/jaxrs/impl/ConfigurableImpl.java#L127-L132
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java
ValidationContext.assertNotNull
public void assertNotNull(Object propertyValue, String propertyName) { """ Asserts the value is not null, reporting to {@link ProblemReporter} with this context if it is. @param propertyValue Value to assert on. @param propertyName Name of property. """ if (propertyValue == null) { pro...
java
public void assertNotNull(Object propertyValue, String propertyName) { if (propertyValue == null) { problemReporter.report(new Problem(this, String.format("%s is a required property.", propertyName))); } }
[ "public", "void", "assertNotNull", "(", "Object", "propertyValue", ",", "String", "propertyName", ")", "{", "if", "(", "propertyValue", "==", "null", ")", "{", "problemReporter", ".", "report", "(", "new", "Problem", "(", "this", ",", "String", ".", "format"...
Asserts the value is not null, reporting to {@link ProblemReporter} with this context if it is. @param propertyValue Value to assert on. @param propertyName Name of property.
[ "Asserts", "the", "value", "is", "not", "null", "reporting", "to", "{", "@link", "ProblemReporter", "}", "with", "this", "context", "if", "it", "is", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java#L66-L70
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/strategies/writeable/AddThenHideOldStrategy.java
AddThenHideOldStrategy.returnNonBetaResourceOrNull
private RepositoryResource returnNonBetaResourceOrNull(RepositoryResource res1, RepositoryResource res2) { """ Take in two resources. If one (only) is beta return the non beta one """ if (isBeta(res1) && !isBeta(res2)) { return res2; } else if (!isBeta(res1) && isBeta(res2)) { ...
java
private RepositoryResource returnNonBetaResourceOrNull(RepositoryResource res1, RepositoryResource res2) { if (isBeta(res1) && !isBeta(res2)) { return res2; } else if (!isBeta(res1) && isBeta(res2)) { return res1; } else { return null; } }
[ "private", "RepositoryResource", "returnNonBetaResourceOrNull", "(", "RepositoryResource", "res1", ",", "RepositoryResource", "res2", ")", "{", "if", "(", "isBeta", "(", "res1", ")", "&&", "!", "isBeta", "(", "res2", ")", ")", "{", "return", "res2", ";", "}", ...
Take in two resources. If one (only) is beta return the non beta one
[ "Take", "in", "two", "resources", ".", "If", "one", "(", "only", ")", "is", "beta", "return", "the", "non", "beta", "one" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/strategies/writeable/AddThenHideOldStrategy.java#L288-L296
aerogear/aerogear-crypto-java
src/main/java/org/jboss/aerogear/crypto/Util.java
Util.formatter
public static String formatter(Mode mode, Padding padding) { """ Utility method to format algorithms name in Java like way @param mode @param padding @return string name with the formatted algorithm """ return String.format("%s/%s", mode, padding); }
java
public static String formatter(Mode mode, Padding padding) { return String.format("%s/%s", mode, padding); }
[ "public", "static", "String", "formatter", "(", "Mode", "mode", ",", "Padding", "padding", ")", "{", "return", "String", ".", "format", "(", "\"%s/%s\"", ",", "mode", ",", "padding", ")", ";", "}" ]
Utility method to format algorithms name in Java like way @param mode @param padding @return string name with the formatted algorithm
[ "Utility", "method", "to", "format", "algorithms", "name", "in", "Java", "like", "way" ]
train
https://github.com/aerogear/aerogear-crypto-java/blob/3a371780f7deff603f5a7a1dd3de1eeb5e147202/src/main/java/org/jboss/aerogear/crypto/Util.java#L91-L93
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/ClusterListenerFactory.java
ClusterListenerFactory.createClusterListener
public ClusterListener createClusterListener(boolean localOnly) { """ Creates a cluster listener. @param localOnly Indicates whether to force the cluster to be local only. @return A new cluster listener. """ if (localOnly) return new NoClusterListener(); HazelcastInstance hazelcast = getHazelcastIn...
java
public ClusterListener createClusterListener(boolean localOnly) { if (localOnly) return new NoClusterListener(); HazelcastInstance hazelcast = getHazelcastInstance(vertx); if (hazelcast != null) { return new HazelcastClusterListener(hazelcast, vertx); } else { return new NoClusterListener();...
[ "public", "ClusterListener", "createClusterListener", "(", "boolean", "localOnly", ")", "{", "if", "(", "localOnly", ")", "return", "new", "NoClusterListener", "(", ")", ";", "HazelcastInstance", "hazelcast", "=", "getHazelcastInstance", "(", "vertx", ")", ";", "i...
Creates a cluster listener. @param localOnly Indicates whether to force the cluster to be local only. @return A new cluster listener.
[ "Creates", "a", "cluster", "listener", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/ClusterListenerFactory.java#L67-L75
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/Base64.java
Base64.encodeBytes
public static String encodeBytes( byte[] source, int off, int len, boolean breakLines ) { """ Encodes a byte array into Base64 notation. @param source The data to convert @param off Offset in array where conversion should begin @param len Length of data to convert @param breakLines Break lines at 80 characte...
java
public static String encodeBytes( byte[] source, int off, int len, boolean breakLines ) { int len43 = len * 4 / 3; byte[] outBuff = new byte[ ( len43 ) // Main 4:3 + ( (len % 3) > 0 ? 4 : 0 ) // Account for padding ...
[ "public", "static", "String", "encodeBytes", "(", "byte", "[", "]", "source", ",", "int", "off", ",", "int", "len", ",", "boolean", "breakLines", ")", "{", "int", "len43", "=", "len", "*", "4", "/", "3", ";", "byte", "[", "]", "outBuff", "=", "new"...
Encodes a byte array into Base64 notation. @param source The data to convert @param off Offset in array where conversion should begin @param len Length of data to convert @param breakLines Break lines at 80 characters or less. @since 1.4
[ "Encodes", "a", "byte", "array", "into", "Base64", "notation", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/Base64.java#L513-L543
lucee/Lucee
core/src/main/java/lucee/transformer/util/SourceCode.java
SourceCode.isCurrentBetween
public boolean isCurrentBetween(char left, char right) { """ is the character at the current position (internal pointer) in the range of the given input characters? @param left lower value. @param right upper value. """ if (!isValidIndex()) return false; return lcText[pos] >= left && lcText[pos] <= righ...
java
public boolean isCurrentBetween(char left, char right) { if (!isValidIndex()) return false; return lcText[pos] >= left && lcText[pos] <= right; }
[ "public", "boolean", "isCurrentBetween", "(", "char", "left", ",", "char", "right", ")", "{", "if", "(", "!", "isValidIndex", "(", ")", ")", "return", "false", ";", "return", "lcText", "[", "pos", "]", ">=", "left", "&&", "lcText", "[", "pos", "]", "...
is the character at the current position (internal pointer) in the range of the given input characters? @param left lower value. @param right upper value.
[ "is", "the", "character", "at", "the", "current", "position", "(", "internal", "pointer", ")", "in", "the", "range", "of", "the", "given", "input", "characters?" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/util/SourceCode.java#L158-L161
Syncleus/aparapi
src/main/java/com/aparapi/internal/instruction/ExpressionList.java
ExpressionList.insertBetween
public void insertBetween(Instruction _prev, Instruction _next, Instruction _newOne) { """ Insert the given instruction (_newone) between the existing entries (_prev and _next). @param _prev @param _next @param _newOne """ _newOne.setNextExpr(null); _newOne.setPrevExpr(null); if (_prev == ...
java
public void insertBetween(Instruction _prev, Instruction _next, Instruction _newOne) { _newOne.setNextExpr(null); _newOne.setPrevExpr(null); if (_prev == null) { // this is the new head if (_next == null) { head = tail = _newOne; } else { _newOne.setN...
[ "public", "void", "insertBetween", "(", "Instruction", "_prev", ",", "Instruction", "_next", ",", "Instruction", "_newOne", ")", "{", "_newOne", ".", "setNextExpr", "(", "null", ")", ";", "_newOne", ".", "setPrevExpr", "(", "null", ")", ";", "if", "(", "_p...
Insert the given instruction (_newone) between the existing entries (_prev and _next). @param _prev @param _next @param _newOne
[ "Insert", "the", "given", "instruction", "(", "_newone", ")", "between", "the", "existing", "entries", "(", "_prev", "and", "_next", ")", "." ]
train
https://github.com/Syncleus/aparapi/blob/6d5892c8e69854b3968c541023de37cf4762bd24/src/main/java/com/aparapi/internal/instruction/ExpressionList.java#L230-L253
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanDesc.java
BeanDesc.isMatchSetter
private boolean isMatchSetter(String methodName, String fieldName, boolean isBooeanField) { """ 方法是否为Setter方法<br> 匹配规则如下(忽略大小写): <pre> 字段名 -》 方法名 isName -》 setName isName -》 setIsName name -》 setName </pre> @param methodName 方法名 @param fieldName 字段名 @param isBooeanField 是否为Boolean类型字段 @retu...
java
private boolean isMatchSetter(String methodName, String fieldName, boolean isBooeanField) { // 全部转为小写,忽略大小写比较 methodName = methodName.toLowerCase(); fieldName = fieldName.toLowerCase(); // 非标准Setter方法跳过 if (false == methodName.startsWith("set")) { return false; } // 针对Boolean类型特殊检查 if (i...
[ "private", "boolean", "isMatchSetter", "(", "String", "methodName", ",", "String", "fieldName", ",", "boolean", "isBooeanField", ")", "{", "// 全部转为小写,忽略大小写比较\r", "methodName", "=", "methodName", ".", "toLowerCase", "(", ")", ";", "fieldName", "=", "fieldName", "."...
方法是否为Setter方法<br> 匹配规则如下(忽略大小写): <pre> 字段名 -》 方法名 isName -》 setName isName -》 setIsName name -》 setName </pre> @param methodName 方法名 @param fieldName 字段名 @param isBooeanField 是否为Boolean类型字段 @return 是否匹配
[ "方法是否为Setter方法<br", ">", "匹配规则如下(忽略大小写):" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanDesc.java#L267-L289
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/DefaultErrorHandler.java
DefaultErrorHandler.prepareError
protected Error prepareError(int statusCode, RouteContext routeContext) { """ Prepares an Error instance for the error response. @param statusCode @param routeContext @return an Error """ String messageKey = "pippo.statusCode" + statusCode; Error error = new Error(); error.setStat...
java
protected Error prepareError(int statusCode, RouteContext routeContext) { String messageKey = "pippo.statusCode" + statusCode; Error error = new Error(); error.setStatusCode(statusCode); error.setStatusMessage(application.getMessages().get(messageKey, routeContext)); error.setRe...
[ "protected", "Error", "prepareError", "(", "int", "statusCode", ",", "RouteContext", "routeContext", ")", "{", "String", "messageKey", "=", "\"pippo.statusCode\"", "+", "statusCode", ";", "Error", "error", "=", "new", "Error", "(", ")", ";", "error", ".", "set...
Prepares an Error instance for the error response. @param statusCode @param routeContext @return an Error
[ "Prepares", "an", "Error", "instance", "for", "the", "error", "response", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/DefaultErrorHandler.java#L283-L295
meridor/perspective-backend
perspective-sql/src/main/java/org/meridor/perspective/sql/impl/parser/DataSourceUtils.java
DataSourceUtils.addToDataSource
public static void addToDataSource(DataSource parent, DataSource child) { """ Builds optimized data source as a tree @param parent data source to add child to @param child child data source """ if (!parent.getLeftDataSource().isPresent()) { parent.setLeftDataSource(child); } else ...
java
public static void addToDataSource(DataSource parent, DataSource child) { if (!parent.getLeftDataSource().isPresent()) { parent.setLeftDataSource(child); } else if (!parent.getRightDataSource().isPresent()) { parent.setRightDataSource(child); } else { DataSour...
[ "public", "static", "void", "addToDataSource", "(", "DataSource", "parent", ",", "DataSource", "child", ")", "{", "if", "(", "!", "parent", ".", "getLeftDataSource", "(", ")", ".", "isPresent", "(", ")", ")", "{", "parent", ".", "setLeftDataSource", "(", "...
Builds optimized data source as a tree @param parent data source to add child to @param child child data source
[ "Builds", "optimized", "data", "source", "as", "a", "tree" ]
train
https://github.com/meridor/perspective-backend/blob/5f98083977a57115988678e97d1642ee83431258/perspective-sql/src/main/java/org/meridor/perspective/sql/impl/parser/DataSourceUtils.java#L31-L42
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.analyzeImageByDomainInStreamWithServiceResponseAsync
public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter) { """ This operation recognizes content within an image by applying a domain-specific ...
java
public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentExcept...
[ "public", "Observable", "<", "ServiceResponse", "<", "DomainModelResults", ">", ">", "analyzeImageByDomainInStreamWithServiceResponseAsync", "(", "String", "model", ",", "byte", "[", "]", "image", ",", "AnalyzeImageByDomainInStreamOptionalParameter", "analyzeImageByDomainInStre...
This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API only provides a single domain-specific model: celebrities. Two input methods are su...
[ "This", "operation", "recognizes", "content", "within", "an", "image", "by", "applying", "a", "domain", "-", "specific", "model", ".", "The", "list", "of", "domain", "-", "specific", "models", "that", "are", "supported", "by", "the", "Computer", "Vision", "A...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L302-L315
mabe02/lanterna
src/main/java/com/googlecode/lanterna/gui2/AbstractInteractableComponent.java
AbstractInteractableComponent.onEnterFocus
@Override public final void onEnterFocus(FocusChangeDirection direction, Interactable previouslyInFocus) { """ {@inheritDoc} <p> This method is final in {@code AbstractInteractableComponent}, please override {@code afterEnterFocus} instead """ inFocus = true; afterEnterFocus(direction, pr...
java
@Override public final void onEnterFocus(FocusChangeDirection direction, Interactable previouslyInFocus) { inFocus = true; afterEnterFocus(direction, previouslyInFocus); }
[ "@", "Override", "public", "final", "void", "onEnterFocus", "(", "FocusChangeDirection", "direction", ",", "Interactable", "previouslyInFocus", ")", "{", "inFocus", "=", "true", ";", "afterEnterFocus", "(", "direction", ",", "previouslyInFocus", ")", ";", "}" ]
{@inheritDoc} <p> This method is final in {@code AbstractInteractableComponent}, please override {@code afterEnterFocus} instead
[ "{" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/gui2/AbstractInteractableComponent.java#L63-L67
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
ParameterTool.getByte
public byte getByte(String key, byte defaultValue) { """ Returns the Byte value for the given key. If the key does not exists it will return the default value given. The method fails if the value is not a Byte. """ addToDefaults(key, Byte.toString(defaultValue)); String value = get(key); if (value == nu...
java
public byte getByte(String key, byte defaultValue) { addToDefaults(key, Byte.toString(defaultValue)); String value = get(key); if (value == null) { return defaultValue; } else { return Byte.valueOf(value); } }
[ "public", "byte", "getByte", "(", "String", "key", ",", "byte", "defaultValue", ")", "{", "addToDefaults", "(", "key", ",", "Byte", ".", "toString", "(", "defaultValue", ")", ")", ";", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "...
Returns the Byte value for the given key. If the key does not exists it will return the default value given. The method fails if the value is not a Byte.
[ "Returns", "the", "Byte", "value", "for", "the", "given", "key", ".", "If", "the", "key", "does", "not", "exists", "it", "will", "return", "the", "default", "value", "given", ".", "The", "method", "fails", "if", "the", "value", "is", "not", "a", "Byte"...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L449-L457
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/datalog/impl/DatalogTools.java
DatalogTools.foldBooleanConditions
public Expression foldBooleanConditions(List<Function> booleanAtoms) { """ Folds a list of boolean atoms into one AND(AND(...)) boolean atom. """ if (booleanAtoms.length() == 0) return TRUE_EQ; Expression firstBooleanAtom = convertOrCastIntoBooleanAtom( booleanAtoms.head()); ...
java
public Expression foldBooleanConditions(List<Function> booleanAtoms) { if (booleanAtoms.length() == 0) return TRUE_EQ; Expression firstBooleanAtom = convertOrCastIntoBooleanAtom( booleanAtoms.head()); return booleanAtoms.tail().foldLeft(new F2<Expression, Function, Expression>() { ...
[ "public", "Expression", "foldBooleanConditions", "(", "List", "<", "Function", ">", "booleanAtoms", ")", "{", "if", "(", "booleanAtoms", ".", "length", "(", ")", "==", "0", ")", "return", "TRUE_EQ", ";", "Expression", "firstBooleanAtom", "=", "convertOrCastIntoB...
Folds a list of boolean atoms into one AND(AND(...)) boolean atom.
[ "Folds", "a", "list", "of", "boolean", "atoms", "into", "one", "AND", "(", "AND", "(", "...", "))", "boolean", "atom", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/datalog/impl/DatalogTools.java#L69-L81
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java
Operations.createUndefineAttributeOperation
public static ModelNode createUndefineAttributeOperation(PathAddress address, String name) { """ Creates an undefine-attribute operation using the specified address and name. @param address a resource path @param name an attribute name @return an undefine-attribute operation """ return createAttribu...
java
public static ModelNode createUndefineAttributeOperation(PathAddress address, String name) { return createAttributeOperation(ModelDescriptionConstants.UNDEFINE_ATTRIBUTE_OPERATION, address, name); }
[ "public", "static", "ModelNode", "createUndefineAttributeOperation", "(", "PathAddress", "address", ",", "String", "name", ")", "{", "return", "createAttributeOperation", "(", "ModelDescriptionConstants", ".", "UNDEFINE_ATTRIBUTE_OPERATION", ",", "address", ",", "name", "...
Creates an undefine-attribute operation using the specified address and name. @param address a resource path @param name an attribute name @return an undefine-attribute operation
[ "Creates", "an", "undefine", "-", "attribute", "operation", "using", "the", "specified", "address", "and", "name", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java#L129-L131
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java
BaseJsonBo.getSubAttr
public <T> T getSubAttr(String attrName, String dPath, Class<T> clazz) { """ Get a sub-attribute using d-path. @param attrName @param dPath @param clazz @return @see DPathUtils """ Lock lock = lockForRead(); try { return JacksonUtils.getValue(getAttribute(attrName), dPath, cl...
java
public <T> T getSubAttr(String attrName, String dPath, Class<T> clazz) { Lock lock = lockForRead(); try { return JacksonUtils.getValue(getAttribute(attrName), dPath, clazz); } finally { lock.unlock(); } }
[ "public", "<", "T", ">", "T", "getSubAttr", "(", "String", "attrName", ",", "String", "dPath", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Lock", "lock", "=", "lockForRead", "(", ")", ";", "try", "{", "return", "JacksonUtils", ".", "getValue", "...
Get a sub-attribute using d-path. @param attrName @param dPath @param clazz @return @see DPathUtils
[ "Get", "a", "sub", "-", "attribute", "using", "d", "-", "path", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java#L154-L161
riversun/bigdoc
src/main/java/org/riversun/bigdoc/bin/BigFileSearcher.java
BigFileSearcher.indexOf
public Long indexOf(File f, byte[] searchBytes, long fromPosition) { """ Returns the index within this file of the first occurrence of the specified substring, starting at the specified position. @param f target file @param searchBytes a sequence of bytes you want to find @param fromPosition "0" means the...
java
public Long indexOf(File f, byte[] searchBytes, long fromPosition) { return binFileSearcher.indexOf(f, searchBytes, fromPosition); }
[ "public", "Long", "indexOf", "(", "File", "f", ",", "byte", "[", "]", "searchBytes", ",", "long", "fromPosition", ")", "{", "return", "binFileSearcher", ".", "indexOf", "(", "f", ",", "searchBytes", ",", "fromPosition", ")", ";", "}" ]
Returns the index within this file of the first occurrence of the specified substring, starting at the specified position. @param f target file @param searchBytes a sequence of bytes you want to find @param fromPosition "0" means the beginning of the file @return position of the first occurence. '-1' means that it was...
[ "Returns", "the", "index", "within", "this", "file", "of", "the", "first", "occurrence", "of", "the", "specified", "substring", "starting", "at", "the", "specified", "position", "." ]
train
https://github.com/riversun/bigdoc/blob/46bd7c9a8667be23acdb1ad8286027e4b08cff3a/src/main/java/org/riversun/bigdoc/bin/BigFileSearcher.java#L200-L202
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelFormatter.java
HpelFormatter.addCustomLevel
public static void addCustomLevel(Level level, String id) { """ Adds level to be treated specially by this formatter. @param level level to be added to the special list @param id one character id to use for this level. If it's <code>null</code> first character of the level name will be used """ if ...
java
public static void addCustomLevel(Level level, String id) { if (level == null) { throw new IllegalArgumentException("Parameter level can not be 'null' in this call"); } if (id == null) { id = level.getName().substring(0, 1); } customLevels.put(level, id); ...
[ "public", "static", "void", "addCustomLevel", "(", "Level", "level", ",", "String", "id", ")", "{", "if", "(", "level", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter level can not be 'null' in this call\"", ")", ";", "}", ...
Adds level to be treated specially by this formatter. @param level level to be added to the special list @param id one character id to use for this level. If it's <code>null</code> first character of the level name will be used
[ "Adds", "level", "to", "be", "treated", "specially", "by", "this", "formatter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelFormatter.java#L164-L172
jmock-developers/jmock-library
jmock/src/main/java/org/jmock/lib/script/ScriptedAction.java
ScriptedAction.where
public ScriptedAction where(String name, Object value) { """ Defines a variable that can be referred to by the script. @param name the name of the variable @param value the value of the variable @return the action, so that more variables can be defined if needed """ try { interprete...
java
public ScriptedAction where(String name, Object value) { try { interpreter.set(name, value); } catch (EvalError e) { throw new IllegalArgumentException("invalid name binding", e); } return this; }
[ "public", "ScriptedAction", "where", "(", "String", "name", ",", "Object", "value", ")", "{", "try", "{", "interpreter", ".", "set", "(", "name", ",", "value", ")", ";", "}", "catch", "(", "EvalError", "e", ")", "{", "throw", "new", "IllegalArgumentExcep...
Defines a variable that can be referred to by the script. @param name the name of the variable @param value the value of the variable @return the action, so that more variables can be defined if needed
[ "Defines", "a", "variable", "that", "can", "be", "referred", "to", "by", "the", "script", "." ]
train
https://github.com/jmock-developers/jmock-library/blob/a6a9d32f3ed0df4a959d3c7421d5f336279b9962/jmock/src/main/java/org/jmock/lib/script/ScriptedAction.java#L97-L105
liyiorg/weixin-popular
src/main/java/weixin/popular/api/ShakeAroundAPI.java
ShakeAroundAPI.pageSearch
public static PageSearchResult pageSearch(String accessToken, PageSearch pageSearch) { """ 页面管理-查询页面列表 @param accessToken accessToken @param pageSearch pageSearch @return result """ return pageSearch(accessToken, JsonUtil.toJSONString(pageSearch)); ...
java
public static PageSearchResult pageSearch(String accessToken, PageSearch pageSearch) { return pageSearch(accessToken, JsonUtil.toJSONString(pageSearch)); }
[ "public", "static", "PageSearchResult", "pageSearch", "(", "String", "accessToken", ",", "PageSearch", "pageSearch", ")", "{", "return", "pageSearch", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "pageSearch", ")", ")", ";", "}" ]
页面管理-查询页面列表 @param accessToken accessToken @param pageSearch pageSearch @return result
[ "页面管理-查询页面列表" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/ShakeAroundAPI.java#L788-L791
spring-projects/spring-mobile
spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/StandardSiteSwitcherHandlerFactory.java
StandardSiteSwitcherHandlerFactory.dotMobi
public static SiteSwitcherHandler dotMobi(String serverName, Boolean tabletIsMobile) { """ Creates a site switcher that redirects to a <code>.mobi</code> domain for normal site requests that either originate from a mobile device or indicate a mobile site preference. Will strip off the trailing domain name when b...
java
public static SiteSwitcherHandler dotMobi(String serverName, Boolean tabletIsMobile) { int lastDot = serverName.lastIndexOf('.'); return standard(serverName, serverName.substring(0, lastDot) + ".mobi", "." + serverName, tabletIsMobile); }
[ "public", "static", "SiteSwitcherHandler", "dotMobi", "(", "String", "serverName", ",", "Boolean", "tabletIsMobile", ")", "{", "int", "lastDot", "=", "serverName", ".", "lastIndexOf", "(", "'", "'", ")", ";", "return", "standard", "(", "serverName", ",", "serv...
Creates a site switcher that redirects to a <code>.mobi</code> domain for normal site requests that either originate from a mobile device or indicate a mobile site preference. Will strip off the trailing domain name when building the mobile domain e.g. "app.com" will become "app.mobi" (the .com will be stripped). Uses ...
[ "Creates", "a", "site", "switcher", "that", "redirects", "to", "a", "<code", ">", ".", "mobi<", "/", "code", ">", "domain", "for", "normal", "site", "requests", "that", "either", "originate", "from", "a", "mobile", "device", "or", "indicate", "a", "mobile"...
train
https://github.com/spring-projects/spring-mobile/blob/a402cbcaf208e24288b957f44c9984bd6e8bf064/spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/StandardSiteSwitcherHandlerFactory.java#L64-L67
opentelecoms-org/jsmpp
jsmpp/src/main/java/org/jsmpp/bean/DeliveryReceipt.java
DeliveryReceipt.getDeliveryReceiptValue
private static String getDeliveryReceiptValue(String attrName, String source) throws IndexOutOfBoundsException { """ Get the delivery receipt attribute value. @param attrName is the attribute name. @param source the original source id:IIIIIIIIII sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done date:Y...
java
private static String getDeliveryReceiptValue(String attrName, String source) throws IndexOutOfBoundsException { String tmpAttr = attrName + ":"; int startIndex = source.indexOf(tmpAttr); if (startIndex < 0) { return null; } startIndex = startIndex + tmpAt...
[ "private", "static", "String", "getDeliveryReceiptValue", "(", "String", "attrName", ",", "String", "source", ")", "throws", "IndexOutOfBoundsException", "{", "String", "tmpAttr", "=", "attrName", "+", "\":\"", ";", "int", "startIndex", "=", "source", ".", "indexO...
Get the delivery receipt attribute value. @param attrName is the attribute name. @param source the original source id:IIIIIIIIII sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done date:YYMMDDhhmm stat:DDDDDDD err:E Text:.................... @return the value of specified attribute. @throws IndexOutOfBoundsException
[ "Get", "the", "delivery", "receipt", "attribute", "value", "." ]
train
https://github.com/opentelecoms-org/jsmpp/blob/acc15e73e7431deabc803731971b15323315baaf/jsmpp/src/main/java/org/jsmpp/bean/DeliveryReceipt.java#L378-L391
samskivert/pythagoras
src/main/java/pythagoras/d/Matrix4.java
Matrix4.setToPerspective
public Matrix4 setToPerspective (double fovy, double aspect, double near, double far) { """ Sets this to a perspective projection matrix. The formula comes from the OpenGL documentation for the gluPerspective function. @return a reference to this matrix, for chaining. """ double f = 1f / Math.tan(f...
java
public Matrix4 setToPerspective (double fovy, double aspect, double near, double far) { double f = 1f / Math.tan(fovy / 2f), dscale = 1f / (near - far); return set(f/aspect, 0f, 0f, 0f, 0f, f, 0f, 0f, 0f, 0f, (far+near) * dscale, 2f * far * near * dscale, ...
[ "public", "Matrix4", "setToPerspective", "(", "double", "fovy", ",", "double", "aspect", ",", "double", "near", ",", "double", "far", ")", "{", "double", "f", "=", "1f", "/", "Math", ".", "tan", "(", "fovy", "/", "2f", ")", ",", "dscale", "=", "1f", ...
Sets this to a perspective projection matrix. The formula comes from the OpenGL documentation for the gluPerspective function. @return a reference to this matrix, for chaining.
[ "Sets", "this", "to", "a", "perspective", "projection", "matrix", ".", "The", "formula", "comes", "from", "the", "OpenGL", "documentation", "for", "the", "gluPerspective", "function", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Matrix4.java#L373-L379
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/ScreenSteps.java
ScreenSteps.startVideoCapture
@Conditioned @Et("Je commence la capture vidéo dans '(.*)'[\\.|\\?]") @And("I start video capture in '(.*)'[\\.|\\?]") public void startVideoCapture(String screenName, List<GherkinStepCondition> conditions) throws IOException, AWTException { """ I start video capture and add to DOWNLOAD_FILES_FOLDER fo...
java
@Conditioned @Et("Je commence la capture vidéo dans '(.*)'[\\.|\\?]") @And("I start video capture in '(.*)'[\\.|\\?]") public void startVideoCapture(String screenName, List<GherkinStepCondition> conditions) throws IOException, AWTException { logger.debug("I start video capture in [{}].", screenName)...
[ "@", "Conditioned", "@", "Et", "(", "\"Je commence la capture vidéo dans '(.*)'[\\\\.|\\\\?]\")", "", "@", "And", "(", "\"I start video capture in '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "startVideoCapture", "(", "String", "screenName", ",", "List", "<", "GherkinStep...
I start video capture and add to DOWNLOAD_FILES_FOLDER folder. @param screenName name of video file. @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws IOException if file or directory is wrong. @throws AWTException if configurati...
[ "I", "start", "video", "capture", "and", "add", "to", "DOWNLOAD_FILES_FOLDER", "folder", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/ScreenSteps.java#L116-L122
drallgood/jpasskit
jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java
PKSigningInformationUtil.loadDERCertificate
@Deprecated public X509Certificate loadDERCertificate(InputStream certificateInputStream) throws IOException, CertificateException { """ Load a DER Certificate from an <code>InputStream</code>. The caller is responsible for closing the stream after this method returns successfully or fails. @param certif...
java
@Deprecated public X509Certificate loadDERCertificate(InputStream certificateInputStream) throws IOException, CertificateException { try { return CertUtils.toX509Certificate(certificateInputStream); } catch (IllegalStateException ex) { throw new IOException("Certificate from ...
[ "@", "Deprecated", "public", "X509Certificate", "loadDERCertificate", "(", "InputStream", "certificateInputStream", ")", "throws", "IOException", ",", "CertificateException", "{", "try", "{", "return", "CertUtils", ".", "toX509Certificate", "(", "certificateInputStream", ...
Load a DER Certificate from an <code>InputStream</code>. The caller is responsible for closing the stream after this method returns successfully or fails. @param certificateInputStream <code>InputStream</code> containing the certificate. @return Loaded certificate. @throws IOException @throws CertificateException @de...
[ "Load", "a", "DER", "Certificate", "from", "an", "<code", ">", "InputStream<", "/", "code", ">", "." ]
train
https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java#L185-L192
mgormley/prim
src/main/java/edu/jhu/prim/sample/PairSampler.java
PairSampler.countUnorderedPairs
public static long countUnorderedPairs(int minI, int maxI, int minJ, int maxJ) { """ Count the number of unordered pairs that satisfy the constraint the constraints: minI <= i < maxI and minJ <= j < maxJ. Note that since these are unordered pairs. We can think of this as being the count of ordered pairs (i,j)...
java
public static long countUnorderedPairs(int minI, int maxI, int minJ, int maxJ) { long maxPairs = 0; int min = Math.min(minI, minJ); int max = Math.max(maxI, maxJ); for (int i=min; i<max; i++) { for (int j=i; j<max; j++) { if ((minI <= i && i < maxI && min...
[ "public", "static", "long", "countUnorderedPairs", "(", "int", "minI", ",", "int", "maxI", ",", "int", "minJ", ",", "int", "maxJ", ")", "{", "long", "maxPairs", "=", "0", ";", "int", "min", "=", "Math", ".", "min", "(", "minI", ",", "minJ", ")", ";...
Count the number of unordered pairs that satisfy the constraint the constraints: minI <= i < maxI and minJ <= j < maxJ. Note that since these are unordered pairs. We can think of this as being the count of ordered pairs (i,j) s.t. i<=j and either of the following two conditions holds: minI <= i < maxI and minJ <= j <...
[ "Count", "the", "number", "of", "unordered", "pairs", "that", "satisfy", "the", "constraint", "the", "constraints", ":", "minI", "<", "=", "i", "<", "maxI", "and", "minJ", "<", "=", "j", "<", "maxJ", "." ]
train
https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/sample/PairSampler.java#L128-L142
Erudika/para
para-server/src/main/java/com/erudika/para/security/filters/OpenIDAuthFilter.java
OpenIDAuthFilter.attemptAuthentication
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws IOException { """ Handles an authentication request. @param request HTTP request @param response HTTP response @return an authentication object that contains the principal object if success...
java
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws IOException { final String requestURI = request.getRequestURI(); UserAuthentication userAuth = null; User user = null; if (requestURI.endsWith(OPENID_ACTION)) { Authentication oidAuth =...
[ "@", "Override", "public", "Authentication", "attemptAuthentication", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "final", "String", "requestURI", "=", "request", ".", "getRequestURI", "(", ")", ";",...
Handles an authentication request. @param request HTTP request @param response HTTP response @return an authentication object that contains the principal object if successful. @throws IOException ex
[ "Handles", "an", "authentication", "request", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/security/filters/OpenIDAuthFilter.java#L68-L90
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.setSlidingDrawer
public void setSlidingDrawer(int index, int status) { """ Sets the status of a SlidingDrawer matching the specified index. Examples of status are: {@code Solo.CLOSED} and {@code Solo.OPENED}. @param index the index of the {@link SlidingDrawer} @param status the status to set the {@link SlidingDrawer} """ ...
java
public void setSlidingDrawer(int index, int status){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "setSlidingDrawer("+index+", "+status+")"); } setSlidingDrawer(waiter.waitForAndGetView(index, SlidingDrawer.class), status); }
[ "public", "void", "setSlidingDrawer", "(", "int", "index", ",", "int", "status", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"setSlidingDrawer(\"", "+", "index", "+", "\",...
Sets the status of a SlidingDrawer matching the specified index. Examples of status are: {@code Solo.CLOSED} and {@code Solo.OPENED}. @param index the index of the {@link SlidingDrawer} @param status the status to set the {@link SlidingDrawer}
[ "Sets", "the", "status", "of", "a", "SlidingDrawer", "matching", "the", "specified", "index", ".", "Examples", "of", "status", "are", ":", "{", "@code", "Solo", ".", "CLOSED", "}", "and", "{", "@code", "Solo", ".", "OPENED", "}", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2632-L2638
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/AttributeService.java
AttributeService.getFileAttributeView
@SuppressWarnings("unchecked") @Nullable public <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { """ Returns an attribute view of the given type for the given file lookup callback, or {@code null} if the view type is not supported. """ AttributeProvider provider...
java
@SuppressWarnings("unchecked") @Nullable public <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { AttributeProvider provider = providersByViewType.get(type); if (provider != null) { return (V) provider.view(lookup, createInheritedViews(lookup, provider)); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Nullable", "public", "<", "V", "extends", "FileAttributeView", ">", "V", "getFileAttributeView", "(", "FileLookup", "lookup", ",", "Class", "<", "V", ">", "type", ")", "{", "AttributeProvider", "provider"...
Returns an attribute view of the given type for the given file lookup callback, or {@code null} if the view type is not supported.
[ "Returns", "an", "attribute", "view", "of", "the", "given", "type", "for", "the", "given", "file", "lookup", "callback", "or", "{" ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java#L261-L271
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/mime/MimeTypeParser.java
MimeTypeParser.parseMimeType
@Nullable public static MimeType parseMimeType (@Nullable final String sMimeType) { """ Try to convert the string representation of a MIME type to an object. The default quoting algorithm {@link CMimeType#DEFAULT_QUOTING} is used to unquote strings. @param sMimeType The string representation to be converte...
java
@Nullable public static MimeType parseMimeType (@Nullable final String sMimeType) { return parseMimeType (sMimeType, CMimeType.DEFAULT_QUOTING); }
[ "@", "Nullable", "public", "static", "MimeType", "parseMimeType", "(", "@", "Nullable", "final", "String", "sMimeType", ")", "{", "return", "parseMimeType", "(", "sMimeType", ",", "CMimeType", ".", "DEFAULT_QUOTING", ")", ";", "}" ]
Try to convert the string representation of a MIME type to an object. The default quoting algorithm {@link CMimeType#DEFAULT_QUOTING} is used to unquote strings. @param sMimeType The string representation to be converted. May be <code>null</code>. @return <code>null</code> if the parsed string is empty. @throws MimeTy...
[ "Try", "to", "convert", "the", "string", "representation", "of", "a", "MIME", "type", "to", "an", "object", ".", "The", "default", "quoting", "algorithm", "{", "@link", "CMimeType#DEFAULT_QUOTING", "}", "is", "used", "to", "unquote", "strings", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/mime/MimeTypeParser.java#L291-L295
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java
XmlDataProviderImpl.getFilteredXml
@SuppressWarnings("unchecked") private String getFilteredXml(Document document, String xpathExpression) { """ Generates an XML string containing only the nodes filtered by the XPath expression. @param document An XML {@link org.dom4j.Document} @param xpathExpression A string indicating the XPath expressi...
java
@SuppressWarnings("unchecked") private String getFilteredXml(Document document, String xpathExpression) { logger.entering(new Object[] { document, xpathExpression }); List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression); StringBuilder newDocument = new StringBuilder(documen...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "String", "getFilteredXml", "(", "Document", "document", ",", "String", "xpathExpression", ")", "{", "logger", ".", "entering", "(", "new", "Object", "[", "]", "{", "document", ",", "xpathExpression"...
Generates an XML string containing only the nodes filtered by the XPath expression. @param document An XML {@link org.dom4j.Document} @param xpathExpression A string indicating the XPath expression to be evaluated. @return A string of XML data with root node named "root".
[ "Generates", "an", "XML", "string", "containing", "only", "the", "nodes", "filtered", "by", "the", "XPath", "expression", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L424-L438
FasterXML/woodstox
src/main/java/com/ctc/wstx/sr/TypedStreamReader.java
TypedStreamReader.getAttributeAsArray
@Override public int getAttributeAsArray(int index, TypedArrayDecoder tad) throws XMLStreamException { """ Method that allows reading contents of an attribute as an array of whitespace-separate tokens, decoded using specified decoder. @return Number of tokens decoded, 0 if none found """ if (mC...
java
@Override public int getAttributeAsArray(int index, TypedArrayDecoder tad) throws XMLStreamException { if (mCurrToken != START_ELEMENT) { throw new IllegalStateException(ErrorConsts.ERR_STATE_NOT_STELEM); } return mAttrCollector.decodeValues(index, tad, this); }
[ "@", "Override", "public", "int", "getAttributeAsArray", "(", "int", "index", ",", "TypedArrayDecoder", "tad", ")", "throws", "XMLStreamException", "{", "if", "(", "mCurrToken", "!=", "START_ELEMENT", ")", "{", "throw", "new", "IllegalStateException", "(", "ErrorC...
Method that allows reading contents of an attribute as an array of whitespace-separate tokens, decoded using specified decoder. @return Number of tokens decoded, 0 if none found
[ "Method", "that", "allows", "reading", "contents", "of", "an", "attribute", "as", "an", "array", "of", "whitespace", "-", "separate", "tokens", "decoded", "using", "specified", "decoder", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sr/TypedStreamReader.java#L694-L701
finmath/finmath-lib
src/main/java/net/finmath/time/ScheduleGenerator.java
ScheduleGenerator.createScheduleFromConventions
public static Schedule createScheduleFromConventions( LocalDate referenceDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, BusinessdayCalendar businessdayCalendar, ...
java
public static Schedule createScheduleFromConventions( LocalDate referenceDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, BusinessdayCalendar businessdayCalendar, ...
[ "public", "static", "Schedule", "createScheduleFromConventions", "(", "LocalDate", "referenceDate", ",", "int", "spotOffsetDays", ",", "String", "startOffsetString", ",", "String", "maturityString", ",", "String", "frequency", ",", "String", "daycountConvention", ",", "...
Simple schedule generation where startDate and maturityDate are calculated based on referenceDate, spotOffsetDays, startOffsetString and maturityString. The schedule generation considers short periods. Date rolling is ignored. @param referenceDate The date which is used in the schedule to internally convert dates to ...
[ "Simple", "schedule", "generation", "where", "startDate", "and", "maturityDate", "are", "calculated", "based", "on", "referenceDate", "spotOffsetDays", "startOffsetString", "and", "maturityString", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/time/ScheduleGenerator.java#L613-L629
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java
MbeanImplCodeGen.writeConstructor
void writeConstructor(Definition def, Writer out, int indent) throws IOException { """ Output Constructor @param def definition @param out Writer @param indent space number @throws IOException ioException """ writeSimpleMethodSignature(out, indent, " * Default constructor", "public " + getCla...
java
void writeConstructor(Definition def, Writer out, int indent) throws IOException { writeSimpleMethodSignature(out, indent, " * Default constructor", "public " + getClassName(def) + "()"); writeLeftCurlyBracket(out, indent); writeWithIndent(out, indent + 1, "this.mbeanServer = null;\n"); writ...
[ "void", "writeConstructor", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeSimpleMethodSignature", "(", "out", ",", "indent", ",", "\" * Default constructor\"", ",", "\"public \"", "+", "getClassName", ...
Output Constructor @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "Constructor" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java#L72-L83
aws/aws-sdk-java
aws-java-sdk-mediatailor/src/main/java/com/amazonaws/services/mediatailor/model/PutPlaybackConfigurationResult.java
PutPlaybackConfigurationResult.withTags
public PutPlaybackConfigurationResult withTags(java.util.Map<String, String> tags) { """ <p> The tags assigned to the playback configuration. </p> @param tags The tags assigned to the playback configuration. @return Returns a reference to this object so that method calls can be chained together. """ ...
java
public PutPlaybackConfigurationResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "PutPlaybackConfigurationResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags assigned to the playback configuration. </p> @param tags The tags assigned to the playback configuration. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "assigned", "to", "the", "playback", "configuration", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediatailor/src/main/java/com/amazonaws/services/mediatailor/model/PutPlaybackConfigurationResult.java#L555-L558
naver/android-utilset
UtilSet/src/com/navercorp/utilset/ui/ActivityUtils.java
ActivityUtils.isPackageInstalled
public static boolean isPackageInstalled(Context context, String packageName) { """ Checks if a package is installed. @param context Context to be used to verify the existence of the package. @param packageName Package name to be searched. @return true if the package is discovered; false otherwise """ t...
java
public static boolean isPackageInstalled(Context context, String packageName) { try { context.getPackageManager().getApplicationInfo(packageName, 0); return true; } catch (Exception e) { return false; } }
[ "public", "static", "boolean", "isPackageInstalled", "(", "Context", "context", ",", "String", "packageName", ")", "{", "try", "{", "context", ".", "getPackageManager", "(", ")", ".", "getApplicationInfo", "(", "packageName", ",", "0", ")", ";", "return", "tru...
Checks if a package is installed. @param context Context to be used to verify the existence of the package. @param packageName Package name to be searched. @return true if the package is discovered; false otherwise
[ "Checks", "if", "a", "package", "is", "installed", "." ]
train
https://github.com/naver/android-utilset/blob/4af5f821466bc5bec4ea221ca6d87e0ac9b87e0b/UtilSet/src/com/navercorp/utilset/ui/ActivityUtils.java#L26-L33
looly/hulu
src/main/java/com/xiaoleilu/hulu/Response.java
Response.addCookie
public final static void addCookie(String name, String value, int maxAgeInSeconds, String path, String domain) { """ 设定返回给客户端的Cookie @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. n>0 : Cookie存在的秒数. @param path Cookie的有效路径 @param domain the domain name with...
java
public final static void addCookie(String name, String value, int maxAgeInSeconds, String path, String domain) { ServletUtil.addCookie(getServletResponse(), name, value, maxAgeInSeconds, path, domain); }
[ "public", "final", "static", "void", "addCookie", "(", "String", "name", ",", "String", "value", ",", "int", "maxAgeInSeconds", ",", "String", "path", ",", "String", "domain", ")", "{", "ServletUtil", ".", "addCookie", "(", "getServletResponse", "(", ")", ",...
设定返回给客户端的Cookie @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. n>0 : Cookie存在的秒数. @param path Cookie的有效路径 @param domain the domain name within which this cookie is visible; form is according to RFC 2109
[ "设定返回给客户端的Cookie" ]
train
https://github.com/looly/hulu/blob/4072de684e2e2f28ac8a3a44c0d5a690b289ef28/src/main/java/com/xiaoleilu/hulu/Response.java#L213-L215
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHandler.java
ServletHandler.getNamedDispatcher
public RequestDispatcher getNamedDispatcher(String name) { """ Get Named dispatcher. @param name The name of the servlet. If null or empty string, the containers default servlet is returned. @return Request dispatcher for the named servlet. """ if (name == null || name.length()==0) name=...
java
public RequestDispatcher getNamedDispatcher(String name) { if (name == null || name.length()==0) name=__DEFAULT_SERVLET; try { return new Dispatcher(ServletHandler.this,name); } catch(Exception e) {LogSupport.ignore(log,e);} return null; }
[ "public", "RequestDispatcher", "getNamedDispatcher", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "name", "=", "__DEFAULT_SERVLET", ";", "try", "{", "return", "new", "Dispatcher", ...
Get Named dispatcher. @param name The name of the servlet. If null or empty string, the containers default servlet is returned. @return Request dispatcher for the named servlet.
[ "Get", "Named", "dispatcher", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHandler.java#L821-L830
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPMeasurementUnitUtil.java
CPMeasurementUnitUtil.countByG_K_T
public static int countByG_K_T(long groupId, String key, int type) { """ Returns the number of cp measurement units where groupId = &#63; and key = &#63; and type = &#63;. @param groupId the group ID @param key the key @param type the type @return the number of matching cp measurement units """ return ...
java
public static int countByG_K_T(long groupId, String key, int type) { return getPersistence().countByG_K_T(groupId, key, type); }
[ "public", "static", "int", "countByG_K_T", "(", "long", "groupId", ",", "String", "key", ",", "int", "type", ")", "{", "return", "getPersistence", "(", ")", ".", "countByG_K_T", "(", "groupId", ",", "key", ",", "type", ")", ";", "}" ]
Returns the number of cp measurement units where groupId = &#63; and key = &#63; and type = &#63;. @param groupId the group ID @param key the key @param type the type @return the number of matching cp measurement units
[ "Returns", "the", "number", "of", "cp", "measurement", "units", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPMeasurementUnitUtil.java#L901-L903
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java
TaskSession.createRemoteTask
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException { """ Build a new remote session and initialize it. NOTE: This is convenience method to create a task below the current APPLICATION (not below this task) @param properties to create the new remote task @return The remote T...
java
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException { try { Application app = this.getApplication(); RemoteTask remoteServer = new TaskSession(app); ((TaskSession)remoteServer).setProperties(properties); return remoteSer...
[ "public", "RemoteTask", "createRemoteTask", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "try", "{", "Application", "app", "=", "this", ".", "getApplication", "(", ")", ";", "RemoteTask", "remoteServer", "...
Build a new remote session and initialize it. NOTE: This is convenience method to create a task below the current APPLICATION (not below this task) @param properties to create the new remote task @return The remote Task.
[ "Build", "a", "new", "remote", "session", "and", "initialize", "it", ".", "NOTE", ":", "This", "is", "convenience", "method", "to", "create", "a", "task", "below", "the", "current", "APPLICATION", "(", "not", "below", "this", "task", ")" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java#L151-L162
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getChampion
public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) { """ <p> Get information about the specified champion </p> This method does not count towards the rate limit and is not affected by the throttle @param locale Locale code for returned data @param version Data drag...
java
public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) { return new DummyFuture<>(handler.getChampion(id, champData, version, locale)); }
[ "public", "Future", "<", "Champion", ">", "getChampion", "(", "int", "id", ",", "ChampData", "champData", ",", "String", "version", ",", "String", "locale", ")", "{", "return", "new", "DummyFuture", "<>", "(", "handler", ".", "getChampion", "(", "id", ",",...
<p> Get information about the specified champion </p> This method does not count towards the rate limit and is not affected by the throttle @param locale Locale code for returned data @param version Data dragon version for returned data @param id The id of the champion @param champData Additional information to retriev...
[ "<p", ">", "Get", "information", "about", "the", "specified", "champion", "<", "/", "p", ">", "This", "method", "does", "not", "count", "towards", "the", "rate", "limit", "and", "is", "not", "affected", "by", "the", "throttle" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L439-L441
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java
ScreenField.printEndRecordData
public void printEndRecordData(Rec record, PrintWriter out, int iPrintOptions) { """ Display the end record in input format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception. """ this.getScreenFieldView().printEndRecord...
java
public void printEndRecordData(Rec record, PrintWriter out, int iPrintOptions) { this.getScreenFieldView().printEndRecordData(record, out, iPrintOptions); }
[ "public", "void", "printEndRecordData", "(", "Rec", "record", ",", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "this", ".", "getScreenFieldView", "(", ")", ".", "printEndRecordData", "(", "record", ",", "out", ",", "iPrintOptions", ")", ";", ...
Display the end record in input format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception.
[ "Display", "the", "end", "record", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java#L864-L867
wildfly-swarm-archive/ARCHIVE-wildfly-swarm
container/runtime/src/main/java/org/wildfly/swarm/container/runtime/StandaloneXmlParser.java
StandaloneXmlParser.addDelegate
public StandaloneXmlParser addDelegate(QName elementName, XMLElementReader<List<ModelNode>> parser) { """ Add a parser for a subpart of the XML model. @param elementName the FQ element name (i.e. subsystem name) @param parser creates ModelNode's from XML input @return """ xmlMapper.registerRo...
java
public StandaloneXmlParser addDelegate(QName elementName, XMLElementReader<List<ModelNode>> parser) { xmlMapper.registerRootElement(elementName, parser); return this; }
[ "public", "StandaloneXmlParser", "addDelegate", "(", "QName", "elementName", ",", "XMLElementReader", "<", "List", "<", "ModelNode", ">", ">", "parser", ")", "{", "xmlMapper", ".", "registerRootElement", "(", "elementName", ",", "parser", ")", ";", "return", "th...
Add a parser for a subpart of the XML model. @param elementName the FQ element name (i.e. subsystem name) @param parser creates ModelNode's from XML input @return
[ "Add", "a", "parser", "for", "a", "subpart", "of", "the", "XML", "model", "." ]
train
https://github.com/wildfly-swarm-archive/ARCHIVE-wildfly-swarm/blob/28ef71bcfa743a7267666e0ed2919c37b356c09b/container/runtime/src/main/java/org/wildfly/swarm/container/runtime/StandaloneXmlParser.java#L83-L86
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/metadata/security/OUser.java
OUser.allow
public ORole allow(final String iResource, final int iOperation) { """ Checks if the user has the permission to access to the requested resource for the requested operation. @param iResource Requested resource @param iOperation Requested operation @return The role that has granted the permission if any, oth...
java
public ORole allow(final String iResource, final int iOperation) { if (roles == null || roles.isEmpty()) throw new OSecurityAccessException(document.getDatabase().getName(), "User '" + document.field("name") + "' has no role defined"); final ORole role = checkIfAllowed(iResource, iOperation); if ...
[ "public", "ORole", "allow", "(", "final", "String", "iResource", ",", "final", "int", "iOperation", ")", "{", "if", "(", "roles", "==", "null", "||", "roles", ".", "isEmpty", "(", ")", ")", "throw", "new", "OSecurityAccessException", "(", "document", ".", ...
Checks if the user has the permission to access to the requested resource for the requested operation. @param iResource Requested resource @param iOperation Requested operation @return The role that has granted the permission if any, otherwise a OSecurityAccessException exception is raised @exception OSecurityAccessEx...
[ "Checks", "if", "the", "user", "has", "the", "permission", "to", "access", "to", "the", "requested", "resource", "for", "the", "requested", "operation", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/metadata/security/OUser.java#L98-L111
UrielCh/ovh-java-sdk
ovh-java-sdk-cdnwebsite/src/main/java/net/minidev/ovh/api/ApiOvhCdnwebsite.java
ApiOvhCdnwebsite.serviceName_zone_backends_ipv4_GET
public OvhBackend serviceName_zone_backends_ipv4_GET(String serviceName, String ipv4) throws IOException { """ Get this object properties REST: GET /cdn/website/{serviceName}/zone/backends/{ipv4} @param serviceName [required] The internal name of your CDN Website offer @param ipv4 [required] """ String ...
java
public OvhBackend serviceName_zone_backends_ipv4_GET(String serviceName, String ipv4) throws IOException { String qPath = "/cdn/website/{serviceName}/zone/backends/{ipv4}"; StringBuilder sb = path(qPath, serviceName, ipv4); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhBackend...
[ "public", "OvhBackend", "serviceName_zone_backends_ipv4_GET", "(", "String", "serviceName", ",", "String", "ipv4", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cdn/website/{serviceName}/zone/backends/{ipv4}\"", ";", "StringBuilder", "sb", "=", "path", "(...
Get this object properties REST: GET /cdn/website/{serviceName}/zone/backends/{ipv4} @param serviceName [required] The internal name of your CDN Website offer @param ipv4 [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cdnwebsite/src/main/java/net/minidev/ovh/api/ApiOvhCdnwebsite.java#L192-L197
kohsuke/com4j
runtime/src/main/java/com4j/COM4J.java
COM4J.createInstance
public static<T extends Com4jObject> T createInstance( Class<T> primaryInterface, String clsid, int clsctx ) throws ComException { """ Creates a new COM object of the given CLSID and returns it in a wrapped interface. <p> Compared to {@link #createInstance(Class,String)}, this method allows the caller to...
java
public static<T extends Com4jObject> T createInstance( Class<T> primaryInterface, String clsid, int clsctx ) throws ComException { // create instance return new CreateInstanceTask<T>(clsid,clsctx,primaryInterface).execute(); }
[ "public", "static", "<", "T", "extends", "Com4jObject", ">", "T", "createInstance", "(", "Class", "<", "T", ">", "primaryInterface", ",", "String", "clsid", ",", "int", "clsctx", ")", "throws", "ComException", "{", "// create instance", "return", "new", "Creat...
Creates a new COM object of the given CLSID and returns it in a wrapped interface. <p> Compared to {@link #createInstance(Class,String)}, this method allows the caller to specify <tt>CLSCTX_XXX</tt> constants to control the server instantiation. @param primaryInterface type parameter of the primaryInterface type @par...
[ "Creates", "a", "new", "COM", "object", "of", "the", "given", "CLSID", "and", "returns", "it", "in", "a", "wrapped", "interface", "." ]
train
https://github.com/kohsuke/com4j/blob/1e690b805fb0e4e9ef61560e20a56335aecb0b24/runtime/src/main/java/com4j/COM4J.java#L95-L100
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java
Utils.expandJTree
public static void expandJTree(javax.swing.JTree tree, int depth) { """ Expands all nodes in a JTree. @param tree The JTree to expand. @param depth The depth to which the tree should be expanded. Zero will just expand the root node, a negative value will fully expand the tree, and a positive value will rec...
java
public static void expandJTree(javax.swing.JTree tree, int depth) { javax.swing.tree.TreeModel model = tree.getModel(); expandJTreeNode(tree, model, model.getRoot(), 0, depth); }
[ "public", "static", "void", "expandJTree", "(", "javax", ".", "swing", ".", "JTree", "tree", ",", "int", "depth", ")", "{", "javax", ".", "swing", ".", "tree", ".", "TreeModel", "model", "=", "tree", ".", "getModel", "(", ")", ";", "expandJTreeNode", "...
Expands all nodes in a JTree. @param tree The JTree to expand. @param depth The depth to which the tree should be expanded. Zero will just expand the root node, a negative value will fully expand the tree, and a positive value will recursively expand the tree to that depth.
[ "Expands", "all", "nodes", "in", "a", "JTree", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java#L111-L114
HtmlUnit/htmlunit-cssparser
src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java
AbstractCSSParser.handleStartPage
protected void handleStartPage(final String name, final String pseudoPage, final Locator locator) { """ start page handler. @param name the name @param pseudoPage the pseudo page @param locator the locator """ getDocumentHandler().startPage(name, pseudoPage, locator); }
java
protected void handleStartPage(final String name, final String pseudoPage, final Locator locator) { getDocumentHandler().startPage(name, pseudoPage, locator); }
[ "protected", "void", "handleStartPage", "(", "final", "String", "name", ",", "final", "String", "pseudoPage", ",", "final", "Locator", "locator", ")", "{", "getDocumentHandler", "(", ")", ".", "startPage", "(", "name", ",", "pseudoPage", ",", "locator", ")", ...
start page handler. @param name the name @param pseudoPage the pseudo page @param locator the locator
[ "start", "page", "handler", "." ]
train
https://github.com/HtmlUnit/htmlunit-cssparser/blob/384e4170737169b5b4c87c5766495d9b8a6d3866/src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java#L597-L599
lucee/Lucee
core/src/main/java/lucee/runtime/PageSourcePool.java
PageSourcePool.setPage
public void setPage(String key, PageSource ps) { """ sts a page object to the page pool @param key key reference to store page object @param ps pagesource to store """ ps.setLastAccessTime(); pageSources.put(key.toLowerCase(), ps); }
java
public void setPage(String key, PageSource ps) { ps.setLastAccessTime(); pageSources.put(key.toLowerCase(), ps); }
[ "public", "void", "setPage", "(", "String", "key", ",", "PageSource", "ps", ")", "{", "ps", ".", "setLastAccessTime", "(", ")", ";", "pageSources", ".", "put", "(", "key", ".", "toLowerCase", "(", ")", ",", "ps", ")", ";", "}" ]
sts a page object to the page pool @param key key reference to store page object @param ps pagesource to store
[ "sts", "a", "page", "object", "to", "the", "page", "pool" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L80-L84
dnsjava/dnsjava
org/xbill/DNS/Message.java
Message.findRRset
public boolean findRRset(Name name, int type) { """ Determines if an RRset with the given name and type is already present in any section. @see RRset @see Section """ return (findRRset(name, type, Section.ANSWER) || findRRset(name, type, Section.AUTHORITY) || findRRset(name, type, Section.ADDITIONAL));...
java
public boolean findRRset(Name name, int type) { return (findRRset(name, type, Section.ANSWER) || findRRset(name, type, Section.AUTHORITY) || findRRset(name, type, Section.ADDITIONAL)); }
[ "public", "boolean", "findRRset", "(", "Name", "name", ",", "int", "type", ")", "{", "return", "(", "findRRset", "(", "name", ",", "type", ",", "Section", ".", "ANSWER", ")", "||", "findRRset", "(", "name", ",", "type", ",", "Section", ".", "AUTHORITY"...
Determines if an RRset with the given name and type is already present in any section. @see RRset @see Section
[ "Determines", "if", "an", "RRset", "with", "the", "given", "name", "and", "type", "is", "already", "present", "in", "any", "section", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Message.java#L252-L257
baidubce/bce-sdk-java
src/main/java/com/baidubce/http/BceHttpClient.java
BceHttpClient.createHttpClientConnectionManager
private HttpClientConnectionManager createHttpClientConnectionManager() { """ Create connection manager for http client. @return The connection manager for http client. """ ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory.getSocketFactory(); LayeredConnectionSocketFactory...
java
private HttpClientConnectionManager createHttpClientConnectionManager() { ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory.getSocketFactory(); LayeredConnectionSocketFactory sslSocketFactory; try { sslSocketFactory = new SSLConnectionSocketFactory(SSLContext.getDe...
[ "private", "HttpClientConnectionManager", "createHttpClientConnectionManager", "(", ")", "{", "ConnectionSocketFactory", "socketFactory", "=", "PlainConnectionSocketFactory", ".", "getSocketFactory", "(", ")", ";", "LayeredConnectionSocketFactory", "sslSocketFactory", ";", "try",...
Create connection manager for http client. @return The connection manager for http client.
[ "Create", "connection", "manager", "for", "http", "client", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/http/BceHttpClient.java#L342-L361
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/util/MarkerImageFactory.java
MarkerImageFactory.createMarkerImage
public static String createMarkerImage(String uri, String type) { """ Takes a URI for an image contained within an application jar file and converts it into a data URI for use in a MarkerOptions object. <p> Usage: <p> markerOptions.icon(MarkerImageFactory.createMarkerImage("/path/to/my/image.jpg", "jpg")); <...
java
public static String createMarkerImage(String uri, String type) { Logger.getLogger(MarkerImageFactory.class.getName()).log(Level.FINEST, "createMarkerImage using: {0}", uri); String dataURI = null; if (uri.startsWith("file:")) { return createMarkerImageFromFile(uri,...
[ "public", "static", "String", "createMarkerImage", "(", "String", "uri", ",", "String", "type", ")", "{", "Logger", ".", "getLogger", "(", "MarkerImageFactory", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "FINEST", ",", "\...
Takes a URI for an image contained within an application jar file and converts it into a data URI for use in a MarkerOptions object. <p> Usage: <p> markerOptions.icon(MarkerImageFactory.createMarkerImage("/path/to/my/image.jpg", "jpg")); <p> Currently tested to work with "jpg" and "png" files. @param uri @param type @...
[ "Takes", "a", "URI", "for", "an", "image", "contained", "within", "an", "application", "jar", "file", "and", "converts", "it", "into", "a", "data", "URI", "for", "use", "in", "a", "MarkerOptions", "object", ".", "<p", ">", "Usage", ":", "<p", ">", "mar...
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/util/MarkerImageFactory.java#L49-L77
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_renewSSL_POST
public OvhTask organizationName_service_exchangeService_renewSSL_POST(String organizationName, String exchangeService, String dcv) throws IOException { """ Renew SSL if it will expire in next 30 days REST: POST /email/exchange/{organizationName}/service/{exchangeService}/renewSSL @param dcv [required] DCV emai...
java
public OvhTask organizationName_service_exchangeService_renewSSL_POST(String organizationName, String exchangeService, String dcv) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/renewSSL"; StringBuilder sb = path(qPath, organizationName, exchangeService); HashMap...
[ "public", "OvhTask", "organizationName_service_exchangeService_renewSSL_POST", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "dcv", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/service/{ex...
Renew SSL if it will expire in next 30 days REST: POST /email/exchange/{organizationName}/service/{exchangeService}/renewSSL @param dcv [required] DCV email require for order ssl varification process @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] Th...
[ "Renew", "SSL", "if", "it", "will", "expire", "in", "next", "30", "days" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1010-L1017
librato/librato-java
src/main/java/com/librato/metrics/client/Versions.java
Versions.getVersion
public static String getVersion(String path, Class<?> klass) { """ Attempts to get a version property from a specified resource @param path the path of the properties file resource @param klass the Class whose classloader will be used to load the resource @return the found version, "unknown" if it could not ...
java
public static String getVersion(String path, Class<?> klass) { try { final InputStream in = klass.getClassLoader().getResourceAsStream(path); if (in != null) { try { final BufferedReader reader = new BufferedReader(new InputStreamReader(in)); ...
[ "public", "static", "String", "getVersion", "(", "String", "path", ",", "Class", "<", "?", ">", "klass", ")", "{", "try", "{", "final", "InputStream", "in", "=", "klass", ".", "getClassLoader", "(", ")", ".", "getResourceAsStream", "(", "path", ")", ";",...
Attempts to get a version property from a specified resource @param path the path of the properties file resource @param klass the Class whose classloader will be used to load the resource @return the found version, "unknown" if it could not be found / determined
[ "Attempts", "to", "get", "a", "version", "property", "from", "a", "specified", "resource" ]
train
https://github.com/librato/librato-java/blob/bff7e776d4af5e978181db47f65e171ab67c1c77/src/main/java/com/librato/metrics/client/Versions.java#L29-L50
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java
MultiUserChatLight.getConfiguration
public MUCLightRoomConfiguration getConfiguration(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Get the MUC Light configuration. @param version @return the room configuration @throws NoResponseException @throws XMPPErrorException...
java
public MUCLightRoomConfiguration getConfiguration(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCLightGetConfigsIQ mucLightGetConfigsIQ = new MUCLightGetConfigsIQ(room, version); IQ responseIq = connection.createStanzaCollecto...
[ "public", "MUCLightRoomConfiguration", "getConfiguration", "(", "String", "version", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "MUCLightGetConfigsIQ", "mucLightGetConfigsIQ", "=", "new", "M...
Get the MUC Light configuration. @param version @return the room configuration @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedException
[ "Get", "the", "MUC", "Light", "configuration", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java#L356-L362
Bedework/bw-util
bw-util-servlet/src/main/java/org/bedework/util/servlet/ReqUtil.java
ReqUtil.getReqPar
public String getReqPar(final String name, final String def) { """ Get a request parameter stripped of white space. Return default for null or zero length. @param name name of parameter @param def default value @return String value """ final String s = Util.checkNull(request.getParameter(name))...
java
public String getReqPar(final String name, final String def) { final String s = Util.checkNull(request.getParameter(name)); if (s != null) { return s; } return def; }
[ "public", "String", "getReqPar", "(", "final", "String", "name", ",", "final", "String", "def", ")", "{", "final", "String", "s", "=", "Util", ".", "checkNull", "(", "request", ".", "getParameter", "(", "name", ")", ")", ";", "if", "(", "s", "!=", "n...
Get a request parameter stripped of white space. Return default for null or zero length. @param name name of parameter @param def default value @return String value
[ "Get", "a", "request", "parameter", "stripped", "of", "white", "space", ".", "Return", "default", "for", "null", "or", "zero", "length", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-servlet/src/main/java/org/bedework/util/servlet/ReqUtil.java#L98-L106
EdwardRaff/JSAT
JSAT/src/jsat/math/optimization/LBFGS.java
LBFGS.twoLoopHp
public static void twoLoopHp(Vec x_grad, List<Double> rho, List<Vec> s, List<Vec> y, Vec q, double[] alphas) { """ See Algorithm 7.4 (L-BFGS two-loop recursion). @param x_grad the initial value &nabla; f<sub>k</sub> @param rho @param s @param y @param q the location to store the value of H<sub>k</sub> &nabla;...
java
public static void twoLoopHp(Vec x_grad, List<Double> rho, List<Vec> s, List<Vec> y, Vec q, double[] alphas) { //q ← ∇ fk; x_grad.copyTo(q); if(s.isEmpty()) return;//identity, we are done //for i = k−1,k−2,...,k−m for(int i = 0; i < s.size(); i++) { ...
[ "public", "static", "void", "twoLoopHp", "(", "Vec", "x_grad", ",", "List", "<", "Double", ">", "rho", ",", "List", "<", "Vec", ">", "s", ",", "List", "<", "Vec", ">", "y", ",", "Vec", "q", ",", "double", "[", "]", "alphas", ")", "{", "//q ← ∇ fk...
See Algorithm 7.4 (L-BFGS two-loop recursion). @param x_grad the initial value &nabla; f<sub>k</sub> @param rho @param s @param y @param q the location to store the value of H<sub>k</sub> &nabla; f<sub>k</sub> @param alphas temp space to do work, should be as large as the number of history vectors
[ "See", "Algorithm", "7", ".", "4", "(", "L", "-", "BFGS", "two", "-", "loop", "recursion", ")", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/optimization/LBFGS.java#L67-L92
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/BeanUtil.java
BeanUtil.getPropertyType
public static Class getPropertyType(Class<?> beanClass, String property) { """ Returns the type of <code>property</code> in given <code>beanClass</code> @param beanClass bean class @param property name of the property @return null if the property is not found. otherwise returns the type of the <code>prope...
java
public static Class getPropertyType(Class<?> beanClass, String property){ Method getter = getGetterMethod(beanClass, property); if(getter==null) return null; else return getter.getReturnType(); }
[ "public", "static", "Class", "getPropertyType", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "property", ")", "{", "Method", "getter", "=", "getGetterMethod", "(", "beanClass", ",", "property", ")", ";", "if", "(", "getter", "==", "null", ")", ...
Returns the type of <code>property</code> in given <code>beanClass</code> @param beanClass bean class @param property name of the property @return null if the property is not found. otherwise returns the type of the <code>property</code>
[ "Returns", "the", "type", "of", "<code", ">", "property<", "/", "code", ">", "in", "given", "<code", ">", "beanClass<", "/", "code", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/BeanUtil.java#L186-L192
GCRC/nunaliit
nunaliit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/apachePDFBox/imageio/TIFFUtil.java
TIFFUtil.setCompressionType
public static void setCompressionType(ImageWriteParam param, BufferedImage image) { """ Sets the ImageIO parameter compression type based on the given image. @param image buffered image used to decide compression type @param param ImageIO write parameter to update """ // avoid error: first compressio...
java
public static void setCompressionType(ImageWriteParam param, BufferedImage image) { // avoid error: first compression type is RLE, not optimal and incorrect for color images // TODO expose this choice to the user? if (image.getType() == BufferedImage.TYPE_BYTE_BINARY && image.get...
[ "public", "static", "void", "setCompressionType", "(", "ImageWriteParam", "param", ",", "BufferedImage", "image", ")", "{", "// avoid error: first compression type is RLE, not optimal and incorrect for color images", "// TODO expose this choice to the user?", "if", "(", "image", "....
Sets the ImageIO parameter compression type based on the given image. @param image buffered image used to decide compression type @param param ImageIO write parameter to update
[ "Sets", "the", "ImageIO", "parameter", "compression", "type", "based", "on", "the", "given", "image", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/apachePDFBox/imageio/TIFFUtil.java#L48-L61
ModeShape/modeshape
modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java
JcrTools.uploadFile
public Node uploadFile( Session session, String path, File file ) throws RepositoryException, IOException { """ Upload the content in the supplied file into the repository at the defined path, using the given session. This method will create a 'nt:file' node...
java
public Node uploadFile( Session session, String path, File file ) throws RepositoryException, IOException { isNotNull(session, "session"); isNotNull(path, "path"); isNotNull(file, "file"); if (!file.exists()) { throw ne...
[ "public", "Node", "uploadFile", "(", "Session", "session", ",", "String", "path", ",", "File", "file", ")", "throws", "RepositoryException", ",", "IOException", "{", "isNotNull", "(", "session", ",", "\"session\"", ")", ";", "isNotNull", "(", "path", ",", "\...
Upload the content in the supplied file into the repository at the defined path, using the given session. This method will create a 'nt:file' node at the supplied path, and any non-existant ancestors with nodes of type 'nt:folder'. As defined by the JCR specification, the binary content (and other properties) will be p...
[ "Upload", "the", "content", "in", "the", "supplied", "file", "into", "the", "repository", "at", "the", "defined", "path", "using", "the", "given", "session", ".", "This", "method", "will", "create", "a", "nt", ":", "file", "node", "at", "the", "supplied", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java#L233-L253
alkacon/opencms-core
src/org/opencms/gwt/CmsGwtServiceContext.java
CmsGwtServiceContext.getSerializationPolicyPath
protected String getSerializationPolicyPath(String moduleBaseURL, String strongName) { """ Finds the path of the serialization policy file.<p> @param moduleBaseURL the GWT module's base url @param strongName the strong name of the service @return the serialization policy path """ // locate the ...
java
protected String getSerializationPolicyPath(String moduleBaseURL, String strongName) { // locate the serialization policy file in OpenCms String modulePath = null; try { modulePath = new URL(moduleBaseURL).getPath(); } catch (MalformedURLException ex) { // module...
[ "protected", "String", "getSerializationPolicyPath", "(", "String", "moduleBaseURL", ",", "String", "strongName", ")", "{", "// locate the serialization policy file in OpenCms", "String", "modulePath", "=", "null", ";", "try", "{", "modulePath", "=", "new", "URL", "(", ...
Finds the path of the serialization policy file.<p> @param moduleBaseURL the GWT module's base url @param strongName the strong name of the service @return the serialization policy path
[ "Finds", "the", "path", "of", "the", "serialization", "policy", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtServiceContext.java#L199-L215
cloudfoundry/uaa
samples/api/src/main/java/org/cloudfoundry/identity/api/web/ContentTypeFilter.java
ContentTypeFilter.doFilter
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { """ Add a content type header to any request whose path matches one of the supplied paths. """ HttpServletRequest httpServletRequest = (Htt...
java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) request; for (String path : mediaTypes.keySet()) { if (matches(http...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "httpServletRequest", "=", "(", "HttpSer...
Add a content type header to any request whose path matches one of the supplied paths.
[ "Add", "a", "content", "type", "header", "to", "any", "request", "whose", "path", "matches", "one", "of", "the", "supplied", "paths", "." ]
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/samples/api/src/main/java/org/cloudfoundry/identity/api/web/ContentTypeFilter.java#L59-L71
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java
BindingInstaller.installBinding
private void installBinding(DependencyGraph graph, Key<?> key, Binding binding) { """ Adds the given implicit binding in the graph to the injector hierarchy in the position specified by the {@link BindingPositioner}. Also ensures that the dependencies of the implicit binding are available at the chosen position....
java
private void installBinding(DependencyGraph graph, Key<?> key, Binding binding) { // Figure out where we're putting the implicit entry GinjectorBindings implicitEntryPosition = positions.getInstallPosition(key); // Ensure that the dependencies are available to the ginjector inheritBindingsForDeps(i...
[ "private", "void", "installBinding", "(", "DependencyGraph", "graph", ",", "Key", "<", "?", ">", "key", ",", "Binding", "binding", ")", "{", "// Figure out where we're putting the implicit entry", "GinjectorBindings", "implicitEntryPosition", "=", "positions", ".", "get...
Adds the given implicit binding in the graph to the injector hierarchy in the position specified by the {@link BindingPositioner}. Also ensures that the dependencies of the implicit binding are available at the chosen position.
[ "Adds", "the", "given", "implicit", "binding", "in", "the", "graph", "to", "the", "injector", "hierarchy", "in", "the", "position", "specified", "by", "the", "{" ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java#L91-L100
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.beginUpdateAsync
public Observable<DataLakeStoreAccountInner> beginUpdateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { """ Updates the specified Data Lake Store account information. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @p...
java
public Observable<DataLakeStoreAccountInner> beginUpdateAsync(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1<ServiceResponse<DataLakeStoreAccountInner>, DataLakeStoreAccountInner>() { ...
[ "public", "Observable", "<", "DataLakeStoreAccountInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "DataLakeStoreAccountInner", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ...
Updates the specified Data Lake Store account information. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param name The name of the Data Lake Store account to update. @param parameters Parameters supplied to update the Data Lake Store account. @throws Illegal...
[ "Updates", "the", "specified", "Data", "Lake", "Store", "account", "information", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java#L836-L843
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.tableClassHtmlContent
public static String tableClassHtmlContent(String clazz, String... content) { """ Build a HTML Table with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for table element @param content content str...
java
public static String tableClassHtmlContent(String clazz, String... content) { return tagClassHtmlContent(Html.Tag.TABLE, clazz, content); }
[ "public", "static", "String", "tableClassHtmlContent", "(", "String", "clazz", ",", "String", "...", "content", ")", "{", "return", "tagClassHtmlContent", "(", "Html", ".", "Tag", ".", "TABLE", ",", "clazz", ",", "content", ")", ";", "}" ]
Build a HTML Table with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for table element @param content content string @return HTML table element as string
[ "Build", "a", "HTML", "Table", "with", "given", "CSS", "class", "for", "a", "string", ".", "Use", "this", "method", "if", "given", "content", "contains", "HTML", "snippets", "prepared", "with", "{", "@link", "HtmlBuilder#htmlEncode", "(", "String", ")", "}",...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L42-L44
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java
SftpClient.chown
public void chown(String uid, String path) throws SftpStatusException, SshException { """ <p> Sets the user ID to owner for the file or directory. </p> @param uid numeric user id of the new owner @param path the path to the remote file/directory @throws SftpStatusException @throws SshException @thr...
java
public void chown(String uid, String path) throws SftpStatusException, SshException { String actual = resolveRemotePath(path); SftpFileAttributes attrs = sftp.getAttributes(actual); attrs.setUID(uid); sftp.setAttributes(actual, attrs); }
[ "public", "void", "chown", "(", "String", "uid", ",", "String", "path", ")", "throws", "SftpStatusException", ",", "SshException", "{", "String", "actual", "=", "resolveRemotePath", "(", "path", ")", ";", "SftpFileAttributes", "attrs", "=", "sftp", ".", "getAt...
<p> Sets the user ID to owner for the file or directory. </p> @param uid numeric user id of the new owner @param path the path to the remote file/directory @throws SftpStatusException @throws SshException @throws TransferCancelledException
[ "<p", ">", "Sets", "the", "user", "ID", "to", "owner", "for", "the", "file", "or", "directory", ".", "<", "/", "p", ">" ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java#L2001-L2009
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/di/MainModule.java
MainModule.providePlacesRendererAdapter
@Provides protected RendererAdapter<PlaceViewModel> providePlacesRendererAdapter( LayoutInflater layoutInflater, PlacesCollectionRendererBuilder placesCollectionRendererBuilder, PlaceCollectionViewModel placeCollectionViewModel) { """ Provisioning of a RendererAdapter implementation to work with ...
java
@Provides protected RendererAdapter<PlaceViewModel> providePlacesRendererAdapter( LayoutInflater layoutInflater, PlacesCollectionRendererBuilder placesCollectionRendererBuilder, PlaceCollectionViewModel placeCollectionViewModel) { return new RendererAdapter<PlaceViewModel>(layoutInflater, placesCo...
[ "@", "Provides", "protected", "RendererAdapter", "<", "PlaceViewModel", ">", "providePlacesRendererAdapter", "(", "LayoutInflater", "layoutInflater", ",", "PlacesCollectionRendererBuilder", "placesCollectionRendererBuilder", ",", "PlaceCollectionViewModel", "placeCollectionViewModel"...
Provisioning of a RendererAdapter implementation to work with places ListView. More information in this library: {@link https://github.com/pedrovgs/Renderers}
[ "Provisioning", "of", "a", "RendererAdapter", "implementation", "to", "work", "with", "places", "ListView", ".", "More", "information", "in", "this", "library", ":", "{" ]
train
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/di/MainModule.java#L83-L89
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVG.java
SVG.renderToPicture
@SuppressWarnings( { """ Renders this SVG document to a {@link Picture}. @param widthInPixels the width of the {@code Picture} @param heightInPixels the height of the {@code Picture} @param renderOptions options that describe how to render this SVG on the Canvas. @return a Picture object suitable for later r...
java
@SuppressWarnings({"WeakerAccess", "unused"}) public Picture renderToPicture(int widthInPixels, int heightInPixels, RenderOptions renderOptions) { Picture picture = new Picture(); Canvas canvas = picture.beginRecording(widthInPixels, heightInPixels); if (renderOptions == null || rende...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "public", "Picture", "renderToPicture", "(", "int", "widthInPixels", ",", "int", "heightInPixels", ",", "RenderOptions", "renderOptions", ")", "{", "Picture", "picture", "=", "new"...
Renders this SVG document to a {@link Picture}. @param widthInPixels the width of the {@code Picture} @param heightInPixels the height of the {@code Picture} @param renderOptions options that describe how to render this SVG on the Canvas. @return a Picture object suitable for later rendering using {@link Canvas#drawPi...
[ "Renders", "this", "SVG", "document", "to", "a", "{", "@link", "Picture", "}", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVG.java#L427-L444
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/VirtualWANsInner.java
VirtualWANsInner.beginUpdateTagsAsync
public Observable<VirtualWANInner> beginUpdateTagsAsync(String resourceGroupName, String virtualWANName, Map<String, String> tags) { """ Updates a VirtualWAN tags. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWANName The name of the VirtualWAN being updated. @param tags Re...
java
public Observable<VirtualWANInner> beginUpdateTagsAsync(String resourceGroupName, String virtualWANName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName, tags).map(new Func1<ServiceResponse<VirtualWANInner>, VirtualWANInner>() { @Override ...
[ "public", "Observable", "<", "VirtualWANInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualWANName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(",...
Updates a VirtualWAN tags. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWANName The name of the VirtualWAN being updated. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualWANInner object
[ "Updates", "a", "VirtualWAN", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/VirtualWANsInner.java#L629-L636
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java
ComponentQuotaStatusInner.getAsync
public Observable<ApplicationInsightsComponentQuotaStatusInner> getAsync(String resourceGroupName, String resourceName) { """ Returns daily data volume cap (quota) status for an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Applicat...
java
public Observable<ApplicationInsightsComponentQuotaStatusInner> getAsync(String resourceGroupName, String resourceName) { return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<ApplicationInsightsComponentQuotaStatusInner>, ApplicationInsightsComponentQuotaStatusInner>...
[ "public", "Observable", "<", "ApplicationInsightsComponentQuotaStatusInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "ma...
Returns daily data volume cap (quota) status for an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to t...
[ "Returns", "daily", "data", "volume", "cap", "(", "quota", ")", "status", "for", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java#L95-L102
samskivert/samskivert
src/main/java/com/samskivert/swing/util/SwingUtil.java
SwingUtil.applyToHierarchy
public static void applyToHierarchy (Component comp, int depth, ComponentOp op) { """ Apply the specified ComponentOp to the supplied component and then all its descendants, up to the specified maximum depth. """ if (comp == null) { return; } op.apply(comp); if (co...
java
public static void applyToHierarchy (Component comp, int depth, ComponentOp op) { if (comp == null) { return; } op.apply(comp); if (comp instanceof Container && --depth >= 0) { Container c = (Container) comp; int ccount = c.getComponentCount(); ...
[ "public", "static", "void", "applyToHierarchy", "(", "Component", "comp", ",", "int", "depth", ",", "ComponentOp", "op", ")", "{", "if", "(", "comp", "==", "null", ")", "{", "return", ";", "}", "op", ".", "apply", "(", "comp", ")", ";", "if", "(", ...
Apply the specified ComponentOp to the supplied component and then all its descendants, up to the specified maximum depth.
[ "Apply", "the", "specified", "ComponentOp", "to", "the", "supplied", "component", "and", "then", "all", "its", "descendants", "up", "to", "the", "specified", "maximum", "depth", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/SwingUtil.java#L285-L299
protostuff/protostuff
protostuff-runtime/src/main/java/io/protostuff/runtime/RuntimeSchema.java
RuntimeSchema.createFrom
public static <T> RuntimeSchema<T> createFrom(Class<T> typeClass, String[] exclusions, IdStrategy strategy) { """ Generates a schema from the given class with the exclusion of certain fields. """ HashSet<String> set = new HashSet<String>(); for (String exclusion : exclusions) ...
java
public static <T> RuntimeSchema<T> createFrom(Class<T> typeClass, String[] exclusions, IdStrategy strategy) { HashSet<String> set = new HashSet<String>(); for (String exclusion : exclusions) set.add(exclusion); return createFrom(typeClass, set, strategy); ...
[ "public", "static", "<", "T", ">", "RuntimeSchema", "<", "T", ">", "createFrom", "(", "Class", "<", "T", ">", "typeClass", ",", "String", "[", "]", "exclusions", ",", "IdStrategy", "strategy", ")", "{", "HashSet", "<", "String", ">", "set", "=", "new",...
Generates a schema from the given class with the exclusion of certain fields.
[ "Generates", "a", "schema", "from", "the", "given", "class", "with", "the", "exclusion", "of", "certain", "fields", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-runtime/src/main/java/io/protostuff/runtime/RuntimeSchema.java#L193-L201
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java
MutableBigInteger.addDisjoint
void addDisjoint(MutableBigInteger addend, int n) { """ Like {@link #addShifted(MutableBigInteger, int)} but {@code this.intLen} must not be greater than {@code n}. In other words, concatenates {@code this} and {@code addend}. """ if (addend.isZero()) return; int x = intLen; ...
java
void addDisjoint(MutableBigInteger addend, int n) { if (addend.isZero()) return; int x = intLen; int y = addend.intLen + n; int resultLen = (intLen > y ? intLen : y); int[] result; if (value.length < resultLen) result = new int[resultLen]; ...
[ "void", "addDisjoint", "(", "MutableBigInteger", "addend", ",", "int", "n", ")", "{", "if", "(", "addend", ".", "isZero", "(", ")", ")", "return", ";", "int", "x", "=", "intLen", ";", "int", "y", "=", "addend", ".", "intLen", "+", "n", ";", "int", ...
Like {@link #addShifted(MutableBigInteger, int)} but {@code this.intLen} must not be greater than {@code n}. In other words, concatenates {@code this} and {@code addend}.
[ "Like", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L862-L894
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerConnectionPoliciesInner.java
ServerConnectionPoliciesInner.createOrUpdate
public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, ServerConnectionType connectionType) { """ Creates or updates the server's connection policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azur...
java
public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, ServerConnectionType connectionType) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, connectionType).toBlocking().single().body(); }
[ "public", "ServerConnectionPolicyInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ServerConnectionType", "connectionType", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ...
Creates or updates the server's connection policy. @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 connectionType The server connection type. Possible values...
[ "Creates", "or", "updates", "the", "server", "s", "connection", "policy", "." ]
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/ServerConnectionPoliciesInner.java#L78-L80
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java
TreeUtil.findWComponents
public static ComponentWithContext[] findWComponents(final WComponent component, final String[] path) { """ Retrieves WComponents by their path in the WComponent tree. See {@link #findWComponents(WComponent, String[])} for a description of paths. <p> Searches only visible components. </p> @param component t...
java
public static ComponentWithContext[] findWComponents(final WComponent component, final String[] path) { return findWComponents(component, path, true); }
[ "public", "static", "ComponentWithContext", "[", "]", "findWComponents", "(", "final", "WComponent", "component", ",", "final", "String", "[", "]", "path", ")", "{", "return", "findWComponents", "(", "component", ",", "path", ",", "true", ")", ";", "}" ]
Retrieves WComponents by their path in the WComponent tree. See {@link #findWComponents(WComponent, String[])} for a description of paths. <p> Searches only visible components. </p> @param component the component to search from. @param path the path to the WComponent. @return the component matching the given path, or ...
[ "Retrieves", "WComponents", "by", "their", "path", "in", "the", "WComponent", "tree", ".", "See", "{", "@link", "#findWComponents", "(", "WComponent", "String", "[]", ")", "}", "for", "a", "description", "of", "paths", ".", "<p", ">", "Searches", "only", "...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java#L395-L397
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.untarFrom
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException { """ Reads the given InputStream as a tar file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @param compression The compression ...
java
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException { try { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UntarFrom(compression, in)); } finally { _in.close(); } }
[ "public", "void", "untarFrom", "(", "InputStream", "_in", ",", "final", "TarCompression", "compression", ")", "throws", "IOException", ",", "InterruptedException", "{", "try", "{", "final", "InputStream", "in", "=", "new", "RemoteInputStream", "(", "_in", ",", "...
Reads the given InputStream as a tar file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @param compression The compression method in use. @since 1.292
[ "Reads", "the", "given", "InputStream", "as", "a", "tar", "file", "and", "extracts", "it", "into", "this", "directory", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L794-L801
pavlospt/RxFile
rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java
RxFile.createFileFromUri
public static Observable<List<File>> createFileFromUri(final Context context, final ArrayList<Uri> uris) { """ /* Create a copy of the files found under the provided ArrayList of Uris, in the Library's cache folder. The mime type of the resource will be determined by URLConnection.guessContentTypeFromNam...
java
public static Observable<List<File>> createFileFromUri(final Context context, final ArrayList<Uri> uris) { return createFileFromUri(context, uris, MimeMap.UrlConnection); }
[ "public", "static", "Observable", "<", "List", "<", "File", ">", ">", "createFileFromUri", "(", "final", "Context", "context", ",", "final", "ArrayList", "<", "Uri", ">", "uris", ")", "{", "return", "createFileFromUri", "(", "context", ",", "uris", ",", "M...
/* Create a copy of the files found under the provided ArrayList of Uris, in the Library's cache folder. The mime type of the resource will be determined by URLConnection.guessContentTypeFromName() method.
[ "/", "*", "Create", "a", "copy", "of", "the", "files", "found", "under", "the", "provided", "ArrayList", "of", "Uris", "in", "the", "Library", "s", "cache", "folder", "." ]
train
https://github.com/pavlospt/RxFile/blob/54210b02631f4b27d31bea040eca86183136cf46/rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java#L96-L99
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java
TypesafeConfigUtils.getDouble
public static Double getDouble(Config config, String path) { """ Get a configuration as Double. Return {@code null} if missing or wrong type. @param config @param path @return """ try { Object obj = config.getAnyRef(path); return obj instanceof Number ? ((Number) obj).doubl...
java
public static Double getDouble(Config config, String path) { try { Object obj = config.getAnyRef(path); return obj instanceof Number ? ((Number) obj).doubleValue() : null; } catch (ConfigException.Missing | ConfigException.WrongType e) { if (e instanceof ConfigExcepti...
[ "public", "static", "Double", "getDouble", "(", "Config", "config", ",", "String", "path", ")", "{", "try", "{", "Object", "obj", "=", "config", ".", "getAnyRef", "(", "path", ")", ";", "return", "obj", "instanceof", "Number", "?", "(", "(", "Number", ...
Get a configuration as Double. Return {@code null} if missing or wrong type. @param config @param path @return
[ "Get", "a", "configuration", "as", "Double", ".", "Return", "{", "@code", "null", "}", "if", "missing", "or", "wrong", "type", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java#L423-L433
zaproxy/zaproxy
src/org/parosproxy/paros/model/SiteMap.java
SiteMap.publishEvent
private static void publishEvent(String event, SiteNode node) { """ Publish the event being carried out. @param event the event that is happening @param node the node being acted upon @since 2.5.0 """ ZAP.getEventBus().publishSyncEvent(SiteMapEventPublisher.getPublisher(), new Event(SiteMapEventPublish...
java
private static void publishEvent(String event, SiteNode node) { ZAP.getEventBus().publishSyncEvent(SiteMapEventPublisher.getPublisher(), new Event(SiteMapEventPublisher.getPublisher(), event, new Target(node))); }
[ "private", "static", "void", "publishEvent", "(", "String", "event", ",", "SiteNode", "node", ")", "{", "ZAP", ".", "getEventBus", "(", ")", ".", "publishSyncEvent", "(", "SiteMapEventPublisher", ".", "getPublisher", "(", ")", ",", "new", "Event", "(", "Site...
Publish the event being carried out. @param event the event that is happening @param node the node being acted upon @since 2.5.0
[ "Publish", "the", "event", "being", "carried", "out", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/SiteMap.java#L835-L837
lightblueseas/jcommons-lang
src/main/java/de/alpharogroup/lang/AnnotationExtensions.java
AnnotationExtensions.getAllClasses
public static Set<Class<?>> getAllClasses(final String packagePath) throws ClassNotFoundException, IOException, URISyntaxException { """ Gets all the classes from the class loader that belongs to the given package path. @param packagePath the package path @return the all classes @throws ClassNotFoundEx...
java
public static Set<Class<?>> getAllClasses(final String packagePath) throws ClassNotFoundException, IOException, URISyntaxException { return getAllAnnotatedClasses(packagePath, null); }
[ "public", "static", "Set", "<", "Class", "<", "?", ">", ">", "getAllClasses", "(", "final", "String", "packagePath", ")", "throws", "ClassNotFoundException", ",", "IOException", ",", "URISyntaxException", "{", "return", "getAllAnnotatedClasses", "(", "packagePath", ...
Gets all the classes from the class loader that belongs to the given package path. @param packagePath the package path @return the all classes @throws ClassNotFoundException occurs if a given class cannot be located by the specified class loader @throws IOException Signals that an I/O exception has occurred. @throw...
[ "Gets", "all", "the", "classes", "from", "the", "class", "loader", "that", "belongs", "to", "the", "given", "package", "path", "." ]
train
https://github.com/lightblueseas/jcommons-lang/blob/000e1f198e949ec3e721fd0fc3f5946e945232a3/src/main/java/de/alpharogroup/lang/AnnotationExtensions.java#L134-L138
requery/requery
requery/src/main/java/io/requery/sql/SchemaModifier.java
SchemaModifier.addColumn
public <T> void addColumn(Connection connection, Attribute<T, ?> attribute) { """ Alters the attribute's table and add's the column representing the given {@link Attribute}. @param connection to use @param attribute being added @param <T> parent type of the attribute """ addColumn(connecti...
java
public <T> void addColumn(Connection connection, Attribute<T, ?> attribute) { addColumn(connection, attribute, true); }
[ "public", "<", "T", ">", "void", "addColumn", "(", "Connection", "connection", ",", "Attribute", "<", "T", ",", "?", ">", "attribute", ")", "{", "addColumn", "(", "connection", ",", "attribute", ",", "true", ")", ";", "}" ]
Alters the attribute's table and add's the column representing the given {@link Attribute}. @param connection to use @param attribute being added @param <T> parent type of the attribute
[ "Alters", "the", "attribute", "s", "table", "and", "add", "s", "the", "column", "representing", "the", "given", "{", "@link", "Attribute", "}", "." ]
train
https://github.com/requery/requery/blob/3070590c2ef76bb7062570bf9df03cd482db024a/requery/src/main/java/io/requery/sql/SchemaModifier.java#L267-L269
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/BaseProfile.java
BaseProfile.generateAntXml
void generateAntXml(Definition def, String outputDir) { """ generate ant build.xml @param def Definition @param outputDir output directory """ try { FileWriter antfw = Utils.createFile("build.xml", outputDir); BuildXmlGen bxGen = new BuildXmlGen(); bxGen.generat...
java
void generateAntXml(Definition def, String outputDir) { try { FileWriter antfw = Utils.createFile("build.xml", outputDir); BuildXmlGen bxGen = new BuildXmlGen(); bxGen.generate(def, antfw); antfw.close(); } catch (IOException ioe) { ioe.print...
[ "void", "generateAntXml", "(", "Definition", "def", ",", "String", "outputDir", ")", "{", "try", "{", "FileWriter", "antfw", "=", "Utils", ".", "createFile", "(", "\"build.xml\"", ",", "outputDir", ")", ";", "BuildXmlGen", "bxGen", "=", "new", "BuildXmlGen", ...
generate ant build.xml @param def Definition @param outputDir output directory
[ "generate", "ant", "build", ".", "xml" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/BaseProfile.java#L337-L350
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyParentRangeChanged
@UiThread public void notifyParentRangeChanged(int parentPositionStart, int itemCount) { """ Notify any registered observers that the {@code itemCount} parents starting at {@code parentPositionStart} have changed. This will also trigger an item changed for children of the parent list specified. <p> This is...
java
@UiThread public void notifyParentRangeChanged(int parentPositionStart, int itemCount) { int flatParentPositionStart = getFlatParentPosition(parentPositionStart); int flatParentPosition = flatParentPositionStart; int sizeChanged = 0; int changed; P parent; for (int j...
[ "@", "UiThread", "public", "void", "notifyParentRangeChanged", "(", "int", "parentPositionStart", ",", "int", "itemCount", ")", "{", "int", "flatParentPositionStart", "=", "getFlatParentPosition", "(", "parentPositionStart", ")", ";", "int", "flatParentPosition", "=", ...
Notify any registered observers that the {@code itemCount} parents starting at {@code parentPositionStart} have changed. This will also trigger an item changed for children of the parent list specified. <p> This is an item change event, not a structural change event. It indicates that any reflection of the data in the ...
[ "Notify", "any", "registered", "observers", "that", "the", "{", "@code", "itemCount", "}", "parents", "starting", "at", "{", "@code", "parentPositionStart", "}", "have", "changed", ".", "This", "will", "also", "trigger", "an", "item", "changed", "for", "childr...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1011-L1027
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmetrictable_binding.java
lbmetrictable_binding.get
public static lbmetrictable_binding get(nitro_service service, String metrictable) throws Exception { """ Use this API to fetch lbmetrictable_binding resource of given name . """ lbmetrictable_binding obj = new lbmetrictable_binding(); obj.set_metrictable(metrictable); lbmetrictable_binding response = (l...
java
public static lbmetrictable_binding get(nitro_service service, String metrictable) throws Exception{ lbmetrictable_binding obj = new lbmetrictable_binding(); obj.set_metrictable(metrictable); lbmetrictable_binding response = (lbmetrictable_binding) obj.get_resource(service); return response; }
[ "public", "static", "lbmetrictable_binding", "get", "(", "nitro_service", "service", ",", "String", "metrictable", ")", "throws", "Exception", "{", "lbmetrictable_binding", "obj", "=", "new", "lbmetrictable_binding", "(", ")", ";", "obj", ".", "set_metrictable", "("...
Use this API to fetch lbmetrictable_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbmetrictable_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmetrictable_binding.java#L103-L108
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.logf
public void logf(Level level, String format, Object... params) { """ Issue a formatted log message at the given log level. @param level the level @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor @param params the parameters """ doLogf(...
java
public void logf(Level level, String format, Object... params) { doLogf(level, FQCN, format, params, null); }
[ "public", "void", "logf", "(", "Level", "level", ",", "String", "format", ",", "Object", "...", "params", ")", "{", "doLogf", "(", "level", ",", "FQCN", ",", "format", ",", "params", ",", "null", ")", ";", "}" ]
Issue a formatted log message at the given log level. @param level the level @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor @param params the parameters
[ "Issue", "a", "formatted", "log", "message", "at", "the", "given", "log", "level", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L2284-L2286
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryChainLogPathHelper.java
RepositoryChainLogPathHelper.getRelativePath
public static String getRelativePath(String path, String backupDirCanonicalPath) throws MalformedURLException { """ Will be returned relative path {name}/{name}.xml for all OS. @param path String, path to @param backupDirCanonicalPath String, path to backup dir @return String Will be returned relative path...
java
public static String getRelativePath(String path, String backupDirCanonicalPath) throws MalformedURLException { URL urlPath = new URL(resolveFileURL("file:" + path)); URL urlBackupDir = new URL(resolveFileURL("file:" + backupDirCanonicalPath)); return urlPath.toString().replace(urlBackupDir.toStri...
[ "public", "static", "String", "getRelativePath", "(", "String", "path", ",", "String", "backupDirCanonicalPath", ")", "throws", "MalformedURLException", "{", "URL", "urlPath", "=", "new", "URL", "(", "resolveFileURL", "(", "\"file:\"", "+", "path", ")", ")", ";"...
Will be returned relative path {name}/{name}.xml for all OS. @param path String, path to @param backupDirCanonicalPath String, path to backup dir @return String Will be returned relative path {name}/{name}.xml for all OS @throws MalformedURLException
[ "Will", "be", "returned", "relative", "path", "{", "name", "}", "/", "{", "name", "}", ".", "xml", "for", "all", "OS", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryChainLogPathHelper.java#L49-L55
Netflix/karyon
karyon2-governator/src/main/java/netflix/karyon/Karyon.java
Karyon.forUdpConnectionHandler
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler, BootstrapModule... bootstrapModules) { """ Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection handli...
java
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler, BootstrapModule... bootstrapModules) { UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build(); return new RxNe...
[ "public", "static", "KaryonServer", "forUdpConnectionHandler", "(", "int", "port", ",", "ConnectionHandler", "<", "ByteBuf", ",", "ByteBuf", ">", "handler", ",", "BootstrapModule", "...", "bootstrapModules", ")", "{", "UdpServer", "<", "ByteBuf", ",", "ByteBuf", "...
Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection handling to {@link ConnectionHandler}. The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)} @param port Port for the server. @param handler Connection Handler @param boot...
[ "Creates", "a", "new", "{", "@link", "KaryonServer", "}", "that", "has", "a", "single", "UDP", "server", "instance", "which", "delegates", "all", "connection", "handling", "to", "{", "@link", "ConnectionHandler", "}", ".", "The", "{", "@link", "RxServer", "}...
train
https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-governator/src/main/java/netflix/karyon/Karyon.java#L136-L140
gosu-lang/gosu-lang
gosu-core/src/main/java/gw/internal/gosu/ir/transform/expression/AbstractMemberExpansionTransformer.java
AbstractMemberExpansionTransformer.compileExpansionUsingArrayList
protected IRExpression compileExpansionUsingArrayList( IType rootType, IType rootComponentType, IType resultType, IType resultCompType, IType propertyType ) { """ This method will compile the expansion using an ArrayList to collect temporary results. This is appropriate if the right-hand-side is a Collection or ...
java
protected IRExpression compileExpansionUsingArrayList( IType rootType, IType rootComponentType, IType resultType, IType resultCompType, IType propertyType ) { // Evaluate the root and assign it to a temp variable IRSymbol tempRoot = _cc().makeAndIndexTempSymbol( getDescriptor( rootType ) ); IRStatement temp...
[ "protected", "IRExpression", "compileExpansionUsingArrayList", "(", "IType", "rootType", ",", "IType", "rootComponentType", ",", "IType", "resultType", ",", "IType", "resultCompType", ",", "IType", "propertyType", ")", "{", "// Evaluate the root and assign it to a temp variab...
This method will compile the expansion using an ArrayList to collect temporary results. This is appropriate if the right-hand-side is a Collection or array, if the root is an Iterable or Iterator or other object whose size can't easily be determined up-front, or if the root is a nested Collection or array that will re...
[ "This", "method", "will", "compile", "the", "expansion", "using", "an", "ArrayList", "to", "collect", "temporary", "results", ".", "This", "is", "appropriate", "if", "the", "right", "-", "hand", "-", "side", "is", "a", "Collection", "or", "array", "if", "t...
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/ir/transform/expression/AbstractMemberExpansionTransformer.java#L221-L238
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryValidator.java
QueryValidator.validateSelector
@SuppressWarnings("unchecked") private static void validateSelector(Map<String, Object> selector) throws QueryException { """ we are going to need to walk the query tree to validate it before executing it """ String topLevelOp = (String) selector.keySet().toArray()[0]; // top level op can ...
java
@SuppressWarnings("unchecked") private static void validateSelector(Map<String, Object> selector) throws QueryException { String topLevelOp = (String) selector.keySet().toArray()[0]; // top level op can only be $and or $or after normalisation if (topLevelOp.equals(AND) || topLevelOp.equals(...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "validateSelector", "(", "Map", "<", "String", ",", "Object", ">", "selector", ")", "throws", "QueryException", "{", "String", "topLevelOp", "=", "(", "String", ")", "selector", "...
we are going to need to walk the query tree to validate it before executing it
[ "we", "are", "going", "to", "need", "to", "walk", "the", "query", "tree", "to", "validate", "it", "before", "executing", "it" ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryValidator.java#L414-L427