repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
apache/incubator-druid
extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsDataSegmentPusher.java
HdfsDataSegmentPusher.getStorageDir
@Override public String getStorageDir(DataSegment segment, boolean useUniquePath) { // This is only called by HdfsDataSegmentPusher.push(), which will always set useUniquePath to false since any // 'uniqueness' will be applied not to the directory but to the filename along with the shard number. This is don...
java
@Override public String getStorageDir(DataSegment segment, boolean useUniquePath) { // This is only called by HdfsDataSegmentPusher.push(), which will always set useUniquePath to false since any // 'uniqueness' will be applied not to the directory but to the filename along with the shard number. This is don...
[ "@", "Override", "public", "String", "getStorageDir", "(", "DataSegment", "segment", ",", "boolean", "useUniquePath", ")", "{", "// This is only called by HdfsDataSegmentPusher.push(), which will always set useUniquePath to false since any", "// 'uniqueness' will be applied not to the di...
Due to https://issues.apache.org/jira/browse/HDFS-13 ":" are not allowed in path names. So we format paths differently for HDFS.
[ "Due", "to", "https", ":", "//", "issues", ".", "apache", ".", "org", "/", "jira", "/", "browse", "/", "HDFS", "-", "13", ":", "are", "not", "allowed", "in", "path", "names", ".", "So", "we", "format", "paths", "differently", "for", "HDFS", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsDataSegmentPusher.java#L187-L208
javalite/activejdbc
javalite-common/src/main/java/org/javalite/http/Http.java
Http.map2URLEncoded
public static String map2URLEncoded(Map params){ StringBuilder stringBuilder = new StringBuilder(); try{ Set keySet = params.keySet(); Object[] keys = keySet.toArray(); for (int i = 0; i < keys.length; i++) { stringBuilder.append(encode(keys[i].toStrin...
java
public static String map2URLEncoded(Map params){ StringBuilder stringBuilder = new StringBuilder(); try{ Set keySet = params.keySet(); Object[] keys = keySet.toArray(); for (int i = 0; i < keys.length; i++) { stringBuilder.append(encode(keys[i].toStrin...
[ "public", "static", "String", "map2URLEncoded", "(", "Map", "params", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "Set", "keySet", "=", "params", ".", "keySet", "(", ")", ";", "Object", "[", "]", "k...
Converts a map to URL- encoded string. This is a convenience method which can be used in combination with {@link #post(String, byte[])}, {@link #put(String, String)} and others. It makes it easy to convert parameters to submit a string: <pre> key=value&key1=value1; </pre> @param params map with keys and values to be ...
[ "Converts", "a", "map", "to", "URL", "-", "encoded", "string", ".", "This", "is", "a", "convenience", "method", "which", "can", "be", "used", "in", "combination", "with", "{", "@link", "#post", "(", "String", "byte", "[]", ")", "}", "{", "@link", "#put...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/http/Http.java#L303-L318
ronmamo/reflections
src/main/java/org/reflections/vfs/Vfs.java
Vfs.fromURL
public static Dir fromURL(final URL url, final UrlType... urlTypes) { return fromURL(url, Lists.<UrlType>newArrayList(urlTypes)); }
java
public static Dir fromURL(final URL url, final UrlType... urlTypes) { return fromURL(url, Lists.<UrlType>newArrayList(urlTypes)); }
[ "public", "static", "Dir", "fromURL", "(", "final", "URL", "url", ",", "final", "UrlType", "...", "urlTypes", ")", "{", "return", "fromURL", "(", "url", ",", "Lists", ".", "<", "UrlType", ">", "newArrayList", "(", "urlTypes", ")", ")", ";", "}" ]
tries to create a Dir from the given url, using the given urlTypes
[ "tries", "to", "create", "a", "Dir", "from", "the", "given", "url", "using", "the", "given", "urlTypes" ]
train
https://github.com/ronmamo/reflections/blob/084cf4a759a06d88e88753ac00397478c2e0ed52/src/main/java/org/reflections/vfs/Vfs.java#L118-L120
innoq/LiQID
ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java
LdapHelper.getUser
@Override public Node getUser(final String uid) { try { String query = "(&(objectClass=" + userObjectClass + ")(" + userIdentifyer + "=" + uid + "))"; SearchResult searchResult; Attributes attributes; SearchControls controls = new SearchControls(); ...
java
@Override public Node getUser(final String uid) { try { String query = "(&(objectClass=" + userObjectClass + ")(" + userIdentifyer + "=" + uid + "))"; SearchResult searchResult; Attributes attributes; SearchControls controls = new SearchControls(); ...
[ "@", "Override", "public", "Node", "getUser", "(", "final", "String", "uid", ")", "{", "try", "{", "String", "query", "=", "\"(&(objectClass=\"", "+", "userObjectClass", "+", "\")(\"", "+", "userIdentifyer", "+", "\"=\"", "+", "uid", "+", "\"))\"", ";", "S...
Returns an LDAP-User. @param uid the uid of the User. @see com.innoq.liqid.model.Node#getName @return the Node of that User, either filled (if User was found), or empty.
[ "Returns", "an", "LDAP", "-", "User", "." ]
train
https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L288-L312
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Strings.java
Strings.unCamel
public static String unCamel(String str, char seperator, boolean lowercase) { char[] ca = str.toCharArray(); if (3 > ca.length) { return lowercase ? str.toLowerCase() : str; } // about five seperator StringBuilder build = new StringBuilder(ca.length + 5); build.append(lowercase ? toLowerCase(ca[0]) ...
java
public static String unCamel(String str, char seperator, boolean lowercase) { char[] ca = str.toCharArray(); if (3 > ca.length) { return lowercase ? str.toLowerCase() : str; } // about five seperator StringBuilder build = new StringBuilder(ca.length + 5); build.append(lowercase ? toLowerCase(ca[0]) ...
[ "public", "static", "String", "unCamel", "(", "String", "str", ",", "char", "seperator", ",", "boolean", "lowercase", ")", "{", "char", "[", "]", "ca", "=", "str", ".", "toCharArray", "(", ")", ";", "if", "(", "3", ">", "ca", ".", "length", ")", "{...
将驼峰表示法转换为下划线小写表示 @param str a {@link java.lang.String} object. @param seperator a char. @param lowercase a boolean. @return a {@link java.lang.String} object.
[ "将驼峰表示法转换为下划线小写表示" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L1142-L1175
adamfisk/littleshoot-util
src/main/java/org/littleshoot/util/BeanUtils.java
BeanUtils.mapBean
public static Map<String, String> mapBean(final Object bean, final String exclude) { final Set<String> excludes = new HashSet<String>(); if (!StringUtils.isBlank(exclude)) { excludes.add(exclude); } return mapBean(bean, excludes); }
java
public static Map<String, String> mapBean(final Object bean, final String exclude) { final Set<String> excludes = new HashSet<String>(); if (!StringUtils.isBlank(exclude)) { excludes.add(exclude); } return mapBean(bean, excludes); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "mapBean", "(", "final", "Object", "bean", ",", "final", "String", "exclude", ")", "{", "final", "Set", "<", "String", ">", "excludes", "=", "new", "HashSet", "<", "String", ">", "(", ")", ...
Creates a {@link Map} from all bean data get methods except the one specified to exclude. Note that "getClass" is always excluded. @param bean The bean with data to extract. @param exclude A method name to exclude. @return The map of bean data.
[ "Creates", "a", "{", "@link", "Map", "}", "from", "all", "bean", "data", "get", "methods", "except", "the", "one", "specified", "to", "exclude", ".", "Note", "that", "getClass", "is", "always", "excluded", "." ]
train
https://github.com/adamfisk/littleshoot-util/blob/3c0dc4955116b3382d6b0575d2f164b7508a4f73/src/main/java/org/littleshoot/util/BeanUtils.java#L50-L59
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/client/command/AbstractBaseCommand.java
AbstractBaseCommand.checkAgentUrl
protected String checkAgentUrl(Object pVm, int delayInMs) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { if (delayInMs != 0) { try { Thread.sleep(delayInMs); } catch (InterruptedException e) { // just continue ...
java
protected String checkAgentUrl(Object pVm, int delayInMs) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { if (delayInMs != 0) { try { Thread.sleep(delayInMs); } catch (InterruptedException e) { // just continue ...
[ "protected", "String", "checkAgentUrl", "(", "Object", "pVm", ",", "int", "delayInMs", ")", "throws", "NoSuchMethodException", ",", "InvocationTargetException", ",", "IllegalAccessException", "{", "if", "(", "delayInMs", "!=", "0", ")", "{", "try", "{", "Thread", ...
Check whether an agent is registered by checking the existance of the system property {@link JvmAgent#JOLOKIA_AGENT_URL}. This can be used to check, whether a Jolokia agent has been already attached and started. ("start" will set this property, "stop" will remove it). @param pVm the {@link com.sun.tools.attach.Virtual...
[ "Check", "whether", "an", "agent", "is", "registered", "by", "checking", "the", "existance", "of", "the", "system", "property", "{", "@link", "JvmAgent#JOLOKIA_AGENT_URL", "}", ".", "This", "can", "be", "used", "to", "check", "whether", "a", "Jolokia", "agent"...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/client/command/AbstractBaseCommand.java#L96-L106
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.metrics_fat/fat/src/com/ibm/ws/microprofile/metrics/fat/utils/MetricsConnection.java
MetricsConnection.connection_administratorRole
public static MetricsConnection connection_administratorRole(LibertyServer server) { return new MetricsConnection(server, METRICS_ENDPOINT).secure(true) .header("Authorization", "Basic " + Base64Coder.base64Encode(ADMINISTRATOR_USERNAME + ":" + ADMINISTRAT...
java
public static MetricsConnection connection_administratorRole(LibertyServer server) { return new MetricsConnection(server, METRICS_ENDPOINT).secure(true) .header("Authorization", "Basic " + Base64Coder.base64Encode(ADMINISTRATOR_USERNAME + ":" + ADMINISTRAT...
[ "public", "static", "MetricsConnection", "connection_administratorRole", "(", "LibertyServer", "server", ")", "{", "return", "new", "MetricsConnection", "(", "server", ",", "METRICS_ENDPOINT", ")", ".", "secure", "(", "true", ")", ".", "header", "(", "\"Authorizatio...
Creates a connection for private (authorized) docs endpoint using HTTPS and the Administrator role @param server - server to connect to @return
[ "Creates", "a", "connection", "for", "private", "(", "authorized", ")", "docs", "endpoint", "using", "HTTPS", "and", "the", "Administrator", "role" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.metrics_fat/fat/src/com/ibm/ws/microprofile/metrics/fat/utils/MetricsConnection.java#L201-L205
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java
ICUBinary.readHeader
public static int readHeader(ByteBuffer bytes, int dataFormat, Authenticate authenticate) throws IOException { assert bytes != null && bytes.position() == 0; byte magic1 = bytes.get(2); byte magic2 = bytes.get(3); if (magic1 != MAGIC1 || magic2 != MAGIC2) { throw ...
java
public static int readHeader(ByteBuffer bytes, int dataFormat, Authenticate authenticate) throws IOException { assert bytes != null && bytes.position() == 0; byte magic1 = bytes.get(2); byte magic2 = bytes.get(3); if (magic1 != MAGIC1 || magic2 != MAGIC2) { throw ...
[ "public", "static", "int", "readHeader", "(", "ByteBuffer", "bytes", ",", "int", "dataFormat", ",", "Authenticate", "authenticate", ")", "throws", "IOException", "{", "assert", "bytes", "!=", "null", "&&", "bytes", ".", "position", "(", ")", "==", "0", ";", ...
Reads an ICU data header, checks the data format, and returns the data version. <p>Assumes that the ByteBuffer position is 0 on input. The buffer byte order is set according to the data. The buffer position is advanced past the header (including UDataInfo and comment). <p>See C++ ucmndata.h and unicode/udata.h. @ret...
[ "Reads", "an", "ICU", "data", "header", "checks", "the", "data", "format", "and", "returns", "the", "data", "version", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java#L575-L621
beanshell/beanshell
src/main/java/bsh/org/objectweb/asm/ByteVector.java
ByteVector.putUTF8
public ByteVector putUTF8(final String stringValue) { int charLength = stringValue.length(); if (charLength > 65535) { throw new IllegalArgumentException(); } int currentLength = length; if (currentLength + 2 + charLength > data.length) { enlarge(2 + charLength); } byte[] current...
java
public ByteVector putUTF8(final String stringValue) { int charLength = stringValue.length(); if (charLength > 65535) { throw new IllegalArgumentException(); } int currentLength = length; if (currentLength + 2 + charLength > data.length) { enlarge(2 + charLength); } byte[] current...
[ "public", "ByteVector", "putUTF8", "(", "final", "String", "stringValue", ")", "{", "int", "charLength", "=", "stringValue", ".", "length", "(", ")", ";", "if", "(", "charLength", ">", "65535", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ...
Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. @param stringValue a String whose UTF8 encoded length must be less than 65536. @return this byte vector.
[ "Puts", "an", "UTF8", "string", "into", "this", "byte", "vector", ".", "The", "byte", "vector", "is", "automatically", "enlarged", "if", "necessary", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/org/objectweb/asm/ByteVector.java#L242-L269
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java
ObjectUtils.deepCopy
public static final Object deepCopy(Object source, final KunderaMetadata kunderaMetadata) { Map<Object, Object> copiedObjectMap = new HashMap<Object, Object>(); Object target = deepCopyUsingMetadata(source, copiedObjectMap, kunderaMetadata); copiedObjectMap.clear(); copiedObjectMap...
java
public static final Object deepCopy(Object source, final KunderaMetadata kunderaMetadata) { Map<Object, Object> copiedObjectMap = new HashMap<Object, Object>(); Object target = deepCopyUsingMetadata(source, copiedObjectMap, kunderaMetadata); copiedObjectMap.clear(); copiedObjectMap...
[ "public", "static", "final", "Object", "deepCopy", "(", "Object", "source", ",", "final", "KunderaMetadata", "kunderaMetadata", ")", "{", "Map", "<", "Object", ",", "Object", ">", "copiedObjectMap", "=", "new", "HashMap", "<", "Object", ",", "Object", ">", "...
Deep copy. @param source the source @param kunderaMetadata the kundera metadata @return the object
[ "Deep", "copy", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java#L70-L80
appium/java-client
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
AppiumServiceBuilder.withArgument
public AppiumServiceBuilder withArgument(ServerArgument argument, String value) { String argName = argument.getArgument().trim().toLowerCase(); if ("--port".equals(argName) || "-p".equals(argName)) { usingPort(Integer.valueOf(value)); } else if ("--address".equals(argName) || "-a".eq...
java
public AppiumServiceBuilder withArgument(ServerArgument argument, String value) { String argName = argument.getArgument().trim().toLowerCase(); if ("--port".equals(argName) || "-p".equals(argName)) { usingPort(Integer.valueOf(value)); } else if ("--address".equals(argName) || "-a".eq...
[ "public", "AppiumServiceBuilder", "withArgument", "(", "ServerArgument", "argument", ",", "String", "value", ")", "{", "String", "argName", "=", "argument", ".", "getArgument", "(", ")", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ";", "if", "(", ...
Adds a server argument. @param argument is an instance which contains the argument name. @param value A non null string value. (Warn!!!) Boolean arguments have a special moment: the presence of an arguments means "true". At this case an empty string should be defined. @return the self-reference.
[ "Adds", "a", "server", "argument", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java#L265-L277
lucee/Lucee
core/src/main/java/lucee/commons/lang/ClassUtil.java
ClassUtil.loadInstance
public static Object loadInstance(Class clazz, Object[] args, Object defaultValue) { if (args == null || args.length == 0) return loadInstance(clazz, defaultValue); try { Class[] cArgs = new Class[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] == null) cArgs[i] = Object.class; else cA...
java
public static Object loadInstance(Class clazz, Object[] args, Object defaultValue) { if (args == null || args.length == 0) return loadInstance(clazz, defaultValue); try { Class[] cArgs = new Class[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] == null) cArgs[i] = Object.class; else cA...
[ "public", "static", "Object", "loadInstance", "(", "Class", "clazz", ",", "Object", "[", "]", "args", ",", "Object", "defaultValue", ")", "{", "if", "(", "args", "==", "null", "||", "args", ".", "length", "==", "0", ")", "return", "loadInstance", "(", ...
loads a class from a String classname @param clazz class to load @param args @return matching Class
[ "loads", "a", "class", "from", "a", "String", "classname" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ClassUtil.java#L485-L502
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/util/dbextractor/MithraObjectGraphExtractor.java
MithraObjectGraphExtractor.addRelationshipFilter
public void addRelationshipFilter(RelatedFinder relatedFinder, Operation filter) { Operation existing = this.filters.get(relatedFinder); this.filters.put(relatedFinder, existing == null ? filter : existing.or(filter)); }
java
public void addRelationshipFilter(RelatedFinder relatedFinder, Operation filter) { Operation existing = this.filters.get(relatedFinder); this.filters.put(relatedFinder, existing == null ? filter : existing.or(filter)); }
[ "public", "void", "addRelationshipFilter", "(", "RelatedFinder", "relatedFinder", ",", "Operation", "filter", ")", "{", "Operation", "existing", "=", "this", ".", "filters", ".", "get", "(", "relatedFinder", ")", ";", "this", ".", "filters", ".", "put", "(", ...
Add a filter to be applied to the result of a traversed relationship. @param relatedFinder - the relationship to apply the filter to @param filter - the filter to apply
[ "Add", "a", "filter", "to", "be", "applied", "to", "the", "result", "of", "a", "traversed", "relationship", "." ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/util/dbextractor/MithraObjectGraphExtractor.java#L117-L121
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_firewall_duration_POST
public OvhOrder dedicated_server_serviceName_firewall_duration_POST(String serviceName, String duration, OvhFirewallModelEnum firewallModel) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/firewall/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Objec...
java
public OvhOrder dedicated_server_serviceName_firewall_duration_POST(String serviceName, String duration, OvhFirewallModelEnum firewallModel) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/firewall/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Objec...
[ "public", "OvhOrder", "dedicated_server_serviceName_firewall_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhFirewallModelEnum", "firewallModel", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName...
Create order REST: POST /order/dedicated/server/{serviceName}/firewall/{duration} @param firewallModel [required] Firewall type @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2802-L2809
peterbencze/serritor
src/main/java/com/github/peterbencze/serritor/api/BaseCrawler.java
BaseCrawler.start
private void start(final WebDriver webDriver, final boolean isResuming) { try { Validate.validState(isStopped, "The crawler is already running."); this.webDriver = Validate.notNull(webDriver, "The webdriver cannot be null."); // If the crawl delay strategy is set to ada...
java
private void start(final WebDriver webDriver, final boolean isResuming) { try { Validate.validState(isStopped, "The crawler is already running."); this.webDriver = Validate.notNull(webDriver, "The webdriver cannot be null."); // If the crawl delay strategy is set to ada...
[ "private", "void", "start", "(", "final", "WebDriver", "webDriver", ",", "final", "boolean", "isResuming", ")", "{", "try", "{", "Validate", ".", "validState", "(", "isStopped", ",", "\"The crawler is already running.\"", ")", ";", "this", ".", "webDriver", "=",...
Performs initialization and runs the crawler. @param isResuming indicates if a previously saved state is to be resumed
[ "Performs", "initialization", "and", "runs", "the", "crawler", "." ]
train
https://github.com/peterbencze/serritor/blob/10ed6f82c90fa1dccd684382b68b5d77a37652c0/src/main/java/com/github/peterbencze/serritor/api/BaseCrawler.java#L151-L187
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/StreamSegmentContainerRegistry.java
StreamSegmentContainerRegistry.startContainerInternal
private CompletableFuture<ContainerHandle> startContainerInternal(int containerId) { ContainerWithHandle newContainer = new ContainerWithHandle(this.factory.createStreamSegmentContainer(containerId), new SegmentContainerHandle(containerId)); ContainerWithHandle existingContainer = this.c...
java
private CompletableFuture<ContainerHandle> startContainerInternal(int containerId) { ContainerWithHandle newContainer = new ContainerWithHandle(this.factory.createStreamSegmentContainer(containerId), new SegmentContainerHandle(containerId)); ContainerWithHandle existingContainer = this.c...
[ "private", "CompletableFuture", "<", "ContainerHandle", ">", "startContainerInternal", "(", "int", "containerId", ")", "{", "ContainerWithHandle", "newContainer", "=", "new", "ContainerWithHandle", "(", "this", ".", "factory", ".", "createStreamSegmentContainer", "(", "...
Creates a new Container and attempts to register it. This method works in an optimistic manner: it creates the Container first and then attempts to register it, which should prevent us from having to lock on this entire method. Creating new containers is cheap (we don't start them yet), so this operation should not tak...
[ "Creates", "a", "new", "Container", "and", "attempts", "to", "register", "it", ".", "This", "method", "works", "in", "an", "optimistic", "manner", ":", "it", "creates", "the", "Container", "first", "and", "then", "attempts", "to", "register", "it", "which", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/StreamSegmentContainerRegistry.java#L147-L167
sinetja/sinetja
src/main/java/sinetja/Response.java
Response.respondEventSource
public ChannelFuture respondEventSource(Object data, String event) throws Exception { if (!nonChunkedResponseOrFirstChunkSent) { HttpUtil.setTransferEncodingChunked(response, true); response.headers().set(CONTENT_TYPE, "text/event-stream; charset=UTF-8"); return respondText("...
java
public ChannelFuture respondEventSource(Object data, String event) throws Exception { if (!nonChunkedResponseOrFirstChunkSent) { HttpUtil.setTransferEncodingChunked(response, true); response.headers().set(CONTENT_TYPE, "text/event-stream; charset=UTF-8"); return respondText("...
[ "public", "ChannelFuture", "respondEventSource", "(", "Object", "data", ",", "String", "event", ")", "throws", "Exception", "{", "if", "(", "!", "nonChunkedResponseOrFirstChunkSent", ")", "{", "HttpUtil", ".", "setTransferEncodingChunked", "(", "response", ",", "tru...
To respond event source, call this method as many time as you want. <p>Event Source response is a special kind of chunked response, data must be UTF-8. See: - http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3.3.html#section-94 - http://dev.w3.org/html5/eventsource/ <p>No need to call setChunked() before ca...
[ "To", "respond", "event", "source", "call", "this", "method", "as", "many", "time", "as", "you", "want", "." ]
train
https://github.com/sinetja/sinetja/blob/eec94dba55ec28263e3503fcdb33532282134775/src/main/java/sinetja/Response.java#L336-L343
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuTexRefSetMipmappedArray
public static int cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, int Flags) { return checkResult(cuTexRefSetMipmappedArrayNative(hTexRef, hMipmappedArray, Flags)); }
java
public static int cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, int Flags) { return checkResult(cuTexRefSetMipmappedArrayNative(hTexRef, hMipmappedArray, Flags)); }
[ "public", "static", "int", "cuTexRefSetMipmappedArray", "(", "CUtexref", "hTexRef", ",", "CUmipmappedArray", "hMipmappedArray", ",", "int", "Flags", ")", "{", "return", "checkResult", "(", "cuTexRefSetMipmappedArrayNative", "(", "hTexRef", ",", "hMipmappedArray", ",", ...
Binds a mipmapped array to a texture reference. <pre> CUresult cuTexRefSetMipmappedArray ( CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags ) </pre> <div> <p>Binds a mipmapped array to a texture reference. Binds the CUDA mipmapped array <tt>hMipmappedArray</tt> to the texture reference <tt>hTex...
[ "Binds", "a", "mipmapped", "array", "to", "a", "texture", "reference", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L9764-L9767
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java
SpoofChecker.areConfusable
public int areConfusable(String s1, String s2) { // // See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable, // and for definitions of the types (single, whole, mixed-script) of confusables. // We only care about a few of the check flags. Ignore the ...
java
public int areConfusable(String s1, String s2) { // // See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable, // and for definitions of the types (single, whole, mixed-script) of confusables. // We only care about a few of the check flags. Ignore the ...
[ "public", "int", "areConfusable", "(", "String", "s1", ",", "String", "s2", ")", "{", "//", "// See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable,", "// and for definitions of the types (single, whole, mixed-script) of confusables.", "// We only ca...
Check the whether two specified strings are visually confusable. The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for the SpoofChecker. The tests to be performed are controlled by the flags SINGLE_SCRIPT_CONFUSABLE MIXED_SCRIPT_CONFUSABLE ...
[ "Check", "the", "whether", "two", "specified", "strings", "are", "visually", "confusable", ".", "The", "types", "of", "confusability", "to", "be", "tested", "-", "single", "script", "mixed", "script", "or", "whole", "script", "-", "are", "determined", "by", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1344-L1387
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isAssignableOrConvertibleFrom
public static boolean isAssignableOrConvertibleFrom(Class<?> clazz, Class<?> type) { if (type == null || clazz == null) { return false; } if (type.isPrimitive()) { // convert primitive type to compatible class Class<?> primitiveClass = GrailsClassUtils.PRIMITI...
java
public static boolean isAssignableOrConvertibleFrom(Class<?> clazz, Class<?> type) { if (type == null || clazz == null) { return false; } if (type.isPrimitive()) { // convert primitive type to compatible class Class<?> primitiveClass = GrailsClassUtils.PRIMITI...
[ "public", "static", "boolean", "isAssignableOrConvertibleFrom", "(", "Class", "<", "?", ">", "clazz", ",", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "type", "==", "null", "||", "clazz", "==", "null", ")", "{", "return", "false", ";", "}", ...
Returns true if the specified clazz parameter is either the same as, or is a superclass or superinterface of, the specified type parameter. Converts primitive types to compatible class automatically. @param clazz @param type @return true if the class is a taglib @see java.lang.Class#isAssignableFrom(Class)
[ "Returns", "true", "if", "the", "specified", "clazz", "parameter", "is", "either", "the", "same", "as", "or", "is", "a", "superclass", "or", "superinterface", "of", "the", "specified", "type", "parameter", ".", "Converts", "primitive", "types", "to", "compatib...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L789-L803
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractEventBuilder.java
AbstractEventBuilder.camundaOutputParameter
public B camundaOutputParameter(String name, String value) { CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement(CamundaInputOutput.class); CamundaOutputParameter camundaOutputParameter = createChild(camundaInputOutput, CamundaOutputParameter.class); camundaOutputParameter.setCamundaNam...
java
public B camundaOutputParameter(String name, String value) { CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement(CamundaInputOutput.class); CamundaOutputParameter camundaOutputParameter = createChild(camundaInputOutput, CamundaOutputParameter.class); camundaOutputParameter.setCamundaNam...
[ "public", "B", "camundaOutputParameter", "(", "String", "name", ",", "String", "value", ")", "{", "CamundaInputOutput", "camundaInputOutput", "=", "getCreateSingleExtensionElement", "(", "CamundaInputOutput", ".", "class", ")", ";", "CamundaOutputParameter", "camundaOutpu...
Creates a new camunda output parameter extension element with the given name and value. @param name the name of the output parameter @param value the value of the output parameter @return the builder object
[ "Creates", "a", "new", "camunda", "output", "parameter", "extension", "element", "with", "the", "given", "name", "and", "value", "." ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractEventBuilder.java#L60-L68
republicofgavin/PauseResumeAudioRecorder
library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java
PauseResumeAudioRecorder.startRecording
public void startRecording(){ if (currentAudioState.get() == PREPARED_STATE) { currentAudioRecordingThread = new AudioRecorderThread(audioFile.replace(".wav",".temp"), MediaRecorder.AudioSource.MIC, sampleRateInHertz,channelConfig,audioEncoding,maxFileSizeInBytes); currentAudioState.set(...
java
public void startRecording(){ if (currentAudioState.get() == PREPARED_STATE) { currentAudioRecordingThread = new AudioRecorderThread(audioFile.replace(".wav",".temp"), MediaRecorder.AudioSource.MIC, sampleRateInHertz,channelConfig,audioEncoding,maxFileSizeInBytes); currentAudioState.set(...
[ "public", "void", "startRecording", "(", ")", "{", "if", "(", "currentAudioState", ".", "get", "(", ")", "==", "PREPARED_STATE", ")", "{", "currentAudioRecordingThread", "=", "new", "AudioRecorderThread", "(", "audioFile", ".", "replace", "(", "\".wav\"", ",", ...
Starts the recording if the recorder is in a prepared state. At this time, the complete file path should not have .temp file(as that is where the writing is taking place) and the specified .wav file should not exist as well(as that is where the .temp file will be converted to). Does nothing if it is recorder is not in ...
[ "Starts", "the", "recording", "if", "the", "recorder", "is", "in", "a", "prepared", "state", ".", "At", "this", "time", "the", "complete", "file", "path", "should", "not", "have", ".", "temp", "file", "(", "as", "that", "is", "where", "the", "writing", ...
train
https://github.com/republicofgavin/PauseResumeAudioRecorder/blob/938128a6266fb5bd7b60f844b5d7e56e1899d4e2/library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java#L223-L237
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/olap/OLAPService.java
OLAPService.addBatch
public BatchResult addBatch(ApplicationDefinition appDef, String shardName, OlapBatch batch) { return addBatch(appDef, shardName, batch, null); }
java
public BatchResult addBatch(ApplicationDefinition appDef, String shardName, OlapBatch batch) { return addBatch(appDef, shardName, batch, null); }
[ "public", "BatchResult", "addBatch", "(", "ApplicationDefinition", "appDef", ",", "String", "shardName", ",", "OlapBatch", "batch", ")", "{", "return", "addBatch", "(", "appDef", ",", "shardName", ",", "batch", ",", "null", ")", ";", "}" ]
Add a batch of updates for the given application to the given shard. Objects can new, updated, or deleted. @param appDef {@link ApplicationDefinition} of application to update. @param shardName Shard to add batch to. @param batch {@link OlapBatch} containing object updates. @return {@link BatchResult} ...
[ "Add", "a", "batch", "of", "updates", "for", "the", "given", "application", "to", "the", "given", "shard", ".", "Objects", "can", "new", "updated", "or", "deleted", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/olap/OLAPService.java#L198-L200
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/SystemUtil.java
SystemUtil.isClassAvailable
public static boolean isClassAvailable(String pClassName, Class pFromClass) { ClassLoader loader = pFromClass != null ? pFromClass.getClassLoader() : null; return isClassAvailable(pClassName, loader); }
java
public static boolean isClassAvailable(String pClassName, Class pFromClass) { ClassLoader loader = pFromClass != null ? pFromClass.getClassLoader() : null; return isClassAvailable(pClassName, loader); }
[ "public", "static", "boolean", "isClassAvailable", "(", "String", "pClassName", ",", "Class", "pFromClass", ")", "{", "ClassLoader", "loader", "=", "pFromClass", "!=", "null", "?", "pFromClass", ".", "getClassLoader", "(", ")", ":", "null", ";", "return", "isC...
Tests if a named class is available from another class. If a class is considered available, a call to {@code Class.forName(pClassName, true, pFromClass.getClassLoader())} will not result in an exception. @param pClassName the class name to test @param pFromClass the class to test from @return {@code true} if available
[ "Tests", "if", "a", "named", "class", "is", "available", "from", "another", "class", ".", "If", "a", "class", "is", "considered", "available", "a", "call", "to", "{", "@code", "Class", ".", "forName", "(", "pClassName", "true", "pFromClass", ".", "getClass...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/SystemUtil.java#L590-L593
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
CertificateOperations.deleteCertificate
public void deleteCertificate(String thumbprintAlgorithm, String thumbprint, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { CertificateDeleteOptions options = new CertificateDeleteOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(),...
java
public void deleteCertificate(String thumbprintAlgorithm, String thumbprint, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { CertificateDeleteOptions options = new CertificateDeleteOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(),...
[ "public", "void", "deleteCertificate", "(", "String", "thumbprintAlgorithm", ",", "String", "thumbprint", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "CertificateDeleteOptions", "o...
Deletes the certificate from the Batch account. <p>The delete operation requests that the certificate be deleted. The request puts the certificate in the {@link com.microsoft.azure.batch.protocol.models.CertificateState#DELETING Deleting} state. The Batch service will perform the actual certificate deletion without any...
[ "Deletes", "the", "certificate", "from", "the", "Batch", "account", ".", "<p", ">", "The", "delete", "operation", "requests", "that", "the", "certificate", "be", "deleted", ".", "The", "request", "puts", "the", "certificate", "in", "the", "{", "@link", "com"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java#L227-L233
jeremylong/DependencyCheck
maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java
BaseDependencyCheckMojo.showSummary
protected void showSummary(MavenProject mp, Dependency[] dependencies) { if (showSummary) { DependencyCheckScanAgent.showSummary(mp.getName(), dependencies); } }
java
protected void showSummary(MavenProject mp, Dependency[] dependencies) { if (showSummary) { DependencyCheckScanAgent.showSummary(mp.getName(), dependencies); } }
[ "protected", "void", "showSummary", "(", "MavenProject", "mp", ",", "Dependency", "[", "]", "dependencies", ")", "{", "if", "(", "showSummary", ")", "{", "DependencyCheckScanAgent", ".", "showSummary", "(", "mp", ".", "getName", "(", ")", ",", "dependencies", ...
Generates a warning message listing a summary of dependencies and their associated CPE and CVE entries. @param mp the Maven project for which the summary is shown @param dependencies a list of dependency objects
[ "Generates", "a", "warning", "message", "listing", "a", "summary", "of", "dependencies", "and", "their", "associated", "CPE", "and", "CVE", "entries", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java#L1865-L1869
jirutka/spring-rest-exception-handler
src/main/java/cz/jirutka/spring/exhandler/RestHandlerExceptionResolverBuilder.java
RestHandlerExceptionResolverBuilder.addErrorMessageHandler
public RestHandlerExceptionResolverBuilder addErrorMessageHandler( Class<? extends Exception> exceptionClass, HttpStatus status) { return addHandler(new ErrorMessageRestExceptionHandler<>(exceptionClass, status)); }
java
public RestHandlerExceptionResolverBuilder addErrorMessageHandler( Class<? extends Exception> exceptionClass, HttpStatus status) { return addHandler(new ErrorMessageRestExceptionHandler<>(exceptionClass, status)); }
[ "public", "RestHandlerExceptionResolverBuilder", "addErrorMessageHandler", "(", "Class", "<", "?", "extends", "Exception", ">", "exceptionClass", ",", "HttpStatus", "status", ")", "{", "return", "addHandler", "(", "new", "ErrorMessageRestExceptionHandler", "<>", "(", "e...
Registers {@link ErrorMessageRestExceptionHandler} for the specified exception type. This handler will be also used for all the exception subtypes, when no more specific mapping is found. @param exceptionClass The exception type to handle. @param status The HTTP status to map the specified exception to.
[ "Registers", "{", "@link", "ErrorMessageRestExceptionHandler", "}", "for", "the", "specified", "exception", "type", ".", "This", "handler", "will", "be", "also", "used", "for", "all", "the", "exception", "subtypes", "when", "no", "more", "specific", "mapping", "...
train
https://github.com/jirutka/spring-rest-exception-handler/blob/f171956e59fe866f1a853c7d38444f136acc7a3b/src/main/java/cz/jirutka/spring/exhandler/RestHandlerExceptionResolverBuilder.java#L212-L216
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
EqualsBuilder.reflectionEquals
@GwtIncompatible("incompatible method") public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients, final Class<?> reflectUpToClass, final String... excludeFields) { return reflectionEquals(lhs, rhs, testTransients, reflectUpToClass, false, excludeFie...
java
@GwtIncompatible("incompatible method") public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients, final Class<?> reflectUpToClass, final String... excludeFields) { return reflectionEquals(lhs, rhs, testTransients, reflectUpToClass, false, excludeFie...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "boolean", "reflectionEquals", "(", "final", "Object", "lhs", ",", "final", "Object", "rhs", ",", "final", "boolean", "testTransients", ",", "final", "Class", "<", "?", ">", "reflec...
<p>This method uses reflection to determine if the two <code>Object</code>s are equal.</p> <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also...
[ "<p", ">", "This", "method", "uses", "reflection", "to", "determine", "if", "the", "two", "<code", ">", "Object<", "/", "code", ">", "s", "are", "equal", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java#L394-L398
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.inclusiveBetween
@SuppressWarnings("boxing") public static void inclusiveBetween(final double start, final double end, final double value) { // TODO when breaking BC, consider returning value if (value < start || value > end) { throw new IllegalArgumentException(StringUtils.simpleFormat(DEFAULT_INCLUSIVE...
java
@SuppressWarnings("boxing") public static void inclusiveBetween(final double start, final double end, final double value) { // TODO when breaking BC, consider returning value if (value < start || value > end) { throw new IllegalArgumentException(StringUtils.simpleFormat(DEFAULT_INCLUSIVE...
[ "@", "SuppressWarnings", "(", "\"boxing\"", ")", "public", "static", "void", "inclusiveBetween", "(", "final", "double", "start", ",", "final", "double", "end", ",", "final", "double", "value", ")", "{", "// TODO when breaking BC, consider returning value", "if", "(...
Validate that the specified primitive value falls between the two inclusive values specified; otherwise, throws an exception. <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1);</pre> @param start the inclusive start value @param end the inclusive end value @param value the value to validate @throws IllegalArgumentExcep...
[ "Validate", "that", "the", "specified", "primitive", "value", "falls", "between", "the", "two", "inclusive", "values", "specified", ";", "otherwise", "throws", "an", "exception", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L1078-L1084
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MilestonesApi.java
MilestonesApi.activateMilestone
public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.AC...
java
public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.AC...
[ "public", "Milestone", "activateMilestone", "(", "Object", "projectIdOrPath", ",", "Integer", "milestoneId", ")", "throws", "GitLabApiException", "{", "if", "(", "milestoneId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"milestoneId cannot be n...
Activate a milestone. @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param milestoneId the milestone ID to activate @return the activated Milestone instance @throws GitLabApiException if any exception occurs
[ "Activate", "a", "milestone", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L449-L459
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java
RingPlacer.completePartiallyPlacedRing
boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { if (ring.getFlag(CDKConstants.ISPLACED)) return true; IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class); for (IAtom atom : ring.atoms()) if (atom.getPoint2d() != n...
java
boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { if (ring.getFlag(CDKConstants.ISPLACED)) return true; IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class); for (IAtom atom : ring.atoms()) if (atom.getPoint2d() != n...
[ "boolean", "completePartiallyPlacedRing", "(", "IRingSet", "rset", ",", "IRing", "ring", ",", "double", "bondLength", ")", "{", "if", "(", "ring", ".", "getFlag", "(", "CDKConstants", ".", "ISPLACED", ")", ")", "return", "true", ";", "IRing", "partiallyPlacedR...
Completes the layout of a partially laid out ring. @param rset ring set @param ring the ring to complete @param bondLength the bond length
[ "Completes", "the", "layout", "of", "a", "partially", "laid", "out", "ring", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L543-L562
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.setLong
@PublicEvolving public void setLong(ConfigOption<Long> key, long value) { setValueInternal(key.key(), value); }
java
@PublicEvolving public void setLong(ConfigOption<Long> key, long value) { setValueInternal(key.key(), value); }
[ "@", "PublicEvolving", "public", "void", "setLong", "(", "ConfigOption", "<", "Long", ">", "key", ",", "long", "value", ")", "{", "setValueInternal", "(", "key", ".", "key", "(", ")", ",", "value", ")", ";", "}" ]
Adds the given value to the configuration object. The main key of the config option will be used to map the value. @param key the option specifying the key to be added @param value the value of the key/value pair to be added
[ "Adds", "the", "given", "value", "to", "the", "configuration", "object", ".", "The", "main", "key", "of", "the", "config", "option", "will", "be", "used", "to", "map", "the", "value", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L338-L341
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.findConstructor
public static ConstructorNode findConstructor(ClassNode classNode,Parameter[] constructorParams) { List<ConstructorNode> declaredConstructors = classNode.getDeclaredConstructors(); for (ConstructorNode declaredConstructor : declaredConstructors) { if (parametersEqual(constructorParams, decla...
java
public static ConstructorNode findConstructor(ClassNode classNode,Parameter[] constructorParams) { List<ConstructorNode> declaredConstructors = classNode.getDeclaredConstructors(); for (ConstructorNode declaredConstructor : declaredConstructors) { if (parametersEqual(constructorParams, decla...
[ "public", "static", "ConstructorNode", "findConstructor", "(", "ClassNode", "classNode", ",", "Parameter", "[", "]", "constructorParams", ")", "{", "List", "<", "ConstructorNode", ">", "declaredConstructors", "=", "classNode", ".", "getDeclaredConstructors", "(", ")",...
Finds a constructor for the given class node and parameter types @param classNode The class node @param constructorParams The parameter types @return The located constructor or null
[ "Finds", "a", "constructor", "for", "the", "given", "class", "node", "and", "parameter", "types" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L511-L519
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeConnectionAndWait
public static List<Response> executeConnectionAndWait(HttpURLConnection connection, Collection<Request> requests) { return executeConnectionAndWait(connection, new RequestBatch(requests)); }
java
public static List<Response> executeConnectionAndWait(HttpURLConnection connection, Collection<Request> requests) { return executeConnectionAndWait(connection, new RequestBatch(requests)); }
[ "public", "static", "List", "<", "Response", ">", "executeConnectionAndWait", "(", "HttpURLConnection", "connection", ",", "Collection", "<", "Request", ">", "requests", ")", "{", "return", "executeConnectionAndWait", "(", "connection", ",", "new", "RequestBatch", "...
Executes requests that have already been serialized into an HttpURLConnection. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the caller's responsibility to ensure that it will correctly generate the desired responses. <p/> This should only be called if you ...
[ "Executes", "requests", "that", "have", "already", "been", "serialized", "into", "an", "HttpURLConnection", ".", "No", "validation", "is", "done", "that", "the", "contents", "of", "the", "connection", "actually", "reflect", "the", "serialized", "requests", "so", ...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1532-L1534
beangle/beangle3
struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java
EntityActionSupport.getId
protected final <T> T getId(String name, Class<T> clazz) { Object[] entityIds = getAll(name + ".id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll("id"); if (Arrays.isEmpty(entityIds)) return null; else { String entityId = en...
java
protected final <T> T getId(String name, Class<T> clazz) { Object[] entityIds = getAll(name + ".id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll("id"); if (Arrays.isEmpty(entityIds)) return null; else { String entityId = en...
[ "protected", "final", "<", "T", ">", "T", "getId", "(", "String", "name", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Object", "[", "]", "entityIds", "=", "getAll", "(", "name", "+", "\".id\"", ")", ";", "if", "(", "Arrays", ".", "isEmpty", ...
Get entity's id from shortname.id,shortnameId,id @param name @param clazz
[ "Get", "entity", "s", "id", "from", "shortname", ".", "id", "shortnameId", "id" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java#L47-L58
forge/furnace
proxy/src/main/java/org/jboss/forge/furnace/proxy/Proxies.java
Proxies.areEquivalent
public static boolean areEquivalent(Object proxiedObj, Object anotherProxiedObj) { if (proxiedObj == null && anotherProxiedObj == null) { return true; } else if (proxiedObj == null || anotherProxiedObj == null) { return false; } else { Object...
java
public static boolean areEquivalent(Object proxiedObj, Object anotherProxiedObj) { if (proxiedObj == null && anotherProxiedObj == null) { return true; } else if (proxiedObj == null || anotherProxiedObj == null) { return false; } else { Object...
[ "public", "static", "boolean", "areEquivalent", "(", "Object", "proxiedObj", ",", "Object", "anotherProxiedObj", ")", "{", "if", "(", "proxiedObj", "==", "null", "&&", "anotherProxiedObj", "==", "null", ")", "{", "return", "true", ";", "}", "else", "if", "("...
This method tests if two proxied objects are equivalent. It does so by comparing the class names and the hashCode, since they may be loaded from different classloaders.
[ "This", "method", "tests", "if", "two", "proxied", "objects", "are", "equivalent", "." ]
train
https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/proxy/src/main/java/org/jboss/forge/furnace/proxy/Proxies.java#L398-L434
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroData.java
SynchroData.readTableHeaders
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { // Read the headers List<SynchroTable> tables = new ArrayList<SynchroTable>(); byte[] header = new byte[48]; while (true) { is.read(header); m_offset += 48; SynchroTable table = r...
java
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { // Read the headers List<SynchroTable> tables = new ArrayList<SynchroTable>(); byte[] header = new byte[48]; while (true) { is.read(header); m_offset += 48; SynchroTable table = r...
[ "private", "List", "<", "SynchroTable", ">", "readTableHeaders", "(", "InputStream", "is", ")", "throws", "IOException", "{", "// Read the headers", "List", "<", "SynchroTable", ">", "tables", "=", "new", "ArrayList", "<", "SynchroTable", ">", "(", ")", ";", "...
Read the table headers. This allows us to break the file into chunks representing the individual tables. @param is input stream @return list of tables in the file
[ "Read", "the", "table", "headers", ".", "This", "allows", "us", "to", "break", "the", "file", "into", "chunks", "representing", "the", "individual", "tables", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroData.java#L88-L132
EdwardRaff/JSAT
JSAT/src/jsat/io/CSV.java
CSV.readC
public static ClassificationDataSet readC(int classification_target, Reader reader, int lines_to_skip, Set<Integer> cat_cols) throws IOException { return readC(classification_target, reader, DEFAULT_DELIMITER, lines_to_skip, DEFAULT_COMMENT, cat_cols); }
java
public static ClassificationDataSet readC(int classification_target, Reader reader, int lines_to_skip, Set<Integer> cat_cols) throws IOException { return readC(classification_target, reader, DEFAULT_DELIMITER, lines_to_skip, DEFAULT_COMMENT, cat_cols); }
[ "public", "static", "ClassificationDataSet", "readC", "(", "int", "classification_target", ",", "Reader", "reader", ",", "int", "lines_to_skip", ",", "Set", "<", "Integer", ">", "cat_cols", ")", "throws", "IOException", "{", "return", "readC", "(", "classification...
Reads in a CSV dataset as a classification dataset. Comments assumed to start with the "#" symbol. @param classification_target the column index (starting from zero) of the feature that will be the categorical target value @param reader the reader for the CSV content @param lines_to_skip the number of lines to skip wh...
[ "Reads", "in", "a", "CSV", "dataset", "as", "a", "classification", "dataset", ".", "Comments", "assumed", "to", "start", "with", "the", "#", "symbol", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/CSV.java#L172-L175
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listSecretVersions
public PagedList<SecretItem> listSecretVersions(final String vaultBaseUrl, final String secretName, final Integer maxresults) { return getSecretVersions(vaultBaseUrl, secretName, maxresults); }
java
public PagedList<SecretItem> listSecretVersions(final String vaultBaseUrl, final String secretName, final Integer maxresults) { return getSecretVersions(vaultBaseUrl, secretName, maxresults); }
[ "public", "PagedList", "<", "SecretItem", ">", "listSecretVersions", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "secretName", ",", "final", "Integer", "maxresults", ")", "{", "return", "getSecretVersions", "(", "vaultBaseUrl", ",", "secretName",...
List the versions of the specified secret. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param secretName The name of the secret in the given vault @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. @return the PagedLi...
[ "List", "the", "versions", "of", "the", "specified", "secret", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1262-L1265
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java
GVRGenericConstraint.setAngularLowerLimits
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ); }
java
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ); }
[ "public", "void", "setAngularLowerLimits", "(", "float", "limitX", ",", "float", "limitY", ",", "float", "limitZ", ")", "{", "Native3DGenericConstraint", ".", "setAngularLowerLimits", "(", "getNative", "(", ")", ",", "limitX", ",", "limitY", ",", "limitZ", ")", ...
Sets the lower limits for the "moving" body rotation relative to joint point. @param limitX the X axis lower rotation limit (in radians) @param limitY the Y axis lower rotation limit (in radians) @param limitZ the Z axis lower rotation limit (in radians)
[ "Sets", "the", "lower", "limits", "for", "the", "moving", "body", "rotation", "relative", "to", "joint", "point", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L105-L107
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java
UCharacter.getPropertyValueEnumNoThrow
@Deprecated public static int getPropertyValueEnumNoThrow(int property, CharSequence valueAlias) { return UPropertyAliases.INSTANCE.getPropertyValueEnumNoThrow(property, valueAlias); }
java
@Deprecated public static int getPropertyValueEnumNoThrow(int property, CharSequence valueAlias) { return UPropertyAliases.INSTANCE.getPropertyValueEnumNoThrow(property, valueAlias); }
[ "@", "Deprecated", "public", "static", "int", "getPropertyValueEnumNoThrow", "(", "int", "property", ",", "CharSequence", "valueAlias", ")", "{", "return", "UPropertyAliases", ".", "INSTANCE", ".", "getPropertyValueEnumNoThrow", "(", "property", ",", "valueAlias", ")"...
Same as {@link #getPropertyValueEnum(int, CharSequence)}, except doesn't throw exception. Instead, returns UProperty.UNDEFINED. @param property Same as {@link #getPropertyValueEnum(int, CharSequence)} @param valueAlias Same as {@link #getPropertyValueEnum(int, CharSequence)} @return returns UProperty.UNDEFINED if t...
[ "Same", "as", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java#L4232-L4235
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/SessionApi.java
SessionApi.initializeWorkspaceAsync
public com.squareup.okhttp.Call initializeWorkspaceAsync(String code, String redirectUri, String state, String authorization, final ApiCallback<ApiSuccessResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener ...
java
public com.squareup.okhttp.Call initializeWorkspaceAsync(String code, String redirectUri, String state, String authorization, final ApiCallback<ApiSuccessResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener ...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "initializeWorkspaceAsync", "(", "String", "code", ",", "String", "redirectUri", ",", "String", "state", ",", "String", "authorization", ",", "final", "ApiCallback", "<", "ApiSuccessResponse", ">", "c...
Get and register an auth token (asynchronously) Retrieve the authorization token using the authorization code. Workspace then registers the token and prepares the user&#39;s environment. @param code The authorization code. You must include this parameter for the [Authorization Code Grant flow](/reference/authentication...
[ "Get", "and", "register", "an", "auth", "token", "(", "asynchronously", ")", "Retrieve", "the", "authorization", "token", "using", "the", "authorization", "code", ".", "Workspace", "then", "registers", "the", "token", "and", "prepares", "the", "user&#39", ";", ...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/SessionApi.java#L1129-L1154
google/closure-compiler
src/com/google/javascript/jscomp/Es6TemplateLiterals.java
Es6TemplateLiterals.visitTaggedTemplateLiteral
static void visitTaggedTemplateLiteral(NodeTraversal t, Node n, boolean addTypes) { AstFactory astFactory = t.getCompiler().createAstFactory(); JSTypeRegistry registry = t.getCompiler().getTypeRegistry(); JSType stringType = createType(addTypes, registry, JSTypeNative.STRING_TYPE); JSType arrayType = cr...
java
static void visitTaggedTemplateLiteral(NodeTraversal t, Node n, boolean addTypes) { AstFactory astFactory = t.getCompiler().createAstFactory(); JSTypeRegistry registry = t.getCompiler().getTypeRegistry(); JSType stringType = createType(addTypes, registry, JSTypeNative.STRING_TYPE); JSType arrayType = cr...
[ "static", "void", "visitTaggedTemplateLiteral", "(", "NodeTraversal", "t", ",", "Node", "n", ",", "boolean", "addTypes", ")", "{", "AstFactory", "astFactory", "=", "t", ".", "getCompiler", "(", ")", ".", "createAstFactory", "(", ")", ";", "JSTypeRegistry", "re...
Converts tag`a\tb${bar}` to: // A global (module) scoped variable var $jscomp$templatelit$0 = ["a\tb"]; // cooked string array $jscomp$templatelit$0.raw = ["a\\tb"]; // raw string array ... // A call to the tagging function tag($jscomp$templatelit$0, bar); See template_literal_test.js for more examples. @param n A...
[ "Converts", "tag", "a", "\\", "tb$", "{", "bar", "}", "to", ":", "//", "A", "global", "(", "module", ")", "scoped", "variable", "var", "$jscomp$templatelit$0", "=", "[", "a", "\\", "tb", "]", ";", "//", "cooked", "string", "array", "$jscomp$templatelit$0...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6TemplateLiterals.java#L102-L168
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java
CmsAliasBulkEditHelper.validateSingleAliasRow
private void validateSingleAliasRow(CmsObject cms, CmsAliasTableRow row) { Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); if (row.getStructureId() == null) { String path = row.getResourcePath(); try { CmsResource resource = cms.readR...
java
private void validateSingleAliasRow(CmsObject cms, CmsAliasTableRow row) { Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); if (row.getStructureId() == null) { String path = row.getResourcePath(); try { CmsResource resource = cms.readR...
[ "private", "void", "validateSingleAliasRow", "(", "CmsObject", "cms", ",", "CmsAliasTableRow", "row", ")", "{", "Locale", "locale", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getWorkplaceLocale", "(", "cms", ")", ";", "if", "(", "row", ".", ...
Validates a single alias row.<p> @param cms the current CMS context @param row the row to validate
[ "Validates", "a", "single", "alias", "row", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsAliasBulkEditHelper.java#L312-L332
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildMethodsSummary
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters.get(VisibleMemberMap.Kind.METHODS); VisibleMemberMap visibleMemberMap = getVisibleMemberMap(VisibleMemberMap.Kind.METHODS); addSummary(write...
java
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters.get(VisibleMemberMap.Kind.METHODS); VisibleMemberMap visibleMemberMap = getVisibleMemberMap(VisibleMemberMap.Kind.METHODS); addSummary(write...
[ "public", "void", "buildMethodsSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", ".", "get", "(", "VisibleMemberMap", ".", "Kind", ".", "METHODS", ")", ";", "VisibleMemberMa...
Build the method summary. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "method", "summary", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java#L304-L310
jxnet/Jxnet
jxnet-core/src/main/java/com/ardikars/jxnet/PcapPktHdr.java
PcapPktHdr.newInstance
public static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec) { return new PcapPktHdr(caplen, len, tvSec, tvUsec); }
java
public static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec) { return new PcapPktHdr(caplen, len, tvSec, tvUsec); }
[ "public", "static", "PcapPktHdr", "newInstance", "(", "final", "int", "caplen", ",", "final", "int", "len", ",", "final", "int", "tvSec", ",", "final", "long", "tvUsec", ")", "{", "return", "new", "PcapPktHdr", "(", "caplen", ",", "len", ",", "tvSec", ",...
Create new PcapPktHdr instance. @param caplen capture length. @param len length. @param tvSec tv_sec. @param tvUsec tv_usec. @return returns PcapPktHdr.
[ "Create", "new", "PcapPktHdr", "instance", "." ]
train
https://github.com/jxnet/Jxnet/blob/3ef28eb83c149ff134df1841d12bcbea3d8fe163/jxnet-core/src/main/java/com/ardikars/jxnet/PcapPktHdr.java#L67-L69
alkacon/opencms-core
src/org/opencms/importexport/CmsExport.java
CmsExport.exportOrgUnit
protected void exportOrgUnit(Element parent, CmsOrganizationalUnit orgunit) throws SAXException, CmsException { Element orgunitElement = parent.addElement(CmsImportVersion10.N_ORGUNIT); getSaxWriter().writeOpen(orgunitElement); Element name = orgunitElement.addElement(CmsImportVersion10.N_NAME...
java
protected void exportOrgUnit(Element parent, CmsOrganizationalUnit orgunit) throws SAXException, CmsException { Element orgunitElement = parent.addElement(CmsImportVersion10.N_ORGUNIT); getSaxWriter().writeOpen(orgunitElement); Element name = orgunitElement.addElement(CmsImportVersion10.N_NAME...
[ "protected", "void", "exportOrgUnit", "(", "Element", "parent", ",", "CmsOrganizationalUnit", "orgunit", ")", "throws", "SAXException", ",", "CmsException", "{", "Element", "orgunitElement", "=", "parent", ".", "addElement", "(", "CmsImportVersion10", ".", "N_ORGUNIT"...
Exports one single organizational unit with all it's data.<p> @param parent the parent node to add the groups to @param orgunit the group to be exported @throws SAXException if something goes wrong processing the manifest.xml @throws CmsException if something goes wrong reading the data to export
[ "Exports", "one", "single", "organizational", "unit", "with", "all", "it", "s", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExport.java#L1021-L1061
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java
OpenShiftManagedClustersInner.getByResourceGroupAsync
public Observable<OpenShiftManagedClusterInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, OpenShiftManagedClusterInner>() { @...
java
public Observable<OpenShiftManagedClusterInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, OpenShiftManagedClusterInner>() { @...
[ "public", "Observable", "<", "OpenShiftManagedClusterInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")"...
Gets a OpenShift managed cluster. Gets the details of the managed OpenShift cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @param resourceName The name of the OpenShift managed cluster resource. @throws IllegalArgumentException thrown if parameters fail the v...
[ "Gets", "a", "OpenShift", "managed", "cluster", ".", "Gets", "the", "details", "of", "the", "managed", "OpenShift", "cluster", "with", "a", "specified", "resource", "group", "and", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java#L382-L389
bugsnag/bugsnag-java
bugsnag/src/main/java/com/bugsnag/Report.java
Report.getExceptions
@Expose protected List<Exception> getExceptions() { List<Exception> exceptions = new ArrayList<Exception>(); exceptions.add(exception); Throwable currentThrowable = exception.getThrowable().getCause(); while (currentThrowable != null) { exceptions.add(new Exception(confi...
java
@Expose protected List<Exception> getExceptions() { List<Exception> exceptions = new ArrayList<Exception>(); exceptions.add(exception); Throwable currentThrowable = exception.getThrowable().getCause(); while (currentThrowable != null) { exceptions.add(new Exception(confi...
[ "@", "Expose", "protected", "List", "<", "Exception", ">", "getExceptions", "(", ")", "{", "List", "<", "Exception", ">", "exceptions", "=", "new", "ArrayList", "<", "Exception", ">", "(", ")", ";", "exceptions", ".", "add", "(", "exception", ")", ";", ...
Get the exceptions for the report. @return the exceptions that make up the error.
[ "Get", "the", "exceptions", "for", "the", "report", "." ]
train
https://github.com/bugsnag/bugsnag-java/blob/11817d63949bcf2b2b6b765a1d37305cdec356f2/bugsnag/src/main/java/com/bugsnag/Report.java#L67-L79
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.addExplicitListItem
public int addExplicitListItem(UUID appId, String versionId, UUID entityId, AddExplicitListItemOptionalParameter addExplicitListItemOptionalParameter) { return addExplicitListItemWithServiceResponseAsync(appId, versionId, entityId, addExplicitListItemOptionalParameter).toBlocking().single().body(); }
java
public int addExplicitListItem(UUID appId, String versionId, UUID entityId, AddExplicitListItemOptionalParameter addExplicitListItemOptionalParameter) { return addExplicitListItemWithServiceResponseAsync(appId, versionId, entityId, addExplicitListItemOptionalParameter).toBlocking().single().body(); }
[ "public", "int", "addExplicitListItem", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "AddExplicitListItemOptionalParameter", "addExplicitListItemOptionalParameter", ")", "{", "return", "addExplicitListItemWithServiceResponseAsync", "(", "app...
Add a new item to the explicit list for the Pattern.Any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity extractor ID. @param addExplicitListItemOptionalParameter the object representing the optional parameters to be set before calling this API @throws Il...
[ "Add", "a", "new", "item", "to", "the", "explicit", "list", "for", "the", "Pattern", ".", "Any", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L9992-L9994
BrunoEberhard/minimal-j
src/main/java/org/minimalj/util/DateUtils.java
DateUtils.parseCH
public static String parseCH(String inputText, boolean partialAllowed) { if (StringUtils.isEmpty(inputText)) return null; String text = cutNonDigitsAtBegin(inputText); if (StringUtils.isEmpty(text)) return ""; text = cutNonDigitsAtEnd(text); if (StringUtils.isEmpty(text)) return ""; // Nun hat der String...
java
public static String parseCH(String inputText, boolean partialAllowed) { if (StringUtils.isEmpty(inputText)) return null; String text = cutNonDigitsAtBegin(inputText); if (StringUtils.isEmpty(text)) return ""; text = cutNonDigitsAtEnd(text); if (StringUtils.isEmpty(text)) return ""; // Nun hat der String...
[ "public", "static", "String", "parseCH", "(", "String", "inputText", ",", "boolean", "partialAllowed", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "inputText", ")", ")", "return", "null", ";", "String", "text", "=", "cutNonDigitsAtBegin", "(", "...
Converts a CH - Date String in a yyyy-mm-dd String. The conversion is very lenient and tries to convert as long as its somehow clear what the user may have wanted. @param inputText The input text. Maybe empty or <code>null</code>. @param partialAllowed false if the inputText has to be a complete date with month and da...
[ "Converts", "a", "CH", "-", "Date", "String", "in", "a", "yyyy", "-", "mm", "-", "dd", "String", ".", "The", "conversion", "is", "very", "lenient", "and", "tries", "to", "convert", "as", "long", "as", "its", "somehow", "clear", "what", "the", "user", ...
train
https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/DateUtils.java#L80-L94
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/file/tfile/Utils.java
Utils.writeVLong
@SuppressWarnings("fallthrough") public static void writeVLong(DataOutput out, long n) throws IOException { if ((n < 128) && (n >= -32)) { out.writeByte((int) n); return; } long un = (n < 0) ? ~n : n; // how many bytes do we need to represent the number with sign bit? int len = (Long....
java
@SuppressWarnings("fallthrough") public static void writeVLong(DataOutput out, long n) throws IOException { if ((n < 128) && (n >= -32)) { out.writeByte((int) n); return; } long un = (n < 0) ? ~n : n; // how many bytes do we need to represent the number with sign bit? int len = (Long....
[ "@", "SuppressWarnings", "(", "\"fallthrough\"", ")", "public", "static", "void", "writeVLong", "(", "DataOutput", "out", ",", "long", "n", ")", "throws", "IOException", "{", "if", "(", "(", "n", "<", "128", ")", "&&", "(", "n", ">=", "-", "32", ")", ...
Encoding a Long integer into a variable-length encoding format. <ul> <li>if n in [-32, 127): encode in one byte with the actual value. Otherwise, <li>if n in [-20*2^8, 20*2^8): encode in two bytes: byte[0] = n/256 - 52; byte[1]=n&0xff. Otherwise, <li>if n IN [-16*2^16, 16*2^16): encode in three bytes: byte[0]=n/2^16 - ...
[ "Encoding", "a", "Long", "integer", "into", "a", "variable", "-", "length", "encoding", "format", ".", "<ul", ">", "<li", ">", "if", "n", "in", "[", "-", "32", "127", ")", ":", "encode", "in", "one", "byte", "with", "the", "actual", "value", ".", "...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/file/tfile/Utils.java#L90-L154
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerFactoryImpl.java
EntityManagerFactoryImpl.createEntityManager
@Override public final EntityManager createEntityManager(Map map) { // For Application managed persistence context, type is always EXTENDED if (isOpen()) { return new EntityManagerImpl(this, map, transactionType, PersistenceContextType.EXTENDED); } thr...
java
@Override public final EntityManager createEntityManager(Map map) { // For Application managed persistence context, type is always EXTENDED if (isOpen()) { return new EntityManagerImpl(this, map, transactionType, PersistenceContextType.EXTENDED); } thr...
[ "@", "Override", "public", "final", "EntityManager", "createEntityManager", "(", "Map", "map", ")", "{", "// For Application managed persistence context, type is always EXTENDED\r", "if", "(", "isOpen", "(", ")", ")", "{", "return", "new", "EntityManagerImpl", "(", "thi...
Create a new application-managed EntityManager with the specified Map of properties. This method returns a new EntityManager instance each time it is invoked. The isOpen method will return true on the returned instance. @param map properties for entity manager @return entity manager instance @throws IllegalStateExcept...
[ "Create", "a", "new", "application", "-", "managed", "EntityManager", "with", "the", "specified", "Map", "of", "properties", ".", "This", "method", "returns", "a", "new", "EntityManager", "instance", "each", "time", "it", "is", "invoked", ".", "The", "isOpen",...
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerFactoryImpl.java#L266-L275
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/MockHttpServletRequest.java
MockHttpServletRequest.setCookie
public void setCookie(final String name, final String value) { if (name != null) { Cookie cookie = new Cookie(name, value); cookies.put(name, cookie); } }
java
public void setCookie(final String name, final String value) { if (name != null) { Cookie cookie = new Cookie(name, value); cookies.put(name, cookie); } }
[ "public", "void", "setCookie", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "if", "(", "name", "!=", "null", ")", "{", "Cookie", "cookie", "=", "new", "Cookie", "(", "name", ",", "value", ")", ";", "cookies", ".", "put",...
Sets a cookie on this request instance. @param name The cookie name. @param value The value of the cookie to set.
[ "Sets", "a", "cookie", "on", "this", "request", "instance", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/MockHttpServletRequest.java#L94-L99
primefaces/primefaces
src/main/java/org/primefaces/util/LocaleUtils.java
LocaleUtils.resolveLocale
public static Locale resolveLocale(Object locale, String clientId) { Locale result = null; if (locale != null) { if (locale instanceof String) { result = toLocale((String) locale); } else if (locale instanceof java.util.Locale) { resul...
java
public static Locale resolveLocale(Object locale, String clientId) { Locale result = null; if (locale != null) { if (locale instanceof String) { result = toLocale((String) locale); } else if (locale instanceof java.util.Locale) { resul...
[ "public", "static", "Locale", "resolveLocale", "(", "Object", "locale", ",", "String", "clientId", ")", "{", "Locale", "result", "=", "null", ";", "if", "(", "locale", "!=", "null", ")", "{", "if", "(", "locale", "instanceof", "String", ")", "{", "result...
Gets a {@link Locale} instance by the value of the component attribute "locale" which can be String or {@link Locale} or null. <p> If NULL is passed the view root default locale is used. @param locale given locale @return resolved Locale
[ "Gets", "a", "{", "@link", "Locale", "}", "instance", "by", "the", "value", "of", "the", "component", "attribute", "locale", "which", "can", "be", "String", "or", "{", "@link", "Locale", "}", "or", "null", ".", "<p", ">", "If", "NULL", "is", "passed", ...
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/LocaleUtils.java#L86-L106
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/cluster/Cluster.java
Cluster.get_topology_id
public static String get_topology_id(StormClusterState zkCluster, String storm_name) throws Exception { List<String> active_storms = zkCluster.active_storms(); String rtn = null; if (active_storms != null) { for (String topology_id : active_storms) { if (!topology_id...
java
public static String get_topology_id(StormClusterState zkCluster, String storm_name) throws Exception { List<String> active_storms = zkCluster.active_storms(); String rtn = null; if (active_storms != null) { for (String topology_id : active_storms) { if (!topology_id...
[ "public", "static", "String", "get_topology_id", "(", "StormClusterState", "zkCluster", ",", "String", "storm_name", ")", "throws", "Exception", "{", "List", "<", "String", ">", "active_storms", "=", "zkCluster", ".", "active_storms", "(", ")", ";", "String", "r...
if a topology's name is equal to the input storm_name, then return the topology id, otherwise return null
[ "if", "a", "topology", "s", "name", "is", "equal", "to", "the", "input", "storm_name", "then", "return", "the", "topology", "id", "otherwise", "return", "null" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/cluster/Cluster.java#L224-L241
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java
CodeBuilderUtil.blankValue
public static void blankValue(CodeBuilder b, TypeDesc type) { switch (type.getTypeCode()) { default: b.loadNull(); break; case TypeDesc.BYTE_CODE: case TypeDesc.CHAR_CODE: case TypeDesc.SHORT_CODE: case TypeDesc.INT_CODE: b.l...
java
public static void blankValue(CodeBuilder b, TypeDesc type) { switch (type.getTypeCode()) { default: b.loadNull(); break; case TypeDesc.BYTE_CODE: case TypeDesc.CHAR_CODE: case TypeDesc.SHORT_CODE: case TypeDesc.INT_CODE: b.l...
[ "public", "static", "void", "blankValue", "(", "CodeBuilder", "b", ",", "TypeDesc", "type", ")", "{", "switch", "(", "type", ".", "getTypeCode", "(", ")", ")", "{", "default", ":", "b", ".", "loadNull", "(", ")", ";", "break", ";", "case", "TypeDesc", ...
Generates code to push a blank value to the stack. For objects, it is null, and for primitive types it is zero or false.
[ "Generates", "code", "to", "push", "a", "blank", "value", "to", "the", "stack", ".", "For", "objects", "it", "is", "null", "and", "for", "primitive", "types", "it", "is", "zero", "or", "false", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L756-L786
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java
DelaunayData.addGeometry
private void addGeometry(Geometry geom) throws IllegalArgumentException { if(!geom.isValid()) { throw new IllegalArgumentException("Provided geometry is not valid !"); } if(geom instanceof GeometryCollection) { Map<TriangulationPoint, Integer> pts = new HashMap<Triangulat...
java
private void addGeometry(Geometry geom) throws IllegalArgumentException { if(!geom.isValid()) { throw new IllegalArgumentException("Provided geometry is not valid !"); } if(geom instanceof GeometryCollection) { Map<TriangulationPoint, Integer> pts = new HashMap<Triangulat...
[ "private", "void", "addGeometry", "(", "Geometry", "geom", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "geom", ".", "isValid", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Provided geometry is not valid !\"", ")", ";"...
Add a geometry to the list of points and edges used by the triangulation. @param geom Any geometry @throws IllegalArgumentException
[ "Add", "a", "geometry", "to", "the", "list", "of", "points", "and", "edges", "used", "by", "the", "triangulation", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/mesh/DelaunayData.java#L288-L315
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinControllerSupport.java
WeixinControllerSupport.process
@RequestMapping(method = RequestMethod.POST) protected final void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (isLegal(request)) { String result = processRequest(request); //设置正确的 content-type 以防止中文乱码 respons...
java
@RequestMapping(method = RequestMethod.POST) protected final void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (isLegal(request)) { String result = processRequest(request); //设置正确的 content-type 以防止中文乱码 respons...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "POST", ")", "protected", "final", "void", "process", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "if", "...
微信消息交互处理 @param request http 请求对象 @param response http 响应对象 @throws ServletException 异常 @throws IOException IO异常
[ "微信消息交互处理" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinControllerSupport.java#L49-L59
scireum/server-sass
src/main/java/org/serversass/Functions.java
Functions.lighten
public static Expression lighten(Generator generator, FunctionCall input) { Color color = input.getExpectedColorParam(0); int increase = input.getExpectedIntParam(1); return changeLighteness(color, increase); }
java
public static Expression lighten(Generator generator, FunctionCall input) { Color color = input.getExpectedColorParam(0); int increase = input.getExpectedIntParam(1); return changeLighteness(color, increase); }
[ "public", "static", "Expression", "lighten", "(", "Generator", "generator", ",", "FunctionCall", "input", ")", "{", "Color", "color", "=", "input", ".", "getExpectedColorParam", "(", "0", ")", ";", "int", "increase", "=", "input", ".", "getExpectedIntParam", "...
Increases the lightness of the given color by N percent. @param generator the surrounding generator @param input the function call to evaluate @return the result of the evaluation
[ "Increases", "the", "lightness", "of", "the", "given", "color", "by", "N", "percent", "." ]
train
https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/Functions.java#L93-L97
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Transform.java
Transform.setParameter
public void setParameter(String name, Object value) { parameters.put(name, value); transformation.addParameter(name, value); }
java
public void setParameter(String name, Object value) { parameters.put(name, value); transformation.addParameter(name, value); }
[ "public", "void", "setParameter", "(", "String", "name", ",", "Object", "value", ")", "{", "parameters", ".", "put", "(", "name", ",", "value", ")", ";", "transformation", ".", "addParameter", "(", "name", ",", "value", ")", ";", "}" ]
Add a parameter for the transformation @param name @param value @see Transformer#setParameter(java.lang.String, java.lang.Object)
[ "Add", "a", "parameter", "for", "the", "transformation" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Transform.java#L257-L260
jboss/jboss-servlet-api_spec
src/main/java/javax/servlet/http/HttpServletResponseWrapper.java
HttpServletResponseWrapper.setStatus
@Deprecated @Override public void setStatus(int sc, String sm) { this._getHttpServletResponse().setStatus(sc, sm); }
java
@Deprecated @Override public void setStatus(int sc, String sm) { this._getHttpServletResponse().setStatus(sc, sm); }
[ "@", "Deprecated", "@", "Override", "public", "void", "setStatus", "(", "int", "sc", ",", "String", "sm", ")", "{", "this", ".", "_getHttpServletResponse", "(", ")", ".", "setStatus", "(", "sc", ",", "sm", ")", ";", "}" ]
The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object. @deprecated As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use {@link #setStatus(int)}, to send an error with a description use {@link #sendError(int, String)}
[ "The", "default", "behavior", "of", "this", "method", "is", "to", "call", "setStatus", "(", "int", "sc", "String", "sm", ")", "on", "the", "wrapped", "response", "object", "." ]
train
https://github.com/jboss/jboss-servlet-api_spec/blob/5bc96f2b833c072baff6eb8ae49bc7b5e503e9b2/src/main/java/javax/servlet/http/HttpServletResponseWrapper.java#L257-L261
motown-io/motown
ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java
OcppJsonService.changeConfiguration
public void changeConfiguration(ChargingStationId chargingStationId, ConfigurationItem configurationItem, CorrelationToken correlationToken) { Changeconfiguration changeConfigurationRequest = new Changeconfiguration(); changeConfigurationRequest.setKey(configurationItem.getKey()); changeConfigur...
java
public void changeConfiguration(ChargingStationId chargingStationId, ConfigurationItem configurationItem, CorrelationToken correlationToken) { Changeconfiguration changeConfigurationRequest = new Changeconfiguration(); changeConfigurationRequest.setKey(configurationItem.getKey()); changeConfigur...
[ "public", "void", "changeConfiguration", "(", "ChargingStationId", "chargingStationId", ",", "ConfigurationItem", "configurationItem", ",", "CorrelationToken", "correlationToken", ")", "{", "Changeconfiguration", "changeConfigurationRequest", "=", "new", "Changeconfiguration", ...
Send a request to a charging station to change a configuration item. @param chargingStationId the charging station's id. @param configurationItem the configuration item to change. @param correlationToken the token to correlate commands and events that belong together.
[ "Send", "a", "request", "to", "a", "charging", "station", "to", "change", "a", "configuration", "item", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java#L111-L120
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.unexpectedAttribute
public static XMLStreamException unexpectedAttribute(final XMLExtendedStreamReader reader, final int index) { final XMLStreamException ex = ControllerLogger.ROOT_LOGGER.unexpectedAttribute(reader.getAttributeName(index), reader.getLocation()); return new XMLStreamValidationException(ex.getMessage(), ...
java
public static XMLStreamException unexpectedAttribute(final XMLExtendedStreamReader reader, final int index) { final XMLStreamException ex = ControllerLogger.ROOT_LOGGER.unexpectedAttribute(reader.getAttributeName(index), reader.getLocation()); return new XMLStreamValidationException(ex.getMessage(), ...
[ "public", "static", "XMLStreamException", "unexpectedAttribute", "(", "final", "XMLExtendedStreamReader", "reader", ",", "final", "int", "index", ")", "{", "final", "XMLStreamException", "ex", "=", "ControllerLogger", ".", "ROOT_LOGGER", ".", "unexpectedAttribute", "(",...
Get an exception reporting an unexpected XML attribute. @param reader the stream reader @param index the attribute index @return the exception
[ "Get", "an", "exception", "reporting", "an", "unexpected", "XML", "attribute", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L134-L142
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/DatabaseRepresentation.java
DatabaseRepresentation.deleteResource
public void deleteResource(final String resourceName) throws WebApplicationException { synchronized (resourceName) { try { mDatabase.truncateResource(new SessionConfiguration(resourceName, null)); } catch (TTException e) { throw new WebApplicationException...
java
public void deleteResource(final String resourceName) throws WebApplicationException { synchronized (resourceName) { try { mDatabase.truncateResource(new SessionConfiguration(resourceName, null)); } catch (TTException e) { throw new WebApplicationException...
[ "public", "void", "deleteResource", "(", "final", "String", "resourceName", ")", "throws", "WebApplicationException", "{", "synchronized", "(", "resourceName", ")", "{", "try", "{", "mDatabase", ".", "truncateResource", "(", "new", "SessionConfiguration", "(", "reso...
This method is responsible to delete an existing database. @param resourceName The name of the database. @throws WebApplicationException The exception occurred.
[ "This", "method", "is", "responsible", "to", "delete", "an", "existing", "database", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/DatabaseRepresentation.java#L276-L284
Netflix/Hystrix
hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java
AopUtils.getDeclaredMethod
public static Method getDeclaredMethod(Class<?> type, String methodName, Class<?>... parameterTypes) { Method method = null; try { method = type.getDeclaredMethod(methodName, parameterTypes); if(method.isBridge()){ method = MethodProvider.getInstance().unbride(met...
java
public static Method getDeclaredMethod(Class<?> type, String methodName, Class<?>... parameterTypes) { Method method = null; try { method = type.getDeclaredMethod(methodName, parameterTypes); if(method.isBridge()){ method = MethodProvider.getInstance().unbride(met...
[ "public", "static", "Method", "getDeclaredMethod", "(", "Class", "<", "?", ">", "type", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "Method", "method", "=", "null", ";", "try", "{", "method", "=", "type", ...
Gets declared method from specified type by mame and parameters types. @param type the type @param methodName the name of the method @param parameterTypes the parameter array @return a {@link Method} object or null if method doesn't exist
[ "Gets", "declared", "method", "from", "specified", "type", "by", "mame", "and", "parameters", "types", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java#L89-L107
haraldk/TwelveMonkeys
imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/ImageReaderBase.java
ImageReaderBase.fakeSubsampling
protected static Image fakeSubsampling(Image pImage, ImageReadParam pParam) { return IIOUtil.fakeSubsampling(pImage, pParam); }
java
protected static Image fakeSubsampling(Image pImage, ImageReadParam pParam) { return IIOUtil.fakeSubsampling(pImage, pParam); }
[ "protected", "static", "Image", "fakeSubsampling", "(", "Image", "pImage", ",", "ImageReadParam", "pParam", ")", "{", "return", "IIOUtil", ".", "fakeSubsampling", "(", "pImage", ",", "pParam", ")", ";", "}" ]
Utility method for getting the subsampled image. The subsampling is defined by the {@link javax.imageio.IIOParam#setSourceSubsampling(int, int, int, int)} method. <p/> NOTE: This method does not take the subsampling offsets into consideration. <p/> Note: If it is possible for the reader to subsample directly, such a me...
[ "Utility", "method", "for", "getting", "the", "subsampled", "image", ".", "The", "subsampling", "is", "defined", "by", "the", "{", "@link", "javax", ".", "imageio", ".", "IIOParam#setSourceSubsampling", "(", "int", "int", "int", "int", ")", "}", "method", "....
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/ImageReaderBase.java#L359-L361
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/util/TimeIntervalFormatUtil.java
TimeIntervalFormatUtil.checkValidInterval
public static boolean checkValidInterval(int interval, TimeUnit unit) { if (0 >= interval || INTERVAL_MAX < interval) { return false; } switch (unit) { case HOURS: break; case MINUTES: break; case SECON...
java
public static boolean checkValidInterval(int interval, TimeUnit unit) { if (0 >= interval || INTERVAL_MAX < interval) { return false; } switch (unit) { case HOURS: break; case MINUTES: break; case SECON...
[ "public", "static", "boolean", "checkValidInterval", "(", "int", "interval", ",", "TimeUnit", "unit", ")", "{", "if", "(", "0", ">=", "interval", "||", "INTERVAL_MAX", "<", "interval", ")", "{", "return", "false", ";", "}", "switch", "(", "unit", ")", "{...
切替インターバルの値が閾値内に収まっているかの確認を行う。<br> <br> 切替インターバル {@literal 1<= interval <= 100} <br> 切替単位 MillSecond、Second、Minute、Hourのいずれか<br> @param interval 切替インターバル @param unit 切替単位 @return 切替インターバルの値が閾値内に収まっているか
[ "切替インターバルの値が閾値内に収まっているかの確認を行う。<br", ">", "<br", ">", "切替インターバル", "{", "@literal", "1<", "=", "interval", "<", "=", "100", "}", "<br", ">", "切替単位", "MillSecond、Second、Minute、Hourのいずれか<br", ">" ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/util/TimeIntervalFormatUtil.java#L47-L69
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java
EnumHelper.getFromIDCaseInsensitiveOrNull
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasID <String>> ENUMTYPE getFromIDCaseInsensitiveOrNull (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sID) { return getFrom...
java
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasID <String>> ENUMTYPE getFromIDCaseInsensitiveOrNull (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sID) { return getFrom...
[ "@", "Nullable", "public", "static", "<", "ENUMTYPE", "extends", "Enum", "<", "ENUMTYPE", ">", "&", "IHasID", "<", "String", ">", ">", "ENUMTYPE", "getFromIDCaseInsensitiveOrNull", "(", "@", "Nonnull", "final", "Class", "<", "ENUMTYPE", ">", "aClass", ",", "...
Get the enum value with the passed string ID case insensitive @param <ENUMTYPE> The enum type @param aClass The enum class @param sID The ID to search @return <code>null</code> if no enum item with the given ID is present.
[ "Get", "the", "enum", "value", "with", "the", "passed", "string", "ID", "case", "insensitive" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java#L172-L177
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.fetchByC_K
@Override public CPOptionValue fetchByC_K(long CPOptionId, String key) { return fetchByC_K(CPOptionId, key, true); }
java
@Override public CPOptionValue fetchByC_K(long CPOptionId, String key) { return fetchByC_K(CPOptionId, key, true); }
[ "@", "Override", "public", "CPOptionValue", "fetchByC_K", "(", "long", "CPOptionId", ",", "String", "key", ")", "{", "return", "fetchByC_K", "(", "CPOptionId", ",", "key", ",", "true", ")", ";", "}" ]
Returns the cp option value where CPOptionId = &#63; and key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPOptionId the cp option ID @param key the key @return the matching cp option value, or <code>null</code> if a matching cp option value could not be found
[ "Returns", "the", "cp", "option", "value", "where", "CPOptionId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "ca...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L3060-L3063
datoin/http-requests
src/main/java/org/datoin/net/http/Request.java
Request.setContent
public Request setContent(String text, ContentType contentType) { entity = new StringEntity(text, contentType); return this; }
java
public Request setContent(String text, ContentType contentType) { entity = new StringEntity(text, contentType); return this; }
[ "public", "Request", "setContent", "(", "String", "text", ",", "ContentType", "contentType", ")", "{", "entity", "=", "new", "StringEntity", "(", "text", ",", "contentType", ")", ";", "return", "this", ";", "}" ]
set request content from input text string with given content type @param text : text to be sent as http content @param contentType : type of content set in header @return : Request Object with content type header and conetnt entity value set
[ "set", "request", "content", "from", "input", "text", "string", "with", "given", "content", "type" ]
train
https://github.com/datoin/http-requests/blob/660a4bc516c594f321019df94451fead4dea19b6/src/main/java/org/datoin/net/http/Request.java#L400-L403
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/adapter/ViewPagerAdapter.java
ViewPagerAdapter.addItem
public final void addItem(@Nullable final CharSequence title, @NonNull final Class<? extends Fragment> fragmentClass, @Nullable final Bundle arguments) { Condition.INSTANCE.ensureNotNull(fragmentClass, "The fragment class may not be null"); ite...
java
public final void addItem(@Nullable final CharSequence title, @NonNull final Class<? extends Fragment> fragmentClass, @Nullable final Bundle arguments) { Condition.INSTANCE.ensureNotNull(fragmentClass, "The fragment class may not be null"); ite...
[ "public", "final", "void", "addItem", "(", "@", "Nullable", "final", "CharSequence", "title", ",", "@", "NonNull", "final", "Class", "<", "?", "extends", "Fragment", ">", "fragmentClass", ",", "@", "Nullable", "final", "Bundle", "arguments", ")", "{", "Condi...
Adds a new fragment to the adapter. @param title The title of the fragment, which should be added, as an instance of the type {@link CharSequence} or null, if no title should be set @param fragmentClass The class of the fragment, which should be added, as an instance of the class {@link Class}. The class may not be nu...
[ "Adds", "a", "new", "fragment", "to", "the", "adapter", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/ViewPagerAdapter.java#L84-L90
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/math.java
math.getRandomDouble
public static double getRandomDouble(double min, double max) { Random r = new Random(); return min + (max - min) * r.nextDouble(); }
java
public static double getRandomDouble(double min, double max) { Random r = new Random(); return min + (max - min) * r.nextDouble(); }
[ "public", "static", "double", "getRandomDouble", "(", "double", "min", ",", "double", "max", ")", "{", "Random", "r", "=", "new", "Random", "(", ")", ";", "return", "min", "+", "(", "max", "-", "min", ")", "*", "r", ".", "nextDouble", "(", ")", ";"...
Returns a random double between MIN inclusive and MAX inclusive. @param min value inclusive @param max value inclusive @return an int between 0 inclusive and MAX exclusive.
[ "Returns", "a", "random", "double", "between", "MIN", "inclusive", "and", "MAX", "inclusive", "." ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/math.java#L125-L128
grails/grails-core
grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java
GroovyPagesUriSupport.getDeployedViewURI
public String getDeployedViewURI(String controllerName, String viewName) { FastStringWriter buf = new FastStringWriter(PATH_TO_VIEWS); return getViewURIInternal(controllerName, viewName, buf, true); }
java
public String getDeployedViewURI(String controllerName, String viewName) { FastStringWriter buf = new FastStringWriter(PATH_TO_VIEWS); return getViewURIInternal(controllerName, viewName, buf, true); }
[ "public", "String", "getDeployedViewURI", "(", "String", "controllerName", ",", "String", "viewName", ")", "{", "FastStringWriter", "buf", "=", "new", "FastStringWriter", "(", "PATH_TO_VIEWS", ")", ";", "return", "getViewURIInternal", "(", "controllerName", ",", "vi...
Obtains a view URI when deployed within the /WEB-INF/grails-app/views context @param controllerName The name of the controller @param viewName The name of the view @return The view URI
[ "Obtains", "a", "view", "URI", "when", "deployed", "within", "the", "/", "WEB", "-", "INF", "/", "grails", "-", "app", "/", "views", "context" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java#L221-L224
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java
BitConverter.setState
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { int iFieldValue = (int)this.getValue(); if (!m_bTrueIfMatch) bState = !bState; // Do opposite operation if (bState) iFieldValue |= (1 << m_iBitNumber); // Set the bit else ...
java
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { int iFieldValue = (int)this.getValue(); if (!m_bTrueIfMatch) bState = !bState; // Do opposite operation if (bState) iFieldValue |= (1 << m_iBitNumber); // Set the bit else ...
[ "public", "int", "setState", "(", "boolean", "bState", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "int", "iFieldValue", "=", "(", "int", ")", "this", ".", "getValue", "(", ")", ";", "if", "(", "!", "m_bTrueIfMatch", ")", "bState...
For binary fields, set the current state. Sets the target bit to the state. @param state The state to set this field. @param bDisplayOption Display changed fields if true. @param iMoveMode The move mode. @return The error code (or NORMAL_RETURN).
[ "For", "binary", "fields", "set", "the", "current", "state", ".", "Sets", "the", "target", "bit", "to", "the", "state", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/BitConverter.java#L122-L132
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java
Parse.setChild
public void setChild(final int index, final String label) { final Parse newChild = (Parse) this.parts.get(index).clone(); newChild.setLabel(label); this.parts.set(index, newChild); }
java
public void setChild(final int index, final String label) { final Parse newChild = (Parse) this.parts.get(index).clone(); newChild.setLabel(label); this.parts.set(index, newChild); }
[ "public", "void", "setChild", "(", "final", "int", "index", ",", "final", "String", "label", ")", "{", "final", "Parse", "newChild", "=", "(", "Parse", ")", "this", ".", "parts", ".", "get", "(", "index", ")", ".", "clone", "(", ")", ";", "newChild",...
Replaces the child at the specified index with a new child with the specified label. @param index The index of the child to be replaced. @param label The label to be assigned to the new child.
[ "Replaces", "the", "child", "at", "the", "specified", "index", "with", "a", "new", "child", "with", "the", "specified", "label", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L542-L546
Impetus/Kundera
src/kundera-rethinkdb/src/main/java/com/impetus/client/rethink/RethinkDBClient.java
RethinkDBClient.iterateAndPopulateRmap
private MapObject iterateAndPopulateRmap(Object entity, MetamodelImpl metaModel, Iterator<Attribute> iterator) { MapObject map = r.hashMap(); while (iterator.hasNext()) { Attribute attribute = iterator.next(); Field field = (Field) attribute.getJavaMember(); ...
java
private MapObject iterateAndPopulateRmap(Object entity, MetamodelImpl metaModel, Iterator<Attribute> iterator) { MapObject map = r.hashMap(); while (iterator.hasNext()) { Attribute attribute = iterator.next(); Field field = (Field) attribute.getJavaMember(); ...
[ "private", "MapObject", "iterateAndPopulateRmap", "(", "Object", "entity", ",", "MetamodelImpl", "metaModel", ",", "Iterator", "<", "Attribute", ">", "iterator", ")", "{", "MapObject", "map", "=", "r", ".", "hashMap", "(", ")", ";", "while", "(", "iterator", ...
Iterate and populate rmap. @param entity the entity @param metaModel the meta model @param iterator the iterator @return the map object
[ "Iterate", "and", "populate", "rmap", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rethinkdb/src/main/java/com/impetus/client/rethink/RethinkDBClient.java#L347-L365
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.putVarLong
public static void putVarLong(long v, ByteBuffer sink) { while (true) { int bits = ((int) v) & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
java
public static void putVarLong(long v, ByteBuffer sink) { while (true) { int bits = ((int) v) & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
[ "public", "static", "void", "putVarLong", "(", "long", "v", ",", "ByteBuffer", "sink", ")", "{", "while", "(", "true", ")", "{", "int", "bits", "=", "(", "(", "int", ")", "v", ")", "&", "0x7f", ";", "v", ">>>=", "7", ";", "if", "(", "v", "==", ...
Encodes a long integer in a variable-length encoding, 7 bits per byte, to a ByteBuffer sink. @param v the value to encode @param sink the ByteBuffer to add the encoded value
[ "Encodes", "a", "long", "integer", "in", "a", "variable", "-", "length", "encoding", "7", "bits", "per", "byte", "to", "a", "ByteBuffer", "sink", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L272-L282
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/AbstractByteBean.java
AbstractByteBean.setField
protected void setField(final Field field, final IFile pData, final Object pValue) { if (field != null) { try { field.set(pData, pValue); } catch (IllegalArgumentException e) { LOGGER.error("Parameters of fied.set are not valid", e); } catch (IllegalAccessException e) { LOGGER.error("Impossible t...
java
protected void setField(final Field field, final IFile pData, final Object pValue) { if (field != null) { try { field.set(pData, pValue); } catch (IllegalArgumentException e) { LOGGER.error("Parameters of fied.set are not valid", e); } catch (IllegalAccessException e) { LOGGER.error("Impossible t...
[ "protected", "void", "setField", "(", "final", "Field", "field", ",", "final", "IFile", "pData", ",", "final", "Object", "pValue", ")", "{", "if", "(", "field", "!=", "null", ")", "{", "try", "{", "field", ".", "set", "(", "pData", ",", "pValue", ")"...
Method used to set the value of a field @param field the field to set @param pData Object containing the field @param pValue the value of the field
[ "Method", "used", "to", "set", "the", "value", "of", "a", "field" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/AbstractByteBean.java#L113-L123
nakamura5akihito/six-util
src/main/java/jp/go/aist/six/util/search/RelationalBinding.java
RelationalBinding.equalBinding
public static RelationalBinding equalBinding( final String property, final Object value ) { return (new RelationalBinding( property, Relation.EQUAL, value )); }
java
public static RelationalBinding equalBinding( final String property, final Object value ) { return (new RelationalBinding( property, Relation.EQUAL, value )); }
[ "public", "static", "RelationalBinding", "equalBinding", "(", "final", "String", "property", ",", "final", "Object", "value", ")", "{", "return", "(", "new", "RelationalBinding", "(", "property", ",", "Relation", ".", "EQUAL", ",", "value", ")", ")", ";", "}...
Creates an 'EQUAL' binding. @param property the property. @param value the value to which the property should be related. @return an 'EQUAL' binding.
[ "Creates", "an", "EQUAL", "binding", "." ]
train
https://github.com/nakamura5akihito/six-util/blob/a6db388a345e220cea2b1fa6324d15c80c6278b6/src/main/java/jp/go/aist/six/util/search/RelationalBinding.java#L50-L56
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
PubSubManager.getNode
public Node getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAPubSubNodeException { Node node = nodeMap.get(id); if (node == null) { DiscoverInfo info = new DiscoverInfo(); info.setTo(pubSubService); i...
java
public Node getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAPubSubNodeException { Node node = nodeMap.get(id); if (node == null) { DiscoverInfo info = new DiscoverInfo(); info.setTo(pubSubService); i...
[ "public", "Node", "getNode", "(", "String", "id", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", ",", "NotAPubSubNodeException", "{", "Node", "node", "=", "nodeMap", ".", "get", "(", "id", ...
Retrieves the requested node, if it exists. It will throw an exception if it does not. @param id - The unique id of the node @return the node @throws XMPPErrorException The node does not exist @throws NoResponseException if there was no response from the server. @throws NotConnectedException @throws InterruptedExcep...
[ "Retrieves", "the", "requested", "node", "if", "it", "exists", ".", "It", "will", "throw", "an", "exception", "if", "it", "does", "not", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java#L270-L292
jayantk/jklol
src/com/jayantkrish/jklol/ccg/lexinduct/vote/VotingLexiconInduction.java
VotingLexiconInduction.createParser
private static ParserInfo createParser(LexiconInductionCcgParserFactory factory, SufficientStatistics currentParameters, Collection<LexiconEntry> currentLexicon) { ParametricCcgParser family = factory.getParametricCcgParser(currentLexicon); SufficientStatistics newParameters = family.getNewSufficientStati...
java
private static ParserInfo createParser(LexiconInductionCcgParserFactory factory, SufficientStatistics currentParameters, Collection<LexiconEntry> currentLexicon) { ParametricCcgParser family = factory.getParametricCcgParser(currentLexicon); SufficientStatistics newParameters = family.getNewSufficientStati...
[ "private", "static", "ParserInfo", "createParser", "(", "LexiconInductionCcgParserFactory", "factory", ",", "SufficientStatistics", "currentParameters", ",", "Collection", "<", "LexiconEntry", ">", "currentLexicon", ")", "{", "ParametricCcgParser", "family", "=", "factory",...
Creates a CCG parser given parameters and a lexicon. @param factory @param currentParameters @param currentLexicon @return
[ "Creates", "a", "CCG", "parser", "given", "parameters", "and", "a", "lexicon", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/lexinduct/vote/VotingLexiconInduction.java#L179-L189
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.setSharedKey
public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body(); }
java
public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body(); }
[ "public", "ConnectionSharedKeyInner", "setSharedKey", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "ConnectionSharedKeyInner", "parameters", ")", "{", "return", "setSharedKeyWithServiceResponseAsync", "(", "resourceGroupName", ","...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnect...
[ "The", "Put", "VirtualNetworkGatewayConnectionSharedKey", "operation", "sets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L856-L858
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java
ElementPlugin.unregisterListener
public void unregisterListener(IPluginEventListener listener) { if (pluginEventListeners2 != null && pluginEventListeners2.contains(listener)) { pluginEventListeners2.remove(listener); listener.onPluginEvent(new PluginEvent(this, PluginAction.UNSUBSCRIBE)); } }
java
public void unregisterListener(IPluginEventListener listener) { if (pluginEventListeners2 != null && pluginEventListeners2.contains(listener)) { pluginEventListeners2.remove(listener); listener.onPluginEvent(new PluginEvent(this, PluginAction.UNSUBSCRIBE)); } }
[ "public", "void", "unregisterListener", "(", "IPluginEventListener", "listener", ")", "{", "if", "(", "pluginEventListeners2", "!=", "null", "&&", "pluginEventListeners2", ".", "contains", "(", "listener", ")", ")", "{", "pluginEventListeners2", ".", "remove", "(", ...
Unregisters a listener for the IPluginEvent callback event. @param listener Listener to be unregistered.
[ "Unregisters", "a", "listener", "for", "the", "IPluginEvent", "callback", "event", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java#L690-L695
linkedin/PalDB
paldb/src/main/java/com/linkedin/paldb/api/Configuration.java
Configuration.getList
public List<String> getList(String key) { if (!containsKey(key)) { throw new IllegalArgumentException("Missing key " + key + "."); } return getList(key, null); }
java
public List<String> getList(String key) { if (!containsKey(key)) { throw new IllegalArgumentException("Missing key " + key + "."); } return getList(key, null); }
[ "public", "List", "<", "String", ">", "getList", "(", "String", "key", ")", "{", "if", "(", "!", "containsKey", "(", "key", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Missing key \"", "+", "key", "+", "\".\"", ")", ";", "}", "re...
Gets the string list value <code>key</code>. @param key key to get value for @throws java.lang.IllegalArgumentException if the key is not found @return value
[ "Gets", "the", "string", "list", "value", "<code", ">", "key<", "/", "code", ">", "." ]
train
https://github.com/linkedin/PalDB/blob/d05ccdd3f67855eb2675dbd82599f19aa7a9f650/paldb/src/main/java/com/linkedin/paldb/api/Configuration.java#L365-L370
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/FeatureResolverImpl.java
FeatureResolverImpl.resolveFeatures
@Override public Result resolveFeatures(Repository repository, Collection<ProvisioningFeatureDefinition> kernelFeatures, Collection<String> rootFeatures, Set<String> preResolved, boolean allowMultipleVersions, EnumSet<ProcessType> supportedProcessT...
java
@Override public Result resolveFeatures(Repository repository, Collection<ProvisioningFeatureDefinition> kernelFeatures, Collection<String> rootFeatures, Set<String> preResolved, boolean allowMultipleVersions, EnumSet<ProcessType> supportedProcessT...
[ "@", "Override", "public", "Result", "resolveFeatures", "(", "Repository", "repository", ",", "Collection", "<", "ProvisioningFeatureDefinition", ">", "kernelFeatures", ",", "Collection", "<", "String", ">", "rootFeatures", ",", "Set", "<", "String", ">", "preResolv...
/* (non-Javadoc) @see com.ibm.ws.kernel.feature.resolver.FeatureResolver#resolveFeatures(com.ibm.ws.kernel.feature.resolver.FeatureResolver.Repository, java.util.Collection, java.util.Collection, java.util.Set, boolean, java.util.EnumSet) Here are the steps this uses to resolve: 1) Primes the selected features with th...
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/FeatureResolverImpl.java#L124-L166
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResult.java
UpdateIntegrationResult.withRequestParameters
public UpdateIntegrationResult withRequestParameters(java.util.Map<String, String> requestParameters) { setRequestParameters(requestParameters); return this; }
java
public UpdateIntegrationResult withRequestParameters(java.util.Map<String, String> requestParameters) { setRequestParameters(requestParameters); return this; }
[ "public", "UpdateIntegrationResult", "withRequestParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestParameters", ")", "{", "setRequestParameters", "(", "requestParameters", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. T...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "request", "parameters", "that", "are", "passed", "from", "the", "method", "request", "to", "the", "backend", ".", "The", "key", "is", "an", "integration", "request", "parameter", "name", "and", "th...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResult.java#L1146-L1149
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailArchiver.java
MailArchiver.archiveMessage
public File archiveMessage(final MailMessage message) { try { String subject = message.getSubject(); String fileName = subject == null ? "no_subject" : INVALID_FILE_NAME_CHARS.matcher(subject).replaceAll("_"); MutableInt counter = counterProvider.get(); File dir = new File("e-mails", "unread");...
java
public File archiveMessage(final MailMessage message) { try { String subject = message.getSubject(); String fileName = subject == null ? "no_subject" : INVALID_FILE_NAME_CHARS.matcher(subject).replaceAll("_"); MutableInt counter = counterProvider.get(); File dir = new File("e-mails", "unread");...
[ "public", "File", "archiveMessage", "(", "final", "MailMessage", "message", ")", "{", "try", "{", "String", "subject", "=", "message", ".", "getSubject", "(", ")", ";", "String", "fileName", "=", "subject", "==", "null", "?", "\"no_subject\"", ":", "INVALID_...
Saves a message's test content (including headers) in the current module archive in the specified sub-directory relative to the archive root. File names are prefixed with a left-padded four-digit integer counter (format: {@code %04d_%s.txt}). @param message the message @return the file the e-mail was written to
[ "Saves", "a", "message", "s", "test", "content", "(", "including", "headers", ")", "in", "the", "current", "module", "archive", "in", "the", "specified", "sub", "-", "directory", "relative", "to", "the", "archive", "root", ".", "File", "names", "are", "pre...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailArchiver.java#L69-L97
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.promptEquals
public void promptEquals(double seconds, String expectedPromptText) { try { double timeTook = popup(seconds); timeTook = popupEquals(seconds - timeTook, expectedPromptText); checkPromptEquals(expectedPromptText, seconds, timeTook); } catch (TimeoutException e) { ...
java
public void promptEquals(double seconds, String expectedPromptText) { try { double timeTook = popup(seconds); timeTook = popupEquals(seconds - timeTook, expectedPromptText); checkPromptEquals(expectedPromptText, seconds, timeTook); } catch (TimeoutException e) { ...
[ "public", "void", "promptEquals", "(", "double", "seconds", ",", "String", "expectedPromptText", ")", "{", "try", "{", "double", "timeTook", "=", "popup", "(", "seconds", ")", ";", "timeTook", "=", "popupEquals", "(", "seconds", "-", "timeTook", ",", "expect...
Waits up to the provided wait time for a prompt present on the page has content equal to the expected text. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param expectedPromptText the expected text of the prompt @param seconds the number of sec...
[ "Waits", "up", "to", "the", "provided", "wait", "time", "for", "a", "prompt", "present", "on", "the", "page", "has", "content", "equal", "to", "the", "expected", "text", ".", "This", "information", "will", "be", "logged", "and", "recorded", "with", "a", ...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L628-L636
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java
HttpSupport.sendFile
protected HttpBuilder sendFile(File file, boolean delete) throws FileNotFoundException { try{ FileResponse resp = new FileResponse(file, delete); RequestContext.setControllerResponse(resp); HttpBuilder builder = new HttpBuilder(resp); builder.header("Content-Dispo...
java
protected HttpBuilder sendFile(File file, boolean delete) throws FileNotFoundException { try{ FileResponse resp = new FileResponse(file, delete); RequestContext.setControllerResponse(resp); HttpBuilder builder = new HttpBuilder(resp); builder.header("Content-Dispo...
[ "protected", "HttpBuilder", "sendFile", "(", "File", "file", ",", "boolean", "delete", ")", "throws", "FileNotFoundException", "{", "try", "{", "FileResponse", "resp", "=", "new", "FileResponse", "(", "file", ",", "delete", ")", ";", "RequestContext", ".", "se...
Convenience method for downloading files. This method will force the browser to find a handler(external program) for this file (content type) and will provide a name of file to the browser. This method sets an HTTP header "Content-Disposition" based on a file name. @param file file to download. @param delete true to ...
[ "Convenience", "method", "for", "downloading", "files", ".", "This", "method", "will", "force", "the", "browser", "to", "find", "a", "handler", "(", "external", "program", ")", "for", "this", "file", "(", "content", "type", ")", "and", "will", "provide", "...
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java#L520-L530
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getCachedQuery
public CachedInstanceQuery getCachedQuery(final String _key) { if (this.query == null) { try { this.query = new CachedInstanceQuery(_key, this.typeUUID) .setIncludeChildTypes(isIncludeChildTypes()) .setCompanyDepende...
java
public CachedInstanceQuery getCachedQuery(final String _key) { if (this.query == null) { try { this.query = new CachedInstanceQuery(_key, this.typeUUID) .setIncludeChildTypes(isIncludeChildTypes()) .setCompanyDepende...
[ "public", "CachedInstanceQuery", "getCachedQuery", "(", "final", "String", "_key", ")", "{", "if", "(", "this", ".", "query", "==", "null", ")", "{", "try", "{", "this", ".", "query", "=", "new", "CachedInstanceQuery", "(", "_key", ",", "this", ".", "typ...
Get the constructed query. @param _key key to the Query Cache @return the query
[ "Get", "the", "constructed", "query", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L989-L1002
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java
WriteFileExtensions.readSourceFileAndWriteDestFile
public static void readSourceFileAndWriteDestFile(final String srcfile, final String destFile) throws IOException { try (FileInputStream fis = new FileInputStream(srcfile); FileOutputStream fos = new FileOutputStream(destFile); BufferedInputStream bis = new BufferedInputStream(fis); BufferedOutputStream b...
java
public static void readSourceFileAndWriteDestFile(final String srcfile, final String destFile) throws IOException { try (FileInputStream fis = new FileInputStream(srcfile); FileOutputStream fos = new FileOutputStream(destFile); BufferedInputStream bis = new BufferedInputStream(fis); BufferedOutputStream b...
[ "public", "static", "void", "readSourceFileAndWriteDestFile", "(", "final", "String", "srcfile", ",", "final", "String", "destFile", ")", "throws", "IOException", "{", "try", "(", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "srcfile", ")", ";", ...
Writes the source file with the best performance to the destination file. @param srcfile The source file. @param destFile The destination file. @throws IOException Signals that an I/O exception has occurred.
[ "Writes", "the", "source", "file", "with", "the", "best", "performance", "to", "the", "destination", "file", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java#L389-L402
apache/groovy
subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
TemplateServlet.getTemplate
protected Template getTemplate(File file) throws ServletException { String key = file.getAbsolutePath(); Template template = findCachedTemplate(key, file); // // Template not cached or the source file changed - compile new template! // if (template == null) { ...
java
protected Template getTemplate(File file) throws ServletException { String key = file.getAbsolutePath(); Template template = findCachedTemplate(key, file); // // Template not cached or the source file changed - compile new template! // if (template == null) { ...
[ "protected", "Template", "getTemplate", "(", "File", "file", ")", "throws", "ServletException", "{", "String", "key", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "Template", "template", "=", "findCachedTemplate", "(", "key", ",", "file", ")", ";", "/...
Gets the template created by the underlying engine parsing the request. <p> This method looks up a simple (weak) hash map for an existing template object that matches the source file. If the source file didn't change in length and its last modified stamp hasn't changed compared to a precompiled template object, this t...
[ "Gets", "the", "template", "created", "by", "the", "underlying", "engine", "parsing", "the", "request", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java#L294-L310
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/auth/OAuthActivity.java
OAuthActivity.createOAuthActivityIntent
public static Intent createOAuthActivityIntent(final Context context, final String clientId, final String clientSecret, String redirectUrl, boolean loginViaBoxApp) { Intent intent = new Intent(context, OAuthActivity.class); intent.putExtra(BoxConstants.KEY_CLIENT_ID, clientId); intent.putExtra(B...
java
public static Intent createOAuthActivityIntent(final Context context, final String clientId, final String clientSecret, String redirectUrl, boolean loginViaBoxApp) { Intent intent = new Intent(context, OAuthActivity.class); intent.putExtra(BoxConstants.KEY_CLIENT_ID, clientId); intent.putExtra(B...
[ "public", "static", "Intent", "createOAuthActivityIntent", "(", "final", "Context", "context", ",", "final", "String", "clientId", ",", "final", "String", "clientSecret", ",", "String", "redirectUrl", ",", "boolean", "loginViaBoxApp", ")", "{", "Intent", "intent", ...
Create intent to launch OAuthActivity. Notes about redirect url parameter: If you already set redirect url in <a href="https://cloud.app.box.com/developers/services">box dev console</a>, you should pass in the same redirect url or use null for redirect url. If you didn't set it in box dev console, you should pass in a ...
[ "Create", "intent", "to", "launch", "OAuthActivity", ".", "Notes", "about", "redirect", "url", "parameter", ":", "If", "you", "already", "set", "redirect", "url", "in", "<a", "href", "=", "https", ":", "//", "cloud", ".", "app", ".", "box", ".", "com", ...
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/auth/OAuthActivity.java#L519-L528
xqbase/util
util/src/main/java/com/xqbase/util/Bytes.java
Bytes.setInt
public static void setInt(int n, byte[] b, int off, boolean littleEndian) { if (littleEndian) { b[off] = (byte) n; b[off + 1] = (byte) (n >>> 8); b[off + 2] = (byte) (n >>> 16); b[off + 3] = (byte) (n >>> 24); } else { b[off] = (byte) (n >>> 24); b[off + 1] = (byte) (n >>> 16); b[off +...
java
public static void setInt(int n, byte[] b, int off, boolean littleEndian) { if (littleEndian) { b[off] = (byte) n; b[off + 1] = (byte) (n >>> 8); b[off + 2] = (byte) (n >>> 16); b[off + 3] = (byte) (n >>> 24); } else { b[off] = (byte) (n >>> 24); b[off + 1] = (byte) (n >>> 16); b[off +...
[ "public", "static", "void", "setInt", "(", "int", "n", ",", "byte", "[", "]", "b", ",", "int", "off", ",", "boolean", "littleEndian", ")", "{", "if", "(", "littleEndian", ")", "{", "b", "[", "off", "]", "=", "(", "byte", ")", "n", ";", "b", "["...
Store an <b>int</b> number into a byte array in a given byte order
[ "Store", "an", "<b", ">", "int<", "/", "b", ">", "number", "into", "a", "byte", "array", "in", "a", "given", "byte", "order" ]
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util/src/main/java/com/xqbase/util/Bytes.java#L136-L148
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.isGeneral
public static boolean isGeneral(CharSequence value, int min, int max) { String reg = "^\\w{" + min + "," + max + "}$"; if (min < 0) { min = 0; } if (max <= 0) { reg = "^\\w{" + min + ",}$"; } return isMactchRegex(reg, value); }
java
public static boolean isGeneral(CharSequence value, int min, int max) { String reg = "^\\w{" + min + "," + max + "}$"; if (min < 0) { min = 0; } if (max <= 0) { reg = "^\\w{" + min + ",}$"; } return isMactchRegex(reg, value); }
[ "public", "static", "boolean", "isGeneral", "(", "CharSequence", "value", ",", "int", "min", ",", "int", "max", ")", "{", "String", "reg", "=", "\"^\\\\w{\"", "+", "min", "+", "\",\"", "+", "max", "+", "\"}$\"", ";", "if", "(", "min", "<", "0", ")", ...
验证是否为给定长度范围的英文字母 、数字和下划线 @param value 值 @param min 最小长度,负数自动识别为0 @param max 最大长度,0或负数表示不限制最大长度 @return 是否为给定长度范围的英文字母 、数字和下划线
[ "验证是否为给定长度范围的英文字母", "、数字和下划线" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L373-L382
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.removeOffering
public boolean removeOffering(String offeringName) { if(offeringName == null) throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null."); BasicDBObject query = new BasicDBObject("offering_name", offeringName); Document removedOffering = this.offeringsCollect...
java
public boolean removeOffering(String offeringName) { if(offeringName == null) throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null."); BasicDBObject query = new BasicDBObject("offering_name", offeringName); Document removedOffering = this.offeringsCollect...
[ "public", "boolean", "removeOffering", "(", "String", "offeringName", ")", "{", "if", "(", "offeringName", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"The parameter \\\"cloudOfferingId\\\" cannot be null.\"", ")", ";", "BasicDBObject", "query", "=...
Remove an offering @param offeringName the name of the offering to remove @return
[ "Remove", "an", "offering" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L78-L86
brettonw/Bag
src/main/java/com/brettonw/bag/Serializer.java
Serializer.fromBagAsType
public static <WorkingType> WorkingType fromBagAsType (Bag bag, Class type) { return (bag != null) ? (WorkingType) deserialize (type.getName (), bag) : null; }
java
public static <WorkingType> WorkingType fromBagAsType (Bag bag, Class type) { return (bag != null) ? (WorkingType) deserialize (type.getName (), bag) : null; }
[ "public", "static", "<", "WorkingType", ">", "WorkingType", "fromBagAsType", "(", "Bag", "bag", ",", "Class", "type", ")", "{", "return", "(", "bag", "!=", "null", ")", "?", "(", "WorkingType", ")", "deserialize", "(", "type", ".", "getName", "(", ")", ...
Reconstitute the given BagObject representation back to the object it represents, using a "best-effort" approach to matching the fields of the BagObject to the class being initialized. @param bag The input data to reconstruct from, either a BagObject or BagArray @param type the Class representing the type to reconstruc...
[ "Reconstitute", "the", "given", "BagObject", "representation", "back", "to", "the", "object", "it", "represents", "using", "a", "best", "-", "effort", "approach", "to", "matching", "the", "fields", "of", "the", "BagObject", "to", "the", "class", "being", "init...
train
https://github.com/brettonw/Bag/blob/25c0ff74893b6c9a2c61bf0f97189ab82e0b2f56/src/main/java/com/brettonw/bag/Serializer.java#L500-L502
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/WidgetScoreAbstract.java
WidgetScoreAbstract.processWidgetScore
@Override public ScoreWeight processWidgetScore(Widget widget, ScoreComponentSettings paramSettings) { if (!Utils.isScoreEnabled(paramSettings)) { return null; } //1. Init scores ScoreWeight scoreWidget = initWidgetScore(paramSettings); if (null == widget) { scoreWidget.setScore(par...
java
@Override public ScoreWeight processWidgetScore(Widget widget, ScoreComponentSettings paramSettings) { if (!Utils.isScoreEnabled(paramSettings)) { return null; } //1. Init scores ScoreWeight scoreWidget = initWidgetScore(paramSettings); if (null == widget) { scoreWidget.setScore(par...
[ "@", "Override", "public", "ScoreWeight", "processWidgetScore", "(", "Widget", "widget", ",", "ScoreComponentSettings", "paramSettings", ")", "{", "if", "(", "!", "Utils", ".", "isScoreEnabled", "(", "paramSettings", ")", ")", "{", "return", "null", ";", "}", ...
Process widget score @param widget widget configuration from dashboard @param paramSettings Score Settings for the widget @return
[ "Process", "widget", "score" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/WidgetScoreAbstract.java#L39-L80