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
vatbub/common
view/core/src/main/java/com/github/vatbub/common/view/core/CustomGroup.java
CustomGroup.getRectangleByCoordinatesPreferFront
public Rectangle getRectangleByCoordinatesPreferFront(double x, double y) { """ Gets the rectangle at the specified coordinates if there is one. The coordinates may even point in the middle of a rectangle to be found. Searches from the foreground to the background which means that rectangles in front of other rect...
java
public Rectangle getRectangleByCoordinatesPreferFront(double x, double y) { for (int i = this.getChildren().size() - 1; i >= 0; i--) { Node node = this.getChildren().get(i); if (node instanceof Rectangle) { Rectangle rectangle = (Rectangle) node; if (x >= ...
[ "public", "Rectangle", "getRectangleByCoordinatesPreferFront", "(", "double", "x", ",", "double", "y", ")", "{", "for", "(", "int", "i", "=", "this", ".", "getChildren", "(", ")", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ...
Gets the rectangle at the specified coordinates if there is one. The coordinates may even point in the middle of a rectangle to be found. Searches from the foreground to the background which means that rectangles in front of other rectangles will be preferred. <br> <b>Only finds Rectangles, no other shapes</b> @param ...
[ "Gets", "the", "rectangle", "at", "the", "specified", "coordinates", "if", "there", "is", "one", ".", "The", "coordinates", "may", "even", "point", "in", "the", "middle", "of", "a", "rectangle", "to", "be", "found", ".", "Searches", "from", "the", "foregro...
train
https://github.com/vatbub/common/blob/8b9fd2ece0a23d520ce53b66c84cbd094e378443/view/core/src/main/java/com/github/vatbub/common/view/core/CustomGroup.java#L79-L93
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.prettyHexDump
public static String prettyHexDump(ByteBuf buffer, int offset, int length) { """ Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, starting at the given {@code offset} using the given {@code length}. """ return HexUtil.prettyHexDump(buffer, offset, ...
java
public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
[ "public", "static", "String", "prettyHexDump", "(", "ByteBuf", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "HexUtil", ".", "prettyHexDump", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, starting at the given {@code offset} using the given {@code length}.
[ "Returns", "a", "multi", "-", "line", "hexadecimal", "dump", "of", "the", "specified", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L918-L920
sarl/sarl
main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java
AbstractSREMojo.createSREManifest
protected Manifest createSREManifest() throws MojoExecutionException, MojoFailureException { """ Create the manifest of the SRE. @return the created manifest. @throws MojoExecutionException if the mojo fails. @throws MojoFailureException if the generation fails. """ final Manifest manifest = new Manifes...
java
protected Manifest createSREManifest() throws MojoExecutionException, MojoFailureException { final Manifest manifest = new Manifest(); final String mainClass = getMainClass(); if (mainClass.isEmpty()) { throw new MojoFailureException("the main class of the SRE is missed"); //$NON-NLS-1$ } ManifestUpdater...
[ "protected", "Manifest", "createSREManifest", "(", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "final", "Manifest", "manifest", "=", "new", "Manifest", "(", ")", ";", "final", "String", "mainClass", "=", "getMainClass", "(", ")", ";"...
Create the manifest of the SRE. @return the created manifest. @throws MojoExecutionException if the mojo fails. @throws MojoFailureException if the generation fails.
[ "Create", "the", "manifest", "of", "the", "SRE", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java#L325-L367
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/CheckReturnValue.java
CheckReturnValue.matchClass
@Override public Description matchClass(ClassTree tree, VisitorState state) { """ Validate that at most one of {@code CheckReturnValue} and {@code CanIgnoreReturnValue} are applied to a class (or interface or enum). """ if (hasDirectAnnotationWithSimpleName(ASTHelpers.getSymbol(tree), CHECK_RETURN_VALUE...
java
@Override public Description matchClass(ClassTree tree, VisitorState state) { if (hasDirectAnnotationWithSimpleName(ASTHelpers.getSymbol(tree), CHECK_RETURN_VALUE) && hasDirectAnnotationWithSimpleName(ASTHelpers.getSymbol(tree), CAN_IGNORE_RETURN_VALUE)) { return buildDescription(tree).setMessage(St...
[ "@", "Override", "public", "Description", "matchClass", "(", "ClassTree", "tree", ",", "VisitorState", "state", ")", "{", "if", "(", "hasDirectAnnotationWithSimpleName", "(", "ASTHelpers", ".", "getSymbol", "(", "tree", ")", ",", "CHECK_RETURN_VALUE", ")", "&&", ...
Validate that at most one of {@code CheckReturnValue} and {@code CanIgnoreReturnValue} are applied to a class (or interface or enum).
[ "Validate", "that", "at", "most", "one", "of", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/CheckReturnValue.java#L162-L169
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/copier/ValueFactory.java
ValueFactory.createValueArray
static Object createValueArray(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue) { """ 处理类型是数组类型 <p>Function: createValueArray</p> <p>Description: </p> @author acexy@thankjava.com @date 2015-1-27 下午4:30:29 @version 1.0 @param targetFieldType @param targetObject @param origi...
java
static Object createValueArray(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue){ if(originValue == null){ return null; } //获取数组实际容纳的的类型 Class<?> proxyType = targetFieldType.getComponentType(); Object[] originArray = (Object[]) originValue; if(originArray.length == 0){ ...
[ "static", "Object", "createValueArray", "(", "Field", "targetField", ",", "Class", "<", "?", ">", "targetFieldType", ",", "Object", "targetObject", ",", "Object", "originValue", ")", "{", "if", "(", "originValue", "==", "null", ")", "{", "return", "null", ";...
处理类型是数组类型 <p>Function: createValueArray</p> <p>Description: </p> @author acexy@thankjava.com @date 2015-1-27 下午4:30:29 @version 1.0 @param targetFieldType @param targetObject @param originValue @return
[ "处理类型是数组类型", "<p", ">", "Function", ":", "createValueArray<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/copier/ValueFactory.java#L27-L42
albfernandez/itext2
src/main/java/com/lowagie/text/html/HtmlWriter.java
HtmlWriter.writeCssProperty
protected void writeCssProperty(String prop, String value) throws IOException { """ Writes out a CSS property. @param prop a CSS property @param value the value of the CSS property @throws IOException """ write(new StringBuffer(prop).append(": ").append(value).append("; ").toString()); }
java
protected void writeCssProperty(String prop, String value) throws IOException { write(new StringBuffer(prop).append(": ").append(value).append("; ").toString()); }
[ "protected", "void", "writeCssProperty", "(", "String", "prop", ",", "String", "value", ")", "throws", "IOException", "{", "write", "(", "new", "StringBuffer", "(", "prop", ")", ".", "append", "(", "\": \"", ")", ".", "append", "(", "value", ")", ".", "a...
Writes out a CSS property. @param prop a CSS property @param value the value of the CSS property @throws IOException
[ "Writes", "out", "a", "CSS", "property", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/html/HtmlWriter.java#L1127-L1129
alkacon/opencms-core
src/org/opencms/gwt/CmsCoreService.java
CmsCoreService.getVaadinWorkplaceLink
public static String getVaadinWorkplaceLink(CmsObject cms, String resourceRootFolder) { """ Returns the workplace link.<p> @param cms the cms context @param resourceRootFolder the resource folder root path @return the workplace link """ CmsSite site = OpenCms.getSiteManager().getSiteForRootPath...
java
public static String getVaadinWorkplaceLink(CmsObject cms, String resourceRootFolder) { CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(resourceRootFolder); String siteRoot = site != null ? site.getSiteRoot() : OpenCms.getSiteManager().startsWithShared(resourceRootFolder) ...
[ "public", "static", "String", "getVaadinWorkplaceLink", "(", "CmsObject", "cms", ",", "String", "resourceRootFolder", ")", "{", "CmsSite", "site", "=", "OpenCms", ".", "getSiteManager", "(", ")", ".", "getSiteForRootPath", "(", "resourceRootFolder", ")", ";", "Str...
Returns the workplace link.<p> @param cms the cms context @param resourceRootFolder the resource folder root path @return the workplace link
[ "Returns", "the", "workplace", "link", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsCoreService.java#L479-L490
mcxiaoke/Android-Next
recycler/src/main/java/com/mcxiaoke/next/recycler/AdvancedRecyclerArrayAdapter.java
AdvancedRecyclerArrayAdapter.isContentTheSame
public boolean isContentTheSame(@Nullable final T oldItem, @Nullable final T newItem) { """ Called by the DiffUtil when it wants to check whether two items have the same data. DiffUtil uses this information to detect if the contents of an item has changed. <p> DiffUtil uses this method to check equality instead...
java
public boolean isContentTheSame(@Nullable final T oldItem, @Nullable final T newItem) { return (oldItem == newItem) || (oldItem != null && oldItem.equals(newItem)); }
[ "public", "boolean", "isContentTheSame", "(", "@", "Nullable", "final", "T", "oldItem", ",", "@", "Nullable", "final", "T", "newItem", ")", "{", "return", "(", "oldItem", "==", "newItem", ")", "||", "(", "oldItem", "!=", "null", "&&", "oldItem", ".", "eq...
Called by the DiffUtil when it wants to check whether two items have the same data. DiffUtil uses this information to detect if the contents of an item has changed. <p> DiffUtil uses this method to check equality instead of {@link Object#equals(Object)} so that you can change its behavior depending on your UI. For exam...
[ "Called", "by", "the", "DiffUtil", "when", "it", "wants", "to", "check", "whether", "two", "items", "have", "the", "same", "data", ".", "DiffUtil", "uses", "this", "information", "to", "detect", "if", "the", "contents", "of", "an", "item", "has", "changed"...
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/recycler/src/main/java/com/mcxiaoke/next/recycler/AdvancedRecyclerArrayAdapter.java#L231-L233
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.parseLong
public static final long parseLong(CharSequence cs) { """ Equal to calling parseLong(cs, 10). @param cs @return @throws java.lang.NumberFormatException if input cannot be parsed to proper long. @see java.lang.Long#parseLong(java.lang.String) @see java.lang.Character#digit(int, int) """ if (CharS...
java
public static final long parseLong(CharSequence cs) { if (CharSequences.startsWith(cs, "0b")) { return parseLong(cs, 2, 2, cs.length()); } if (CharSequences.startsWith(cs, "0x")) { return parseLong(cs, 16, 2, cs.length()); } r...
[ "public", "static", "final", "long", "parseLong", "(", "CharSequence", "cs", ")", "{", "if", "(", "CharSequences", ".", "startsWith", "(", "cs", ",", "\"0b\"", ")", ")", "{", "return", "parseLong", "(", "cs", ",", "2", ",", "2", ",", "cs", ".", "leng...
Equal to calling parseLong(cs, 10). @param cs @return @throws java.lang.NumberFormatException if input cannot be parsed to proper long. @see java.lang.Long#parseLong(java.lang.String) @see java.lang.Character#digit(int, int)
[ "Equal", "to", "calling", "parseLong", "(", "cs", "10", ")", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1022-L1033
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/bind/BindUploader.java
BindUploader.serializeBinds
private void serializeBinds(Map<String, ParameterBindingDTO> bindValues) throws BindException { """ Save the binds to disk @param bindValues the bind map to serialize @throws BindException if bind map improperly formed or writing binds fails """ List<ColumnTypeDataPair> columns = getColumnValues(bindVa...
java
private void serializeBinds(Map<String, ParameterBindingDTO> bindValues) throws BindException { List<ColumnTypeDataPair> columns = getColumnValues(bindValues); List<String[]> rows = buildRows(columns); writeRowsToCSV(rows); }
[ "private", "void", "serializeBinds", "(", "Map", "<", "String", ",", "ParameterBindingDTO", ">", "bindValues", ")", "throws", "BindException", "{", "List", "<", "ColumnTypeDataPair", ">", "columns", "=", "getColumnValues", "(", "bindValues", ")", ";", "List", "<...
Save the binds to disk @param bindValues the bind map to serialize @throws BindException if bind map improperly formed or writing binds fails
[ "Save", "the", "binds", "to", "disk" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/bind/BindUploader.java#L211-L216
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.addParameterIfNotNull
private static void addParameterIfNotNull(Request<?> request, String paramName, Integer paramValue) { """ Adds the specified parameter to the specified request, if the parameter value is not null. @param request The request to add the parameter to. @param paramName The parameter name. @param paramValue Th...
java
private static void addParameterIfNotNull(Request<?> request, String paramName, Integer paramValue) { if (paramValue != null) { addParameterIfNotNull(request, paramName, paramValue.toString()); } }
[ "private", "static", "void", "addParameterIfNotNull", "(", "Request", "<", "?", ">", "request", ",", "String", "paramName", ",", "Integer", "paramValue", ")", "{", "if", "(", "paramValue", "!=", "null", ")", "{", "addParameterIfNotNull", "(", "request", ",", ...
Adds the specified parameter to the specified request, if the parameter value is not null. @param request The request to add the parameter to. @param paramName The parameter name. @param paramValue The parameter value.
[ "Adds", "the", "specified", "parameter", "to", "the", "specified", "request", "if", "the", "parameter", "value", "is", "not", "null", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L4454-L4458
google/closure-templates
java/src/com/google/template/soy/SoyUtils.java
SoyUtils.parseCompileTimeGlobals
public static ImmutableMap<String, PrimitiveData> parseCompileTimeGlobals(CharSource inputSource) throws IOException { """ Parses a globals file in the format created by {@link #generateCompileTimeGlobalsFile} into a map from global name to primitive value. @param inputSource A source that returns a read...
java
public static ImmutableMap<String, PrimitiveData> parseCompileTimeGlobals(CharSource inputSource) throws IOException { Builder<String, PrimitiveData> compileTimeGlobalsBuilder = ImmutableMap.builder(); ErrorReporter errorReporter = ErrorReporter.exploding(); try (BufferedReader reader = inputSource.o...
[ "public", "static", "ImmutableMap", "<", "String", ",", "PrimitiveData", ">", "parseCompileTimeGlobals", "(", "CharSource", "inputSource", ")", "throws", "IOException", "{", "Builder", "<", "String", ",", "PrimitiveData", ">", "compileTimeGlobalsBuilder", "=", "Immuta...
Parses a globals file in the format created by {@link #generateCompileTimeGlobalsFile} into a map from global name to primitive value. @param inputSource A source that returns a reader for the globals file. @return The parsed globals map. @throws IOException If an error occurs while reading the globals file. @throws I...
[ "Parses", "a", "globals", "file", "in", "the", "format", "created", "by", "{", "@link", "#generateCompileTimeGlobalsFile", "}", "into", "a", "map", "from", "global", "name", "to", "primitive", "value", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/SoyUtils.java#L96-L138
MenoData/Time4J
base/src/main/java/net/time4j/clock/DaytimeClock.java
DaytimeClock.getRawTimestamp
public String getRawTimestamp() throws IOException { """ /*[deutsch] <p>Versucht, den Original-Server-Zeitstempel zu lesen. </p> @return unparsed server reply @throws IOException if connection fails @since 2.1 """ final NetTimeConfiguration config = this.getNetTimeConfiguration(); S...
java
public String getRawTimestamp() throws IOException { final NetTimeConfiguration config = this.getNetTimeConfiguration(); String address = config.getTimeServerAddress(); int port = config.getTimeServerPort(); int timeout = config.getConnectionTimeout(); return getDaytimeReply(a...
[ "public", "String", "getRawTimestamp", "(", ")", "throws", "IOException", "{", "final", "NetTimeConfiguration", "config", "=", "this", ".", "getNetTimeConfiguration", "(", ")", ";", "String", "address", "=", "config", ".", "getTimeServerAddress", "(", ")", ";", ...
/*[deutsch] <p>Versucht, den Original-Server-Zeitstempel zu lesen. </p> @return unparsed server reply @throws IOException if connection fails @since 2.1
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Versucht", "den", "Original", "-", "Server", "-", "Zeitstempel", "zu", "lesen", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/clock/DaytimeClock.java#L175-L185
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java
MiniTemplator.setVariableOptEsc
public void setVariableOptEsc(String variableName, String variableValue) { """ Sets an optional template variable to an escaped value. <p> Convenience method for: <code>setVariable (variableName, MiniTemplator.escapeHtml(variableValue), true)</code> @param variableName the name of the variable to be set. Case...
java
public void setVariableOptEsc(String variableName, String variableValue) { setVariable(variableName, escapeHtml(variableValue), true); }
[ "public", "void", "setVariableOptEsc", "(", "String", "variableName", ",", "String", "variableValue", ")", "{", "setVariable", "(", "variableName", ",", "escapeHtml", "(", "variableValue", ")", ",", "true", ")", ";", "}" ]
Sets an optional template variable to an escaped value. <p> Convenience method for: <code>setVariable (variableName, MiniTemplator.escapeHtml(variableValue), true)</code> @param variableName the name of the variable to be set. Case-insensitive. @param variableValue the new value of the variable. May be <code>null</cod...
[ "Sets", "an", "optional", "template", "variable", "to", "an", "escaped", "value", ".", "<p", ">", "Convenience", "method", "for", ":", "<code", ">", "setVariable", "(", "variableName", "MiniTemplator", ".", "escapeHtml", "(", "variableValue", ")", "true", ")",...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L483-L485
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/model/labels/Label.java
Label.getKey
public static String getKey(String category, String name) { """ Sets the key of the label from the name and category. @param category The category of the label @param name The name of the label @return The key in the format "category:name" """ if(category != null && name != null) return ...
java
public static String getKey(String category, String name) { if(category != null && name != null) return category+":"+name; return null; }
[ "public", "static", "String", "getKey", "(", "String", "category", ",", "String", "name", ")", "{", "if", "(", "category", "!=", "null", "&&", "name", "!=", "null", ")", "return", "category", "+", "\":\"", "+", "name", ";", "return", "null", ";", "}" ]
Sets the key of the label from the name and category. @param category The category of the label @param name The name of the label @return The key in the format "category:name"
[ "Sets", "the", "key", "of", "the", "label", "from", "the", "name", "and", "category", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/model/labels/Label.java#L123-L128
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromTupleDataSet
public static <K, EV> Graph<K, NullValue, EV> fromTupleDataSet(DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { """ Creates a graph from a DataSet of Tuple3 objects for edges. <p>The first field of the Tuple3 object will become the source ID, the second field will become the target ID, and t...
java
public static <K, EV> Graph<K, NullValue, EV> fromTupleDataSet(DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { DataSet<Edge<K, EV>> edgeDataSet = edges .map(new Tuple3ToEdgeMap<>()) .name("Type conversion"); return fromDataSet(edgeDataSet, context); }
[ "public", "static", "<", "K", ",", "EV", ">", "Graph", "<", "K", ",", "NullValue", ",", "EV", ">", "fromTupleDataSet", "(", "DataSet", "<", "Tuple3", "<", "K", ",", "K", ",", "EV", ">", ">", "edges", ",", "ExecutionEnvironment", "context", ")", "{", ...
Creates a graph from a DataSet of Tuple3 objects for edges. <p>The first field of the Tuple3 object will become the source ID, the second field will become the target ID, and the third field will become the edge value. <p>Vertices are created automatically and their values are set to NullValue. @param edges a DataSe...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "Tuple3", "objects", "for", "edges", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L295-L303
apache/incubator-druid
processing/src/main/java/org/apache/druid/query/aggregation/Histogram.java
Histogram.asVisual
public HistogramVisual asVisual() { """ Returns a visual representation of a histogram object. Initially returns an array of just the min. and max. values but can also support the addition of quantiles. @return a visual representation of this histogram """ float[] visualCounts = new float[bins.length ...
java
public HistogramVisual asVisual() { float[] visualCounts = new float[bins.length - 2]; for (int i = 0; i < visualCounts.length; ++i) { visualCounts[i] = (float) bins[i + 1]; } return new HistogramVisual(breaks, visualCounts, new float[]{min, max}); }
[ "public", "HistogramVisual", "asVisual", "(", ")", "{", "float", "[", "]", "visualCounts", "=", "new", "float", "[", "bins", ".", "length", "-", "2", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "visualCounts", ".", "length", ";", "++...
Returns a visual representation of a histogram object. Initially returns an array of just the min. and max. values but can also support the addition of quantiles. @return a visual representation of this histogram
[ "Returns", "a", "visual", "representation", "of", "a", "histogram", "object", ".", "Initially", "returns", "an", "array", "of", "just", "the", "min", ".", "and", "max", ".", "values", "but", "can", "also", "support", "the", "addition", "of", "quantiles", "...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/aggregation/Histogram.java#L181-L188
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java
CurrencyHelper.setRoundingMode
public static void setRoundingMode (@Nullable final ECurrency eCurrency, @Nullable final RoundingMode eRoundingMode) { """ Change the rounding mode of this currency. @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param eRoundingMode Th...
java
public static void setRoundingMode (@Nullable final ECurrency eCurrency, @Nullable final RoundingMode eRoundingMode) { getSettings (eCurrency).setRoundingMode (eRoundingMode); }
[ "public", "static", "void", "setRoundingMode", "(", "@", "Nullable", "final", "ECurrency", "eCurrency", ",", "@", "Nullable", "final", "RoundingMode", "eRoundingMode", ")", "{", "getSettings", "(", "eCurrency", ")", ".", "setRoundingMode", "(", "eRoundingMode", ")...
Change the rounding mode of this currency. @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param eRoundingMode The rounding mode to be used. May be <code>null</code>.
[ "Change", "the", "rounding", "mode", "of", "this", "currency", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java#L718-L721
Alluxio/alluxio
core/common/src/main/java/alluxio/metrics/MetricsSystem.java
MetricsSystem.getMetricNameWithUniqueId
private static String getMetricNameWithUniqueId(InstanceType instance, String name) { """ Builds unique metric registry names with unique ID (set to host name). The pattern is instance.hostname.metricName. @param instance the instance name @param name the metric name @return the metric registry name """ ...
java
private static String getMetricNameWithUniqueId(InstanceType instance, String name) { return instance + "." + NetworkAddressUtils.getLocalHostMetricName(sResolveTimeout) + "." + name; }
[ "private", "static", "String", "getMetricNameWithUniqueId", "(", "InstanceType", "instance", ",", "String", "name", ")", "{", "return", "instance", "+", "\".\"", "+", "NetworkAddressUtils", ".", "getLocalHostMetricName", "(", "sResolveTimeout", ")", "+", "\".\"", "+...
Builds unique metric registry names with unique ID (set to host name). The pattern is instance.hostname.metricName. @param instance the instance name @param name the metric name @return the metric registry name
[ "Builds", "unique", "metric", "registry", "names", "with", "unique", "ID", "(", "set", "to", "host", "name", ")", ".", "The", "pattern", "is", "instance", ".", "hostname", ".", "metricName", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/metrics/MetricsSystem.java#L317-L322
rimerosolutions/ant-wrapper
src/main/java/com/rimerosolutions/ant/wrapper/PathAssembler.java
PathAssembler.getDistribution
public LocalDistribution getDistribution(WrapperConfiguration configuration) { """ Determines the local locations for the distribution to use given the supplied configuration. """ String baseName = getDistName(configuration.getDistribution()); String distName = removeExtension(b...
java
public LocalDistribution getDistribution(WrapperConfiguration configuration) { String baseName = getDistName(configuration.getDistribution()); String distName = removeExtension(baseName); String rootDirName = rootDirName(distName, configuration); String d...
[ "public", "LocalDistribution", "getDistribution", "(", "WrapperConfiguration", "configuration", ")", "{", "String", "baseName", "=", "getDistName", "(", "configuration", ".", "getDistribution", "(", ")", ")", ";", "String", "distName", "=", "removeExtension", "(", "...
Determines the local locations for the distribution to use given the supplied configuration.
[ "Determines", "the", "local", "locations", "for", "the", "distribution", "to", "use", "given", "the", "supplied", "configuration", "." ]
train
https://github.com/rimerosolutions/ant-wrapper/blob/b996b14ee572242b7a3e0359a25761cfda70f831/src/main/java/com/rimerosolutions/ant/wrapper/PathAssembler.java#L45-L57
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCipherCTR.java
SRTPCipherCTR.getCipherStream
public void getCipherStream(BlockCipher aesCipher, byte[] out, int length, byte[] iv) { """ Computes the cipher stream for AES CM mode. See section 4.1.1 in RFC3711 for detailed description. @param out byte array holding the output cipher stream @param length length of the cipher stream to produce, in bytes...
java
public void getCipherStream(BlockCipher aesCipher, byte[] out, int length, byte[] iv) { System.arraycopy(iv, 0, cipherInBlock, 0, 14); int ctr; for (ctr = 0; ctr < length / BLKLEN; ctr++) { // compute the cipher stream cipherInBlock[14] = (byte) ((ctr & 0xFF00) >> ...
[ "public", "void", "getCipherStream", "(", "BlockCipher", "aesCipher", ",", "byte", "[", "]", "out", ",", "int", "length", ",", "byte", "[", "]", "iv", ")", "{", "System", ".", "arraycopy", "(", "iv", ",", "0", ",", "cipherInBlock", ",", "0", ",", "14...
Computes the cipher stream for AES CM mode. See section 4.1.1 in RFC3711 for detailed description. @param out byte array holding the output cipher stream @param length length of the cipher stream to produce, in bytes @param iv initialization vector used to generate this cipher stream
[ "Computes", "the", "cipher", "stream", "for", "AES", "CM", "mode", ".", "See", "section", "4", ".", "1", ".", "1", "in", "RFC3711", "for", "detailed", "description", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCipherCTR.java#L85-L103
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createPrinterGraphicsShapes
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) { """ Gets a <CODE>Graphics2D</CODE> to print on. The graphics are translated to PDF commands. @param width @param height @param convertImagesToJPEG @param quali...
java
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, null, true, convertImagesToJPEG, quality, printerJob); }
[ "public", "java", ".", "awt", ".", "Graphics2D", "createPrinterGraphicsShapes", "(", "float", "width", ",", "float", "height", ",", "boolean", "convertImagesToJPEG", ",", "float", "quality", ",", "PrinterJob", "printerJob", ")", "{", "return", "new", "PdfPrinterGr...
Gets a <CODE>Graphics2D</CODE> to print on. The graphics are translated to PDF commands. @param width @param height @param convertImagesToJPEG @param quality @param printerJob @return a Graphics2D object
[ "Gets", "a", "<CODE", ">", "Graphics2D<", "/", "CODE", ">", "to", "print", "on", ".", "The", "graphics", "are", "translated", "to", "PDF", "commands", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2873-L2875
Stratio/bdt
src/main/java/com/stratio/qa/specs/RestSpec.java
RestSpec.sendRequestNoDataTable
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$") public void sendRequestNoDataTable(String requestType, String endPoint, String foo, String loginInfo, String bar, String baseData, String baz, String type) throws Exception { """ ...
java
@When("^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$") public void sendRequestNoDataTable(String requestType, String endPoint, String foo, String loginInfo, String bar, String baseData, String baz, String type) throws Exception { ...
[ "@", "When", "(", "\"^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$\"", ")", "public", "void", "sendRequestNoDataTable", "(", "String", "requestType", ",", "String", "endPoint", ",", "String", "foo", ",", ...
Same sendRequest, but in this case, we do not receive a data table with modifications. Besides, the data and request header are optional as well. In case we want to simulate sending a json request with empty data, we just to avoid baseData @param requestType @param endPoint @param foo @param baseData @param bar @param...
[ "Same", "sendRequest", "but", "in", "this", "case", "we", "do", "not", "receive", "a", "data", "table", "with", "modifications", ".", "Besides", "the", "data", "and", "request", "header", "are", "optional", "as", "well", ".", "In", "case", "we", "want", ...
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/RestSpec.java#L242-L265
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/lib/MultipleOutputs.java
MultipleOutputs.getCollector
@SuppressWarnings( { """ Gets the output collector for a multi named output. <p/> @param namedOutput the named output name @param multiName the multi name part @param reporter the reporter @return the output collector for the given named output @throws IOException thrown if output collector could not ...
java
@SuppressWarnings({"unchecked"}) public OutputCollector getCollector(String namedOutput, String multiName, Reporter reporter) throws IOException { checkNamedOutputName(namedOutput); if (!namedOutputs.contains(namedOutput)) { throw new IllegalArgumentException("...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "OutputCollector", "getCollector", "(", "String", "namedOutput", ",", "String", "multiName", ",", "Reporter", "reporter", ")", "throws", "IOException", "{", "checkNamedOutputName", "(", "namedOu...
Gets the output collector for a multi named output. <p/> @param namedOutput the named output name @param multiName the multi name part @param reporter the reporter @return the output collector for the given named output @throws IOException thrown if output collector could not be created
[ "Gets", "the", "output", "collector", "for", "a", "multi", "named", "output", ".", "<p", "/", ">" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/lib/MultipleOutputs.java#L489-L522
davidmoten/geo
geo/src/main/java/com/github/davidmoten/geo/GeoHash.java
GeoHash.hashContains
public static boolean hashContains(String hash, double lat, double lon) { """ Returns true if and only if the bounding box corresponding to the hash contains the given lat and long. @param hash hash to test containment in @param lat latitude @param lon longitude @return true if and only if the hash conta...
java
public static boolean hashContains(String hash, double lat, double lon) { LatLong centre = decodeHash(hash); return Math.abs(centre.getLat() - lat) <= heightDegrees(hash.length()) / 2 && Math.abs(to180(centre.getLon() - lon)) <= widthDegrees(hash.length()) / 2; }
[ "public", "static", "boolean", "hashContains", "(", "String", "hash", ",", "double", "lat", ",", "double", "lon", ")", "{", "LatLong", "centre", "=", "decodeHash", "(", "hash", ")", ";", "return", "Math", ".", "abs", "(", "centre", ".", "getLat", "(", ...
Returns true if and only if the bounding box corresponding to the hash contains the given lat and long. @param hash hash to test containment in @param lat latitude @param lon longitude @return true if and only if the hash contains the given lat and long
[ "Returns", "true", "if", "and", "only", "if", "the", "bounding", "box", "corresponding", "to", "the", "hash", "contains", "the", "given", "lat", "and", "long", "." ]
train
https://github.com/davidmoten/geo/blob/e90d2f406133cd9b60d54a3e6bdb7423d7fcce37/geo/src/main/java/com/github/davidmoten/geo/GeoHash.java#L533-L537
OpenVidu/openvidu
openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java
OpenVidu.startRecording
public Recording startRecording(String sessionId, String name) throws OpenViduJavaClientException, OpenViduHttpException { """ Starts the recording of a {@link io.openvidu.java.client.Session} @param sessionId The sessionId of the session you want to start recording @param name The name you want to giv...
java
public Recording startRecording(String sessionId, String name) throws OpenViduJavaClientException, OpenViduHttpException { if (name == null) { name = ""; } return this.startRecording(sessionId, new RecordingProperties.Builder().name(name).build()); }
[ "public", "Recording", "startRecording", "(", "String", "sessionId", ",", "String", "name", ")", "throws", "OpenViduJavaClientException", ",", "OpenViduHttpException", "{", "if", "(", "name", "==", "null", ")", "{", "name", "=", "\"\"", ";", "}", "return", "th...
Starts the recording of a {@link io.openvidu.java.client.Session} @param sessionId The sessionId of the session you want to start recording @param name The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped). <strong>WARN...
[ "Starts", "the", "recording", "of", "a", "{", "@link", "io", ".", "openvidu", ".", "java", ".", "client", ".", "Session", "}" ]
train
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java#L288-L294
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java
BioAssemblyTools.getBiologicalMoleculeMaximumExtend
public static double getBiologicalMoleculeMaximumExtend( final Structure structure,List<BiologicalAssemblyTransformation> transformations ) { """ Returns the maximum extend of the biological molecule in the x, y, or z direction. @param structure @return maximum extend """ double[][] bounds = getBiologicalM...
java
public static double getBiologicalMoleculeMaximumExtend( final Structure structure,List<BiologicalAssemblyTransformation> transformations ) { double[][] bounds = getBiologicalMoleculeBounds(structure, transformations); double xMax = Math.abs(bounds[0][0] - bounds[1][0]); double yMax = Math.abs(bounds[0][1] - boun...
[ "public", "static", "double", "getBiologicalMoleculeMaximumExtend", "(", "final", "Structure", "structure", ",", "List", "<", "BiologicalAssemblyTransformation", ">", "transformations", ")", "{", "double", "[", "]", "[", "]", "bounds", "=", "getBiologicalMoleculeBounds"...
Returns the maximum extend of the biological molecule in the x, y, or z direction. @param structure @return maximum extend
[ "Returns", "the", "maximum", "extend", "of", "the", "biological", "molecule", "in", "the", "x", "y", "or", "z", "direction", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java#L255-L261
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java
DisasterRecoveryConfigurationsInner.getAsync
public Observable<DisasterRecoveryConfigurationInner> getAsync(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { """ Gets a disaster recovery configuration. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from t...
java
public Observable<DisasterRecoveryConfigurationInner> getAsync(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { return getWithServiceResponseAsync(resourceGroupName, serverName, disasterRecoveryConfigurationName).map(new Func1<ServiceResponse<DisasterRecoveryConfiguration...
[ "public", "Observable", "<", "DisasterRecoveryConfigurationInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "disasterRecoveryConfigurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName"...
Gets a disaster recovery configuration. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param disasterRecoveryConfigurationName The name of the disaster recovery c...
[ "Gets", "a", "disaster", "recovery", "configuration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java#L569-L576
Azure/azure-sdk-for-java
mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java
ServersInner.createAsync
public Observable<ServerInner> createAsync(String resourceGroupName, String serverName, ServerForCreate parameters) { """ Creates a new server or updates an existing server. The update action will overwrite the existing server. @param resourceGroupName The name of the resource group that contains the resource. ...
java
public Observable<ServerInner> createAsync(String resourceGroupName, String serverName, ServerForCreate parameters) { return createWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() { @Override public ServerInner...
[ "public", "Observable", "<", "ServerInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ServerForCreate", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",",...
Creates a new server or updates an existing server. The update action will overwrite the existing server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param par...
[ "Creates", "a", "new", "server", "or", "updates", "an", "existing", "server", ".", "The", "update", "action", "will", "overwrite", "the", "existing", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java#L143-L150
zalando-stups/spring-boot-etcd
zalando-boot-etcd/src/main/java/org/zalando/boot/etcd/EtcdClient.java
EtcdClient.put
public EtcdResponse put(final String key, final String value) throws EtcdException { """ Sets the value of the node with the given key in etcd. Any previously existing key-value pair is returned as prevNode in the etcd response. @param key the node's key @param value the node's value @return the response f...
java
public EtcdResponse put(final String key, final String value) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); MultiValueMap<String, String> payload = new LinkedMultiValueMap<>(1); payload.set("value", value); return execute(builde...
[ "public", "EtcdResponse", "put", "(", "final", "String", "key", ",", "final", "String", "value", ")", "throws", "EtcdException", "{", "UriComponentsBuilder", "builder", "=", "UriComponentsBuilder", ".", "fromUriString", "(", "KEYSPACE", ")", ";", "builder", ".", ...
Sets the value of the node with the given key in etcd. Any previously existing key-value pair is returned as prevNode in the etcd response. @param key the node's key @param value the node's value @return the response from etcd with the node @throws EtcdException in case etcd returned an error
[ "Sets", "the", "value", "of", "the", "node", "with", "the", "given", "key", "in", "etcd", ".", "Any", "previously", "existing", "key", "-", "value", "pair", "is", "returned", "as", "prevNode", "in", "the", "etcd", "response", "." ]
train
https://github.com/zalando-stups/spring-boot-etcd/blob/6b4f48663d424777326c38b1e7da75c8b68a3841/zalando-boot-etcd/src/main/java/org/zalando/boot/etcd/EtcdClient.java#L250-L258
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java
LinkUtils.newExternalLink
public static ExternalLink newExternalLink(final String linkId, final String url, final String labelId, final String resourceModelKey, final Component component) { """ Creates an external link from the given parameters. @param linkId the link id @param url the external url @param labelId the label id @...
java
public static ExternalLink newExternalLink(final String linkId, final String url, final String labelId, final String resourceModelKey, final Component component) { return newExternalLink(linkId, url, labelId, resourceModelKey, null, component); }
[ "public", "static", "ExternalLink", "newExternalLink", "(", "final", "String", "linkId", ",", "final", "String", "url", ",", "final", "String", "labelId", ",", "final", "String", "resourceModelKey", ",", "final", "Component", "component", ")", "{", "return", "ne...
Creates an external link from the given parameters. @param linkId the link id @param url the external url @param labelId the label id @param resourceModelKey the resource model key @param component the component @return the external link
[ "Creates", "an", "external", "link", "from", "the", "given", "parameters", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java#L178-L182
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/internal/EvaluateVarianceRatioCriteria.java
EvaluateVarianceRatioCriteria.globalCentroid
public static int globalCentroid(Centroid overallCentroid, Relation<? extends NumberVector> rel, List<? extends Cluster<?>> clusters, NumberVector[] centroids, NoiseHandling noiseOption) { """ Update the global centroid. @param overallCentroid Centroid to udpate @param rel Data relation @param clusters Cluste...
java
public static int globalCentroid(Centroid overallCentroid, Relation<? extends NumberVector> rel, List<? extends Cluster<?>> clusters, NumberVector[] centroids, NoiseHandling noiseOption) { int clustercount = 0; Iterator<? extends Cluster<?>> ci = clusters.iterator(); for(int i = 0; ci.hasNext(); i++) { ...
[ "public", "static", "int", "globalCentroid", "(", "Centroid", "overallCentroid", ",", "Relation", "<", "?", "extends", "NumberVector", ">", "rel", ",", "List", "<", "?", "extends", "Cluster", "<", "?", ">", ">", "clusters", ",", "NumberVector", "[", "]", "...
Update the global centroid. @param overallCentroid Centroid to udpate @param rel Data relation @param clusters Clusters @param centroids Cluster centroids @return Number of clusters
[ "Update", "the", "global", "centroid", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/evaluation/clustering/internal/EvaluateVarianceRatioCriteria.java#L190-L216
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.appendArg
public Signature appendArg(String name, Class<?> type) { """ Append an argument (name + type) to the signature. @param name the name of the argument @param type the type of the argument @return a new signature with the added arguments """ String[] newArgNames = new String[argNames.length + 1]; ...
java
public Signature appendArg(String name, Class<?> type) { String[] newArgNames = new String[argNames.length + 1]; System.arraycopy(argNames, 0, newArgNames, 0, argNames.length); newArgNames[argNames.length] = name; MethodType newMethodType = methodType.appendParameterTypes(type); ...
[ "public", "Signature", "appendArg", "(", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "String", "[", "]", "newArgNames", "=", "new", "String", "[", "argNames", ".", "length", "+", "1", "]", ";", "System", ".", "arraycopy", "(", "a...
Append an argument (name + type) to the signature. @param name the name of the argument @param type the type of the argument @return a new signature with the added arguments
[ "Append", "an", "argument", "(", "name", "+", "type", ")", "to", "the", "signature", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L187-L193
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.chain
@Override public <U> U chain(Function<? super IntStreamEx, U> mapper) { """ does not add overhead as it appears in bytecode anyways as bridge method """ return mapper.apply(this); }
java
@Override public <U> U chain(Function<? super IntStreamEx, U> mapper) { return mapper.apply(this); }
[ "@", "Override", "public", "<", "U", ">", "U", "chain", "(", "Function", "<", "?", "super", "IntStreamEx", ",", "U", ">", "mapper", ")", "{", "return", "mapper", ".", "apply", "(", "this", ")", ";", "}" ]
does not add overhead as it appears in bytecode anyways as bridge method
[ "does", "not", "add", "overhead", "as", "it", "appears", "in", "bytecode", "anyways", "as", "bridge", "method" ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L1766-L1769
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java
RelationalPathBase.ne
@Override public BooleanExpression ne(Expression<? super T> right) { """ Compares the two relational paths using primary key columns @param right rhs of the comparison @return this != right """ if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.NE, primaryKey, ((R...
java
@Override public BooleanExpression ne(Expression<? super T> right) { if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.NE, primaryKey, ((RelationalPath) right).getPrimaryKey()); } else { return super.ne(right); } }
[ "@", "Override", "public", "BooleanExpression", "ne", "(", "Expression", "<", "?", "super", "T", ">", "right", ")", "{", "if", "(", "right", "instanceof", "RelationalPath", ")", "{", "return", "primaryKeyOperation", "(", "Ops", ".", "NE", ",", "primaryKey", ...
Compares the two relational paths using primary key columns @param right rhs of the comparison @return this != right
[ "Compares", "the", "two", "relational", "paths", "using", "primary", "key", "columns" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java#L186-L193
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.removeByG_ST
@Override public void removeByG_ST(long groupId, int status) { """ Removes all the cp instances where groupId = &#63; and status = &#63; from the database. @param groupId the group ID @param status the status """ for (CPInstance cpInstance : findByG_ST(groupId, status, QueryUtil.ALL_POS, QueryUtil.A...
java
@Override public void removeByG_ST(long groupId, int status) { for (CPInstance cpInstance : findByG_ST(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
[ "@", "Override", "public", "void", "removeByG_ST", "(", "long", "groupId", ",", "int", "status", ")", "{", "for", "(", "CPInstance", "cpInstance", ":", "findByG_ST", "(", "groupId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "A...
Removes all the cp instances where groupId = &#63; and status = &#63; from the database. @param groupId the group ID @param status the status
[ "Removes", "all", "the", "cp", "instances", "where", "groupId", "=", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L3477-L3483
grpc/grpc-java
stub/src/main/java/io/grpc/stub/ClientCalls.java
ClientCalls.asyncClientStreamingCall
public static <ReqT, RespT> StreamObserver<ReqT> asyncClientStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { """ Executes a client-streaming call returning a {@link StreamObserver} for the request messages. The {@code call} should not be already started. After ca...
java
public static <ReqT, RespT> StreamObserver<ReqT> asyncClientStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, false); }
[ "public", "static", "<", "ReqT", ",", "RespT", ">", "StreamObserver", "<", "ReqT", ">", "asyncClientStreamingCall", "(", "ClientCall", "<", "ReqT", ",", "RespT", ">", "call", ",", "StreamObserver", "<", "RespT", ">", "responseObserver", ")", "{", "return", "...
Executes a client-streaming call returning a {@link StreamObserver} for the request messages. The {@code call} should not be already started. After calling this method, {@code call} should no longer be used. @return request stream observer.
[ "Executes", "a", "client", "-", "streaming", "call", "returning", "a", "{", "@link", "StreamObserver", "}", "for", "the", "request", "messages", ".", "The", "{", "@code", "call", "}", "should", "not", "be", "already", "started", ".", "After", "calling", "t...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/ClientCalls.java#L84-L88
fedups/com.obdobion.algebrain
src/main/java/com/obdobion/algebrain/ValueStack.java
ValueStack.popStringOrByteArray
public Object popStringOrByteArray() throws ParseException { """ <p> popStringOrByteArray. </p> @return a {@link java.lang.Object} object. @throws java.text.ParseException if any. """ final Object popped = super.pop(); if (popped instanceof String) return popped; /* ...
java
public Object popStringOrByteArray() throws ParseException { final Object popped = super.pop(); if (popped instanceof String) return popped; /* * This is probably an unquoted single word literal. */ if (popped instanceof TokVariable) return (...
[ "public", "Object", "popStringOrByteArray", "(", ")", "throws", "ParseException", "{", "final", "Object", "popped", "=", "super", ".", "pop", "(", ")", ";", "if", "(", "popped", "instanceof", "String", ")", "return", "popped", ";", "/*\n * This is probab...
<p> popStringOrByteArray. </p> @return a {@link java.lang.Object} object. @throws java.text.ParseException if any.
[ "<p", ">", "popStringOrByteArray", ".", "<", "/", "p", ">" ]
train
https://github.com/fedups/com.obdobion.algebrain/blob/d0adaa9fbbba907bdcf820961e9058b0d2b15a8a/src/main/java/com/obdobion/algebrain/ValueStack.java#L274-L289
line/armeria
core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java
ClientFactoryBuilder.channelOption
public <T> ClientFactoryBuilder channelOption(ChannelOption<T> option, T value) { """ Sets the options of sockets created by the {@link ClientFactory}. """ requireNonNull(option, "option"); checkArgument(!PROHIBITED_SOCKET_OPTIONS.contains(option), "prohibited socket optio...
java
public <T> ClientFactoryBuilder channelOption(ChannelOption<T> option, T value) { requireNonNull(option, "option"); checkArgument(!PROHIBITED_SOCKET_OPTIONS.contains(option), "prohibited socket option: %s", option); channelOptions.put(option, requireNonNull(value, "value")...
[ "public", "<", "T", ">", "ClientFactoryBuilder", "channelOption", "(", "ChannelOption", "<", "T", ">", "option", ",", "T", "value", ")", "{", "requireNonNull", "(", "option", ",", "\"option\"", ")", ";", "checkArgument", "(", "!", "PROHIBITED_SOCKET_OPTIONS", ...
Sets the options of sockets created by the {@link ClientFactory}.
[ "Sets", "the", "options", "of", "sockets", "created", "by", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java#L169-L176
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SecureClassLoader.java
SecureClassLoader.defineClass
protected final Class<?> defineClass(String name, java.nio.ByteBuffer b, CodeSource cs) { """ Converts a {@link java.nio.ByteBuffer ByteBuffer} into an instance of class {@code Class}, with an optional CodeSource. Before the class can be used it must be resolved. <p> If...
java
protected final Class<?> defineClass(String name, java.nio.ByteBuffer b, CodeSource cs) { return defineClass(name, b, getProtectionDomain(cs)); }
[ "protected", "final", "Class", "<", "?", ">", "defineClass", "(", "String", "name", ",", "java", ".", "nio", ".", "ByteBuffer", "b", ",", "CodeSource", "cs", ")", "{", "return", "defineClass", "(", "name", ",", "b", ",", "getProtectionDomain", "(", "cs",...
Converts a {@link java.nio.ByteBuffer ByteBuffer} into an instance of class {@code Class}, with an optional CodeSource. Before the class can be used it must be resolved. <p> If a non-null CodeSource is supplied a ProtectionDomain is constructed and associated with the class being defined. <p> @param name the expec...
[ "Converts", "a", "{", "@link", "java", ".", "nio", ".", "ByteBuffer", "ByteBuffer", "}", "into", "an", "instance", "of", "class", "{", "@code", "Class", "}", "with", "an", "optional", "CodeSource", ".", "Before", "the", "class", "can", "be", "used", "it"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SecureClassLoader.java#L171-L175
jhy/jsoup
src/main/java/org/jsoup/Jsoup.java
Jsoup.parseBodyFragment
public static Document parseBodyFragment(String bodyHtml, String baseUri) { """ Parse a fragment of HTML, with the assumption that it forms the {@code body} of the HTML. @param bodyHtml body HTML fragment @param baseUri URL to resolve relative URLs against. @return sane HTML document @see Document#body() ...
java
public static Document parseBodyFragment(String bodyHtml, String baseUri) { return Parser.parseBodyFragment(bodyHtml, baseUri); }
[ "public", "static", "Document", "parseBodyFragment", "(", "String", "bodyHtml", ",", "String", "baseUri", ")", "{", "return", "Parser", ".", "parseBodyFragment", "(", "bodyHtml", ",", "baseUri", ")", ";", "}" ]
Parse a fragment of HTML, with the assumption that it forms the {@code body} of the HTML. @param bodyHtml body HTML fragment @param baseUri URL to resolve relative URLs against. @return sane HTML document @see Document#body()
[ "Parse", "a", "fragment", "of", "HTML", "with", "the", "assumption", "that", "it", "forms", "the", "{", "@code", "body", "}", "of", "the", "HTML", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/Jsoup.java#L147-L149
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java
AbstractPipeline.spliterator
@Override @SuppressWarnings("unchecked") public Spliterator<E_OUT> spliterator() { """ Primitive specialization use co-variant overrides, hence is not final """ if (linkedOrConsumed) throw new IllegalStateException(MSG_STREAM_LINKED); linkedOrConsumed = true; if (th...
java
@Override @SuppressWarnings("unchecked") public Spliterator<E_OUT> spliterator() { if (linkedOrConsumed) throw new IllegalStateException(MSG_STREAM_LINKED); linkedOrConsumed = true; if (this == sourceStage) { if (sourceStage.sourceSpliterator != null) { ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Spliterator", "<", "E_OUT", ">", "spliterator", "(", ")", "{", "if", "(", "linkedOrConsumed", ")", "throw", "new", "IllegalStateException", "(", "MSG_STREAM_LINKED", ")", ";", "linke...
Primitive specialization use co-variant overrides, hence is not final
[ "Primitive", "specialization", "use", "co", "-", "variant", "overrides", "hence", "is", "not", "final" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L343-L370
ag-gipp/MathMLTools
mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/SubTreeComparison.java
SubTreeComparison.getCoverage
public static double getCoverage(List<MathNode> refLeafs, List<MathNode> compLeafs) { """ Calculate the coverage factor between two trees, whereas only their leafs are considered. Leafs are typically identifiers or constants. @param refLeafs all leafs from the partial (or full) reference tree @param compLeaf...
java
public static double getCoverage(List<MathNode> refLeafs, List<MathNode> compLeafs) { if (compLeafs.size() == 0) { return 1.; } HashMultiset<MathNode> tmp = HashMultiset.create(); tmp.addAll(compLeafs); tmp.removeAll(refLeafs); return 1 - (double) tmp.size() /...
[ "public", "static", "double", "getCoverage", "(", "List", "<", "MathNode", ">", "refLeafs", ",", "List", "<", "MathNode", ">", "compLeafs", ")", "{", "if", "(", "compLeafs", ".", "size", "(", ")", "==", "0", ")", "{", "return", "1.", ";", "}", "HashM...
Calculate the coverage factor between two trees, whereas only their leafs are considered. Leafs are typically identifiers or constants. @param refLeafs all leafs from the partial (or full) reference tree @param compLeafs all leafs from the partial (or full) comparison tree @return coverage factor between 0 to 1, 1 is...
[ "Calculate", "the", "coverage", "factor", "between", "two", "trees", "whereas", "only", "their", "leafs", "are", "considered", ".", "Leafs", "are", "typically", "identifiers", "or", "constants", "." ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/SubTreeComparison.java#L153-L161
hawtio/hawtio
tooling/hawtio-junit/src/main/java/io/hawt/junit/ThrowableDTO.java
ThrowableDTO.addThrowableAndCauses
public static void addThrowableAndCauses(List<ThrowableDTO> exceptions, Throwable exception) { """ Adds the exception and all of the causes to the given list of exceptions """ if (exception != null) { ThrowableDTO dto = new ThrowableDTO(exception); exceptions.add(dto); ...
java
public static void addThrowableAndCauses(List<ThrowableDTO> exceptions, Throwable exception) { if (exception != null) { ThrowableDTO dto = new ThrowableDTO(exception); exceptions.add(dto); Throwable cause = exception.getCause(); if (cause != null && cause != excep...
[ "public", "static", "void", "addThrowableAndCauses", "(", "List", "<", "ThrowableDTO", ">", "exceptions", ",", "Throwable", "exception", ")", "{", "if", "(", "exception", "!=", "null", ")", "{", "ThrowableDTO", "dto", "=", "new", "ThrowableDTO", "(", "exceptio...
Adds the exception and all of the causes to the given list of exceptions
[ "Adds", "the", "exception", "and", "all", "of", "the", "causes", "to", "the", "given", "list", "of", "exceptions" ]
train
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/tooling/hawtio-junit/src/main/java/io/hawt/junit/ThrowableDTO.java#L35-L44
dita-ot/dita-ot
src/main/java/org/dita/dost/module/DebugAndFilterModule.java
DebugAndFilterModule.isOutFile
private static boolean isOutFile(final File filePathName, final File inputMap) { """ Check if path falls outside start document directory @param filePathName absolute path to test @param inputMap absolute input map path @return {@code true} if outside start directory, otherwise {@code false} """ f...
java
private static boolean isOutFile(final File filePathName, final File inputMap) { final File relativePath = FileUtils.getRelativePath(inputMap.getAbsoluteFile(), filePathName.getAbsoluteFile()); return !(relativePath.getPath().length() == 0 || !relativePath.getPath().startsWith("..")); }
[ "private", "static", "boolean", "isOutFile", "(", "final", "File", "filePathName", ",", "final", "File", "inputMap", ")", "{", "final", "File", "relativePath", "=", "FileUtils", ".", "getRelativePath", "(", "inputMap", ".", "getAbsoluteFile", "(", ")", ",", "f...
Check if path falls outside start document directory @param filePathName absolute path to test @param inputMap absolute input map path @return {@code true} if outside start directory, otherwise {@code false}
[ "Check", "if", "path", "falls", "outside", "start", "document", "directory" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L547-L550
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java
PlatformBitmapFactory.createScaledBitmap
public CloseableReference<Bitmap> createScaledBitmap( Bitmap source, int destinationWidth, int destinationHeight, boolean filter) { """ Creates a bitmap from the specified source scaled to have the height and width as specified. It is initialized with the same density as the original bitma...
java
public CloseableReference<Bitmap> createScaledBitmap( Bitmap source, int destinationWidth, int destinationHeight, boolean filter) { return createScaledBitmap(source, destinationWidth, destinationHeight, filter, null); }
[ "public", "CloseableReference", "<", "Bitmap", ">", "createScaledBitmap", "(", "Bitmap", "source", ",", "int", "destinationWidth", ",", "int", "destinationHeight", ",", "boolean", "filter", ")", "{", "return", "createScaledBitmap", "(", "source", ",", "destinationWi...
Creates a bitmap from the specified source scaled to have the height and width as specified. It is initialized with the same density as the original bitmap. @param source The bitmap we are subsetting @param destinationWidth The number of pixels in each row of the final bitmap @param destinationHeight The number...
[ "Creates", "a", "bitmap", "from", "the", "specified", "source", "scaled", "to", "have", "the", "height", "and", "width", "as", "specified", ".", "It", "is", "initialized", "with", "the", "same", "density", "as", "the", "original", "bitmap", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L233-L239
app55/app55-java
src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java
DefaultPersistenceDelegate.getPropertyValue
private Object getPropertyValue(HashMap<String, PropertyDescriptor> proDscMap, Object oldInstance, String propName) throws Exception { """ /* Get the value for the specified property of the given bean instance. """ // Try to get the read method for the property Method getter = null; if (null != proDscMa...
java
private Object getPropertyValue(HashMap<String, PropertyDescriptor> proDscMap, Object oldInstance, String propName) throws Exception { // Try to get the read method for the property Method getter = null; if (null != proDscMap) { PropertyDescriptor pd = proDscMap.get(Introspector.decapitalize(propName)); ...
[ "private", "Object", "getPropertyValue", "(", "HashMap", "<", "String", ",", "PropertyDescriptor", ">", "proDscMap", ",", "Object", "oldInstance", ",", "String", "propName", ")", "throws", "Exception", "{", "// Try to get the read method for the property", "Method", "ge...
/* Get the value for the specified property of the given bean instance.
[ "/", "*", "Get", "the", "value", "for", "the", "specified", "property", "of", "the", "given", "bean", "instance", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java#L171-L201
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/Ra17XmlGen.java
Ra17XmlGen.writeAsConfigPropsXml
@Override void writeAsConfigPropsXml(List<ConfigPropType> props, Writer out, int indent) throws IOException { """ Output As config props xml part @param props config properties @param out Writer @param indent space number @throws IOException ioException """ writeRequireConfigPropsXml(props, ...
java
@Override void writeAsConfigPropsXml(List<ConfigPropType> props, Writer out, int indent) throws IOException { writeRequireConfigPropsXml(props, out, indent); writeConfigPropsXml(props, out, indent); }
[ "@", "Override", "void", "writeAsConfigPropsXml", "(", "List", "<", "ConfigPropType", ">", "props", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeRequireConfigPropsXml", "(", "props", ",", "out", ",", "indent", ")", ";", ...
Output As config props xml part @param props config properties @param out Writer @param indent space number @throws IOException ioException
[ "Output", "As", "config", "props", "xml", "part" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/Ra17XmlGen.java#L46-L51
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/particles/Particle.java
Particle.setColor
public void setColor(float r, float g, float b, float a) { """ Set the color of the particle @param r The red component of the color @param g The green component of the color @param b The blue component of the color @param a The alpha component of the color """ if (color == Color.white) { colo...
java
public void setColor(float r, float g, float b, float a) { if (color == Color.white) { color = new Color(r,g,b,a); } else { color.r = r; color.g = g; color.b = b; color.a = a; } }
[ "public", "void", "setColor", "(", "float", "r", ",", "float", "g", ",", "float", "b", ",", "float", "a", ")", "{", "if", "(", "color", "==", "Color", ".", "white", ")", "{", "color", "=", "new", "Color", "(", "r", ",", "g", ",", "b", ",", "a...
Set the color of the particle @param r The red component of the color @param g The green component of the color @param b The blue component of the color @param a The alpha component of the color
[ "Set", "the", "color", "of", "the", "particle" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/Particle.java#L318-L327
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedSasDefinitionsAsync
public Observable<Page<DeletedSasDefinitionItem>> getDeletedSasDefinitionsAsync(final String vaultBaseUrl, final String storageAccountName) { """ Lists deleted SAS definitions for the specified vault and storage account. The Get Deleted Sas Definitions operation returns the SAS definitions that have been deleted ...
java
public Observable<Page<DeletedSasDefinitionItem>> getDeletedSasDefinitionsAsync(final String vaultBaseUrl, final String storageAccountName) { return getDeletedSasDefinitionsWithServiceResponseAsync(vaultBaseUrl, storageAccountName) .map(new Func1<ServiceResponse<Page<DeletedSasDefinitionItem>>, Page...
[ "public", "Observable", "<", "Page", "<", "DeletedSasDefinitionItem", ">", ">", "getDeletedSasDefinitionsAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "storageAccountName", ")", "{", "return", "getDeletedSasDefinitionsWithServiceResponseAsync", "("...
Lists deleted SAS definitions for the specified vault and storage account. The Get Deleted Sas Definitions operation returns the SAS definitions that have been deleted for a vault enabled for soft-delete. This operation requires the storage/listsas permission. @param vaultBaseUrl The vault name, for example https://my...
[ "Lists", "deleted", "SAS", "definitions", "for", "the", "specified", "vault", "and", "storage", "account", ".", "The", "Get", "Deleted", "Sas", "Definitions", "operation", "returns", "the", "SAS", "definitions", "that", "have", "been", "deleted", "for", "a", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L10669-L10677
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.cloneAll
public static void cloneAll(Collection<BugInstance> dest, Collection<BugInstance> source) { """ Clone all of the BugInstance objects in the source Collection and add them to the destination Collection. @param dest the destination Collection @param source the source Collection """ for (BugInstanc...
java
public static void cloneAll(Collection<BugInstance> dest, Collection<BugInstance> source) { for (BugInstance obj : source) { dest.add((BugInstance) obj.clone()); } }
[ "public", "static", "void", "cloneAll", "(", "Collection", "<", "BugInstance", ">", "dest", ",", "Collection", "<", "BugInstance", ">", "source", ")", "{", "for", "(", "BugInstance", "obj", ":", "source", ")", "{", "dest", ".", "add", "(", "(", "BugInsta...
Clone all of the BugInstance objects in the source Collection and add them to the destination Collection. @param dest the destination Collection @param source the source Collection
[ "Clone", "all", "of", "the", "BugInstance", "objects", "in", "the", "source", "Collection", "and", "add", "them", "to", "the", "destination", "Collection", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L813-L817
Azure/autorest-clientruntime-for-java
azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java
AzureClient.pollPostOrDeleteAsync
private <T> Observable<PollingState<T>> pollPostOrDeleteAsync(final PollingState<T> pollingState, final Type resourceType) { """ Given a polling state representing state of a POST or DELETE operation, this method returns {@link Observable} object, when subscribed to it, a series of polling will be performed and e...
java
private <T> Observable<PollingState<T>> pollPostOrDeleteAsync(final PollingState<T> pollingState, final Type resourceType) { pollingState.withResourceType(resourceType); pollingState.withSerializerAdapter(restClient().serializerAdapter()); return Observable.just(true) .flatMap(ne...
[ "private", "<", "T", ">", "Observable", "<", "PollingState", "<", "T", ">", ">", "pollPostOrDeleteAsync", "(", "final", "PollingState", "<", "T", ">", "pollingState", ",", "final", "Type", "resourceType", ")", "{", "pollingState", ".", "withResourceType", "(",...
Given a polling state representing state of a POST or DELETE operation, this method returns {@link Observable} object, when subscribed to it, a series of polling will be performed and emits each polling state to downstream. Polling will completes when the operation finish with success, failure or exception. @param pol...
[ "Given", "a", "polling", "state", "representing", "state", "of", "a", "POST", "or", "DELETE", "operation", "this", "method", "returns", "{", "@link", "Observable", "}", "object", "when", "subscribed", "to", "it", "a", "series", "of", "polling", "will", "be",...
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java#L452-L478
twitter/cloudhopper-commons
ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java
PropertiesReplacementUtil.replace
static public InputStream replace(File file, File props) throws IOException, SubstitutionException { """ Creates an InputStream containing the document resulting from replacing template parameters in the given file. @param file The template file @param props The properties file @return An InputStream containin...
java
static public InputStream replace(File file, File props) throws IOException, SubstitutionException{ return replace(file, props, null, false); }
[ "static", "public", "InputStream", "replace", "(", "File", "file", ",", "File", "props", ")", "throws", "IOException", ",", "SubstitutionException", "{", "return", "replace", "(", "file", ",", "props", ",", "null", ",", "false", ")", ";", "}" ]
Creates an InputStream containing the document resulting from replacing template parameters in the given file. @param file The template file @param props The properties file @return An InputStream containing the resulting document.
[ "Creates", "an", "InputStream", "containing", "the", "document", "resulting", "from", "replacing", "template", "parameters", "in", "the", "given", "file", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java#L74-L76
dbracewell/mango
src/main/java/com/davidbracewell/tuple/Tuple.java
Tuple.mapValues
public Tuple mapValues(@NonNull Function<Object, ? extends Object> function) { """ Maps the values of the tuple to another data type @param function the mapping function @return A new tuple of same degree whose values are the result of the mapping function applied to the this tuple's elements. """ r...
java
public Tuple mapValues(@NonNull Function<Object, ? extends Object> function) { return NTuple.of(Arrays.stream(array()).map(function).collect(Collectors.toList())); }
[ "public", "Tuple", "mapValues", "(", "@", "NonNull", "Function", "<", "Object", ",", "?", "extends", "Object", ">", "function", ")", "{", "return", "NTuple", ".", "of", "(", "Arrays", ".", "stream", "(", "array", "(", ")", ")", ".", "map", "(", "func...
Maps the values of the tuple to another data type @param function the mapping function @return A new tuple of same degree whose values are the result of the mapping function applied to the this tuple's elements.
[ "Maps", "the", "values", "of", "the", "tuple", "to", "another", "data", "type" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/tuple/Tuple.java#L93-L95
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.startEnvironment
public void startEnvironment(String userName, String environmentId) { """ Starts an environment by starting all resources inside the environment. This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentExc...
java
public void startEnvironment(String userName, String environmentId) { startEnvironmentWithServiceResponseAsync(userName, environmentId).toBlocking().last().body(); }
[ "public", "void", "startEnvironment", "(", "String", "userName", ",", "String", "environmentId", ")", "{", "startEnvironmentWithServiceResponseAsync", "(", "userName", ",", "environmentId", ")", ".", "toBlocking", "(", ")", ".", "last", "(", ")", ".", "body", "(...
Starts an environment by starting all resources inside the environment. This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if th...
[ "Starts", "an", "environment", "by", "starting", "all", "resources", "inside", "the", "environment", ".", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L1082-L1084
apache/flink
flink-core/src/main/java/org/apache/flink/types/StringValue.java
StringValue.startsWith
public boolean startsWith(CharSequence prefix, int startIndex) { """ Checks whether the substring, starting at the specified index, starts with the given prefix string. @param prefix The prefix character sequence. @param startIndex The position to start checking for the prefix. @return True, if this StringV...
java
public boolean startsWith(CharSequence prefix, int startIndex) { final char[] thisChars = this.value; final int pLen = this.len; final int sLen = prefix.length(); if ((startIndex < 0) || (startIndex > pLen - sLen)) { return false; } int sPos = 0; while (sPos < sLen) { if (thisChars[startIndex++...
[ "public", "boolean", "startsWith", "(", "CharSequence", "prefix", ",", "int", "startIndex", ")", "{", "final", "char", "[", "]", "thisChars", "=", "this", ".", "value", ";", "final", "int", "pLen", "=", "this", ".", "len", ";", "final", "int", "sLen", ...
Checks whether the substring, starting at the specified index, starts with the given prefix string. @param prefix The prefix character sequence. @param startIndex The position to start checking for the prefix. @return True, if this StringValue substring, starting at position <code>startIndex</code> has <code>prefix</...
[ "Checks", "whether", "the", "substring", "starting", "at", "the", "specified", "index", "starts", "with", "the", "given", "prefix", "string", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/StringValue.java#L383-L399
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/util/zookeeper/ClientNode.java
ClientNode.calculateAllNodesResult
public ClientsResult calculateAllNodesResult() { """ Gets node index and its peer count @return ClientsResult object with info """ final List<String> childNodePaths = getChildren(electionRootPath, false); _logger.info("Total peers = {} ", childNodePaths.size()); Collections.sort(childNodePaths); in...
java
public ClientsResult calculateAllNodesResult() { final List<String> childNodePaths = getChildren(electionRootPath, false); _logger.info("Total peers = {} ", childNodePaths.size()); Collections.sort(childNodePaths); int index = childNodePaths.indexOf(clientNodePath.substring(clientNodePath.lastIndexOf('/') + 1)...
[ "public", "ClientsResult", "calculateAllNodesResult", "(", ")", "{", "final", "List", "<", "String", ">", "childNodePaths", "=", "getChildren", "(", "electionRootPath", ",", "false", ")", ";", "_logger", ".", "info", "(", "\"Total peers = {} \"", ",", "childNodePa...
Gets node index and its peer count @return ClientsResult object with info
[ "Gets", "node", "index", "and", "its", "peer", "count" ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/util/zookeeper/ClientNode.java#L124-L131
OpenLiberty/open-liberty
dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/UserInfoHelper.java
UserInfoHelper.getUserInfoFromURL
protected String getUserInfoFromURL(ConvergedClientConfig config, SSLSocketFactory sslsf, String accessToken) { """ Obtain userInfo from an OIDC provider @return the userInfo string, or null """ String url = config.getUserInfoEndpointUrl(); boolean hostnameVerification = config.isHostNameVer...
java
protected String getUserInfoFromURL(ConvergedClientConfig config, SSLSocketFactory sslsf, String accessToken) { String url = config.getUserInfoEndpointUrl(); boolean hostnameVerification = config.isHostNameVerificationEnabled(); // https required by spec, use of http is not spec compliant ...
[ "protected", "String", "getUserInfoFromURL", "(", "ConvergedClientConfig", "config", ",", "SSLSocketFactory", "sslsf", ",", "String", "accessToken", ")", "{", "String", "url", "=", "config", ".", "getUserInfoEndpointUrl", "(", ")", ";", "boolean", "hostnameVerificatio...
Obtain userInfo from an OIDC provider @return the userInfo string, or null
[ "Obtain", "userInfo", "from", "an", "OIDC", "provider" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/UserInfoHelper.java#L96-L129
katjahahn/PortEx
src/main/java/com/github/katjahahn/tools/visualizer/VisualizerBuilder.java
VisualizerBuilder.setColor
public VisualizerBuilder setColor(ColorableItem key, Color color) { """ Sets the color for a colorable item. @param key the item to be colored @param color the color of the item @return this VisualizerBuilder """ settings.colorMap.put(key, color); return this; }
java
public VisualizerBuilder setColor(ColorableItem key, Color color) { settings.colorMap.put(key, color); return this; }
[ "public", "VisualizerBuilder", "setColor", "(", "ColorableItem", "key", ",", "Color", "color", ")", "{", "settings", ".", "colorMap", ".", "put", "(", "key", ",", "color", ")", ";", "return", "this", ";", "}" ]
Sets the color for a colorable item. @param key the item to be colored @param color the color of the item @return this VisualizerBuilder
[ "Sets", "the", "color", "for", "a", "colorable", "item", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/tools/visualizer/VisualizerBuilder.java#L175-L178
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPDefinitionSpecificationOptionValueWrapper.java
CPDefinitionSpecificationOptionValueWrapper.getValue
@Override public String getValue(String languageId, boolean useDefault) { """ Returns the localized value of this cp definition specification option value in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @para...
java
@Override public String getValue(String languageId, boolean useDefault) { return _cpDefinitionSpecificationOptionValue.getValue(languageId, useDefault); }
[ "@", "Override", "public", "String", "getValue", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpDefinitionSpecificationOptionValue", ".", "getValue", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized value of this cp definition specification option value in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the requ...
[ "Returns", "the", "localized", "value", "of", "this", "cp", "definition", "specification", "option", "value", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested", "language",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPDefinitionSpecificationOptionValueWrapper.java#L423-L427
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java
DefaultRenditionHandler.getVirtualRendition
private RenditionMetadata getVirtualRendition(final Set<RenditionMetadata> candidates, MediaArgs mediaArgs) { """ Check if a rendition is available from which the required format can be downscaled from and returns a virtual rendition in this case. @param candidates Candidates @param mediaArgs Media args @retur...
java
private RenditionMetadata getVirtualRendition(final Set<RenditionMetadata> candidates, MediaArgs mediaArgs) { // get from fixed with/height if (mediaArgs.getFixedWidth() > 0 || mediaArgs.getFixedHeight() > 0) { long destWidth = mediaArgs.getFixedWidth(); long destHeight = mediaArgs.getFixedHeight()...
[ "private", "RenditionMetadata", "getVirtualRendition", "(", "final", "Set", "<", "RenditionMetadata", ">", "candidates", ",", "MediaArgs", "mediaArgs", ")", "{", "// get from fixed with/height", "if", "(", "mediaArgs", ".", "getFixedWidth", "(", ")", ">", "0", "||",...
Check if a rendition is available from which the required format can be downscaled from and returns a virtual rendition in this case. @param candidates Candidates @param mediaArgs Media args @return Rendition or null
[ "Check", "if", "a", "rendition", "is", "available", "from", "which", "the", "required", "format", "can", "be", "downscaled", "from", "and", "returns", "a", "virtual", "rendition", "in", "this", "case", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java#L348-L376
google/truth
core/src/main/java/com/google/common/truth/Facts.java
Facts.and
Facts and(Facts moreFacts) { """ Returns an instance concatenating the facts wrapped by the current instance followed by the given facts. """ return new Facts(Iterables.concat(facts, moreFacts.asIterable())); }
java
Facts and(Facts moreFacts) { return new Facts(Iterables.concat(facts, moreFacts.asIterable())); }
[ "Facts", "and", "(", "Facts", "moreFacts", ")", "{", "return", "new", "Facts", "(", "Iterables", ".", "concat", "(", "facts", ",", "moreFacts", ".", "asIterable", "(", ")", ")", ")", ";", "}" ]
Returns an instance concatenating the facts wrapped by the current instance followed by the given facts.
[ "Returns", "an", "instance", "concatenating", "the", "facts", "wrapped", "by", "the", "current", "instance", "followed", "by", "the", "given", "facts", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/Facts.java#L54-L56
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryInterestPointAlgs.java
FactoryInterestPointAlgs.hessianLaplace
public static <T extends ImageGray<T>, D extends ImageGray<D>> FeatureLaplacePyramid<T, D> hessianLaplace(int extractRadius, float detectThreshold, int maxFeatures, Class<T> imageType, Class<D> derivType) { """ Creates a {@link boofcv.alg.feature.detect.inte...
java
public static <T extends ImageGray<T>, D extends ImageGray<D>> FeatureLaplacePyramid<T, D> hessianLaplace(int extractRadius, float detectThreshold, int maxFeatures, Class<T> imageType, Class<D> derivType) { GeneralFeatureIntensity<T, D> intensity = new WrapperH...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "FeatureLaplacePyramid", "<", "T", ",", "D", ">", "hessianLaplace", "(", "int", "extractRadius", ",", "float", "detectThreshold", ","...
Creates a {@link boofcv.alg.feature.detect.interest.FeatureLaplacePyramid} which is uses a hessian blob detector. @param extractRadius Size of the feature used to detect the corners. @param detectThreshold Minimum corner intensity required @param maxFeatures Max number of features that can be found. @param image...
[ "Creates", "a", "{", "@link", "boofcv", ".", "alg", ".", "feature", ".", "detect", ".", "interest", ".", "FeatureLaplacePyramid", "}", "which", "is", "uses", "a", "hessian", "blob", "detector", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryInterestPointAlgs.java#L115-L132
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/UnionImpl.java
UnionImpl.fastWrap
static UnionImpl fastWrap(final WritableMemory srcMem, final long seed) { """ Fast-wrap a Union object around a Union Memory object containing data. This does NO validity checking of the given Memory. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @par...
java
static UnionImpl fastWrap(final WritableMemory srcMem, final long seed) { Family.UNION.checkFamilyID(extractFamilyID(srcMem)); final UpdateSketch gadget = DirectQuickSelectSketch.fastWritableWrap(srcMem, seed); final UnionImpl unionImpl = new UnionImpl(gadget, seed); unionImpl.unionThetaLong_ = extractU...
[ "static", "UnionImpl", "fastWrap", "(", "final", "WritableMemory", "srcMem", ",", "final", "long", "seed", ")", "{", "Family", ".", "UNION", ".", "checkFamilyID", "(", "extractFamilyID", "(", "srcMem", ")", ")", ";", "final", "UpdateSketch", "gadget", "=", "...
Fast-wrap a Union object around a Union Memory object containing data. This does NO validity checking of the given Memory. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources/dictionary.html#seed">See seed</a> @return this c...
[ "Fast", "-", "wrap", "a", "Union", "object", "around", "a", "Union", "Memory", "object", "containing", "data", ".", "This", "does", "NO", "validity", "checking", "of", "the", "given", "Memory", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/UnionImpl.java#L153-L160
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.getUserList
public UserListResult getUserList(int start, int count) throws APIConnectionException, APIRequestException { """ Get user list @param start The start index of the list @param count The number that how many you want to get from list @return User info list @throws APIConnectionException connect excep...
java
public UserListResult getUserList(int start, int count) throws APIConnectionException, APIRequestException { return _userClient.getUserList(start, count); }
[ "public", "UserListResult", "getUserList", "(", "int", "start", ",", "int", "count", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_userClient", ".", "getUserList", "(", "start", ",", "count", ")", ";", "}" ]
Get user list @param start The start index of the list @param count The number that how many you want to get from list @return User info list @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Get", "user", "list" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L203-L206
google/error-prone
check_api/src/main/java/com/google/errorprone/scanner/Scanner.java
Scanner.updateSuppressions
private SuppressionInfo updateSuppressions(Tree tree, VisitorState state) { """ Updates current suppression state with information for the given {@code tree}. Returns the previous suppression state so that it can be restored when going up the tree. """ SuppressionInfo prevSuppressionInfo = currentSuppress...
java
private SuppressionInfo updateSuppressions(Tree tree, VisitorState state) { SuppressionInfo prevSuppressionInfo = currentSuppressions; if (tree instanceof CompilationUnitTree) { currentSuppressions = currentSuppressions.forCompilationUnit((CompilationUnitTree) tree, state); } else { Sy...
[ "private", "SuppressionInfo", "updateSuppressions", "(", "Tree", "tree", ",", "VisitorState", "state", ")", "{", "SuppressionInfo", "prevSuppressionInfo", "=", "currentSuppressions", ";", "if", "(", "tree", "instanceof", "CompilationUnitTree", ")", "{", "currentSuppress...
Updates current suppression state with information for the given {@code tree}. Returns the previous suppression state so that it can be restored when going up the tree.
[ "Updates", "current", "suppression", "state", "with", "information", "for", "the", "given", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/scanner/Scanner.java#L82-L96
michel-kraemer/gradle-download-task
src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java
DownloadAction.streamAndMove
private void streamAndMove(InputStream is, File destFile) throws IOException { """ If {@link #tempAndMove} is <code>true</code>, copy bytes from an input stream to a temporary file and log progress. Upon successful completion, move the temporary file to the given destination. If {@link #tempAndMove} is <code>fa...
java
private void streamAndMove(InputStream is, File destFile) throws IOException { if (!tempAndMove) { stream(is, destFile); } else { //create parent directory downloadTaskDir.mkdirs(); //create name of temporary file File tempFile = File.createTe...
[ "private", "void", "streamAndMove", "(", "InputStream", "is", ",", "File", "destFile", ")", "throws", "IOException", "{", "if", "(", "!", "tempAndMove", ")", "{", "stream", "(", "is", ",", "destFile", ")", ";", "}", "else", "{", "//create parent directory", ...
If {@link #tempAndMove} is <code>true</code>, copy bytes from an input stream to a temporary file and log progress. Upon successful completion, move the temporary file to the given destination. If {@link #tempAndMove} is <code>false</code>, just forward to {@link #stream(InputStream, File)}. @param is the input stream ...
[ "If", "{" ]
train
https://github.com/michel-kraemer/gradle-download-task/blob/a20c7f29c15ccb699700518f860373692148e3fc/src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java#L328-L355
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/AttributeService.java
AttributeService.getAttribute
public Object getAttribute(File file, String attribute) { """ Gets the value of the given attribute for the given file. {@code attribute} must be of the form "view:attribute" or "attribute". """ String view = getViewName(attribute); String attr = getSingleAttribute(attribute); return getAttribute(...
java
public Object getAttribute(File file, String attribute) { String view = getViewName(attribute); String attr = getSingleAttribute(attribute); return getAttribute(file, view, attr); }
[ "public", "Object", "getAttribute", "(", "File", "file", ",", "String", "attribute", ")", "{", "String", "view", "=", "getViewName", "(", "attribute", ")", ";", "String", "attr", "=", "getSingleAttribute", "(", "attribute", ")", ";", "return", "getAttribute", ...
Gets the value of the given attribute for the given file. {@code attribute} must be of the form "view:attribute" or "attribute".
[ "Gets", "the", "value", "of", "the", "given", "attribute", "for", "the", "given", "file", ".", "{" ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java#L189-L193
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.querySingleResult
public Object querySingleResult(String sql, String[] args, int column) { """ Query the SQL for a single result object @param sql sql statement @param args arguments @param column column index @return result, null if no result @since 3.1.0 """ return db.querySingleResult(sql, args, column); }
java
public Object querySingleResult(String sql, String[] args, int column) { return db.querySingleResult(sql, args, column); }
[ "public", "Object", "querySingleResult", "(", "String", "sql", ",", "String", "[", "]", "args", ",", "int", "column", ")", "{", "return", "db", ".", "querySingleResult", "(", "sql", ",", "args", ",", "column", ")", ";", "}" ]
Query the SQL for a single result object @param sql sql statement @param args arguments @param column column index @return result, null if no result @since 3.1.0
[ "Query", "the", "SQL", "for", "a", "single", "result", "object" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1001-L1003
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAApplInfo.java
JPAApplInfo.addPersistenceUnits
public void addPersistenceUnits(JPAPXml pxml) { """ Adds all of the Persistence Units defined in the specified persistence.xml file to the application, sorting by scope and archive name. <p> @param pxml provides access to a persistence.xml file as well as the archive name and scope. """ final boo...
java
public void addPersistenceUnits(JPAPXml pxml) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, "addPersistenceUnits", pxml); JPAPuScope puScope = pxml.getPuScope(); String scopeKey = (puScope == JPAPuScope.E...
[ "public", "void", "addPersistenceUnits", "(", "JPAPXml", "pxml", ")", "{", "final", "boolean", "isTraceOn", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "if", "(", "isTraceOn", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".",...
Adds all of the Persistence Units defined in the specified persistence.xml file to the application, sorting by scope and archive name. <p> @param pxml provides access to a persistence.xml file as well as the archive name and scope.
[ "Adds", "all", "of", "the", "Persistence", "Units", "defined", "in", "the", "specified", "persistence", ".", "xml", "file", "to", "the", "application", "sorting", "by", "scope", "and", "archive", "name", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAApplInfo.java#L99-L123
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/formatters/impl/xls/AreaDependencyManager.java
AreaDependencyManager.addDependency
public void addDependency(Area main, Area dependent) { """ Adds area dependency for formula calculations @param main Main area @param dependent Dependent area """ List<Area> set = areasDependency.get(main); if (set == null) { set = new ArrayList<Area>(); areasD...
java
public void addDependency(Area main, Area dependent) { List<Area> set = areasDependency.get(main); if (set == null) { set = new ArrayList<Area>(); areasDependency.put(main, set); } set.add(dependent); }
[ "public", "void", "addDependency", "(", "Area", "main", ",", "Area", "dependent", ")", "{", "List", "<", "Area", ">", "set", "=", "areasDependency", ".", "get", "(", "main", ")", ";", "if", "(", "set", "==", "null", ")", "{", "set", "=", "new", "Ar...
Adds area dependency for formula calculations @param main Main area @param dependent Dependent area
[ "Adds", "area", "dependency", "for", "formula", "calculations" ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/formatters/impl/xls/AreaDependencyManager.java#L40-L48
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/price/Price.java
Price.createFromGrossAmount
@Nonnull public static Price createFromGrossAmount (@Nonnull final ECurrency eCurrency, @Nonnull final BigDecimal aGrossAmount, @Nonnull final IVATItem aVATItem) { """ Create a price from a gross amount using the scale and ...
java
@Nonnull public static Price createFromGrossAmount (@Nonnull final ECurrency eCurrency, @Nonnull final BigDecimal aGrossAmount, @Nonnull final IVATItem aVATItem) { final PerCurrencySettings aPCS = CurrencyHelper.getSetting...
[ "@", "Nonnull", "public", "static", "Price", "createFromGrossAmount", "(", "@", "Nonnull", "final", "ECurrency", "eCurrency", ",", "@", "Nonnull", "final", "BigDecimal", "aGrossAmount", ",", "@", "Nonnull", "final", "IVATItem", "aVATItem", ")", "{", "final", "Pe...
Create a price from a gross amount using the scale and rounding mode from the currency. @param eCurrency Currency to use. May not be <code>null</code>. @param aGrossAmount The gross amount to use. May not be <code>null</code>. @param aVATItem The VAT item to use. May not be <code>null</code>. @return The created {@lin...
[ "Create", "a", "price", "from", "a", "gross", "amount", "using", "the", "scale", "and", "rounding", "mode", "from", "the", "currency", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/price/Price.java#L264-L271
kiswanij/jk-util
src/main/java/com/jk/util/JKDateTimeUtil.java
JKDateTimeUtil.isDateEqaualed
public static boolean isDateEqaualed(final java.util.Date date1, final java.util.Date date2) { """ Checks if is date eqaualed. @param date1 the date 1 @param date2 the date 2 @return true, if is date eqaualed """ final String d1 = JKFormatUtil.formatDate(date1, JKFormatUtil.MYSQL_DATE_DB_PATTERN); f...
java
public static boolean isDateEqaualed(final java.util.Date date1, final java.util.Date date2) { final String d1 = JKFormatUtil.formatDate(date1, JKFormatUtil.MYSQL_DATE_DB_PATTERN); final String d2 = JKFormatUtil.formatDate(date2, JKFormatUtil.MYSQL_DATE_DB_PATTERN); return d1.equalsIgnoreCase(d2); }
[ "public", "static", "boolean", "isDateEqaualed", "(", "final", "java", ".", "util", ".", "Date", "date1", ",", "final", "java", ".", "util", ".", "Date", "date2", ")", "{", "final", "String", "d1", "=", "JKFormatUtil", ".", "formatDate", "(", "date1", ",...
Checks if is date eqaualed. @param date1 the date 1 @param date2 the date 2 @return true, if is date eqaualed
[ "Checks", "if", "is", "date", "eqaualed", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKDateTimeUtil.java#L514-L518
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java
Identifiers.createExtendedIdentity
public static Identity createExtendedIdentity(String extendedIdentifier, Charset c) throws MarshalException { """ Create an extended {@link Identity} identifier. @param extendedIdentifier the extended identifier XML @param c charset used for encoding the string @return the new extended identity instance @...
java
public static Identity createExtendedIdentity(String extendedIdentifier, Charset c) throws MarshalException { return createExtendedIdentity(DomHelpers.toDocument(extendedIdentifier, c)); }
[ "public", "static", "Identity", "createExtendedIdentity", "(", "String", "extendedIdentifier", ",", "Charset", "c", ")", "throws", "MarshalException", "{", "return", "createExtendedIdentity", "(", "DomHelpers", ".", "toDocument", "(", "extendedIdentifier", ",", "c", "...
Create an extended {@link Identity} identifier. @param extendedIdentifier the extended identifier XML @param c charset used for encoding the string @return the new extended identity instance @throws IfmapException
[ "Create", "an", "extended", "{", "@link", "Identity", "}", "identifier", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java#L593-L596
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/HistoryDTO.java
HistoryDTO.transformToDto
public static List<HistoryDTO> transformToDto(List<History> list) { """ Converts a list of history entities to DTOs. @param list The list of entities. @return The list of DTOs. @throws WebApplicationException If an error occurs. """ if (list == null) { throw new WebApplicatio...
java
public static List<HistoryDTO> transformToDto(List<History> list) { if (list == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } List<HistoryDTO> result = new ArrayList<HistoryDTO>(); for (Hi...
[ "public", "static", "List", "<", "HistoryDTO", ">", "transformToDto", "(", "List", "<", "History", ">", "list", ")", "{", "if", "(", "list", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be converted to Dto ob...
Converts a list of history entities to DTOs. @param list The list of entities. @return The list of DTOs. @throws WebApplicationException If an error occurs.
[ "Converts", "a", "list", "of", "history", "entities", "to", "DTOs", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/HistoryDTO.java#L101-L112
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.filterCountByG_T_E
@Override public int filterCountByG_T_E(long groupId, String type, boolean enabled) { """ Returns the number of commerce notification templates that the user has permission to view where groupId = &#63; and type = &#63; and enabled = &#63;. @param groupId the group ID @param type the type @param enabled the ...
java
@Override public int filterCountByG_T_E(long groupId, String type, boolean enabled) { if (!InlineSQLHelperUtil.isEnabled(groupId)) { return countByG_T_E(groupId, type, enabled); } StringBundler query = new StringBundler(4); query.append(_FILTER_SQL_COUNT_COMMERCENOTIFICATIONTEMPLATE_WHERE); query.appen...
[ "@", "Override", "public", "int", "filterCountByG_T_E", "(", "long", "groupId", ",", "String", "type", ",", "boolean", "enabled", ")", "{", "if", "(", "!", "InlineSQLHelperUtil", ".", "isEnabled", "(", "groupId", ")", ")", "{", "return", "countByG_T_E", "(",...
Returns the number of commerce notification templates that the user has permission to view where groupId = &#63; and type = &#63; and enabled = &#63;. @param groupId the group ID @param type the type @param enabled the enabled @return the number of matching commerce notification templates that the user has permission ...
[ "Returns", "the", "number", "of", "commerce", "notification", "templates", "that", "the", "user", "has", "permission", "to", "view", "where", "groupId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L4371-L4433
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfPattern.java
DfPattern.matchRoot
Mappings matchRoot(IAtom root) { """ Match the pattern at the provided root. @param root the root atom of the molecule @return mappings @see Mappings """ checkCompatibleAPI(root); IAtomContainer mol = root.getContainer(); if (query.getAtomCount() > 0 && ((IQueryAtom) query.getAtom(...
java
Mappings matchRoot(IAtom root) { checkCompatibleAPI(root); IAtomContainer mol = root.getContainer(); if (query.getAtomCount() > 0 && ((IQueryAtom) query.getAtom(0)).matches(root)) { DfState local = new DfState(state); local.setRoot(root); return filter(new Map...
[ "Mappings", "matchRoot", "(", "IAtom", "root", ")", "{", "checkCompatibleAPI", "(", "root", ")", ";", "IAtomContainer", "mol", "=", "root", ".", "getContainer", "(", ")", ";", "if", "(", "query", ".", "getAtomCount", "(", ")", ">", "0", "&&", "(", "(",...
Match the pattern at the provided root. @param root the root atom of the molecule @return mappings @see Mappings
[ "Match", "the", "pattern", "at", "the", "provided", "root", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfPattern.java#L141-L151
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyServerBuilder.java
NettyServerBuilder.maxConnectionAge
public NettyServerBuilder maxConnectionAge(long maxConnectionAge, TimeUnit timeUnit) { """ Sets a custom max connection age, connection lasting longer than which will be gracefully terminated. An unreasonably small value might be increased. A random jitter of +/-10% will be added to it. {@code Long.MAX_VALUE} n...
java
public NettyServerBuilder maxConnectionAge(long maxConnectionAge, TimeUnit timeUnit) { checkArgument(maxConnectionAge > 0L, "max connection age must be positive"); maxConnectionAgeInNanos = timeUnit.toNanos(maxConnectionAge); if (maxConnectionAgeInNanos >= AS_LARGE_AS_INFINITE) { maxConnectionAgeInNan...
[ "public", "NettyServerBuilder", "maxConnectionAge", "(", "long", "maxConnectionAge", ",", "TimeUnit", "timeUnit", ")", "{", "checkArgument", "(", "maxConnectionAge", ">", "0L", ",", "\"max connection age must be positive\"", ")", ";", "maxConnectionAgeInNanos", "=", "time...
Sets a custom max connection age, connection lasting longer than which will be gracefully terminated. An unreasonably small value might be increased. A random jitter of +/-10% will be added to it. {@code Long.MAX_VALUE} nano seconds or an unreasonably large value will disable max connection age. @since 1.3.0
[ "Sets", "a", "custom", "max", "connection", "age", "connection", "lasting", "longer", "than", "which", "will", "be", "gracefully", "terminated", ".", "An", "unreasonably", "small", "value", "might", "be", "increased", ".", "A", "random", "jitter", "of", "+", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyServerBuilder.java#L433-L443
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaSynchronizedDispatcher.java
SibRaSynchronizedDispatcher.beforeDelivery
protected void beforeDelivery(final SIBusMessage message, final MessageEndpoint endpoint) throws ResourceException { """ Invoked before delivery of a message. Calls <code>beforeDelivery</code> on the endpoint and then deletes the message under that transaction. @param message the message that is a...
java
protected void beforeDelivery(final SIBusMessage message, final MessageEndpoint endpoint) throws ResourceException { final String methodName = "beforeDelivery"; if (TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, new Object [] { message, endpoint }); } ...
[ "protected", "void", "beforeDelivery", "(", "final", "SIBusMessage", "message", ",", "final", "MessageEndpoint", "endpoint", ")", "throws", "ResourceException", "{", "final", "String", "methodName", "=", "\"beforeDelivery\"", ";", "if", "(", "TRACE", ".", "isEntryEn...
Invoked before delivery of a message. Calls <code>beforeDelivery</code> on the endpoint and then deletes the message under that transaction. @param message the message that is about to be delivered @param endpoint the message endpoint we are using @throws ResourceAdapterInternalException if the endpoint method does no...
[ "Invoked", "before", "delivery", "of", "a", "message", ".", "Calls", "<code", ">", "beforeDelivery<", "/", "code", ">", "on", "the", "endpoint", "and", "then", "deletes", "the", "message", "under", "that", "transaction", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaSynchronizedDispatcher.java#L239-L255
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/FileSystemContext.java
FileSystemContext.getFileBytes
public byte[] getFileBytes(String filePath) throws IOException { """ Read the contents of the file at the given path and return the associated byte array. @param filePath The path to the file to read @return The contents of the file @throws IOException if an error occurs reading the file """ ...
java
public byte[] getFileBytes(String filePath) throws IOException { byte[] out = null; String path = (String) Utils.intern(filePath); RandomAccessFile raf = null; synchronized (path) { File file = null; try { file = new File(path); boolean exists = file.exists(); if (exists) { byte[]...
[ "public", "byte", "[", "]", "getFileBytes", "(", "String", "filePath", ")", "throws", "IOException", "{", "byte", "[", "]", "out", "=", "null", ";", "String", "path", "=", "(", "String", ")", "Utils", ".", "intern", "(", "filePath", ")", ";", "RandomAc...
Read the contents of the file at the given path and return the associated byte array. @param filePath The path to the file to read @return The contents of the file @throws IOException if an error occurs reading the file
[ "Read", "the", "contents", "of", "the", "file", "at", "the", "given", "path", "and", "return", "the", "associated", "byte", "array", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/FileSystemContext.java#L385-L418
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java
ScriptingUtils.executeGroovyScript
public static <T> T executeGroovyScript(final GroovyObject groovyObject, final Object[] args, final Class<T> clazz, final boolean failOnError) { """ Execute groovy script. @param <T> the type parameter @param groov...
java
public static <T> T executeGroovyScript(final GroovyObject groovyObject, final Object[] args, final Class<T> clazz, final boolean failOnError) { return executeGroovyScript(groovyObject, "run", args, clazz, failOnError); ...
[ "public", "static", "<", "T", ">", "T", "executeGroovyScript", "(", "final", "GroovyObject", "groovyObject", ",", "final", "Object", "[", "]", "args", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "boolean", "failOnError", ")", "{", "return"...
Execute groovy script. @param <T> the type parameter @param groovyObject the groovy object @param args the args @param clazz the clazz @param failOnError the fail on error @return the result
[ "Execute", "groovy", "script", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java#L151-L155
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormSpec.java
FormSpec.parseAtomicSize
private Size parseAtomicSize(String token) { """ Decodes and returns an atomic size that is either a constant size or a component size. @param token the encoded size @return the decoded size either a constant or component size """ String trimmedToken = token.trim(); if (trimmedToken.startsW...
java
private Size parseAtomicSize(String token) { String trimmedToken = token.trim(); if (trimmedToken.startsWith("'") && trimmedToken.endsWith("'")) { int length = trimmedToken.length(); if (length < 2) { throw new IllegalArgumentException("Missing closing \"'\" for p...
[ "private", "Size", "parseAtomicSize", "(", "String", "token", ")", "{", "String", "trimmedToken", "=", "token", ".", "trim", "(", ")", ";", "if", "(", "trimmedToken", ".", "startsWith", "(", "\"'\"", ")", "&&", "trimmedToken", ".", "endsWith", "(", "\"'\""...
Decodes and returns an atomic size that is either a constant size or a component size. @param token the encoded size @return the decoded size either a constant or component size
[ "Decodes", "and", "returns", "an", "atomic", "size", "that", "is", "either", "a", "constant", "size", "or", "a", "component", "size", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormSpec.java#L364-L378
codeprimate-software/cp-elements
src/main/java/org/cp/elements/util/ComparatorUtils.java
ComparatorUtils.compareIgnoreNull
@NullSafe public static <T extends Comparable<T>> int compareIgnoreNull(T obj1, T obj2) { """ Compares two {@link Comparable} objects for absolute ordering, ignoring possible {@literal null} values. Sorts (orders) {@literal null} values last. @param <T> {@link Class} type of {@link Comparable} objects in the...
java
@NullSafe public static <T extends Comparable<T>> int compareIgnoreNull(T obj1, T obj2) { return (obj1 == null ? 1 : (obj2 == null ? -1 : obj1.compareTo(obj2))); }
[ "@", "NullSafe", "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "int", "compareIgnoreNull", "(", "T", "obj1", ",", "T", "obj2", ")", "{", "return", "(", "obj1", "==", "null", "?", "1", ":", "(", "obj2", "==", "null", "?"...
Compares two {@link Comparable} objects for absolute ordering, ignoring possible {@literal null} values. Sorts (orders) {@literal null} values last. @param <T> {@link Class} type of {@link Comparable} objects in the comparison. @param obj1 {@link Comparable} object being compared with {@code obj2}. @param obj2 {@link ...
[ "Compares", "two", "{", "@link", "Comparable", "}", "objects", "for", "absolute", "ordering", "ignoring", "possible", "{", "@literal", "null", "}", "values", ".", "Sorts", "(", "orders", ")", "{", "@literal", "null", "}", "values", "last", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/ComparatorUtils.java#L46-L49
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java
FastHashMap.put
public V put(K key, V value) { """ Associates the specified value with the specified key in this {@link FastMap}. If the {@link FastMap} previously contained a mapping for this key, the old value is replaced. @param key the key with which the specified value is to be associated. @param value the value to be ...
java
public V put(K key, V value) { EntryImpl<K, V> entry = _entries[keyHash(key) & _mask]; while (entry != null) { if (key.equals(entry._key)) { V prevValue = entry._value; entry._value = value; return prevValue; } entry = entry._next; } // No previous mapping. ...
[ "public", "V", "put", "(", "K", "key", ",", "V", "value", ")", "{", "EntryImpl", "<", "K", ",", "V", ">", "entry", "=", "_entries", "[", "keyHash", "(", "key", ")", "&", "_mask", "]", ";", "while", "(", "entry", "!=", "null", ")", "{", "if", ...
Associates the specified value with the specified key in this {@link FastMap}. If the {@link FastMap} previously contained a mapping for this key, the old value is replaced. @param key the key with which the specified value is to be associated. @param value the value to be associated with the specified key. @return th...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "key", "in", "this", "{", "@link", "FastMap", "}", ".", "If", "the", "{", "@link", "FastMap", "}", "previously", "contained", "a", "mapping", "for", "this", "key", "the", "old", "value"...
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java#L221-L234
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201808/activityservice/GetActiveActivities.java
GetActiveActivities.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { ActivityServiceInterface activityService = adManagerServices.get(session, ActivityServiceInterface.class); // Create a statement to select activities. StatementBuilder stateme...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "ActivityServiceInterface", "activityService", "=", "adManagerServices", ".", "get", "(", "session", ",", ...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201808/activityservice/GetActiveActivities.java#L52-L90
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isBetweenInclusive
public static float isBetweenInclusive (final float fValue, final String sName, final float fLowerBoundInclusive, final float fUpperBoundInclusive) { """ Check if <code>nValue &ge; nLowerB...
java
public static float isBetweenInclusive (final float fValue, final String sName, final float fLowerBoundInclusive, final float fUpperBoundInclusive) { if (isEnabled ()) return isBetwe...
[ "public", "static", "float", "isBetweenInclusive", "(", "final", "float", "fValue", ",", "final", "String", "sName", ",", "final", "float", "fLowerBoundInclusive", ",", "final", "float", "fUpperBoundInclusive", ")", "{", "if", "(", "isEnabled", "(", ")", ")", ...
Check if <code>nValue &ge; nLowerBoundInclusive &amp;&amp; nValue &le; nUpperBoundInclusive</code> @param fValue Value @param sName Name @param fLowerBoundInclusive Lower bound @param fUpperBoundInclusive Upper bound @return The value
[ "Check", "if", "<code", ">", "nValue", "&ge", ";", "nLowerBoundInclusive", "&amp", ";", "&amp", ";", "nValue", "&le", ";", "nUpperBoundInclusive<", "/", "code", ">" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L2501-L2509
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java
Configuration.registerTableOverride
@Deprecated public String registerTableOverride(String oldTable, String newTable) { """ Register a table override @param oldTable table to override @param newTable override @return previous override value @deprecated Use {@link #setDynamicNameMapping(NameMapping)} instead. """ return intern...
java
@Deprecated public String registerTableOverride(String oldTable, String newTable) { return internalNameMapping.registerTableOverride(oldTable, newTable); }
[ "@", "Deprecated", "public", "String", "registerTableOverride", "(", "String", "oldTable", ",", "String", "newTable", ")", "{", "return", "internalNameMapping", ".", "registerTableOverride", "(", "oldTable", ",", "newTable", ")", ";", "}" ]
Register a table override @param oldTable table to override @param newTable override @return previous override value @deprecated Use {@link #setDynamicNameMapping(NameMapping)} instead.
[ "Register", "a", "table", "override" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java#L336-L339
reactor/reactor-netty
src/main/java/reactor/netty/tcp/TcpServer.java
TcpServer.selectorOption
public final <T> TcpServer selectorOption(ChannelOption<T> key, T value) { """ Sets a {@link ChannelOption} value for low level connection settings like {@code SO_TIMEOUT} or {@code SO_KEEPALIVE}. This will apply to parent selector channel. @param key the option key @param value the option value @param <T> t...
java
public final <T> TcpServer selectorOption(ChannelOption<T> key, T value) { Objects.requireNonNull(key, "key"); return bootstrap(b -> b.option(key, value)); }
[ "public", "final", "<", "T", ">", "TcpServer", "selectorOption", "(", "ChannelOption", "<", "T", ">", "key", ",", "T", "value", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ",", "\"key\"", ")", ";", "return", "bootstrap", "(", "b", "->", "b"...
Sets a {@link ChannelOption} value for low level connection settings like {@code SO_TIMEOUT} or {@code SO_KEEPALIVE}. This will apply to parent selector channel. @param key the option key @param value the option value @param <T> the option type @return new {@link TcpServer} @see ServerBootstrap#option(ChannelOption,...
[ "Sets", "a", "{", "@link", "ChannelOption", "}", "value", "for", "low", "level", "connection", "settings", "like", "{", "@code", "SO_TIMEOUT", "}", "or", "{", "@code", "SO_KEEPALIVE", "}", ".", "This", "will", "apply", "to", "parent", "selector", "channel", ...
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/tcp/TcpServer.java#L510-L513
UrielCh/ovh-java-sdk
ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java
ApiOvhEmailmxplan.service_account_GET
public ArrayList<String> service_account_GET(String service, Long id, String primaryEmailAddress) throws IOException { """ Accounts associated to this mxplan service REST: GET /email/mxplan/{service}/account @param id [required] Filter the value of id property (like) @param primaryEmailAddress [required] Filt...
java
public ArrayList<String> service_account_GET(String service, Long id, String primaryEmailAddress) throws IOException { String qPath = "/email/mxplan/{service}/account"; StringBuilder sb = path(qPath, service); query(sb, "id", id); query(sb, "primaryEmailAddress", primaryEmailAddress); String resp = exec(qPath...
[ "public", "ArrayList", "<", "String", ">", "service_account_GET", "(", "String", "service", ",", "Long", "id", ",", "String", "primaryEmailAddress", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/mxplan/{service}/account\"", ";", "StringBuilder",...
Accounts associated to this mxplan service REST: GET /email/mxplan/{service}/account @param id [required] Filter the value of id property (like) @param primaryEmailAddress [required] Filter the value of primaryEmailAddress property (like) @param service [required] The internal name of your mxplan organization API bet...
[ "Accounts", "associated", "to", "this", "mxplan", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java#L500-L507
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java
LinkUtils.newBookmarkablePageLink
public static BookmarkablePageLink<String> newBookmarkablePageLink(final String linkId, final Class<? extends Page> pageClass, final String labelId, final String resourceModelKey, final Object[] parameters, final String defaultValue, final Component component) { """ Creates the bookmarkable page link. @pa...
java
public static BookmarkablePageLink<String> newBookmarkablePageLink(final String linkId, final Class<? extends Page> pageClass, final String labelId, final String resourceModelKey, final Object[] parameters, final String defaultValue, final Component component) { return newBookmarkablePageLink(linkId, pageCla...
[ "public", "static", "BookmarkablePageLink", "<", "String", ">", "newBookmarkablePageLink", "(", "final", "String", "linkId", ",", "final", "Class", "<", "?", "extends", "Page", ">", "pageClass", ",", "final", "String", "labelId", ",", "final", "String", "resourc...
Creates the bookmarkable page link. @param linkId the link id @param pageClass the page class @param labelId the label id @param resourceModelKey the resource model key @param parameters the parameters @param defaultValue the default value @param component the component @return the bookmarkable page link
[ "Creates", "the", "bookmarkable", "page", "link", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java#L105-L112
sebastiangraf/perfidix
src/main/java/org/perfidix/Perfidix.java
Perfidix.setUpBenchmark
public static Benchmark setUpBenchmark(final String[] classes, final Benchmark benchmark) throws ClassNotFoundException { """ Setting up an existing benchmark with the given number of class-files @param classes to be benched @param benchmark to be set up @return the same {@link Benchmark} object with the cl...
java
public static Benchmark setUpBenchmark(final String[] classes, final Benchmark benchmark) throws ClassNotFoundException { for (final String each : classes) { benchmark.add(Class.forName(each)); } return benchmark; }
[ "public", "static", "Benchmark", "setUpBenchmark", "(", "final", "String", "[", "]", "classes", ",", "final", "Benchmark", "benchmark", ")", "throws", "ClassNotFoundException", "{", "for", "(", "final", "String", "each", ":", "classes", ")", "{", "benchmark", ...
Setting up an existing benchmark with the given number of class-files @param classes to be benched @param benchmark to be set up @return the same {@link Benchmark} object with the classes @throws ClassNotFoundException thrown if class was not found.
[ "Setting", "up", "an", "existing", "benchmark", "with", "the", "given", "number", "of", "class", "-", "files" ]
train
https://github.com/sebastiangraf/perfidix/blob/f13aa793b6a3055215ed4edbb946c1bb5d564886/src/main/java/org/perfidix/Perfidix.java#L86-L91
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/MemcachedBackupSession.java
MemcachedBackupSession.getMemcachedExpirationTime
int getMemcachedExpirationTime() { """ Gets the time in seconds when this session will expire in memcached. If the session was stored in memcached with expiration 0 this method will just return 0. @return the time in seconds """ if ( !_sticky ) { throw new IllegalStateException( "The m...
java
int getMemcachedExpirationTime() { if ( !_sticky ) { throw new IllegalStateException( "The memcached expiration time cannot be determined in non-sticky mode." ); } if ( _lastMemcachedExpirationTime == 0 ) { return 0; } final long timeIdleInMillis = _lastB...
[ "int", "getMemcachedExpirationTime", "(", ")", "{", "if", "(", "!", "_sticky", ")", "{", "throw", "new", "IllegalStateException", "(", "\"The memcached expiration time cannot be determined in non-sticky mode.\"", ")", ";", "}", "if", "(", "_lastMemcachedExpirationTime", "...
Gets the time in seconds when this session will expire in memcached. If the session was stored in memcached with expiration 0 this method will just return 0. @return the time in seconds
[ "Gets", "the", "time", "in", "seconds", "when", "this", "session", "will", "expire", "in", "memcached", ".", "If", "the", "session", "was", "stored", "in", "memcached", "with", "expiration", "0", "this", "method", "will", "just", "return", "0", "." ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/MemcachedBackupSession.java#L312-L330
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/util/StringManipulationHelper.java
StringManipulationHelper.equalsToIgnoreEndline
public static boolean equalsToIgnoreEndline(String expected, String actual) { """ compares two strings for equality, line by line, ignoring any difference of end line delimiters contained within the 2 Strings. This method should be used if and only if two Strings are considered identical when all nodes are iden...
java
public static boolean equalsToIgnoreEndline(String expected, String actual) { if (expected == null && actual == null) { return true; } if (expected != null ^ actual != null) { return false; } Scanner scanner1 = new Scanner(expected); Scanner scanner2 = new Scanner(actual); String line1, line2; whi...
[ "public", "static", "boolean", "equalsToIgnoreEndline", "(", "String", "expected", ",", "String", "actual", ")", "{", "if", "(", "expected", "==", "null", "&&", "actual", "==", "null", ")", "{", "return", "true", ";", "}", "if", "(", "expected", "!=", "n...
compares two strings for equality, line by line, ignoring any difference of end line delimiters contained within the 2 Strings. This method should be used if and only if two Strings are considered identical when all nodes are identical including their relative order. Generally useful when asserting identity of <b>autom...
[ "compares", "two", "strings", "for", "equality", "line", "by", "line", "ignoring", "any", "difference", "of", "end", "line", "delimiters", "contained", "within", "the", "2", "Strings", ".", "This", "method", "should", "be", "used", "if", "and", "only", "if",...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/util/StringManipulationHelper.java#L107-L135
Azure/autorest-clientruntime-for-java
azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/resources/ResourceUtilsCore.java
ResourceUtilsCore.extractFromResourceId
public static String extractFromResourceId(String id, String identifier) { """ Extract information from a resource ID string with the resource type as the identifier. @param id the resource ID @param identifier the identifier to match, e.g. "resourceGroups", "storageAccounts" @return the information extracte...
java
public static String extractFromResourceId(String id, String identifier) { if (id == null || identifier == null) { return id; } Pattern pattern = Pattern.compile(identifier + "/[-\\w._]+"); Matcher matcher = pattern.matcher(id); if (matcher.find()) { retur...
[ "public", "static", "String", "extractFromResourceId", "(", "String", "id", ",", "String", "identifier", ")", "{", "if", "(", "id", "==", "null", "||", "identifier", "==", "null", ")", "{", "return", "id", ";", "}", "Pattern", "pattern", "=", "Pattern", ...
Extract information from a resource ID string with the resource type as the identifier. @param id the resource ID @param identifier the identifier to match, e.g. "resourceGroups", "storageAccounts" @return the information extracted from the identifier
[ "Extract", "information", "from", "a", "resource", "ID", "string", "with", "the", "resource", "type", "as", "the", "identifier", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/resources/ResourceUtilsCore.java#L121-L132
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java
PublicanPODocBookBuilder.processPOTopicBugLink
protected void processPOTopicBugLink(final POBuildData buildData, final SpecTopic specTopic, final Map<String, TranslationDetails> translations) throws BuildProcessingException { """ Add any bug link strings for a specific topic. @param buildData Information and data structures for t...
java
protected void processPOTopicBugLink(final POBuildData buildData, final SpecTopic specTopic, final Map<String, TranslationDetails> translations) throws BuildProcessingException { try { final DocBookXMLPreProcessor preProcessor = buildData.getXMLPreProcessor(); final String bu...
[ "protected", "void", "processPOTopicBugLink", "(", "final", "POBuildData", "buildData", ",", "final", "SpecTopic", "specTopic", ",", "final", "Map", "<", "String", ",", "TranslationDetails", ">", "translations", ")", "throws", "BuildProcessingException", "{", "try", ...
Add any bug link strings for a specific topic. @param buildData Information and data structures for the build. @param specTopic The spec topic to create any bug link translation strings for. @param translations The mapping of original strings to translation strings, that wi...
[ "Add", "any", "bug", "link", "strings", "for", "a", "specific", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java#L1250-L1262
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.isMergedRegion
public static boolean isMergedRegion(Sheet sheet, int row, int column) { """ 判断指定的单元格是否是合并单元格 @param sheet {@link Sheet} @param row 行号 @param column 列号 @return 是否是合并单元格 """ final int sheetMergeCount = sheet.getNumMergedRegions(); CellRangeAddress ca; for (int i = 0; i < sheetMergeCount; i++) { ...
java
public static boolean isMergedRegion(Sheet sheet, int row, int column) { final int sheetMergeCount = sheet.getNumMergedRegions(); CellRangeAddress ca; for (int i = 0; i < sheetMergeCount; i++) { ca = sheet.getMergedRegion(i); if (row >= ca.getFirstRow() && row <= ca.getLastRow() && column >= ca.getFirs...
[ "public", "static", "boolean", "isMergedRegion", "(", "Sheet", "sheet", ",", "int", "row", ",", "int", "column", ")", "{", "final", "int", "sheetMergeCount", "=", "sheet", ".", "getNumMergedRegions", "(", ")", ";", "CellRangeAddress", "ca", ";", "for", "(", ...
判断指定的单元格是否是合并单元格 @param sheet {@link Sheet} @param row 行号 @param column 列号 @return 是否是合并单元格
[ "判断指定的单元格是否是合并单元格" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L181-L191
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java
DatatypeConverter.parseUUID
public static final UUID parseUUID(String value) { """ Convert the Primavera string representation of a UUID into a Java UUID instance. @param value Primavera UUID @return Java UUID instance """ UUID result = null; if (value != null && !value.isEmpty()) { if (value.charAt(0) == '...
java
public static final UUID parseUUID(String value) { UUID result = null; if (value != null && !value.isEmpty()) { if (value.charAt(0) == '{') { // PMXML representation: <GUID>{0AB9133E-A09A-9648-B98A-B2384894AC44}</GUID> result = UUID.fromString(value.substri...
[ "public", "static", "final", "UUID", "parseUUID", "(", "String", "value", ")", "{", "UUID", "result", "=", "null", ";", "if", "(", "value", "!=", "null", "&&", "!", "value", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "value", ".", "charAt", "("...
Convert the Primavera string representation of a UUID into a Java UUID instance. @param value Primavera UUID @return Java UUID instance
[ "Convert", "the", "Primavera", "string", "representation", "of", "a", "UUID", "into", "a", "Java", "UUID", "instance", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java#L44-L75
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java
NativeIO.chunkedCopy
public static void chunkedCopy(InputStream src, File dest) throws IOException { """ Copy from an input stream to a file minimizing cache impact on the destination.. This happens chunk by chunk so only at most chunk size will be present in the OS page cache. Posix (Linux, BSD) only. The implementation in this met...
java
public static void chunkedCopy(InputStream src, File dest) throws IOException { final byte[] buf = new byte[8 << 20]; // 8Mb buffer long offset = 0; long lastOffset = 0; try (final RandomAccessFile raf = new RandomAccessFile(dest, "rw")) { final int fd = getfd(raf.getFD()); for (int num...
[ "public", "static", "void", "chunkedCopy", "(", "InputStream", "src", ",", "File", "dest", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "buf", "=", "new", "byte", "[", "8", "<<", "20", "]", ";", "// 8Mb buffer", "long", "offset", "=", ...
Copy from an input stream to a file minimizing cache impact on the destination.. This happens chunk by chunk so only at most chunk size will be present in the OS page cache. Posix (Linux, BSD) only. The implementation in this method is based on a post by Linus Torvalds here: http://lkml.iu.edu/hypermail/linux/kernel/10...
[ "Copy", "from", "an", "input", "stream", "to", "a", "file", "minimizing", "cache", "impact", "on", "the", "destination", "..", "This", "happens", "chunk", "by", "chunk", "so", "only", "at", "most", "chunk", "size", "will", "be", "present", "in", "the", "...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java#L205-L239
apereo/cas
support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java
CloudDirectoryUtils.getAttributeKey
private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) { """ Gets attribute key. @param schemaArn the schema arn @param facetName the facet name @param attributeName the attribute name @return the attribute key """ return ne...
java
private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) { return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName); }
[ "private", "static", "AttributeKey", "getAttributeKey", "(", "final", "String", "schemaArn", ",", "final", "String", "facetName", ",", "final", "String", "attributeName", ")", "{", "return", "new", "AttributeKey", "(", ")", ".", "withFacetName", "(", "facetName", ...
Gets attribute key. @param schemaArn the schema arn @param facetName the facet name @param attributeName the attribute name @return the attribute key
[ "Gets", "attribute", "key", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L130-L132
apereo/cas
support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationHelper.java
WsFederationHelper.getRelyingPartyIdentifier
public String getRelyingPartyIdentifier(final Service service, final WsFederationConfiguration configuration) { """ Get the relying party id for a service. @param service the service to get an id for @param configuration the configuration @return relying party id """ val relyingPartyIdentifi...
java
public String getRelyingPartyIdentifier(final Service service, final WsFederationConfiguration configuration) { val relyingPartyIdentifier = configuration.getRelyingPartyIdentifier(); if (service != null) { val registeredService = this.servicesManager.findServiceBy(service); Regi...
[ "public", "String", "getRelyingPartyIdentifier", "(", "final", "Service", "service", ",", "final", "WsFederationConfiguration", "configuration", ")", "{", "val", "relyingPartyIdentifier", "=", "configuration", ".", "getRelyingPartyIdentifier", "(", ")", ";", "if", "(", ...
Get the relying party id for a service. @param service the service to get an id for @param configuration the configuration @return relying party id
[ "Get", "the", "relying", "party", "id", "for", "a", "service", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationHelper.java#L364-L376