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
weld/core
environments/common/src/main/java/org/jboss/weld/environment/util/BeanArchives.java
BeanArchives.extractBeanArchiveId
public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { """ Takes the {@link #getBeanArchiveRef()} value and extracts the bean archive id. <ol> <li>First, the windows file separators found in beanArchiveRef are converted to slashes</li> <li>{@code base} value is appende...
java
public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRe...
[ "public", "static", "String", "extractBeanArchiveId", "(", "String", "beanArchiveRef", ",", "String", "base", ",", "String", "separator", ")", "{", "beanArchiveRef", "=", "beanArchiveRef", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "StringBuilder"...
Takes the {@link #getBeanArchiveRef()} value and extracts the bean archive id. <ol> <li>First, the windows file separators found in beanArchiveRef are converted to slashes</li> <li>{@code base} value is appended</li> <li>{@link BeanArchives#BEAN_ARCHIVE_ID_BASE_DELIMITER} is appended</li> <li>If the {@code beanArchiveR...
[ "Takes", "the", "{", "@link", "#getBeanArchiveRef", "()", "}", "value", "and", "extracts", "the", "bean", "archive", "id", ".", "<ol", ">", "<li", ">", "First", "the", "windows", "file", "separators", "found", "in", "beanArchiveRef", "are", "converted", "to"...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/environments/common/src/main/java/org/jboss/weld/environment/util/BeanArchives.java#L103-L114
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/formatters/impl/XLSFormatter.java
XLSFormatter.addRangeBounds
protected void addRangeBounds(BandData band, CellReference[] crefs) { """ This method adds range bounds to cache. Key is bandName @param band - band @param crefs - range """ if (templateBounds.containsKey(band.getName())) return; Bounds bounds = new Bounds(crefs[0].getRow(), cr...
java
protected void addRangeBounds(BandData band, CellReference[] crefs) { if (templateBounds.containsKey(band.getName())) return; Bounds bounds = new Bounds(crefs[0].getRow(), crefs[0].getCol(), crefs[crefs.length - 1].getRow(), crefs[crefs.length - 1].getCol()); templateBounds.put(band....
[ "protected", "void", "addRangeBounds", "(", "BandData", "band", ",", "CellReference", "[", "]", "crefs", ")", "{", "if", "(", "templateBounds", ".", "containsKey", "(", "band", ".", "getName", "(", ")", ")", ")", "return", ";", "Bounds", "bounds", "=", "...
This method adds range bounds to cache. Key is bandName @param band - band @param crefs - range
[ "This", "method", "adds", "range", "bounds", "to", "cache", ".", "Key", "is", "bandName" ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/formatters/impl/XLSFormatter.java#L710-L715
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java
HBaseSchemaManager.setExternalProperties
private void setExternalProperties(String name, HColumnDescriptor hColumnDescriptor) { """ Sets the external properties. @param name the name @param hColumnDescriptor the h column descriptor """ Properties properties = externalProperties != null ? externalProperties.get(name) : null; if (...
java
private void setExternalProperties(String name, HColumnDescriptor hColumnDescriptor) { Properties properties = externalProperties != null ? externalProperties.get(name) : null; if (properties != null && !properties.isEmpty()) { for (Object obj : properties.keySet()) {...
[ "private", "void", "setExternalProperties", "(", "String", "name", ",", "HColumnDescriptor", "hColumnDescriptor", ")", "{", "Properties", "properties", "=", "externalProperties", "!=", "null", "?", "externalProperties", ".", "get", "(", "name", ")", ":", "null", "...
Sets the external properties. @param name the name @param hColumnDescriptor the h column descriptor
[ "Sets", "the", "external", "properties", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java#L380-L391
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/ReceiptTemplate.java
ReceiptTemplate.setElement
public void setElement(String title, String subtitle, String quantity, String price, String currency, String image_url) { """ Set Element @param title the receipt element title @param subtitle the receipt element subtitle @param quantity the receipt element quantity @param price the receipt element price @p...
java
public void setElement(String title, String subtitle, String quantity, String price, String currency, String image_url) { HashMap<String, String> element = new HashMap<String, String>(); element.put("title", title); element.put("subtitle", subtitle); element.put("quantity", quantity)...
[ "public", "void", "setElement", "(", "String", "title", ",", "String", "subtitle", ",", "String", "quantity", ",", "String", "price", ",", "String", "currency", ",", "String", "image_url", ")", "{", "HashMap", "<", "String", ",", "String", ">", "element", ...
Set Element @param title the receipt element title @param subtitle the receipt element subtitle @param quantity the receipt element quantity @param price the receipt element price @param currency the receipt element currency @param image_url the receipt element image url
[ "Set", "Element" ]
train
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/ReceiptTemplate.java#L132-L142
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/FastMath.java
FastMath.copySign
public static double copySign(double magnitude, double sign) { """ Returns the first argument with the sign of the second argument. A NaN {@code sign} argument is treated as positive. @param magnitude the value to return @param sign the sign for the returned value @return the magnitude with the same sign as ...
java
public static double copySign(double magnitude, double sign){ long m = Double.doubleToLongBits(magnitude); long s = Double.doubleToLongBits(sign); if ((m >= 0 && s >= 0) || (m < 0 && s < 0)) { // Sign is currently OK return magnitude; } return -magnitude; // flip sign...
[ "public", "static", "double", "copySign", "(", "double", "magnitude", ",", "double", "sign", ")", "{", "long", "m", "=", "Double", ".", "doubleToLongBits", "(", "magnitude", ")", ";", "long", "s", "=", "Double", ".", "doubleToLongBits", "(", "sign", ")", ...
Returns the first argument with the sign of the second argument. A NaN {@code sign} argument is treated as positive. @param magnitude the value to return @param sign the sign for the returned value @return the magnitude with the same sign as the {@code sign} argument
[ "Returns", "the", "first", "argument", "with", "the", "sign", "of", "the", "second", "argument", ".", "A", "NaN", "{", "@code", "sign", "}", "argument", "is", "treated", "as", "positive", "." ]
train
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMath.java#L3672-L3679
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java
GameEncryptionData.getCipher
public Cipher getCipher() throws GeneralSecurityException { """ Creates a cipher for decrypting data with the specified key. @return A Blowfish/ECB/PKCS5Padding cipher in decryption mode. @throws GeneralSecurityException """ Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cip...
java
public Cipher getCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
[ "public", "Cipher", "getCipher", "(", ")", "throws", "GeneralSecurityException", "{", "Cipher", "cipher", "=", "Cipher", ".", "getInstance", "(", "\"Blowfish/ECB/PKCS5Padding\"", ")", ";", "cipher", ".", "init", "(", "Cipher", ".", "DECRYPT_MODE", ",", "new", "S...
Creates a cipher for decrypting data with the specified key. @return A Blowfish/ECB/PKCS5Padding cipher in decryption mode. @throws GeneralSecurityException
[ "Creates", "a", "cipher", "for", "decrypting", "data", "with", "the", "specified", "key", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java#L41-L46
EsfingeFramework/ClassMock
ClassMock/src/main/java/net/sf/esfinge/classmock/ClassMockUtils.java
ClassMockUtils.newInstance
public static Object newInstance(final IClassWriter classMock) { """ Creates a new instance from class generated by IClassWriter @param classMock the class definition @return instance of your class defined by IClassWriter """ try { final Class<?> clazz = classMock.build(); ...
java
public static Object newInstance(final IClassWriter classMock) { try { final Class<?> clazz = classMock.build(); return clazz.newInstance(); } catch (final Exception e) { throw new RuntimeException("Can't intanciate class", e); } }
[ "public", "static", "Object", "newInstance", "(", "final", "IClassWriter", "classMock", ")", "{", "try", "{", "final", "Class", "<", "?", ">", "clazz", "=", "classMock", ".", "build", "(", ")", ";", "return", "clazz", ".", "newInstance", "(", ")", ";", ...
Creates a new instance from class generated by IClassWriter @param classMock the class definition @return instance of your class defined by IClassWriter
[ "Creates", "a", "new", "instance", "from", "class", "generated", "by", "IClassWriter" ]
train
https://github.com/EsfingeFramework/ClassMock/blob/a354c9dc68e8813fc4e995eef13e34796af58892/ClassMock/src/main/java/net/sf/esfinge/classmock/ClassMockUtils.java#L184-L196
pawelprazak/java-extended
guava/src/main/java/com/bluecatcode/common/io/Closeables.java
Closeables.closeableFrom
public static Closeable closeableFrom(@WillNotClose @Nullable final Blob blob) { """ Provides {@link Closeable} interface for {@link Blob} @param blob the blob to decorate @return a closeable decorated clob """ return closeableFrom(blob, Blob::free); }
java
public static Closeable closeableFrom(@WillNotClose @Nullable final Blob blob) { return closeableFrom(blob, Blob::free); }
[ "public", "static", "Closeable", "closeableFrom", "(", "@", "WillNotClose", "@", "Nullable", "final", "Blob", "blob", ")", "{", "return", "closeableFrom", "(", "blob", ",", "Blob", "::", "free", ")", ";", "}" ]
Provides {@link Closeable} interface for {@link Blob} @param blob the blob to decorate @return a closeable decorated clob
[ "Provides", "{", "@link", "Closeable", "}", "interface", "for", "{", "@link", "Blob", "}" ]
train
https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/io/Closeables.java#L68-L70
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/Interval.java
Interval.parseStartExtended
private static Interval parseStartExtended(CharSequence startStr, CharSequence endStr) { """ handle case where Instant is outside the bounds of OffsetDateTime """ Instant start = Instant.parse(startStr); if (endStr.length() > 0) { char c = endStr.charAt(0); if (c == 'P' ...
java
private static Interval parseStartExtended(CharSequence startStr, CharSequence endStr) { Instant start = Instant.parse(startStr); if (endStr.length() > 0) { char c = endStr.charAt(0); if (c == 'P' || c == 'p') { PeriodDuration amount = PeriodDuration.parse(endStr)...
[ "private", "static", "Interval", "parseStartExtended", "(", "CharSequence", "startStr", ",", "CharSequence", "endStr", ")", "{", "Instant", "start", "=", "Instant", ".", "parse", "(", "startStr", ")", ";", "if", "(", "endStr", ".", "length", "(", ")", ">", ...
handle case where Instant is outside the bounds of OffsetDateTime
[ "handle", "case", "where", "Instant", "is", "outside", "the", "bounds", "of", "OffsetDateTime" ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/Interval.java#L203-L218
jdereg/java-util
src/main/java/com/cedarsoftware/util/UrlUtilities.java
UrlUtilities.getContentFromUrlAsString
public static String getContentFromUrlAsString(URL url, boolean allowAllCerts) { """ Get content from the passed in URL. This code will open a connection to the passed in server, fetch the requested content, and return it as a String. @param url URL to hit @param allowAllCerts true to not verify certificate...
java
public static String getContentFromUrlAsString(URL url, boolean allowAllCerts) { return getContentFromUrlAsString(url, null, null, allowAllCerts); }
[ "public", "static", "String", "getContentFromUrlAsString", "(", "URL", "url", ",", "boolean", "allowAllCerts", ")", "{", "return", "getContentFromUrlAsString", "(", "url", ",", "null", ",", "null", ",", "allowAllCerts", ")", ";", "}" ]
Get content from the passed in URL. This code will open a connection to the passed in server, fetch the requested content, and return it as a String. @param url URL to hit @param allowAllCerts true to not verify certificates @return UTF-8 String read from URL or null in the case of error.
[ "Get", "content", "from", "the", "passed", "in", "URL", ".", "This", "code", "will", "open", "a", "connection", "to", "the", "passed", "in", "server", "fetch", "the", "requested", "content", "and", "return", "it", "as", "a", "String", "." ]
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/UrlUtilities.java#L423-L426
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java
MediaDescriptorField.createVideoFormat
private RTPFormat createVideoFormat(int payload, Text description) { """ Creates or updates video format using payload number and text format description. @param payload the payload number of the format. @param description text description of the format @return format object """ Iterator<Text> it ...
java
private RTPFormat createVideoFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to frame ...
[ "private", "RTPFormat", "createVideoFormat", "(", "int", "payload", ",", "Text", "description", ")", "{", "Iterator", "<", "Text", ">", "it", "=", "description", ".", "split", "(", "'", "'", ")", ".", "iterator", "(", ")", ";", "//encoding name", "Text", ...
Creates or updates video format using payload number and text format description. @param payload the payload number of the format. @param description text description of the format @return format object
[ "Creates", "or", "updates", "video", "format", "using", "payload", "number", "and", "text", "format", "description", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java#L463-L487
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java
DynamicRegistrationBean.addInitParameter
public void addInitParameter(String name, String value) { """ Add a single init-parameter, replacing any existing parameter with the same name. @param name the init-parameter name @param value the init-parameter value """ Assert.notNull(name, "Name must not be null"); this.initParameters.put(name, value)...
java
public void addInitParameter(String name, String value) { Assert.notNull(name, "Name must not be null"); this.initParameters.put(name, value); }
[ "public", "void", "addInitParameter", "(", "String", "name", ",", "String", "value", ")", "{", "Assert", ".", "notNull", "(", "name", ",", "\"Name must not be null\"", ")", ";", "this", ".", "initParameters", ".", "put", "(", "name", ",", "value", ")", ";"...
Add a single init-parameter, replacing any existing parameter with the same name. @param name the init-parameter name @param value the init-parameter value
[ "Add", "a", "single", "init", "-", "parameter", "replacing", "any", "existing", "parameter", "with", "the", "same", "name", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java#L102-L105
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildConstantMembers
public void buildConstantMembers(XMLNode node, Content classConstantTree) { """ Build the summary of constant members in the class. @param node the XML element that specifies which components to document @param classConstantTree the tree to which the constant members table will be added """ new Co...
java
public void buildConstantMembers(XMLNode node, Content classConstantTree) { new ConstantFieldBuilder(currentClass).buildMembersSummary(node, classConstantTree); }
[ "public", "void", "buildConstantMembers", "(", "XMLNode", "node", ",", "Content", "classConstantTree", ")", "{", "new", "ConstantFieldBuilder", "(", "currentClass", ")", ".", "buildMembersSummary", "(", "node", ",", "classConstantTree", ")", ";", "}" ]
Build the summary of constant members in the class. @param node the XML element that specifies which components to document @param classConstantTree the tree to which the constant members table will be added
[ "Build", "the", "summary", "of", "constant", "members", "in", "the", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java#L246-L248
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
ExceptionUtils.indexOfType
@GwtIncompatible("incompatible method") public static int indexOfType(final Throwable throwable, final Class<?> type, final int fromIndex) { """ <p>Returns the (zero based) index of the first <code>Throwable</code> that matches the specified type in the exception chain from a specified index. Subclasses of ...
java
@GwtIncompatible("incompatible method") public static int indexOfType(final Throwable throwable, final Class<?> type, final int fromIndex) { return indexOf(throwable, type, fromIndex, true); }
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "int", "indexOfType", "(", "final", "Throwable", "throwable", ",", "final", "Class", "<", "?", ">", "type", ",", "final", "int", "fromIndex", ")", "{", "return", "indexOf", "(", ...
<p>Returns the (zero based) index of the first <code>Throwable</code> that matches the specified type in the exception chain from a specified index. Subclasses of the specified class do match - see {@link #indexOfThrowable(Throwable, Class)} for the opposite.</p> <p>A <code>null</code> throwable returns <code>-1</code...
[ "<p", ">", "Returns", "the", "(", "zero", "based", ")", "index", "of", "the", "first", "<code", ">", "Throwable<", "/", "code", ">", "that", "matches", "the", "specified", "type", "in", "the", "exception", "chain", "from", "a", "specified", "index", ".",...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java#L384-L387
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.readAsString
public static String readAsString(final URL url, final String encoding, final int bufSize) { """ Reads a given URL and returns the content as String. @param url URL to read. @param encoding Encoding (like 'utf-8'). @param bufSize Size of the buffer to use. @return File content as String. """ ...
java
public static String readAsString(final URL url, final String encoding, final int bufSize) { try (final Reader reader = new InputStreamReader(url.openStream(), encoding)) { final StringBuilder sb = new StringBuilder(); final char[] cbuf = new char[bufSize]; int count; ...
[ "public", "static", "String", "readAsString", "(", "final", "URL", "url", ",", "final", "String", "encoding", ",", "final", "int", "bufSize", ")", "{", "try", "(", "final", "Reader", "reader", "=", "new", "InputStreamReader", "(", "url", ".", "openStream", ...
Reads a given URL and returns the content as String. @param url URL to read. @param encoding Encoding (like 'utf-8'). @param bufSize Size of the buffer to use. @return File content as String.
[ "Reads", "a", "given", "URL", "and", "returns", "the", "content", "as", "String", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L1469-L1481
overview/mime-types
src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java
MimeTypeDetector.detectMimeTypeAsync
public CompletionStage<String> detectMimeTypeAsync(final Path path) { """ Determines the MIME type of a file. <p> The file must exist and be readable. </p> <p> The CompletionStage may return a {@link ExecutionException} which is caused by a {@link GetBytesException}. (That, in turn, will wrap a {@link I...
java
public CompletionStage<String> detectMimeTypeAsync(final Path path) { String filename = path.getFileName().toString(); Supplier<CompletionStage<byte[]>> supplier = () -> { final CompletableFuture<byte[]> futureBytes = new CompletableFuture<byte[]>(); AsynchronousFileChannel channel; ...
[ "public", "CompletionStage", "<", "String", ">", "detectMimeTypeAsync", "(", "final", "Path", "path", ")", "{", "String", "filename", "=", "path", ".", "getFileName", "(", ")", ".", "toString", "(", ")", ";", "Supplier", "<", "CompletionStage", "<", "byte", ...
Determines the MIME type of a file. <p> The file must exist and be readable. </p> <p> The CompletionStage may return a {@link ExecutionException} which is caused by a {@link GetBytesException}. (That, in turn, will wrap a {@link IOException} or other exception that prevented getBytesAsync() from working. </p> @param...
[ "Determines", "the", "MIME", "type", "of", "a", "file", "." ]
train
https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L279-L312
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/BetaDistribution.java
BetaDistribution.logBeta
public static double logBeta(double alpha, double beta) { """ Compute log beta(a,b) @param alpha Shape parameter a @param beta Shape parameter b @return Logarithm of result """ return GammaDistribution.logGamma(alpha) + GammaDistribution.logGamma(beta) - GammaDistribution.logGamma(alpha + beta); }
java
public static double logBeta(double alpha, double beta) { return GammaDistribution.logGamma(alpha) + GammaDistribution.logGamma(beta) - GammaDistribution.logGamma(alpha + beta); }
[ "public", "static", "double", "logBeta", "(", "double", "alpha", ",", "double", "beta", ")", "{", "return", "GammaDistribution", ".", "logGamma", "(", "alpha", ")", "+", "GammaDistribution", ".", "logGamma", "(", "beta", ")", "-", "GammaDistribution", ".", "...
Compute log beta(a,b) @param alpha Shape parameter a @param beta Shape parameter b @return Logarithm of result
[ "Compute", "log", "beta", "(", "a", "b", ")" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/BetaDistribution.java#L228-L230
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.isOnAtCurrentZoom
public boolean isOnAtCurrentZoom(double zoom, LatLng latLng) { """ Determine if the feature overlay is on for the provided zoom level at the location @param zoom zoom level @param latLng lat lon location @return true if on @since 1.2.6 """ Point point = new Point(latLng.longitude, latLng.latit...
java
public boolean isOnAtCurrentZoom(double zoom, LatLng latLng) { Point point = new Point(latLng.longitude, latLng.latitude); TileGrid tileGrid = TileBoundingBoxUtils.getTileGridFromWGS84(point, (int) zoom); boolean on = boundedOverlay.hasTile((int) tileGrid.getMinX(), (int) tileGrid.getMinY(), (...
[ "public", "boolean", "isOnAtCurrentZoom", "(", "double", "zoom", ",", "LatLng", "latLng", ")", "{", "Point", "point", "=", "new", "Point", "(", "latLng", ".", "longitude", ",", "latLng", ".", "latitude", ")", ";", "TileGrid", "tileGrid", "=", "TileBoundingBo...
Determine if the feature overlay is on for the provided zoom level at the location @param zoom zoom level @param latLng lat lon location @return true if on @since 1.2.6
[ "Determine", "if", "the", "feature", "overlay", "is", "on", "for", "the", "provided", "zoom", "level", "at", "the", "location" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L187-L194
UrielCh/ovh-java-sdk
ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java
ApiOvhMetrics.serviceName_token_tokenId_GET
public OvhToken serviceName_token_tokenId_GET(String serviceName, String tokenId) throws IOException { """ Get a specific token REST: GET /metrics/{serviceName}/token/{tokenId} @param serviceName [required] Name of your service @param tokenId [required] ID of the desired token API beta """ String qPa...
java
public OvhToken serviceName_token_tokenId_GET(String serviceName, String tokenId) throws IOException { String qPath = "/metrics/{serviceName}/token/{tokenId}"; StringBuilder sb = path(qPath, serviceName, tokenId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhToken.class); }
[ "public", "OvhToken", "serviceName_token_tokenId_GET", "(", "String", "serviceName", ",", "String", "tokenId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/metrics/{serviceName}/token/{tokenId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath",...
Get a specific token REST: GET /metrics/{serviceName}/token/{tokenId} @param serviceName [required] Name of your service @param tokenId [required] ID of the desired token API beta
[ "Get", "a", "specific", "token" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java#L249-L254
buschmais/jqa-maven3-plugin
src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java
MavenModelScannerPlugin.addManagedPlugins
private void addManagedPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) { """ Adds information about managed plugins. @param pomDescriptor The descriptor for the current POM. @param build Information required to build the project. @param scannerContext The scanne...
java
private void addManagedPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) { if (null == build) { return; } PluginManagement pluginManagement = build.getPluginManagement(); if (null == pluginManagement) { return; } ...
[ "private", "void", "addManagedPlugins", "(", "BaseProfileDescriptor", "pomDescriptor", ",", "BuildBase", "build", ",", "ScannerContext", "scannerContext", ")", "{", "if", "(", "null", "==", "build", ")", "{", "return", ";", "}", "PluginManagement", "pluginManagement...
Adds information about managed plugins. @param pomDescriptor The descriptor for the current POM. @param build Information required to build the project. @param scannerContext The scanner context.
[ "Adds", "information", "about", "managed", "plugins", "." ]
train
https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L401-L411
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java
HelpFormatter.printWrapped
private void printWrapped(int nextLineTabStop, String text) { """ Print the specified text to the specified PrintWriter. @param nextLineTabStop the position on the next line for the first tab @param text the text to be written to the PrintWriter """ StringBuilder sb = new StringBuilder(text.length(...
java
private void printWrapped(int nextLineTabStop, String text) { StringBuilder sb = new StringBuilder(text.length()); renderWrappedTextBlock(sb, nextLineTabStop, text); console.writeLine(sb.toString()); }
[ "private", "void", "printWrapped", "(", "int", "nextLineTabStop", ",", "String", "text", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "text", ".", "length", "(", ")", ")", ";", "renderWrappedTextBlock", "(", "sb", ",", "nextLineTabStop", ...
Print the specified text to the specified PrintWriter. @param nextLineTabStop the position on the next line for the first tab @param text the text to be written to the PrintWriter
[ "Print", "the", "specified", "text", "to", "the", "specified", "PrintWriter", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java#L381-L385
santhosh-tekuri/jlibs
xml/src/main/java/jlibs/xml/xsl/TransformerUtil.java
TransformerUtil.newTransformerHandler
public static TransformerHandler newTransformerHandler(Source source, boolean omitXMLDeclaration, int indentAmount, String encoding) throws TransformerConfigurationException { """ Creates TransformerHandler @param source source of xsl document, use null for identity transformer @param omitXMLDec...
java
public static TransformerHandler newTransformerHandler(Source source, boolean omitXMLDeclaration, int indentAmount, String encoding) throws TransformerConfigurationException{ SAXTransformerFactory factory = (SAXTransformerFactory)TransformerFactory.newInstance(); TransformerHandler handler = source!=nul...
[ "public", "static", "TransformerHandler", "newTransformerHandler", "(", "Source", "source", ",", "boolean", "omitXMLDeclaration", ",", "int", "indentAmount", ",", "String", "encoding", ")", "throws", "TransformerConfigurationException", "{", "SAXTransformerFactory", "factor...
Creates TransformerHandler @param source source of xsl document, use null for identity transformer @param omitXMLDeclaration omit xml declaration or not @param indentAmount the number fo spaces used for indentation. use <=0, in case you dont want indentation @param encoding requ...
[ "Creates", "TransformerHandler" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/xml/src/main/java/jlibs/xml/xsl/TransformerUtil.java#L87-L92
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/SaveEditingAction.java
SaveEditingAction.onClick
public void onClick(MenuItemClickEvent event) { """ Saves editing, and also removes the {@link FeatureTransaction} object from the map. @param event The {@link MenuItemClickEvent} from clicking the action. """ FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction(); ...
java
public void onClick(MenuItemClickEvent event) { FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction(); if (featureTransaction != null) { List<Activity> activities = new ArrayList<Activity>(); activities.add(new ValidationActivity()); activities.add(new CommitActivity()...
[ "public", "void", "onClick", "(", "MenuItemClickEvent", "event", ")", "{", "FeatureTransaction", "featureTransaction", "=", "mapModel", ".", "getFeatureEditor", "(", ")", ".", "getFeatureTransaction", "(", ")", ";", "if", "(", "featureTransaction", "!=", "null", "...
Saves editing, and also removes the {@link FeatureTransaction} object from the map. @param event The {@link MenuItemClickEvent} from clicking the action.
[ "Saves", "editing", "and", "also", "removes", "the", "{", "@link", "FeatureTransaction", "}", "object", "from", "the", "map", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/SaveEditingAction.java#L85-L110
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.writeAttribute
public void writeAttribute(String attributeName, String value) throws IOException { """ Write attribute. @param attributeName the attribute name @param value the value @throws IOException Signals that an I/O exception has occurred. """ this.attribute(null, attributeName, value); }
java
public void writeAttribute(String attributeName, String value) throws IOException { this.attribute(null, attributeName, value); }
[ "public", "void", "writeAttribute", "(", "String", "attributeName", ",", "String", "value", ")", "throws", "IOException", "{", "this", ".", "attribute", "(", "null", ",", "attributeName", ",", "value", ")", ";", "}" ]
Write attribute. @param attributeName the attribute name @param value the value @throws IOException Signals that an I/O exception has occurred.
[ "Write", "attribute", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L1515-L1518
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/ABITrace.java
ABITrace.getSubArray
private void getSubArray(byte[] b, int traceDataOffset) { """ A utility method which fills array b with data from the trace starting at traceDataOffset. @param b - trace byte array @param traceDataOffset - starting point """ for (int x = 0; x <= b.length - 1; x++) { b[x] = traceData[traceDataOffset + ...
java
private void getSubArray(byte[] b, int traceDataOffset) { for (int x = 0; x <= b.length - 1; x++) { b[x] = traceData[traceDataOffset + x]; } }
[ "private", "void", "getSubArray", "(", "byte", "[", "]", "b", ",", "int", "traceDataOffset", ")", "{", "for", "(", "int", "x", "=", "0", ";", "x", "<=", "b", ".", "length", "-", "1", ";", "x", "++", ")", "{", "b", "[", "x", "]", "=", "traceDa...
A utility method which fills array b with data from the trace starting at traceDataOffset. @param b - trace byte array @param traceDataOffset - starting point
[ "A", "utility", "method", "which", "fills", "array", "b", "with", "data", "from", "the", "trace", "starting", "at", "traceDataOffset", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/ABITrace.java#L562-L566
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemset2D
public static int cudaMemset2D(Pointer mem, long pitch, int c, long width, long height) { """ Initializes or sets device memory to a value. <pre> cudaError_t cudaMemset2D ( void* devPtr, size_t pitch, int value, size_t width, size_t height ) </pre> <div> <p>Initializes or sets device memory to a valu...
java
public static int cudaMemset2D(Pointer mem, long pitch, int c, long width, long height) { return checkResult(cudaMemset2DNative(mem, pitch, c, width, height)); }
[ "public", "static", "int", "cudaMemset2D", "(", "Pointer", "mem", ",", "long", "pitch", ",", "int", "c", ",", "long", "width", ",", "long", "height", ")", "{", "return", "checkResult", "(", "cudaMemset2DNative", "(", "mem", ",", "pitch", ",", "c", ",", ...
Initializes or sets device memory to a value. <pre> cudaError_t cudaMemset2D ( void* devPtr, size_t pitch, int value, size_t width, size_t height ) </pre> <div> <p>Initializes or sets device memory to a value. Sets to the specified value <tt>value</tt> a matrix (<tt>height</tt> rows of <tt>width</tt> bytes each) poi...
[ "Initializes", "or", "sets", "device", "memory", "to", "a", "value", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L6264-L6267
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.extendImmutabilityPolicyAsync
public Observable<ImmutabilityPolicyInner> extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { """ Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on ...
java
public Observable<ImmutabilityPolicyInner> extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) { return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch...
[ "public", "Observable", "<", "ImmutabilityPolicyInner", ">", "extendImmutabilityPolicyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ",", "int", "immutabilityPeriodSinceCreationInDays", ")"...
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param...
[ "Extends", "the", "immutabilityPeriodSinceCreationInDays", "of", "a", "locked", "immutabilityPolicy", ".", "The", "only", "action", "allowed", "on", "a", "Locked", "policy", "will", "be", "this", "action", ".", "ETag", "in", "If", "-", "Match", "is", "required",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1618-L1625
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/panels/DCSplashPanel.java
DCSplashPanel.createTitleLabel
public static JComponent createTitleLabel(final String text, final ActionListener backButtonActionListener) { """ Creates a label for the title of the screen @param text @param includeBackButton @param window @return """ final DCLabel titleLabel = new DCLabel(false, text, WidgetUtils.BG_COLOR_BLU...
java
public static JComponent createTitleLabel(final String text, final ActionListener backButtonActionListener) { final DCLabel titleLabel = new DCLabel(false, text, WidgetUtils.BG_COLOR_BLUE_DARK, null); titleLabel.setFont(WidgetUtils.FONT_BANNER); final EmptyBorder border = new EmptyBorder(adjust...
[ "public", "static", "JComponent", "createTitleLabel", "(", "final", "String", "text", ",", "final", "ActionListener", "backButtonActionListener", ")", "{", "final", "DCLabel", "titleLabel", "=", "new", "DCLabel", "(", "false", ",", "text", ",", "WidgetUtils", ".",...
Creates a label for the title of the screen @param text @param includeBackButton @param window @return
[ "Creates", "a", "label", "for", "the", "title", "of", "the", "screen" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/panels/DCSplashPanel.java#L76-L99
ehcache/ehcache3
clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ClusteredResourcePoolBuilder.java
ClusteredResourcePoolBuilder.clusteredDedicated
public static DedicatedClusteredResourcePool clusteredDedicated(String fromResource, long size, MemoryUnit unit) { """ Creates a new clustered resource pool using dedicated clustered resources. @param fromResource the name of the server-based resource from which this dedicated resource pool is reserved; may be...
java
public static DedicatedClusteredResourcePool clusteredDedicated(String fromResource, long size, MemoryUnit unit) { return new DedicatedClusteredResourcePoolImpl(fromResource, size, unit); }
[ "public", "static", "DedicatedClusteredResourcePool", "clusteredDedicated", "(", "String", "fromResource", ",", "long", "size", ",", "MemoryUnit", "unit", ")", "{", "return", "new", "DedicatedClusteredResourcePoolImpl", "(", "fromResource", ",", "size", ",", "unit", "...
Creates a new clustered resource pool using dedicated clustered resources. @param fromResource the name of the server-based resource from which this dedicated resource pool is reserved; may be {@code null} @param size the size @param unit the unit for the size
[ "Creates", "a", "new", "clustered", "resource", "pool", "using", "dedicated", "clustered", "resources", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ClusteredResourcePoolBuilder.java#L54-L56
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java
GraphDbObjectFactory.createVertex
public static Titan1Vertex createVertex(Titan1Graph graph, Vertex source) { """ Creates a Titan1Vertex that corresponds to the given Gremlin Vertex. @param graph The graph that contains the vertex @param source the Gremlin vertex """ if (source == null) { return null; } ...
java
public static Titan1Vertex createVertex(Titan1Graph graph, Vertex source) { if (source == null) { return null; } return new Titan1Vertex(graph, source); }
[ "public", "static", "Titan1Vertex", "createVertex", "(", "Titan1Graph", "graph", ",", "Vertex", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "Titan1Vertex", "(", "graph", ",", "source", ")", ...
Creates a Titan1Vertex that corresponds to the given Gremlin Vertex. @param graph The graph that contains the vertex @param source the Gremlin vertex
[ "Creates", "a", "Titan1Vertex", "that", "corresponds", "to", "the", "given", "Gremlin", "Vertex", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java#L72-L78
Alluxio/alluxio
core/common/src/main/java/alluxio/cli/CommandUtils.java
CommandUtils.checkNumOfArgsNoLessThan
public static void checkNumOfArgsNoLessThan(Command cmd, CommandLine cl, int n) throws InvalidArgumentException { """ Checks the number of non-option arguments is no less than n for command. @param cmd command instance @param cl parsed commandline arguments @param n an integer @throws InvalidArgumentEx...
java
public static void checkNumOfArgsNoLessThan(Command cmd, CommandLine cl, int n) throws InvalidArgumentException { if (cl.getArgs().length < n) { throw new InvalidArgumentException(ExceptionMessage.INVALID_ARGS_NUM_INSUFFICIENT .getMessage(cmd.getCommandName(), n, cl.getArgs().length)); } ...
[ "public", "static", "void", "checkNumOfArgsNoLessThan", "(", "Command", "cmd", ",", "CommandLine", "cl", ",", "int", "n", ")", "throws", "InvalidArgumentException", "{", "if", "(", "cl", ".", "getArgs", "(", ")", ".", "length", "<", "n", ")", "{", "throw",...
Checks the number of non-option arguments is no less than n for command. @param cmd command instance @param cl parsed commandline arguments @param n an integer @throws InvalidArgumentException if the number is smaller than n
[ "Checks", "the", "number", "of", "non", "-", "option", "arguments", "is", "no", "less", "than", "n", "for", "command", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/cli/CommandUtils.java#L84-L90
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.explode
public static void explode(File zip) { """ Unpacks a ZIP file to its own location. <p> The ZIP file will be first renamed (using a temporary name). After the extraction it will be deleted. @param zip input ZIP file as well as the target directory. @see #unpack(File, File) """ try { // Find ...
java
public static void explode(File zip) { try { // Find a new unique name is the same directory File tempFile = FileUtils.getTempFileFor(zip); // Rename the archive FileUtils.moveFile(zip, tempFile); // Unpack it unpack(tempFile, zip); // Delete the archive if (!tempF...
[ "public", "static", "void", "explode", "(", "File", "zip", ")", "{", "try", "{", "// Find a new unique name is the same directory", "File", "tempFile", "=", "FileUtils", ".", "getTempFileFor", "(", "zip", ")", ";", "// Rename the archive", "FileUtils", ".", "moveFil...
Unpacks a ZIP file to its own location. <p> The ZIP file will be first renamed (using a temporary name). After the extraction it will be deleted. @param zip input ZIP file as well as the target directory. @see #unpack(File, File)
[ "Unpacks", "a", "ZIP", "file", "to", "its", "own", "location", ".", "<p", ">", "The", "ZIP", "file", "will", "be", "first", "renamed", "(", "using", "a", "temporary", "name", ")", ".", "After", "the", "extraction", "it", "will", "be", "deleted", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1321-L1340
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.createOrUpdateAsync
public Observable<DatabaseAccountInner> createOrUpdateAsync(String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters) { """ Creates or updates an Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosm...
java
public Observable<DatabaseAccountInner> createOrUpdateAsync(String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, createUpdateParameters).map(new Func1<ServiceResponse<DatabaseAc...
[ "public", "Observable", "<", "DatabaseAccountInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "DatabaseAccountCreateUpdateParameters", "createUpdateParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync",...
Creates or updates an Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param createUpdateParameters The parameters to provide for the current database account. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Creates", "or", "updates", "an", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L472-L479
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/JcString.java
JcString.trimRight
public JcString trimRight() { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the result of removing trailing white spaces form a string, return a <b>JcString</b></i></div> <br/> """ JcString ret = new JcSt...
java
public JcString trimRight() { JcString ret = new JcString(null, this, new FunctionInstance(FUNCTION.String.RTRIM, 1)); QueryRecorder.recordInvocationConditional(this, "trimRight", ret); return ret; }
[ "public", "JcString", "trimRight", "(", ")", "{", "JcString", "ret", "=", "new", "JcString", "(", "null", ",", "this", ",", "new", "FunctionInstance", "(", "FUNCTION", ".", "String", ".", "RTRIM", ",", "1", ")", ")", ";", "QueryRecorder", ".", "recordInv...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the result of removing trailing white spaces form a string, return a <b>JcString</b></i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/JcString.java#L106-L111
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java
CmsForm.validateField
public void validateField(final I_CmsFormField field) { """ Validates a single field.<p> @param field the field to validate """ CmsValidationController validationController = new CmsValidationController(field, createValidationHandler()); validationController.setFormValidator(m_validatorClas...
java
public void validateField(final I_CmsFormField field) { CmsValidationController validationController = new CmsValidationController(field, createValidationHandler()); validationController.setFormValidator(m_validatorClass); validationController.setFormValidatorConfig(createValidatorConfig()); ...
[ "public", "void", "validateField", "(", "final", "I_CmsFormField", "field", ")", "{", "CmsValidationController", "validationController", "=", "new", "CmsValidationController", "(", "field", ",", "createValidationHandler", "(", ")", ")", ";", "validationController", ".",...
Validates a single field.<p> @param field the field to validate
[ "Validates", "a", "single", "field", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java#L405-L411
blackducksoftware/blackduck-common
src/main/java/com/synopsys/integration/blackduck/codelocation/signaturescanner/command/ScannerZipInstaller.java
ScannerZipInstaller.installOrUpdateScanner
public void installOrUpdateScanner(File installDirectory) throws BlackDuckIntegrationException { """ The Black Duck Signature Scanner will be download if it has not previously been downloaded or if it has been updated on the server. The absolute path to the install location will be returned if it was downloaded...
java
public void installOrUpdateScanner(File installDirectory) throws BlackDuckIntegrationException { File scannerExpansionDirectory = new File(installDirectory, ScannerZipInstaller.BLACK_DUCK_SIGNATURE_SCANNER_INSTALL_DIRECTORY); scannerExpansionDirectory.mkdirs(); File versionFile = null; ...
[ "public", "void", "installOrUpdateScanner", "(", "File", "installDirectory", ")", "throws", "BlackDuckIntegrationException", "{", "File", "scannerExpansionDirectory", "=", "new", "File", "(", "installDirectory", ",", "ScannerZipInstaller", ".", "BLACK_DUCK_SIGNATURE_SCANNER_I...
The Black Duck Signature Scanner will be download if it has not previously been downloaded or if it has been updated on the server. The absolute path to the install location will be returned if it was downloaded or found successfully, otherwise an Optional.empty will be returned and the log will contain details concern...
[ "The", "Black", "Duck", "Signature", "Scanner", "will", "be", "download", "if", "it", "has", "not", "previously", "been", "downloaded", "or", "if", "it", "has", "been", "updated", "on", "the", "server", ".", "The", "absolute", "path", "to", "the", "install...
train
https://github.com/blackducksoftware/blackduck-common/blob/4ea4e90b52b75470b71c597b65cf4e2d73887bcc/src/main/java/com/synopsys/integration/blackduck/codelocation/signaturescanner/command/ScannerZipInstaller.java#L100-L119
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/util/Args.java
Args.checkPositive
public static void checkPositive(int number, String message, Object... args) { """ Validates that an argument is positive. @param value The value to check. @param message An exception message. @param args Exception message arguments. """ if (number < 0) { throw new IllegalArgumentException(Strin...
java
public static void checkPositive(int number, String message, Object... args) { if (number < 0) { throw new IllegalArgumentException(String.format(message, args)); } }
[ "public", "static", "void", "checkPositive", "(", "int", "number", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "if", "(", "number", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "...
Validates that an argument is positive. @param value The value to check. @param message An exception message. @param args Exception message arguments.
[ "Validates", "that", "an", "argument", "is", "positive", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Args.java#L94-L98
OpenLiberty/open-liberty
dev/com.ibm.ws.logging/src/com/ibm/ws/logging/collector/DateFormatHelper.java
DateFormatHelper.formatTime
public static final String formatTime(long timestamp, boolean useIsoDateFormat) { """ Return the given time formatted, based on the provided format structure @param timestamp A timestamp as a long, e.g. what would be returned from <code>System.currentTimeMillis()</code> @param useIsoDateFormat A boolean, ...
java
public static final String formatTime(long timestamp, boolean useIsoDateFormat) { BurstDateFormat[] dfs = dateformats.get(); if (dfs == null) { dfs = new BurstDateFormat[useIsoDateFormat ? 2 : 1]; dateformats.set(dfs); } else if (useIsoDateFormat && dfs.length == 1) { ...
[ "public", "static", "final", "String", "formatTime", "(", "long", "timestamp", ",", "boolean", "useIsoDateFormat", ")", "{", "BurstDateFormat", "[", "]", "dfs", "=", "dateformats", ".", "get", "(", ")", ";", "if", "(", "dfs", "==", "null", ")", "{", "dfs...
Return the given time formatted, based on the provided format structure @param timestamp A timestamp as a long, e.g. what would be returned from <code>System.currentTimeMillis()</code> @param useIsoDateFormat A boolean, if true, the given date and time will be formatted in ISO-8601, e.g. yyyy-MM-dd'T'HH:mm:ss.SSSZ if...
[ "Return", "the", "given", "time", "formatted", "based", "on", "the", "provided", "format", "structure" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging/src/com/ibm/ws/logging/collector/DateFormatHelper.java#L73-L92
wkgcass/Style
src/main/java/net/cassite/style/aggregation/MapFuncSup.java
TransformerColl.via
public Coll via(RFunc2<R, K, V> method) { """ define the transform process @param method a function takes in each entry from the map and returns it's transformed state. @return collection with objects after the transform """ return via(Style.$(method)); }
java
public Coll via(RFunc2<R, K, V> method) { return via(Style.$(method)); }
[ "public", "Coll", "via", "(", "RFunc2", "<", "R", ",", "K", ",", "V", ">", "method", ")", "{", "return", "via", "(", "Style", ".", "$", "(", "method", ")", ")", ";", "}" ]
define the transform process @param method a function takes in each entry from the map and returns it's transformed state. @return collection with objects after the transform
[ "define", "the", "transform", "process" ]
train
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/aggregation/MapFuncSup.java#L245-L247
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java
GVRMaterial.setAmbientColor
public void setAmbientColor(float r, float g, float b, float a) { """ Set the {@code ambient_color} uniform for lighting. By convention, GVRF shaders can use a {@code vec4} uniform named {@code ambient_color}. With the {@linkplain GVRShaderType.Texture shader,} this allows you to add an overlay ambient light ...
java
public void setAmbientColor(float r, float g, float b, float a) { setVec4("ambient_color", r, g, b, a); }
[ "public", "void", "setAmbientColor", "(", "float", "r", ",", "float", "g", ",", "float", "b", ",", "float", "a", ")", "{", "setVec4", "(", "\"ambient_color\"", ",", "r", ",", "g", ",", "b", ",", "a", ")", ";", "}" ]
Set the {@code ambient_color} uniform for lighting. By convention, GVRF shaders can use a {@code vec4} uniform named {@code ambient_color}. With the {@linkplain GVRShaderType.Texture shader,} this allows you to add an overlay ambient light color on top of the texture. Values are between {@code 0.0f} and {@code 1.0f}, ...
[ "Set", "the", "{", "@code", "ambient_color", "}", "uniform", "for", "lighting", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java#L409-L411
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java
InstanceFailoverGroupsInner.beginFailover
public InstanceFailoverGroupInner beginFailover(String resourceGroupName, String locationName, String failoverGroupName) { """ Fails over from the current primary managed instance to this managed instance. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this va...
java
public InstanceFailoverGroupInner beginFailover(String resourceGroupName, String locationName, String failoverGroupName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).toBlocking().single().body(); }
[ "public", "InstanceFailoverGroupInner", "beginFailover", "(", "String", "resourceGroupName", ",", "String", "locationName", ",", "String", "failoverGroupName", ")", "{", "return", "beginFailoverWithServiceResponseAsync", "(", "resourceGroupName", ",", "locationName", ",", "...
Fails over from the current primary managed instance to this managed instance. @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 locationName The name of the region where the resource is located. @para...
[ "Fails", "over", "from", "the", "current", "primary", "managed", "instance", "to", "this", "managed", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L770-L772
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/XMLValidator.java
XMLValidator.validateWithXmlSchema
public void validateWithXmlSchema(String filename, String xmlSchemaPath) throws IOException { """ Validate XML file using the given XSD. Throws an exception on error. @param filename File in classpath to validate @param xmlSchemaPath XML schema file in classpath """ try (InputStream xmlStream = this.getC...
java
public void validateWithXmlSchema(String filename, String xmlSchemaPath) throws IOException { try (InputStream xmlStream = this.getClass().getResourceAsStream(filename)) { if (xmlStream == null) { throw new IOException("File not found in classpath: " + filename); } URL schemaUrl = this.get...
[ "public", "void", "validateWithXmlSchema", "(", "String", "filename", ",", "String", "xmlSchemaPath", ")", "throws", "IOException", "{", "try", "(", "InputStream", "xmlStream", "=", "this", ".", "getClass", "(", ")", ".", "getResourceAsStream", "(", "filename", ...
Validate XML file using the given XSD. Throws an exception on error. @param filename File in classpath to validate @param xmlSchemaPath XML schema file in classpath
[ "Validate", "XML", "file", "using", "the", "given", "XSD", ".", "Throws", "an", "exception", "on", "error", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/XMLValidator.java#L112-L125
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.writeIntegerAttribute
public void writeIntegerAttribute(String prefix, String namespaceURI, String localName, BigInteger value) throws Exception { """ Write integer attribute. @param prefix the prefix @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception ...
java
public void writeIntegerAttribute(String prefix, String namespaceURI, String localName, BigInteger value) throws Exception { this.attribute(namespaceURI, localName, value.toString()); }
[ "public", "void", "writeIntegerAttribute", "(", "String", "prefix", ",", "String", "namespaceURI", ",", "String", "localName", ",", "BigInteger", "value", ")", "throws", "Exception", "{", "this", ".", "attribute", "(", "namespaceURI", ",", "localName", ",", "val...
Write integer attribute. @param prefix the prefix @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception
[ "Write", "integer", "attribute", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L1657-L1660
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/management/IntervalHistogram.java
IntervalHistogram.snapshot
public IntervalHistogram snapshot(boolean reset) { """ Clones this histogram and zeroizes out hits afterwards if the 'reset' is true. @param reset zero out hits @return clone of this histogram's state """ if (reset) { return new IntervalHistogram(bins, getAndResetHits()); } return new Interv...
java
public IntervalHistogram snapshot(boolean reset) { if (reset) { return new IntervalHistogram(bins, getAndResetHits()); } return new IntervalHistogram(bins, getHits()); }
[ "public", "IntervalHistogram", "snapshot", "(", "boolean", "reset", ")", "{", "if", "(", "reset", ")", "{", "return", "new", "IntervalHistogram", "(", "bins", ",", "getAndResetHits", "(", ")", ")", ";", "}", "return", "new", "IntervalHistogram", "(", "bins",...
Clones this histogram and zeroizes out hits afterwards if the 'reset' is true. @param reset zero out hits @return clone of this histogram's state
[ "Clones", "this", "histogram", "and", "zeroizes", "out", "hits", "afterwards", "if", "the", "reset", "is", "true", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/management/IntervalHistogram.java#L197-L202
waldheinz/fat32-lib
src/main/java/de/waldheinz/fs/fat/FatLfnDirectory.java
FatLfnDirectory.addDirectory
@Override public FatLfnDirectoryEntry addDirectory(String name) throws IOException { """ <p> {@inheritDoc} </p><p> According to the FAT file system specification, leading and trailing spaces in the {@code name} are ignored by this method. </p> @param name {@inheritDoc} @return {@inheritDoc} @throws I...
java
@Override public FatLfnDirectoryEntry addDirectory(String name) throws IOException { checkWritable(); checkUniqueName(name); name = name.trim(); final ShortName sn = makeShortName(name); final FatDirectoryEntry real = dir.createSub(fat); real.setShortName(sn)...
[ "@", "Override", "public", "FatLfnDirectoryEntry", "addDirectory", "(", "String", "name", ")", "throws", "IOException", "{", "checkWritable", "(", ")", ";", "checkUniqueName", "(", "name", ")", ";", "name", "=", "name", ".", "trim", "(", ")", ";", "final", ...
<p> {@inheritDoc} </p><p> According to the FAT file system specification, leading and trailing spaces in the {@code name} are ignored by this method. </p> @param name {@inheritDoc} @return {@inheritDoc} @throws IOException {@inheritDoc}
[ "<p", ">", "{", "@inheritDoc", "}", "<", "/", "p", ">", "<p", ">", "According", "to", "the", "FAT", "file", "system", "specification", "leading", "and", "trailing", "spaces", "in", "the", "{", "@code", "name", "}", "are", "ignored", "by", "this", "meth...
train
https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/FatLfnDirectory.java#L194-L223
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java
GeneratorUtils.generateLocalVariables
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { """ PK65013 - already know if this isTagFile or not and pageContextVar is set accordingly """ if (hasUseBean(jspElement)) { out.println("HttpSession session = "...
java
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
[ "public", "static", "void", "generateLocalVariables", "(", "JavaCodeWriter", "out", ",", "Element", "jspElement", ",", "String", "pageContextVar", ")", "throws", "JspCoreException", "{", "if", "(", "hasUseBean", "(", "jspElement", ")", ")", "{", "out", ".", "pri...
PK65013 - already know if this isTagFile or not and pageContextVar is set accordingly
[ "PK65013", "-", "already", "know", "if", "this", "isTagFile", "or", "not", "and", "pageContextVar", "is", "set", "accordingly" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java#L161-L172
line/armeria
core/src/main/java/com/linecorp/armeria/internal/ChannelUtil.java
ChannelUtil.findSslSession
@Nullable public static SSLSession findSslSession(@Nullable Channel channel, SessionProtocol sessionProtocol) { """ Finds the {@link SSLSession} of the current TLS connection. @return the {@link SSLSession} if found, or {@code null} if {@link SessionProtocol} is not TLS, the {@link SSLSession} is not found...
java
@Nullable public static SSLSession findSslSession(@Nullable Channel channel, SessionProtocol sessionProtocol) { if (!sessionProtocol.isTls()) { return null; } return findSslSession(channel); }
[ "@", "Nullable", "public", "static", "SSLSession", "findSslSession", "(", "@", "Nullable", "Channel", "channel", ",", "SessionProtocol", "sessionProtocol", ")", "{", "if", "(", "!", "sessionProtocol", ".", "isTls", "(", ")", ")", "{", "return", "null", ";", ...
Finds the {@link SSLSession} of the current TLS connection. @return the {@link SSLSession} if found, or {@code null} if {@link SessionProtocol} is not TLS, the {@link SSLSession} is not found or {@link Channel} is {@code null}.
[ "Finds", "the", "{", "@link", "SSLSession", "}", "of", "the", "current", "TLS", "connection", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/ChannelUtil.java#L94-L101
cdapio/tephra
tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java
TransactionEdit.createMoveWatermark
public static TransactionEdit createMoveWatermark(long writePointer) { """ Creates a new instance in the {@link State#MOVE_WATERMARK} state. """ return new TransactionEdit(writePointer, 0L, State.MOVE_WATERMARK, 0L, null, 0L, false, null, null, 0L, 0L, null); }
java
public static TransactionEdit createMoveWatermark(long writePointer) { return new TransactionEdit(writePointer, 0L, State.MOVE_WATERMARK, 0L, null, 0L, false, null, null, 0L, 0L, null); }
[ "public", "static", "TransactionEdit", "createMoveWatermark", "(", "long", "writePointer", ")", "{", "return", "new", "TransactionEdit", "(", "writePointer", ",", "0L", ",", "State", ".", "MOVE_WATERMARK", ",", "0L", ",", "null", ",", "0L", ",", "false", ",", ...
Creates a new instance in the {@link State#MOVE_WATERMARK} state.
[ "Creates", "a", "new", "instance", "in", "the", "{" ]
train
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java#L271-L273
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindCursorBuilder.java
BindCursorBuilder.generateExecuteMethod
private MethodSpec.Builder generateExecuteMethod(String packageName, SQLiteEntity entity) { """ Generate execute method. @param packageName the package name @param entity the entity @return the method spec. builder """ ParameterizedTypeName parameterizedReturnTypeName = ParameterizedTypeName.get(class...
java
private MethodSpec.Builder generateExecuteMethod(String packageName, SQLiteEntity entity) { ParameterizedTypeName parameterizedReturnTypeName = ParameterizedTypeName.get(className(ArrayList.class), className(packageName,entity.getSimpleName())); //@formatter:off MethodSpec.Builder methodBuilder = MethodSpec....
[ "private", "MethodSpec", ".", "Builder", "generateExecuteMethod", "(", "String", "packageName", ",", "SQLiteEntity", "entity", ")", "{", "ParameterizedTypeName", "parameterizedReturnTypeName", "=", "ParameterizedTypeName", ".", "get", "(", "className", "(", "ArrayList", ...
Generate execute method. @param packageName the package name @param entity the entity @return the method spec. builder
[ "Generate", "execute", "method", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindCursorBuilder.java#L197-L242
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java
GradientToEdgeFeatures.intensityE
static public void intensityE(GrayF32 derivX , GrayF32 derivY , GrayF32 intensity ) { """ Computes the edge intensity using a Euclidean norm. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param intensity Edge intensity. """ InputSanityCheck.ch...
java
static public void intensityE(GrayF32 derivX , GrayF32 derivY , GrayF32 intensity ) { InputSanityCheck.checkSameShape(derivX,derivY); intensity.reshape(derivX.width,derivX.height); if(BoofConcurrency.USE_CONCURRENT ) { ImplGradientToEdgeFeatures_MT.intensityE(derivX,derivY,intensity); } else { ImplGradi...
[ "static", "public", "void", "intensityE", "(", "GrayF32", "derivX", ",", "GrayF32", "derivY", ",", "GrayF32", "intensity", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "derivX", ",", "derivY", ")", ";", "intensity", ".", "reshape", "(", "derivX", ...
Computes the edge intensity using a Euclidean norm. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param intensity Edge intensity.
[ "Computes", "the", "edge", "intensity", "using", "a", "Euclidean", "norm", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java#L61-L71
windup/windup
config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java
AbstractIterationOperation.resolveVariable
protected WindupVertexFrame resolveVariable(GraphRewrite event, String variableName) { """ Resolves variable/property name expressions of the form ` <code>#{initialModelVar.customProperty.anotherProp}</code>`, where the `initialModelVar` has a {@link Property} method of the form `<code>@Property public X getCust...
java
protected WindupVertexFrame resolveVariable(GraphRewrite event, String variableName) { Variables variables = Variables.instance(event); Iterator<String> tokenizer = new VariableNameIterator(variableName); WindupVertexFrame payload; String initialName = tokenizer.next(); try ...
[ "protected", "WindupVertexFrame", "resolveVariable", "(", "GraphRewrite", "event", ",", "String", "variableName", ")", "{", "Variables", "variables", "=", "Variables", ".", "instance", "(", "event", ")", ";", "Iterator", "<", "String", ">", "tokenizer", "=", "ne...
Resolves variable/property name expressions of the form ` <code>#{initialModelVar.customProperty.anotherProp}</code>`, where the `initialModelVar` has a {@link Property} method of the form `<code>@Property public X getCustomProperty()</code>` and `X` has a {@link Property} method of the form `<code>@Property public X g...
[ "Resolves", "variable", "/", "property", "name", "expressions", "of", "the", "form", "<code", ">", "#", "{", "initialModelVar", ".", "customProperty", ".", "anotherProp", "}", "<", "/", "code", ">", "where", "the", "initialModelVar", "has", "a", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java#L91-L122
netty/netty
handler/src/main/java/io/netty/handler/logging/LoggingHandler.java
LoggingHandler.formatByteBufHolder
private static String formatByteBufHolder(ChannelHandlerContext ctx, String eventName, ByteBufHolder msg) { """ Generates the default log message of the specified event whose argument is a {@link ByteBufHolder}. """ String chStr = ctx.channel().toString(); String msgStr = msg.toString(); ...
java
private static String formatByteBufHolder(ChannelHandlerContext ctx, String eventName, ByteBufHolder msg) { String chStr = ctx.channel().toString(); String msgStr = msg.toString(); ByteBuf content = msg.content(); int length = content.readableBytes(); if (length == 0) { ...
[ "private", "static", "String", "formatByteBufHolder", "(", "ChannelHandlerContext", "ctx", ",", "String", "eventName", ",", "ByteBufHolder", "msg", ")", "{", "String", "chStr", "=", "ctx", ".", "channel", "(", ")", ".", "toString", "(", ")", ";", "String", "...
Generates the default log message of the specified event whose argument is a {@link ByteBufHolder}.
[ "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#L344-L364
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java
DefBase.getBooleanProperty
public boolean getBooleanProperty(String name, boolean defaultValue) { """ Returns the boolean value of the specified property. @param name The name of the property @param defaultValue The value to use if the property is not set or not a boolean @return The value """ return PropertyHelper...
java
public boolean getBooleanProperty(String name, boolean defaultValue) { return PropertyHelper.toBoolean(_properties.getProperty(name), defaultValue); }
[ "public", "boolean", "getBooleanProperty", "(", "String", "name", ",", "boolean", "defaultValue", ")", "{", "return", "PropertyHelper", ".", "toBoolean", "(", "_properties", ".", "getProperty", "(", "name", ")", ",", "defaultValue", ")", ";", "}" ]
Returns the boolean value of the specified property. @param name The name of the property @param defaultValue The value to use if the property is not set or not a boolean @return The value
[ "Returns", "the", "boolean", "value", "of", "the", "specified", "property", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java#L112-L115
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.fromBytes
public static UTF8String fromBytes(byte[] bytes, int offset, int numBytes) { """ Creates an UTF8String from byte array, which should be encoded in UTF-8. Note: `bytes` will be hold by returned UTF8String. """ if (bytes != null) { return new UTF8String(bytes, BYTE_ARRAY_OFFSET + offset, numBytes); ...
java
public static UTF8String fromBytes(byte[] bytes, int offset, int numBytes) { if (bytes != null) { return new UTF8String(bytes, BYTE_ARRAY_OFFSET + offset, numBytes); } else { return null; } }
[ "public", "static", "UTF8String", "fromBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "numBytes", ")", "{", "if", "(", "bytes", "!=", "null", ")", "{", "return", "new", "UTF8String", "(", "bytes", ",", "BYTE_ARRAY_OFFSET", "+",...
Creates an UTF8String from byte array, which should be encoded in UTF-8. Note: `bytes` will be hold by returned UTF8String.
[ "Creates", "an", "UTF8String", "from", "byte", "array", "which", "should", "be", "encoded", "in", "UTF", "-", "8", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L123-L129
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcUtil.java
WSJdbcUtil.mapException
public static SQLException mapException(WSJdbcWrapper jdbcWrapper, SQLException sqlX) { """ Map a SQLException. And, if it's a connection error, send a CONNECTION_ERROR_OCCURRED ConnectionEvent to all listeners of the Managed Connection. @param jdbcWrapper the WebSphere JDBC wrapper object throwing the excepti...
java
public static SQLException mapException(WSJdbcWrapper jdbcWrapper, SQLException sqlX) { Object mapper = null; WSJdbcConnection connWrapper = null; if (jdbcWrapper instanceof WSJdbcObject) { // Use the connection and managed connection. connWrapper = (WSJdbcConnection) ((...
[ "public", "static", "SQLException", "mapException", "(", "WSJdbcWrapper", "jdbcWrapper", ",", "SQLException", "sqlX", ")", "{", "Object", "mapper", "=", "null", ";", "WSJdbcConnection", "connWrapper", "=", "null", ";", "if", "(", "jdbcWrapper", "instanceof", "WSJd...
Map a SQLException. And, if it's a connection error, send a CONNECTION_ERROR_OCCURRED ConnectionEvent to all listeners of the Managed Connection. @param jdbcWrapper the WebSphere JDBC wrapper object throwing the exception. @param sqlX the SQLException to map. @return A mapped SQLException subclass, if the SQLExceptio...
[ "Map", "a", "SQLException", ".", "And", "if", "it", "s", "a", "connection", "error", "send", "a", "CONNECTION_ERROR_OCCURRED", "ConnectionEvent", "to", "all", "listeners", "of", "the", "Managed", "Connection", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcUtil.java#L95-L109
kaazing/java.client
amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java
AmqpChannel.bindQueue
public AmqpChannel bindQueue(String queue, String exchange, String routingKey, boolean noWait, AmqpArguments arguments) { """ * This method binds a queue to an exchange. Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange a...
java
public AmqpChannel bindQueue(String queue, String exchange, String routingKey, boolean noWait, AmqpArguments arguments) { Object[] args = {0, queue, exchange, routingKey, noWait, arguments}; WrappedByteBuffer bodyArg = null; HashMap<String, Object> headersArg = null; String methodName =...
[ "public", "AmqpChannel", "bindQueue", "(", "String", "queue", ",", "String", "exchange", ",", "String", "routingKey", ",", "boolean", "noWait", ",", "AmqpArguments", "arguments", ")", "{", "Object", "[", "]", "args", "=", "{", "0", ",", "queue", ",", "exch...
* This method binds a queue to an exchange. Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.
[ "*", "This", "method", "binds", "a", "queue", "to", "an", "exchange", ".", "Until", "a", "queue", "is", "bound", "it", "will", "not", "receive", "any", "messages", ".", "In", "a", "classic", "messaging", "model", "store", "-", "and", "-", "forward", "q...
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java#L600-L627
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/ProtocolSignature.java
ProtocolSignature.getSigFingerprint
private static ProtocolSigFingerprint getSigFingerprint( Class <? extends VersionedProtocol> protocol, long serverVersion) { """ Return a protocol's signature and finger print from cache @param protocol a protocol class @param serverVersion protocol version @return its signature and finger print """...
java
private static ProtocolSigFingerprint getSigFingerprint( Class <? extends VersionedProtocol> protocol, long serverVersion) { String protocolName = protocol.getName(); synchronized (PROTOCOL_FINGERPRINT_CACHE) { ProtocolSigFingerprint sig = PROTOCOL_FINGERPRINT_CACHE.get(protocolName); if (sig ...
[ "private", "static", "ProtocolSigFingerprint", "getSigFingerprint", "(", "Class", "<", "?", "extends", "VersionedProtocol", ">", "protocol", ",", "long", "serverVersion", ")", "{", "String", "protocolName", "=", "protocol", ".", "getName", "(", ")", ";", "synchron...
Return a protocol's signature and finger print from cache @param protocol a protocol class @param serverVersion protocol version @return its signature and finger print
[ "Return", "a", "protocol", "s", "signature", "and", "finger", "print", "from", "cache" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/ProtocolSignature.java#L183-L197
geomajas/geomajas-project-server
plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/tile/TileMapUrlBuilder.java
TileMapUrlBuilder.resolveProxyUrl
public static String resolveProxyUrl(String relativeUrl, TileMap tileMap, String baseTmsUrl) { """ Replaces the proxy url with the correct url from the tileMap. @return correct url to TMS service """ TileCode tc = parseTileCode(relativeUrl); return buildUrl(tc, tileMap, baseTmsUrl); }
java
public static String resolveProxyUrl(String relativeUrl, TileMap tileMap, String baseTmsUrl) { TileCode tc = parseTileCode(relativeUrl); return buildUrl(tc, tileMap, baseTmsUrl); }
[ "public", "static", "String", "resolveProxyUrl", "(", "String", "relativeUrl", ",", "TileMap", "tileMap", ",", "String", "baseTmsUrl", ")", "{", "TileCode", "tc", "=", "parseTileCode", "(", "relativeUrl", ")", ";", "return", "buildUrl", "(", "tc", ",", "tileMa...
Replaces the proxy url with the correct url from the tileMap. @return correct url to TMS service
[ "Replaces", "the", "proxy", "url", "with", "the", "correct", "url", "from", "the", "tileMap", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/tile/TileMapUrlBuilder.java#L48-L51
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readResourcesWithProperty
public List<CmsResource> readResourcesWithProperty( CmsDbContext dbc, CmsResource folder, String propertyDefinition, String value, CmsResourceFilter filter) throws CmsException { """ Reads all resources that have a value (containing the given value string) set for the s...
java
public List<CmsResource> readResourcesWithProperty( CmsDbContext dbc, CmsResource folder, String propertyDefinition, String value, CmsResourceFilter filter) throws CmsException { String cacheKey; if (value == null) { cacheKey = getCacheKey( ...
[ "public", "List", "<", "CmsResource", ">", "readResourcesWithProperty", "(", "CmsDbContext", "dbc", ",", "CmsResource", "folder", ",", "String", "propertyDefinition", ",", "String", "value", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "St...
Reads all resources that have a value (containing the given value string) set for the specified property (definition) in the given path.<p> Both individual and shared properties of a resource are checked.<p> If the <code>value</code> parameter is <code>null</code>, all resources having the given property set are retu...
[ "Reads", "all", "resources", "that", "have", "a", "value", "(", "containing", "the", "given", "value", "string", ")", "set", "for", "the", "specified", "property", "(", "definition", ")", "in", "the", "given", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7792-L7839
FasterXML/jackson-modules-java8
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/DecimalUtils.java
DecimalUtils.extractSecondsAndNanos
public static <T> T extractSecondsAndNanos(BigDecimal seconds, BiFunction<Long, Integer, T> convert) { """ Extracts the seconds and nanoseconds component of {@code seconds} as {@code long} and {@code int} values, passing them to the given converter. The implementation avoids latency issues present on some JRE ...
java
public static <T> T extractSecondsAndNanos(BigDecimal seconds, BiFunction<Long, Integer, T> convert) { // Complexity is here to workaround unbounded latency in some BigDecimal operations. // https://github.com/FasterXML/jackson-databind/issues/2141 long secondsOnly; int nanosOnly;...
[ "public", "static", "<", "T", ">", "T", "extractSecondsAndNanos", "(", "BigDecimal", "seconds", ",", "BiFunction", "<", "Long", ",", "Integer", ",", "T", ">", "convert", ")", "{", "// Complexity is here to workaround unbounded latency in some BigDecimal operations.", "/...
Extracts the seconds and nanoseconds component of {@code seconds} as {@code long} and {@code int} values, passing them to the given converter. The implementation avoids latency issues present on some JRE releases. @since 2.9.8
[ "Extracts", "the", "seconds", "and", "nanoseconds", "component", "of", "{", "@code", "seconds", "}", "as", "{", "@code", "long", "}", "and", "{", "@code", "int", "}", "values", "passing", "them", "to", "the", "given", "converter", ".", "The", "implementati...
train
https://github.com/FasterXML/jackson-modules-java8/blob/bd093eafbd4d5216e13093b0a031e06dcbb8839b/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/DecimalUtils.java#L113-L139
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.newClientContext
@Deprecated public static SslContext newClientContext(SslProvider provider, File certChainFile) throws SSLException { """ Creates a new client-side {@link SslContext}. @param provider the {@link SslContext} implementation to use. {@code null} to use the current default one. @param certChainFile an X.509 c...
java
@Deprecated public static SslContext newClientContext(SslProvider provider, File certChainFile) throws SSLException { return newClientContext(provider, certChainFile, null); }
[ "@", "Deprecated", "public", "static", "SslContext", "newClientContext", "(", "SslProvider", "provider", ",", "File", "certChainFile", ")", "throws", "SSLException", "{", "return", "newClientContext", "(", "provider", ",", "certChainFile", ",", "null", ")", ";", "...
Creates a new client-side {@link SslContext}. @param provider the {@link SslContext} implementation to use. {@code null} to use the current default one. @param certChainFile an X.509 certificate chain file in PEM format. {@code null} to use the system default @return a new client-side {@link SslContext} @deprecated R...
[ "Creates", "a", "new", "client", "-", "side", "{", "@link", "SslContext", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L586-L589
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_ip_network_details_GET
public ArrayList<OvhIpDetails> serviceName_ip_network_details_GET(String serviceName, String network) throws IOException { """ List details about this IP Block REST: GET /dedicatedCloud/{serviceName}/ip/{network}/details @param serviceName [required] Domain of the service @param network [required] IP ex: 213....
java
public ArrayList<OvhIpDetails> serviceName_ip_network_details_GET(String serviceName, String network) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/ip/{network}/details"; StringBuilder sb = path(qPath, serviceName, network); String resp = exec(qPath, "GET", sb.toString(), null); return conv...
[ "public", "ArrayList", "<", "OvhIpDetails", ">", "serviceName_ip_network_details_GET", "(", "String", "serviceName", ",", "String", "network", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/ip/{network}/details\"", ";", "StringBu...
List details about this IP Block REST: GET /dedicatedCloud/{serviceName}/ip/{network}/details @param serviceName [required] Domain of the service @param network [required] IP ex: 213.186.33.34/24
[ "List", "details", "about", "this", "IP", "Block" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1310-L1315
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.listTypes
public List<String> listTypes() throws AtlasServiceException { """ Returns all type names in the system @return list of type names @throws AtlasServiceException """ final JSONObject jsonObject = callAPIWithQueryParams(API.LIST_TYPES, null); return extractResults(jsonObject, AtlasClient.RESULT...
java
public List<String> listTypes() throws AtlasServiceException { final JSONObject jsonObject = callAPIWithQueryParams(API.LIST_TYPES, null); return extractResults(jsonObject, AtlasClient.RESULTS, new ExtractOperation<String, String>()); }
[ "public", "List", "<", "String", ">", "listTypes", "(", ")", "throws", "AtlasServiceException", "{", "final", "JSONObject", "jsonObject", "=", "callAPIWithQueryParams", "(", "API", ".", "LIST_TYPES", ",", "null", ")", ";", "return", "extractResults", "(", "jsonO...
Returns all type names in the system @return list of type names @throws AtlasServiceException
[ "Returns", "all", "type", "names", "in", "the", "system" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L360-L363
davidmoten/grumpy
grumpy-ogc/src/main/java/com/github/davidmoten/grumpy/wms/ImageCache.java
ImageCache.put
public synchronized void put(WmsRequest request, byte[] image) { """ Sets the cached image for the request. @param request the WMS http request @param image bytes of the image """ synchronized (this) { String key = getKey(request); // make sure it's the last on the list of...
java
public synchronized void put(WmsRequest request, byte[] image) { synchronized (this) { String key = getKey(request); // make sure it's the last on the list of keys so won't be dropped // from cache keys.remove(key); keys.add(key); if (keys....
[ "public", "synchronized", "void", "put", "(", "WmsRequest", "request", ",", "byte", "[", "]", "image", ")", "{", "synchronized", "(", "this", ")", "{", "String", "key", "=", "getKey", "(", "request", ")", ";", "// make sure it's the last on the list of keys so w...
Sets the cached image for the request. @param request the WMS http request @param image bytes of the image
[ "Sets", "the", "cached", "image", "for", "the", "request", "." ]
train
https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-ogc/src/main/java/com/github/davidmoten/grumpy/wms/ImageCache.java#L151-L165
NessComputing/components-ness-jms
src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java
JmsRunnableFactory.createTopicListener
public TopicConsumer createTopicListener(final String topic, final ConsumerCallback<Message> messageCallback) { """ Creates a new {@link TopicConsumer}. For every message received (or when the timeout waiting for messages is hit), the callback is invoked with the message received. """ Preconditions.ch...
java
public TopicConsumer createTopicListener(final String topic, final ConsumerCallback<Message> messageCallback) { Preconditions.checkState(connectionFactory != null, "connection factory was never injected!"); return new TopicConsumer(connectionFactory, jmsConfig, topic, messageCallback); }
[ "public", "TopicConsumer", "createTopicListener", "(", "final", "String", "topic", ",", "final", "ConsumerCallback", "<", "Message", ">", "messageCallback", ")", "{", "Preconditions", ".", "checkState", "(", "connectionFactory", "!=", "null", ",", "\"connection factor...
Creates a new {@link TopicConsumer}. For every message received (or when the timeout waiting for messages is hit), the callback is invoked with the message received.
[ "Creates", "a", "new", "{" ]
train
https://github.com/NessComputing/components-ness-jms/blob/29e0d320ada3a1a375483437a9f3ff629822b714/src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java#L124-L128
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/PropertiesField.java
PropertiesField.addPropertiesFieldBehavior
public void addPropertiesFieldBehavior(BaseField fldDisplay, String strProperty) { """ Add the behaviors to sync this property to this virtual field. """ FieldListener listener = new CopyConvertersHandler(new PropertiesConverter(this, strProperty)); listener.setRespondsToMode(DBConstants.INIT_M...
java
public void addPropertiesFieldBehavior(BaseField fldDisplay, String strProperty) { FieldListener listener = new CopyConvertersHandler(new PropertiesConverter(this, strProperty)); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); listener.setRespondsToMode(DBConstants.READ_MOVE, false...
[ "public", "void", "addPropertiesFieldBehavior", "(", "BaseField", "fldDisplay", ",", "String", "strProperty", ")", "{", "FieldListener", "listener", "=", "new", "CopyConvertersHandler", "(", "new", "PropertiesConverter", "(", "this", ",", "strProperty", ")", ")", ";...
Add the behaviors to sync this property to this virtual field.
[ "Add", "the", "behaviors", "to", "sync", "this", "property", "to", "this", "virtual", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L616-L624
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java
RedisClusterStorage.resumeTrigger
@Override public void resumeTrigger(TriggerKey triggerKey, JedisCluster jedis) throws JobPersistenceException { """ Resume (un-pause) a {@link Trigger} @param triggerKey the key of the trigger to be resumed @param jedis a thread-safe Redis connection """ final String triggerHashKey = redis...
java
@Override public void resumeTrigger(TriggerKey triggerKey, JedisCluster jedis) throws JobPersistenceException { final String triggerHashKey = redisSchema.triggerHashKey(triggerKey); Boolean exists = jedis.sismember(redisSchema.triggersSet(), triggerHashKey); Double isPaused = jedis.zscore(re...
[ "@", "Override", "public", "void", "resumeTrigger", "(", "TriggerKey", "triggerKey", ",", "JedisCluster", "jedis", ")", "throws", "JobPersistenceException", "{", "final", "String", "triggerHashKey", "=", "redisSchema", ".", "triggerHashKey", "(", "triggerKey", ")", ...
Resume (un-pause) a {@link Trigger} @param triggerKey the key of the trigger to be resumed @param jedis a thread-safe Redis connection
[ "Resume", "(", "un", "-", "pause", ")", "a", "{", "@link", "Trigger", "}" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java#L532-L559
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
CheckpointCoordinator.discardCheckpoint
private void discardCheckpoint(PendingCheckpoint pendingCheckpoint, @Nullable Throwable cause) { """ Discards the given pending checkpoint because of the given cause. @param pendingCheckpoint to discard @param cause for discarding the checkpoint """ assert(Thread.holdsLock(lock)); Preconditions.checkNo...
java
private void discardCheckpoint(PendingCheckpoint pendingCheckpoint, @Nullable Throwable cause) { assert(Thread.holdsLock(lock)); Preconditions.checkNotNull(pendingCheckpoint); final long checkpointId = pendingCheckpoint.getCheckpointId(); LOG.info("Discarding checkpoint {} of job {}.", checkpointId, job, caus...
[ "private", "void", "discardCheckpoint", "(", "PendingCheckpoint", "pendingCheckpoint", ",", "@", "Nullable", "Throwable", "cause", ")", "{", "assert", "(", "Thread", ".", "holdsLock", "(", "lock", ")", ")", ";", "Preconditions", ".", "checkNotNull", "(", "pendin...
Discards the given pending checkpoint because of the given cause. @param pendingCheckpoint to discard @param cause for discarding the checkpoint
[ "Discards", "the", "given", "pending", "checkpoint", "because", "of", "the", "given", "cause", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L1313-L1344
alkacon/opencms-core
src/org/opencms/ui/login/CmsLoginUI.java
CmsLoginUI.showForgotPasswordView
public void showForgotPasswordView(String authToken) { """ Shows the 'forgot password view'.<p> @param authToken the authorization token given as a request parameter """ try { CmsTokenValidator validator = new CmsTokenValidator(); String validationResult = validator.validate...
java
public void showForgotPasswordView(String authToken) { try { CmsTokenValidator validator = new CmsTokenValidator(); String validationResult = validator.validateToken( A_CmsUI.getCmsObject(), authToken, OpenCms.getLoginManager().getTokenLif...
[ "public", "void", "showForgotPasswordView", "(", "String", "authToken", ")", "{", "try", "{", "CmsTokenValidator", "validator", "=", "new", "CmsTokenValidator", "(", ")", ";", "String", "validationResult", "=", "validator", ".", "validateToken", "(", "A_CmsUI", "....
Shows the 'forgot password view'.<p> @param authToken the authorization token given as a request parameter
[ "Shows", "the", "forgot", "password", "view", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsLoginUI.java#L488-L517
wildfly/wildfly-core
logging/src/main/java/org/jboss/as/logging/deployments/resources/LoggingDeploymentResources.java
LoggingDeploymentResources.registerDeploymentResource
public static void registerDeploymentResource(final DeploymentResourceSupport deploymentResourceSupport, final LoggingConfigurationService service) { """ Registers the deployment resources needed. @param deploymentResourceSupport the deployment resource support @param service the service, whi...
java
public static void registerDeploymentResource(final DeploymentResourceSupport deploymentResourceSupport, final LoggingConfigurationService service) { final PathElement base = PathElement.pathElement("configuration", service.getConfiguration()); deploymentResourceSupport.getDeploymentSubModel(LoggingExte...
[ "public", "static", "void", "registerDeploymentResource", "(", "final", "DeploymentResourceSupport", "deploymentResourceSupport", ",", "final", "LoggingConfigurationService", "service", ")", "{", "final", "PathElement", "base", "=", "PathElement", ".", "pathElement", "(", ...
Registers the deployment resources needed. @param deploymentResourceSupport the deployment resource support @param service the service, which may be {@code null}, used to find the resource names that need to be registered
[ "Registers", "the", "deployment", "resources", "needed", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/logging/src/main/java/org/jboss/as/logging/deployments/resources/LoggingDeploymentResources.java#L110-L123
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newUsed
public Used newUsed(QualifiedName id, QualifiedName activity, QualifiedName entity) { """ A factory method to create an instance of a usage {@link Used} @param id an optional identifier for a usage @param activity the identifier of the <a href="http://www.w3.org/TR/prov-dm/#usage.activity">activity</a> that use...
java
public Used newUsed(QualifiedName id, QualifiedName activity, QualifiedName entity) { Used res = newUsed(id); res.setActivity(activity); res.setEntity(entity); return res; }
[ "public", "Used", "newUsed", "(", "QualifiedName", "id", ",", "QualifiedName", "activity", ",", "QualifiedName", "entity", ")", "{", "Used", "res", "=", "newUsed", "(", "id", ")", ";", "res", ".", "setActivity", "(", "activity", ")", ";", "res", ".", "se...
A factory method to create an instance of a usage {@link Used} @param id an optional identifier for a usage @param activity the identifier of the <a href="http://www.w3.org/TR/prov-dm/#usage.activity">activity</a> that used an entity @param entity an optional identifier for the <a href="http://www.w3.org/TR/prov-dm/#u...
[ "A", "factory", "method", "to", "create", "an", "instance", "of", "a", "usage", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L977-L982
liferay/com-liferay-commerce
commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentCriterionPersistenceImpl.java
CommerceUserSegmentCriterionPersistenceImpl.findAll
@Override public List<CommerceUserSegmentCriterion> findAll() { """ Returns all the commerce user segment criterions. @return the commerce user segment criterions """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceUserSegmentCriterion> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceUserSegmentCriterion", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce user segment criterions. @return the commerce user segment criterions
[ "Returns", "all", "the", "commerce", "user", "segment", "criterions", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentCriterionPersistenceImpl.java#L1169-L1172
nominanuda/zen-project
zen-image/src/main/java/com/nominanuda/image/ImageGet.java
ImageGet.handle
public Object handle(Stru _cmd, HttpRequest request) throws Exception { """ (path/)name.ext | (path/)name.xH.ext | (path/)name.Wx.ext | (path/)name.WxH.ext """ try { Check.illegalargument.assertEquals(GET, request.getRequestLine().getMethod()); Obj cmd = _cmd.asObj(); @Nullable String path = cmd.get...
java
public Object handle(Stru _cmd, HttpRequest request) throws Exception { try { Check.illegalargument.assertEquals(GET, request.getRequestLine().getMethod()); Obj cmd = _cmd.asObj(); @Nullable String path = cmd.getStr(CMD_PATH); String nameAndTx = cmd.getStrictStr(CMD_NAME); String ext = cmd.getStrictStr...
[ "public", "Object", "handle", "(", "Stru", "_cmd", ",", "HttpRequest", "request", ")", "throws", "Exception", "{", "try", "{", "Check", ".", "illegalargument", ".", "assertEquals", "(", "GET", ",", "request", ".", "getRequestLine", "(", ")", ".", "getMethod"...
(path/)name.ext | (path/)name.xH.ext | (path/)name.Wx.ext | (path/)name.WxH.ext
[ "(", "path", "/", ")", "name", ".", "ext", "|", "(", "path", "/", ")", "name", ".", "xH", ".", "ext", "|", "(", "path", "/", ")", "name", ".", "Wx", ".", "ext", "|", "(", "path", "/", ")", "name", ".", "WxH", ".", "ext" ]
train
https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-image/src/main/java/com/nominanuda/image/ImageGet.java#L111-L147
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/TextOperator.java
TextOperator.doExec
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws IOException, TemplateException { """ Execute TEXT operator. Uses property path to extract content value, convert it to string and set element text content. Note that this operator operates on elemen...
java
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws IOException, TemplateException { if (!propertyPath.equals(".") && ConverterRegistry.hasType(scope.getClass())) { throw new TemplateException("Operand is property path but scope is not an object.");...
[ "@", "Override", "protected", "Object", "doExec", "(", "Element", "element", ",", "Object", "scope", ",", "String", "propertyPath", ",", "Object", "...", "arguments", ")", "throws", "IOException", ",", "TemplateException", "{", "if", "(", "!", "propertyPath", ...
Execute TEXT operator. Uses property path to extract content value, convert it to string and set element text content. Note that this operator operates on element without children. Failing to obey this constraint rise templates exception; anyway, validation tool catches this condition. @param element context element, ...
[ "Execute", "TEXT", "operator", ".", "Uses", "property", "path", "to", "extract", "content", "value", "convert", "it", "to", "string", "and", "set", "element", "text", "content", ".", "Note", "that", "this", "operator", "operates", "on", "element", "without", ...
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/TextOperator.java#L55-L69
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/type/ResolvableType.java
ResolvableType.forClassWithGenerics
public static ResolvableType forClassWithGenerics(Class<?> sourceClass, ResolvableType... generics) { """ Return a {@link ResolvableType} for the specified {@link Class} with pre-declared generics. @param sourceClass the source class @param generics the generics of the class @return a {@link ResolvableType} for...
java
public static ResolvableType forClassWithGenerics(Class<?> sourceClass, ResolvableType... generics) { Assert.notNull(sourceClass, "Source class must not be null"); Assert.notNull(generics, "Generics must not be null"); TypeVariable<?>[] variables = sourceClass.getTypeParameters(); Assert.isTrue(variables.length...
[ "public", "static", "ResolvableType", "forClassWithGenerics", "(", "Class", "<", "?", ">", "sourceClass", ",", "ResolvableType", "...", "generics", ")", "{", "Assert", ".", "notNull", "(", "sourceClass", ",", "\"Source class must not be null\"", ")", ";", "Assert", ...
Return a {@link ResolvableType} for the specified {@link Class} with pre-declared generics. @param sourceClass the source class @param generics the generics of the class @return a {@link ResolvableType} for the specific class and generics @see #forClassWithGenerics(Class, Class...)
[ "Return", "a", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/type/ResolvableType.java#L908-L914
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.lookupField
public static Field lookupField( Class parentClass, String fieldName ) { """ Get a Field in a Class. @param parentClass the Class in which to find the Field. @param fieldName the name of the Field. @return the Field with the given name, or <code>null</code> if the field does not exist. """ try { ...
java
public static Field lookupField( Class parentClass, String fieldName ) { try { return parentClass.getDeclaredField( fieldName ); } catch ( NoSuchFieldException e ) { Class superClass = parentClass.getSuperclass(); return superClass != null ? lookupField( s...
[ "public", "static", "Field", "lookupField", "(", "Class", "parentClass", ",", "String", "fieldName", ")", "{", "try", "{", "return", "parentClass", ".", "getDeclaredField", "(", "fieldName", ")", ";", "}", "catch", "(", "NoSuchFieldException", "e", ")", "{", ...
Get a Field in a Class. @param parentClass the Class in which to find the Field. @param fieldName the name of the Field. @return the Field with the given name, or <code>null</code> if the field does not exist.
[ "Get", "a", "Field", "in", "a", "Class", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L285-L294
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java
AbstractManagerFactoryBuilder.withDefaultSerialConsistencyMap
public T withDefaultSerialConsistencyMap(Map<String, ConsistencyLevel> serialConsistencyMap) { """ Define the default Consistency level map to be used for all LightWeightTransaction operations operations The map keys represent table names and values represent the corresponding consistency level @return Manage...
java
public T withDefaultSerialConsistencyMap(Map<String, ConsistencyLevel> serialConsistencyMap) { configMap.put(CONSISTENCY_LEVEL_SERIAL_MAP, serialConsistencyMap); return getThis(); }
[ "public", "T", "withDefaultSerialConsistencyMap", "(", "Map", "<", "String", ",", "ConsistencyLevel", ">", "serialConsistencyMap", ")", "{", "configMap", ".", "put", "(", "CONSISTENCY_LEVEL_SERIAL_MAP", ",", "serialConsistencyMap", ")", ";", "return", "getThis", "(", ...
Define the default Consistency level map to be used for all LightWeightTransaction operations operations The map keys represent table names and values represent the corresponding consistency level @return ManagerFactoryBuilder @see <a href="https://github.com/doanduyhai/Achilles/wiki/Configuration-Parameters#consisten...
[ "Define", "the", "default", "Consistency", "level", "map", "to", "be", "used", "for", "all", "LightWeightTransaction", "operations", "operations", "The", "map", "keys", "represent", "table", "names", "and", "values", "represent", "the", "corresponding", "consistency...
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java#L161-L164
google/closure-compiler
src/com/google/javascript/jscomp/JSModuleGraph.java
JSModuleGraph.getDeepestCommonDependencyInclusive
public JSModule getDeepestCommonDependencyInclusive( JSModule m1, JSModule m2) { """ Finds the deepest common dependency of two modules, including the modules themselves. @param m1 A module in this graph @param m2 A module in this graph @return The deepest common dep of {@code m1} and {@code m2}, or nu...
java
public JSModule getDeepestCommonDependencyInclusive( JSModule m1, JSModule m2) { if (m2 == m1 || dependsOn(m2, m1)) { return m1; } else if (dependsOn(m1, m2)) { return m2; } return getDeepestCommonDependency(m1, m2); }
[ "public", "JSModule", "getDeepestCommonDependencyInclusive", "(", "JSModule", "m1", ",", "JSModule", "m2", ")", "{", "if", "(", "m2", "==", "m1", "||", "dependsOn", "(", "m2", ",", "m1", ")", ")", "{", "return", "m1", ";", "}", "else", "if", "(", "depe...
Finds the deepest common dependency of two modules, including the modules themselves. @param m1 A module in this graph @param m2 A module in this graph @return The deepest common dep of {@code m1} and {@code m2}, or null if they have no common dependencies
[ "Finds", "the", "deepest", "common", "dependency", "of", "two", "modules", "including", "the", "modules", "themselves", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JSModuleGraph.java#L434-L443
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildClassConstantSummary
public void buildClassConstantSummary(XMLNode node, Content summariesTree) { """ Build the summary for the current class. @param node the XML element that specifies which components to document @param summariesTree the tree to which the class constant summary will be added """ ClassDoc[] classes = ...
java
public void buildClassConstantSummary(XMLNode node, Content summariesTree) { ClassDoc[] classes = currentPackage.name().length() > 0 ? currentPackage.allClasses() : configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); Arrays.sort(classe...
[ "public", "void", "buildClassConstantSummary", "(", "XMLNode", "node", ",", "Content", "summariesTree", ")", "{", "ClassDoc", "[", "]", "classes", "=", "currentPackage", ".", "name", "(", ")", ".", "length", "(", ")", ">", "0", "?", "currentPackage", ".", ...
Build the summary for the current class. @param node the XML element that specifies which components to document @param summariesTree the tree to which the class constant summary will be added
[ "Build", "the", "summary", "for", "the", "current", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java#L211-L228
weld/core
impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
Reflections.findDeclaredMethodByName
public static Method findDeclaredMethodByName(Class<?> clazz, String methodName) { """ Searches for a declared method with a given name. If the class declares multiple methods with the given name, there is no guarantee as of which methods is returned. Null is returned if the class does not declare a method with ...
java
public static Method findDeclaredMethodByName(Class<?> clazz, String methodName) { for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(clazz))) { if (methodName.equals(method.getName())) { return method; } } return null; }
[ "public", "static", "Method", "findDeclaredMethodByName", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ")", "{", "for", "(", "Method", "method", ":", "AccessController", ".", "doPrivileged", "(", "new", "GetDeclaredMethodsAction", "(", "cla...
Searches for a declared method with a given name. If the class declares multiple methods with the given name, there is no guarantee as of which methods is returned. Null is returned if the class does not declare a method with the given name. @param clazz the given class @param methodName the given method name @return m...
[ "Searches", "for", "a", "declared", "method", "with", "a", "given", "name", ".", "If", "the", "class", "declares", "multiple", "methods", "with", "the", "given", "name", "there", "is", "no", "guarantee", "as", "of", "which", "methods", "is", "returned", "....
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java#L440-L447
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseJITOnlyReads
private void parseJITOnlyReads(Map<Object, Object> props) { """ Parse the configuration on whether to perform JIT allocate only reads or leave it to the default behavior. @param props """ Object value = props.get(HttpConfigConstants.PROPNAME_JIT_ONLY_READS); if (null != value) { ...
java
private void parseJITOnlyReads(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_JIT_ONLY_READS); if (null != value) { this.bJITOnlyReads = convertBoolean(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { T...
[ "private", "void", "parseJITOnlyReads", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_JIT_ONLY_READS", ")", ";", "if", "(", "null", "!=", "value", "...
Parse the configuration on whether to perform JIT allocate only reads or leave it to the default behavior. @param props
[ "Parse", "the", "configuration", "on", "whether", "to", "perform", "JIT", "allocate", "only", "reads", "or", "leave", "it", "to", "the", "default", "behavior", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1029-L1037
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/access/DefaultAccess.java
DefaultAccess.getDatastreamHeaders
private static Property[] getDatastreamHeaders(String pid, Datastream ds) { """ Content-Length is determined elsewhere Content-Type is determined elsewhere Last-Modified ETag @param ds @return """ Property[] result = new Property[3]; result[0] = new Property(HttpHeaders.ACCEPT_RANGES,"byte...
java
private static Property[] getDatastreamHeaders(String pid, Datastream ds) { Property[] result = new Property[3]; result[0] = new Property(HttpHeaders.ACCEPT_RANGES,"bytes"); result[1] = new Property(HttpHeaders.ETAG, Datastream.defaultETag(pid, ds)); result[2] = new Property(HttpHeaders....
[ "private", "static", "Property", "[", "]", "getDatastreamHeaders", "(", "String", "pid", ",", "Datastream", "ds", ")", "{", "Property", "[", "]", "result", "=", "new", "Property", "[", "3", "]", ";", "result", "[", "0", "]", "=", "new", "Property", "("...
Content-Length is determined elsewhere Content-Type is determined elsewhere Last-Modified ETag @param ds @return
[ "Content", "-", "Length", "is", "determined", "elsewhere", "Content", "-", "Type", "is", "determined", "elsewhere", "Last", "-", "Modified", "ETag" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/DefaultAccess.java#L1183-L1189
lightblue-platform/lightblue-client
core/src/main/java/com/redhat/lightblue/client/Query.java
Query.logical
public static Query logical(LogOp op, Collection<Query> expressions) { """ <pre> { $and : [ expressions ] } { $or : [ expressions ] } </pre> """ Query q = new Query(true); for (Query x : expressions) { ((ArrayNode) q.node).add(x.toJson()); } Query a = new Query(fa...
java
public static Query logical(LogOp op, Collection<Query> expressions) { Query q = new Query(true); for (Query x : expressions) { ((ArrayNode) q.node).add(x.toJson()); } Query a = new Query(false); a.add(op.toString(), q.toJson()); return a; }
[ "public", "static", "Query", "logical", "(", "LogOp", "op", ",", "Collection", "<", "Query", ">", "expressions", ")", "{", "Query", "q", "=", "new", "Query", "(", "true", ")", ";", "for", "(", "Query", "x", ":", "expressions", ")", "{", "(", "(", "...
<pre> { $and : [ expressions ] } { $or : [ expressions ] } </pre>
[ "<pre", ">", "{", "$and", ":", "[", "expressions", "]", "}", "{", "$or", ":", "[", "expressions", "]", "}", "<", "/", "pre", ">" ]
train
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/core/src/main/java/com/redhat/lightblue/client/Query.java#L548-L556
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
JDBCStorageConnection.propertyData
private PropertyData propertyData(QPath parentPath, ResultSet item) throws RepositoryException, SQLException, IOException { """ Read property data without value data. For listChildPropertiesData(NodeData). @param parentPath - parent path @param item database - ResultSet with Item record(s) @return Pro...
java
private PropertyData propertyData(QPath parentPath, ResultSet item) throws RepositoryException, SQLException, IOException { String cid = item.getString(COLUMN_ID); String cname = item.getString(COLUMN_NAME); int cversion = item.getInt(COLUMN_VERSION); String cpid = item.getString(COLUMN...
[ "private", "PropertyData", "propertyData", "(", "QPath", "parentPath", ",", "ResultSet", "item", ")", "throws", "RepositoryException", ",", "SQLException", ",", "IOException", "{", "String", "cid", "=", "item", ".", "getString", "(", "COLUMN_ID", ")", ";", "Stri...
Read property data without value data. For listChildPropertiesData(NodeData). @param parentPath - parent path @param item database - ResultSet with Item record(s) @return PropertyData instance @throws RepositoryException Repository error @throws SQLException database error @throws IOException I/O error
[ "Read", "property", "data", "without", "value", "data", ".", "For", "listChildPropertiesData", "(", "NodeData", ")", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java#L2030-L2061
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.startProcessDocs
protected boolean startProcessDocs(final RootDoc rootDoc) throws IOException { """ Extracts the contents of certain types of javadoc and adds them to an output file. @param rootDoc The documentation root. @return Whether the JavaDoc run succeeded. @throws java.io.IOException if output can't be written. ""...
java
protected boolean startProcessDocs(final RootDoc rootDoc) throws IOException { for (String[] options : rootDoc.options()) { parseOption(options); } // Make sure the user specified a settings directory OR that we should use the defaults. // Both are not allowed. // Ne...
[ "protected", "boolean", "startProcessDocs", "(", "final", "RootDoc", "rootDoc", ")", "throws", "IOException", "{", "for", "(", "String", "[", "]", "options", ":", "rootDoc", ".", "options", "(", ")", ")", "{", "parseOption", "(", "options", ")", ";", "}", ...
Extracts the contents of certain types of javadoc and adds them to an output file. @param rootDoc The documentation root. @return Whether the JavaDoc run succeeded. @throws java.io.IOException if output can't be written.
[ "Extracts", "the", "contents", "of", "certain", "types", "of", "javadoc", "and", "adds", "them", "to", "an", "output", "file", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L139-L164
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
RelationalJMapper.oneToManyWithoutControl
public <D> D oneToManyWithoutControl(Class<D> destinationClass, final T source) { """ This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><...
java
public <D> D oneToManyWithoutControl(Class<D> destinationClass, final T source) { try{ return this.<D,T>getJMapper(relationalOneToManyMapper,destinationClass).getDestinationWithoutControl(source); } catch (Exception e) { return (D) this.destinationClassControl(e,destinationClass); } }
[ "public", "<", "D", ">", "D", "oneToManyWithoutControl", "(", "Class", "<", "D", ">", "destinationClass", ",", "final", "T", "source", ")", "{", "try", "{", "return", "this", ".", "<", "D", ",", "T", ">", "getJMapper", "(", "relationalOneToManyMapper", "...
This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><td><code>ALL_FIELDS</code></td> </tr><tr> <td><code>MappingType</code> of Source</td><td><code>A...
[ "This", "method", "returns", "a", "new", "instance", "of", "Target", "Class", "with", "this", "setting", ":", "<table", "summary", "=", ">", "<tr", ">", "<td", ">", "<code", ">", "NullPointerControl<", "/", "code", ">", "<", "/", "td", ">", "<td", ">",...
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java#L557-L560
realtime-framework/RealtimeMessaging-Android
library/src/main/java/ibt/ortc/extensibility/GcmRegistration.java
GcmRegistration.storeRegistrationId
private static void storeRegistrationId(Context context, String regId) { """ Stores the registration ID and the app versionCode in the application's {@code SharedPreferences}. @param context application's context. @param regId registration ID """ final SharedPreferences prefs = getGcmPreferences(c...
java
private static void storeRegistrationId(Context context, String regId) { final SharedPreferences prefs = getGcmPreferences(context); int appVersion = getAppVersion(context); SharedPreferences.Editor editor = prefs.edit(); editor.putString(PROPERTY_REG_ID, regId); editor.putInt(PR...
[ "private", "static", "void", "storeRegistrationId", "(", "Context", "context", ",", "String", "regId", ")", "{", "final", "SharedPreferences", "prefs", "=", "getGcmPreferences", "(", "context", ")", ";", "int", "appVersion", "=", "getAppVersion", "(", "context", ...
Stores the registration ID and the app versionCode in the application's {@code SharedPreferences}. @param context application's context. @param regId registration ID
[ "Stores", "the", "registration", "ID", "and", "the", "app", "versionCode", "in", "the", "application", "s", "{", "@code", "SharedPreferences", "}", "." ]
train
https://github.com/realtime-framework/RealtimeMessaging-Android/blob/f0d87b92ed7c591bcfe2b9cf45b947865570e061/library/src/main/java/ibt/ortc/extensibility/GcmRegistration.java#L156-L163
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java
CPDefinitionPersistenceImpl.findByGroupId
@Override public List<CPDefinition> findByGroupId(long groupId) { """ Returns all the cp definitions where groupId = &#63;. @param groupId the group ID @return the matching cp definitions """ return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPDefinition> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPDefinition", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp definitions where groupId = &#63;. @param groupId the group ID @return the matching cp definitions
[ "Returns", "all", "the", "cp", "definitions", "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/CPDefinitionPersistenceImpl.java#L1507-L1510
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.setInputChoiceStrategy
public static void setInputChoiceStrategy(Job job, Class<? extends FromCobolChoiceStrategy> choiceStrategyClass) { """ Sets the job input record choice strategy class. @param job The job to configure. @param choiceStrategyClass The input record choice strategy class. """ job.getConfiguration().setCla...
java
public static void setInputChoiceStrategy(Job job, Class<? extends FromCobolChoiceStrategy> choiceStrategyClass) { job.getConfiguration().setClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, choiceStrategyClass, FromCobolChoiceStrategy.class); }
[ "public", "static", "void", "setInputChoiceStrategy", "(", "Job", "job", ",", "Class", "<", "?", "extends", "FromCobolChoiceStrategy", ">", "choiceStrategyClass", ")", "{", "job", ".", "getConfiguration", "(", ")", ".", "setClass", "(", "CONF_INPUT_RECORD_CHOICE_STR...
Sets the job input record choice strategy class. @param job The job to configure. @param choiceStrategyClass The input record choice strategy class.
[ "Sets", "the", "job", "input", "record", "choice", "strategy", "class", "." ]
train
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L100-L102
apache/incubator-gobblin
gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/source/extractor/extract/google/GoogleCommon.java
GoogleCommon.getPrivateKey
private static Path getPrivateKey(FileSystem fs, String privateKeyPath) throws IOException { """ Before retrieving private key, it makes sure that original private key's permission is read only on the owner. This is a way to ensure to keep private key private. @param fs @param privateKeyPath @return @throws I...
java
private static Path getPrivateKey(FileSystem fs, String privateKeyPath) throws IOException { Path keyPath = new Path(privateKeyPath); FileStatus fileStatus = fs.getFileStatus(keyPath); Preconditions.checkArgument(USER_READ_PERMISSION_ONLY.equals(fileStatus.getPermission()), "...
[ "private", "static", "Path", "getPrivateKey", "(", "FileSystem", "fs", ",", "String", "privateKeyPath", ")", "throws", "IOException", "{", "Path", "keyPath", "=", "new", "Path", "(", "privateKeyPath", ")", ";", "FileStatus", "fileStatus", "=", "fs", ".", "getF...
Before retrieving private key, it makes sure that original private key's permission is read only on the owner. This is a way to ensure to keep private key private. @param fs @param privateKeyPath @return @throws IOException
[ "Before", "retrieving", "private", "key", "it", "makes", "sure", "that", "original", "private", "key", "s", "permission", "is", "read", "only", "on", "the", "owner", ".", "This", "is", "a", "way", "to", "ensure", "to", "keep", "private", "key", "private", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/source/extractor/extract/google/GoogleCommon.java#L181-L187
authlete/authlete-java-common
src/main/java/com/authlete/common/util/Utils.java
Utils.stringifyScopeNames
public static String stringifyScopeNames(Scope[] scopes) { """ Generate a list of scope names. @param scopes An array of {@link Scope}. If {@code null} is given, {@code null} is returned. @return A string containing scope names using white spaces as the delimiter. @since 2.5 """ if (scope...
java
public static String stringifyScopeNames(Scope[] scopes) { if (scopes == null) { return null; } String[] array = new String[scopes.length]; for (int i = 0; i < scopes.length; ++i) { array[i] = (scopes[i] == null) ? null : scopes[i]...
[ "public", "static", "String", "stringifyScopeNames", "(", "Scope", "[", "]", "scopes", ")", "{", "if", "(", "scopes", "==", "null", ")", "{", "return", "null", ";", "}", "String", "[", "]", "array", "=", "new", "String", "[", "scopes", ".", "length", ...
Generate a list of scope names. @param scopes An array of {@link Scope}. If {@code null} is given, {@code null} is returned. @return A string containing scope names using white spaces as the delimiter. @since 2.5
[ "Generate", "a", "list", "of", "scope", "names", "." ]
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/Utils.java#L257-L272
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java
WorkbinsApi.getWorkbinContent
public ApiSuccessResponse getWorkbinContent(String workbinId, GetWorkbinContentData getWorkbinContentData) throws ApiException { """ Get the content of a Workbin. @param workbinId Id of the Workbin (required) @param getWorkbinContentData (required) @return ApiSuccessResponse @throws ApiException If fail to ...
java
public ApiSuccessResponse getWorkbinContent(String workbinId, GetWorkbinContentData getWorkbinContentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getWorkbinContentWithHttpInfo(workbinId, getWorkbinContentData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "getWorkbinContent", "(", "String", "workbinId", ",", "GetWorkbinContentData", "getWorkbinContentData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "getWorkbinContentWithHttpInfo", "(", "wor...
Get the content of a Workbin. @param workbinId Id of the Workbin (required) @param getWorkbinContentData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "the", "content", "of", "a", "Workbin", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java#L404-L407
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.resolveQualifiedMethod
Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) { """ Resolve a qualified method identifier @param pos The position to use for error reporting. ...
java
Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) { return resolveQualifiedMethod(pos, env, site.tsym, site, name, argtypes, typeargtypes); }
[ "Symbol", "resolveQualifiedMethod", "(", "DiagnosticPosition", "pos", ",", "Env", "<", "AttrContext", ">", "env", ",", "Type", "site", ",", "Name", "name", ",", "List", "<", "Type", ">", "argtypes", ",", "List", "<", "Type", ">", "typeargtypes", ")", "{", ...
Resolve a qualified method identifier @param pos The position to use for error reporting. @param env The environment current at the method invocation. @param site The type of the qualifying expression, in which identifier is searched. @param name The identifier's name. @param argtypes The types o...
[ "Resolve", "a", "qualified", "method", "identifier" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L2610-L2614
respoke/respoke-sdk-android
respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java
Respoke.postTaskError
public static void postTaskError(final TaskCompletionListener completionListener, final String errorMessage) { """ A helper function to post an error message to a TaskCompletionListener on the UI thread @param completionListener The TaskCompletionListener to notify @param errorMessage The error message t...
java
public static void postTaskError(final TaskCompletionListener completionListener, final String errorMessage) { new Handler(Looper.getMainLooper()).post(new Runnable() { @Override public void run() { if (null != completionListener) { completionListener....
[ "public", "static", "void", "postTaskError", "(", "final", "TaskCompletionListener", "completionListener", ",", "final", "String", "errorMessage", ")", "{", "new", "Handler", "(", "Looper", ".", "getMainLooper", "(", ")", ")", ".", "post", "(", "new", "Runnable"...
A helper function to post an error message to a TaskCompletionListener on the UI thread @param completionListener The TaskCompletionListener to notify @param errorMessage The error message to post
[ "A", "helper", "function", "to", "post", "an", "error", "message", "to", "a", "TaskCompletionListener", "on", "the", "UI", "thread" ]
train
https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/Respoke.java#L81-L90
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/HerokuAPI.java
HerokuAPI.addCollaborator
public void addCollaborator(String appName, String collaborator) { """ Add a collaborator to an app. @param appName App name. See {@link #listApps} for a list of apps that can be used. @param collaborator Username of the collaborator to add. This is usually in the form of "user@company.com". """ conn...
java
public void addCollaborator(String appName, String collaborator) { connection.execute(new SharingAdd(appName, collaborator), apiKey); }
[ "public", "void", "addCollaborator", "(", "String", "appName", ",", "String", "collaborator", ")", "{", "connection", ".", "execute", "(", "new", "SharingAdd", "(", "appName", ",", "collaborator", ")", ",", "apiKey", ")", ";", "}" ]
Add a collaborator to an app. @param appName App name. See {@link #listApps} for a list of apps that can be used. @param collaborator Username of the collaborator to add. This is usually in the form of "user@company.com".
[ "Add", "a", "collaborator", "to", "an", "app", "." ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/HerokuAPI.java#L311-L313
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
FixedDelayRestartStrategy.createFactory
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { """ Creates a FixedDelayRestartStrategy from the given Configuration. @param configuration Configuration containing the parameter values for the restart strategy @return Initialized instance of FixedDel...
java
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { int maxAttempts = configuration.getInteger(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, 1); String delayString = configuration.getString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY); lon...
[ "public", "static", "FixedDelayRestartStrategyFactory", "createFactory", "(", "Configuration", "configuration", ")", "throws", "Exception", "{", "int", "maxAttempts", "=", "configuration", ".", "getInteger", "(", "ConfigConstants", ".", "RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS"...
Creates a FixedDelayRestartStrategy from the given Configuration. @param configuration Configuration containing the parameter values for the restart strategy @return Initialized instance of FixedDelayRestartStrategy @throws Exception
[ "Creates", "a", "FixedDelayRestartStrategy", "from", "the", "given", "Configuration", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java#L75-L91
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/BooleanUtils.java
BooleanUtils.toBoolean
public static boolean toBoolean(final String str, final String trueString, final String falseString) { """ <p>Converts a String to a Boolean throwing an exception if no match found.</p> <pre> BooleanUtils.toBoolean("true", "true", "false") = true BooleanUtils.toBoolean("false", "true", "false") = false </pr...
java
public static boolean toBoolean(final String str, final String trueString, final String falseString) { if (str == trueString) { return true; } else if (str == falseString) { return false; } else if (str != null) { if (str.equals(trueString)) { ...
[ "public", "static", "boolean", "toBoolean", "(", "final", "String", "str", ",", "final", "String", "trueString", ",", "final", "String", "falseString", ")", "{", "if", "(", "str", "==", "trueString", ")", "{", "return", "true", ";", "}", "else", "if", "(...
<p>Converts a String to a Boolean throwing an exception if no match found.</p> <pre> BooleanUtils.toBoolean("true", "true", "false") = true BooleanUtils.toBoolean("false", "true", "false") = false </pre> @param str the String to check @param trueString the String to match for {@code true} (case sensitive), may be ...
[ "<p", ">", "Converts", "a", "String", "to", "a", "Boolean", "throwing", "an", "exception", "if", "no", "match", "found", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/BooleanUtils.java#L726-L740
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseShyb2csr
public static int cusparseShyb2csr( cusparseHandle handle, cusparseMatDescr descrA, cusparseHybMat hybA, Pointer csrSortedValA, Pointer csrSortedRowPtrA, Pointer csrSortedColIndA) { """ Description: This routine converts a sparse matrix in HYB storage form...
java
public static int cusparseShyb2csr( cusparseHandle handle, cusparseMatDescr descrA, cusparseHybMat hybA, Pointer csrSortedValA, Pointer csrSortedRowPtrA, Pointer csrSortedColIndA) { return checkResult(cusparseShyb2csrNative(handle, descrA, hybA, c...
[ "public", "static", "int", "cusparseShyb2csr", "(", "cusparseHandle", "handle", ",", "cusparseMatDescr", "descrA", ",", "cusparseHybMat", "hybA", ",", "Pointer", "csrSortedValA", ",", "Pointer", "csrSortedRowPtrA", ",", "Pointer", "csrSortedColIndA", ")", "{", "return...
Description: This routine converts a sparse matrix in HYB storage format to a sparse matrix in CSR storage format.
[ "Description", ":", "This", "routine", "converts", "a", "sparse", "matrix", "in", "HYB", "storage", "format", "to", "a", "sparse", "matrix", "in", "CSR", "storage", "format", "." ]
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L12097-L12106
gfk-ba/senbot
SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java
ElementService.findExpectedElement
public WebElement findExpectedElement(By by, boolean includeHiddenElements) { """ Find an element that is expected to be on the page @param by - the {@link By} to find @param includeHiddenElements - should hidden elements on the page be included or not @return the matched {@link WebElement} @throws Asserti...
java
public WebElement findExpectedElement(By by, boolean includeHiddenElements) { log.debug("findExpectedElement() called with: " + by); waitForLoaders(); try { WebElement foundElement = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout()) .until(ExpectedConditions.presenceOfElementLocated(...
[ "public", "WebElement", "findExpectedElement", "(", "By", "by", ",", "boolean", "includeHiddenElements", ")", "{", "log", ".", "debug", "(", "\"findExpectedElement() called with: \"", "+", "by", ")", ";", "waitForLoaders", "(", ")", ";", "try", "{", "WebElement", ...
Find an element that is expected to be on the page @param by - the {@link By} to find @param includeHiddenElements - should hidden elements on the page be included or not @return the matched {@link WebElement} @throws AssertionError if no {@link WebElement} is found or the search times out
[ "Find", "an", "element", "that", "is", "expected", "to", "be", "on", "the", "page" ]
train
https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L110-L136
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DescriptorUtil.java
DescriptorUtil.isEnabled
public static boolean isEnabled(String property, DatasetDescriptor descriptor) { """ Returns whether the value of the descriptor property is {@code true}. @param property a String property name @param descriptor a {@link DatasetDescriptor} @return {@code true} if set and "true", {@code false} otherwise. "...
java
public static boolean isEnabled(String property, DatasetDescriptor descriptor) { if (descriptor.hasProperty(property)) { // return true if and only if the property value is "true" return Boolean.valueOf(descriptor.getProperty(property)); } return false; }
[ "public", "static", "boolean", "isEnabled", "(", "String", "property", ",", "DatasetDescriptor", "descriptor", ")", "{", "if", "(", "descriptor", ".", "hasProperty", "(", "property", ")", ")", "{", "// return true if and only if the property value is \"true\"", "return"...
Returns whether the value of the descriptor property is {@code true}. @param property a String property name @param descriptor a {@link DatasetDescriptor} @return {@code true} if set and "true", {@code false} otherwise.
[ "Returns", "whether", "the", "value", "of", "the", "descriptor", "property", "is", "{", "@code", "true", "}", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DescriptorUtil.java#L30-L36