repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java
SimpleAttributeDefinition.marshallAsAttribute
public void marshallAsAttribute(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { """ Marshalls the value from the given {@code resourceModel} as an xml attribute, if it {@link #isMarshallable(org.jboss.dmr.ModelNode, boolean) is marshallable}....
java
public void marshallAsAttribute(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { getMarshaller().marshallAsAttribute(this, resourceModel, marshallDefault, writer); }
[ "public", "void", "marshallAsAttribute", "(", "final", "ModelNode", "resourceModel", ",", "final", "boolean", "marshallDefault", ",", "final", "XMLStreamWriter", "writer", ")", "throws", "XMLStreamException", "{", "getMarshaller", "(", ")", ".", "marshallAsAttribute", ...
Marshalls the value from the given {@code resourceModel} as an xml attribute, if it {@link #isMarshallable(org.jboss.dmr.ModelNode, boolean) is marshallable}. @param resourceModel the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}. @param marshallDefault {@code true} if the value should be marshalled ...
[ "Marshalls", "the", "value", "from", "the", "given", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L144-L146
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java
OIDMap.addAttribute
public static void addAttribute(String name, String oid, Class<?> clazz) throws CertificateException { """ Add a name to lookup table. @param name the name of the attr @param oid the string representation of the object identifier for the class. @param clazz the Class object associated with this a...
java
public static void addAttribute(String name, String oid, Class<?> clazz) throws CertificateException { ObjectIdentifier objId; try { objId = new ObjectIdentifier(oid); } catch (IOException ioe) { throw new CertificateException (...
[ "public", "static", "void", "addAttribute", "(", "String", "name", ",", "String", "oid", ",", "Class", "<", "?", ">", "clazz", ")", "throws", "CertificateException", "{", "ObjectIdentifier", "objId", ";", "try", "{", "objId", "=", "new", "ObjectIdentifier", ...
Add a name to lookup table. @param name the name of the attr @param oid the string representation of the object identifier for the class. @param clazz the Class object associated with this attribute @exception CertificateException on errors.
[ "Add", "a", "name", "to", "lookup", "table", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L213-L230
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java
JpaControllerManagement.setLastTargetQuery
private void setLastTargetQuery(final String tenant, final long currentTimeMillis, final List<String> chunk) { """ Sets {@link Target#getLastTargetQuery()} by native SQL in order to avoid raising opt lock revision as this update is not mission critical and in fact only written by {@link ControllerManagement}, i....
java
private void setLastTargetQuery(final String tenant, final long currentTimeMillis, final List<String> chunk) { final Map<String, String> paramMapping = Maps.newHashMapWithExpectedSize(chunk.size()); for (int i = 0; i < chunk.size(); i++) { paramMapping.put("cid" + i, chunk.get(i)); ...
[ "private", "void", "setLastTargetQuery", "(", "final", "String", "tenant", ",", "final", "long", "currentTimeMillis", ",", "final", "List", "<", "String", ">", "chunk", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "paramMapping", "=", "Maps",...
Sets {@link Target#getLastTargetQuery()} by native SQL in order to avoid raising opt lock revision as this update is not mission critical and in fact only written by {@link ControllerManagement}, i.e. the target itself.
[ "Sets", "{" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java#L453-L472
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Properties.set
public <T> void set(PropertyKey<T> property, T value) { """ Associates the specified value with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified value. @param <T> the type of the value @param property the property k...
java
public <T> void set(PropertyKey<T> property, T value) { properties.put(property.getName(), value); }
[ "public", "<", "T", ">", "void", "set", "(", "PropertyKey", "<", "T", ">", "property", ",", "T", "value", ")", "{", "properties", ".", "put", "(", "property", ".", "getName", "(", ")", ",", "value", ")", ";", "}" ]
Associates the specified value with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified value. @param <T> the type of the value @param property the property key with which the specified value is to be associated @param value the ...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "property", "key", ".", "If", "the", "properties", "previously", "contained", "a", "mapping", "for", "the", "property", "key", "the", "old", "value", "is", "replaced", "by", "the", "specifi...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java#L112-L114
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/AbstractToString.java
AbstractToString.checkToString
private Description checkToString(ExpressionTree tree, VisitorState state) { """ Tests if the given expression is converted to a String by its parent (i.e. its parent is a string concat expression, {@code String.format}, or {@code println(Object)}). """ Symbol sym = ASTHelpers.getSymbol(tree); if (!(s...
java
private Description checkToString(ExpressionTree tree, VisitorState state) { Symbol sym = ASTHelpers.getSymbol(tree); if (!(sym instanceof VarSymbol || sym instanceof MethodSymbol)) { return NO_MATCH; } Type type = ASTHelpers.getType(tree); if (type instanceof MethodType) { type = type.g...
[ "private", "Description", "checkToString", "(", "ExpressionTree", "tree", ",", "VisitorState", "state", ")", "{", "Symbol", "sym", "=", "ASTHelpers", ".", "getSymbol", "(", "tree", ")", ";", "if", "(", "!", "(", "sym", "instanceof", "VarSymbol", "||", "sym",...
Tests if the given expression is converted to a String by its parent (i.e. its parent is a string concat expression, {@code String.format}, or {@code println(Object)}).
[ "Tests", "if", "the", "given", "expression", "is", "converted", "to", "a", "String", "by", "its", "parent", "(", "i", ".", "e", ".", "its", "parent", "is", "a", "string", "concat", "expression", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/AbstractToString.java#L122-L151
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesInner.java
DataMaskingPoliciesInner.getAsync
public Observable<DataMaskingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets a database data masking policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the...
java
public Observable<DataMaskingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DataMaskingPolicyInner>, DataMaskingPolicyInner>() { @Override ...
[ "public", "Observable", "<", "DataMaskingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", ...
Gets a database data masking policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @throws IllegalArgumentException ...
[ "Gets", "a", "database", "data", "masking", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesInner.java#L207-L214
zandero/rest.vertx
src/main/java/com/zandero/rest/AnnotationProcessor.java
AnnotationProcessor.isMatching
private static boolean isMatching(Method base, Method compare) { """ Checks if methods in base and inherited/abstract class are the same method @param base method @param compare to compare @return true if the same, false otherwise """ // if names and argument types match ... then this are the same method...
java
private static boolean isMatching(Method base, Method compare) { // if names and argument types match ... then this are the same method if (base.getName().equals(compare.getName()) && base.getParameterCount() == compare.getParameterCount()) { Class<?>[] typeBase = base.getParameterTypes(); Class<?>[] ...
[ "private", "static", "boolean", "isMatching", "(", "Method", "base", ",", "Method", "compare", ")", "{", "// if names and argument types match ... then this are the same method", "if", "(", "base", ".", "getName", "(", ")", ".", "equals", "(", "compare", ".", "getNa...
Checks if methods in base and inherited/abstract class are the same method @param base method @param compare to compare @return true if the same, false otherwise
[ "Checks", "if", "methods", "in", "base", "and", "inherited", "/", "abstract", "class", "are", "the", "same", "method" ]
train
https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/AnnotationProcessor.java#L156-L177
gotev/android-upload-service
uploadservice-ftp/src/main/java/net/gotev/uploadservice/ftp/FTPUploadRequest.java
FTPUploadRequest.setUsernameAndPassword
public FTPUploadRequest setUsernameAndPassword(String username, String password) { """ Set the credentials used to login on the FTP Server. @param username account username @param password account password @return {@link FTPUploadRequest} """ if (username == null || "".equals(username)) { ...
java
public FTPUploadRequest setUsernameAndPassword(String username, String password) { if (username == null || "".equals(username)) { throw new IllegalArgumentException("Specify FTP account username!"); } if (password == null || "".equals(password)) { throw new IllegalArgume...
[ "public", "FTPUploadRequest", "setUsernameAndPassword", "(", "String", "username", ",", "String", "password", ")", "{", "if", "(", "username", "==", "null", "||", "\"\"", ".", "equals", "(", "username", ")", ")", "{", "throw", "new", "IllegalArgumentException", ...
Set the credentials used to login on the FTP Server. @param username account username @param password account password @return {@link FTPUploadRequest}
[ "Set", "the", "credentials", "used", "to", "login", "on", "the", "FTP", "Server", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice-ftp/src/main/java/net/gotev/uploadservice/ftp/FTPUploadRequest.java#L74-L86
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/DbPro.java
DbPro.findById
public Record findById(String tableName, Object idValue) { """ Find record by id with default primary key. <pre> Example: Record user = Db.use().findById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record """ return findByIds(tableName, config.di...
java
public Record findById(String tableName, Object idValue) { return findByIds(tableName, config.dialect.getDefaultPrimaryKey(), idValue); }
[ "public", "Record", "findById", "(", "String", "tableName", ",", "Object", "idValue", ")", "{", "return", "findByIds", "(", "tableName", ",", "config", ".", "dialect", ".", "getDefaultPrimaryKey", "(", ")", ",", "idValue", ")", ";", "}" ]
Find record by id with default primary key. <pre> Example: Record user = Db.use().findById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record
[ "Find", "record", "by", "id", "with", "default", "primary", "key", ".", "<pre", ">", "Example", ":", "Record", "user", "=", "Db", ".", "use", "()", ".", "findById", "(", "user", "15", ")", ";", "<", "/", "pre", ">" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/DbPro.java#L376-L378
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/MetadataStore.java
MetadataStore.completeAssignment
private long completeAssignment(String streamSegmentName, long streamSegmentId) { """ Completes the assignment for the given StreamSegmentName by completing the waiting CompletableFuture. """ assert streamSegmentId != ContainerMetadata.NO_STREAM_SEGMENT_ID : "no valid streamSegmentId given"; fi...
java
private long completeAssignment(String streamSegmentName, long streamSegmentId) { assert streamSegmentId != ContainerMetadata.NO_STREAM_SEGMENT_ID : "no valid streamSegmentId given"; finishPendingRequests(streamSegmentName, PendingRequest::complete, streamSegmentId); return streamSegmentId; ...
[ "private", "long", "completeAssignment", "(", "String", "streamSegmentName", ",", "long", "streamSegmentId", ")", "{", "assert", "streamSegmentId", "!=", "ContainerMetadata", ".", "NO_STREAM_SEGMENT_ID", ":", "\"no valid streamSegmentId given\"", ";", "finishPendingRequests",...
Completes the assignment for the given StreamSegmentName by completing the waiting CompletableFuture.
[ "Completes", "the", "assignment", "for", "the", "given", "StreamSegmentName", "by", "completing", "the", "waiting", "CompletableFuture", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/MetadataStore.java#L438-L442
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/string/AlphanumComparator.java
AlphanumComparator.getChunk
private final String getChunk(String s, int slength, int marker) { """ Length of string is passed in for improved efficiency (only need to calculate it once) * """ StringBuilder chunk = new StringBuilder(); char c = s.charAt(marker); chunk.append(c); marker++; if (isDigi...
java
private final String getChunk(String s, int slength, int marker) { StringBuilder chunk = new StringBuilder(); char c = s.charAt(marker); chunk.append(c); marker++; if (isDigit(c)) { while (marker < slength) { c = s.charAt(marker...
[ "private", "final", "String", "getChunk", "(", "String", "s", ",", "int", "slength", ",", "int", "marker", ")", "{", "StringBuilder", "chunk", "=", "new", "StringBuilder", "(", ")", ";", "char", "c", "=", "s", ".", "charAt", "(", "marker", ")", ";", ...
Length of string is passed in for improved efficiency (only need to calculate it once) *
[ "Length", "of", "string", "is", "passed", "in", "for", "improved", "efficiency", "(", "only", "need", "to", "calculate", "it", "once", ")", "*" ]
train
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/string/AlphanumComparator.java#L90-L118
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.printFormFields
public void printFormFields(ChainWriter out, int indent) throws IOException { """ Prints the hidden variables that contain all of the current settings. """ if("true".equals(req.getParameter("search_engine"))) printHiddenField(out, indent, "search_engine", "true"); }
java
public void printFormFields(ChainWriter out, int indent) throws IOException { if("true".equals(req.getParameter("search_engine"))) printHiddenField(out, indent, "search_engine", "true"); }
[ "public", "void", "printFormFields", "(", "ChainWriter", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "if", "(", "\"true\"", ".", "equals", "(", "req", ".", "getParameter", "(", "\"search_engine\"", ")", ")", ")", "printHiddenField", "(", ...
Prints the hidden variables that contain all of the current settings.
[ "Prints", "the", "hidden", "variables", "that", "contain", "all", "of", "the", "current", "settings", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L525-L527
line/armeria
core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFileBuilder.java
AbstractHttpFileBuilder.cacheControl
public final B cacheControl(CharSequence cacheControl) { """ Sets the {@code "cache-control"} header. This method is a shortcut of: <pre>{@code builder.setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }</pre> """ requireNonNull(cacheControl, "cacheControl"); return setHeader(HttpHeade...
java
public final B cacheControl(CharSequence cacheControl) { requireNonNull(cacheControl, "cacheControl"); return setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }
[ "public", "final", "B", "cacheControl", "(", "CharSequence", "cacheControl", ")", "{", "requireNonNull", "(", "cacheControl", ",", "\"cacheControl\"", ")", ";", "return", "setHeader", "(", "HttpHeaderNames", ".", "CACHE_CONTROL", ",", "cacheControl", ")", ";", "}"...
Sets the {@code "cache-control"} header. This method is a shortcut of: <pre>{@code builder.setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }</pre>
[ "Sets", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFileBuilder.java#L257-L260
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WInternalLinkRenderer.java
WInternalLinkRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given {@link WInternalLink}. @param component the WInternalLink to paint. @param renderContext the RenderContext to paint to. """ WInternalLink link = (WInternalLink) component; XmlStri...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WInternalLink link = (WInternalLink) component; XmlStringBuilder xml = renderContext.getWriter(); if (Util.empty(link.getText())) { return; } xml.appendTagOpen("ui:link"); xml.appendAttribute("id", co...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WInternalLink", "link", "=", "(", "WInternalLink", ")", "component", ";", "XmlStringBuilder", "xml", "=", "rend...
Paints the given {@link WInternalLink}. @param component the WInternalLink to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "{", "@link", "WInternalLink", "}", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WInternalLinkRenderer.java#L23-L43
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ShExGenerator.java
ShExGenerator.genChoiceEntry
private String genChoiceEntry(StructureDefinition sd, ElementDefinition ed, String id, String base, ElementDefinition.TypeRefComponent typ) { """ Generate an entry in a choice list @param base base identifier @param typ type/discriminant @return ShEx fragment for choice entry """ ST shex_choice_entry =...
java
private String genChoiceEntry(StructureDefinition sd, ElementDefinition ed, String id, String base, ElementDefinition.TypeRefComponent typ) { ST shex_choice_entry = tmplt(ELEMENT_TEMPLATE); String ext = typ.getCode(); shex_choice_entry.add("id", "fhir:" + base+Character.toUpperCase(ext.charAt(0)) + ext...
[ "private", "String", "genChoiceEntry", "(", "StructureDefinition", "sd", ",", "ElementDefinition", "ed", ",", "String", "id", ",", "String", "base", ",", "ElementDefinition", ".", "TypeRefComponent", "typ", ")", "{", "ST", "shex_choice_entry", "=", "tmplt", "(", ...
Generate an entry in a choice list @param base base identifier @param typ type/discriminant @return ShEx fragment for choice entry
[ "Generate", "an", "entry", "in", "a", "choice", "list" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ShExGenerator.java#L668-L677
Doctoror/ParticlesDrawable
opengl/src/main/java/com/doctoror/particlesdrawable/opengl/chooser/FailsafeEGLConfigChooserFactory.java
FailsafeEGLConfigChooserFactory.newFailsafeEGLConfigChooser
@NonNull public static EGLConfigChooser newFailsafeEGLConfigChooser( final int samples, @Nullable final EGLConfigChooserCallback callback) { """ Creates an {@link EGLConfigChooser} for given multisampling value. Will fallback to lower multisampling mode or no multisampling mode at all ...
java
@NonNull public static EGLConfigChooser newFailsafeEGLConfigChooser( final int samples, @Nullable final EGLConfigChooserCallback callback) { if (samples < 0) { throw new IllegalArgumentException("samples must not be negative"); } if (samples == 0) { ...
[ "@", "NonNull", "public", "static", "EGLConfigChooser", "newFailsafeEGLConfigChooser", "(", "final", "int", "samples", ",", "@", "Nullable", "final", "EGLConfigChooserCallback", "callback", ")", "{", "if", "(", "samples", "<", "0", ")", "{", "throw", "new", "Ill...
Creates an {@link EGLConfigChooser} for given multisampling value. Will fallback to lower multisampling mode or no multisampling mode at all if unsupported. @param samples multisampling mode. Must be a positive number and a power of two. May be 0 for no multisampling. @param callback the {@link EGLConfigChooserCallba...
[ "Creates", "an", "{", "@link", "EGLConfigChooser", "}", "for", "given", "multisampling", "value", ".", "Will", "fallback", "to", "lower", "multisampling", "mode", "or", "no", "multisampling", "mode", "at", "all", "if", "unsupported", "." ]
train
https://github.com/Doctoror/ParticlesDrawable/blob/97ab510936692b5cf47822df78dd455f5e4b7ddf/opengl/src/main/java/com/doctoror/particlesdrawable/opengl/chooser/FailsafeEGLConfigChooserFactory.java#L41-L54
landawn/AbacusUtil
src/com/landawn/abacus/util/StringUtil.java
StringUtil.getMantissa
private static String getMantissa(final String str, final int stopPos) { """ <p>Utility method for {@link #createNumber(java.lang.String)}.</p> <p>Returns mantissa of the given number.</p> @param str the string representation of the number @param stopPos the position of the exponent or decimal point @retur...
java
private static String getMantissa(final String str, final int stopPos) { final char firstChar = str.charAt(0); final boolean hasSign = firstChar == '-' || firstChar == '+'; return hasSign ? str.substring(1, stopPos) : str.substring(0, stopPos); }
[ "private", "static", "String", "getMantissa", "(", "final", "String", "str", ",", "final", "int", "stopPos", ")", "{", "final", "char", "firstChar", "=", "str", ".", "charAt", "(", "0", ")", ";", "final", "boolean", "hasSign", "=", "firstChar", "==", "'"...
<p>Utility method for {@link #createNumber(java.lang.String)}.</p> <p>Returns mantissa of the given number.</p> @param str the string representation of the number @param stopPos the position of the exponent or decimal point @return mantissa of the given number
[ "<p", ">", "Utility", "method", "for", "{", "@link", "#createNumber", "(", "java", ".", "lang", ".", "String", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/StringUtil.java#L6497-L6502
mozilla/rhino
src/org/mozilla/javascript/MemberBox.java
MemberBox.writeParameters
private static void writeParameters(ObjectOutputStream out, Class<?>[] parms) throws IOException { """ Writes an array of parameter types to the stream. Requires special handling because primitive types cannot be found upon deserialization by the default Java implementation. """ out.writeSh...
java
private static void writeParameters(ObjectOutputStream out, Class<?>[] parms) throws IOException { out.writeShort(parms.length); outer: for (int i=0; i < parms.length; i++) { Class<?> parm = parms[i]; boolean primitive = parm.isPrimitive(); out.writeBo...
[ "private", "static", "void", "writeParameters", "(", "ObjectOutputStream", "out", ",", "Class", "<", "?", ">", "[", "]", "parms", ")", "throws", "IOException", "{", "out", ".", "writeShort", "(", "parms", ".", "length", ")", ";", "outer", ":", "for", "("...
Writes an array of parameter types to the stream. Requires special handling because primitive types cannot be found upon deserialization by the default Java implementation.
[ "Writes", "an", "array", "of", "parameter", "types", "to", "the", "stream", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/MemberBox.java#L283-L305
voldemort/voldemort
src/java/voldemort/utils/JmxUtils.java
JmxUtils.registerMbean
public static void registerMbean(MBeanServer server, ModelMBean mbean, ObjectName name) { """ Register the given mbean with the server @param server The server to register with @param mbean The mbean to register @param name The name to register under """ try { synchronized(LOCK) { ...
java
public static void registerMbean(MBeanServer server, ModelMBean mbean, ObjectName name) { try { synchronized(LOCK) { if(server.isRegistered(name)) JmxUtils.unregisterMbean(server, name); server.registerMBean(mbean, name); } } ca...
[ "public", "static", "void", "registerMbean", "(", "MBeanServer", "server", ",", "ModelMBean", "mbean", ",", "ObjectName", "name", ")", "{", "try", "{", "synchronized", "(", "LOCK", ")", "{", "if", "(", "server", ".", "isRegistered", "(", "name", ")", ")", ...
Register the given mbean with the server @param server The server to register with @param mbean The mbean to register @param name The name to register under
[ "Register", "the", "given", "mbean", "with", "the", "server" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/JmxUtils.java#L315-L325
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.validateOptions
public void validateOptions(final CommandLine cli, final String[] args) throws CLIToolOptionsException { """ Validate the values parsed by the options, will apply this for each CLIToolOptions added to the tool. subclasses may override this but should call super @param cli cli @param args args @throws CLIToolOp...
java
public void validateOptions(final CommandLine cli, final String[] args) throws CLIToolOptionsException { if (null != toolOptions) { for (final CLIToolOptions toolOpts : toolOptions) { toolOpts.validate(cli,args); } } }
[ "public", "void", "validateOptions", "(", "final", "CommandLine", "cli", ",", "final", "String", "[", "]", "args", ")", "throws", "CLIToolOptionsException", "{", "if", "(", "null", "!=", "toolOptions", ")", "{", "for", "(", "final", "CLIToolOptions", "toolOpts...
Validate the values parsed by the options, will apply this for each CLIToolOptions added to the tool. subclasses may override this but should call super @param cli cli @param args args @throws CLIToolOptionsException if an error occurs
[ "Validate", "the", "values", "parsed", "by", "the", "options", "will", "apply", "this", "for", "each", "CLIToolOptions", "added", "to", "the", "tool", ".", "subclasses", "may", "override", "this", "but", "should", "call", "super" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L186-L192
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/config/Template.java
Template.setAttributes
public final void setAttributes(final Map<String, Attribute> attributes) { """ Set the attributes for this template. @param attributes the attribute map """ for (Map.Entry<String, Attribute> entry: attributes.entrySet()) { Object attribute = entry.getValue(); if (!(attribute ...
java
public final void setAttributes(final Map<String, Attribute> attributes) { for (Map.Entry<String, Attribute> entry: attributes.entrySet()) { Object attribute = entry.getValue(); if (!(attribute instanceof Attribute)) { final String msg = "Attribute...
[ "public", "final", "void", "setAttributes", "(", "final", "Map", "<", "String", ",", "Attribute", ">", "attributes", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Attribute", ">", "entry", ":", "attributes", ".", "entrySet", "(", ")", ...
Set the attributes for this template. @param attributes the attribute map
[ "Set", "the", "attributes", "for", "this", "template", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L138-L151
phax/ph-commons
ph-json/src/main/java/com/helger/json/serialize/JsonReader.java
JsonReader.readFromPath
@Nullable public static IJson readFromPath (@Nonnull final Path aPath, @Nonnull final Charset aFallbackCharset) { """ Read the Json from the passed Path. @param aPath The file containing the Json to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used in case no is BOM i...
java
@Nullable public static IJson readFromPath (@Nonnull final Path aPath, @Nonnull final Charset aFallbackCharset) { return readFromPath (aPath, aFallbackCharset, null); }
[ "@", "Nullable", "public", "static", "IJson", "readFromPath", "(", "@", "Nonnull", "final", "Path", "aPath", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ")", "{", "return", "readFromPath", "(", "aPath", ",", "aFallbackCharset", ",", "null", ")...
Read the Json from the passed Path. @param aPath The file containing the Json to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used in case no is BOM is present. May not be <code>null</code>. @return <code>null</code> if reading failed, the Json declarations otherwise.
[ "Read", "the", "Json", "from", "the", "passed", "Path", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-json/src/main/java/com/helger/json/serialize/JsonReader.java#L543-L547
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxJob.java
HylaFaxJob.setPriority
public void setPriority(FaxJobPriority priority) { """ This function sets the priority. @param priority The priority """ try { if(priority==FaxJobPriority.HIGH_PRIORITY) { this.JOB.setPriority(Job.PRIORITY_HIGH); } else ...
java
public void setPriority(FaxJobPriority priority) { try { if(priority==FaxJobPriority.HIGH_PRIORITY) { this.JOB.setPriority(Job.PRIORITY_HIGH); } else { this.JOB.setPriority(Job.PRIORITY_NORMAL); }...
[ "public", "void", "setPriority", "(", "FaxJobPriority", "priority", ")", "{", "try", "{", "if", "(", "priority", "==", "FaxJobPriority", ".", "HIGH_PRIORITY", ")", "{", "this", ".", "JOB", ".", "setPriority", "(", "Job", ".", "PRIORITY_HIGH", ")", ";", "}"...
This function sets the priority. @param priority The priority
[ "This", "function", "sets", "the", "priority", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxJob.java#L142-L159
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ImageUtils.java
ImageUtils.saveBitmapAsPNG
public static boolean saveBitmapAsPNG(String filename, Bitmap bitmap) { """ Saves a {@code Bitmap} as a PNG file. @param filename The file path on the file system. @param bitmap The input {@code Bitmap} object. @return {@code true} if successful. """ FileOutputStream outStream = null; try ...
java
public static boolean saveBitmapAsPNG(String filename, Bitmap bitmap) { FileOutputStream outStream = null; try { outStream = new FileOutputStream(filename); bitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream); } catch (Exception e) { e.printStackTrace()...
[ "public", "static", "boolean", "saveBitmapAsPNG", "(", "String", "filename", ",", "Bitmap", "bitmap", ")", "{", "FileOutputStream", "outStream", "=", "null", ";", "try", "{", "outStream", "=", "new", "FileOutputStream", "(", "filename", ")", ";", "bitmap", "."...
Saves a {@code Bitmap} as a PNG file. @param filename The file path on the file system. @param bitmap The input {@code Bitmap} object. @return {@code true} if successful.
[ "Saves", "a", "{", "@code", "Bitmap", "}", "as", "a", "PNG", "file", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ImageUtils.java#L72-L92
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/transform/EnumPrefsTransform.java
EnumPrefsTransform.generateWriteProperty
@Override public void generateWriteProperty(Builder methodBuilder, String editorName, TypeName beanClass, String beanName, PrefsProperty property) { """ /* (non-Javadoc) @see com.abubusoft.kripton.processor.sharedprefs.transform.PrefsTransform#generateWriteProperty(com.squareup.javapoet.MethodSpec.Builder, java....
java
@Override public void generateWriteProperty(Builder methodBuilder, String editorName, TypeName beanClass, String beanName, PrefsProperty property) { methodBuilder.beginControlFlow("if ($L!=null) ", getter(beanName, beanClass, property)); methodBuilder.addStatement("$L.putString($S,$L.toString() )", editorName, pro...
[ "@", "Override", "public", "void", "generateWriteProperty", "(", "Builder", "methodBuilder", ",", "String", "editorName", ",", "TypeName", "beanClass", ",", "String", "beanName", ",", "PrefsProperty", "property", ")", "{", "methodBuilder", ".", "beginControlFlow", "...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sharedprefs.transform.PrefsTransform#generateWriteProperty(com.squareup.javapoet.MethodSpec.Builder, java.lang.String, com.squareup.javapoet.TypeName, java.lang.String, com.abubusoft.kripton.processor.sharedprefs.model.PrefsProperty)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/transform/EnumPrefsTransform.java#L94-L102
romannurik/muzei
muzei-api/src/main/java/com/google/android/apps/muzei/api/MuzeiArtSource.java
MuzeiArtSource.getSharedPreferences
protected static SharedPreferences getSharedPreferences(Context context, @NonNull String sourceName) { """ Convenience method for accessing preferences specific to the source (with the given name within this package. The source name must be the one provided in the {@link #MuzeiArtSource(String)} constructor. Thi...
java
protected static SharedPreferences getSharedPreferences(Context context, @NonNull String sourceName) { return context.getSharedPreferences("muzeiartsource_" + sourceName, 0); }
[ "protected", "static", "SharedPreferences", "getSharedPreferences", "(", "Context", "context", ",", "@", "NonNull", "String", "sourceName", ")", "{", "return", "context", ".", "getSharedPreferences", "(", "\"muzeiartsource_\"", "+", "sourceName", ",", "0", ")", ";",...
Convenience method for accessing preferences specific to the source (with the given name within this package. The source name must be the one provided in the {@link #MuzeiArtSource(String)} constructor. This static method is useful for exposing source preferences to other application components such as the source setti...
[ "Convenience", "method", "for", "accessing", "preferences", "specific", "to", "the", "source", "(", "with", "the", "given", "name", "within", "this", "package", ".", "The", "source", "name", "must", "be", "the", "one", "provided", "in", "the", "{", "@link", ...
train
https://github.com/romannurik/muzei/blob/d00777a5fc59f34471be338c814ea85ddcbde304/muzei-api/src/main/java/com/google/android/apps/muzei/api/MuzeiArtSource.java#L649-L651
CodeNarc/CodeNarc
src/main/java/org/codenarc/rule/AbstractMethodCallExpressionVisitor.java
AbstractMethodCallExpressionVisitor.addViolation
protected void addViolation(MethodCallExpression node, String message) { """ Add a new Violation to the list of violations found by this visitor. Only add the violation if the node lineNumber >= 0. @param node - the Groovy AST Node @param message - the message for the violation; defaults to null """ ...
java
protected void addViolation(MethodCallExpression node, String message) { if (node.getLineNumber() >= 0) { int lineNumber = AstUtil.findFirstNonAnnotationLine(node, sourceCode); String sourceLine = sourceCode.line(AstUtil.findFirstNonAnnotationLine(node, sourceCode) - 1); Viol...
[ "protected", "void", "addViolation", "(", "MethodCallExpression", "node", ",", "String", "message", ")", "{", "if", "(", "node", ".", "getLineNumber", "(", ")", ">=", "0", ")", "{", "int", "lineNumber", "=", "AstUtil", ".", "findFirstNonAnnotationLine", "(", ...
Add a new Violation to the list of violations found by this visitor. Only add the violation if the node lineNumber >= 0. @param node - the Groovy AST Node @param message - the message for the violation; defaults to null
[ "Add", "a", "new", "Violation", "to", "the", "list", "of", "violations", "found", "by", "this", "visitor", ".", "Only", "add", "the", "violation", "if", "the", "node", "lineNumber", ">", "=", "0", "." ]
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/rule/AbstractMethodCallExpressionVisitor.java#L54-L71
googleads/googleads-java-lib
modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/utils/v201805/StatementBuilder.java
StatementBuilder.withBindVariableValue
public StatementBuilder withBindVariableValue(String key, Value value) { """ Adds a bind variable value to the statement. @param key the value key @param value the bind variable value @return a reference to this object """ queryBuilder.withBindVariableValue(key, value); return this; }
java
public StatementBuilder withBindVariableValue(String key, Value value) { queryBuilder.withBindVariableValue(key, value); return this; }
[ "public", "StatementBuilder", "withBindVariableValue", "(", "String", "key", ",", "Value", "value", ")", "{", "queryBuilder", ".", "withBindVariableValue", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a bind variable value to the statement. @param key the value key @param value the bind variable value @return a reference to this object
[ "Adds", "a", "bind", "variable", "value", "to", "the", "statement", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/utils/v201805/StatementBuilder.java#L87-L90
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/A_CmsListTab.java
A_CmsListTab.setSortSelectBoxValue
public void setSortSelectBoxValue(String value, boolean fireEvents) { """ Sets the value selected in the sort select box, if possible.<p> @param value the new value for the sort select box @param fireEvents if true, the change event of the select box is fired """ if ((m_sortSelectBox != null) && (...
java
public void setSortSelectBoxValue(String value, boolean fireEvents) { if ((m_sortSelectBox != null) && (value != null)) { m_sortSelectBox.setFormValue(value, fireEvents); } }
[ "public", "void", "setSortSelectBoxValue", "(", "String", "value", ",", "boolean", "fireEvents", ")", "{", "if", "(", "(", "m_sortSelectBox", "!=", "null", ")", "&&", "(", "value", "!=", "null", ")", ")", "{", "m_sortSelectBox", ".", "setFormValue", "(", "...
Sets the value selected in the sort select box, if possible.<p> @param value the new value for the sort select box @param fireEvents if true, the change event of the select box is fired
[ "Sets", "the", "value", "selected", "in", "the", "sort", "select", "box", "if", "possible", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/A_CmsListTab.java#L394-L399
pwall567/jsonutil
src/main/java/net/pwall/json/JSON.java
JSON.parseObject
public static JSONObject parseObject(File f, Charset charSet) throws IOException { """ Parse the contents of a {@link File} as a JSON object, specifying the character set. @param f the {@link File} @param charSet the character set @return the JSON object @throws JSONException if the file ...
java
public static JSONObject parseObject(File f, Charset charSet) throws IOException { return (JSONObject)parse(f, charSet); }
[ "public", "static", "JSONObject", "parseObject", "(", "File", "f", ",", "Charset", "charSet", ")", "throws", "IOException", "{", "return", "(", "JSONObject", ")", "parse", "(", "f", ",", "charSet", ")", ";", "}" ]
Parse the contents of a {@link File} as a JSON object, specifying the character set. @param f the {@link File} @param charSet the character set @return the JSON object @throws JSONException if the file does not contain a valid JSON value @throws IOException on any I/O errors @throws ClassCastExce...
[ "Parse", "the", "contents", "of", "a", "{", "@link", "File", "}", "as", "a", "JSON", "object", "specifying", "the", "character", "set", "." ]
train
https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSON.java#L260-L262
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/MessageRouterImpl.java
MessageRouterImpl.addMsgToLogHandler
protected void addMsgToLogHandler(String msgId, String handlerId) { """ Add the specified log handler to the message ID's routing list. """ Set<String> logHandlerIdSet = getOrCreateLogHandlerIdSet(msgId); logHandlerIdSet.add(handlerId); }
java
protected void addMsgToLogHandler(String msgId, String handlerId) { Set<String> logHandlerIdSet = getOrCreateLogHandlerIdSet(msgId); logHandlerIdSet.add(handlerId); }
[ "protected", "void", "addMsgToLogHandler", "(", "String", "msgId", ",", "String", "handlerId", ")", "{", "Set", "<", "String", ">", "logHandlerIdSet", "=", "getOrCreateLogHandlerIdSet", "(", "msgId", ")", ";", "logHandlerIdSet", ".", "add", "(", "handlerId", ")"...
Add the specified log handler to the message ID's routing list.
[ "Add", "the", "specified", "log", "handler", "to", "the", "message", "ID", "s", "routing", "list", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/MessageRouterImpl.java#L170-L173
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.beginCreateOrUpdateAsync
public Observable<IotHubDescriptionInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { """ Create or update the metadata of an IoT hub. Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT ...
java
public Observable<IotHubDescriptionInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, iotHubDescription).map(new Func1<ServiceResponse<IotHubDescriptionInne...
[ "public", "Observable", "<", "IotHubDescriptionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "IotHubDescriptionInner", "iotHubDescription", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(",...
Create or update the metadata of an IoT hub. Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. @param resourceGroupName The name of the resour...
[ "Create", "or", "update", "the", "metadata", "of", "an", "IoT", "hub", ".", "Create", "or", "update", "the", "metadata", "of", "an", "Iot", "hub", ".", "The", "usual", "pattern", "to", "modify", "a", "property", "is", "to", "retrieve", "the", "IoT", "h...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L513-L520
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/model/QueryParameters.java
QueryParameters.importValues
public void importValues(Map<String, Object> map) { """ Imports values from Map. If such key already exists - value would be rewritten and Type/Position/Direction would be reset to default value. @param map Map which would be imported """ for (String key : map.keySet()) { this.set(key...
java
public void importValues(Map<String, Object> map) { for (String key : map.keySet()) { this.set(key, map.get(key)); } }
[ "public", "void", "importValues", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "for", "(", "String", "key", ":", "map", ".", "keySet", "(", ")", ")", "{", "this", ".", "set", "(", "key", ",", "map", ".", "get", "(", "key", ")...
Imports values from Map. If such key already exists - value would be rewritten and Type/Position/Direction would be reset to default value. @param map Map which would be imported
[ "Imports", "values", "from", "Map", ".", "If", "such", "key", "already", "exists", "-", "value", "would", "be", "rewritten", "and", "Type", "/", "Position", "/", "Direction", "would", "be", "reset", "to", "default", "value", "." ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/model/QueryParameters.java#L196-L200
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.svgCircle
public static Element svgCircle(Document document, double cx, double cy, double r) { """ Create a SVG circle element. @param document document to create in (factory) @param cx center X @param cy center Y @param r radius @return new element """ Element circ = SVGUtil.svgElement(document, SVGConstants...
java
public static Element svgCircle(Document document, double cx, double cy, double r) { Element circ = SVGUtil.svgElement(document, SVGConstants.SVG_CIRCLE_TAG); SVGUtil.setAtt(circ, SVGConstants.SVG_CX_ATTRIBUTE, cx); SVGUtil.setAtt(circ, SVGConstants.SVG_CY_ATTRIBUTE, cy); SVGUtil.setAtt(circ, SVGConstan...
[ "public", "static", "Element", "svgCircle", "(", "Document", "document", ",", "double", "cx", ",", "double", "cy", ",", "double", "r", ")", "{", "Element", "circ", "=", "SVGUtil", ".", "svgElement", "(", "document", ",", "SVGConstants", ".", "SVG_CIRCLE_TAG"...
Create a SVG circle element. @param document document to create in (factory) @param cx center X @param cy center Y @param r radius @return new element
[ "Create", "a", "SVG", "circle", "element", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L446-L452
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/model/ValidationResult.java
ValidationResult.addError
public void addError(String desc, String loc, long value) { """ Adds an error. @param desc Error description @param loc Error Location @param value the integer value that caused the error """ iaddError(desc, "" + value, loc); }
java
public void addError(String desc, String loc, long value) { iaddError(desc, "" + value, loc); }
[ "public", "void", "addError", "(", "String", "desc", ",", "String", "loc", ",", "long", "value", ")", "{", "iaddError", "(", "desc", ",", "\"\"", "+", "value", ",", "loc", ")", ";", "}" ]
Adds an error. @param desc Error description @param loc Error Location @param value the integer value that caused the error
[ "Adds", "an", "error", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/ValidationResult.java#L105-L107
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java
DriverManager.getDriver
@CallerSensitive public static Driver getDriver(String url) throws SQLException { """ Attempts to locate a driver that understands the given URL. The <code>DriverManager</code> attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database URL of the form ...
java
@CallerSensitive public static Driver getDriver(String url) throws SQLException { println("DriverManager.getDriver(\"" + url + "\")"); ClassLoader callerClassLoader = ClassLoader.getSystemClassLoader(); // Walk through the loaded registeredDrivers attempting to locate someone ...
[ "@", "CallerSensitive", "public", "static", "Driver", "getDriver", "(", "String", "url", ")", "throws", "SQLException", "{", "println", "(", "\"DriverManager.getDriver(\\\"\"", "+", "url", "+", "\"\\\")\"", ")", ";", "ClassLoader", "callerClassLoader", "=", "ClassLo...
Attempts to locate a driver that understands the given URL. The <code>DriverManager</code> attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database URL of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> @return a <code>Driver</code> object representing a ...
[ "Attempts", "to", "locate", "a", "driver", "that", "understands", "the", "given", "URL", ".", "The", "<code", ">", "DriverManager<", "/", "code", ">", "attempts", "to", "select", "an", "appropriate", "driver", "from", "the", "set", "of", "registered", "JDBC"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java#L244-L276
mgormley/pacaya
src/main/java/edu/jhu/pacaya/parse/dep/ParentsArray.java
ParentsArray.countChildrenOf
public static int countChildrenOf(int[] parents, int parent) { """ Counts of the number of children in a dependency tree for the given parent index. @param parents A parents array where parents[i] contains the index of the parent of the word at position i, with parents[i] = -1 indicating that the parent of ...
java
public static int countChildrenOf(int[] parents, int parent) { int count = 0; for (int i=0; i<parents.length; i++) { if (parents[i] == parent) { count++; } } return count; }
[ "public", "static", "int", "countChildrenOf", "(", "int", "[", "]", "parents", ",", "int", "parent", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parents", ".", "length", ";", "i", "++", ")", "{", "...
Counts of the number of children in a dependency tree for the given parent index. @param parents A parents array where parents[i] contains the index of the parent of the word at position i, with parents[i] = -1 indicating that the parent of word i is the wall node. @param parent The parent for which the children shoul...
[ "Counts", "of", "the", "number", "of", "children", "in", "a", "dependency", "tree", "for", "the", "given", "parent", "index", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/parse/dep/ParentsArray.java#L184-L192
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForPolicySetDefinition
public PolicyStatesQueryResultsInner listQueryResultsForPolicySetDefinition(PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName) { """ Queries policy states for the subscription level policy set definition. @param policyStatesResource The virtual resource under Polic...
java
public PolicyStatesQueryResultsInner listQueryResultsForPolicySetDefinition(PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName) { return listQueryResultsForPolicySetDefinitionWithServiceResponseAsync(policyStatesResource, subscriptionId, policySetDefinitionName).toB...
[ "public", "PolicyStatesQueryResultsInner", "listQueryResultsForPolicySetDefinition", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ",", "String", "policySetDefinitionName", ")", "{", "return", "listQueryResultsForPolicySetDefinitionWithServiceRes...
Queries policy states for the subscription level policy set definition. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest...
[ "Queries", "policy", "states", "for", "the", "subscription", "level", "policy", "set", "definition", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L1664-L1666
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java
BeanMap.entryIterator
public Iterator<Entry<String, Object>> entryIterator() { """ Convenience method for getting an iterator over the entries. @return an iterator over the entries """ final Iterator<String> iter = keyIterator(); return new Iterator<Entry<String, Object>>() { @Override pub...
java
public Iterator<Entry<String, Object>> entryIterator() { final Iterator<String> iter = keyIterator(); return new Iterator<Entry<String, Object>>() { @Override public boolean hasNext() { return iter.hasNext(); } @Override public...
[ "public", "Iterator", "<", "Entry", "<", "String", ",", "Object", ">", ">", "entryIterator", "(", ")", "{", "final", "Iterator", "<", "String", ">", "iter", "=", "keyIterator", "(", ")", ";", "return", "new", "Iterator", "<", "Entry", "<", "String", ",...
Convenience method for getting an iterator over the entries. @return an iterator over the entries
[ "Convenience", "method", "for", "getting", "an", "iterator", "over", "the", "entries", "." ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java#L452-L472
finnyb/javampd
src/main/java/org/bff/javampd/player/VolumeChangeDelegate.java
VolumeChangeDelegate.fireVolumeChangeEvent
public synchronized void fireVolumeChangeEvent(Object source, int volume) { """ Sends the appropriate {@link VolumeChangeEvent} to all registered {@link VolumeChangeListener}. @param source source of event @param volume the new volume """ VolumeChangeEvent vce = new VolumeChangeEvent(source, volum...
java
public synchronized void fireVolumeChangeEvent(Object source, int volume) { VolumeChangeEvent vce = new VolumeChangeEvent(source, volume); for (VolumeChangeListener vcl : volListeners) { vcl.volumeChanged(vce); } }
[ "public", "synchronized", "void", "fireVolumeChangeEvent", "(", "Object", "source", ",", "int", "volume", ")", "{", "VolumeChangeEvent", "vce", "=", "new", "VolumeChangeEvent", "(", "source", ",", "volume", ")", ";", "for", "(", "VolumeChangeListener", "vcl", ":...
Sends the appropriate {@link VolumeChangeEvent} to all registered {@link VolumeChangeListener}. @param source source of event @param volume the new volume
[ "Sends", "the", "appropriate", "{", "@link", "VolumeChangeEvent", "}", "to", "all", "registered", "{", "@link", "VolumeChangeListener", "}", "." ]
train
https://github.com/finnyb/javampd/blob/186736e85fc238b4208cc9ee23373f9249376b4c/src/main/java/org/bff/javampd/player/VolumeChangeDelegate.java#L33-L39
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.millisToStr
public static Expression millisToStr(Expression expression, String format) { """ Returned expression results in the string in the supported format to which the UNIX milliseconds has been converted. """ if (format == null || format.isEmpty()) { return x("MILLIS_TO_STR(" + expression.toStrin...
java
public static Expression millisToStr(Expression expression, String format) { if (format == null || format.isEmpty()) { return x("MILLIS_TO_STR(" + expression.toString() + ")"); } return x("MILLIS_TO_STR(" + expression.toString() + ", \"" + format + "\")"); }
[ "public", "static", "Expression", "millisToStr", "(", "Expression", "expression", ",", "String", "format", ")", "{", "if", "(", "format", "==", "null", "||", "format", ".", "isEmpty", "(", ")", ")", "{", "return", "x", "(", "\"MILLIS_TO_STR(\"", "+", "expr...
Returned expression results in the string in the supported format to which the UNIX milliseconds has been converted.
[ "Returned", "expression", "results", "in", "the", "string", "in", "the", "supported", "format", "to", "which", "the", "UNIX", "milliseconds", "has", "been", "converted", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L232-L237
structr/structr
structr-ui/src/main/java/org/structr/web/resource/RegistrationResource.java
RegistrationResource.createUser
public Principal createUser(final SecurityContext securityContext, final PropertyKey credentialKey, final String credentialValue, final Map<String, Object> propertySet, final String confKey) { """ Create a new user. If a {@link Person} is found, convert that object to a {@link User} object. Do not auto-create ...
java
public Principal createUser(final SecurityContext securityContext, final PropertyKey credentialKey, final String credentialValue, final Map<String, Object> propertySet, final String confKey) { return createUser(securityContext, credentialKey, credentialValue, propertySet, false, confKey); }
[ "public", "Principal", "createUser", "(", "final", "SecurityContext", "securityContext", ",", "final", "PropertyKey", "credentialKey", ",", "final", "String", "credentialValue", ",", "final", "Map", "<", "String", ",", "Object", ">", "propertySet", ",", "final", "...
Create a new user. If a {@link Person} is found, convert that object to a {@link User} object. Do not auto-create a new user. @param securityContext @param credentialKey @param credentialValue @param propertySet @param confKey @return user
[ "Create", "a", "new", "user", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/resource/RegistrationResource.java#L324-L328
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
IOUtil.copy
public static void copy(InputStream source, File target) { """ Deep copies source to target. If target doesn't exist, this will fail with {@link HazelcastException}. <p> The source is only accessed here, but not managed. It's the responsibility of the caller to release any resources hold by the source. @para...
java
public static void copy(InputStream source, File target) { if (!target.exists()) { throw new HazelcastException("The target file doesn't exist " + target.getAbsolutePath()); } FileOutputStream out = null; try { out = new FileOutputStream(target); byte...
[ "public", "static", "void", "copy", "(", "InputStream", "source", ",", "File", "target", ")", "{", "if", "(", "!", "target", ".", "exists", "(", ")", ")", "{", "throw", "new", "HazelcastException", "(", "\"The target file doesn't exist \"", "+", "target", "....
Deep copies source to target. If target doesn't exist, this will fail with {@link HazelcastException}. <p> The source is only accessed here, but not managed. It's the responsibility of the caller to release any resources hold by the source. @param source the source @param target the destination @throws HazelcastExcept...
[ "Deep", "copies", "source", "to", "target", ".", "If", "target", "doesn", "t", "exist", "this", "will", "fail", "with", "{", "@link", "HazelcastException", "}", ".", "<p", ">", "The", "source", "is", "only", "accessed", "here", "but", "not", "managed", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java#L556-L575
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/tai/TAIWebUtils.java
TAIWebUtils.createStateCookie
public String createStateCookie(HttpServletRequest request, HttpServletResponse response) { """ Generates a random state value, adds a cookie to the response with that value, and returns the value. """ String stateValue = SocialUtil.generateRandom(); String loginHint = socialWebUtils.getLoginHi...
java
public String createStateCookie(HttpServletRequest request, HttpServletResponse response) { String stateValue = SocialUtil.generateRandom(); String loginHint = socialWebUtils.getLoginHint(request); if (!request.getMethod().equalsIgnoreCase("GET") && loginHint != null) { stateValue = ...
[ "public", "String", "createStateCookie", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "String", "stateValue", "=", "SocialUtil", ".", "generateRandom", "(", ")", ";", "String", "loginHint", "=", "socialWebUtils", ".", "getL...
Generates a random state value, adds a cookie to the response with that value, and returns the value.
[ "Generates", "a", "random", "state", "value", "adds", "a", "cookie", "to", "the", "response", "with", "that", "value", "and", "returns", "the", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/tai/TAIWebUtils.java#L87-L99
perwendel/spark
src/main/java/spark/utils/MimeParse.java
MimeParse.fitnessAndQualityParsed
private static FitnessAndQuality fitnessAndQualityParsed(String mimeType, Collection<ParseResults> parsedRanges) { """ Find the best match for a given mimeType against a list of media_ranges that have already been parsed by MimeParse.parseMediaRange(). Returns a tuple of the fitness value and the value of the 'q...
java
private static FitnessAndQuality fitnessAndQualityParsed(String mimeType, Collection<ParseResults> parsedRanges) { int bestFitness = -1; float bestFitQ = 0; ParseResults target = parseMediaRange(mimeType); for (ParseResults range : parsedRanges) { if ((target.type.equals(ran...
[ "private", "static", "FitnessAndQuality", "fitnessAndQualityParsed", "(", "String", "mimeType", ",", "Collection", "<", "ParseResults", ">", "parsedRanges", ")", "{", "int", "bestFitness", "=", "-", "1", ";", "float", "bestFitQ", "=", "0", ";", "ParseResults", "...
Find the best match for a given mimeType against a list of media_ranges that have already been parsed by MimeParse.parseMediaRange(). Returns a tuple of the fitness value and the value of the 'q' quality parameter of the best match, or (-1, 0) if no match was found. Just as for quality_parsed(), 'parsed_ranges' must be...
[ "Find", "the", "best", "match", "for", "a", "given", "mimeType", "against", "a", "list", "of", "media_ranges", "that", "have", "already", "been", "parsed", "by", "MimeParse", ".", "parseMediaRange", "()", ".", "Returns", "a", "tuple", "of", "the", "fitness",...
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/utils/MimeParse.java#L138-L164
CrawlScript/WebCollector
src/main/java/cn/edu/hfut/dmic/webcollector/crawler/Crawler.java
Crawler.addSeed
public void addSeed(String url, String type, boolean force) { """ 与addSeed(CrawlDatum datum, boolean force)类似 @param url 种子URL @param type 种子的type标识信息 @param force 是否强制注入 """ addSeedAndReturn(url,force).type(type); }
java
public void addSeed(String url, String type, boolean force) { addSeedAndReturn(url,force).type(type); }
[ "public", "void", "addSeed", "(", "String", "url", ",", "String", "type", ",", "boolean", "force", ")", "{", "addSeedAndReturn", "(", "url", ",", "force", ")", ".", "type", "(", "type", ")", ";", "}" ]
与addSeed(CrawlDatum datum, boolean force)类似 @param url 种子URL @param type 种子的type标识信息 @param force 是否强制注入
[ "与addSeed", "(", "CrawlDatum", "datum", "boolean", "force", ")", "类似" ]
train
https://github.com/CrawlScript/WebCollector/blob/4ca71ec0e69d354feaf64319d76e64663159902d/src/main/java/cn/edu/hfut/dmic/webcollector/crawler/Crawler.java#L252-L254
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java
DscConfigurationsInner.createOrUpdate
public DscConfigurationInner createOrUpdate(String resourceGroupName, String automationAccountName, String configurationName, DscConfigurationCreateOrUpdateParameters parameters) { """ Create the configuration identified by configuration name. @param resourceGroupName Name of an Azure Resource group. @param au...
java
public DscConfigurationInner createOrUpdate(String resourceGroupName, String automationAccountName, String configurationName, DscConfigurationCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, configurationName, parameters).toBlocking()...
[ "public", "DscConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "configurationName", ",", "DscConfigurationCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceRespon...
Create the configuration identified by configuration name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param configurationName The create or update parameters for configuration. @param parameters The create or update parameters for configu...
[ "Create", "the", "configuration", "identified", "by", "configuration", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java#L291-L293
trellis-ldp-archive/trellis-http
src/main/java/org/trellisldp/http/impl/DeleteHandler.java
DeleteHandler.deleteResource
public ResponseBuilder deleteResource(final Resource res) { """ Delete the given resource @param res the resource @return a response builder """ final String baseUrl = getBaseUrl(); final String identifier = baseUrl + req.getPartition() + req.getPath(); final Session session = ofNull...
java
public ResponseBuilder deleteResource(final Resource res) { final String baseUrl = getBaseUrl(); final String identifier = baseUrl + req.getPartition() + req.getPath(); final Session session = ofNullable(req.getSession()).orElseGet(HttpSession::new); // Check if this is already deleted...
[ "public", "ResponseBuilder", "deleteResource", "(", "final", "Resource", "res", ")", "{", "final", "String", "baseUrl", "=", "getBaseUrl", "(", ")", ";", "final", "String", "identifier", "=", "baseUrl", "+", "req", ".", "getPartition", "(", ")", "+", "req", ...
Delete the given resource @param res the resource @return a response builder
[ "Delete", "the", "given", "resource" ]
train
https://github.com/trellis-ldp-archive/trellis-http/blob/bc762f88602c49c2b137a7adf68d576666e55fff/src/main/java/org/trellisldp/http/impl/DeleteHandler.java#L62-L99
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.padLeft
public static String padLeft(String str, int totalChars, char ch) { """ Pads the given String to the left with the given character to ensure that it's at least totalChars long. """ if (str == null) { str = "null"; } StringBuilder sb = new StringBuilder(); for (int i = 0, num = total...
java
public static String padLeft(String str, int totalChars, char ch) { if (str == null) { str = "null"; } StringBuilder sb = new StringBuilder(); for (int i = 0, num = totalChars - str.length(); i < num; i++) { sb.append(ch); } sb.append(str); return sb.toString(); }
[ "public", "static", "String", "padLeft", "(", "String", "str", ",", "int", "totalChars", ",", "char", "ch", ")", "{", "if", "(", "str", "==", "null", ")", "{", "str", "=", "\"null\"", ";", "}", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ...
Pads the given String to the left with the given character to ensure that it's at least totalChars long.
[ "Pads", "the", "given", "String", "to", "the", "left", "with", "the", "given", "character", "to", "ensure", "that", "it", "s", "at", "least", "totalChars", "long", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L481-L491
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/Time.java
Time.valueOf
public static Time valueOf(String s) { """ Converts a string in JDBC time escape format to a <code>Time</code> value. @param s time in format "hh:mm:ss" @return a corresponding <code>Time</code> object """ int hour; int minute; int second; int firstColon; int secondC...
java
public static Time valueOf(String s) { int hour; int minute; int second; int firstColon; int secondColon; if (s == null) throw new java.lang.IllegalArgumentException(); firstColon = s.indexOf(':'); secondColon = s.indexOf(':', firstColon+1); if (...
[ "public", "static", "Time", "valueOf", "(", "String", "s", ")", "{", "int", "hour", ";", "int", "minute", ";", "int", "second", ";", "int", "firstColon", ";", "int", "secondColon", ";", "if", "(", "s", "==", "null", ")", "throw", "new", "java", ".", ...
Converts a string in JDBC time escape format to a <code>Time</code> value. @param s time in format "hh:mm:ss" @return a corresponding <code>Time</code> object
[ "Converts", "a", "string", "in", "JDBC", "time", "escape", "format", "to", "a", "<code", ">", "Time<", "/", "code", ">", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/Time.java#L90-L112
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java
LongExtensions.operator_greaterEqualsThan
@Pure @Inline(value="($1 >= $2)", constantExpression=true) public static boolean operator_greaterEqualsThan(long a, double b) { """ The binary <code>greaterEqualsThan</code> operator. This is the equivalent to the Java <code>&gt;=</code> operator. @param a a long. @param b a double. @return <code>a&gt;=...
java
@Pure @Inline(value="($1 >= $2)", constantExpression=true) public static boolean operator_greaterEqualsThan(long a, double b) { return a >= b; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 >= $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "boolean", "operator_greaterEqualsThan", "(", "long", "a", ",", "double", "b", ")", "{", "return", "a", ">=", "b", ";", "}" ]
The binary <code>greaterEqualsThan</code> operator. This is the equivalent to the Java <code>&gt;=</code> operator. @param a a long. @param b a double. @return <code>a&gt;=b</code> @since 2.3
[ "The", "binary", "<code", ">", "greaterEqualsThan<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "Java", "<code", ">", "&gt", ";", "=", "<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java#L362-L366
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java
lbgroup_binding.get
public static lbgroup_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch lbgroup_binding resource of given name . """ lbgroup_binding obj = new lbgroup_binding(); obj.set_name(name); lbgroup_binding response = (lbgroup_binding) obj.get_resource(service); return...
java
public static lbgroup_binding get(nitro_service service, String name) throws Exception{ lbgroup_binding obj = new lbgroup_binding(); obj.set_name(name); lbgroup_binding response = (lbgroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "lbgroup_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "lbgroup_binding", "obj", "=", "new", "lbgroup_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "lbg...
Use this API to fetch lbgroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbgroup_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java#L103-L108
enioka/jqm
jqm-all/jqm-model/src/main/java/com/enioka/jqm/model/JobDef.java
JobDef.map
static JobDef map(ResultSet rs, int colShift) { """ ResultSet is not modified (no rs.next called). @param rs @return """ JobDef tmp = new JobDef(); try { tmp.id = rs.getInt(1 + colShift); tmp.application = rs.getString(2 + colShift); tmp.applicat...
java
static JobDef map(ResultSet rs, int colShift) { JobDef tmp = new JobDef(); try { tmp.id = rs.getInt(1 + colShift); tmp.application = rs.getString(2 + colShift); tmp.applicationName = rs.getString(3 + colShift); tmp.canBeRestarted = true; ...
[ "static", "JobDef", "map", "(", "ResultSet", "rs", ",", "int", "colShift", ")", "{", "JobDef", "tmp", "=", "new", "JobDef", "(", ")", ";", "try", "{", "tmp", ".", "id", "=", "rs", ".", "getInt", "(", "1", "+", "colShift", ")", ";", "tmp", ".", ...
ResultSet is not modified (no rs.next called). @param rs @return
[ "ResultSet", "is", "not", "modified", "(", "no", "rs", ".", "next", "called", ")", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-model/src/main/java/com/enioka/jqm/model/JobDef.java#L462-L494
alkacon/opencms-core
src/org/opencms/workplace/CmsDialog.java
CmsDialog.htmlStart
public String htmlStart(String helpUrl, String title) { """ Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.<p> @param helpUrl the key for the online help to include on the page @param title the title for the page @return the start html of the pa...
java
public String htmlStart(String helpUrl, String title) { return pageHtml(HTML_START, helpUrl, title); }
[ "public", "String", "htmlStart", "(", "String", "helpUrl", ",", "String", "title", ")", "{", "return", "pageHtml", "(", "HTML_START", ",", "helpUrl", ",", "title", ")", ";", "}" ]
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.<p> @param helpUrl the key for the online help to include on the page @param title the title for the page @return the start html of the page
[ "Builds", "the", "start", "html", "of", "the", "page", "including", "setting", "of", "DOCTYPE", "and", "inserting", "a", "header", "with", "the", "content", "-", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsDialog.java#L1392-L1395
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsLockReportDialog.java
CmsLockReportDialog.getMessageForLock
private String getMessageForLock(LockIcon lockIcon, boolean hasLockedChildren) { """ Returns the dialog message for the given lock.<p> @param lockIcon the lock icon @param hasLockedChildren <code>true</code> if the given resource has locked children @return the dialog message """ String result ...
java
private String getMessageForLock(LockIcon lockIcon, boolean hasLockedChildren) { String result = ""; if (!hasLockedChildren && ((lockIcon == null) || (lockIcon == LockIcon.NONE))) { result = Messages.get().key(Messages.GUI_LOCK_REPORT_NOTHING_LOCKED_0); } else if ((lockIcon == LockI...
[ "private", "String", "getMessageForLock", "(", "LockIcon", "lockIcon", ",", "boolean", "hasLockedChildren", ")", "{", "String", "result", "=", "\"\"", ";", "if", "(", "!", "hasLockedChildren", "&&", "(", "(", "lockIcon", "==", "null", ")", "||", "(", "lockIc...
Returns the dialog message for the given lock.<p> @param lockIcon the lock icon @param hasLockedChildren <code>true</code> if the given resource has locked children @return the dialog message
[ "Returns", "the", "dialog", "message", "for", "the", "given", "lock", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsLockReportDialog.java#L346-L365
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/MultiPooledSocketFactory.java
MultiPooledSocketFactory.createSocketFactory
protected SocketFactory createSocketFactory(InetAddress address, int port, InetAddress localAddr, int localPort, long timeout) {...
java
protected SocketFactory createSocketFactory(InetAddress address, int port, InetAddress localAddr, int localPort, long timeout) ...
[ "protected", "SocketFactory", "createSocketFactory", "(", "InetAddress", "address", ",", "int", "port", ",", "InetAddress", "localAddr", ",", "int", "localPort", ",", "long", "timeout", ")", "{", "SocketFactory", "factory", ";", "factory", "=", "new", "PlainSocket...
Create socket factories for newly resolved addresses. Default implementation returns a LazySocketFactory wrapping a PooledSocketFactory wrapping a PlainSocketFactory.
[ "Create", "socket", "factories", "for", "newly", "resolved", "addresses", ".", "Default", "implementation", "returns", "a", "LazySocketFactory", "wrapping", "a", "PooledSocketFactory", "wrapping", "a", "PlainSocketFactory", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/MultiPooledSocketFactory.java#L137-L149
samskivert/samskivert
src/main/java/com/samskivert/util/PrefsConfig.java
PrefsConfig.setValue
public void setValue (String name, String value) { """ Sets the value of the specified preference, overriding the value defined in the configuration files shipped with the application. """ String oldValue = getValue(name, (String)null); _prefs.put(name, value); _propsup.firePropertyCha...
java
public void setValue (String name, String value) { String oldValue = getValue(name, (String)null); _prefs.put(name, value); _propsup.firePropertyChange(name, oldValue, value); }
[ "public", "void", "setValue", "(", "String", "name", ",", "String", "value", ")", "{", "String", "oldValue", "=", "getValue", "(", "name", ",", "(", "String", ")", "null", ")", ";", "_prefs", ".", "put", "(", "name", ",", "value", ")", ";", "_propsup...
Sets the value of the specified preference, overriding the value defined in the configuration files shipped with the application.
[ "Sets", "the", "value", "of", "the", "specified", "preference", "overriding", "the", "value", "defined", "in", "the", "configuration", "files", "shipped", "with", "the", "application", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PrefsConfig.java#L129-L134
hawkular/hawkular-agent
hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/util/Util.java
Util.write
public static void write(String string, File file) throws IOException { """ Stores {@code string} to {@code file} using {@link #ENCODING_UTF_8}. @param string the {@link String} to store @param file the file to store to @throws IOException on IO errors """ try (Writer w = new OutputStreamWriter(ne...
java
public static void write(String string, File file) throws IOException { try (Writer w = new OutputStreamWriter(new FileOutputStream(file), ENCODING_UTF_8)) { w.write(string); } }
[ "public", "static", "void", "write", "(", "String", "string", ",", "File", "file", ")", "throws", "IOException", "{", "try", "(", "Writer", "w", "=", "new", "OutputStreamWriter", "(", "new", "FileOutputStream", "(", "file", ")", ",", "ENCODING_UTF_8", ")", ...
Stores {@code string} to {@code file} using {@link #ENCODING_UTF_8}. @param string the {@link String} to store @param file the file to store to @throws IOException on IO errors
[ "Stores", "{", "@code", "string", "}", "to", "{", "@code", "file", "}", "using", "{", "@link", "#ENCODING_UTF_8", "}", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/util/Util.java#L259-L263
JOML-CI/JOML
src/org/joml/Quaterniond.java
Quaterniond.rotateAxis
public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ) { """ Apply a rotation to <code>this</code> quaternion rotating the given radians about the specified axis. <p> If <code>Q</code> is <code>this</code> quaternion and <code>R</code> the quaternion representing the specified rot...
java
public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ) { return rotateAxis(angle, axisX, axisY, axisZ, this); }
[ "public", "Quaterniond", "rotateAxis", "(", "double", "angle", ",", "double", "axisX", ",", "double", "axisY", ",", "double", "axisZ", ")", "{", "return", "rotateAxis", "(", "angle", ",", "axisX", ",", "axisY", ",", "axisZ", ",", "this", ")", ";", "}" ]
Apply a rotation to <code>this</code> quaternion rotating the given radians about the specified axis. <p> If <code>Q</code> is <code>this</code> quaternion and <code>R</code> the quaternion representing the specified rotation, then the new quaternion will be <code>Q * R</code>. So when transforming a vector <code>v</co...
[ "Apply", "a", "rotation", "to", "<code", ">", "this<", "/", "code", ">", "quaternion", "rotating", "the", "given", "radians", "about", "the", "specified", "axis", ".", "<p", ">", "If", "<code", ">", "Q<", "/", "code", ">", "is", "<code", ">", "this<", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaterniond.java#L2535-L2537
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/filters/Filters.java
Filters.matchAtLeastOnce
public static <T> boolean matchAtLeastOnce(final T object, final List<Filter<T>> filters) { """ Algorithms for accepting the supplied object if at least one of the supplied Filters accepts it. @param object The object to accept (or not). @param filters The non-null list of Filters to examine the supplied obje...
java
public static <T> boolean matchAtLeastOnce(final T object, final List<Filter<T>> filters) { // Check sanity Validate.notNull(filters, "filters"); boolean acceptedByAtLeastOneFilter = false; for (Filter<T> current : filters) { if (current.accept(object)) { ac...
[ "public", "static", "<", "T", ">", "boolean", "matchAtLeastOnce", "(", "final", "T", "object", ",", "final", "List", "<", "Filter", "<", "T", ">", ">", "filters", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "filters", ",", "\"filters\"", ...
Algorithms for accepting the supplied object if at least one of the supplied Filters accepts it. @param object The object to accept (or not). @param filters The non-null list of Filters to examine the supplied object. @param <T> The Filter type. @return {@code true} if at least one of the filters return true from...
[ "Algorithms", "for", "accepting", "the", "supplied", "object", "if", "at", "least", "one", "of", "the", "supplied", "Filters", "accepts", "it", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/filters/Filters.java#L51-L66
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java
BasicBondGenerator.generateBondElement
public IRenderingElement generateBondElement(IBond bond, RendererModel model) { """ Generate rendering elements for a bond, without ring elements but considering the type of the bond (single, double, triple). @param bond the bond to use when generating elements @param model the renderer model @return one or ...
java
public IRenderingElement generateBondElement(IBond bond, RendererModel model) { return generateBondElement(bond, bond.getOrder(), model); }
[ "public", "IRenderingElement", "generateBondElement", "(", "IBond", "bond", ",", "RendererModel", "model", ")", "{", "return", "generateBondElement", "(", "bond", ",", "bond", ".", "getOrder", "(", ")", ",", "model", ")", ";", "}" ]
Generate rendering elements for a bond, without ring elements but considering the type of the bond (single, double, triple). @param bond the bond to use when generating elements @param model the renderer model @return one or more rendering elements
[ "Generate", "rendering", "elements", "for", "a", "bond", "without", "ring", "elements", "but", "considering", "the", "type", "of", "the", "bond", "(", "single", "double", "triple", ")", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java#L295-L297
gosu-lang/gosu-lang
gosu-lab/src/main/java/editor/SmartFixManager.java
SmartFixManager.getDistanceFromPosition
private double getDistanceFromPosition( IParseIssue pi, int line, int col ) { """ Returns the cartesian distance of this parse issue from the given column/line in column/line units """ if( pi.getSource() != null && pi.getSource().getLocation() != null ) { int squaredDist = ((pi.getSource().getLo...
java
private double getDistanceFromPosition( IParseIssue pi, int line, int col ) { if( pi.getSource() != null && pi.getSource().getLocation() != null ) { int squaredDist = ((pi.getSource().getLocation().getLineNum() - line) * (pi.getSource().getLocation().getLineNum() - line)) + ((pi....
[ "private", "double", "getDistanceFromPosition", "(", "IParseIssue", "pi", ",", "int", "line", ",", "int", "col", ")", "{", "if", "(", "pi", ".", "getSource", "(", ")", "!=", "null", "&&", "pi", ".", "getSource", "(", ")", ".", "getLocation", "(", ")", ...
Returns the cartesian distance of this parse issue from the given column/line in column/line units
[ "Returns", "the", "cartesian", "distance", "of", "this", "parse", "issue", "from", "the", "given", "column", "/", "line", "in", "column", "/", "line", "units" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-lab/src/main/java/editor/SmartFixManager.java#L1263-L1275
knowm/XChange
xchange-btcturk/src/main/java/org/knowm/xchange/btcturk/BTCTurkAdapters.java
BTCTurkAdapters.adaptTrade
public static Trade adaptTrade(BTCTurkTrades btcTurkTrade, CurrencyPair currencyPair) { """ Adapts a BTCTurkTrade to a Trade Object @param btcTurkTrade The BTCTurkTrade trade @param currencyPair (e.g. BTC/TRY) @return The XChange Trade """ return new Trade( null, btcTurkTrade.getAmoun...
java
public static Trade adaptTrade(BTCTurkTrades btcTurkTrade, CurrencyPair currencyPair) { return new Trade( null, btcTurkTrade.getAmount(), currencyPair, btcTurkTrade.getPrice(), btcTurkTrade.getDate(), btcTurkTrade.getTid().toString()); }
[ "public", "static", "Trade", "adaptTrade", "(", "BTCTurkTrades", "btcTurkTrade", ",", "CurrencyPair", "currencyPair", ")", "{", "return", "new", "Trade", "(", "null", ",", "btcTurkTrade", ".", "getAmount", "(", ")", ",", "currencyPair", ",", "btcTurkTrade", ".",...
Adapts a BTCTurkTrade to a Trade Object @param btcTurkTrade The BTCTurkTrade trade @param currencyPair (e.g. BTC/TRY) @return The XChange Trade
[ "Adapts", "a", "BTCTurkTrade", "to", "a", "Trade", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-btcturk/src/main/java/org/knowm/xchange/btcturk/BTCTurkAdapters.java#L103-L112
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.leftShift
public static Path leftShift(Path self, Object text) throws IOException { """ Write the text to the Path. @param self a Path @param text the text to write to the Path @return the original file @throws java.io.IOException if an IOException occurs. @since 2.3.0 """ append(self, text); retu...
java
public static Path leftShift(Path self, Object text) throws IOException { append(self, text); return self; }
[ "public", "static", "Path", "leftShift", "(", "Path", "self", ",", "Object", "text", ")", "throws", "IOException", "{", "append", "(", "self", ",", "text", ")", ";", "return", "self", ";", "}" ]
Write the text to the Path. @param self a Path @param text the text to write to the Path @return the original file @throws java.io.IOException if an IOException occurs. @since 2.3.0
[ "Write", "the", "text", "to", "the", "Path", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L492-L495
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.getNode
public static Node getNode(Model mo, int nodeID) throws JSONConverterException { """ Get a node from its identifier. The node is already a part of the model @param mo the associated model to browse @param nodeID the node identifier @return the resulting node @throws JSONConverterException if there is no mod...
java
public static Node getNode(Model mo, int nodeID) throws JSONConverterException { Node n = new Node(nodeID); if (!mo.contains(n)) { throw new JSONConverterException("Undeclared node '" + nodeID + "'"); } return n; }
[ "public", "static", "Node", "getNode", "(", "Model", "mo", ",", "int", "nodeID", ")", "throws", "JSONConverterException", "{", "Node", "n", "=", "new", "Node", "(", "nodeID", ")", ";", "if", "(", "!", "mo", ".", "contains", "(", "n", ")", ")", "{", ...
Get a node from its identifier. The node is already a part of the model @param mo the associated model to browse @param nodeID the node identifier @return the resulting node @throws JSONConverterException if there is no model, or if the node is unknown.
[ "Get", "a", "node", "from", "its", "identifier", ".", "The", "node", "is", "already", "a", "part", "of", "the", "model" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L394-L400
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java
GVRMesh.setTexCoords
public void setTexCoords(float [] texCoords, int index) { """ Populates a set of texture coordinates for the mesh. <p> A mesh may have multiple sets of texture coordinates Each texture coordinate is represented as a packed {@code float} pair: <p> <code>{ u0, v0, u1, v1, u2, v2, ...}</code> This function upda...
java
public void setTexCoords(float [] texCoords, int index) { String key = (index > 0) ? (KEY_TEXCOORD + index) : KEY_TEXCOORD; mVertices.setFloatArray(key, texCoords); }
[ "public", "void", "setTexCoords", "(", "float", "[", "]", "texCoords", ",", "int", "index", ")", "{", "String", "key", "=", "(", "index", ">", "0", ")", "?", "(", "KEY_TEXCOORD", "+", "index", ")", ":", "KEY_TEXCOORD", ";", "mVertices", ".", "setFloatA...
Populates a set of texture coordinates for the mesh. <p> A mesh may have multiple sets of texture coordinates Each texture coordinate is represented as a packed {@code float} pair: <p> <code>{ u0, v0, u1, v1, u2, v2, ...}</code> This function updates the <i>a_texcoordN</i> vertex attribute where N is the value of the <...
[ "Populates", "a", "set", "of", "texture", "coordinates", "for", "the", "mesh", ".", "<p", ">", "A", "mesh", "may", "have", "multiple", "sets", "of", "texture", "coordinates", "Each", "texture", "coordinate", "is", "represented", "as", "a", "packed", "{" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java#L321-L325
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.findByGroupId
@Override public List<CPOptionCategory> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the cp option categories where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not prim...
java
@Override public List<CPOptionCategory> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPOptionCategory", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp option categories where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the se...
[ "Returns", "a", "range", "of", "all", "the", "cp", "option", "categories", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L1534-L1537
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionTypesInner.java
ConnectionTypesInner.getAsync
public Observable<ConnectionTypeInner> getAsync(String resourceGroupName, String automationAccountName, String connectionTypeName) { """ Retrieve the connectiontype identified by connectiontype name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automati...
java
public Observable<ConnectionTypeInner> getAsync(String resourceGroupName, String automationAccountName, String connectionTypeName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, connectionTypeName).map(new Func1<ServiceResponse<ConnectionTypeInner>, ConnectionTypeInner>() { ...
[ "public", "Observable", "<", "ConnectionTypeInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "connectionTypeName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automat...
Retrieve the connectiontype identified by connectiontype name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param connectionTypeName The name of connectiontype. @throws IllegalArgumentException thrown if parameters fail the validation @retu...
[ "Retrieve", "the", "connectiontype", "identified", "by", "connectiontype", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionTypesInner.java#L216-L223
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_email_PUT
public void serviceName_email_PUT(String serviceName, OvhEmail body) throws IOException { """ Alter this object properties REST: PUT /hosting/web/{serviceName}/email @param body [required] New object properties @param serviceName [required] The internal name of your hosting """ String qPath = "/hosting/...
java
public void serviceName_email_PUT(String serviceName, OvhEmail body) throws IOException { String qPath = "/hosting/web/{serviceName}/email"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_email_PUT", "(", "String", "serviceName", ",", "OvhEmail", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/email\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "serviceN...
Alter this object properties REST: PUT /hosting/web/{serviceName}/email @param body [required] New object properties @param serviceName [required] The internal name of your hosting
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1892-L1896
basho/riak-java-client
src/main/java/com/basho/riak/client/core/util/CharsetUtils.java
CharsetUtils.addCharset
public static String addCharset(String charset, String contentType) { """ Adds the charset to a content type. @param contentType @return the {@code contentType} with {@code charset.name()} appended. """ if (null == contentType) { return "text/plain;charset=" + charset; }...
java
public static String addCharset(String charset, String contentType) { if (null == contentType) { return "text/plain;charset=" + charset; } else { Matcher matcher = CHARSET_PATT.matcher(contentType); if (matcher.find()) { ...
[ "public", "static", "String", "addCharset", "(", "String", "charset", ",", "String", "contentType", ")", "{", "if", "(", "null", "==", "contentType", ")", "{", "return", "\"text/plain;charset=\"", "+", "charset", ";", "}", "else", "{", "Matcher", "matcher", ...
Adds the charset to a content type. @param contentType @return the {@code contentType} with {@code charset.name()} appended.
[ "Adds", "the", "charset", "to", "a", "content", "type", "." ]
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/CharsetUtils.java#L149-L169
recruit-mp/android-RMP-Appirater
library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java
RmpAppirater.setFirstLaunchDate
public static void setFirstLaunchDate(Context context, long firstLaunchDate) { """ Modify internal value. <p/> If you use this method, you might need to have a good understanding of this class code. @param context Context @param firstLaunchDate First launch date. """ SharedPreferences pre...
java
public static void setFirstLaunchDate(Context context, long firstLaunchDate) { SharedPreferences prefs = getSharedPreferences(context); SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putLong(PREF_KEY_APP_FIRST_LAUNCHED_DATE, firstLaunchDate); prefsEditor.commit(); ...
[ "public", "static", "void", "setFirstLaunchDate", "(", "Context", "context", ",", "long", "firstLaunchDate", ")", "{", "SharedPreferences", "prefs", "=", "getSharedPreferences", "(", "context", ")", ";", "SharedPreferences", ".", "Editor", "prefsEditor", "=", "prefs...
Modify internal value. <p/> If you use this method, you might need to have a good understanding of this class code. @param context Context @param firstLaunchDate First launch date.
[ "Modify", "internal", "value", ".", "<p", "/", ">", "If", "you", "use", "this", "method", "you", "might", "need", "to", "have", "a", "good", "understanding", "of", "this", "class", "code", "." ]
train
https://github.com/recruit-mp/android-RMP-Appirater/blob/14fcdf110dfb97120303f39aab1de9393e84b90a/library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java#L341-L348
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/guid/Guid.java
Guid.append
public Guid append(Guid... guids) throws IOException { """ Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to combine(this, guid1, guid2, ...) @param guids an array of {@link Guid}. @return a new {@link Guid}. @throws IOException """ if (gui...
java
public Guid append(Guid... guids) throws IOException { if (guids == null || guids.length == 0) { return this; } return combine(ArrayUtils.add(guids, this)); }
[ "public", "Guid", "append", "(", "Guid", "...", "guids", ")", "throws", "IOException", "{", "if", "(", "guids", "==", "null", "||", "guids", ".", "length", "==", "0", ")", "{", "return", "this", ";", "}", "return", "combine", "(", "ArrayUtils", ".", ...
Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to combine(this, guid1, guid2, ...) @param guids an array of {@link Guid}. @return a new {@link Guid}. @throws IOException
[ "Creates", "a", "new", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/guid/Guid.java#L162-L167
nextreports/nextreports-engine
src/ro/nextreports/engine/querybuilder/sql/SelectQuery.java
SelectQuery.appendList
private void appendList(Output out, Collection collection, String separator, boolean areColumns) { """ Iterate through a Collection and append all entries (using .toString()) to a StringBuffer. """ Iterator it = collection.iterator(); boolean hasNext = it.hasNext(); //boolean areColumn...
java
private void appendList(Output out, Collection collection, String separator, boolean areColumns) { Iterator it = collection.iterator(); boolean hasNext = it.hasNext(); //boolean areColumns = (columns == collection); while (hasNext) { Outputable sqlToken = (Outputable) it.nex...
[ "private", "void", "appendList", "(", "Output", "out", ",", "Collection", "collection", ",", "String", "separator", ",", "boolean", "areColumns", ")", "{", "Iterator", "it", "=", "collection", ".", "iterator", "(", ")", ";", "boolean", "hasNext", "=", "it", ...
Iterate through a Collection and append all entries (using .toString()) to a StringBuffer.
[ "Iterate", "through", "a", "Collection", "and", "append", "all", "entries", "(", "using", ".", "toString", "()", ")", "to", "a", "StringBuffer", "." ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/querybuilder/sql/SelectQuery.java#L671-L695
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java
Tile.getBoundingBox
public static BoundingBox getBoundingBox(Tile upperLeft, Tile lowerRight) { """ Return the BoundingBox of a rectangle of tiles defined by upper left and lower right tile. @param upperLeft tile in upper left corner. @param lowerRight tile in lower right corner. @return BoundingBox defined by the area around u...
java
public static BoundingBox getBoundingBox(Tile upperLeft, Tile lowerRight) { BoundingBox ul = upperLeft.getBoundingBox(); BoundingBox lr = lowerRight.getBoundingBox(); return ul.extendBoundingBox(lr); }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "Tile", "upperLeft", ",", "Tile", "lowerRight", ")", "{", "BoundingBox", "ul", "=", "upperLeft", ".", "getBoundingBox", "(", ")", ";", "BoundingBox", "lr", "=", "lowerRight", ".", "getBoundingBox", "(", ...
Return the BoundingBox of a rectangle of tiles defined by upper left and lower right tile. @param upperLeft tile in upper left corner. @param lowerRight tile in lower right corner. @return BoundingBox defined by the area around upperLeft and lowerRight Tile.
[ "Return", "the", "BoundingBox", "of", "a", "rectangle", "of", "tiles", "defined", "by", "upper", "left", "and", "lower", "right", "tile", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java#L38-L42
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
FSDirectory.getFileInfo
FileStatus getFileInfo(String src, INode targetNode) { """ Get the file info for a specific file. @param src The string representation of the path to the file @return object containing information regarding the file or null if file not found """ String srcs = normalizePath(src); readLock(); try ...
java
FileStatus getFileInfo(String src, INode targetNode) { String srcs = normalizePath(src); readLock(); try { if (targetNode == null) { return null; } else { return createFileStatus(srcs, targetNode); } } finally { readUnlock(); } }
[ "FileStatus", "getFileInfo", "(", "String", "src", ",", "INode", "targetNode", ")", "{", "String", "srcs", "=", "normalizePath", "(", "src", ")", ";", "readLock", "(", ")", ";", "try", "{", "if", "(", "targetNode", "==", "null", ")", "{", "return", "nu...
Get the file info for a specific file. @param src The string representation of the path to the file @return object containing information regarding the file or null if file not found
[ "Get", "the", "file", "info", "for", "a", "specific", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L1800-L1813
httl/httl
httl/src/main/java/httl/spi/codecs/json/JSONObject.java
JSONObject.getInt
public int getInt(String key, int def) { """ get int value. @param key key. @param def default value. @return value or default value. """ Object tmp = objectMap.get(key); return tmp != null && tmp instanceof Number ? ((Number) tmp).intValue() : def; }
java
public int getInt(String key, int def) { Object tmp = objectMap.get(key); return tmp != null && tmp instanceof Number ? ((Number) tmp).intValue() : def; }
[ "public", "int", "getInt", "(", "String", "key", ",", "int", "def", ")", "{", "Object", "tmp", "=", "objectMap", ".", "get", "(", "key", ")", ";", "return", "tmp", "!=", "null", "&&", "tmp", "instanceof", "Number", "?", "(", "(", "Number", ")", "tm...
get int value. @param key key. @param def default value. @return value or default value.
[ "get", "int", "value", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/spi/codecs/json/JSONObject.java#L63-L67
apptik/jus
android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java
ImageLoader.onGetImageError
protected void onGetImageError(String cacheKey, JusError error) { """ Handler for when an image failed to load. @param cacheKey The cache key that is associated with the image request. """ // Notify the requesters that something failed via a null result. // Remove this request from the list of...
java
protected void onGetImageError(String cacheKey, JusError error) { // Notify the requesters that something failed via a null result. // Remove this request from the list of in-flight requests. BatchedImageRequest request = inFlightRequests.remove(cacheKey); if (request != null) { ...
[ "protected", "void", "onGetImageError", "(", "String", "cacheKey", ",", "JusError", "error", ")", "{", "// Notify the requesters that something failed via a null result.", "// Remove this request from the list of in-flight requests.", "BatchedImageRequest", "request", "=", "inFlightR...
Handler for when an image failed to load. @param cacheKey The cache key that is associated with the image request.
[ "Handler", "for", "when", "an", "image", "failed", "to", "load", "." ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/android/jus-android/src/main/java/io/apptik/comm/jus/ui/ImageLoader.java#L363-L375
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/LazyList.java
LazyList.toJson
public String toJson(boolean pretty, String ... attrs) { """ Generates JSON from content of this list @param pretty true if you want pretty format, false if not @param attrs attributes to include, not providing any will include all. @return generated JSON """ hydrate(); StringBuilder sb = ...
java
public String toJson(boolean pretty, String ... attrs) { hydrate(); StringBuilder sb = new StringBuilder(); sb.append('['); if (pretty) sb.append('\n'); for (int i = 0; i < delegate.size(); i++) { if (i > 0) { sb.append(','); if (prett...
[ "public", "String", "toJson", "(", "boolean", "pretty", ",", "String", "...", "attrs", ")", "{", "hydrate", "(", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "'", "'", ")", ";", "if", "(", "...
Generates JSON from content of this list @param pretty true if you want pretty format, false if not @param attrs attributes to include, not providing any will include all. @return generated JSON
[ "Generates", "JSON", "from", "content", "of", "this", "list" ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/LazyList.java#L245-L261
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/ButtonFactory.java
ButtonFactory.createPostbackButton
public static Button createPostbackButton(String title, String payload) { """ Creates a button which sends a payload back when clicked. @param title the button label. @param payload the payload to send back when clicked. @return a {@link PostbackButton}. """ return new PostbackButton(title, ButtonType...
java
public static Button createPostbackButton(String title, String payload) { return new PostbackButton(title, ButtonType.POSTBACK, payload); }
[ "public", "static", "Button", "createPostbackButton", "(", "String", "title", ",", "String", "payload", ")", "{", "return", "new", "PostbackButton", "(", "title", ",", "ButtonType", ".", "POSTBACK", ",", "payload", ")", ";", "}" ]
Creates a button which sends a payload back when clicked. @param title the button label. @param payload the payload to send back when clicked. @return a {@link PostbackButton}.
[ "Creates", "a", "button", "which", "sends", "a", "payload", "back", "when", "clicked", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/ButtonFactory.java#L102-L104
liyiorg/weixin-popular
src/main/java/weixin/popular/api/MessageAPI.java
MessageAPI.templateApi_set_industry
public static BaseResult templateApi_set_industry(String access_token, String... industrys) { """ 模板消息 设置所属行业 @param access_token access_token @param industrys 行业值,暂设置个数限制为2个。<br> <p> 主行业 副行业 代码 <br> IT科技 互联网/电子商务 1 <br> IT科技 IT软件与服务 2 <br> IT科技 IT硬件与设备 3 <br> IT科技 电子技术 4 <br> IT科技 通信与运营商 5 <br> ...
java
public static BaseResult templateApi_set_industry(String access_token, String... industrys) { Map<String, String> map = new LinkedHashMap<String, String>(); for (int i = 1; i <= industrys.length; i++) { map.put("industry_id" + i, industrys[i - 1]); } String messageJson = Json...
[ "public", "static", "BaseResult", "templateApi_set_industry", "(", "String", "access_token", ",", "String", "...", "industrys", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", ")...
模板消息 设置所属行业 @param access_token access_token @param industrys 行业值,暂设置个数限制为2个。<br> <p> 主行业 副行业 代码 <br> IT科技 互联网/电子商务 1 <br> IT科技 IT软件与服务 2 <br> IT科技 IT硬件与设备 3 <br> IT科技 电子技术 4 <br> IT科技 通信与运营商 5 <br> IT科技 网络游戏 6 <br> 金融业 银行 7 <br> 金融业 基金|理财|信托 8 <br> 金融业 保险 9 <br> 餐饮 餐饮 10 <br> 酒店旅游 酒店 11 <br> 酒店旅游 旅游 12 <br> 运输与...
[ "模板消息", "设置所属行业" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/MessageAPI.java#L355-L368
softindex/datakernel
cloud-dataflow/src/main/java/io/datakernel/dataflow/server/DatagraphEnvironment.java
DatagraphEnvironment.setInstance
@SuppressWarnings("unchecked") public <T> DatagraphEnvironment setInstance(Class<T> type, T value) { """ Sets the specified instance for the given key (instance type). @param type instance type @param value instance @param <T> type of the instance @return this environment """ ((Map<Class<T>, T>) in...
java
@SuppressWarnings("unchecked") public <T> DatagraphEnvironment setInstance(Class<T> type, T value) { ((Map<Class<T>, T>) instances).put(type, value); return this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "DatagraphEnvironment", "setInstance", "(", "Class", "<", "T", ">", "type", ",", "T", "value", ")", "{", "(", "(", "Map", "<", "Class", "<", "T", ">", ",", "T", ">", ")", ...
Sets the specified instance for the given key (instance type). @param type instance type @param value instance @param <T> type of the instance @return this environment
[ "Sets", "the", "specified", "instance", "for", "the", "given", "key", "(", "instance", "type", ")", "." ]
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/cloud-dataflow/src/main/java/io/datakernel/dataflow/server/DatagraphEnvironment.java#L80-L84
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java
HttpUtils.executeGet
public static HttpResponse executeGet(final String url, final Map<String, Object> parameters) { """ Execute get http response. @param url the url @param parameters the parameters @return the http response """ try { return executeGet(url,...
java
public static HttpResponse executeGet(final String url, final Map<String, Object> parameters) { try { return executeGet(url, null, null, parameters); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return ...
[ "public", "static", "HttpResponse", "executeGet", "(", "final", "String", "url", ",", "final", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "{", "try", "{", "return", "executeGet", "(", "url", ",", "null", ",", "null", ",", "parameters", ...
Execute get http response. @param url the url @param parameters the parameters @return the http response
[ "Execute", "get", "http", "response", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L256-L264
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/util/StringUtil.java
StringUtil.sanitizeForUri
public static String sanitizeForUri(String uri, String replace) { """ Sanitizes a URI to conform with the URI standards RFC3986 http://www.ietf.org/rfc/rfc3986.txt. <p> Replaces all the disallowed characters for a correctly formed URI. @param uri The un-sanitized URI @param replace The character to replace the...
java
public static String sanitizeForUri(String uri, String replace) { /* * Explanation: * [a-zA-Z0-9\\._-] matches a letter from a-z lower or uppercase, numbers, dots, underscores and hyphen * [^a-zA-Z0-9\\._-] is the inverse. i.e. all characters which do not match the first expression ...
[ "public", "static", "String", "sanitizeForUri", "(", "String", "uri", ",", "String", "replace", ")", "{", "/*\n * Explanation:\n * [a-zA-Z0-9\\\\._-] matches a letter from a-z lower or uppercase, numbers, dots, underscores and hyphen\n * [^a-zA-Z0-9\\\\._-] is the inv...
Sanitizes a URI to conform with the URI standards RFC3986 http://www.ietf.org/rfc/rfc3986.txt. <p> Replaces all the disallowed characters for a correctly formed URI. @param uri The un-sanitized URI @param replace The character to replace the disallowed characters with @return The sanitized input
[ "Sanitizes", "a", "URI", "to", "conform", "with", "the", "URI", "standards", "RFC3986", "http", ":", "//", "www", ".", "ietf", ".", "org", "/", "rfc", "/", "rfc3986", ".", "txt", ".", "<p", ">", "Replaces", "all", "the", "disallowed", "characters", "fo...
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/util/StringUtil.java#L262-L272
lukas-krecan/JsonUnit
json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
JsonUtils.getNode
public static Node getNode(Object root, String path) { """ Returns node with given path. @param root @param path @return """ return getNode(root, Path.create(path)); }
java
public static Node getNode(Object root, String path) { return getNode(root, Path.create(path)); }
[ "public", "static", "Node", "getNode", "(", "Object", "root", ",", "String", "path", ")", "{", "return", "getNode", "(", "root", ",", "Path", ".", "create", "(", "path", ")", ")", ";", "}" ]
Returns node with given path. @param root @param path @return
[ "Returns", "node", "with", "given", "path", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java#L81-L83
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/model/JBBPFieldStruct.java
JBBPFieldStruct.mapTo
public <T> T mapTo(final Class<T> mappingClass, final int flags) { """ Map the structure fields to a class fields. @param <T> a class type @param mappingClass a mapping class to be mapped by the structure fields, must not be null and must have the default constructor @param flags special flag...
java
public <T> T mapTo(final Class<T> mappingClass, final int flags) { return mapTo(mappingClass, null, flags); }
[ "public", "<", "T", ">", "T", "mapTo", "(", "final", "Class", "<", "T", ">", "mappingClass", ",", "final", "int", "flags", ")", "{", "return", "mapTo", "(", "mappingClass", ",", "null", ",", "flags", ")", ";", "}" ]
Map the structure fields to a class fields. @param <T> a class type @param mappingClass a mapping class to be mapped by the structure fields, must not be null and must have the default constructor @param flags special flags to tune mapping @return a mapped instance of the class, must not be null
[ "Map", "the", "structure", "fields", "to", "a", "class", "fields", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/model/JBBPFieldStruct.java#L244-L246
signit-wesign/java-sdk
src/main/java/cn/signit/sdk/util/HmacSignatureBuilder.java
HmacSignatureBuilder.isHashEqualsWithBase64
public boolean isHashEqualsWithBase64(String expectedSignatureBase64, BuilderMode builderMode) { """ 判断期望摘要是否与已构建的摘要相等. @param expectedSignatureBase64 传入的期望摘要base64编码表示的字符串 @param builderMode 采用的构建模式 @return <code>true</code> - 期望摘要与已构建的摘要相等; <code>false</code> - 期望摘要与已构建的摘要不相等 @author zhd @since 1.0.0 ...
java
public boolean isHashEqualsWithBase64(String expectedSignatureBase64, BuilderMode builderMode) { try { final byte[] signature = build(builderMode); return MessageDigest.isEqual(signature, DatatypeConverter.parseBase64Binary(expectedSignatureBase64)); } catch (Throwable e) { ...
[ "public", "boolean", "isHashEqualsWithBase64", "(", "String", "expectedSignatureBase64", ",", "BuilderMode", "builderMode", ")", "{", "try", "{", "final", "byte", "[", "]", "signature", "=", "build", "(", "builderMode", ")", ";", "return", "MessageDigest", ".", ...
判断期望摘要是否与已构建的摘要相等. @param expectedSignatureBase64 传入的期望摘要base64编码表示的字符串 @param builderMode 采用的构建模式 @return <code>true</code> - 期望摘要与已构建的摘要相等; <code>false</code> - 期望摘要与已构建的摘要不相等 @author zhd @since 1.0.0
[ "判断期望摘要是否与已构建的摘要相等", "." ]
train
https://github.com/signit-wesign/java-sdk/blob/6f3196c9d444818a953396fdaa8ffed9794d9530/src/main/java/cn/signit/sdk/util/HmacSignatureBuilder.java#L753-L761
lucee/Lucee
core/src/main/java/lucee/commons/io/SystemUtil.java
SystemUtil.getClassPathesFromClassLoader
private static void getClassPathesFromClassLoader(URLClassLoader ucl, ArrayList<Resource> pathes) { """ get class pathes from all url ClassLoaders @param ucl URL Class Loader @param pathes Hashmap with allpathes """ ClassLoader pcl = ucl.getParent(); // parent first if (pcl instanceof URLClassLoader) ge...
java
private static void getClassPathesFromClassLoader(URLClassLoader ucl, ArrayList<Resource> pathes) { ClassLoader pcl = ucl.getParent(); // parent first if (pcl instanceof URLClassLoader) getClassPathesFromClassLoader((URLClassLoader) pcl, pathes); ResourceProvider frp = ResourcesImpl.getFileResourceProvider(); // ...
[ "private", "static", "void", "getClassPathesFromClassLoader", "(", "URLClassLoader", "ucl", ",", "ArrayList", "<", "Resource", ">", "pathes", ")", "{", "ClassLoader", "pcl", "=", "ucl", ".", "getParent", "(", ")", ";", "// parent first", "if", "(", "pcl", "ins...
get class pathes from all url ClassLoaders @param ucl URL Class Loader @param pathes Hashmap with allpathes
[ "get", "class", "pathes", "from", "all", "url", "ClassLoaders" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/SystemUtil.java#L459-L472
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.sortThis
public static <T, L extends List<T>> L sortThis(L list, Comparator<? super T> comparator) { """ SortThis is a mutating method. The List passed in is also returned. """ if (list instanceof MutableList) { ((MutableList<T>) list).sortThis(comparator); } else if (list i...
java
public static <T, L extends List<T>> L sortThis(L list, Comparator<? super T> comparator) { if (list instanceof MutableList) { ((MutableList<T>) list).sortThis(comparator); } else if (list instanceof ArrayList) { ArrayListIterate.sortThis((ArrayList<T>...
[ "public", "static", "<", "T", ",", "L", "extends", "List", "<", "T", ">", ">", "L", "sortThis", "(", "L", "list", ",", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "if", "(", "list", "instanceof", "MutableList", ")", "{", "(",...
SortThis is a mutating method. The List passed in is also returned.
[ "SortThis", "is", "a", "mutating", "method", ".", "The", "List", "passed", "in", "is", "also", "returned", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L873-L891
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getElementMatching
@Pure public static Element getElementMatching(Node document, XMLConstraint constraint, boolean caseSensitive, String... path) { """ Replies the node that corresponds to the specified path. <p>The path is an ordered list of tag's names and ended by the name of the desired node. @param document is the XML d...
java
@Pure public static Element getElementMatching(Node document, XMLConstraint constraint, boolean caseSensitive, String... path) { assert document != null : AssertMessages.notNullParameter(0); assert constraint != null : AssertMessages.notNullParameter(1); for (final Element element : getElementsFromPath(document,...
[ "@", "Pure", "public", "static", "Element", "getElementMatching", "(", "Node", "document", ",", "XMLConstraint", "constraint", ",", "boolean", "caseSensitive", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", "."...
Replies the node that corresponds to the specified path. <p>The path is an ordered list of tag's names and ended by the name of the desired node. @param document is the XML document to explore. @param constraint is the constraint that the replied element must respect. @param caseSensitive indicates of the {@code path...
[ "Replies", "the", "node", "that", "corresponds", "to", "the", "specified", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1419-L1429
netty/netty
handler/src/main/java/io/netty/handler/logging/LoggingHandler.java
LoggingHandler.formatByteBuf
private static String formatByteBuf(ChannelHandlerContext ctx, String eventName, ByteBuf msg) { """ Generates the default log message of the specified event whose argument is a {@link ByteBuf}. """ String chStr = ctx.channel().toString(); int length = msg.readableBytes(); if (length == ...
java
private static String formatByteBuf(ChannelHandlerContext ctx, String eventName, ByteBuf msg) { String chStr = ctx.channel().toString(); int length = msg.readableBytes(); if (length == 0) { StringBuilder buf = new StringBuilder(chStr.length() + 1 + eventName.length() + 4); ...
[ "private", "static", "String", "formatByteBuf", "(", "ChannelHandlerContext", "ctx", ",", "String", "eventName", ",", "ByteBuf", "msg", ")", "{", "String", "chStr", "=", "ctx", ".", "channel", "(", ")", ".", "toString", "(", ")", ";", "int", "length", "=",...
Generates the default log message of the specified event whose argument is a {@link ByteBuf}.
[ "Generates", "the", "default", "log", "message", "of", "the", "specified", "event", "whose", "argument", "is", "a", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java#L323-L339
lukas-krecan/JsonUnit
json-unit/src/main/java/net/javacrumbs/jsonunit/JsonAssert.java
JsonAssert.assertJsonStructureEquals
@Deprecated public static void assertJsonStructureEquals(Object expected, Object actual) { """ Compares structures of two JSON documents. Is too lenient, ignores types, prefer IGNORING_VALUES option instead. Throws {@link AssertionError} if they are different. @deprecated Use IGNORING_VALUES option instead...
java
@Deprecated public static void assertJsonStructureEquals(Object expected, Object actual) { Diff diff = create(expected, actual, ACTUAL, ROOT, configuration.withOptions(COMPARING_ONLY_STRUCTURE)); diff.failIfDifferent(); }
[ "@", "Deprecated", "public", "static", "void", "assertJsonStructureEquals", "(", "Object", "expected", ",", "Object", "actual", ")", "{", "Diff", "diff", "=", "create", "(", "expected", ",", "actual", ",", "ACTUAL", ",", "ROOT", ",", "configuration", ".", "w...
Compares structures of two JSON documents. Is too lenient, ignores types, prefer IGNORING_VALUES option instead. Throws {@link AssertionError} if they are different. @deprecated Use IGNORING_VALUES option instead
[ "Compares", "structures", "of", "two", "JSON", "documents", ".", "Is", "too", "lenient", "ignores", "types", "prefer", "IGNORING_VALUES", "option", "instead", ".", "Throws", "{", "@link", "AssertionError", "}", "if", "they", "are", "different", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit/src/main/java/net/javacrumbs/jsonunit/JsonAssert.java#L128-L132
jeluard/semantic-versioning
api/src/main/java/org/osjava/jardiff/DOMDiffHandler.java
DOMDiffHandler.methodChanged
public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { """ Write out info aboout a changed method. This writes out a &lt;methodchange&gt; node, followed by a &lt;from&gt; node, with the old information about the method followed by a &lt;to&gt; node with the new informat...
java
public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "methodchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_...
[ "public", "void", "methodChanged", "(", "MethodInfo", "oldInfo", ",", "MethodInfo", "newInfo", ")", "throws", "DiffException", "{", "Node", "currentNode", "=", "this", ".", "currentNode", ";", "Element", "tmp", "=", "doc", ".", "createElementNS", "(", "XML_URI",...
Write out info aboout a changed method. This writes out a &lt;methodchange&gt; node, followed by a &lt;from&gt; node, with the old information about the method followed by a &lt;to&gt; node with the new information about the method. @param oldInfo Info about the old method. @param newInfo Info about the new method. @t...
[ "Write", "out", "info", "aboout", "a", "changed", "method", ".", "This", "writes", "out", "a", "&lt", ";", "methodchange&gt", ";", "node", "followed", "by", "a", "&lt", ";", "from&gt", ";", "node", "with", "the", "old", "information", "about", "the", "me...
train
https://github.com/jeluard/semantic-versioning/blob/d0bfbeddca8ac4202f5225810227c72a708360a9/api/src/main/java/org/osjava/jardiff/DOMDiffHandler.java#L433-L448
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java
NestedJarHandler.downloadTempFile
private File downloadTempFile(final String jarURL, final LogNode log) { """ Download a jar from a URL to a temporary file. @param jarURL the jar URL @param log the log @return the temporary file the jar was downloaded to """ final LogNode subLog = log == null ? null : log.log(jarURL, "Downloadin...
java
private File downloadTempFile(final String jarURL, final LogNode log) { final LogNode subLog = log == null ? null : log.log(jarURL, "Downloading URL " + jarURL); File tempFile; try { tempFile = makeTempFile(jarURL, /* onlyUseLeafname = */ true); final URL url = new URL(ja...
[ "private", "File", "downloadTempFile", "(", "final", "String", "jarURL", ",", "final", "LogNode", "log", ")", "{", "final", "LogNode", "subLog", "=", "log", "==", "null", "?", "null", ":", "log", ".", "log", "(", "jarURL", ",", "\"Downloading URL \"", "+",...
Download a jar from a URL to a temporary file. @param jarURL the jar URL @param log the log @return the temporary file the jar was downloaded to
[ "Download", "a", "jar", "from", "a", "URL", "to", "a", "temporary", "file", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java#L522-L547
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.exportObjects2CSV
public void exportObjects2CSV(List<?> data, Class clazz, boolean isWriteHeader, OutputStream os) throws Excel4JException { """ 基于注解导出CSV文件流 @param data 待导出 @param clazz {@link com.github.crab2died.annotation.ExcelField}映射对象Class @param isWriteHeader 是否写入文件 @param os 输出...
java
public void exportObjects2CSV(List<?> data, Class clazz, boolean isWriteHeader, OutputStream os) throws Excel4JException { try { Writer writer = new OutputStreamWriter(os); exportCSVByMapHandler(data, clazz, isWriteHeader, writer); } catch (Excel4JException | IOExcep...
[ "public", "void", "exportObjects2CSV", "(", "List", "<", "?", ">", "data", ",", "Class", "clazz", ",", "boolean", "isWriteHeader", ",", "OutputStream", "os", ")", "throws", "Excel4JException", "{", "try", "{", "Writer", "writer", "=", "new", "OutputStreamWrite...
基于注解导出CSV文件流 @param data 待导出 @param clazz {@link com.github.crab2died.annotation.ExcelField}映射对象Class @param isWriteHeader 是否写入文件 @param os 输出流 @throws Excel4JException exception
[ "基于注解导出CSV文件流" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L1660-L1669
google/closure-compiler
src/com/google/javascript/jscomp/DestructuredTarget.java
DestructuredTarget.createTarget
static DestructuredTarget createTarget( JSTypeRegistry registry, Supplier<JSType> destructuringPatternType, Node destructuringChild) { """ Converts a given child of a destructuring pattern (in the AST) to an instance of this class. NOTE: does not accept EMPTY nodes """ checkArgument(destructuringC...
java
static DestructuredTarget createTarget( JSTypeRegistry registry, Supplier<JSType> destructuringPatternType, Node destructuringChild) { checkArgument(destructuringChild.getParent().isDestructuringPattern(), destructuringChild); Builder builder = new Builder(registry, destructuringChild.getParent()...
[ "static", "DestructuredTarget", "createTarget", "(", "JSTypeRegistry", "registry", ",", "Supplier", "<", "JSType", ">", "destructuringPatternType", ",", "Node", "destructuringChild", ")", "{", "checkArgument", "(", "destructuringChild", ".", "getParent", "(", ")", "."...
Converts a given child of a destructuring pattern (in the AST) to an instance of this class. NOTE: does not accept EMPTY nodes
[ "Converts", "a", "given", "child", "of", "a", "destructuring", "pattern", "(", "in", "the", "AST", ")", "to", "an", "instance", "of", "this", "class", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DestructuredTarget.java#L169-L225
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageReadChannel.java
GoogleCloudStorageReadChannel.initMetadata
@VisibleForTesting protected void initMetadata( @Nullable String encoding, long sizeFromMetadata, @Nullable String generation) throws IOException { """ Initializes metadata (size, encoding, etc) from passed parameters. """ checkState( !metadataInitialized, "can not initialize ...
java
@VisibleForTesting protected void initMetadata( @Nullable String encoding, long sizeFromMetadata, @Nullable String generation) throws IOException { checkState( !metadataInitialized, "can not initialize metadata, it already initialized for '%s'", resourceIdString); gzipEncoded = nul...
[ "@", "VisibleForTesting", "protected", "void", "initMetadata", "(", "@", "Nullable", "String", "encoding", ",", "long", "sizeFromMetadata", ",", "@", "Nullable", "String", "generation", ")", "throws", "IOException", "{", "checkState", "(", "!", "metadataInitialized"...
Initializes metadata (size, encoding, etc) from passed parameters.
[ "Initializes", "metadata", "(", "size", "encoding", "etc", ")", "from", "passed", "parameters", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageReadChannel.java#L795-L818
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java
HttpFields.put
public void put(String name, String value) { """ Set a field. @param name the name of the field @param value the value of the field. If null the field is cleared. """ if (value == null) remove(name); else put(new HttpField(name, value)); }
java
public void put(String name, String value) { if (value == null) remove(name); else put(new HttpField(name, value)); }
[ "public", "void", "put", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "remove", "(", "name", ")", ";", "else", "put", "(", "new", "HttpField", "(", "name", ",", "value", ")", ")", ";", "}" ]
Set a field. @param name the name of the field @param value the value of the field. If null the field is cleared.
[ "Set", "a", "field", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L502-L507
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/impl/EmvParser.java
EmvParser.extractTrackData
protected boolean extractTrackData(final EmvCard pEmvCard, final byte[] pData) { """ Method used to extract track data from response @param pEmvCard Card data @param pData data send by card @return true if track 1 or track 2 can be read """ template.get().getCard().setTrack1(TrackUtils.extractTrack1Da...
java
protected boolean extractTrackData(final EmvCard pEmvCard, final byte[] pData) { template.get().getCard().setTrack1(TrackUtils.extractTrack1Data(TlvUtil.getValue(pData, EmvTags.TRACK1_DATA))); template.get().getCard().setTrack2(TrackUtils.extractTrack2EquivalentData(TlvUtil.getValue(pData, EmvTags.TRACK_2_EQV_DATA,...
[ "protected", "boolean", "extractTrackData", "(", "final", "EmvCard", "pEmvCard", ",", "final", "byte", "[", "]", "pData", ")", "{", "template", ".", "get", "(", ")", ".", "getCard", "(", ")", ".", "setTrack1", "(", "TrackUtils", ".", "extractTrack1Data", "...
Method used to extract track data from response @param pEmvCard Card data @param pData data send by card @return true if track 1 or track 2 can be read
[ "Method", "used", "to", "extract", "track", "data", "from", "response" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/impl/EmvParser.java#L303-L307
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsWidgetDialog.java
CmsWidgetDialog.buildAddElement
public String buildAddElement(String elementName, int insertAfter, boolean enabled) { """ Returns the html for a button to add an optional element.<p> @param elementName name of the element @param insertAfter the index of the element after which the new element should be created @param enabled if true, the bu...
java
public String buildAddElement(String elementName, int insertAfter, boolean enabled) { if (enabled) { StringBuffer href = new StringBuffer(4); href.append("javascript:addElement('"); href.append(elementName); href.append("', "); href.append(insertAfter...
[ "public", "String", "buildAddElement", "(", "String", "elementName", ",", "int", "insertAfter", ",", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "StringBuffer", "href", "=", "new", "StringBuffer", "(", "4", ")", ";", "href", ".", "appen...
Returns the html for a button to add an optional element.<p> @param elementName name of the element @param insertAfter the index of the element after which the new element should be created @param enabled if true, the button to add an element is shown, otherwise a spacer is returned @return the html for a button to ad...
[ "Returns", "the", "html", "for", "a", "button", "to", "add", "an", "optional", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsWidgetDialog.java#L225-L238
m-m-m/util
core/src/main/java/net/sf/mmm/util/lang/base/EqualsCheckerCollection.java
EqualsCheckerCollection.isEqualCollectionType
protected boolean isEqualCollectionType(Collection<?> collection1, Collection<?> collection2) { """ This method is called from {@link #isEqualNotNull(Object, Object)} to check if the {@link Object#getClass() type} of two given {@link Collection}s should be considered as equal. @param collection1 is the first {...
java
protected boolean isEqualCollectionType(Collection<?> collection1, Collection<?> collection2) { return collection1.getClass().equals(collection2.getClass()); }
[ "protected", "boolean", "isEqualCollectionType", "(", "Collection", "<", "?", ">", "collection1", ",", "Collection", "<", "?", ">", "collection2", ")", "{", "return", "collection1", ".", "getClass", "(", ")", ".", "equals", "(", "collection2", ".", "getClass",...
This method is called from {@link #isEqualNotNull(Object, Object)} to check if the {@link Object#getClass() type} of two given {@link Collection}s should be considered as equal. @param collection1 is the first {@link Collection}. @param collection2 is the second {@link Collection}. @return {@code true} if the {@link O...
[ "This", "method", "is", "called", "from", "{", "@link", "#isEqualNotNull", "(", "Object", "Object", ")", "}", "to", "check", "if", "the", "{", "@link", "Object#getClass", "()", "type", "}", "of", "two", "given", "{", "@link", "Collection", "}", "s", "sho...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/core/src/main/java/net/sf/mmm/util/lang/base/EqualsCheckerCollection.java#L84-L87