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
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderManager.java
GVRShaderManager.makeLayout
static String makeLayout(String descriptor, String blockName, boolean useUBO) { """ Make a string with the shader layout for a uniform block with a given descriptor. The format of the descriptor is the same as for a @{link GVRShaderData} - a string of types and names of each field. <p> This function will retu...
java
static String makeLayout(String descriptor, String blockName, boolean useUBO) { return NativeShaderManager.makeLayout(descriptor, blockName, useUBO); }
[ "static", "String", "makeLayout", "(", "String", "descriptor", ",", "String", "blockName", ",", "boolean", "useUBO", ")", "{", "return", "NativeShaderManager", ".", "makeLayout", "(", "descriptor", ",", "blockName", ",", "useUBO", ")", ";", "}" ]
Make a string with the shader layout for a uniform block with a given descriptor. The format of the descriptor is the same as for a @{link GVRShaderData} - a string of types and names of each field. <p> This function will return a Vulkan shader layout if the Vulkan renderer is being used. Otherwise, it returns an OpenG...
[ "Make", "a", "string", "with", "the", "shader", "layout", "for", "a", "uniform", "block", "with", "a", "given", "descriptor", ".", "The", "format", "of", "the", "descriptor", "is", "the", "same", "as", "for", "a" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderManager.java#L113-L116
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newArray
public static EditableArray newArray( Object... values ) { """ Create a new editable array that can be used as a new array value in other documents. @param values the initial values for the array @return the editable array; never null """ BasicArray array = new BasicArray(); for (Object val...
java
public static EditableArray newArray( Object... values ) { BasicArray array = new BasicArray(); for (Object value : values) { array.addValue(value); } return new ArrayEditor(array, DEFAULT_FACTORY); }
[ "public", "static", "EditableArray", "newArray", "(", "Object", "...", "values", ")", "{", "BasicArray", "array", "=", "new", "BasicArray", "(", ")", ";", "for", "(", "Object", "value", ":", "values", ")", "{", "array", ".", "addValue", "(", "value", ")"...
Create a new editable array that can be used as a new array value in other documents. @param values the initial values for the array @return the editable array; never null
[ "Create", "a", "new", "editable", "array", "that", "can", "be", "used", "as", "a", "new", "array", "value", "in", "other", "documents", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L183-L189
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/SuperPositions.java
SuperPositions.getRmsdAtOrigin
public static double getRmsdAtOrigin(Point3d[] fixed, Point3d[] moved) { """ Use the {@link SuperPosition#getRmsd(Point3d[], Point3d[])} method of the default static SuperPosition algorithm contained in this Class, assuming that the point arrays are centered at the origin. """ superposer.setCentered(true);...
java
public static double getRmsdAtOrigin(Point3d[] fixed, Point3d[] moved) { superposer.setCentered(true); return superposer.getRmsd(fixed, moved); }
[ "public", "static", "double", "getRmsdAtOrigin", "(", "Point3d", "[", "]", "fixed", ",", "Point3d", "[", "]", "moved", ")", "{", "superposer", ".", "setCentered", "(", "true", ")", ";", "return", "superposer", ".", "getRmsd", "(", "fixed", ",", "moved", ...
Use the {@link SuperPosition#getRmsd(Point3d[], Point3d[])} method of the default static SuperPosition algorithm contained in this Class, assuming that the point arrays are centered at the origin.
[ "Use", "the", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/SuperPositions.java#L99-L102
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.hideView
public static void hideView(Activity context, int id) { """ Sets visibility of the given view to <code>View.GONE</code>. @param context The current Context or Activity that this method is called from. @param id R.id.xxxx value for the view to hide"expected textView to throw a ClassCastException" + textVie...
java
public static void hideView(Activity context, int id) { if (context != null) { View view = context.findViewById(id); if (view != null) { view.setVisibility(View.GONE); } else { Log.e("Caffeine", "View does not exist. Could not hide it."); ...
[ "public", "static", "void", "hideView", "(", "Activity", "context", ",", "int", "id", ")", "{", "if", "(", "context", "!=", "null", ")", "{", "View", "view", "=", "context", ".", "findViewById", "(", "id", ")", ";", "if", "(", "view", "!=", "null", ...
Sets visibility of the given view to <code>View.GONE</code>. @param context The current Context or Activity that this method is called from. @param id R.id.xxxx value for the view to hide"expected textView to throw a ClassCastException" + textView.
[ "Sets", "visibility", "of", "the", "given", "view", "to", "<code", ">", "View", ".", "GONE<", "/", "code", ">", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L232-L241
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.newHar
public JsonObject newHar(String initialPageRef, boolean captureHeaders, boolean captureContent, boolean captureBinaryContent) { """ Creates a new HAR attached to the proxy. @param initialPageRef Name of the first pageRef that...
java
public JsonObject newHar(String initialPageRef, boolean captureHeaders, boolean captureContent, boolean captureBinaryContent) { try { // Request BMP to create a new HAR for this Proxy HttpPut request =...
[ "public", "JsonObject", "newHar", "(", "String", "initialPageRef", ",", "boolean", "captureHeaders", ",", "boolean", "captureContent", ",", "boolean", "captureBinaryContent", ")", "{", "try", "{", "// Request BMP to create a new HAR for this Proxy", "HttpPut", "request", ...
Creates a new HAR attached to the proxy. @param initialPageRef Name of the first pageRef that should be used by the HAR. If "null", default to "Page 1" @param captureHeaders Enables capturing of HTTP Headers @param captureContent Enables capturing of HTTP Response Content (body) @param captureBinaryContent Enabled cap...
[ "Creates", "a", "new", "HAR", "attached", "to", "the", "proxy", "." ]
train
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L277-L306
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
TransformerImpl.setContentHandler
public void setContentHandler(ContentHandler handler) { """ Set the content event handler. NEEDSDOC @param handler @throws java.lang.NullPointerException If the handler is null. @see org.xml.sax.XMLReader#setContentHandler """ if (handler == null) { throw new NullPointerException(XSLMessag...
java
public void setContentHandler(ContentHandler handler) { if (handler == null) { throw new NullPointerException(XSLMessages.createMessage(XSLTErrorResources.ER_NULL_CONTENT_HANDLER, null)); //"Null content handler"); } else { m_outputContentHandler = handler; if (null == m_serial...
[ "public", "void", "setContentHandler", "(", "ContentHandler", "handler", ")", "{", "if", "(", "handler", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "XSLMessages", ".", "createMessage", "(", "XSLTErrorResources", ".", "ER_NULL_CONTENT_HANDLE...
Set the content event handler. NEEDSDOC @param handler @throws java.lang.NullPointerException If the handler is null. @see org.xml.sax.XMLReader#setContentHandler
[ "Set", "the", "content", "event", "handler", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java#L1703-L1725
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/IndempotentVar2VarSubstitutionImpl.java
IndempotentVar2VarSubstitutionImpl.isIndempotent
public static boolean isIndempotent(Map<Variable, Variable> substitutionMap) { """ Returns true if there is common variables in the domain and the range of the substitution map. """ if (substitutionMap.isEmpty()) return true; Set<Variable> valueSet = new HashSet<>(substitutionMap.v...
java
public static boolean isIndempotent(Map<Variable, Variable> substitutionMap) { if (substitutionMap.isEmpty()) return true; Set<Variable> valueSet = new HashSet<>(substitutionMap.values()); valueSet.retainAll(substitutionMap.entrySet()); return valueSet.isEmpty(); }
[ "public", "static", "boolean", "isIndempotent", "(", "Map", "<", "Variable", ",", "Variable", ">", "substitutionMap", ")", "{", "if", "(", "substitutionMap", ".", "isEmpty", "(", ")", ")", "return", "true", ";", "Set", "<", "Variable", ">", "valueSet", "="...
Returns true if there is common variables in the domain and the range of the substitution map.
[ "Returns", "true", "if", "there", "is", "common", "variables", "in", "the", "domain", "and", "the", "range", "of", "the", "substitution", "map", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/IndempotentVar2VarSubstitutionImpl.java#L29-L37
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.removeUserFromGroup
public void removeUserFromGroup(String username, String groupname) throws CmsException { """ Removes a user from a group.<p> @param username the name of the user that is to be removed from the group @param groupname the name of the group @throws CmsException if operation was not successful """ ...
java
public void removeUserFromGroup(String username, String groupname) throws CmsException { m_securityManager.removeUserFromGroup(m_context, username, groupname, false); }
[ "public", "void", "removeUserFromGroup", "(", "String", "username", ",", "String", "groupname", ")", "throws", "CmsException", "{", "m_securityManager", ".", "removeUserFromGroup", "(", "m_context", ",", "username", ",", "groupname", ",", "false", ")", ";", "}" ]
Removes a user from a group.<p> @param username the name of the user that is to be removed from the group @param groupname the name of the group @throws CmsException if operation was not successful
[ "Removes", "a", "user", "from", "a", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L3611-L3614
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/tregex/TregexPattern.java
TregexPattern.safeCompile
public static TregexPattern safeCompile(String tregex, boolean verbose) { """ Creates a pattern from the given string using the default HeadFinder and BasicCategoryFunction. If you want to use a different HeadFinder or BasicCategoryFunction, use a {@link TregexPatternCompiler} object. Rather than throwing an e...
java
public static TregexPattern safeCompile(String tregex, boolean verbose) { TregexPattern result = null; try { result = TregexPatternCompiler.defaultCompiler.compile(tregex); } catch (TregexParseException ex) { if (verbose) { System.err.println("Could not parse " + tregex + ":"); ...
[ "public", "static", "TregexPattern", "safeCompile", "(", "String", "tregex", ",", "boolean", "verbose", ")", "{", "TregexPattern", "result", "=", "null", ";", "try", "{", "result", "=", "TregexPatternCompiler", ".", "defaultCompiler", ".", "compile", "(", "trege...
Creates a pattern from the given string using the default HeadFinder and BasicCategoryFunction. If you want to use a different HeadFinder or BasicCategoryFunction, use a {@link TregexPatternCompiler} object. Rather than throwing an exception when the string does not parse, simply returns null @param tregex the patter...
[ "Creates", "a", "pattern", "from", "the", "given", "string", "using", "the", "default", "HeadFinder", "and", "BasicCategoryFunction", ".", "If", "you", "want", "to", "use", "a", "different", "HeadFinder", "or", "BasicCategoryFunction", "use", "a", "{", "@link", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/tregex/TregexPattern.java#L434-L445
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP8Reader.java
MPP8Reader.processTableData
private void processTableData() throws IOException { """ This method extracts table data from the MPP file. @throws IOException """ DirectoryEntry dir = (DirectoryEntry) m_viewDir.getEntry("CTable"); FixFix ff = new FixFix(126, new DocumentInputStream(((DocumentEntry) dir.getEntry("FixFix 0"))...
java
private void processTableData() throws IOException { DirectoryEntry dir = (DirectoryEntry) m_viewDir.getEntry("CTable"); FixFix ff = new FixFix(126, new DocumentInputStream(((DocumentEntry) dir.getEntry("FixFix 0")))); FixDeferFix fdf = new FixDeferFix(new DocumentInputStream(((DocumentEntry) dir...
[ "private", "void", "processTableData", "(", ")", "throws", "IOException", "{", "DirectoryEntry", "dir", "=", "(", "DirectoryEntry", ")", "m_viewDir", ".", "getEntry", "(", "\"CTable\"", ")", ";", "FixFix", "ff", "=", "new", "FixFix", "(", "126", ",", "new", ...
This method extracts table data from the MPP file. @throws IOException
[ "This", "method", "extracts", "table", "data", "from", "the", "MPP", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP8Reader.java#L1219-L1267
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYAreaChartBuilder.java
DJXYAreaChartBuilder.addSerie
public DJXYAreaChartBuilder addSerie(AbstractColumn column, String label) { """ Adds the specified serie column to the dataset with custom label. @param column the serie column @param label column the custom label """ getDataset().addSerie(column, label); return this; }
java
public DJXYAreaChartBuilder addSerie(AbstractColumn column, String label) { getDataset().addSerie(column, label); return this; }
[ "public", "DJXYAreaChartBuilder", "addSerie", "(", "AbstractColumn", "column", ",", "String", "label", ")", "{", "getDataset", "(", ")", ".", "addSerie", "(", "column", ",", "label", ")", ";", "return", "this", ";", "}" ]
Adds the specified serie column to the dataset with custom label. @param column the serie column @param label column the custom label
[ "Adds", "the", "specified", "serie", "column", "to", "the", "dataset", "with", "custom", "label", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYAreaChartBuilder.java#L374-L377
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseSkipCookiePathQuotes
private void parseSkipCookiePathQuotes(Map<?, ?> props) { """ Check the configuration map for if we should skip adding the quote to the cookie path attribute @ param props """ //738893 - Skip adding the quotes to the cookie path attribute String value = (String) props.get(HttpConfigConstant...
java
private void parseSkipCookiePathQuotes(Map<?, ?> props) { //738893 - Skip adding the quotes to the cookie path attribute String value = (String) props.get(HttpConfigConstants.PROPNAME_SKIP_PATH_QUOTE); if (null != value) { this.skipCookiePathQuotes = convertBoolean(value); ...
[ "private", "void", "parseSkipCookiePathQuotes", "(", "Map", "<", "?", ",", "?", ">", "props", ")", "{", "//738893 - Skip adding the quotes to the cookie path attribute", "String", "value", "=", "(", "String", ")", "props", ".", "get", "(", "HttpConfigConstants", "."...
Check the configuration map for if we should skip adding the quote to the cookie path attribute @ param props
[ "Check", "the", "configuration", "map", "for", "if", "we", "should", "skip", "adding", "the", "quote", "to", "the", "cookie", "path", "attribute" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1229-L1238
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.allResultsMatch
static boolean allResultsMatch(Node n, Predicate<Node> p) { """ Apply the supplied predicate against all possible result Nodes of the expression. """ switch (n.getToken()) { case CAST: return allResultsMatch(n.getFirstChild(), p); case ASSIGN: case COMMA: return allResult...
java
static boolean allResultsMatch(Node n, Predicate<Node> p) { switch (n.getToken()) { case CAST: return allResultsMatch(n.getFirstChild(), p); case ASSIGN: case COMMA: return allResultsMatch(n.getLastChild(), p); case AND: case OR: return allResultsMatch(n.getFirs...
[ "static", "boolean", "allResultsMatch", "(", "Node", "n", ",", "Predicate", "<", "Node", ">", "p", ")", "{", "switch", "(", "n", ".", "getToken", "(", ")", ")", "{", "case", "CAST", ":", "return", "allResultsMatch", "(", "n", ".", "getFirstChild", "(",...
Apply the supplied predicate against all possible result Nodes of the expression.
[ "Apply", "the", "supplied", "predicate", "against", "all", "possible", "result", "Nodes", "of", "the", "expression", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L1798-L1815
podio/podio-java
src/main/java/com/podio/tag/TagAPI.java
TagAPI.removeTag
public void removeTag(Reference reference, String tag) { """ Removes a single tag from an object. @param reference The object the tag should be removed from @param tag The tag to remove """ getResourceFactory() .getApiResource("/tag/" + reference.toURLFragment()) .queryParam("text", tag).delete...
java
public void removeTag(Reference reference, String tag) { getResourceFactory() .getApiResource("/tag/" + reference.toURLFragment()) .queryParam("text", tag).delete(); }
[ "public", "void", "removeTag", "(", "Reference", "reference", ",", "String", "tag", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/tag/\"", "+", "reference", ".", "toURLFragment", "(", ")", ")", ".", "queryParam", "(", "\"text\"", ...
Removes a single tag from an object. @param reference The object the tag should be removed from @param tag The tag to remove
[ "Removes", "a", "single", "tag", "from", "an", "object", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/tag/TagAPI.java#L91-L95
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createMockAndExpectNew
public static synchronized <T> T createMockAndExpectNew(Class<T> type, Object... arguments) throws Exception { """ Convenience method for createMock followed by expectNew. @param type The class that should be mocked. @param arguments The constructor arguments. @return A mock object of the same type as th...
java
public static synchronized <T> T createMockAndExpectNew(Class<T> type, Object... arguments) throws Exception { T mock = createMock(type); expectNew(type, arguments).andReturn(mock); return mock; }
[ "public", "static", "synchronized", "<", "T", ">", "T", "createMockAndExpectNew", "(", "Class", "<", "T", ">", "type", ",", "Object", "...", "arguments", ")", "throws", "Exception", "{", "T", "mock", "=", "createMock", "(", "type", ")", ";", "expectNew", ...
Convenience method for createMock followed by expectNew. @param type The class that should be mocked. @param arguments The constructor arguments. @return A mock object of the same type as the mock. @throws Exception
[ "Convenience", "method", "for", "createMock", "followed", "by", "expectNew", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1504-L1508
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java
AddResourceMojo.buildAddOperation
private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) { """ Creates the operation to add a resource. @param address the address of the operation to add. @param properties the properties to set for the resource. @return the operation. """ final Mode...
java
private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) { final ModelNode op = ServerOperations.createAddOperation(address); for (Map.Entry<String, String> prop : properties.entrySet()) { final String[] props = prop.getKey().split(","); ...
[ "private", "ModelNode", "buildAddOperation", "(", "final", "ModelNode", "address", ",", "final", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "final", "ModelNode", "op", "=", "ServerOperations", ".", "createAddOperation", "(", "address", ")"...
Creates the operation to add a resource. @param address the address of the operation to add. @param properties the properties to set for the resource. @return the operation.
[ "Creates", "the", "operation", "to", "add", "a", "resource", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L215-L234
uber/AutoDispose
lifecycle/autodispose-lifecycle/src/main/java/com/uber/autodispose/lifecycle/LifecycleScopes.java
LifecycleScopes.resolveScopeFromLifecycle
public static <E> CompletableSource resolveScopeFromLifecycle( final LifecycleScopeProvider<E> provider) throws OutsideScopeException { """ Overload for resolving lifecycle providers that defaults to checking start and end boundaries of lifecycles. That is, they will ensure that the lifecycle has both start...
java
public static <E> CompletableSource resolveScopeFromLifecycle( final LifecycleScopeProvider<E> provider) throws OutsideScopeException { return resolveScopeFromLifecycle(provider, true); }
[ "public", "static", "<", "E", ">", "CompletableSource", "resolveScopeFromLifecycle", "(", "final", "LifecycleScopeProvider", "<", "E", ">", "provider", ")", "throws", "OutsideScopeException", "{", "return", "resolveScopeFromLifecycle", "(", "provider", ",", "true", ")...
Overload for resolving lifecycle providers that defaults to checking start and end boundaries of lifecycles. That is, they will ensure that the lifecycle has both started and not ended. <p><em>Note:</em> This resolves the scope immediately, so consider deferring execution as needed, such as using {@link Completable#de...
[ "Overload", "for", "resolving", "lifecycle", "providers", "that", "defaults", "to", "checking", "start", "and", "end", "boundaries", "of", "lifecycles", ".", "That", "is", "they", "will", "ensure", "that", "the", "lifecycle", "has", "both", "started", "and", "...
train
https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/lifecycle/autodispose-lifecycle/src/main/java/com/uber/autodispose/lifecycle/LifecycleScopes.java#L54-L57
btrplace/scheduler
api/src/main/java/org/btrplace/plan/ReconfigurationPlanChecker.java
ReconfigurationPlanChecker.checkModel
private void checkModel(Model mo, boolean start) throws SatConstraintViolationException { """ Check for the validity of a model. @param mo the model to check @param start {@code true} iff the model corresponds to the origin model. Otherwise it is considered to be the resulting model @throws SatConstraintV...
java
private void checkModel(Model mo, boolean start) throws SatConstraintViolationException { for (SatConstraintChecker<?> c : checkers) { if (start && !c.startsWith(mo)) { SatConstraint cs = c.getConstraint(); if (cs != null) { throw new DiscreteViola...
[ "private", "void", "checkModel", "(", "Model", "mo", ",", "boolean", "start", ")", "throws", "SatConstraintViolationException", "{", "for", "(", "SatConstraintChecker", "<", "?", ">", "c", ":", "checkers", ")", "{", "if", "(", "start", "&&", "!", "c", ".",...
Check for the validity of a model. @param mo the model to check @param start {@code true} iff the model corresponds to the origin model. Otherwise it is considered to be the resulting model @throws SatConstraintViolationException if at least one constraint is violated.
[ "Check", "for", "the", "validity", "of", "a", "model", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/plan/ReconfigurationPlanChecker.java#L339-L353
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyleWrapper.java
SeaGlassStyleWrapper.installDefaults
public void installDefaults(SeaGlassContext context, SeaglassUI ui) { """ Re-implements SynthStyle.installDefaults(SynthContext, SynthUI) because it's package local. @param context the context. @param ui the UI delegate. """ // Special case the Border as this will likely change when the LAF ...
java
public void installDefaults(SeaGlassContext context, SeaglassUI ui) { // Special case the Border as this will likely change when the LAF // can have more control over this. if (!context.isSubregion()) { JComponent c = context.getComponent(); Border border = c.get...
[ "public", "void", "installDefaults", "(", "SeaGlassContext", "context", ",", "SeaglassUI", "ui", ")", "{", "// Special case the Border as this will likely change when the LAF", "// can have more control over this.", "if", "(", "!", "context", ".", "isSubregion", "(", ")", "...
Re-implements SynthStyle.installDefaults(SynthContext, SynthUI) because it's package local. @param context the context. @param ui the UI delegate.
[ "Re", "-", "implements", "SynthStyle", ".", "installDefaults", "(", "SynthContext", "SynthUI", ")", "because", "it", "s", "package", "local", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyleWrapper.java#L99-L112
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java
Logging.error
public void error(CharSequence message, Throwable e) { """ Log a message at the 'severe' level. @param message Warning log message. @param e Exception """ log(Level.SEVERE, message, e); }
java
public void error(CharSequence message, Throwable e) { log(Level.SEVERE, message, e); }
[ "public", "void", "error", "(", "CharSequence", "message", ",", "Throwable", "e", ")", "{", "log", "(", "Level", ".", "SEVERE", ",", "message", ",", "e", ")", ";", "}" ]
Log a message at the 'severe' level. @param message Warning log message. @param e Exception
[ "Log", "a", "message", "at", "the", "severe", "level", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java#L290-L292
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PacketCapturesInner.java
PacketCapturesInner.getStatus
public PacketCaptureQueryStatusResultInner getStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { """ Query the status of a running packet capture session. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the Network Watcher reso...
java
public PacketCaptureQueryStatusResultInner getStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { return getStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().last().body(); }
[ "public", "PacketCaptureQueryStatusResultInner", "getStatus", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "packetCaptureName", ")", "{", "return", "getStatusWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkWatcherName...
Query the status of a running packet capture session. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the Network Watcher resource. @param packetCaptureName The name given to the packet capture session. @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Query", "the", "status", "of", "a", "running", "packet", "capture", "session", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PacketCapturesInner.java#L717-L719
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/PippoSettings.java
PippoSettings.loadIncludes
private Properties loadIncludes(File baseDir, Properties properties) throws IOException { """ Recursively read "include" properties files. <p> "Include" properties are the base properties which are overwritten by the provided properties. </p> @param baseDir @param properties @return the merged properties ...
java
private Properties loadIncludes(File baseDir, Properties properties) throws IOException { return loadProperties(baseDir, properties, "include", false); }
[ "private", "Properties", "loadIncludes", "(", "File", "baseDir", ",", "Properties", "properties", ")", "throws", "IOException", "{", "return", "loadProperties", "(", "baseDir", ",", "properties", ",", "\"include\"", ",", "false", ")", ";", "}" ]
Recursively read "include" properties files. <p> "Include" properties are the base properties which are overwritten by the provided properties. </p> @param baseDir @param properties @return the merged properties @throws IOException
[ "Recursively", "read", "include", "properties", "files", ".", "<p", ">", "Include", "properties", "are", "the", "base", "properties", "which", "are", "overwritten", "by", "the", "provided", "properties", ".", "<", "/", "p", ">" ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/PippoSettings.java#L272-L274
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.createRowElementLinkedLists
void createRowElementLinkedLists( int leftmost[] , int w[]) { """ Constructs a linked list in w that specifies which elements in each row are not zero (nz) @param leftmost index first elements in each row @param w work space array """ for (int k = 0; k < n; k++) { w[head+k] = -1; w[tail+k...
java
void createRowElementLinkedLists( int leftmost[] , int w[]) { for (int k = 0; k < n; k++) { w[head+k] = -1; w[tail+k] = -1; w[nque+k] = 0; } // scan rows in reverse order creating a linked list of nz element indexes in each row for (int i = m-1; i >= 0; i--) { i...
[ "void", "createRowElementLinkedLists", "(", "int", "leftmost", "[", "]", ",", "int", "w", "[", "]", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "n", ";", "k", "++", ")", "{", "w", "[", "head", "+", "k", "]", "=", "-", "1", ";...
Constructs a linked list in w that specifies which elements in each row are not zero (nz) @param leftmost index first elements in each row @param w work space array
[ "Constructs", "a", "linked", "list", "in", "w", "that", "specifies", "which", "elements", "in", "each", "row", "are", "not", "zero", "(", "nz", ")" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L179-L194
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/ItemUtils.java
ItemUtils.areItemStacksStackable
public static boolean areItemStacksStackable(ItemStack stack1, ItemStack stack2) { """ Checks whether two {@link ItemStack itemStacks} can be stacked together @param stack1 first itemStack @param stack2 second itemStack @return true, if the itemStack can be stacked, false otherwise """ return !(stack1.i...
java
public static boolean areItemStacksStackable(ItemStack stack1, ItemStack stack2) { return !(stack1.isEmpty() || stack2.isEmpty()) && stack1.isStackable() && stack1.getItem() == stack2.getItem() && (!stack2.getHasSubtypes() || stack2.getMetadata() == stack1.getMetadata()) && ItemStack.areItemStackTagsEqual(st...
[ "public", "static", "boolean", "areItemStacksStackable", "(", "ItemStack", "stack1", ",", "ItemStack", "stack2", ")", "{", "return", "!", "(", "stack1", ".", "isEmpty", "(", ")", "||", "stack2", ".", "isEmpty", "(", ")", ")", "&&", "stack1", ".", "isStacka...
Checks whether two {@link ItemStack itemStacks} can be stacked together @param stack1 first itemStack @param stack2 second itemStack @return true, if the itemStack can be stacked, false otherwise
[ "Checks", "whether", "two", "{", "@link", "ItemStack", "itemStacks", "}", "can", "be", "stacked", "together" ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/ItemUtils.java#L232-L238
liferay/com-liferay-commerce
commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionPersistenceImpl.java
CommerceShippingFixedOptionPersistenceImpl.findAll
@Override public List<CommerceShippingFixedOption> findAll() { """ Returns all the commerce shipping fixed options. @return the commerce shipping fixed options """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceShippingFixedOption> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceShippingFixedOption", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce shipping fixed options. @return the commerce shipping fixed options
[ "Returns", "all", "the", "commerce", "shipping", "fixed", "options", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionPersistenceImpl.java#L1146-L1149
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
StylesheetHandler.startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws org.xml.sax.SAXException { """ Receive notification of the start of a Namespace mapping. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such...
java
public void startPrefixMapping(String prefix, String uri) throws org.xml.sax.SAXException { // m_nsSupport.pushContext(); // this.getNamespaceSupport().declarePrefix(prefix, uri); //m_prefixMappings.add(prefix); // JDK 1.2+ only -sc //m_prefixMappings.add(uri); // JDK 1.2+ only -sc m_pr...
[ "public", "void", "startPrefixMapping", "(", "String", "prefix", ",", "String", "uri", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "// m_nsSupport.pushContext();", "// this.getNamespaceSupport().declarePrefix(prefix, uri);", "//m_prefixMappings.a...
Receive notification of the start of a Namespace mapping. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).</p> @param prefix The Namespace prefix being declared...
[ "Receive", "notification", "of", "the", "start", "of", "a", "Namespace", "mapping", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java#L515-L525
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/locking/AbstractTxLockingInterceptor.java
AbstractTxLockingInterceptor.lockAllOrRegisterBackupLock
final KeyAwareLockPromise lockAllOrRegisterBackupLock(TxInvocationContext<?> ctx, Collection<?> keys, long lockTimeout) throws InterruptedException { """ Same as {@link #lockOrRegisterBackupLock(TxInvocationContext, Object, long)} @return a colle...
java
final KeyAwareLockPromise lockAllOrRegisterBackupLock(TxInvocationContext<?> ctx, Collection<?> keys, long lockTimeout) throws InterruptedException { if (keys.isEmpty()) { return KeyAwareLockPromise.NO_OP; } final Log log = ge...
[ "final", "KeyAwareLockPromise", "lockAllOrRegisterBackupLock", "(", "TxInvocationContext", "<", "?", ">", "ctx", ",", "Collection", "<", "?", ">", "keys", ",", "long", "lockTimeout", ")", "throws", "InterruptedException", "{", "if", "(", "keys", ".", "isEmpty", ...
Same as {@link #lockOrRegisterBackupLock(TxInvocationContext, Object, long)} @return a collection with the keys locked.
[ "Same", "as", "{", "@link", "#lockOrRegisterBackupLock", "(", "TxInvocationContext", "Object", "long", ")", "}" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/locking/AbstractTxLockingInterceptor.java#L89-L123
TNG/ArchUnit
archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java
JavaClass.getCodeUnitWithParameterTypeNames
@PublicAPI(usage = ACCESS) public JavaCodeUnit getCodeUnitWithParameterTypeNames(String name, String... parameters) { """ Same as {@link #getCodeUnitWithParameterTypes(String, Class[])}, but with parameter signature specified as full class names """ return getCodeUnitWithParameterTypeNames(name, Im...
java
@PublicAPI(usage = ACCESS) public JavaCodeUnit getCodeUnitWithParameterTypeNames(String name, String... parameters) { return getCodeUnitWithParameterTypeNames(name, ImmutableList.copyOf(parameters)); }
[ "@", "PublicAPI", "(", "usage", "=", "ACCESS", ")", "public", "JavaCodeUnit", "getCodeUnitWithParameterTypeNames", "(", "String", "name", ",", "String", "...", "parameters", ")", "{", "return", "getCodeUnitWithParameterTypeNames", "(", "name", ",", "ImmutableList", ...
Same as {@link #getCodeUnitWithParameterTypes(String, Class[])}, but with parameter signature specified as full class names
[ "Same", "as", "{" ]
train
https://github.com/TNG/ArchUnit/blob/024c5d2502e91de6cb586b86c7084dbd12f3ef37/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java#L417-L420
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(int integer, int fractionNumerator, int fractionDenominator) { """ Creates a rational number of the specified integer and fraction parts. <p>Useful to create numbers like 3 1/2 (= three and a half = 3.5) by calling <code>BigRational.valueOf(3, 1, 2)</code>.</p> <p>To create a...
java
public static BigRational valueOf(int integer, int fractionNumerator, int fractionDenominator) { if (fractionNumerator < 0 || fractionDenominator < 0) { throw new ArithmeticException("Negative value"); } BigRational integerPart = valueOf(integer); BigRational fractionPart = valueOf(fractionNumerator...
[ "public", "static", "BigRational", "valueOf", "(", "int", "integer", ",", "int", "fractionNumerator", ",", "int", "fractionDenominator", ")", "{", "if", "(", "fractionNumerator", "<", "0", "||", "fractionDenominator", "<", "0", ")", "{", "throw", "new", "Arith...
Creates a rational number of the specified integer and fraction parts. <p>Useful to create numbers like 3 1/2 (= three and a half = 3.5) by calling <code>BigRational.valueOf(3, 1, 2)</code>.</p> <p>To create a negative rational only the integer part argument is allowed to be negative: to create -3 1/2 (= minus three a...
[ "Creates", "a", "rational", "number", "of", "the", "specified", "integer", "and", "fraction", "parts", "." ]
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L844-L852
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getDocLink
public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element, CharSequence label, boolean strong) { """ Return the link for the given member. @param context the id of the context where the link will be printed. @param typeElement the typeElement that we should link ...
java
public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element, CharSequence label, boolean strong) { return getDocLink(context, typeElement, element, label, strong, false); }
[ "public", "Content", "getDocLink", "(", "LinkInfoImpl", ".", "Kind", "context", ",", "TypeElement", "typeElement", ",", "Element", "element", ",", "CharSequence", "label", ",", "boolean", "strong", ")", "{", "return", "getDocLink", "(", "context", ",", "typeElem...
Return the link for the given member. @param context the id of the context where the link will be printed. @param typeElement the typeElement that we should link to. This is not necessarily equal to element.containingClass(). We may be inheriting comments. @param element the member being linked to. @param label the ...
[ "Return", "the", "link", "for", "the", "given", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1382-L1385
Jasig/uPortal
uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java
PersonDirectoryConfiguration.getUPortalJdbcUserSource
@Bean(name = "uPortalJdbcUserSource") @Qualifier("uPortalInternal") public IPersonAttributeDao getUPortalJdbcUserSource() { """ Looks in the base UP_USER table, doesn't find attributes but will ensure a result if it the user exists in the portal database and is searched for by username, results are cached...
java
@Bean(name = "uPortalJdbcUserSource") @Qualifier("uPortalInternal") public IPersonAttributeDao getUPortalJdbcUserSource() { final String sql = "SELECT USER_NAME FROM UP_USER WHERE {0}"; final SingleRowJdbcPersonAttributeDao rslt = new SingleRowJdbcPersonAttributeDao(personDb, sql...
[ "@", "Bean", "(", "name", "=", "\"uPortalJdbcUserSource\"", ")", "@", "Qualifier", "(", "\"uPortalInternal\"", ")", "public", "IPersonAttributeDao", "getUPortalJdbcUserSource", "(", ")", "{", "final", "String", "sql", "=", "\"SELECT USER_NAME FROM UP_USER WHERE {0}\"", ...
Looks in the base UP_USER table, doesn't find attributes but will ensure a result if it the user exists in the portal database and is searched for by username, results are cached by the outer caching DAO.
[ "Looks", "in", "the", "base", "UP_USER", "table", "doesn", "t", "find", "attributes", "but", "will", "ensure", "a", "result", "if", "it", "the", "user", "exists", "in", "the", "portal", "database", "and", "is", "searched", "for", "by", "username", "results...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java#L322-L338
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/util/Utils.java
Utils.getFormattedDateTime
static public String getFormattedDateTime(long dt, TimeZone tz, String format) { """ Returns the given date time formatted using the given format and timezone. @param dt The date to format (in milliseconds) @param tz The timezone for the date (or null) @param format The format to use for the date @return The f...
java
static public String getFormattedDateTime(long dt, TimeZone tz, String format) { SimpleDateFormat df = new SimpleDateFormat(format); if(tz != null) df.setTimeZone(tz); return df.format(new Date(dt)); }
[ "static", "public", "String", "getFormattedDateTime", "(", "long", "dt", ",", "TimeZone", "tz", ",", "String", "format", ")", "{", "SimpleDateFormat", "df", "=", "new", "SimpleDateFormat", "(", "format", ")", ";", "if", "(", "tz", "!=", "null", ")", "df", ...
Returns the given date time formatted using the given format and timezone. @param dt The date to format (in milliseconds) @param tz The timezone for the date (or null) @param format The format to use for the date @return The formatted date
[ "Returns", "the", "given", "date", "time", "formatted", "using", "the", "given", "format", "and", "timezone", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/util/Utils.java#L59-L65
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockResponse.java
MockResponse.setHeader
@Override public void setHeader(final String name, final String value) { """ Sets a header. @param name the header name. @param value the header value. """ LOG.debug("Setting header, " + name + '=' + value); headers.put(name, value); }
java
@Override public void setHeader(final String name, final String value) { LOG.debug("Setting header, " + name + '=' + value); headers.put(name, value); }
[ "@", "Override", "public", "void", "setHeader", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "LOG", ".", "debug", "(", "\"Setting header, \"", "+", "name", "+", "'", "'", "+", "value", ")", ";", "headers", ".", "put", "(",...
Sets a header. @param name the header name. @param value the header value.
[ "Sets", "a", "header", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockResponse.java#L107-L111
google/error-prone
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
ASTHelpers.hasAnnotation
public static boolean hasAnnotation(Symbol sym, String annotationClass, VisitorState state) { """ Determines whether a symbol has an annotation of the given type. This includes annotations inherited from superclasses due to {@code @Inherited}. @param annotationClass the binary class name of the annotation (e.g...
java
public static boolean hasAnnotation(Symbol sym, String annotationClass, VisitorState state) { if (sym == null) { return false; } // normalize to non-binary names annotationClass = annotationClass.replace('$', '.'); Name annotationName = state.getName(annotationClass); if (hasAttribute(sym,...
[ "public", "static", "boolean", "hasAnnotation", "(", "Symbol", "sym", ",", "String", "annotationClass", ",", "VisitorState", "state", ")", "{", "if", "(", "sym", "==", "null", ")", "{", "return", "false", ";", "}", "// normalize to non-binary names", "annotation...
Determines whether a symbol has an annotation of the given type. This includes annotations inherited from superclasses due to {@code @Inherited}. @param annotationClass the binary class name of the annotation (e.g. "javax.annotation.Nullable", or "some.package.OuterClassName$InnerClassName") @return true if the symbol...
[ "Determines", "whether", "a", "symbol", "has", "an", "annotation", "of", "the", "given", "type", ".", "This", "includes", "annotations", "inherited", "from", "superclasses", "due", "to", "{", "@code", "@Inherited", "}", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L659-L678
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Strings.java
Strings.splitToInt
public static Integer[] splitToInt(final String ids) { """ <p> splitToInt. </p> @param ids a {@link java.lang.String} object. @return an array of {@link java.lang.Integer} objects. """ if (isEmpty(ids)) return new Integer[0]; else return transformToInt(split(ids, ',')); }
java
public static Integer[] splitToInt(final String ids) { if (isEmpty(ids)) return new Integer[0]; else return transformToInt(split(ids, ',')); }
[ "public", "static", "Integer", "[", "]", "splitToInt", "(", "final", "String", "ids", ")", "{", "if", "(", "isEmpty", "(", "ids", ")", ")", "return", "new", "Integer", "[", "0", "]", ";", "else", "return", "transformToInt", "(", "split", "(", "ids", ...
<p> splitToInt. </p> @param ids a {@link java.lang.String} object. @return an array of {@link java.lang.Integer} objects.
[ "<p", ">", "splitToInt", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L940-L943
jimmoores/quandl4j
core/src/main/java/com/jimmoores/quandl/QuandlCodeRequest.java
QuandlCodeRequest.singleColumn
public static QuandlCodeRequest singleColumn(final String quandlCode, final int columnNumber) { """ Request just a single column for a given quandlCode. @param quandlCode the Quandl code you're interested in, not null @param columnNumber the column number (determined by meta-data or a single request) of the da...
java
public static QuandlCodeRequest singleColumn(final String quandlCode, final int columnNumber) { ArgumentChecker.notNull(quandlCode, "quandlCode"); return new QuandlCodeRequest(quandlCode, columnNumber); }
[ "public", "static", "QuandlCodeRequest", "singleColumn", "(", "final", "String", "quandlCode", ",", "final", "int", "columnNumber", ")", "{", "ArgumentChecker", ".", "notNull", "(", "quandlCode", ",", "\"quandlCode\"", ")", ";", "return", "new", "QuandlCodeRequest",...
Request just a single column for a given quandlCode. @param quandlCode the Quandl code you're interested in, not null @param columnNumber the column number (determined by meta-data or a single request) of the data you want, not null @return an request instance, not null
[ "Request", "just", "a", "single", "column", "for", "a", "given", "quandlCode", "." ]
train
https://github.com/jimmoores/quandl4j/blob/5d67ae60279d889da93ae7aa3bf6b7d536f88822/core/src/main/java/com/jimmoores/quandl/QuandlCodeRequest.java#L25-L28
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.verifyAsync
public ServiceFuture<KeyVerifyResult> verifyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature, final ServiceCallback<KeyVerifyResult> serviceCallback) { """ Verifies a signature using a specified key. The VERIFY operation is appli...
java
public ServiceFuture<KeyVerifyResult> verifyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature, final ServiceCallback<KeyVerifyResult> serviceCallback) { return ServiceFuture.fromResponse(verifyWithServiceResponseAsync(vaultBaseU...
[ "public", "ServiceFuture", "<", "KeyVerifyResult", ">", "verifyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ",", "JsonWebKeySignatureAlgorithm", "algorithm", ",", "byte", "[", "]", "digest", ",", "byte", "[", "]", ...
Verifies a signature using a specified key. The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the public portion of the key but this operation is supported as ...
[ "Verifies", "a", "signature", "using", "a", "specified", "key", ".", "The", "VERIFY", "operation", "is", "applicable", "to", "symmetric", "keys", "stored", "in", "Azure", "Key", "Vault", ".", "VERIFY", "is", "not", "strictly", "necessary", "for", "asymmetric",...
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#L2501-L2503
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java
MockServletPool.registerServlet
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName, @Nullable final Map <String, String> aServletInitP...
java
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName, @Nullable final Map <String, String> aServletInitP...
[ "public", "void", "registerServlet", "(", "@", "Nonnull", "final", "Class", "<", "?", "extends", "Servlet", ">", "aServletClass", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sServletPath", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", ...
Register a new servlet @param aServletClass The class of the servlet to be registered. May not be <code>null</code>. @param sServletPath The path where the servlet should listen to requests. May neither be <code>null</code> nor empty. @param sServletName The name of the servlet. May neither be <code>null</code> nor em...
[ "Register", "a", "new", "servlet" ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java#L161-L206
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/ReflectUtil.java
ReflectUtil.getFieldVal
public static Object getFieldVal(Object obj, String fieldName) { """ 获取指定类字段属性值 <p>Function: getFieldVal</p> <p>Description: 取消安全访问限制,如果当前类不存在,则获取父类属性值 发生异常则返回NULL</p> @param obj @param fieldName @return @author acexy@thankjava.com @date 2014-12-16 上午11:28:20 @version 1.0 """ Field field; ...
java
public static Object getFieldVal(Object obj, String fieldName) { Field field; if (obj == null) { return null; } try { field = getField(obj.getClass(), fieldName); field.setAccessible(true);//取消安全机制限制 return field.get(obj); } catch (...
[ "public", "static", "Object", "getFieldVal", "(", "Object", "obj", ",", "String", "fieldName", ")", "{", "Field", "field", ";", "if", "(", "obj", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "field", "=", "getField", "(", "obj", "....
获取指定类字段属性值 <p>Function: getFieldVal</p> <p>Description: 取消安全访问限制,如果当前类不存在,则获取父类属性值 发生异常则返回NULL</p> @param obj @param fieldName @return @author acexy@thankjava.com @date 2014-12-16 上午11:28:20 @version 1.0
[ "获取指定类字段属性值", "<p", ">", "Function", ":", "getFieldVal<", "/", "p", ">", "<p", ">", "Description", ":", "取消安全访问限制,如果当前类不存在,则获取父类属性值", "发生异常则返回NULL<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/reflect/ReflectUtil.java#L135-L154
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_line_serviceName_click2CallUser_id_GET
public OvhClick2CallUser billingAccount_line_serviceName_click2CallUser_id_GET(String billingAccount, String serviceName, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id} @param billingAccount [required] The name of your b...
java
public OvhClick2CallUser billingAccount_line_serviceName_click2CallUser_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); String resp ...
[ "public", "OvhClick2CallUser", "billingAccount_line_serviceName_click2CallUser_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/line/{serviceName}...
Get this object properties REST: GET /telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required] Id of the object
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L887-L892
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownNtoN_F32.java
AddBrownNtoN_F32.setDistortion
public AddBrownNtoN_F32 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { """ Specify intrinsic camera parameters @param radial Radial distortion parameters """ params = new RadialTangential_F32(radial,t1,t2); return this; }
java
public AddBrownNtoN_F32 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { params = new RadialTangential_F32(radial,t1,t2); return this; }
[ "public", "AddBrownNtoN_F32", "setDistortion", "(", "/**/", "double", "[", "]", "radial", ",", "/**/", "double", "t1", ",", "/**/", "double", "t2", ")", "{", "params", "=", "new", "RadialTangential_F32", "(", "radial", ",", "t1", ",", "t2", ")", ";", "re...
Specify intrinsic camera parameters @param radial Radial distortion parameters
[ "Specify", "intrinsic", "camera", "parameters" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownNtoN_F32.java#L41-L44
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setBigDecimal
@Override public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { """ Sets the designated parameter to the given java.math.BigDecimal value. """ checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_DECIMAL : x; }
java
@Override public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_DECIMAL : x; }
[ "@", "Override", "public", "void", "setBigDecimal", "(", "int", "parameterIndex", ",", "BigDecimal", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]"...
Sets the designated parameter to the given java.math.BigDecimal value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "math", ".", "BigDecimal", "value", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L190-L195
apache/incubator-druid
server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java
SegmentLoaderLocalCacheManager.loadSegmentWithRetry
private StorageLocation loadSegmentWithRetry(DataSegment segment, String storageDirStr) throws SegmentLoadingException { """ location may fail because of IO failure, most likely in two cases:<p> 1. druid don't have the write access to this location, most likely the administrator doesn't config it correctly<p> 2....
java
private StorageLocation loadSegmentWithRetry(DataSegment segment, String storageDirStr) throws SegmentLoadingException { for (StorageLocation loc : locations) { if (loc.canHandle(segment)) { File storageDir = new File(loc.getPath(), storageDirStr); try { loadInLocationWithStartMar...
[ "private", "StorageLocation", "loadSegmentWithRetry", "(", "DataSegment", "segment", ",", "String", "storageDirStr", ")", "throws", "SegmentLoadingException", "{", "for", "(", "StorageLocation", "loc", ":", "locations", ")", "{", "if", "(", "loc", ".", "canHandle", ...
location may fail because of IO failure, most likely in two cases:<p> 1. druid don't have the write access to this location, most likely the administrator doesn't config it correctly<p> 2. disk failure, druid can't read/write to this disk anymore
[ "location", "may", "fail", "because", "of", "IO", "failure", "most", "likely", "in", "two", "cases", ":", "<p", ">", "1", ".", "druid", "don", "t", "have", "the", "write", "access", "to", "this", "location", "most", "likely", "the", "administrator", "doe...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java#L180-L204
craftercms/deployer
src/main/java/org/craftercms/deployer/utils/ConfigUtils.java
ConfigUtils.loadYamlConfiguration
public static YamlConfiguration loadYamlConfiguration(File file) throws DeployerConfigurationException { """ Loads the specified file as {@link YamlConfiguration}. @param file the YAML configuration file to load @return the YAML configuration @throws DeployerConfigurationException if an error occurred """...
java
public static YamlConfiguration loadYamlConfiguration(File file) throws DeployerConfigurationException { try { try (Reader reader = new BufferedReader(new FileReader(file))) { return doLoadYamlConfiguration(reader); } } catch (Exception e) { throw new ...
[ "public", "static", "YamlConfiguration", "loadYamlConfiguration", "(", "File", "file", ")", "throws", "DeployerConfigurationException", "{", "try", "{", "try", "(", "Reader", "reader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "file", ")", ")", ...
Loads the specified file as {@link YamlConfiguration}. @param file the YAML configuration file to load @return the YAML configuration @throws DeployerConfigurationException if an error occurred
[ "Loads", "the", "specified", "file", "as", "{", "@link", "YamlConfiguration", "}", "." ]
train
https://github.com/craftercms/deployer/blob/3ed446e3cc8af1055de2de6f871907f90ef27f63/src/main/java/org/craftercms/deployer/utils/ConfigUtils.java#L55-L63
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/VectorPackingPropagator.java
VectorPackingPropagator.filterLoadInf
protected boolean filterLoadInf(int dim, int bin, int newLoadInf) throws ContradictionException { """ update the inf(binLoad) and sumLoadInf accordingly @param dim the dimension @param bin the bin @param newLoadInf the new lower bound value @return if the lower bound has actually been updated ...
java
protected boolean filterLoadInf(int dim, int bin, int newLoadInf) throws ContradictionException { int delta = newLoadInf - loads[dim][bin].getLB(); if (delta <= 0) return false; loads[dim][bin].updateLowerBound(newLoadInf, this); if (sumISizes[dim] < sumLoadInf[dim].add(...
[ "protected", "boolean", "filterLoadInf", "(", "int", "dim", ",", "int", "bin", ",", "int", "newLoadInf", ")", "throws", "ContradictionException", "{", "int", "delta", "=", "newLoadInf", "-", "loads", "[", "dim", "]", "[", "bin", "]", ".", "getLB", "(", "...
update the inf(binLoad) and sumLoadInf accordingly @param dim the dimension @param bin the bin @param newLoadInf the new lower bound value @return if the lower bound has actually been updated @throws ContradictionException if the domain of the bin load variable becomes empty
[ "update", "the", "inf", "(", "binLoad", ")", "and", "sumLoadInf", "accordingly" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/VectorPackingPropagator.java#L267-L275
wildfly/wildfly-core
request-controller/src/main/java/org/wildfly/extension/requestcontroller/RequestController.java
RequestController.pauseDeployment
public synchronized void pauseDeployment(final String deployment, ServerActivityCallback listener) { """ Pauses a given deployment @param deployment The deployment to pause @param listener The listener that will be notified when the pause is complete """ final List<ControlPoint> eps = new ArrayList...
java
public synchronized void pauseDeployment(final String deployment, ServerActivityCallback listener) { final List<ControlPoint> eps = new ArrayList<ControlPoint>(); for (ControlPoint ep : entryPoints.values()) { if (ep.getDeployment().equals(deployment)) { if(!ep.isPaused()) { ...
[ "public", "synchronized", "void", "pauseDeployment", "(", "final", "String", "deployment", ",", "ServerActivityCallback", "listener", ")", "{", "final", "List", "<", "ControlPoint", ">", "eps", "=", "new", "ArrayList", "<", "ControlPoint", ">", "(", ")", ";", ...
Pauses a given deployment @param deployment The deployment to pause @param listener The listener that will be notified when the pause is complete
[ "Pauses", "a", "given", "deployment" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/request-controller/src/main/java/org/wildfly/extension/requestcontroller/RequestController.java#L136-L149
looly/hutool
hutool-aop/src/main/java/cn/hutool/aop/proxy/ProxyFactory.java
ProxyFactory.createProxy
public static <T> T createProxy(T target, Aspect aspect) { """ 根据用户引入Cglib与否自动创建代理对象 @param <T> 切面对象类型 @param target 被代理对象 @param aspect 切面实现 @return 代理对象 """ return create().proxy(target, aspect); }
java
public static <T> T createProxy(T target, Aspect aspect) { return create().proxy(target, aspect); }
[ "public", "static", "<", "T", ">", "T", "createProxy", "(", "T", "target", ",", "Aspect", "aspect", ")", "{", "return", "create", "(", ")", ".", "proxy", "(", "target", ",", "aspect", ")", ";", "}" ]
根据用户引入Cglib与否自动创建代理对象 @param <T> 切面对象类型 @param target 被代理对象 @param aspect 切面实现 @return 代理对象
[ "根据用户引入Cglib与否自动创建代理对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-aop/src/main/java/cn/hutool/aop/proxy/ProxyFactory.java#L44-L46
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/wikipedia/Descriptor.java
Descriptor.setRedirects
public void setRedirects(int i, String v) { """ indexed setter for redirects - sets an indexed value - List of redirects pointing to a Wikipedia page. @generated @param i index in the array to set @param v value to set into the array """ if (Descriptor_Type.featOkTst && ((Descriptor_Type)jcasType).casF...
java
public void setRedirects(int i, String v) { if (Descriptor_Type.featOkTst && ((Descriptor_Type)jcasType).casFeat_redirects == null) jcasType.jcas.throwFeatMissing("redirects", "de.julielab.jules.types.wikipedia.Descriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Descriptor...
[ "public", "void", "setRedirects", "(", "int", "i", ",", "String", "v", ")", "{", "if", "(", "Descriptor_Type", ".", "featOkTst", "&&", "(", "(", "Descriptor_Type", ")", "jcasType", ")", ".", "casFeat_redirects", "==", "null", ")", "jcasType", ".", "jcas", ...
indexed setter for redirects - sets an indexed value - List of redirects pointing to a Wikipedia page. @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "redirects", "-", "sets", "an", "indexed", "value", "-", "List", "of", "redirects", "pointing", "to", "a", "Wikipedia", "page", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/wikipedia/Descriptor.java#L249-L253
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java
ClassPathBuilder.addWorkListItemsForExtDir
private void addWorkListItemsForExtDir(LinkedList<WorkListItem> workList, String extDir) { """ Add worklist items from given extensions directory. @param workList the worklist @param extDir an extensions directory """ File dir = new File(extDir); File[] fileList = dir.listFiles((FileFilte...
java
private void addWorkListItemsForExtDir(LinkedList<WorkListItem> workList, String extDir) { File dir = new File(extDir); File[] fileList = dir.listFiles((FileFilter) pathname -> { String path = pathname.getPath(); boolean isArchive = Archive.isArchiveFileName(path); re...
[ "private", "void", "addWorkListItemsForExtDir", "(", "LinkedList", "<", "WorkListItem", ">", "workList", ",", "String", "extDir", ")", "{", "File", "dir", "=", "new", "File", "(", "extDir", ")", ";", "File", "[", "]", "fileList", "=", "dir", ".", "listFile...
Add worklist items from given extensions directory. @param workList the worklist @param extDir an extensions directory
[ "Add", "worklist", "items", "from", "given", "extensions", "directory", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java#L543-L558
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterface.java
LambdaFunctionalInterface.matchMethod
@Override public Description matchMethod(MethodTree tree, VisitorState state) { """ Identifies methods with parameters that have a generic argument with Int, Long, or Double. If pre-conditions are met, it refactors them to the primitive specializations. <pre>PreConditions: (1): The method declaration has to...
java
@Override public Description matchMethod(MethodTree tree, VisitorState state) { MethodSymbol methodSym = ASTHelpers.getSymbol(tree); // precondition (1) if (!methodSym.getModifiers().contains(Modifier.PRIVATE)) { return Description.NO_MATCH; } ImmutableList<Tree> params = tree.get...
[ "@", "Override", "public", "Description", "matchMethod", "(", "MethodTree", "tree", ",", "VisitorState", "state", ")", "{", "MethodSymbol", "methodSym", "=", "ASTHelpers", ".", "getSymbol", "(", "tree", ")", ";", "// precondition (1)", "if", "(", "!", "methodSym...
Identifies methods with parameters that have a generic argument with Int, Long, or Double. If pre-conditions are met, it refactors them to the primitive specializations. <pre>PreConditions: (1): The method declaration has to be private (to do a safe refactoring) (2): Its parameters have to meet the following condition...
[ "Identifies", "methods", "with", "parameters", "that", "have", "a", "generic", "argument", "with", "Int", "Long", "or", "Double", ".", "If", "pre", "-", "conditions", "are", "met", "it", "refactors", "them", "to", "the", "primitive", "specializations", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterface.java#L145-L185
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/util/XsDateTimeConversionJava7.java
XsDateTimeConversionJava7.getDateFormat
private static DateFormat getDateFormat() { """ Returns a DateFormat for each calling thread, using {@link ThreadLocal}. @return a DateFormat that is safe to use in multi-threaded environments """ if (IS_JAVA7) { SoftReference<DateFormat> softReference = THREAD_LOCAL_DF.get(); if (softReference != n...
java
private static DateFormat getDateFormat() { if (IS_JAVA7) { SoftReference<DateFormat> softReference = THREAD_LOCAL_DF.get(); if (softReference != null) { DateFormat dateFormat = softReference.get(); if (dateFormat != null) { return dateFormat; } } DateFormat result = new SimpleDateFormat(...
[ "private", "static", "DateFormat", "getDateFormat", "(", ")", "{", "if", "(", "IS_JAVA7", ")", "{", "SoftReference", "<", "DateFormat", ">", "softReference", "=", "THREAD_LOCAL_DF", ".", "get", "(", ")", ";", "if", "(", "softReference", "!=", "null", ")", ...
Returns a DateFormat for each calling thread, using {@link ThreadLocal}. @return a DateFormat that is safe to use in multi-threaded environments
[ "Returns", "a", "DateFormat", "for", "each", "calling", "thread", "using", "{", "@link", "ThreadLocal", "}", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/util/XsDateTimeConversionJava7.java#L47-L63
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/io/BufferUtils.java
BufferUtils.toBuffer
public static ByteBuffer toBuffer(byte array[], int offset, int length) { """ Create a new ByteBuffer using the provided byte array. @param array the byte array to use. @param offset the offset within the byte array to use from @param length the length in bytes of the array to use @return ByteBuffer with pr...
java
public static ByteBuffer toBuffer(byte array[], int offset, int length) { if (array == null) return EMPTY_BUFFER; return ByteBuffer.wrap(array, offset, length); }
[ "public", "static", "ByteBuffer", "toBuffer", "(", "byte", "array", "[", "]", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "array", "==", "null", ")", "return", "EMPTY_BUFFER", ";", "return", "ByteBuffer", ".", "wrap", "(", "array", ...
Create a new ByteBuffer using the provided byte array. @param array the byte array to use. @param offset the offset within the byte array to use from @param length the length in bytes of the array to use @return ByteBuffer with provided byte array, in flush mode
[ "Create", "a", "new", "ByteBuffer", "using", "the", "provided", "byte", "array", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/io/BufferUtils.java#L809-L813
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WApplication.java
WApplication.addJsFile
public ApplicationResource addJsFile(final String fileName) { """ Add custom JavaScript held as an internal resource to be used by the application. @param fileName the JavaScript file name @return the application resource in which the resource details are held """ if (Util.empty(fileName)) { throw new...
java
public ApplicationResource addJsFile(final String fileName) { if (Util.empty(fileName)) { throw new IllegalArgumentException("A file name must be provided."); } InternalResource resource = new InternalResource(fileName, fileName); ApplicationResource res = new ApplicationResource(resource); addJsResource(r...
[ "public", "ApplicationResource", "addJsFile", "(", "final", "String", "fileName", ")", "{", "if", "(", "Util", ".", "empty", "(", "fileName", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A file name must be provided.\"", ")", ";", "}", "Int...
Add custom JavaScript held as an internal resource to be used by the application. @param fileName the JavaScript file name @return the application resource in which the resource details are held
[ "Add", "custom", "JavaScript", "held", "as", "an", "internal", "resource", "to", "be", "used", "by", "the", "application", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WApplication.java#L183-L191
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/RoaringArray.java
RoaringArray.appendCopiesUntil
protected void appendCopiesUntil(RoaringArray sourceArray, short stoppingKey) { """ Append copies of the values from another array, from the start @param sourceArray The array to copy from @param stoppingKey any equal or larger key in other array will terminate copying """ int stopKey = Util.toIntUnsig...
java
protected void appendCopiesUntil(RoaringArray sourceArray, short stoppingKey) { int stopKey = Util.toIntUnsigned(stoppingKey); for (int i = 0; i < sourceArray.size; ++i) { if (Util.toIntUnsigned(sourceArray.keys[i]) >= stopKey) { break; } extendArray(1); this.keys[this.size] = so...
[ "protected", "void", "appendCopiesUntil", "(", "RoaringArray", "sourceArray", ",", "short", "stoppingKey", ")", "{", "int", "stopKey", "=", "Util", ".", "toIntUnsigned", "(", "stoppingKey", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "source...
Append copies of the values from another array, from the start @param sourceArray The array to copy from @param stoppingKey any equal or larger key in other array will terminate copying
[ "Append", "copies", "of", "the", "values", "from", "another", "array", "from", "the", "start" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/RoaringArray.java#L175-L186
facebook/fresco
imagepipeline/src/main/java/com/facebook/imagepipeline/memory/MemoryChunkUtil.java
MemoryChunkUtil.adjustByteCount
static int adjustByteCount(final int offset, final int count, final int memorySize) { """ Computes number of bytes that can be safely read/written starting at given offset, but no more than count. """ final int available = Math.max(0, memorySize - offset); return Math.min(available, count); }
java
static int adjustByteCount(final int offset, final int count, final int memorySize) { final int available = Math.max(0, memorySize - offset); return Math.min(available, count); }
[ "static", "int", "adjustByteCount", "(", "final", "int", "offset", ",", "final", "int", "count", ",", "final", "int", "memorySize", ")", "{", "final", "int", "available", "=", "Math", ".", "max", "(", "0", ",", "memorySize", "-", "offset", ")", ";", "r...
Computes number of bytes that can be safely read/written starting at given offset, but no more than count.
[ "Computes", "number", "of", "bytes", "that", "can", "be", "safely", "read", "/", "written", "starting", "at", "given", "offset", "but", "no", "more", "than", "count", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline/src/main/java/com/facebook/imagepipeline/memory/MemoryChunkUtil.java#L17-L20
undertow-io/undertow
core/src/main/java/io/undertow/Handlers.java
Handlers.proxyHandler
public static ProxyHandler proxyHandler(ProxyClient proxyClient, HttpHandler next) { """ Returns a handler that can act as a load balancing reverse proxy. @param proxyClient The proxy client to use to connect to the remote server @param next The next handler to invoke if the proxy client does not know how to p...
java
public static ProxyHandler proxyHandler(ProxyClient proxyClient, HttpHandler next) { return ProxyHandler.builder().setProxyClient(proxyClient).setNext(next).build(); }
[ "public", "static", "ProxyHandler", "proxyHandler", "(", "ProxyClient", "proxyClient", ",", "HttpHandler", "next", ")", "{", "return", "ProxyHandler", ".", "builder", "(", ")", ".", "setProxyClient", "(", "proxyClient", ")", ".", "setNext", "(", "next", ")", "...
Returns a handler that can act as a load balancing reverse proxy. @param proxyClient The proxy client to use to connect to the remote server @param next The next handler to invoke if the proxy client does not know how to proxy the request @return The proxy handler
[ "Returns", "a", "handler", "that", "can", "act", "as", "a", "load", "balancing", "reverse", "proxy", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/Handlers.java#L498-L500
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/math/interpolation/splines/ControlCurve.java
ControlCurve.selectPoint
public int selectPoint( double x, double y ) { """ return index of control point near to (x,y) or -1 if nothing near """ double mind = Double.POSITIVE_INFINITY; selection = -1; for( int i = 0; i < pts.size(); i++ ) { Coordinate coordinate = pts.get(i); double d ...
java
public int selectPoint( double x, double y ) { double mind = Double.POSITIVE_INFINITY; selection = -1; for( int i = 0; i < pts.size(); i++ ) { Coordinate coordinate = pts.get(i); double d = sqr(coordinate.x - x) + sqr(coordinate.y - y); if (d < mind && d < EP...
[ "public", "int", "selectPoint", "(", "double", "x", ",", "double", "y", ")", "{", "double", "mind", "=", "Double", ".", "POSITIVE_INFINITY", ";", "selection", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pts", ".", "size", ...
return index of control point near to (x,y) or -1 if nothing near
[ "return", "index", "of", "control", "point", "near", "to", "(", "x", "y", ")", "or", "-", "1", "if", "nothing", "near" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/math/interpolation/splines/ControlCurve.java#L44-L57
CenturyLinkCloud/clc-java-sdk
sdk/src/main/java/com/centurylink/cloud/sdk/core/client/SdkClientBuilder.java
SdkClientBuilder.defaultProxy
public SdkClientBuilder defaultProxy(String hostname, int port, final String scheme) { """ Specify default proxy. @param hostname the proxy hostname @param port the proxy port number @param scheme the proxy scheme @return current instance of SDK client builder """ this.defaultProxy = new HttpHost...
java
public SdkClientBuilder defaultProxy(String hostname, int port, final String scheme) { this.defaultProxy = new HttpHost(hostname, port, scheme); return this; }
[ "public", "SdkClientBuilder", "defaultProxy", "(", "String", "hostname", ",", "int", "port", ",", "final", "String", "scheme", ")", "{", "this", ".", "defaultProxy", "=", "new", "HttpHost", "(", "hostname", ",", "port", ",", "scheme", ")", ";", "return", "...
Specify default proxy. @param hostname the proxy hostname @param port the proxy port number @param scheme the proxy scheme @return current instance of SDK client builder
[ "Specify", "default", "proxy", "." ]
train
https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/core/client/SdkClientBuilder.java#L355-L359
pravega/pravega
segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/SegmentStatsRecorderImpl.java
SegmentStatsRecorderImpl.merge
@Override public void merge(String streamSegmentName, long dataLength, int numOfEvents, long txnCreationTime) { """ Method called with txn stats whenever a txn is committed. @param streamSegmentName parent segment name @param dataLength length of data written in txn @param numOfEvents number ...
java
@Override public void merge(String streamSegmentName, long dataLength, int numOfEvents, long txnCreationTime) { getDynamicLogger().incCounterValue(SEGMENT_WRITE_BYTES, dataLength, segmentTags(streamSegmentName)); getDynamicLogger().incCounterValue(SEGMENT_WRITE_EVENTS, numOfEvents, segmentTags(strea...
[ "@", "Override", "public", "void", "merge", "(", "String", "streamSegmentName", ",", "long", "dataLength", ",", "int", "numOfEvents", ",", "long", "txnCreationTime", ")", "{", "getDynamicLogger", "(", ")", ".", "incCounterValue", "(", "SEGMENT_WRITE_BYTES", ",", ...
Method called with txn stats whenever a txn is committed. @param streamSegmentName parent segment name @param dataLength length of data written in txn @param numOfEvents number of events written in txn @param txnCreationTime time when txn was created
[ "Method", "called", "with", "txn", "stats", "whenever", "a", "txn", "is", "committed", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/SegmentStatsRecorderImpl.java#L225-L234
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java
ESClient.setBatchSize
private void setBatchSize(String persistenceUnit, Map<String, Object> puProperties) { """ Sets the batch size. @param persistenceUnit the persistence unit @param puProperties the pu properties """ String batch_Size = null; if (puProperties != null) { Object externalBat...
java
private void setBatchSize(String persistenceUnit, Map<String, Object> puProperties) { String batch_Size = null; if (puProperties != null) { Object externalBatchSize = puProperties.get(PersistenceProperties.KUNDERA_BATCH_SIZE); externalBatchSize = externalBatchSize != ...
[ "private", "void", "setBatchSize", "(", "String", "persistenceUnit", ",", "Map", "<", "String", ",", "Object", ">", "puProperties", ")", "{", "String", "batch_Size", "=", "null", ";", "if", "(", "puProperties", "!=", "null", ")", "{", "Object", "externalBatc...
Sets the batch size. @param persistenceUnit the persistence unit @param puProperties the pu properties
[ "Sets", "the", "batch", "size", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java#L900-L923
zaproxy/zaproxy
src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
ExtensionAutoUpdate.processAddOnChanges
void processAddOnChanges(Window caller, AddOnDependencyChecker.AddOnChangesResult changes) { """ Processes the given add-on changes. @param caller the caller to set as parent of shown dialogues @param changes the changes that will be processed """ if (addonsDialog != null) { addonsDialo...
java
void processAddOnChanges(Window caller, AddOnDependencyChecker.AddOnChangesResult changes) { if (addonsDialog != null) { addonsDialog.setDownloadingUpdates(); } if (getView() != null) { Set<AddOn> addOns = new HashSet<>(changes.getUninstalls()); addOns.addAll...
[ "void", "processAddOnChanges", "(", "Window", "caller", ",", "AddOnDependencyChecker", ".", "AddOnChangesResult", "changes", ")", "{", "if", "(", "addonsDialog", "!=", "null", ")", "{", "addonsDialog", ".", "setDownloadingUpdates", "(", ")", ";", "}", "if", "(",...
Processes the given add-on changes. @param caller the caller to set as parent of shown dialogues @param changes the changes that will be processed
[ "Processes", "the", "given", "add", "-", "on", "changes", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java#L1336-L1365
real-logic/simple-binary-encoding
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java
XmlSchemaParser.findMessages
public static Map<Long, Message> findMessages( final Document document, final XPath xPath, final Map<String, Type> typeByNameMap) throws Exception { """ Scan XML for all message definitions and save in map @param document for the XML parsing @param xPath for XPath expression reuse @param ...
java
public static Map<Long, Message> findMessages( final Document document, final XPath xPath, final Map<String, Type> typeByNameMap) throws Exception { final Map<Long, Message> messageByIdMap = new HashMap<>(); final ObjectHashSet<String> distinctNames = new ObjectHashSet<>(); forEach(...
[ "public", "static", "Map", "<", "Long", ",", "Message", ">", "findMessages", "(", "final", "Document", "document", ",", "final", "XPath", "xPath", ",", "final", "Map", "<", "String", ",", "Type", ">", "typeByNameMap", ")", "throws", "Exception", "{", "fina...
Scan XML for all message definitions and save in map @param document for the XML parsing @param xPath for XPath expression reuse @param typeByNameMap to use for Type objects @return {@link java.util.Map} of schemaId to Message @throws Exception on parsing error.
[ "Scan", "XML", "for", "all", "message", "definitions", "and", "save", "in", "map" ]
train
https://github.com/real-logic/simple-binary-encoding/blob/9a7be490c86d98f0e430e4189bc6c8c4fbef658b/sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java#L220-L230
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java
NamespacesInner.createOrUpdate
public NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { """ Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @param resourceGroupName The name of ...
java
public NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); }
[ "public", "NamespaceResourceInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "NamespaceCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "namesp...
Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param parameters Parameters supplied to create a Namespace Resource. @throws IllegalArgume...
[ "Creates", "/", "Updates", "a", "service", "namespace", ".", "Once", "created", "this", "namespace", "s", "resource", "manifest", "is", "immutable", ".", "This", "operation", "is", "idempotent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java#L235-L237
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java
COSInputStream.lazySeek
private void lazySeek(long targetPos, long len) throws IOException { """ Perform lazy seek and adjust stream to correct position for reading. @param targetPos position from where data should be read @param len length of the content that needs to be read """ //For lazy seek seekInStream(targetPos, l...
java
private void lazySeek(long targetPos, long len) throws IOException { //For lazy seek seekInStream(targetPos, len); //re-open at specific location if needed if (wrappedStream == null) { reopen("read from new offset", targetPos, len); } }
[ "private", "void", "lazySeek", "(", "long", "targetPos", ",", "long", "len", ")", "throws", "IOException", "{", "//For lazy seek", "seekInStream", "(", "targetPos", ",", "len", ")", ";", "//re-open at specific location if needed", "if", "(", "wrappedStream", "==", ...
Perform lazy seek and adjust stream to correct position for reading. @param targetPos position from where data should be read @param len length of the content that needs to be read
[ "Perform", "lazy", "seek", "and", "adjust", "stream", "to", "correct", "position", "for", "reading", "." ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java#L245-L253
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/extension/InvokerExtensionProcessor.java
InvokerExtensionProcessor.handleRequest
public void handleRequest(ServletRequest req, ServletResponse res) throws Exception { """ This method will only get invoked if (1) This is the first request to the target servlet to be served by classname/name (2) The request is an include/forward and matched /servlet/* """ if (co...
java
public void handleRequest(ServletRequest req, ServletResponse res) throws Exception { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){ logger.logp(Level.FINE, CLASS_NAME,"handleRequest", "should not enter invoker extension processor t...
[ "public", "void", "handleRequest", "(", "ServletRequest", "req", ",", "ServletResponse", "res", ")", "throws", "Exception", "{", "if", "(", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger"...
This method will only get invoked if (1) This is the first request to the target servlet to be served by classname/name (2) The request is an include/forward and matched /servlet/*
[ "This", "method", "will", "only", "get", "invoked", "if", "(", "1", ")", "This", "is", "the", "first", "request", "to", "the", "target", "servlet", "to", "be", "served", "by", "classname", "/", "name", "(", "2", ")", "The", "request", "is", "an", "in...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/extension/InvokerExtensionProcessor.java#L134-L150
OpenHFT/Chronicle-Map
src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java
Chaining.initUsed
@Override public void initUsed(boolean used, VanillaChronicleMap map) { """ Init method parameterized to avoid automatic initialization. {@code used} argument should always be {@code true}. """ assert used; firstContextLockedInThisThread = rootContextInThisThread.lockContextLocally(map); ...
java
@Override public void initUsed(boolean used, VanillaChronicleMap map) { assert used; firstContextLockedInThisThread = rootContextInThisThread.lockContextLocally(map); initMap(map); this.used = true; }
[ "@", "Override", "public", "void", "initUsed", "(", "boolean", "used", ",", "VanillaChronicleMap", "map", ")", "{", "assert", "used", ";", "firstContextLockedInThisThread", "=", "rootContextInThisThread", ".", "lockContextLocally", "(", "map", ")", ";", "initMap", ...
Init method parameterized to avoid automatic initialization. {@code used} argument should always be {@code true}.
[ "Init", "method", "parameterized", "to", "avoid", "automatic", "initialization", ".", "{" ]
train
https://github.com/OpenHFT/Chronicle-Map/blob/0b09733cc96302f96be4394a261699eeb021fe37/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java#L114-L120
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.createView
public JenkinsServer createView(String viewName, String viewXml) throws IOException { """ Create a view on the server using the provided xml @param viewName name of the view to be created. @param viewXml The configuration for the view. @throws IOException in case of an error. """ return createView...
java
public JenkinsServer createView(String viewName, String viewXml) throws IOException { return createView(null, viewName, viewXml, false); }
[ "public", "JenkinsServer", "createView", "(", "String", "viewName", ",", "String", "viewXml", ")", "throws", "IOException", "{", "return", "createView", "(", "null", ",", "viewName", ",", "viewXml", ",", "false", ")", ";", "}" ]
Create a view on the server using the provided xml @param viewName name of the view to be created. @param viewXml The configuration for the view. @throws IOException in case of an error.
[ "Create", "a", "view", "on", "the", "server", "using", "the", "provided", "xml" ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L401-L403
lucee/Lucee
core/src/main/java/lucee/runtime/converter/JSONConverter.java
JSONConverter._serializeMap
private void _serializeMap(PageContext pc, Set test, Map map, StringBuilder sb, boolean serializeQueryByColumns, Set<Object> done) throws ConverterException { """ serialize a Map (as Struct) @param map Map to serialize @param sb @param serializeQueryByColumns @param done @throws ConverterException """ ...
java
private void _serializeMap(PageContext pc, Set test, Map map, StringBuilder sb, boolean serializeQueryByColumns, Set<Object> done) throws ConverterException { sb.append(goIn()); sb.append("{"); Iterator it = map.keySet().iterator(); boolean doIt = false; while (it.hasNext()) { Object key = it.next(); if...
[ "private", "void", "_serializeMap", "(", "PageContext", "pc", ",", "Set", "test", ",", "Map", "map", ",", "StringBuilder", "sb", ",", "boolean", "serializeQueryByColumns", ",", "Set", "<", "Object", ">", "done", ")", "throws", "ConverterException", "{", "sb", ...
serialize a Map (as Struct) @param map Map to serialize @param sb @param serializeQueryByColumns @param done @throws ConverterException
[ "serialize", "a", "Map", "(", "as", "Struct", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/converter/JSONConverter.java#L345-L361
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-properties/src/main/java/org/xwiki/properties/converter/AbstractConverter.java
AbstractConverter.convertToType
protected <G extends T> G convertToType(Type targetType, Object value) { """ Convert the input object into an output object of the specified type. <p> Typical implementations will provide a minimum of {@code String --> type} conversion. @param <G> the type in which the provided value has o be converted @para...
java
protected <G extends T> G convertToType(Type targetType, Object value) { Class<G> clazz = ReflectionUtils.getTypeClass(targetType); // Call #convertToType(Class<T> type, Object value) for retro-compatibility return convertToType(clazz, value); }
[ "protected", "<", "G", "extends", "T", ">", "G", "convertToType", "(", "Type", "targetType", ",", "Object", "value", ")", "{", "Class", "<", "G", ">", "clazz", "=", "ReflectionUtils", ".", "getTypeClass", "(", "targetType", ")", ";", "// Call #convertToType(...
Convert the input object into an output object of the specified type. <p> Typical implementations will provide a minimum of {@code String --> type} conversion. @param <G> the type in which the provided value has o be converted @param targetType Data type to which this value should be converted. @param value The input ...
[ "Convert", "the", "input", "object", "into", "an", "output", "object", "of", "the", "specified", "type", ".", "<p", ">", "Typical", "implementations", "will", "provide", "a", "minimum", "of", "{", "@code", "String", "--", ">", "type", "}", "conversion", "....
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-properties/src/main/java/org/xwiki/properties/converter/AbstractConverter.java#L83-L89
lessthanoptimal/BoofCV
main/boofcv-io/src/main/java/boofcv/io/image/impl/ImplConvertRaster.java
ImplConvertRaster.bufferedToInterleaved
public static void bufferedToInterleaved(BufferedImage src, InterleavedU8 dst) { """ <p> Converts a buffered image into an planar image using the BufferedImage's RGB interface. </p> <p> This is much slower than working directly with the BufferedImage's internal raster and should be avoided if possible. </p> ...
java
public static void bufferedToInterleaved(BufferedImage src, InterleavedU8 dst) { final int width = src.getWidth(); final int height = src.getHeight(); if (dst.getNumBands() == 3) { //CONCURRENT_BELOW BoofConcurrency.loopFor(0, height, y -> { for (int y = 0; y < height; y++) { int indexDst = dst.start...
[ "public", "static", "void", "bufferedToInterleaved", "(", "BufferedImage", "src", ",", "InterleavedU8", "dst", ")", "{", "final", "int", "width", "=", "src", ".", "getWidth", "(", ")", ";", "final", "int", "height", "=", "src", ".", "getHeight", "(", ")", ...
<p> Converts a buffered image into an planar image using the BufferedImage's RGB interface. </p> <p> This is much slower than working directly with the BufferedImage's internal raster and should be avoided if possible. </p> @param src Input image. @param dst Output image.
[ "<p", ">", "Converts", "a", "buffered", "image", "into", "an", "planar", "image", "using", "the", "BufferedImage", "s", "RGB", "interface", ".", "<", "/", "p", ">", "<p", ">", "This", "is", "much", "slower", "than", "working", "directly", "with", "the", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/image/impl/ImplConvertRaster.java#L868-L892
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/RobustResilienceStrategy.java
RobustResilienceStrategy.putAllFailure
@Override public void putAllFailure(Map<? extends K, ? extends V> entries, StoreAccessException e) { """ Do nothing. @param entries the entries being put @param e the triggered failure """ cleanup(entries.keySet(), e); }
java
@Override public void putAllFailure(Map<? extends K, ? extends V> entries, StoreAccessException e) { cleanup(entries.keySet(), e); }
[ "@", "Override", "public", "void", "putAllFailure", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "entries", ",", "StoreAccessException", "e", ")", "{", "cleanup", "(", "entries", ".", "keySet", "(", ")", ",", "e", ")", ";", "}...
Do nothing. @param entries the entries being put @param e the triggered failure
[ "Do", "nothing", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/RobustResilienceStrategy.java#L187-L190
cdapio/tigon
tigon-yarn/src/main/java/co/cask/tigon/internal/io/FieldAccessorGenerator.java
FieldAccessorGenerator.directGetter
private void directGetter(Field field) { """ Generates a getter that get the value by directly accessing the class field. @param field The reflection field object. """ GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(Object.class, "get", Object.class), ...
java
private void directGetter(Field field) { GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(Object.class, "get", Object.class), getterSignature(), new Type[0], classWriter); // Simply access by field // return ((classType)object).fieldName...
[ "private", "void", "directGetter", "(", "Field", "field", ")", "{", "GeneratorAdapter", "mg", "=", "new", "GeneratorAdapter", "(", "Opcodes", ".", "ACC_PUBLIC", ",", "getMethod", "(", "Object", ".", "class", ",", "\"get\"", ",", "Object", ".", "class", ")", ...
Generates a getter that get the value by directly accessing the class field. @param field The reflection field object.
[ "Generates", "a", "getter", "that", "get", "the", "value", "by", "directly", "accessing", "the", "class", "field", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-yarn/src/main/java/co/cask/tigon/internal/io/FieldAccessorGenerator.java#L228-L241
igniterealtime/Smack
smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java
Roster.createItem
public void createItem(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Creates a new roster item. The server will asynchronously update the roster with the subscription status. <p> There will be no ...
java
public void createItem(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { final XMPPConnection connection = getAuthenticatedConnectionOrThrow(); // Create and send roster entry creation packet. ...
[ "public", "void", "createItem", "(", "BareJid", "jid", ",", "String", "name", ",", "String", "[", "]", "groups", ")", "throws", "NotLoggedInException", ",", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", ...
Creates a new roster item. The server will asynchronously update the roster with the subscription status. <p> There will be no presence subscription request. Consider using {@link #createItemAndRequestSubscription(BareJid, String, String[])} if you also want to request a presence subscription from the contact. </p> @p...
[ "Creates", "a", "new", "roster", "item", ".", "The", "server", "will", "asynchronously", "update", "the", "roster", "with", "the", "subscription", "status", ".", "<p", ">", "There", "will", "be", "no", "presence", "subscription", "request", ".", "Consider", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java#L674-L690
tvesalainen/util
util/src/main/java/org/vesalainen/ui/Scaler.java
Scaler.getLevelFor
public ScaleLevel getLevelFor(Font font, boolean horizontal, double xy) { """ Returns highest level where drawn labels don't overlap using identity transformer and FontRenderContext with identity AffineTransform, no anti-aliasing and fractional metrics @param font @param horizontal @param xy Lines constant va...
java
public ScaleLevel getLevelFor(Font font, boolean horizontal, double xy) { return getLevelFor(font, DEFAULT_FONTRENDERCONTEXT, horizontal, xy); }
[ "public", "ScaleLevel", "getLevelFor", "(", "Font", "font", ",", "boolean", "horizontal", ",", "double", "xy", ")", "{", "return", "getLevelFor", "(", "font", ",", "DEFAULT_FONTRENDERCONTEXT", ",", "horizontal", ",", "xy", ")", ";", "}" ]
Returns highest level where drawn labels don't overlap using identity transformer and FontRenderContext with identity AffineTransform, no anti-aliasing and fractional metrics @param font @param horizontal @param xy Lines constant value @return
[ "Returns", "highest", "level", "where", "drawn", "labels", "don", "t", "overlap", "using", "identity", "transformer", "and", "FontRenderContext", "with", "identity", "AffineTransform", "no", "anti", "-", "aliasing", "and", "fractional", "metrics" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/Scaler.java#L110-L113
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java
ContentSpecParser.parseCommonContentLine
protected CommonContent parseCommonContentLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException { """ Processes the input to create a new common content node. @param parserData @param line The line of input to be processed @return A common contents object initialis...
java
protected CommonContent parseCommonContentLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException { // Read in the variables inside of the brackets final HashMap<ParserType, String[]> variableMap = getLineVariables(parserData, line, lineNumber, '[', ']', ',', false);...
[ "protected", "CommonContent", "parseCommonContentLine", "(", "final", "ParserData", "parserData", ",", "final", "String", "line", ",", "int", "lineNumber", ")", "throws", "ParsingException", "{", "// Read in the variables inside of the brackets", "final", "HashMap", "<", ...
Processes the input to create a new common content node. @param parserData @param line The line of input to be processed @return A common contents object initialised with the data from the input line. @throws ParsingException Thrown if the line can't be parsed as a Common Content node, due to incorrect syntax.
[ "Processes", "the", "input", "to", "create", "a", "new", "common", "content", "node", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L959-L986
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.throwThrowable
public static InsnList throwThrowable() { """ Generates instructions to throw the exception type at top of stack. You may run in to problems if the item on top of the stack isn't a {@link Throwable} type. @return instructions to throw an exception @throws NullPointerException if any argument is {@code null} ...
java
public static InsnList throwThrowable() { InsnList ret = new InsnList(); // ret.add(new TypeInsnNode(Opcodes.CHECKCAST, "java/lang/Throwable")); // If required, do it outside this method ret.add(new InsnNode(Opcodes.ATHROW)); return ret; }
[ "public", "static", "InsnList", "throwThrowable", "(", ")", "{", "InsnList", "ret", "=", "new", "InsnList", "(", ")", ";", "// ret.add(new TypeInsnNode(Opcodes.CHECKCAST, \"java/lang/Throwable\")); // If required, do it outside this method", "ret", ".", "add", "(", "ne...
Generates instructions to throw the exception type at top of stack. You may run in to problems if the item on top of the stack isn't a {@link Throwable} type. @return instructions to throw an exception @throws NullPointerException if any argument is {@code null}
[ "Generates", "instructions", "to", "throw", "the", "exception", "type", "at", "top", "of", "stack", ".", "You", "may", "run", "in", "to", "problems", "if", "the", "item", "on", "top", "of", "the", "stack", "isn", "t", "a", "{" ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L915-L922
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Block.java
Block.addTransaction
void addTransaction(Transaction t, boolean runSanityChecks) { """ Adds a transaction to this block, with or without checking the sanity of doing so """ unCacheTransactions(); if (transactions == null) { transactions = new ArrayList<>(); } t.setParent(this); i...
java
void addTransaction(Transaction t, boolean runSanityChecks) { unCacheTransactions(); if (transactions == null) { transactions = new ArrayList<>(); } t.setParent(this); if (runSanityChecks && transactions.size() == 0 && !t.isCoinBase()) throw new RuntimeExc...
[ "void", "addTransaction", "(", "Transaction", "t", ",", "boolean", "runSanityChecks", ")", "{", "unCacheTransactions", "(", ")", ";", "if", "(", "transactions", "==", "null", ")", "{", "transactions", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "t",...
Adds a transaction to this block, with or without checking the sanity of doing so
[ "Adds", "a", "transaction", "to", "this", "block", "with", "or", "without", "checking", "the", "sanity", "of", "doing", "so" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Block.java#L803-L818
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java
GitFlowGraphMonitor.loadNodeFileWithOverrides
private Config loadNodeFileWithOverrides(Path filePath) throws IOException { """ Load the node file. @param filePath path of the node file relative to the repository root @return the configuration object @throws IOException """ Config nodeConfig = this.pullFileLoader.loadPullFile(filePath, emptyConfig, ...
java
private Config loadNodeFileWithOverrides(Path filePath) throws IOException { Config nodeConfig = this.pullFileLoader.loadPullFile(filePath, emptyConfig, false); return getNodeConfigWithOverrides(nodeConfig, filePath); }
[ "private", "Config", "loadNodeFileWithOverrides", "(", "Path", "filePath", ")", "throws", "IOException", "{", "Config", "nodeConfig", "=", "this", ".", "pullFileLoader", ".", "loadPullFile", "(", "filePath", ",", "emptyConfig", ",", "false", ")", ";", "return", ...
Load the node file. @param filePath path of the node file relative to the repository root @return the configuration object @throws IOException
[ "Load", "the", "node", "file", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java#L359-L362
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Assert.java
Assert.badIndexMsg
private static String badIndexMsg(int index, int size, String desc, Object... params) { """ 错误的下标时显示的消息 @param index 下标 @param size 长度 @param desc 异常时的消息模板 @param params 参数列表 @return 消息 """ if (index < 0) { return StrUtil.format("{} ({}) must not be negative", StrUtil.format(desc, params), index)...
java
private static String badIndexMsg(int index, int size, String desc, Object... params) { if (index < 0) { return StrUtil.format("{} ({}) must not be negative", StrUtil.format(desc, params), index); } else if (size < 0) { throw new IllegalArgumentException("negative size: " + size); } else { // index >= ...
[ "private", "static", "String", "badIndexMsg", "(", "int", "index", ",", "int", "size", ",", "String", "desc", ",", "Object", "...", "params", ")", "{", "if", "(", "index", "<", "0", ")", "{", "return", "StrUtil", ".", "format", "(", "\"{} ({}) must not b...
错误的下标时显示的消息 @param index 下标 @param size 长度 @param desc 异常时的消息模板 @param params 参数列表 @return 消息
[ "错误的下标时显示的消息" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L645-L653
dita-ot/dita-ot
src/main/java/org/dita/dost/log/MessageUtils.java
MessageUtils.getMessage
public static MessageBean getMessage(final String id, final String... params) { """ Get the message respond to the given id with all of the parameters are replaced by those in the given 'prop', if no message found, an empty message with this id will be returned. @param id id @param params message parameters ...
java
public static MessageBean getMessage(final String id, final String... params) { if (!msgs.containsKey(id)) { throw new IllegalArgumentException("Message for ID '" + id + "' not found"); } final String msg = MessageFormat.format(msgs.getString(id), (Object[]) params); MessageB...
[ "public", "static", "MessageBean", "getMessage", "(", "final", "String", "id", ",", "final", "String", "...", "params", ")", "{", "if", "(", "!", "msgs", ".", "containsKey", "(", "id", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Mess...
Get the message respond to the given id with all of the parameters are replaced by those in the given 'prop', if no message found, an empty message with this id will be returned. @param id id @param params message parameters @return MessageBean
[ "Get", "the", "message", "respond", "to", "the", "given", "id", "with", "all", "of", "the", "parameters", "are", "replaced", "by", "those", "in", "the", "given", "prop", "if", "no", "message", "found", "an", "empty", "message", "with", "this", "id", "wil...
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/log/MessageUtils.java#L57-L81
microfocus-idol/java-idol-indexing-api
src/main/java/com/autonomy/nonaci/indexing/impl/IndexingServiceImpl.java
IndexingServiceImpl.createPostMethod
private HttpUriRequest createPostMethod(final ServerDetails serverDetails, final IndexCommand command) throws URISyntaxException { """ Create a <tt>HttpClient</tt> <tt>PostMethod</tt> instance that contains the POST content. @param serverDetails The connection details of the server to use... @param command The...
java
private HttpUriRequest createPostMethod(final ServerDetails serverDetails, final IndexCommand command) throws URISyntaxException { LOGGER.trace("createPostMethod() called..."); final HttpPost httpPost = new HttpPost(createIndexCommandURI(serverDetails, command)); httpPost.setEntity(new PostData...
[ "private", "HttpUriRequest", "createPostMethod", "(", "final", "ServerDetails", "serverDetails", ",", "final", "IndexCommand", "command", ")", "throws", "URISyntaxException", "{", "LOGGER", ".", "trace", "(", "\"createPostMethod() called...\"", ")", ";", "final", "HttpP...
Create a <tt>HttpClient</tt> <tt>PostMethod</tt> instance that contains the POST content. @param serverDetails The connection details of the server to use... @param command The command to get the POST content from @return a <tt>HttpUriRequest</tt> containing the contents of the <tt>Command</tt> @throws java.net.URISyn...
[ "Create", "a", "<tt", ">", "HttpClient<", "/", "tt", ">", "<tt", ">", "PostMethod<", "/", "tt", ">", "instance", "that", "contains", "the", "POST", "content", "." ]
train
https://github.com/microfocus-idol/java-idol-indexing-api/blob/178ea844da501318d8d797a35b2f72ff40786b8c/src/main/java/com/autonomy/nonaci/indexing/impl/IndexingServiceImpl.java#L108-L114
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectHasSelfImpl_CustomFieldSerializer.java
OWLObjectHasSelfImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectHasSelfImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.us...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectHasSelfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectHasSelfImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectHasSelfImpl_CustomFieldSerializer.java#L69-L72
census-instrumentation/opencensus-java
contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TraceConfigzZPageHandler.java
TraceConfigzZPageHandler.emitTraceParamsTable
@SuppressWarnings("deprecation") private static void emitTraceParamsTable(TraceParams params, PrintWriter out) { """ Prints a table to a PrintWriter that shows existing trace parameters. """ out.write( "<b class=\"title\">Active tracing parameters:</b><br>\n" + "<table class=\"small\"...
java
@SuppressWarnings("deprecation") private static void emitTraceParamsTable(TraceParams params, PrintWriter out) { out.write( "<b class=\"title\">Active tracing parameters:</b><br>\n" + "<table class=\"small\" rules=\"all\">\n" + " <tr>\n" + " <td class=\"col_headR\">...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "static", "void", "emitTraceParamsTable", "(", "TraceParams", "params", ",", "PrintWriter", "out", ")", "{", "out", ".", "write", "(", "\"<b class=\\\"title\\\">Active tracing parameters:</b><br>\\n\"", "+",...
Prints a table to a PrintWriter that shows existing trace parameters.
[ "Prints", "a", "table", "to", "a", "PrintWriter", "that", "shows", "existing", "trace", "parameters", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TraceConfigzZPageHandler.java#L192-L218
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/BarChart.java
BarChart.calculateBounds
protected void calculateBounds(float _Width, float _Margin) { """ Calculates the bar boundaries based on the bar width and bar margin. @param _Width Calculated bar width @param _Margin Calculated bar margin """ float maxValue = 0; int last = 0; for (BarModel model : mData)...
java
protected void calculateBounds(float _Width, float _Margin) { float maxValue = 0; int last = 0; for (BarModel model : mData) { if(model.getValue() > maxValue) { maxValue = model.getValue(); } } int valuePadding = mShowValues ? (int)...
[ "protected", "void", "calculateBounds", "(", "float", "_Width", ",", "float", "_Margin", ")", "{", "float", "maxValue", "=", "0", ";", "int", "last", "=", "0", ";", "for", "(", "BarModel", "model", ":", "mData", ")", "{", "if", "(", "model", ".", "ge...
Calculates the bar boundaries based on the bar width and bar margin. @param _Width Calculated bar width @param _Margin Calculated bar margin
[ "Calculates", "the", "bar", "boundaries", "based", "on", "the", "bar", "width", "and", "bar", "margin", "." ]
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/BarChart.java#L175-L198
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/function/ScaleRoundedOperator.java
ScaleRoundedOperator.of
public static ScaleRoundedOperator of(int scale, RoundingMode roundingMode) { """ Creates the rounded Operator from scale and roundingMode @param scale the scale to be used @param roundingMode the rounding mode to be used @return the {@link MonetaryOperator} using the scale and {@link RoundingMode} used in para...
java
public static ScaleRoundedOperator of(int scale, RoundingMode roundingMode) { Objects.requireNonNull(roundingMode); if(RoundingMode.UNNECESSARY.equals(roundingMode)) { throw new IllegalStateException("To create the ScaleRoundedOperator you cannot use the RoundingMode.UNNECESSARY"); } return new ScaleRoun...
[ "public", "static", "ScaleRoundedOperator", "of", "(", "int", "scale", ",", "RoundingMode", "roundingMode", ")", "{", "Objects", ".", "requireNonNull", "(", "roundingMode", ")", ";", "if", "(", "RoundingMode", ".", "UNNECESSARY", ".", "equals", "(", "roundingMod...
Creates the rounded Operator from scale and roundingMode @param scale the scale to be used @param roundingMode the rounding mode to be used @return the {@link MonetaryOperator} using the scale and {@link RoundingMode} used in parameter @throws NullPointerException when the {@link MathContext} is null @see RoundingMode
[ "Creates", "the", "rounded", "Operator", "from", "scale", "and", "roundingMode" ]
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/function/ScaleRoundedOperator.java#L67-L75
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseArrayInitialiserExpression
private Expr parseArrayInitialiserExpression(EnclosingScope scope, boolean terminated) { """ Parse an array initialiser expression, which is of the form: <pre> ArrayInitialiserExpr ::= '[' [ Expr (',' Expr)+ ] ']' </pre> @param scope The enclosing scope for this statement, which determines the set of vis...
java
private Expr parseArrayInitialiserExpression(EnclosingScope scope, boolean terminated) { int start = index; match(LeftSquare); ArrayList<Expr> exprs = new ArrayList<>(); boolean firstTime = true; while (eventuallyMatch(RightSquare) == null) { if (!firstTime) { match(Comma); } firstTime = false; ...
[ "private", "Expr", "parseArrayInitialiserExpression", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "int", "start", "=", "index", ";", "match", "(", "LeftSquare", ")", ";", "ArrayList", "<", "Expr", ">", "exprs", "=", "new", "ArrayLis...
Parse an array initialiser expression, which is of the form: <pre> ArrayInitialiserExpr ::= '[' [ Expr (',' Expr)+ ] ']' </pre> @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @param terminated This indicates th...
[ "Parse", "an", "array", "initialiser", "expression", "which", "is", "of", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2686-L2706
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.readAssignment
private void readAssignment(Resource resource, Assignment assignment) { """ Read a single resource assignment. @param resource MPXJ resource @param assignment Phoenix assignment """ Task task = m_activityMap.get(assignment.getActivity()); if (task != null) { task.addResourceAssig...
java
private void readAssignment(Resource resource, Assignment assignment) { Task task = m_activityMap.get(assignment.getActivity()); if (task != null) { task.addResourceAssignment(resource); } }
[ "private", "void", "readAssignment", "(", "Resource", "resource", ",", "Assignment", "assignment", ")", "{", "Task", "task", "=", "m_activityMap", ".", "get", "(", "assignment", ".", "getActivity", "(", ")", ")", ";", "if", "(", "task", "!=", "null", ")", ...
Read a single resource assignment. @param resource MPXJ resource @param assignment Phoenix assignment
[ "Read", "a", "single", "resource", "assignment", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L645-L652
dropwizard/metrics
metrics-core/src/main/java/com/codahale/metrics/ExponentiallyDecayingReservoir.java
ExponentiallyDecayingReservoir.update
public void update(long value, long timestamp) { """ Adds an old value with a fixed timestamp to the reservoir. @param value the value to be added @param timestamp the epoch timestamp of {@code value} in seconds """ rescaleIfNeeded(); lockForRegularUsage(); try { fin...
java
public void update(long value, long timestamp) { rescaleIfNeeded(); lockForRegularUsage(); try { final double itemWeight = weight(timestamp - startTime); final WeightedSample sample = new WeightedSample(value, itemWeight); final double priority = itemWeight / ...
[ "public", "void", "update", "(", "long", "value", ",", "long", "timestamp", ")", "{", "rescaleIfNeeded", "(", ")", ";", "lockForRegularUsage", "(", ")", ";", "try", "{", "final", "double", "itemWeight", "=", "weight", "(", "timestamp", "-", "startTime", ")...
Adds an old value with a fixed timestamp to the reservoir. @param value the value to be added @param timestamp the epoch timestamp of {@code value} in seconds
[ "Adds", "an", "old", "value", "with", "a", "fixed", "timestamp", "to", "the", "reservoir", "." ]
train
https://github.com/dropwizard/metrics/blob/3c6105a0b9b4416c59e16b6b841b123052d6f57d/metrics-core/src/main/java/com/codahale/metrics/ExponentiallyDecayingReservoir.java#L93-L116
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/StopWatchFactory.java
StopWatchFactory.create
public static IStopWatch create(String tag, Map<String, Object> data) { """ Returns a stopwatch instance initialized with the specified tag and data. @param tag Tag to identify the interval being timed. @param data Arbitrary metadata. @return An initialized stopwatch instance. Will be null if the factory has ...
java
public static IStopWatch create(String tag, Map<String, Object> data) { IStopWatch sw = create(); sw.init(tag, data); return sw; }
[ "public", "static", "IStopWatch", "create", "(", "String", "tag", ",", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "IStopWatch", "sw", "=", "create", "(", ")", ";", "sw", ".", "init", "(", "tag", ",", "data", ")", ";", "return", "sw...
Returns a stopwatch instance initialized with the specified tag and data. @param tag Tag to identify the interval being timed. @param data Arbitrary metadata. @return An initialized stopwatch instance. Will be null if the factory has not been initialized.
[ "Returns", "a", "stopwatch", "instance", "initialized", "with", "the", "specified", "tag", "and", "data", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/StopWatchFactory.java#L111-L115
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.extractAccessURL
public static String extractAccessURL(String publicURL, String scheme) throws IOException { """ Transform http://hostname/v1/auth_id/container/object to http://hostname/v1/auth_id @param publicURL public url @param scheme URL scheme @return accessURL access url @throws IOException if path is malformed "...
java
public static String extractAccessURL(String publicURL, String scheme) throws IOException { if (publicURL != null && !publicURL.startsWith("http")) { String startScheme = scheme + "://"; int end = publicURL.length(); if (publicURL.indexOf("/", startScheme.length()) >= 0) { end = publicURL....
[ "public", "static", "String", "extractAccessURL", "(", "String", "publicURL", ",", "String", "scheme", ")", "throws", "IOException", "{", "if", "(", "publicURL", "!=", "null", "&&", "!", "publicURL", ".", "startsWith", "(", "\"http\"", ")", ")", "{", "String...
Transform http://hostname/v1/auth_id/container/object to http://hostname/v1/auth_id @param publicURL public url @param scheme URL scheme @return accessURL access url @throws IOException if path is malformed
[ "Transform", "http", ":", "//", "hostname", "/", "v1", "/", "auth_id", "/", "container", "/", "object", "to", "http", ":", "//", "hostname", "/", "v1", "/", "auth_id" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L402-L425
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/ExtensionsDao.java
ExtensionsDao.deleteByExtension
public int deleteByExtension(String extensionName, String tableName) throws SQLException { """ Delete by extension name and table name @param extensionName extension name @param tableName table name @return deleted count @throws SQLException upon failure """ DeleteBuilder<Extensions, Void> db = ...
java
public int deleteByExtension(String extensionName, String tableName) throws SQLException { DeleteBuilder<Extensions, Void> db = deleteBuilder(); setUniqueWhere(db.where(), extensionName, true, tableName, false, null); int deleted = db.delete(); return deleted; }
[ "public", "int", "deleteByExtension", "(", "String", "extensionName", ",", "String", "tableName", ")", "throws", "SQLException", "{", "DeleteBuilder", "<", "Extensions", ",", "Void", ">", "db", "=", "deleteBuilder", "(", ")", ";", "setUniqueWhere", "(", "db", ...
Delete by extension name and table name @param extensionName extension name @param tableName table name @return deleted count @throws SQLException upon failure
[ "Delete", "by", "extension", "name", "and", "table", "name" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/ExtensionsDao.java#L109-L119
JodaOrg/joda-time
src/main/java/org/joda/time/YearMonthDay.java
YearMonthDay.withFieldAdded
public YearMonthDay withFieldAdded(DurationFieldType fieldType, int amount) { """ Returns a copy of this date with the value of the specified field increased. <p> If the addition is zero, then <code>this</code> is returned. <p> These three lines are equivalent: <pre> YearMonthDay added = ymd.withFieldAdded(D...
java
public YearMonthDay withFieldAdded(DurationFieldType fieldType, int amount) { int index = indexOfSupported(fieldType); if (amount == 0) { return this; } int[] newValues = getValues(); newValues = getField(index).add(this, index, newValues, amount); return new ...
[ "public", "YearMonthDay", "withFieldAdded", "(", "DurationFieldType", "fieldType", ",", "int", "amount", ")", "{", "int", "index", "=", "indexOfSupported", "(", "fieldType", ")", ";", "if", "(", "amount", "==", "0", ")", "{", "return", "this", ";", "}", "i...
Returns a copy of this date with the value of the specified field increased. <p> If the addition is zero, then <code>this</code> is returned. <p> These three lines are equivalent: <pre> YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6); YearMonthDay added = ymd.plusDays(6); YearMonthDay added = ymd.d...
[ "Returns", "a", "copy", "of", "this", "date", "with", "the", "value", "of", "the", "specified", "field", "increased", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", ".", "<p", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/YearMonthDay.java#L438-L446
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.cancelAssembly
public AssemblyResponse cancelAssembly(String url) throws RequestException, LocalOperationException { """ cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationExcept...
java
public AssemblyResponse cancelAssembly(String url) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.delete(url, new HashMap<String, Object>())); }
[ "public", "AssemblyResponse", "cancelAssembly", "(", "String", "url", ")", "throws", "RequestException", ",", "LocalOperationException", "{", "Request", "request", "=", "new", "Request", "(", "this", ")", ";", "return", "new", "AssemblyResponse", "(", "request", "...
cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
[ "cancels", "a", "running", "assembly", "." ]
train
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L152-L156
graknlabs/grakn
server/src/server/kb/Validator.java
Validator.validateRule
private void validateRule(TransactionOLTP graph, Rule rule) { """ Validation rules exclusive to rules the precedence of validation is: labelValidation -> ontologicalValidation -> clauseValidation each of the validation happens only if the preceding validation yields no errors @param graph the graph to query a...
java
private void validateRule(TransactionOLTP graph, Rule rule) { Set<String> labelErrors = ValidateGlobalRules.validateRuleSchemaConceptExist(graph, rule); errorsFound.addAll(labelErrors); if (labelErrors.isEmpty()) { Set<String> ontologicalErrors = ValidateGlobalRules.validateRuleOntol...
[ "private", "void", "validateRule", "(", "TransactionOLTP", "graph", ",", "Rule", "rule", ")", "{", "Set", "<", "String", ">", "labelErrors", "=", "ValidateGlobalRules", ".", "validateRuleSchemaConceptExist", "(", "graph", ",", "rule", ")", ";", "errorsFound", "....
Validation rules exclusive to rules the precedence of validation is: labelValidation -> ontologicalValidation -> clauseValidation each of the validation happens only if the preceding validation yields no errors @param graph the graph to query against @param rule the rule which needs to be validated
[ "Validation", "rules", "exclusive", "to", "rules", "the", "precedence", "of", "validation", "is", ":", "labelValidation", "-", ">", "ontologicalValidation", "-", ">", "clauseValidation", "each", "of", "the", "validation", "happens", "only", "if", "the", "preceding...
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/Validator.java#L90-L100
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/DefaultCommandManager.java
DefaultCommandManager.createCommandGroup
@Override public CommandGroup createCommandGroup(String groupId, Object[] members) { """ Create a command group which holds all the given members. @param groupId the id to configure the group. @param members members to add to the group. @return a {@link CommandGroup} which contains all the members. ""...
java
@Override public CommandGroup createCommandGroup(String groupId, Object[] members) { return createCommandGroup(groupId, members, false, null); }
[ "@", "Override", "public", "CommandGroup", "createCommandGroup", "(", "String", "groupId", ",", "Object", "[", "]", "members", ")", "{", "return", "createCommandGroup", "(", "groupId", ",", "members", ",", "false", ",", "null", ")", ";", "}" ]
Create a command group which holds all the given members. @param groupId the id to configure the group. @param members members to add to the group. @return a {@link CommandGroup} which contains all the members.
[ "Create", "a", "command", "group", "which", "holds", "all", "the", "given", "members", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/DefaultCommandManager.java#L292-L295
elibom/jogger
src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java
ParameterParser.parse
public Map<String,String> parse(final String str, char[] separators) { """ Extracts a map of name/value pairs from the given string. Names are expected to be unique. Multiple separators may be specified and the earliest found in the input string is used. @param str the string that contains a sequence of name/v...
java
public Map<String,String> parse(final String str, char[] separators) { if (separators == null || separators.length == 0) { return new HashMap<String,String>(); } char separator = separators[0]; if (str != null) { int idx = str.length(); for (int i = 0; i < separators.length; i++) { int tmp = str.in...
[ "public", "Map", "<", "String", ",", "String", ">", "parse", "(", "final", "String", "str", ",", "char", "[", "]", "separators", ")", "{", "if", "(", "separators", "==", "null", "||", "separators", ".", "length", "==", "0", ")", "{", "return", "new",...
Extracts a map of name/value pairs from the given string. Names are expected to be unique. Multiple separators may be specified and the earliest found in the input string is used. @param str the string that contains a sequence of name/value pairs @param separators the name/value pairs separators @return a map of name...
[ "Extracts", "a", "map", "of", "name", "/", "value", "pairs", "from", "the", "given", "string", ".", "Names", "are", "expected", "to", "be", "unique", ".", "Multiple", "separators", "may", "be", "specified", "and", "the", "earliest", "found", "in", "the", ...
train
https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java#L208-L226
phax/ph-schedule
ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java
SimpleScheduleBuilder.repeatSecondlyForTotalCount
@Nonnull public static SimpleScheduleBuilder repeatSecondlyForTotalCount (final int nCount, final int nSeconds) { """ Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of seconds. <p> Note: Total count = 1 (at start time) + repeat count </p> @r...
java
@Nonnull public static SimpleScheduleBuilder repeatSecondlyForTotalCount (final int nCount, final int nSeconds) { ValueEnforcer.isGT0 (nCount, "Count"); return simpleSchedule ().withIntervalInSeconds (nSeconds).withRepeatCount (nCount - 1); }
[ "@", "Nonnull", "public", "static", "SimpleScheduleBuilder", "repeatSecondlyForTotalCount", "(", "final", "int", "nCount", ",", "final", "int", "nSeconds", ")", "{", "ValueEnforcer", ".", "isGT0", "(", "nCount", ",", "\"Count\"", ")", ";", "return", "simpleSchedul...
Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of seconds. <p> Note: Total count = 1 (at start time) + repeat count </p> @return the new SimpleScheduleBuilder
[ "Create", "a", "SimpleScheduleBuilder", "set", "to", "repeat", "the", "given", "number", "of", "times", "-", "1", "with", "an", "interval", "of", "the", "given", "number", "of", "seconds", ".", "<p", ">", "Note", ":", "Total", "count", "=", "1", "(", "...
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java#L204-L209
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_happly.java
Dcs_happly.cs_happly
public static boolean cs_happly(Dcs V, int i, double beta, double[] x) { """ Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @...
java
public static boolean cs_happly(Dcs V, int i, double beta, double[] x) { int p, Vp[], Vi[]; double Vx[], tau = 0; if (!Dcs_util.CS_CSC(V) || x == null) return (false); /* check inputs */ Vp = V.p; Vi = V.i; Vx = V.x; for (p = Vp[i]; p < Vp[i + ...
[ "public", "static", "boolean", "cs_happly", "(", "Dcs", "V", ",", "int", "i", ",", "double", "beta", ",", "double", "[", "]", "x", ")", "{", "int", "p", ",", "Vp", "[", "]", ",", "Vi", "[", "]", ";", "double", "Vx", "[", "]", ",", "tau", "=",...
Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @return true if successful, false on error
[ "Applies", "a", "Householder", "reflection", "to", "a", "dense", "vector", "x", "=", "(", "I", "-", "beta", "*", "v", "*", "v", ")", "*", "x", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_happly.java#L51-L69
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MCsvWriter.java
MCsvWriter.writeCsvHeader
protected void writeCsvHeader(final JTable table, final Writer out, final char csvSeparator) throws IOException { """ Exporte les headers csv d'une JTable.. @param table JTable @param out Writer @param csvSeparator char @throws IOException Erreur disque """ // récupération des informations uti...
java
protected void writeCsvHeader(final JTable table, final Writer out, final char csvSeparator) throws IOException { // récupération des informations utiles final int columnCount = table.getColumnModel().getColumnCount(); final String eol = System.getProperty("line.separator"); if (table.getName() != nul...
[ "protected", "void", "writeCsvHeader", "(", "final", "JTable", "table", ",", "final", "Writer", "out", ",", "final", "char", "csvSeparator", ")", "throws", "IOException", "{", "// récupération des informations utiles\r", "final", "int", "columnCount", "=", "table", ...
Exporte les headers csv d'une JTable.. @param table JTable @param out Writer @param csvSeparator char @throws IOException Erreur disque
[ "Exporte", "les", "headers", "csv", "d", "une", "JTable", ".." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MCsvWriter.java#L190-L220
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java
PathExpression.parsePathInWorkspace
public static WorkspacePath parsePathInWorkspace( String path ) { """ Parse a path of the form <code>{workspaceName}:{absolutePath}</code> or <code>{absolutePath}</code>. @param path the path @return the workspace path, or null if the supplied path doesn't match any of the path patterns """ // Extr...
java
public static WorkspacePath parsePathInWorkspace( String path ) { // Extract the workspace name and absPath from the supplied path ... java.util.regex.Matcher pathMatcher = WORKSPACE_AND_PATH_PATTERN.matcher(path); if (!pathMatcher.matches()) { // No match ... return null...
[ "public", "static", "WorkspacePath", "parsePathInWorkspace", "(", "String", "path", ")", "{", "// Extract the workspace name and absPath from the supplied path ...", "java", ".", "util", ".", "regex", ".", "Matcher", "pathMatcher", "=", "WORKSPACE_AND_PATH_PATTERN", ".", "m...
Parse a path of the form <code>{workspaceName}:{absolutePath}</code> or <code>{absolutePath}</code>. @param path the path @return the workspace path, or null if the supplied path doesn't match any of the path patterns
[ "Parse", "a", "path", "of", "the", "form", "<code", ">", "{", "workspaceName", "}", ":", "{", "absolutePath", "}", "<", "/", "code", ">", "or", "<code", ">", "{", "absolutePath", "}", "<", "/", "code", ">", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java#L591-L602